@unaxiom/genesis-sdk
Version:
NPM module that provides access to Genesis' API
1,109 lines (1,108 loc) • 44.1 kB
JavaScript
"use strict";
// @generated by protoc-gen-es v1.3.0 with parameter "target=ts"
// @generated from file visitations.proto (package Genesis, syntax proto3)
/* eslint-disable */
// @ts-nocheck
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisitationsServiceSearchAllReq = exports.VisitationsServiceFilterReq = exports.VisitationsServiceEntityPaginationReq = exports.VisitationsServicePaginationResponse = exports.VisitationsServicePaginationReq = exports.VisitationsList = exports.Visitation = exports.VisitationsServiceImageExitRequest = exports.VisitationsServiceImageEntryRequest = exports.VisitationsServiceUpdateRequest = exports.VisitationsServiceCreateRequest = exports.VISITATION_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.VISITATION_SORT_KEY
*/
var VISITATION_SORT_KEY;
(function (VISITATION_SORT_KEY) {
/**
* Fetch ordered results by id
*
* @generated from enum value: VISITATION_SORT_KEY_ID_UNSPECIFIED = 0;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_ID_UNSPECIFIED"] = 0] = "VISITATION_SORT_KEY_ID_UNSPECIFIED";
/**
* Fetch ordered results by the creation timestamp
*
* @generated from enum value: VISITATION_SORT_KEY_CREATED_AT = 1;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_CREATED_AT"] = 1] = "VISITATION_SORT_KEY_CREATED_AT";
/**
* Fetch ordered results by the modified timestamp
*
* @generated from enum value: VISITATION_SORT_KEY_MODIFIED_AT = 2;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_MODIFIED_AT"] = 2] = "VISITATION_SORT_KEY_MODIFIED_AT";
/**
* Fetch ordered results by the approved on timestamp
*
* @generated from enum value: VISITATION_SORT_KEY_APPROVED_ON = 3;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_APPROVED_ON"] = 3] = "VISITATION_SORT_KEY_APPROVED_ON";
/**
* Fetch ordered results by the approved by field
*
* @generated from enum value: VISITATION_SORT_KEY_APPROVED_BY = 4;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_APPROVED_BY"] = 4] = "VISITATION_SORT_KEY_APPROVED_BY";
/**
* Fetch ordered results by the approver's role ID
*
* @generated from enum value: VISITATION_SORT_KEY_APPROVER_ROLE_ID = 5;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_APPROVER_ROLE_ID"] = 5] = "VISITATION_SORT_KEY_APPROVER_ROLE_ID";
/**
* Fetch ordered results by the approver's completed on timestamp
*
* @generated from enum value: VISITATION_SORT_KEY_COMPLETED_ON = 6;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_COMPLETED_ON"] = 6] = "VISITATION_SORT_KEY_COMPLETED_ON";
/**
* Fetch ordered results by the reference ID
*
* @generated from enum value: VISITATION_SORT_KEY_REFERENCE_ID = 10;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_REFERENCE_ID"] = 10] = "VISITATION_SORT_KEY_REFERENCE_ID";
/**
* Fetch ordered results by the final ref number
*
* @generated from enum value: VISITATION_SORT_KEY_FINAL_REF_NUMBER = 11;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_FINAL_REF_NUMBER"] = 11] = "VISITATION_SORT_KEY_FINAL_REF_NUMBER";
/**
* Fetch ordered results by the user ID
*
* @generated from enum value: VISITATION_SORT_KEY_USER_ID = 12;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_USER_ID"] = 12] = "VISITATION_SORT_KEY_USER_ID";
/**
* Fetch ordered results by the associate ID
*
* @generated from enum value: VISITATION_SORT_KEY_ASSOCIATE_ID = 13;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_ASSOCIATE_ID"] = 13] = "VISITATION_SORT_KEY_ASSOCIATE_ID";
/**
* Fetch ordered results by the "from timestamp"
*
* @generated from enum value: VISITATION_SORT_KEY_ENTRY_TIMESTAMP = 14;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_ENTRY_TIMESTAMP"] = 14] = "VISITATION_SORT_KEY_ENTRY_TIMESTAMP";
/**
* Fetch ordered results by the "to timestamp"
*
* @generated from enum value: VISITATION_SORT_KEY_EXIT_TIMESTAMP = 15;
*/
VISITATION_SORT_KEY[VISITATION_SORT_KEY["VISITATION_SORT_KEY_EXIT_TIMESTAMP"] = 15] = "VISITATION_SORT_KEY_EXIT_TIMESTAMP";
})(VISITATION_SORT_KEY || (exports.VISITATION_SORT_KEY = VISITATION_SORT_KEY = {}));
// Retrieve enum metadata with: proto3.getEnumType(VISITATION_SORT_KEY)
protobuf_1.proto3.util.setEnumType(VISITATION_SORT_KEY, "Genesis.VISITATION_SORT_KEY", [
{ no: 0, name: "VISITATION_SORT_KEY_ID_UNSPECIFIED" },
{ no: 1, name: "VISITATION_SORT_KEY_CREATED_AT" },
{ no: 2, name: "VISITATION_SORT_KEY_MODIFIED_AT" },
{ no: 3, name: "VISITATION_SORT_KEY_APPROVED_ON" },
{ no: 4, name: "VISITATION_SORT_KEY_APPROVED_BY" },
{ no: 5, name: "VISITATION_SORT_KEY_APPROVER_ROLE_ID" },
{ no: 6, name: "VISITATION_SORT_KEY_COMPLETED_ON" },
{ no: 10, name: "VISITATION_SORT_KEY_REFERENCE_ID" },
{ no: 11, name: "VISITATION_SORT_KEY_FINAL_REF_NUMBER" },
{ no: 12, name: "VISITATION_SORT_KEY_USER_ID" },
{ no: 13, name: "VISITATION_SORT_KEY_ASSOCIATE_ID" },
{ no: 14, name: "VISITATION_SORT_KEY_ENTRY_TIMESTAMP" },
{ no: 15, name: "VISITATION_SORT_KEY_EXIT_TIMESTAMP" },
]);
/**
*
* Describes the parameters necessary to create a record
*
* @generated from message Genesis.VisitationsServiceCreateRequest
*/
class VisitationsServiceCreateRequest 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 visitation
*
* @generated from field: string reference_id = 10;
*/
referenceId = "";
/**
* The ID of the user who is being visited
*
* @generated from field: int64 user_id = 11;
*/
userId = protobuf_1.protoInt64.zero;
/**
* The ID of the associate who has requested for visitation
*
* @generated from field: int64 associate_id = 12;
*/
associateId = protobuf_1.protoInt64.zero;
/**
* The UNIX timestamp from when the visitation begins
*
* @generated from field: int64 entry_timestamp = 13;
*/
entryTimestamp = protobuf_1.protoInt64.zero;
/**
* The UNIX timestamp from when the visitation ends
*
* @generated from field: int64 exit_timestamp = 14;
*/
exitTimestamp = protobuf_1.protoInt64.zero;
/**
* The description of the visitation
*
* @generated from field: string description = 15;
*/
description = "";
/**
* 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.VisitationsServiceCreateRequest";
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: 11, name: "user_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 12, name: "associate_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 13, name: "entry_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 14, name: "exit_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 15, name: "description", 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 VisitationsServiceCreateRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new VisitationsServiceCreateRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new VisitationsServiceCreateRequest().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(VisitationsServiceCreateRequest, a, b);
}
}
exports.VisitationsServiceCreateRequest = VisitationsServiceCreateRequest;
/**
*
* Describes the parameters necessary to update a record
*
* @generated from message Genesis.VisitationsServiceUpdateRequest
*/
class VisitationsServiceUpdateRequest 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 visitation
*
* @generated from field: string reference_id = 10;
*/
referenceId = "";
/**
* The UNIX timestamp from when the visitation begins
*
* @generated from field: int64 entry_timestamp = 12;
*/
entryTimestamp = protobuf_1.protoInt64.zero;
/**
* The UNIX timestamp from when the visitation ends
*
* @generated from field: int64 exit_timestamp = 13;
*/
exitTimestamp = protobuf_1.protoInt64.zero;
/**
* The description of the visitation
*
* @generated from field: string description = 14;
*/
description = "";
/**
* 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.VisitationsServiceUpdateRequest";
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: 12, name: "entry_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 13, name: "exit_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 14, name: "description", 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 VisitationsServiceUpdateRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new VisitationsServiceUpdateRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new VisitationsServiceUpdateRequest().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(VisitationsServiceUpdateRequest, a, b);
}
}
exports.VisitationsServiceUpdateRequest = VisitationsServiceUpdateRequest;
/**
*
* Describes the message payload that is necessary to create an entry record. This will most likely be called only from mobile devices.
*
* @generated from message Genesis.VisitationsServiceImageEntryRequest
*/
class VisitationsServiceImageEntryRequest 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 = "";
/**
* // The reference ID of the visitation
* string reference_id = 10 [(genesis_validate.rules).string = {
* pattern: "[0-9A-Za-z ]+$", // Allow spaces
* }];
* The ID of the user who is being visited
*
* @generated from field: int64 user_id = 11;
*/
userId = protobuf_1.protoInt64.zero;
/**
* The ID of the associate who has requested for visitation
*
* @generated from field: int64 associate_id = 12;
*/
associateId = protobuf_1.protoInt64.zero;
/**
* The raw image content of the entry image
*
* @generated from field: bytes entry_image = 13;
*/
entryImage = new Uint8Array(0);
/**
* The MIME type of the entry image
*
* @generated from field: string entry_image_mime_type = 14;
*/
entryImageMimeType = "";
/**
* The description of the visitation
*
* @generated from field: string description = 15;
*/
description = "";
/**
* The latitude of where the entry was recorded
*
* @generated from field: double entry_latitude = 16;
*/
entryLatitude = 0;
/**
* The longiture of where the entry was recorded
*
* @generated from field: double entry_longitude = 17;
*/
entryLongitude = 0;
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.VisitationsServiceImageEntryRequest";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "entity_uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 11, name: "user_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 12, name: "associate_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 13, name: "entry_image", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 14, name: "entry_image_mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 15, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 16, name: "entry_latitude", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
{ no: 17, name: "entry_longitude", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
]);
static fromBinary(bytes, options) {
return new VisitationsServiceImageEntryRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new VisitationsServiceImageEntryRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new VisitationsServiceImageEntryRequest().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(VisitationsServiceImageEntryRequest, a, b);
}
}
exports.VisitationsServiceImageEntryRequest = VisitationsServiceImageEntryRequest;
/**
*
* Describes the message payload that is necessary to create an exit record. This will most likely be called only from mobile devices.
*
* @generated from message Genesis.VisitationsServiceImageExitRequest
*/
class VisitationsServiceImageExitRequest extends protobuf_1.Message {
/**
* The ID of the record that needs to be updated
*
* @generated from field: int64 id = 2;
*/
id = protobuf_1.protoInt64.zero;
/**
* The raw image content of the exit image
*
* @generated from field: bytes exit_image = 13;
*/
exitImage = new Uint8Array(0);
/**
* The MIME type of the exit image
*
* @generated from field: string exit_image_mime_type = 14;
*/
exitImageMimeType = "";
/**
* The latitude of where the exit was recorded
*
* @generated from field: double exit_latitude = 15;
*/
exitLatitude = 0;
/**
* The longiture of where the exit was recorded
*
* @generated from field: double exit_longitude = 16;
*/
exitLongitude = 0;
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.VisitationsServiceImageExitRequest";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 2, name: "id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 13, name: "exit_image", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 14, name: "exit_image_mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 15, name: "exit_latitude", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
{ no: 16, name: "exit_longitude", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
]);
static fromBinary(bytes, options) {
return new VisitationsServiceImageExitRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new VisitationsServiceImageExitRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new VisitationsServiceImageExitRequest().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(VisitationsServiceImageExitRequest, a, b);
}
}
exports.VisitationsServiceImageExitRequest = VisitationsServiceImageExitRequest;
/**
*
* Describes the parameters that are part of a standard response
*
* @generated from message Genesis.Visitation
*/
class Visitation 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 visitation
*
* @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 visitation
*
* @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 visitation
*
* @generated from field: repeated Genesis.LogbookLogConciseSLC logs = 5;
*/
logs = [];
/**
* The timestamp of when this visitation 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 visitation
*
* @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 ID of the user who is being visited
*
* @generated from field: int64 user_id = 12;
*/
userId = protobuf_1.protoInt64.zero;
/**
* The ID of the associate who has requested for visitation
*
* @generated from field: int64 associate_id = 13;
*/
associateId = protobuf_1.protoInt64.zero;
/**
* The UNIX timestamp from when the visitation begins
*
* @generated from field: int64 entry_timestamp = 14;
*/
entryTimestamp = protobuf_1.protoInt64.zero;
/**
* The UNIX timestamp from when the visitation ends
*
* @generated from field: int64 exit_timestamp = 15;
*/
exitTimestamp = protobuf_1.protoInt64.zero;
/**
* The description of the visitation
*
* @generated from field: string description = 16;
*/
description = "";
/**
* 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.Visitation";
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: "user_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 13, name: "associate_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 14, name: "entry_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 15, name: "exit_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 16, name: "description", 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 Visitation().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new Visitation().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new Visitation().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(Visitation, a, b);
}
}
exports.Visitation = Visitation;
/**
*
* Describes the message consisting of the list of records
*
* @generated from message Genesis.VisitationsList
*/
class VisitationsList extends protobuf_1.Message {
/**
* List of records
*
* @generated from field: repeated Genesis.Visitation list = 1;
*/
list = [];
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.VisitationsList";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "list", kind: "message", T: Visitation, repeated: true },
]);
static fromBinary(bytes, options) {
return new VisitationsList().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new VisitationsList().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new VisitationsList().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(VisitationsList, a, b);
}
}
exports.VisitationsList = VisitationsList;
/**
*
* Describes a pagination request to retrieve records
*
* @generated from message Genesis.VisitationsServicePaginationReq
*/
class VisitationsServicePaginationReq 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.VISITATION_SORT_KEY sort_key = 5;
*/
sortKey = VISITATION_SORT_KEY.VISITATION_SORT_KEY_ID_UNSPECIFIED;
/**
* The status of this visitation
*
* @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.VisitationsServicePaginationReq";
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(VISITATION_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 VisitationsServicePaginationReq().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new VisitationsServicePaginationReq().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new VisitationsServicePaginationReq().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(VisitationsServicePaginationReq, a, b);
}
}
exports.VisitationsServicePaginationReq = VisitationsServicePaginationReq;
/**
*
* Describes the response to a pagination request
*
* @generated from message Genesis.VisitationsServicePaginationResponse
*/
class VisitationsServicePaginationResponse 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.Visitation payload = 4;
*/
payload = [];
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.VisitationsServicePaginationResponse";
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: Visitation, repeated: true },
]);
static fromBinary(bytes, options) {
return new VisitationsServicePaginationResponse().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new VisitationsServicePaginationResponse().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new VisitationsServicePaginationResponse().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(VisitationsServicePaginationResponse, a, b);
}
}
exports.VisitationsServicePaginationResponse = VisitationsServicePaginationResponse;
/**
*
* Describes a pagination request to retrieve records associated with an entity UUID
*
* @generated from message Genesis.VisitationsServiceEntityPaginationReq
*/
class VisitationsServiceEntityPaginationReq 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.VISITATION_SORT_KEY sort_key = 5;
*/
sortKey = VISITATION_SORT_KEY.VISITATION_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.VisitationsServiceEntityPaginationReq";
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(VISITATION_SORT_KEY) },
{ no: 6, name: "entity_uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes, options) {
return new VisitationsServiceEntityPaginationReq().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new VisitationsServiceEntityPaginationReq().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new VisitationsServiceEntityPaginationReq().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(VisitationsServiceEntityPaginationReq, a, b);
}
}
exports.VisitationsServiceEntityPaginationReq = VisitationsServiceEntityPaginationReq;
/**
*
* Describes the base request payload of a filter search
*
* @generated from message Genesis.VisitationsServiceFilterReq
*/
class VisitationsServiceFilterReq 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.VISITATION_SORT_KEY sort_key = 5;
*/
sortKey = VISITATION_SORT_KEY.VISITATION_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 visitation
*
* @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 visitation
*
* @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 ID of the user who is being visited
*
* @generated from field: int64 user_id = 22;
*/
userId = protobuf_1.protoInt64.zero;
/**
* The ID of the associate who has requested for visitation
*
* @generated from field: int64 associate_id = 23;
*/
associateId = protobuf_1.protoInt64.zero;
/**
* The start range of "from timestamp". 0 value will be considered. To prevent this from taken into consideration, set it to -1,
*
* @generated from field: int64 entry_timestamp_start = 24;
*/
entryTimestampStart = protobuf_1.protoInt64.zero;
/**
* The end range of "from timestamp". 0 value will be considered. To prevent this from taken into consideration, set it to -1,
*
* @generated from field: int64 entry_timestamp_end = 25;
*/
entryTimestampEnd = protobuf_1.protoInt64.zero;
/**
* The start range of "to timestamp". 0 value will be considered. To prevent this from taken into consideration, set it to -1,
*
* @generated from field: int64 exit_timestamp_start = 26;
*/
exitTimestampStart = protobuf_1.protoInt64.zero;
/**
* The end range of "to timestamp". 0 value will be considered. To prevent this from taken into consideration, set it to -1,
*
* @generated from field: int64 exit_timestamp_end = 27;
*/
exitTimestampEnd = protobuf_1.protoInt64.zero;
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.VisitationsServiceFilterReq";
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(VISITATION_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: "user_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 23, name: "associate_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 24, name: "entry_timestamp_start", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 25, name: "entry_timestamp_end", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 26, name: "exit_timestamp_start", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 27, name: "exit_timestamp_end", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
]);
static fromBinary(bytes, options) {
return new VisitationsServiceFilterReq().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new VisitationsServiceFilterReq().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new VisitationsServiceFilterReq().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(VisitationsServiceFilterReq, a, b);
}
}
exports.VisitationsServiceFilterReq = VisitationsServiceFilterReq;
/**
*
* Describes the request payload for performing a generic search operation on records
*
* @generated from message Genesis.VisitationsServiceSearchAllReq
*/
class VisitationsServiceSearchAllReq 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.VISITATION_SORT_KEY sort_key = 5;
*/
sortKey = VISITATION_SORT_KEY.VISITATION_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 = "";
/**
* The ID of the user who is being visited
*
* @generated from field: int64 user_id = 22;
*/
userId = protobuf_1.protoInt64.zero;
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.VisitationsServiceSearchAllReq";
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(VISITATION_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 */ },
{ no: 22, name: "user_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
]);
static fromBinary(bytes, options) {
return new VisitationsServiceSearchAllReq().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new VisitationsServiceSearchAllReq().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new VisitationsServiceSearchAllReq().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(VisitationsServiceSearchAllReq, a, b);
}
}
exports.VisitationsServiceSearchAllReq = VisitationsServiceSearchAllReq;