@unaxiom/genesis-sdk
Version:
NPM module that provides access to Genesis' API
1,011 lines (1,010 loc) • 39.8 kB
JavaScript
"use strict";
// @generated by protoc-gen-es v1.3.0 with parameter "target=ts"
// @generated from file sales_receipts.proto (package Genesis, syntax proto3)
/* eslint-disable */
// @ts-nocheck
Object.defineProperty(exports, "__esModule", { value: true });
exports.SalesReceiptsServiceSearchAllReq = exports.SalesReceiptsServiceFilterReq = exports.SalesReceiptsServiceEntityPaginationReq = exports.SalesReceiptsServicePaginationResponse = exports.SalesReceiptsServicePaginationReq = exports.SalesReceiptsList = exports.SaleReceipt = exports.SalesReceiptsServiceUpdateRequest = exports.SalesReceiptsServiceCreateRequest = exports.SALE_RECEIPT_SORT_KEY = void 0;
const protobuf_1 = require("@bufbuild/protobuf");
const base_pb_js_1 = require("./base_pb.js");
/**
*
* Describes the available sort keys
*
* @generated from enum Genesis.SALE_RECEIPT_SORT_KEY
*/
var SALE_RECEIPT_SORT_KEY;
(function (SALE_RECEIPT_SORT_KEY) {
/**
* Fetch ordered results by id
*
* @generated from enum value: SALE_RECEIPT_SORT_KEY_ID_UNSPECIFIED = 0;
*/
SALE_RECEIPT_SORT_KEY[SALE_RECEIPT_SORT_KEY["SALE_RECEIPT_SORT_KEY_ID_UNSPECIFIED"] = 0] = "SALE_RECEIPT_SORT_KEY_ID_UNSPECIFIED";
/**
* Fetch ordered results by the creation timestamp
*
* @generated from enum value: SALE_RECEIPT_SORT_KEY_CREATED_AT = 1;
*/
SALE_RECEIPT_SORT_KEY[SALE_RECEIPT_SORT_KEY["SALE_RECEIPT_SORT_KEY_CREATED_AT"] = 1] = "SALE_RECEIPT_SORT_KEY_CREATED_AT";
/**
* Fetch ordered results by the modified timestamp
*
* @generated from enum value: SALE_RECEIPT_SORT_KEY_MODIFIED_AT = 2;
*/
SALE_RECEIPT_SORT_KEY[SALE_RECEIPT_SORT_KEY["SALE_RECEIPT_SORT_KEY_MODIFIED_AT"] = 2] = "SALE_RECEIPT_SORT_KEY_MODIFIED_AT";
/**
* Fetch ordered results by the approved on timestamp
*
* @generated from enum value: SALE_RECEIPT_SORT_KEY_APPROVED_ON = 3;
*/
SALE_RECEIPT_SORT_KEY[SALE_RECEIPT_SORT_KEY["SALE_RECEIPT_SORT_KEY_APPROVED_ON"] = 3] = "SALE_RECEIPT_SORT_KEY_APPROVED_ON";
/**
* Fetch ordered results by the approved by field
*
* @generated from enum value: SALE_RECEIPT_SORT_KEY_APPROVED_BY = 4;
*/
SALE_RECEIPT_SORT_KEY[SALE_RECEIPT_SORT_KEY["SALE_RECEIPT_SORT_KEY_APPROVED_BY"] = 4] = "SALE_RECEIPT_SORT_KEY_APPROVED_BY";
/**
* Fetch ordered results by the approver's role ID
*
* @generated from enum value: SALE_RECEIPT_SORT_KEY_APPROVER_ROLE_ID = 5;
*/
SALE_RECEIPT_SORT_KEY[SALE_RECEIPT_SORT_KEY["SALE_RECEIPT_SORT_KEY_APPROVER_ROLE_ID"] = 5] = "SALE_RECEIPT_SORT_KEY_APPROVER_ROLE_ID";
/**
* Fetch ordered results by the approver's completed on timestamp
*
* @generated from enum value: SALE_RECEIPT_SORT_KEY_COMPLETED_ON = 6;
*/
SALE_RECEIPT_SORT_KEY[SALE_RECEIPT_SORT_KEY["SALE_RECEIPT_SORT_KEY_COMPLETED_ON"] = 6] = "SALE_RECEIPT_SORT_KEY_COMPLETED_ON";
/**
* Fetch ordered results by the reference ID
*
* @generated from enum value: SALE_RECEIPT_SORT_KEY_REFERENCE_ID = 10;
*/
SALE_RECEIPT_SORT_KEY[SALE_RECEIPT_SORT_KEY["SALE_RECEIPT_SORT_KEY_REFERENCE_ID"] = 10] = "SALE_RECEIPT_SORT_KEY_REFERENCE_ID";
/**
* Fetch ordered results by the final ref number
*
* @generated from enum value: SALE_RECEIPT_SORT_KEY_FINAL_REF_NUMBER = 11;
*/
SALE_RECEIPT_SORT_KEY[SALE_RECEIPT_SORT_KEY["SALE_RECEIPT_SORT_KEY_FINAL_REF_NUMBER"] = 11] = "SALE_RECEIPT_SORT_KEY_FINAL_REF_NUMBER";
/**
* Fetch ordered results by the payment timestamp
*
* @generated from enum value: SALE_RECEIPT_SORT_KEY_PAYMENT_TIMESTAMP = 12;
*/
SALE_RECEIPT_SORT_KEY[SALE_RECEIPT_SORT_KEY["SALE_RECEIPT_SORT_KEY_PAYMENT_TIMESTAMP"] = 12] = "SALE_RECEIPT_SORT_KEY_PAYMENT_TIMESTAMP";
})(SALE_RECEIPT_SORT_KEY || (exports.SALE_RECEIPT_SORT_KEY = SALE_RECEIPT_SORT_KEY = {}));
// Retrieve enum metadata with: proto3.getEnumType(SALE_RECEIPT_SORT_KEY)
protobuf_1.proto3.util.setEnumType(SALE_RECEIPT_SORT_KEY, "Genesis.SALE_RECEIPT_SORT_KEY", [
{ no: 0, name: "SALE_RECEIPT_SORT_KEY_ID_UNSPECIFIED" },
{ no: 1, name: "SALE_RECEIPT_SORT_KEY_CREATED_AT" },
{ no: 2, name: "SALE_RECEIPT_SORT_KEY_MODIFIED_AT" },
{ no: 3, name: "SALE_RECEIPT_SORT_KEY_APPROVED_ON" },
{ no: 4, name: "SALE_RECEIPT_SORT_KEY_APPROVED_BY" },
{ no: 5, name: "SALE_RECEIPT_SORT_KEY_APPROVER_ROLE_ID" },
{ no: 6, name: "SALE_RECEIPT_SORT_KEY_COMPLETED_ON" },
{ no: 10, name: "SALE_RECEIPT_SORT_KEY_REFERENCE_ID" },
{ no: 11, name: "SALE_RECEIPT_SORT_KEY_FINAL_REF_NUMBER" },
{ no: 12, name: "SALE_RECEIPT_SORT_KEY_PAYMENT_TIMESTAMP" },
]);
/**
*
* Describes the parameters necessary to create a record
*
* @generated from message Genesis.SalesReceiptsServiceCreateRequest
*/
class SalesReceiptsServiceCreateRequest extends protobuf_1.Message {
/**
* Stores a globally unique entity UUID. This will be set at the organization level
*
* @generated from field: string entity_uuid = 1;
*/
entityUuid = "";
/**
* Stores any comment that the user might add during this operation
*
* @generated from field: string user_comment = 2;
*/
userComment = "";
/**
* The associated vault folder ID
*
* @generated from field: int64 vault_folder_id = 9;
*/
vaultFolderId = protobuf_1.protoInt64.zero;
/**
* The reference ID of the sales receipt
*
* @generated from field: string reference_id = 10;
*/
referenceId = "";
/**
* The reference on which the sales receipt has been created
*
* @generated from field: string ref_from = 12;
*/
refFrom = "";
/**
* The ID of the associated reference
*
* @generated from field: int64 ref_id = 13;
*/
refId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated bank account
*
* @generated from field: int64 bank_account_id = 15;
*/
bankAccountId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated currency
*
* @generated from field: int64 currency_id = 16;
*/
currencyId = protobuf_1.protoInt64.zero;
/**
* The type of the transaction
*
* @generated from field: string transaction_type = 17;
*/
transactionType = "";
/**
* The initial amount in cents, without any deductions
*
* @generated from field: int64 amount_base = 18;
*/
amountBase = protobuf_1.protoInt64.zero;
/**
* The final amount in cents, after all the deductions
*
* @generated from field: int64 amount_net = 19;
*/
amountNet = protobuf_1.protoInt64.zero;
/**
* The date & time of when the payment needs to be made
*
* @generated from field: int64 payment_timestamp = 20;
*/
paymentTimestamp = protobuf_1.protoInt64.zero;
/**
* The description of the sales receipt
*
* @generated from field: string description = 21;
*/
description = "";
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.SalesReceiptsServiceCreateRequest";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "entity_uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "user_comment", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 9, name: "vault_folder_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 10, name: "reference_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 12, name: "ref_from", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 13, name: "ref_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 15, name: "bank_account_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 16, name: "currency_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 17, name: "transaction_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 18, name: "amount_base", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 19, name: "amount_net", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 20, name: "payment_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 21, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes, options) {
return new SalesReceiptsServiceCreateRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new SalesReceiptsServiceCreateRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new SalesReceiptsServiceCreateRequest().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(SalesReceiptsServiceCreateRequest, a, b);
}
}
exports.SalesReceiptsServiceCreateRequest = SalesReceiptsServiceCreateRequest;
/**
*
* Describes the parameters necessary to update a record
*
* @generated from message Genesis.SalesReceiptsServiceUpdateRequest
*/
class SalesReceiptsServiceUpdateRequest extends protobuf_1.Message {
/**
* Stores any comment that the user might add during this operation
*
* @generated from field: string user_comment = 1;
*/
userComment = "";
/**
* The ID of the record that needs to be updated
*
* @generated from field: int64 id = 2;
*/
id = protobuf_1.protoInt64.zero;
/**
* Optional boolean value that stores if a notification needs to be sent to users about the update to the record. This is useful when a subsequent operation needs to be performed immediately (such as send to verification after updating the revision)
*
* @generated from field: bool notify_users = 3;
*/
notifyUsers = false;
/**
* The associated vault folder ID
*
* @generated from field: int64 vault_folder_id = 9;
*/
vaultFolderId = protobuf_1.protoInt64.zero;
/**
* The reference ID of the sales receipt
*
* @generated from field: string reference_id = 10;
*/
referenceId = "";
/**
* The ID of the associated bank account
*
* @generated from field: int64 bank_account_id = 15;
*/
bankAccountId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated currency
*
* @generated from field: int64 currency_id = 16;
*/
currencyId = protobuf_1.protoInt64.zero;
/**
* The type of the transaction
*
* @generated from field: string transaction_type = 17;
*/
transactionType = "";
/**
* The initial amount in cents, without any deductions
*
* @generated from field: int64 amount_base = 18;
*/
amountBase = protobuf_1.protoInt64.zero;
/**
* The final amount in cents, after all the deductions
*
* @generated from field: int64 amount_net = 19;
*/
amountNet = protobuf_1.protoInt64.zero;
/**
* The date & time of when the payment needs to be made
*
* @generated from field: int64 payment_timestamp = 20;
*/
paymentTimestamp = protobuf_1.protoInt64.zero;
/**
* The description of the sales receipt
*
* @generated from field: string description = 21;
*/
description = "";
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.SalesReceiptsServiceUpdateRequest";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "user_comment", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 3, name: "notify_users", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 9, name: "vault_folder_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 10, name: "reference_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 15, name: "bank_account_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 16, name: "currency_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 17, name: "transaction_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 18, name: "amount_base", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 19, name: "amount_net", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 20, name: "payment_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 21, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes, options) {
return new SalesReceiptsServiceUpdateRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new SalesReceiptsServiceUpdateRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new SalesReceiptsServiceUpdateRequest().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(SalesReceiptsServiceUpdateRequest, a, b);
}
}
exports.SalesReceiptsServiceUpdateRequest = SalesReceiptsServiceUpdateRequest;
/**
*
* Describes the parameters that are part of a standard response
*
* @generated from message Genesis.SaleReceipt
*/
class SaleReceipt extends protobuf_1.Message {
/**
* Stores a globally unique entity UUID. This will be set at the organization level
*
* @generated from field: string entity_uuid = 1;
*/
entityUuid = "";
/**
* Stores the metadata of this sales receipt
*
* @generated from field: Genesis.EmployeeMetadata metadata = 2;
*/
metadata;
/**
* Stores the approval metadata
*
* @generated from field: Genesis.ApprovalMetadata approval_metadata = 3;
*/
approvalMetadata;
/**
* The status of this sales receipt
*
* @generated from field: Genesis.STANDARD_LIFECYCLE_STATUS status = 4;
*/
status = base_pb_js_1.STANDARD_LIFECYCLE_STATUS.PREVERIFY_UNSPECIFIED;
/**
* Stores the logs of every operation performed on this sales receipt
*
* @generated from field: repeated Genesis.LogbookLogConciseSLC logs = 5;
*/
logs = [];
/**
* The timestamp of when this sales receipt was marked as completed
*
* @generated from field: int64 completed_on = 6;
*/
completedOn = protobuf_1.protoInt64.zero;
/**
* The associated vault folder ID
*
* @generated from field: int64 vault_folder_id = 9;
*/
vaultFolderId = protobuf_1.protoInt64.zero;
/**
* The reference ID of the sales receipt
*
* @generated from field: string reference_id = 10;
*/
referenceId = "";
/**
* The unique reference number that has been automatically generated
*
* @generated from field: string final_ref_number = 11;
*/
finalRefNumber = "";
/**
* The reference on which the sales receipt has been created
*
* @generated from field: string ref_from = 12;
*/
refFrom = "";
/**
* The ID of the associated reference
*
* @generated from field: int64 ref_id = 13;
*/
refId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated client
*
* @generated from field: int64 client_id = 14;
*/
clientId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated bank account
*
* @generated from field: int64 bank_account_id = 15;
*/
bankAccountId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated currency
*
* @generated from field: int64 currency_id = 16;
*/
currencyId = protobuf_1.protoInt64.zero;
/**
* The type of the transaction
*
* @generated from field: string transaction_type = 17;
*/
transactionType = "";
/**
* The initial amount in cents, without any deductions
*
* @generated from field: int64 amount_base = 18;
*/
amountBase = protobuf_1.protoInt64.zero;
/**
* The final amount in cents, after all the deductions
*
* @generated from field: int64 amount_net = 19;
*/
amountNet = protobuf_1.protoInt64.zero;
/**
* The date & time of when the payment needs to be made
*
* @generated from field: int64 payment_timestamp = 20;
*/
paymentTimestamp = protobuf_1.protoInt64.zero;
/**
* The description of the sales receipt
*
* @generated from field: string description = 21;
*/
description = "";
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.SaleReceipt";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "entity_uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "metadata", kind: "message", T: base_pb_js_1.EmployeeMetadata },
{ no: 3, name: "approval_metadata", kind: "message", T: base_pb_js_1.ApprovalMetadata },
{ no: 4, name: "status", kind: "enum", T: protobuf_1.proto3.getEnumType(base_pb_js_1.STANDARD_LIFECYCLE_STATUS) },
{ no: 5, name: "logs", kind: "message", T: base_pb_js_1.LogbookLogConciseSLC, repeated: true },
{ no: 6, name: "completed_on", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 9, name: "vault_folder_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 10, name: "reference_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 11, name: "final_ref_number", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 12, name: "ref_from", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 13, name: "ref_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 14, name: "client_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 15, name: "bank_account_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 16, name: "currency_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 17, name: "transaction_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 18, name: "amount_base", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 19, name: "amount_net", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 20, name: "payment_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 21, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes, options) {
return new SaleReceipt().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new SaleReceipt().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new SaleReceipt().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(SaleReceipt, a, b);
}
}
exports.SaleReceipt = SaleReceipt;
/**
*
* Describes the message consisting of the list of records
*
* @generated from message Genesis.SalesReceiptsList
*/
class SalesReceiptsList extends protobuf_1.Message {
/**
* List of records
*
* @generated from field: repeated Genesis.SaleReceipt list = 1;
*/
list = [];
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.SalesReceiptsList";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "list", kind: "message", T: SaleReceipt, repeated: true },
]);
static fromBinary(bytes, options) {
return new SalesReceiptsList().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new SalesReceiptsList().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new SalesReceiptsList().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(SalesReceiptsList, a, b);
}
}
exports.SalesReceiptsList = SalesReceiptsList;
/**
*
* Describes a pagination request to retrieve records
*
* @generated from message Genesis.SalesReceiptsServicePaginationReq
*/
class SalesReceiptsServicePaginationReq extends protobuf_1.Message {
/**
* If true, then returns only active records. If false, then returns only inactive records
*
* @generated from field: bool is_active = 1;
*/
isActive = false;
/**
* The number of records that need to be sent in the response
*
* @generated from field: int64 count = 2;
*/
count = protobuf_1.protoInt64.zero;
/**
* The number that need to be offset by before fetching the records
*
* @generated from field: int64 offset = 3;
*/
offset = protobuf_1.protoInt64.zero;
/**
* The sort order that is to be used to fetch the pagination response
*
* @generated from field: Genesis.SORT_ORDER sort_order = 4;
*/
sortOrder = base_pb_js_1.SORT_ORDER.ASCENDING_UNSPECIFIED;
/**
* The sort key that is to be used to fetch the pagination response
*
* @generated from field: Genesis.SALE_RECEIPT_SORT_KEY sort_key = 5;
*/
sortKey = SALE_RECEIPT_SORT_KEY.SALE_RECEIPT_SORT_KEY_ID_UNSPECIFIED;
/**
* The status of this sales receipt
*
* @generated from field: Genesis.STANDARD_LIFECYCLE_STATUS status = 6;
*/
status = base_pb_js_1.STANDARD_LIFECYCLE_STATUS.PREVERIFY_UNSPECIFIED;
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.SalesReceiptsServicePaginationReq";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "is_active", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 2, name: "count", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 3, name: "offset", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 4, name: "sort_order", kind: "enum", T: protobuf_1.proto3.getEnumType(base_pb_js_1.SORT_ORDER) },
{ no: 5, name: "sort_key", kind: "enum", T: protobuf_1.proto3.getEnumType(SALE_RECEIPT_SORT_KEY) },
{ no: 6, name: "status", kind: "enum", T: protobuf_1.proto3.getEnumType(base_pb_js_1.STANDARD_LIFECYCLE_STATUS) },
]);
static fromBinary(bytes, options) {
return new SalesReceiptsServicePaginationReq().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new SalesReceiptsServicePaginationReq().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new SalesReceiptsServicePaginationReq().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(SalesReceiptsServicePaginationReq, a, b);
}
}
exports.SalesReceiptsServicePaginationReq = SalesReceiptsServicePaginationReq;
/**
*
* Describes the response to a pagination request
*
* @generated from message Genesis.SalesReceiptsServicePaginationResponse
*/
class SalesReceiptsServicePaginationResponse extends protobuf_1.Message {
/**
* The number of records in this payload
*
* @generated from field: int64 count = 1;
*/
count = protobuf_1.protoInt64.zero;
/**
* The number that has been offset before fetching the records. This is the same value that has been sent as part of the pagination request
*
* @generated from field: int64 offset = 2;
*/
offset = protobuf_1.protoInt64.zero;
/**
* The total number of records that are available
*
* @generated from field: int64 total = 3;
*/
total = protobuf_1.protoInt64.zero;
/**
* The list of records
*
* @generated from field: repeated Genesis.SaleReceipt payload = 4;
*/
payload = [];
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.SalesReceiptsServicePaginationResponse";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "count", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 2, name: "offset", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 3, name: "total", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 4, name: "payload", kind: "message", T: SaleReceipt, repeated: true },
]);
static fromBinary(bytes, options) {
return new SalesReceiptsServicePaginationResponse().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new SalesReceiptsServicePaginationResponse().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new SalesReceiptsServicePaginationResponse().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(SalesReceiptsServicePaginationResponse, a, b);
}
}
exports.SalesReceiptsServicePaginationResponse = SalesReceiptsServicePaginationResponse;
/**
*
* Describes a pagination request to retrieve records associated with an entity UUID
*
* @generated from message Genesis.SalesReceiptsServiceEntityPaginationReq
*/
class SalesReceiptsServiceEntityPaginationReq extends protobuf_1.Message {
/**
* If true, then returns only active records. If false, then returns only inactive records
*
* @generated from field: bool is_active = 1;
*/
isActive = false;
/**
* The number of records that need to be sent in the response
*
* @generated from field: int64 count = 2;
*/
count = protobuf_1.protoInt64.zero;
/**
* The number that need to be offset by before fetching the records
*
* @generated from field: int64 offset = 3;
*/
offset = protobuf_1.protoInt64.zero;
/**
* The sort order that is to be used to fetch the pagination response
*
* @generated from field: Genesis.SORT_ORDER sort_order = 4;
*/
sortOrder = base_pb_js_1.SORT_ORDER.ASCENDING_UNSPECIFIED;
/**
* The sort key that is to be used to fetch the pagination response
*
* @generated from field: Genesis.SALE_RECEIPT_SORT_KEY sort_key = 5;
*/
sortKey = SALE_RECEIPT_SORT_KEY.SALE_RECEIPT_SORT_KEY_ID_UNSPECIFIED;
/**
* The entity UUID that is to be used to filter records
*
* @generated from field: string entity_uuid = 6;
*/
entityUuid = "";
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.SalesReceiptsServiceEntityPaginationReq";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "is_active", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 2, name: "count", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 3, name: "offset", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 4, name: "sort_order", kind: "enum", T: protobuf_1.proto3.getEnumType(base_pb_js_1.SORT_ORDER) },
{ no: 5, name: "sort_key", kind: "enum", T: protobuf_1.proto3.getEnumType(SALE_RECEIPT_SORT_KEY) },
{ no: 6, name: "entity_uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes, options) {
return new SalesReceiptsServiceEntityPaginationReq().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new SalesReceiptsServiceEntityPaginationReq().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new SalesReceiptsServiceEntityPaginationReq().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(SalesReceiptsServiceEntityPaginationReq, a, b);
}
}
exports.SalesReceiptsServiceEntityPaginationReq = SalesReceiptsServiceEntityPaginationReq;
/**
*
* Describes the base request payload of a filter search
*
* @generated from message Genesis.SalesReceiptsServiceFilterReq
*/
class SalesReceiptsServiceFilterReq extends protobuf_1.Message {
/**
* If true, then returns only active records. If false, then returns only inactive records
*
* @generated from field: bool is_active = 1;
*/
isActive = false;
/**
* The number of records that need to be sent in the response. Returns all records if it is set to -1
*
* @generated from field: int64 count = 2;
*/
count = protobuf_1.protoInt64.zero;
/**
* The number that need to be offset by before fetching the records
*
* @generated from field: int64 offset = 3;
*/
offset = protobuf_1.protoInt64.zero;
/**
* The sort order that is to be used to fetch the pagination response
*
* @generated from field: Genesis.SORT_ORDER sort_order = 4;
*/
sortOrder = base_pb_js_1.SORT_ORDER.ASCENDING_UNSPECIFIED;
/**
* The sort key that is to be used to fetch the pagination response
*
* @generated from field: Genesis.SALE_RECEIPT_SORT_KEY sort_key = 5;
*/
sortKey = SALE_RECEIPT_SORT_KEY.SALE_RECEIPT_SORT_KEY_ID_UNSPECIFIED;
/**
* The minimum timestamp that needs to be considered to filter by creation
*
* @generated from field: int64 creation_timestamp_start = 6;
*/
creationTimestampStart = protobuf_1.protoInt64.zero;
/**
* The maximum timestamp that needs to be considered to filter by creation
*
* @generated from field: int64 creation_timestamp_end = 7;
*/
creationTimestampEnd = protobuf_1.protoInt64.zero;
/**
* The entity UUID that is to be used to filter records
*
* @generated from field: string entity_uuid = 8;
*/
entityUuid = "";
/**
* The status of this sales receipt
*
* @generated from field: Genesis.STANDARD_LIFECYCLE_STATUS status = 10;
*/
status = base_pb_js_1.STANDARD_LIFECYCLE_STATUS.PREVERIFY_UNSPECIFIED;
/**
* The start range of approved timestamp
*
* @generated from field: int64 approved_on_start = 11;
*/
approvedOnStart = protobuf_1.protoInt64.zero;
/**
* The end range of approved timestamp
*
* @generated from field: int64 approved_on_end = 12;
*/
approvedOnEnd = protobuf_1.protoInt64.zero;
/**
* The ID of the approver
*
* @generated from field: int64 approved_by_user_id = 13;
*/
approvedByUserId = protobuf_1.protoInt64.zero;
/**
* The role ID of the approver
*
* @generated from field: int64 approver_role_id = 14;
*/
approverRoleId = protobuf_1.protoInt64.zero;
/**
* The start range of completed timestamp
*
* @generated from field: int64 completed_on_start = 15;
*/
completedOnStart = protobuf_1.protoInt64.zero;
/**
* The end range of completed timestamp
*
* @generated from field: int64 completed_on_end = 16;
*/
completedOnEnd = protobuf_1.protoInt64.zero;
/**
* The reference_id of the sales receipt
*
* @generated from field: string reference_id = 20;
*/
referenceId = "";
/**
* The unique reference number that has been automatically generated
*
* @generated from field: string final_ref_number = 21;
*/
finalRefNumber = "";
/**
* The reference on which the sales receipt has been created
*
* @generated from field: string ref_from = 22;
*/
refFrom = "";
/**
* The ID of the associated reference
*
* @generated from field: int64 ref_id = 23;
*/
refId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated client
*
* @generated from field: int64 client_id = 24;
*/
clientId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated bank account
*
* @generated from field: int64 bank_account_id = 25;
*/
bankAccountId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated currency
*
* @generated from field: int64 currency_id = 26;
*/
currencyId = protobuf_1.protoInt64.zero;
/**
* The type of the transaction
*
* @generated from field: string transaction_type = 27;
*/
transactionType = "";
/**
* The start range of the payment timestamp
*
* @generated from field: int64 payment_timestamp_start = 28;
*/
paymentTimestampStart = protobuf_1.protoInt64.zero;
/**
* The end range of the payment timestamp
*
* @generated from field: int64 payment_timestamp_end = 29;
*/
paymentTimestampEnd = protobuf_1.protoInt64.zero;
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.SalesReceiptsServiceFilterReq";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "is_active", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 2, name: "count", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 3, name: "offset", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 4, name: "sort_order", kind: "enum", T: protobuf_1.proto3.getEnumType(base_pb_js_1.SORT_ORDER) },
{ no: 5, name: "sort_key", kind: "enum", T: protobuf_1.proto3.getEnumType(SALE_RECEIPT_SORT_KEY) },
{ no: 6, name: "creation_timestamp_start", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 7, name: "creation_timestamp_end", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 8, name: "entity_uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 10, name: "status", kind: "enum", T: protobuf_1.proto3.getEnumType(base_pb_js_1.STANDARD_LIFECYCLE_STATUS) },
{ no: 11, name: "approved_on_start", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 12, name: "approved_on_end", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 13, name: "approved_by_user_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 14, name: "approver_role_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 15, name: "completed_on_start", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 16, name: "completed_on_end", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 20, name: "reference_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 21, name: "final_ref_number", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 22, name: "ref_from", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 23, name: "ref_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 24, name: "client_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 25, name: "bank_account_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 26, name: "currency_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 27, name: "transaction_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 28, name: "payment_timestamp_start", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 29, name: "payment_timestamp_end", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
]);
static fromBinary(bytes, options) {
return new SalesReceiptsServiceFilterReq().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new SalesReceiptsServiceFilterReq().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new SalesReceiptsServiceFilterReq().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(SalesReceiptsServiceFilterReq, a, b);
}
}
exports.SalesReceiptsServiceFilterReq = SalesReceiptsServiceFilterReq;
/**
*
* Describes the request payload for performing a generic search operation on records
*
* @generated from message Genesis.SalesReceiptsServiceSearchAllReq
*/
class SalesReceiptsServiceSearchAllReq extends protobuf_1.Message {
/**
* If true, then returns only active records. If false, then returns only inactive records
*
* @generated from field: bool is_active = 1;
*/
isActive = false;
/**
* The number of records that need to be sent in the response. Returns all records if it is set to -1
*
* @generated from field: int64 count = 2;
*/
count = protobuf_1.protoInt64.zero;
/**
* The number that need to be offset by before fetching the records
*
* @generated from field: int64 offset = 3;
*/
offset = protobuf_1.protoInt64.zero;
/**
* The sort order that is to be used to fetch the pagination response
*
* @generated from field: Genesis.SORT_ORDER sort_order = 4;
*/
sortOrder = base_pb_js_1.SORT_ORDER.ASCENDING_UNSPECIFIED;
/**
* The sort key that is to be used to fetch the pagination response
*
* @generated from field: Genesis.SALE_RECEIPT_SORT_KEY sort_key = 5;
*/
sortKey = SALE_RECEIPT_SORT_KEY.SALE_RECEIPT_SORT_KEY_ID_UNSPECIFIED;
/**
* The entity UUID that is to be used to filter records
*
* @generated from field: string entity_uuid = 6;
*/
entityUuid = "";
/**
* Limit the search space to the given status
*
* @generated from field: Genesis.STANDARD_LIFECYCLE_STATUS status = 10;
*/
status = base_pb_js_1.STANDARD_LIFECYCLE_STATUS.PREVERIFY_UNSPECIFIED;
/**
* Describes the key with which the search operation needs to be performed
*
* @generated from field: string search_key = 11;
*/
searchKey = "";
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.SalesReceiptsServiceSearchAllReq";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "is_active", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 2, name: "count", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 3, name: "offset", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 4, name: "sort_order", kind: "enum", T: protobuf_1.proto3.getEnumType(base_pb_js_1.SORT_ORDER) },
{ no: 5, name: "sort_key", kind: "enum", T: protobuf_1.proto3.getEnumType(SALE_RECEIPT_SORT_KEY) },
{ no: 6, name: "entity_uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 10, name: "status", kind: "enum", T: protobuf_1.proto3.getEnumType(base_pb_js_1.STANDARD_LIFECYCLE_STATUS) },
{ no: 11, name: "search_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes, options) {
return new SalesReceiptsServiceSearchAllReq().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new SalesReceiptsServiceSearchAllReq().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new SalesReceiptsServiceSearchAllReq().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(SalesReceiptsServiceSearchAllReq, a, b);
}
}
exports.SalesReceiptsServiceSearchAllReq = SalesReceiptsServiceSearchAllReq;