@unaxiom/genesis-sdk
Version:
NPM module that provides access to Genesis' API
844 lines (843 loc) • 31.9 kB
JavaScript
"use strict";
// @generated by protoc-gen-es v1.3.0 with parameter "target=ts"
// @generated from file clients.proto (package Genesis, syntax proto3)
/* eslint-disable */
// @ts-nocheck
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClientsServiceSearchAllReq = exports.ClientsServiceFilterReq = exports.ClientsServiceEntityPaginationReq = exports.ClientsServicePaginationResponse = exports.ClientsServicePaginationReq = exports.ClientsList = exports.Client = exports.ClientsServiceUpdateRequest = exports.ClientsServiceCreateRequest = exports.CLIENT_SORT_KEY = void 0;
const protobuf_1 = require("@bufbuild/protobuf");
const forms_pb_js_1 = require("./forms_pb.js");
const base_pb_js_1 = require("./base_pb.js");
/**
*
* Describes the available sort keys
*
* @generated from enum Genesis.CLIENT_SORT_KEY
*/
var CLIENT_SORT_KEY;
(function (CLIENT_SORT_KEY) {
/**
* Fetch ordered results by id
*
* @generated from enum value: CLIENT_SORT_KEY_ID_UNSPECIFIED = 0;
*/
CLIENT_SORT_KEY[CLIENT_SORT_KEY["CLIENT_SORT_KEY_ID_UNSPECIFIED"] = 0] = "CLIENT_SORT_KEY_ID_UNSPECIFIED";
/**
* Fetch ordered results by the creation timestamp
*
* @generated from enum value: CLIENT_SORT_KEY_CREATED_AT = 1;
*/
CLIENT_SORT_KEY[CLIENT_SORT_KEY["CLIENT_SORT_KEY_CREATED_AT"] = 1] = "CLIENT_SORT_KEY_CREATED_AT";
/**
* Fetch ordered results by the modified timestamp
*
* @generated from enum value: CLIENT_SORT_KEY_MODIFIED_AT = 2;
*/
CLIENT_SORT_KEY[CLIENT_SORT_KEY["CLIENT_SORT_KEY_MODIFIED_AT"] = 2] = "CLIENT_SORT_KEY_MODIFIED_AT";
/**
* Fetch ordered results by the approved on timestamp
*
* @generated from enum value: CLIENT_SORT_KEY_APPROVED_ON = 3;
*/
CLIENT_SORT_KEY[CLIENT_SORT_KEY["CLIENT_SORT_KEY_APPROVED_ON"] = 3] = "CLIENT_SORT_KEY_APPROVED_ON";
/**
* Fetch ordered results by the approved by field
*
* @generated from enum value: CLIENT_SORT_KEY_APPROVED_BY = 4;
*/
CLIENT_SORT_KEY[CLIENT_SORT_KEY["CLIENT_SORT_KEY_APPROVED_BY"] = 4] = "CLIENT_SORT_KEY_APPROVED_BY";
/**
* Fetch ordered results by the approver's role ID
*
* @generated from enum value: CLIENT_SORT_KEY_APPROVER_ROLE_ID = 5;
*/
CLIENT_SORT_KEY[CLIENT_SORT_KEY["CLIENT_SORT_KEY_APPROVER_ROLE_ID"] = 5] = "CLIENT_SORT_KEY_APPROVER_ROLE_ID";
/**
* Fetch ordered results by the name
*
* @generated from enum value: CLIENT_SORT_KEY_NAME = 10;
*/
CLIENT_SORT_KEY[CLIENT_SORT_KEY["CLIENT_SORT_KEY_NAME"] = 10] = "CLIENT_SORT_KEY_NAME";
/**
* Fetch ordered results by the code
*
* @generated from enum value: CLIENT_SORT_KEY_CODE = 11;
*/
CLIENT_SORT_KEY[CLIENT_SORT_KEY["CLIENT_SORT_KEY_CODE"] = 11] = "CLIENT_SORT_KEY_CODE";
/**
* Fetch ordered results by the email address
*
* @generated from enum value: CLIENT_SORT_KEY_EMAIL = 12;
*/
CLIENT_SORT_KEY[CLIENT_SORT_KEY["CLIENT_SORT_KEY_EMAIL"] = 12] = "CLIENT_SORT_KEY_EMAIL";
/**
* Fetch ordered results by the phone number
*
* @generated from enum value: CLIENT_SORT_KEY_PHONE = 13;
*/
CLIENT_SORT_KEY[CLIENT_SORT_KEY["CLIENT_SORT_KEY_PHONE"] = 13] = "CLIENT_SORT_KEY_PHONE";
})(CLIENT_SORT_KEY || (exports.CLIENT_SORT_KEY = CLIENT_SORT_KEY = {}));
// Retrieve enum metadata with: proto3.getEnumType(CLIENT_SORT_KEY)
protobuf_1.proto3.util.setEnumType(CLIENT_SORT_KEY, "Genesis.CLIENT_SORT_KEY", [
{ no: 0, name: "CLIENT_SORT_KEY_ID_UNSPECIFIED" },
{ no: 1, name: "CLIENT_SORT_KEY_CREATED_AT" },
{ no: 2, name: "CLIENT_SORT_KEY_MODIFIED_AT" },
{ no: 3, name: "CLIENT_SORT_KEY_APPROVED_ON" },
{ no: 4, name: "CLIENT_SORT_KEY_APPROVED_BY" },
{ no: 5, name: "CLIENT_SORT_KEY_APPROVER_ROLE_ID" },
{ no: 10, name: "CLIENT_SORT_KEY_NAME" },
{ no: 11, name: "CLIENT_SORT_KEY_CODE" },
{ no: 12, name: "CLIENT_SORT_KEY_EMAIL" },
{ no: 13, name: "CLIENT_SORT_KEY_PHONE" },
]);
/**
*
* Describes the parameters necessary to create a record
*
* @generated from message Genesis.ClientsServiceCreateRequest
*/
class ClientsServiceCreateRequest 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 name of the client
*
* @generated from field: string name = 10;
*/
name = "";
/**
* The unique code by which the client is classified
*
* @generated from field: string code = 11;
*/
code = "";
/**
* The primary email of the client
*
* @generated from field: string email = 12;
*/
email = "";
/**
* The primary contact number of the client
*
* @generated from field: string phone = 13;
*/
phone = "";
/**
* The list of dynamic forms
*
* @generated from field: repeated Genesis.FormFieldDatumCreateRequest form_data = 30;
*/
formData = [];
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.ClientsServiceCreateRequest";
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: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 11, name: "code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 12, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 13, name: "phone", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 30, name: "form_data", kind: "message", T: forms_pb_js_1.FormFieldDatumCreateRequest, repeated: true },
]);
static fromBinary(bytes, options) {
return new ClientsServiceCreateRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new ClientsServiceCreateRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new ClientsServiceCreateRequest().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(ClientsServiceCreateRequest, a, b);
}
}
exports.ClientsServiceCreateRequest = ClientsServiceCreateRequest;
/**
*
* Describes the parameters necessary to update a record
*
* @generated from message Genesis.ClientsServiceUpdateRequest
*/
class ClientsServiceUpdateRequest 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 name of the client
*
* @generated from field: string name = 10;
*/
name = "";
/**
* The unique code by which the client is classified
*
* @generated from field: string code = 11;
*/
code = "";
/**
* The primary email of the client
*
* @generated from field: string email = 12;
*/
email = "";
/**
* The primary contact number of the client
*
* @generated from field: string phone = 13;
*/
phone = "";
/**
* The list of dynamic forms
*
* @generated from field: repeated Genesis.FormFieldDatumCreateRequest form_data = 30;
*/
formData = [];
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.ClientsServiceUpdateRequest";
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: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 11, name: "code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 12, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 13, name: "phone", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 30, name: "form_data", kind: "message", T: forms_pb_js_1.FormFieldDatumCreateRequest, repeated: true },
]);
static fromBinary(bytes, options) {
return new ClientsServiceUpdateRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new ClientsServiceUpdateRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new ClientsServiceUpdateRequest().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(ClientsServiceUpdateRequest, a, b);
}
}
exports.ClientsServiceUpdateRequest = ClientsServiceUpdateRequest;
/**
*
* Describes the parameters that are part of a standard response
*
* @generated from message Genesis.Client
*/
class Client 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 client
*
* @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 client
*
* @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 client
*
* @generated from field: repeated Genesis.LogbookLogConciseSLC logs = 5;
*/
logs = [];
/**
* The associated vault folder ID
*
* @generated from field: int64 vault_folder_id = 9;
*/
vaultFolderId = protobuf_1.protoInt64.zero;
/**
* The name of the client
*
* @generated from field: string name = 10;
*/
name = "";
/**
* The unique code by which the client is classified
*
* @generated from field: string code = 11;
*/
code = "";
/**
* The primary email of the client
*
* @generated from field: string email = 12;
*/
email = "";
/**
* The primary contact number of the client
*
* @generated from field: string phone = 13;
*/
phone = "";
/**
* The list of dynamic forms
*
* @generated from field: repeated Genesis.FormFieldDatum form_data = 30;
*/
formData = [];
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.Client";
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: 9, name: "vault_folder_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 10, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 11, name: "code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 12, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 13, name: "phone", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 30, name: "form_data", kind: "message", T: forms_pb_js_1.FormFieldDatum, repeated: true },
]);
static fromBinary(bytes, options) {
return new Client().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new Client().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new Client().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(Client, a, b);
}
}
exports.Client = Client;
/**
*
* Describes the message consisting of the list of records
*
* @generated from message Genesis.ClientsList
*/
class ClientsList extends protobuf_1.Message {
/**
* List of records
*
* @generated from field: repeated Genesis.Client list = 1;
*/
list = [];
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.ClientsList";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "list", kind: "message", T: Client, repeated: true },
]);
static fromBinary(bytes, options) {
return new ClientsList().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new ClientsList().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new ClientsList().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(ClientsList, a, b);
}
}
exports.ClientsList = ClientsList;
/**
*
* Describes a pagination request to retrieve records
*
* @generated from message Genesis.ClientsServicePaginationReq
*/
class ClientsServicePaginationReq 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.CLIENT_SORT_KEY sort_key = 5;
*/
sortKey = CLIENT_SORT_KEY.CLIENT_SORT_KEY_ID_UNSPECIFIED;
/**
* The status of this client
*
* @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.ClientsServicePaginationReq";
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(CLIENT_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 ClientsServicePaginationReq().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new ClientsServicePaginationReq().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new ClientsServicePaginationReq().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(ClientsServicePaginationReq, a, b);
}
}
exports.ClientsServicePaginationReq = ClientsServicePaginationReq;
/**
*
* Describes the response to a pagination request
*
* @generated from message Genesis.ClientsServicePaginationResponse
*/
class ClientsServicePaginationResponse 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.Client payload = 4;
*/
payload = [];
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.ClientsServicePaginationResponse";
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: Client, repeated: true },
]);
static fromBinary(bytes, options) {
return new ClientsServicePaginationResponse().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new ClientsServicePaginationResponse().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new ClientsServicePaginationResponse().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(ClientsServicePaginationResponse, a, b);
}
}
exports.ClientsServicePaginationResponse = ClientsServicePaginationResponse;
/**
*
* Describes a pagination request to retrieve records associated with an entity UUID
*
* @generated from message Genesis.ClientsServiceEntityPaginationReq
*/
class ClientsServiceEntityPaginationReq 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.CLIENT_SORT_KEY sort_key = 5;
*/
sortKey = CLIENT_SORT_KEY.CLIENT_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.ClientsServiceEntityPaginationReq";
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(CLIENT_SORT_KEY) },
{ no: 6, name: "entity_uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes, options) {
return new ClientsServiceEntityPaginationReq().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new ClientsServiceEntityPaginationReq().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new ClientsServiceEntityPaginationReq().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(ClientsServiceEntityPaginationReq, a, b);
}
}
exports.ClientsServiceEntityPaginationReq = ClientsServiceEntityPaginationReq;
/**
*
* Describes the base request payload of a filter search
*
* @generated from message Genesis.ClientsServiceFilterReq
*/
class ClientsServiceFilterReq 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.CLIENT_SORT_KEY sort_key = 5;
*/
sortKey = CLIENT_SORT_KEY.CLIENT_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 client
*
* @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 name of the client
*
* @generated from field: string name = 20;
*/
name = "";
/**
* The unique code by which the client is classified
*
* @generated from field: string code = 21;
*/
code = "";
/**
* The primary email of the client
*
* @generated from field: string email = 22;
*/
email = "";
/**
* The primary contact number of the client
*
* @generated from field: string phone = 23;
*/
phone = "";
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.ClientsServiceFilterReq";
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(CLIENT_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: 20, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 21, name: "code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 22, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 23, name: "phone", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes, options) {
return new ClientsServiceFilterReq().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new ClientsServiceFilterReq().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new ClientsServiceFilterReq().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(ClientsServiceFilterReq, a, b);
}
}
exports.ClientsServiceFilterReq = ClientsServiceFilterReq;
/**
*
* Describes the request payload for performing a generic search operation on records
*
* @generated from message Genesis.ClientsServiceSearchAllReq
*/
class ClientsServiceSearchAllReq 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.CLIENT_SORT_KEY sort_key = 5;
*/
sortKey = CLIENT_SORT_KEY.CLIENT_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.ClientsServiceSearchAllReq";
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(CLIENT_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 ClientsServiceSearchAllReq().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new ClientsServiceSearchAllReq().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new ClientsServiceSearchAllReq().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(ClientsServiceSearchAllReq, a, b);
}
}
exports.ClientsServiceSearchAllReq = ClientsServiceSearchAllReq;