@worknice/js-sdk 0.4.4-rc.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/{_types-Crem3H1y.d.ts → _types-CuxiubzE.d.ts} +86 -1
  2. package/dist/api/WorkniceIntegrationLogger.d.ts +25 -7
  3. package/dist/api/WorkniceIntegrationLogger.js +3 -6
  4. package/dist/api/WorkniceIntegrationLogger.js.map +1 -1
  5. package/dist/api/_generated.d.ts +193 -2
  6. package/dist/api/_generated.js.map +1 -1
  7. package/dist/api/_types.d.ts +2 -2
  8. package/dist/api/createApiOperation.d.ts +1 -1
  9. package/dist/api/createWorkniceClient.d.ts +1 -1
  10. package/dist/api/createWorkniceClient.js +6 -0
  11. package/dist/api/createWorkniceClient.js.map +1 -1
  12. package/dist/api/operations/activateIntegration.d.ts +1 -1
  13. package/dist/api/operations/authorizeIntegration.d.ts +1 -1
  14. package/dist/api/operations/completeSync.d.ts +1 -1
  15. package/dist/api/operations/createApiToken.d.ts +1 -1
  16. package/dist/api/operations/createDataImport.d.ts +1 -1
  17. package/dist/api/operations/createLeaveRequest.d.ts +38 -0
  18. package/dist/api/operations/createLeaveRequest.js +64 -0
  19. package/dist/api/operations/createLeaveRequest.js.map +1 -0
  20. package/dist/api/operations/createPerson.d.ts +1 -1
  21. package/dist/api/operations/createPersonConnection.d.ts +1 -1
  22. package/dist/api/operations/createPersonDataImportLine.d.ts +1 -1
  23. package/dist/api/operations/deleteApiToken.d.ts +1 -1
  24. package/dist/api/operations/deletePersonConnection.d.ts +1 -1
  25. package/dist/api/operations/getApiTokens.d.ts +1 -1
  26. package/dist/api/operations/getIntegration.d.ts +1 -1
  27. package/dist/api/operations/getLeaveRequests.d.ts +29 -0
  28. package/dist/api/operations/getLeaveRequests.js +47 -0
  29. package/dist/api/operations/getLeaveRequests.js.map +1 -0
  30. package/dist/api/operations/getMyApps.d.ts +1 -1
  31. package/dist/api/operations/getPeople.d.ts +1 -1
  32. package/dist/api/operations/getPersonConnections.d.ts +1 -1
  33. package/dist/api/operations/initializeIntegration.d.ts +1 -1
  34. package/dist/api/operations/updateLeaveRequest.d.ts +39 -0
  35. package/dist/api/operations/updateLeaveRequest.js +67 -0
  36. package/dist/api/operations/updateLeaveRequest.js.map +1 -0
  37. package/dist/api/operations/updatePerson.d.ts +1 -1
  38. package/dist/api/operations/updatePersonConnection.d.ts +1 -1
  39. package/dist/helpers/_types.d.ts +2 -1
  40. package/dist/helpers/handleApproveLeaveRequestWebhook.d.ts +1 -1
  41. package/dist/helpers/handleCancelLeaveRequestWebhook.d.ts +1 -1
  42. package/dist/helpers/handleCreateIntegrationWebhook.d.ts +1 -1
  43. package/dist/helpers/handleCreateLeaveRequestWebhook.d.ts +1 -1
  44. package/dist/helpers/handleDenyLeaveRequestWebhook.d.ts +1 -1
  45. package/dist/helpers/handleGetAuthorizationUrlWebhook.d.ts +1 -1
  46. package/dist/helpers/handleGetLeaveBalancesWebhook.d.ts +1 -1
  47. package/dist/helpers/handleGetLeaveCategoriesWebhook.d.ts +1 -1
  48. package/dist/helpers/handleGetLeaveRequestHoursWebhook.d.ts +1 -1
  49. package/dist/helpers/handleProcessLeaveRequestWebhook.d.ts +1 -1
  50. package/dist/helpers/handleRequest.d.ts +1 -1
  51. package/dist/helpers/handleRequest.js +7 -1
  52. package/dist/helpers/handleRequest.js.map +1 -1
  53. package/dist/helpers/handleRequestWithWorknice.d.ts +1 -1
  54. package/dist/helpers/handleTriggerIntegrationSyncWebhook.d.ts +31 -23
  55. package/dist/helpers/handleTriggerIntegrationSyncWebhook.js +691 -595
  56. package/dist/helpers/handleTriggerIntegrationSyncWebhook.js.map +1 -1
  57. package/dist/helpers/index.d.ts +1 -1
  58. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { Exact, Scalars, InputMaybe, PersonRole, ConnectionStatus, PersonBankAccountsChangeInput, PersonDataTransferConfigInput, PersonDateOfBirthChangeInput, PersonEmergencyContactsChangeInput, PersonFullNameChangeInput, PersonGenderChangeInput, PersonPersonalEmailChangeInput, PersonPersonalPhoneChangeInput, PersonPostalAddressChangeInput, PersonResidentialAddressChangeInput, PersonSuperFundsChangeInput, PersonTaxDetailsChangeInput, PersonTenureChangeInput, AppCategory, AppStatus, IntegrationStatus, AllocationMethod, Gender, TaxResidencyStatus, SuperFundNomination, TaxFileNumberExemption } from './api/_generated.js';
1
+ import { Exact, Scalars, InputMaybe, LeaveCategoryInput, LeaveRequestStatus, PersonRole, ConnectionStatus, PersonBankAccountsChangeInput, PersonDataTransferConfigInput, PersonDateOfBirthChangeInput, PersonEmergencyContactsChangeInput, PersonFullNameChangeInput, PersonGenderChangeInput, PersonPersonalEmailChangeInput, PersonPersonalPhoneChangeInput, PersonPostalAddressChangeInput, PersonResidentialAddressChangeInput, PersonSuperFundsChangeInput, PersonTaxDetailsChangeInput, PersonTenureChangeInput, AppCategory, AppStatus, IntegrationStatus, AllocationMethod, Gender, TaxResidencyStatus, SuperFundNomination, TaxFileNumberExemption } from './api/_generated.js';
2
2
 
3
3
  declare const createWorkniceClient: (clientConfig?: ClientConfig) => {
4
4
  fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
@@ -63,6 +63,37 @@ declare const createWorkniceClient: (clientConfig?: ClientConfig) => {
63
63
  }>, fetchOptions?: FetchOptions) => Promise<{
64
64
  id: string;
65
65
  }>;
66
+ createLeaveRequest: (variables: Exact<{
67
+ endDate: Scalars["Date"]["input"];
68
+ endTime?: InputMaybe<Scalars["PlainTime"]["input"]>;
69
+ leaveCategory: LeaveCategoryInput;
70
+ notes?: InputMaybe<Scalars["String"]["input"]>;
71
+ personConnectionId: Scalars["ID"]["input"];
72
+ remoteId: Scalars["ID"]["input"];
73
+ responsibleId?: InputMaybe<Scalars["ID"]["input"]>;
74
+ startDate: Scalars["Date"]["input"];
75
+ startTime?: InputMaybe<Scalars["PlainTime"]["input"]>;
76
+ status: LeaveRequestStatus;
77
+ }>, fetchOptions?: FetchOptions) => Promise<{
78
+ endDate: string;
79
+ endTime?: string | null;
80
+ id: string;
81
+ notes?: string | null;
82
+ remoteId?: string | null;
83
+ startDate: string;
84
+ startTime?: string | null;
85
+ status: LeaveRequestStatus;
86
+ leaveCategory: {
87
+ id: string;
88
+ name: string;
89
+ };
90
+ personConnection: {
91
+ id: string;
92
+ };
93
+ responsible?: {
94
+ id: string;
95
+ } | null;
96
+ }>;
66
97
  createPerson: (variables: Exact<{
67
98
  displayName: Scalars["String"]["input"];
68
99
  role: PersonRole;
@@ -361,6 +392,28 @@ declare const createWorkniceClient: (clientConfig?: ClientConfig) => {
361
392
  id: string;
362
393
  };
363
394
  }>;
395
+ getLeaveRequests: (variables: Exact<{
396
+ integrationId: Scalars["ID"]["input"];
397
+ }>, fetchOptions?: FetchOptions) => Promise<{
398
+ endDate: string;
399
+ endTime?: string | null;
400
+ id: string;
401
+ notes?: string | null;
402
+ remoteId?: string | null;
403
+ startDate: string;
404
+ startTime?: string | null;
405
+ status: LeaveRequestStatus;
406
+ leaveCategory: {
407
+ id: string;
408
+ name: string;
409
+ };
410
+ personConnection: {
411
+ id: string;
412
+ };
413
+ responsible?: {
414
+ id: string;
415
+ } | null;
416
+ }[]>;
364
417
  getPeople: (variables: Exact<{
365
418
  orgId: Scalars["ID"]["input"];
366
419
  }>, fetchOptions?: FetchOptions) => Promise<{
@@ -534,6 +587,38 @@ declare const createWorkniceClient: (clientConfig?: ClientConfig) => {
534
587
  };
535
588
  person: null;
536
589
  }))[]>;
590
+ updateLeaveRequest: (variables: Exact<{
591
+ endDate: Scalars["Date"]["input"];
592
+ endTime?: InputMaybe<Scalars["PlainTime"]["input"]>;
593
+ id: Scalars["ID"]["input"];
594
+ leaveCategory: LeaveCategoryInput;
595
+ notes?: InputMaybe<Scalars["String"]["input"]>;
596
+ personConnectionId: Scalars["ID"]["input"];
597
+ remoteId: Scalars["ID"]["input"];
598
+ responsibleId?: InputMaybe<Scalars["ID"]["input"]>;
599
+ startDate: Scalars["Date"]["input"];
600
+ startTime?: InputMaybe<Scalars["PlainTime"]["input"]>;
601
+ status: LeaveRequestStatus;
602
+ }>, fetchOptions?: FetchOptions) => Promise<{
603
+ endDate: string;
604
+ endTime?: string | null;
605
+ id: string;
606
+ notes?: string | null;
607
+ remoteId?: string | null;
608
+ startDate: string;
609
+ startTime?: string | null;
610
+ status: LeaveRequestStatus;
611
+ leaveCategory: {
612
+ id: string;
613
+ name: string;
614
+ };
615
+ personConnection: {
616
+ id: string;
617
+ };
618
+ responsible?: {
619
+ id: string;
620
+ } | null;
621
+ }>;
537
622
  updatePerson: (variables: Exact<{
538
623
  displayName?: InputMaybe<Scalars["String"]["input"]>;
539
624
  employeeCode?: InputMaybe<Scalars["String"]["input"]>;
@@ -1,4 +1,4 @@
1
- import { W as WorkniceClient } from '../_types-Crem3H1y.js';
1
+ import { W as WorkniceClient } from '../_types-CuxiubzE.js';
2
2
  import './_generated.js';
3
3
 
4
4
  type Logger = Pick<Console, "debug" | "error" | "info" | "warn"> & Partial<Pick<Console, "group" | "groupEnd">>;
@@ -23,6 +23,27 @@ type WorkniceIntegrationLoggerOptions = {
23
23
  */
24
24
  logger: Logger;
25
25
  };
26
+ /**
27
+ * A logger that can log messages to both a Console-like object and to a
28
+ * Worknice integration's logs which can be viewed by a Worknice user.
29
+ *
30
+ * By default, messages are only logged to the configured logger, but when a
31
+ * Worknice integration is connected using the connect() method, the messages
32
+ * will also be sent to the Worknice integration logs.
33
+ *
34
+ * @example
35
+ * ```js
36
+ * const logger = new WorkniceIntegrationLogger();
37
+ * logger.info("Hello, World!");
38
+ * logger.debug("This message will only be logged to the console.");
39
+ * logger.error(Error("This is an error message.")); // full stack traces are logged to the console, but only the error message is sent to Worknice
40
+ * logger.connect(workniceClient, integrationId); // connect the logger to a Worknice integration (can be done at any time, messages are buffered until the logger is connected)
41
+ * logger.indent("Hello again!"); // subsequent messages will be indented
42
+ * logger.info("This message is indented."); // indented
43
+ * logger.dedent("Goodbye!"); // indented, subsequent messages will not be indented
44
+ * await logger.flush(); // sends any unsent messages to Worknice (should be called at the end of the script to ensure all messages are sent)
45
+ * ```
46
+ */
26
47
  declare class WorkniceIntegrationLogger {
27
48
  /**
28
49
  * The Worknice client used to send the logs to the server. If null, the logs
@@ -71,12 +92,9 @@ declare class WorkniceIntegrationLogger {
71
92
  private options;
72
93
  private timeout;
73
94
  /**
74
- * A logger can log messages to both a Console-like object and to a Worknice
75
- * integration's logs which can be view by a Worknice user. By default,
76
- * messages are only logged to the configured logger, but when a Worknice
77
- * integration is connected using the connect() method, the messages will also
78
- * be sent to the Worknice integration logs.
79
- * @param logger A Console-like object with which messages can be logged.
95
+ * @param options.debugLogType The type of console logging to use for debug messages. Defaults to "debug".
96
+ * @param options.delayBetweenFlushes The delay between flushes in milliseconds. Defaults to 1000 (1 second).
97
+ * @param options.logger A Console-like object with which messages can be logged. Defaults to the global console object.
80
98
  * @example
81
99
  * ```js
82
100
  * const logger = new WorkniceIntegrationLogger({ logger: console });
@@ -50,12 +50,9 @@ class WorkniceIntegrationLogger {
50
50
  options;
51
51
  timeout = null;
52
52
  /**
53
- * A logger can log messages to both a Console-like object and to a Worknice
54
- * integration's logs which can be view by a Worknice user. By default,
55
- * messages are only logged to the configured logger, but when a Worknice
56
- * integration is connected using the connect() method, the messages will also
57
- * be sent to the Worknice integration logs.
58
- * @param logger A Console-like object with which messages can be logged.
53
+ * @param options.debugLogType The type of console logging to use for debug messages. Defaults to "debug".
54
+ * @param options.delayBetweenFlushes The delay between flushes in milliseconds. Defaults to 1000 (1 second).
55
+ * @param options.logger A Console-like object with which messages can be logged. Defaults to the global console object.
59
56
  * @example
60
57
  * ```js
61
58
  * const logger = new WorkniceIntegrationLogger({ logger: console });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/api/WorkniceIntegrationLogger.ts"],"sourcesContent":["import gql from \"dedent\";\nimport { Temporal } from \"temporal-polyfill\";\nimport { v4 as uuid } from \"uuid\";\nimport errorToString from \"../utils/errorToString.js\";\nimport type { WorkniceClient } from \"./_types.js\";\n\nexport type Logger = Pick<Console, \"debug\" | \"error\" | \"info\" | \"warn\"> &\n Partial<Pick<Console, \"group\" | \"groupEnd\">>;\n\nexport type WorkniceIntegrationLoggerOptions = {\n /**\n * The type of log to use for debug messages. If set to \"debug\", debug\n * messages will be logged using the logger.debug() method, but if set to\n * \"info\", debug messages will be logged using the logger.info() method.\n *\n * Irrespective of this option, debug messages are only logged to the\n * configured logger and are never sent to the Worknice integration logs.\n *\n * Defaults to \"debug\".\n */\n debugLogType: \"debug\" | \"info\";\n\n /**\n * The delay between flushes in milliseconds. Defaults to 1000 (1 second).\n */\n delayBetweenFlushes: number;\n\n /**\n * A Console-like object with which messages will be logger.\n */\n logger: Logger;\n};\n\nclass WorkniceIntegrationLogger {\n /**\n * The Worknice client used to send the logs to the server. If null, the logs\n * will be buffered until the logger is initialized.\n */\n private client: WorkniceClient | null = null;\n\n /**\n * A promise used to ensure that only one request is in progress at a time. If\n * a flush is called while a request is in progress, the flush will wait for\n * the request to finish before starting a new one.\n */\n private currentRequest: Promise<unknown> | null = null;\n\n /**\n * The integration ID the logs will be associated with. If undefined, the\n * logs will be buffered until the logger has been initialized.\n */\n private integrationId: string | undefined = undefined;\n\n /**\n * The random ID for the integration log to which the logs will be appended.\n */\n private integrationLogId: string;\n\n /**\n * Determines when the logger should flush the logs. Calling info(), error(),\n * warn(), indent() or dedent() will automatically flush the logs if the last\n * flush was more than 1 second ago.\n */\n private lastFlush: Temporal.Instant | null = null;\n\n /**\n * A flag is used to determine whether a new log should be created when the\n * logger is flushed. The first time the logger is flushed, a new log will be\n * created. Subsequent flushes will append to the existing log.\n */\n private logCreated = false;\n\n /**\n * Backlog of log messages that have not yet been sent to Worknice. The logs\n * will be sent to the server when the logger is flushed and the backlog will\n * be cleared.\n */\n private logs: Array<{ time: Temporal.Instant; message: string }> = [];\n\n /**\n * Determines the current indentation level of the log messages. The indent()\n * and dedent() functions can be used to increase or decrease the indentation\n * level.\n */\n private messageIndent = 0;\n\n private options: WorkniceIntegrationLoggerOptions;\n\n private timeout: NodeJS.Timeout | null = null;\n\n /**\n * A logger can log messages to both a Console-like object and to a Worknice\n * integration's logs which can be view by a Worknice user. By default,\n * messages are only logged to the configured logger, but when a Worknice\n * integration is connected using the connect() method, the messages will also\n * be sent to the Worknice integration logs.\n * @param logger A Console-like object with which messages can be logged.\n * @example\n * ```js\n * const logger = new WorkniceIntegrationLogger({ logger: console });\n * ```\n */\n constructor(options?: Partial<WorkniceIntegrationLoggerOptions>) {\n this.integrationLogId = uuid();\n this.options = {\n debugLogType: options?.debugLogType ?? \"debug\",\n delayBetweenFlushes: options?.delayBetweenFlushes ?? 1000,\n logger: options?.logger ?? console,\n };\n }\n\n /**\n * Connects the logger to a Worknice integration. If there are previously\n * logged messages that need to be flushed, a new integration log will be\n * instantly created and the messages flushed to it. Otherwise, an integration\n * log will be created if/when the first message is logged.\n */\n public connect(client: WorkniceClient, integrationId: string) {\n this.client = client;\n this.integrationId = integrationId;\n this.flush();\n }\n\n /**\n * Logs a debug message. Debug messages are only logged to the configured logger\n * and are never sent to the Worknice integration logs.\n */\n public debug(message: string) {\n if (this.options.debugLogType === \"debug\") this.options.logger.debug(message);\n else this.options.logger.info(message);\n }\n\n public dedent(message?: string) {\n if (message !== undefined) this.info(message);\n if (this.options.logger.groupEnd) this.options.logger.groupEnd();\n this.messageIndent = Math.max(0, this.messageIndent - 1);\n }\n\n private enqueue(message: string) {\n this.logs.push({\n time: Temporal.Now.instant(),\n message: message\n .split(\"\\n\")\n .map((line) => `${\" \".repeat(this.messageIndent * 2)}${line}`)\n .join(\"\\n\"),\n });\n\n // If the last flush was more than the delay between flushes, flush the logs\n // immediately. Otherwise, schedule a new flush unless one is already\n // scheduled.\n if (this.timeSinceLastFlush() >= this.options.delayBetweenFlushes) {\n this.flush();\n } else if (this.timeout === null) {\n this.timeout = setTimeout(() => {\n if (this.timeSinceLastFlush() >= this.options.delayBetweenFlushes) {\n this.flush();\n }\n }, this.options.delayBetweenFlushes - this.timeSinceLastFlush());\n }\n }\n\n /**\n * Logs an error of any type. The error will be logged to the configured logger\n * with full stack traces and a chain of error causes. A simplified error\n * message will sent to the Worknice integration logs (if connected) and\n * returned for displaying to the user. If the error is not an instance of\n * Error, it will be coerced into a string before being logged.\n */\n public error(error: unknown) {\n const verboseMessage = errorToString(error, {\n format: \"chain\",\n stack: true,\n });\n\n const simpleMessage = errorToString(error, {\n format: \"simple\",\n stack: false,\n });\n\n this.options.logger.error(verboseMessage);\n this.enqueue(simpleMessage);\n\n return simpleMessage;\n }\n\n /**\n * Flushes the log buffer to the server. The info() function will\n * automatically flush the logs if the last flush was more than 1 second\n * ago, but the flush() function should be called manually at the end of the\n * script to ensure that all logs are sent to the server.\n */\n public async flush() {\n // Clear any scheduled flushes.\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n\n // Update the last flush time to the current time so that any calls to\n // enqueue will not unnecessarily try to flush the logs again.\n this.lastFlush = Temporal.Now.instant();\n\n // If there's already a request in progress, wait for it to finish before\n // starting a new one.\n if (this.currentRequest) await this.currentRequest;\n\n // If there are no pending logs or the logger hasn't been initialized,\n // don't do anything (any logs will remain in the buffer until the next\n // flush).\n if (this.logs.length === 0 || this.client === null || this.integrationId === null) return;\n\n const entries = this.logs.splice(0).map(({ time, message }) => ({\n time: time.toString({ timeZone: \"Australia/Sydney\", smallestUnit: \"second\" }),\n message,\n }));\n\n this.currentRequest = this.client.fetchFromApi(\n gql`\n mutation AppendIntegrationLog(\n $createNewLog: Boolean!\n $entries: [IntegrationLogInput!]!\n $integrationId: ID!\n $integrationLogId: ID!\n ) {\n createIntegrationLog(integrationId: $integrationId, integrationLogId: $integrationLogId)\n @include(if: $createNewLog) {\n id\n }\n appendIntegrationLog(integrationLogId: $integrationLogId, entries: $entries) {\n id\n }\n }\n `,\n {\n // Only create a new log the first time the logger is flushed.\n createNewLog: this.logCreated === false,\n entries,\n integrationId: this.integrationId,\n integrationLogId: this.integrationLogId,\n },\n );\n\n // Only create a new log the first time the logger is flushed.\n this.logCreated = true;\n\n await this.currentRequest;\n\n // Clear the request promise so that the next flush can start a new request.\n this.currentRequest = null;\n }\n\n public indent(message?: string) {\n if (message !== undefined) this.info(message);\n if (this.options.logger.group) this.options.logger.group();\n this.messageIndent += 1;\n }\n\n /**\n * Logs an informational message. The message will be logged to the configured\n * logger and flushed to the Worknice integration logs if/when connected.\n */\n public info(message: string) {\n this.options.logger.info(message);\n this.enqueue(message);\n }\n\n private timeSinceLastFlush() {\n return this.lastFlush === null\n ? Number.MAX_SAFE_INTEGER\n : Temporal.Now.instant().since(this.lastFlush).total(\"milliseconds\");\n }\n\n public warn(message: string) {\n this.options.logger.warn(message);\n this.enqueue(message);\n }\n}\n\nexport default WorkniceIntegrationLogger;\n"],"mappings":"AAAA,OAAO,SAAS;AAChB,SAAS,gBAAgB;AACzB,SAAS,MAAM,YAAY;AAC3B,OAAO,mBAAmB;AA8B1B,MAAM,0BAA0B;AAAA;AAAA;AAAA;AAAA;AAAA,EAKtB,SAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOhC,iBAA0C;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1C,gBAAoC;AAAA;AAAA;AAAA;AAAA,EAKpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,YAAqC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOrC,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOb,OAA2D,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO5D,gBAAgB;AAAA,EAEhB;AAAA,EAEA,UAAiC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAczC,YAAY,SAAqD;AAC/D,SAAK,mBAAmB,KAAK;AAC7B,SAAK,UAAU;AAAA,MACb,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iBAAiB;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMO,KAAK,SAAiB;AAC3B,SAAK,QAAQ,OAAO,KAAK,OAAO;AAChC,SAAK,QAAQ,OAAO;AAAA,EACtB;AAAA,EAEQ,qBAAqB;AAC3B,WAAO,KAAK,cAAc,OACtB,OAAO,mBACP,SAAS,IAAI,QAAQ,EAAE,MAAM,KAAK,SAAS,EAAE,MAAM,cAAc;AAAA,EACvE;AAAA,EAEO,KAAK,SAAiB;AAC3B,SAAK,QAAQ,OAAO,KAAK,OAAO;AAChC,SAAK,QAAQ,OAAO;AAAA,EACtB;AACF;AAEA,IAAO,oCAAQ;","names":[]}
1
+ {"version":3,"sources":["../../src/api/WorkniceIntegrationLogger.ts"],"sourcesContent":["import gql from \"dedent\";\nimport { Temporal } from \"temporal-polyfill\";\nimport { v4 as uuid } from \"uuid\";\nimport errorToString from \"../utils/errorToString.js\";\nimport type { WorkniceClient } from \"./_types.js\";\n\nexport type Logger = Pick<Console, \"debug\" | \"error\" | \"info\" | \"warn\"> &\n Partial<Pick<Console, \"group\" | \"groupEnd\">>;\n\nexport type WorkniceIntegrationLoggerOptions = {\n /**\n * The type of log to use for debug messages. If set to \"debug\", debug\n * messages will be logged using the logger.debug() method, but if set to\n * \"info\", debug messages will be logged using the logger.info() method.\n *\n * Irrespective of this option, debug messages are only logged to the\n * configured logger and are never sent to the Worknice integration logs.\n *\n * Defaults to \"debug\".\n */\n debugLogType: \"debug\" | \"info\";\n\n /**\n * The delay between flushes in milliseconds. Defaults to 1000 (1 second).\n */\n delayBetweenFlushes: number;\n\n /**\n * A Console-like object with which messages will be logger.\n */\n logger: Logger;\n};\n\n/**\n * A logger that can log messages to both a Console-like object and to a\n * Worknice integration's logs which can be viewed by a Worknice user.\n *\n * By default, messages are only logged to the configured logger, but when a\n * Worknice integration is connected using the connect() method, the messages\n * will also be sent to the Worknice integration logs.\n *\n * @example\n * ```js\n * const logger = new WorkniceIntegrationLogger();\n * logger.info(\"Hello, World!\");\n * logger.debug(\"This message will only be logged to the console.\");\n * logger.error(Error(\"This is an error message.\")); // full stack traces are logged to the console, but only the error message is sent to Worknice\n * logger.connect(workniceClient, integrationId); // connect the logger to a Worknice integration (can be done at any time, messages are buffered until the logger is connected)\n * logger.indent(\"Hello again!\"); // subsequent messages will be indented\n * logger.info(\"This message is indented.\"); // indented\n * logger.dedent(\"Goodbye!\"); // indented, subsequent messages will not be indented\n * await logger.flush(); // sends any unsent messages to Worknice (should be called at the end of the script to ensure all messages are sent)\n * ```\n */\nclass WorkniceIntegrationLogger {\n /**\n * The Worknice client used to send the logs to the server. If null, the logs\n * will be buffered until the logger is initialized.\n */\n private client: WorkniceClient | null = null;\n\n /**\n * A promise used to ensure that only one request is in progress at a time. If\n * a flush is called while a request is in progress, the flush will wait for\n * the request to finish before starting a new one.\n */\n private currentRequest: Promise<unknown> | null = null;\n\n /**\n * The integration ID the logs will be associated with. If undefined, the\n * logs will be buffered until the logger has been initialized.\n */\n private integrationId: string | undefined = undefined;\n\n /**\n * The random ID for the integration log to which the logs will be appended.\n */\n private integrationLogId: string;\n\n /**\n * Determines when the logger should flush the logs. Calling info(), error(),\n * warn(), indent() or dedent() will automatically flush the logs if the last\n * flush was more than 1 second ago.\n */\n private lastFlush: Temporal.Instant | null = null;\n\n /**\n * A flag is used to determine whether a new log should be created when the\n * logger is flushed. The first time the logger is flushed, a new log will be\n * created. Subsequent flushes will append to the existing log.\n */\n private logCreated = false;\n\n /**\n * Backlog of log messages that have not yet been sent to Worknice. The logs\n * will be sent to the server when the logger is flushed and the backlog will\n * be cleared.\n */\n private logs: Array<{ time: Temporal.Instant; message: string }> = [];\n\n /**\n * Determines the current indentation level of the log messages. The indent()\n * and dedent() functions can be used to increase or decrease the indentation\n * level.\n */\n private messageIndent = 0;\n\n private options: WorkniceIntegrationLoggerOptions;\n\n private timeout: NodeJS.Timeout | null = null;\n\n /**\n * @param options.debugLogType The type of console logging to use for debug messages. Defaults to \"debug\".\n * @param options.delayBetweenFlushes The delay between flushes in milliseconds. Defaults to 1000 (1 second).\n * @param options.logger A Console-like object with which messages can be logged. Defaults to the global console object.\n * @example\n * ```js\n * const logger = new WorkniceIntegrationLogger({ logger: console });\n * ```\n */\n constructor(options?: Partial<WorkniceIntegrationLoggerOptions>) {\n this.integrationLogId = uuid();\n this.options = {\n debugLogType: options?.debugLogType ?? \"debug\",\n delayBetweenFlushes: options?.delayBetweenFlushes ?? 1000,\n logger: options?.logger ?? console,\n };\n }\n\n /**\n * Connects the logger to a Worknice integration. If there are previously\n * logged messages that need to be flushed, a new integration log will be\n * instantly created and the messages flushed to it. Otherwise, an integration\n * log will be created if/when the first message is logged.\n */\n public connect(client: WorkniceClient, integrationId: string) {\n this.client = client;\n this.integrationId = integrationId;\n this.flush();\n }\n\n /**\n * Logs a debug message. Debug messages are only logged to the configured logger\n * and are never sent to the Worknice integration logs.\n */\n public debug(message: string) {\n if (this.options.debugLogType === \"debug\") this.options.logger.debug(message);\n else this.options.logger.info(message);\n }\n\n public dedent(message?: string) {\n if (message !== undefined) this.info(message);\n if (this.options.logger.groupEnd) this.options.logger.groupEnd();\n this.messageIndent = Math.max(0, this.messageIndent - 1);\n }\n\n private enqueue(message: string) {\n this.logs.push({\n time: Temporal.Now.instant(),\n message: message\n .split(\"\\n\")\n .map((line) => `${\" \".repeat(this.messageIndent * 2)}${line}`)\n .join(\"\\n\"),\n });\n\n // If the last flush was more than the delay between flushes, flush the logs\n // immediately. Otherwise, schedule a new flush unless one is already\n // scheduled.\n if (this.timeSinceLastFlush() >= this.options.delayBetweenFlushes) {\n this.flush();\n } else if (this.timeout === null) {\n this.timeout = setTimeout(() => {\n if (this.timeSinceLastFlush() >= this.options.delayBetweenFlushes) {\n this.flush();\n }\n }, this.options.delayBetweenFlushes - this.timeSinceLastFlush());\n }\n }\n\n /**\n * Logs an error of any type. The error will be logged to the configured logger\n * with full stack traces and a chain of error causes. A simplified error\n * message will sent to the Worknice integration logs (if connected) and\n * returned for displaying to the user. If the error is not an instance of\n * Error, it will be coerced into a string before being logged.\n */\n public error(error: unknown) {\n const verboseMessage = errorToString(error, {\n format: \"chain\",\n stack: true,\n });\n\n const simpleMessage = errorToString(error, {\n format: \"simple\",\n stack: false,\n });\n\n this.options.logger.error(verboseMessage);\n this.enqueue(simpleMessage);\n\n return simpleMessage;\n }\n\n /**\n * Flushes the log buffer to the server. The info() function will\n * automatically flush the logs if the last flush was more than 1 second\n * ago, but the flush() function should be called manually at the end of the\n * script to ensure that all logs are sent to the server.\n */\n public async flush() {\n // Clear any scheduled flushes.\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n\n // Update the last flush time to the current time so that any calls to\n // enqueue will not unnecessarily try to flush the logs again.\n this.lastFlush = Temporal.Now.instant();\n\n // If there's already a request in progress, wait for it to finish before\n // starting a new one.\n if (this.currentRequest) await this.currentRequest;\n\n // If there are no pending logs or the logger hasn't been initialized,\n // don't do anything (any logs will remain in the buffer until the next\n // flush).\n if (this.logs.length === 0 || this.client === null || this.integrationId === null) return;\n\n const entries = this.logs.splice(0).map(({ time, message }) => ({\n time: time.toString({ timeZone: \"Australia/Sydney\", smallestUnit: \"second\" }),\n message,\n }));\n\n this.currentRequest = this.client.fetchFromApi(\n gql`\n mutation AppendIntegrationLog(\n $createNewLog: Boolean!\n $entries: [IntegrationLogInput!]!\n $integrationId: ID!\n $integrationLogId: ID!\n ) {\n createIntegrationLog(integrationId: $integrationId, integrationLogId: $integrationLogId)\n @include(if: $createNewLog) {\n id\n }\n appendIntegrationLog(integrationLogId: $integrationLogId, entries: $entries) {\n id\n }\n }\n `,\n {\n // Only create a new log the first time the logger is flushed.\n createNewLog: this.logCreated === false,\n entries,\n integrationId: this.integrationId,\n integrationLogId: this.integrationLogId,\n },\n );\n\n // Only create a new log the first time the logger is flushed.\n this.logCreated = true;\n\n await this.currentRequest;\n\n // Clear the request promise so that the next flush can start a new request.\n this.currentRequest = null;\n }\n\n public indent(message?: string) {\n if (message !== undefined) this.info(message);\n if (this.options.logger.group) this.options.logger.group();\n this.messageIndent += 1;\n }\n\n /**\n * Logs an informational message. The message will be logged to the configured\n * logger and flushed to the Worknice integration logs if/when connected.\n */\n public info(message: string) {\n this.options.logger.info(message);\n this.enqueue(message);\n }\n\n private timeSinceLastFlush() {\n return this.lastFlush === null\n ? Number.MAX_SAFE_INTEGER\n : Temporal.Now.instant().since(this.lastFlush).total(\"milliseconds\");\n }\n\n public warn(message: string) {\n this.options.logger.warn(message);\n this.enqueue(message);\n }\n}\n\nexport default WorkniceIntegrationLogger;\n"],"mappings":"AAAA,OAAO,SAAS;AAChB,SAAS,gBAAgB;AACzB,SAAS,MAAM,YAAY;AAC3B,OAAO,mBAAmB;AAmD1B,MAAM,0BAA0B;AAAA;AAAA;AAAA;AAAA;AAAA,EAKtB,SAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOhC,iBAA0C;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1C,gBAAoC;AAAA;AAAA;AAAA;AAAA,EAKpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,YAAqC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOrC,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOb,OAA2D,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO5D,gBAAgB;AAAA,EAEhB;AAAA,EAEA,UAAiC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWzC,YAAY,SAAqD;AAC/D,SAAK,mBAAmB,KAAK;AAC7B,SAAK,UAAU;AAAA,MACb,cAAc,SAAS,gBAAgB;AAAA,MACvC,qBAAqB,SAAS,uBAAuB;AAAA,MACrD,QAAQ,SAAS,UAAU;AAAA,IAC7B;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,QAAQ,QAAwB,eAAuB;AAC5D,SAAK,SAAS;AACd,SAAK,gBAA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,IAAI,QAAQ,EAAE,MAAM,KAAK,SAAS,EAAE,MAAM,cAAc;AAAA,EACvE;AAAA,EAEO,KAAK,SAAiB;AAC3B,SAAK,QAAQ,OAAO,KAAK,OAAO;AAChC,SAAK,QAAQ,OAAO;AAAA,EACtB;AACF;AAEA,IAAO,oCAAQ;","names":[]}
@@ -2605,7 +2605,7 @@ type MutationCreateLeaveRequestArgs = {
2605
2605
  notes?: InputMaybe<Scalars['String']['input']>;
2606
2606
  personConnectionId: Scalars['ID']['input'];
2607
2607
  remoteId?: InputMaybe<Scalars['ID']['input']>;
2608
- responsibleId: Scalars['ID']['input'];
2608
+ responsibleId?: InputMaybe<Scalars['ID']['input']>;
2609
2609
  startDate: Scalars['Date']['input'];
2610
2610
  startTime?: InputMaybe<Scalars['PlainTime']['input']>;
2611
2611
  status?: InputMaybe<LeaveRequestStatus>;
@@ -5345,6 +5345,40 @@ type CreateDataImportMutation = {
5345
5345
  id: string;
5346
5346
  };
5347
5347
  };
5348
+ type CreateLeaveRequestMutationVariables = Exact<{
5349
+ endDate: Scalars['Date']['input'];
5350
+ endTime?: InputMaybe<Scalars['PlainTime']['input']>;
5351
+ leaveCategory: LeaveCategoryInput;
5352
+ notes?: InputMaybe<Scalars['String']['input']>;
5353
+ personConnectionId: Scalars['ID']['input'];
5354
+ remoteId: Scalars['ID']['input'];
5355
+ responsibleId?: InputMaybe<Scalars['ID']['input']>;
5356
+ startDate: Scalars['Date']['input'];
5357
+ startTime?: InputMaybe<Scalars['PlainTime']['input']>;
5358
+ status: LeaveRequestStatus;
5359
+ }>;
5360
+ type CreateLeaveRequestMutation = {
5361
+ createLeaveRequest: {
5362
+ endDate: string;
5363
+ endTime?: string | null;
5364
+ id: string;
5365
+ notes?: string | null;
5366
+ remoteId?: string | null;
5367
+ startDate: string;
5368
+ startTime?: string | null;
5369
+ status: LeaveRequestStatus;
5370
+ leaveCategory: {
5371
+ id: string;
5372
+ name: string;
5373
+ };
5374
+ personConnection: {
5375
+ id: string;
5376
+ };
5377
+ responsible?: {
5378
+ id: string;
5379
+ } | null;
5380
+ };
5381
+ };
5348
5382
  type CreatePersonMutationVariables = Exact<{
5349
5383
  displayName: Scalars['String']['input'];
5350
5384
  role: PersonRole;
@@ -5490,6 +5524,127 @@ type GetIntegrationQuery = {
5490
5524
  };
5491
5525
  };
5492
5526
  };
5527
+ type GetLeaveRequestsQueryVariables = Exact<{
5528
+ integrationId: Scalars['ID']['input'];
5529
+ }>;
5530
+ type GetLeaveRequestsQuery = {
5531
+ integration: {
5532
+ connections: Array<{
5533
+ leaveRequests: Array<{
5534
+ endDate: string;
5535
+ endTime?: string | null;
5536
+ id: string;
5537
+ notes?: string | null;
5538
+ remoteId?: string | null;
5539
+ startDate: string;
5540
+ startTime?: string | null;
5541
+ status: LeaveRequestStatus;
5542
+ leaveCategory: {
5543
+ id: string;
5544
+ name: string;
5545
+ };
5546
+ personConnection: {
5547
+ id: string;
5548
+ };
5549
+ responsible?: {
5550
+ id: string;
5551
+ } | null;
5552
+ }>;
5553
+ }>;
5554
+ } | {
5555
+ connections: Array<{
5556
+ leaveRequests: Array<{
5557
+ endDate: string;
5558
+ endTime?: string | null;
5559
+ id: string;
5560
+ notes?: string | null;
5561
+ remoteId?: string | null;
5562
+ startDate: string;
5563
+ startTime?: string | null;
5564
+ status: LeaveRequestStatus;
5565
+ leaveCategory: {
5566
+ id: string;
5567
+ name: string;
5568
+ };
5569
+ personConnection: {
5570
+ id: string;
5571
+ };
5572
+ responsible?: {
5573
+ id: string;
5574
+ } | null;
5575
+ }>;
5576
+ }>;
5577
+ } | {
5578
+ connections: Array<{
5579
+ leaveRequests: Array<{
5580
+ endDate: string;
5581
+ endTime?: string | null;
5582
+ id: string;
5583
+ notes?: string | null;
5584
+ remoteId?: string | null;
5585
+ startDate: string;
5586
+ startTime?: string | null;
5587
+ status: LeaveRequestStatus;
5588
+ leaveCategory: {
5589
+ id: string;
5590
+ name: string;
5591
+ };
5592
+ personConnection: {
5593
+ id: string;
5594
+ };
5595
+ responsible?: {
5596
+ id: string;
5597
+ } | null;
5598
+ }>;
5599
+ }>;
5600
+ } | {
5601
+ connections: Array<{
5602
+ leaveRequests: Array<{
5603
+ endDate: string;
5604
+ endTime?: string | null;
5605
+ id: string;
5606
+ notes?: string | null;
5607
+ remoteId?: string | null;
5608
+ startDate: string;
5609
+ startTime?: string | null;
5610
+ status: LeaveRequestStatus;
5611
+ leaveCategory: {
5612
+ id: string;
5613
+ name: string;
5614
+ };
5615
+ personConnection: {
5616
+ id: string;
5617
+ };
5618
+ responsible?: {
5619
+ id: string;
5620
+ } | null;
5621
+ }>;
5622
+ }>;
5623
+ } | {
5624
+ connections: Array<{
5625
+ leaveRequests: Array<{
5626
+ endDate: string;
5627
+ endTime?: string | null;
5628
+ id: string;
5629
+ notes?: string | null;
5630
+ remoteId?: string | null;
5631
+ startDate: string;
5632
+ startTime?: string | null;
5633
+ status: LeaveRequestStatus;
5634
+ leaveCategory: {
5635
+ id: string;
5636
+ name: string;
5637
+ };
5638
+ personConnection: {
5639
+ id: string;
5640
+ };
5641
+ responsible?: {
5642
+ id: string;
5643
+ } | null;
5644
+ }>;
5645
+ }>;
5646
+ };
5647
+ };
5493
5648
  type GetMyAppsQueryVariables = Exact<{
5494
5649
  [key: string]: never;
5495
5650
  }>;
@@ -5709,6 +5864,42 @@ type InitializeIntegrationMutation = {
5709
5864
  id: string;
5710
5865
  };
5711
5866
  };
5867
+ type UpdateLeaveRequestMutationVariables = Exact<{
5868
+ endDate: Scalars['Date']['input'];
5869
+ endTime?: InputMaybe<Scalars['PlainTime']['input']>;
5870
+ id: Scalars['ID']['input'];
5871
+ leaveCategory: LeaveCategoryInput;
5872
+ notes?: InputMaybe<Scalars['String']['input']>;
5873
+ personConnectionId: Scalars['ID']['input'];
5874
+ remoteId: Scalars['ID']['input'];
5875
+ responsibleId?: InputMaybe<Scalars['ID']['input']>;
5876
+ startDate: Scalars['Date']['input'];
5877
+ startTime?: InputMaybe<Scalars['PlainTime']['input']>;
5878
+ status: LeaveRequestStatus;
5879
+ }>;
5880
+ type UpdateLeaveRequestMutation = {
5881
+ deleteLeaveRequest: boolean;
5882
+ createLeaveRequest: {
5883
+ endDate: string;
5884
+ endTime?: string | null;
5885
+ id: string;
5886
+ notes?: string | null;
5887
+ remoteId?: string | null;
5888
+ startDate: string;
5889
+ startTime?: string | null;
5890
+ status: LeaveRequestStatus;
5891
+ leaveCategory: {
5892
+ id: string;
5893
+ name: string;
5894
+ };
5895
+ personConnection: {
5896
+ id: string;
5897
+ };
5898
+ responsible?: {
5899
+ id: string;
5900
+ } | null;
5901
+ };
5902
+ };
5712
5903
  type UpdatePersonMutationVariables = Exact<{
5713
5904
  displayName?: InputMaybe<Scalars['String']['input']>;
5714
5905
  employeeCode?: InputMaybe<Scalars['String']['input']>;
@@ -5802,4 +5993,4 @@ type UpdatePersonConnectionMutation = {
5802
5993
  };
5803
5994
  };
5804
5995
 
5805
- export { type Account, type AccountAppsArgs, type AccountFeatures, type AccountFeaturesInput, AccountFlag, type ActivateIntegrationMutation, type ActivateIntegrationMutationVariables, AllocationMethod, type AnniversaryEvent, type ApiToken, type App, AppCategory, type AppConfig, type AppConfigWebhooks, AppStatus, type AppendIntegrationLogMutation, type AppendIntegrationLogMutationVariables, type Approval, ApprovalStatus, type Archivable, type Assignment, type AssignmentNotification, type AssignmentNotificationsArgs, AssignmentRelation, AssignmentStatus, AssignmentType, AuthMethod, AuthProvider, AuthState, type AuthorizeIntegrationMutation, type AuthorizeIntegrationMutationVariables, type BasicAbnForm, type BasicAbnFormNotificationsArgs, type BasicAbnFormTemplate, type BasicBankAccountForm, type BasicBankAccountFormNotificationsArgs, type BasicBankAccountFormTemplate, type BasicEmergencyContactForm, type BasicEmergencyContactFormNotificationsArgs, type BasicEmergencyContactFormTemplate, type BasicPersonalDetailsForm, type BasicPersonalDetailsFormNotificationsArgs, type BasicPersonalDetailsFormTemplate, type BasicPreEmploymentForm, type BasicPreEmploymentFormNotificationsArgs, type BasicPreEmploymentFormTemplate, type BasicSuperForm, type BasicSuperFormNotificationsArgs, type BasicSuperFormTemplate, type BasicTaxForm, type BasicTaxFormNotificationsArgs, type BasicTaxFormTemplate, type Birthday, type BirthdayEvent, type BirthdayInput, type Bundle, type BundledPerson, type BundledTemplate, type BundledTemplateInput, type Certificate, type CertificateNotificationsArgs, CertificateProof, type CertificateTemplate, type ChoiceDocumentField, type ChoiceDocumentFieldConfigInput, type ChoiceDocumentFieldConfigOptionInput, type ChoiceDocumentFieldInput, type ChoiceDocumentFieldOption, type ChoiceDocumentFieldOptionInput, type CompleteSyncMutation, type CompleteSyncMutationVariables, type ConnectionRemote, type ConnectionRemoteInput, ConnectionStatus, type CreateApiTokenMutation, type CreateApiTokenMutationVariables, type CreateDataImportMutation, type CreateDataImportMutationVariables, type CreatePersonConnectionMutation, type CreatePersonConnectionMutationVariables, type CreatePersonDataImportLineMutation, type CreatePersonDataImportLineMutationVariables, type CreatePersonMutation, type CreatePersonMutationVariables, type DataExport, DataExportType, type DataImport, type DataImportLine, type DateDocumentField, type DateDocumentFieldConfigInput, type DateDocumentFieldInput, type DeleteApiTokenMutation, type DeleteApiTokenMutationVariables, type DeletePersonConnectionMutation, type DeletePersonConnectionMutationVariables, type Department, type Document, type DocumentField, type DocumentFieldConfigInput, type DocumentFieldInput, DocumentFieldResponder, type DocumentNotificationsArgs, type DocumentTemplate, type EmailNotificationSettings, type EmailNotificationSettingsInput, type Exact, ExpiryStatus, FieldPresence, type Form, type FormNotificationsArgs, FormOrderBy, FormType, Gender, type GenericIntegration, type GenericIntegrationFeaturesArgs, type GetApiTokensQuery, type GetApiTokensQueryVariables, type GetIntegrationQuery, type GetIntegrationQueryVariables, type GetMyAppsQuery, type GetMyAppsQueryVariables, type GetPeopleQuery, type GetPeopleQueryVariables, type GetPersonConnectionsQuery, type GetPersonConnectionsQueryVariables, type Incremental, type InitializeIntegrationMutation, type InitializeIntegrationMutationVariables, type InputMaybe, type Integration, type IntegrationConnection, type IntegrationFeatures, type IntegrationFeaturesArgs, type IntegrationFeaturesInput, type IntegrationLog, type IntegrationLogInput, IntegrationStatus, type IntegrationSync, type IntegrationSyncEvent, IntegrationSyncEventType, IntegrationSyncStatus, IntegrationType, type Job, JobStatus, type KeypayBusiness, type KeypayEmployee, type KeypayEmployeeForm, type KeypayEmployeeFormNotificationsArgs, type KeypayEmployeeFormTemplate, KeypayEmployeeStatus, KeypayEmploymentType, KeypayGender, type KeypayIntegration, type KeypayIntegrationFeaturesArgs, type KeypayLeaveEmployee, type KeypayLeaveIntegration, type KeypayLeaveIntegrationFeaturesArgs, type LeaveBalance, type LeaveCategory, type LeaveCategoryInput, type LeaveHoursEstimate, type LeaveRequest, type LeaveRequestNotification, type LeaveRequestNotificationsArgs, LeaveRequestStatus, type Location, type Login, type MakeEmpty, type MakeMaybe, type MakeOptional, type Maybe, type Media, type MultiLineTextDocumentField, type MultiLineTextDocumentFieldConfigInput, type MultiLineTextDocumentFieldInput, type Mutation, type MutationAcceptLoginArgs, type MutationActivateIntegrationArgs, type MutationActivatePersonArgs, type MutationAddPeopleToBundlesArgs, type MutationAddPeopleToTagsArgs, type MutationAppendIntegrationLogArgs, type MutationApproveAssignmentArgs, type MutationApproveKeypayLeaveLeaveRequestArgs, type MutationApproveLeaveRequestArgs, type MutationApproveXeroLeaveRequestArgs, type MutationArchiveAssignmentArgs, type MutationArchiveBundleArgs, type MutationArchiveIntegrationArgs, type MutationArchiveNotesArgs, type MutationArchiveOrgArgs, type MutationArchivePersonArgs, type MutationArchiveReviewCycleArgs, type MutationArchiveSavedQuestionArgs, type MutationArchiveStandardReviewArgs, type MutationArchiveStandardReviewTemplateArgs, type MutationArchiveTemplateArgs, type MutationAssignAssignmentsArgs, type MutationAssignBasicAbnFormArgs, type MutationAssignBasicBankAccountFormArgs, type MutationAssignBasicEmergencyContactFormArgs, type MutationAssignBasicPersonalDetailsFormArgs, type MutationAssignBasicPreEmploymentFormArgs, type MutationAssignBasicSuperFormArgs, type MutationAssignBasicTaxFormArgs, type MutationAssignCertificateArgs, type MutationAssignDocumentArgs, type MutationAssignKeypayEmployeeFormArgs, type MutationAssignQuestionnaireArgs, type MutationAssignStandardReviewArgs, type MutationAssignTaskArgs, type MutationAuthorizeIntegrationArgs, type MutationCancelLeaveRequestArgs, type MutationCompleteIntegrationSyncArgs, type MutationCompletePasswordResetArgs, type MutationConfirmEmailArgs, type MutationConfirmProfileArgs, type MutationConfirmProviderArgs, type MutationCreateAccountArgs, type MutationCreateApiTokenArgs, type MutationCreateAssignmentsArgs, type MutationCreateBasicAbnFormArgs, type MutationCreateBasicAbnFormTemplateArgs, type MutationCreateBasicBankAccountFormArgs, type MutationCreateBasicBankAccountFormTemplateArgs, type MutationCreateBasicEmergencyContactFormArgs, type MutationCreateBasicEmergencyContactFormTemplateArgs, type MutationCreateBasicPersonalDetailsFormArgs, type MutationCreateBasicPersonalDetailsFormTemplateArgs, type MutationCreateBasicPreEmploymentFormArgs, type MutationCreateBasicPreEmploymentFormTemplateArgs, type MutationCreateBasicSuperFormArgs, type MutationCreateBasicSuperFormTemplateArgs, type MutationCreateBasicTaxFormArgs, type MutationCreateBasicTaxFormTemplateArgs, type MutationCreateBundleArgs, type MutationCreateBundledPersonArgs, type MutationCreateCertificateArgs, type MutationCreateCertificateTemplateArgs, type MutationCreateDataExportArgs, type MutationCreateDataImportArgs, type MutationCreateDocumentArgs, type MutationCreateDocumentTemplateArgs, type MutationCreateIntegrationArgs, type MutationCreateIntegrationLogArgs, type MutationCreateJobArgs, type MutationCreateKeypayEmployeeFormArgs, type MutationCreateKeypayEmployeeFormTemplateArgs, type MutationCreateKeypayLeaveLeaveRequestArgs, type MutationCreateLeaveRequestArgs, type MutationCreateLocalPersonConnectionsArgs, type MutationCreateLocationArgs, type MutationCreateLoginArgs, type MutationCreateManualDataImportArgs, type MutationCreateNoteArgs, type MutationCreateOrgArgs, type MutationCreatePersonArgs, type MutationCreatePersonConnectionArgs, type MutationCreatePersonDataImportLineArgs, type MutationCreatePositionArgs, type MutationCreateQuestionnaireArgs, type MutationCreateQuestionnaireTemplateArgs, type MutationCreateReviewCycleArgs, type MutationCreateSavedQuestionArgs, type MutationCreateStandaloneCertificateArgs, type MutationCreateStandaloneDocumentArgs, type MutationCreateStandaloneQuestionnaireArgs, type MutationCreateStandaloneStandardReviewArgs, type MutationCreateStandaloneTaskArgs, type MutationCreateStandardReviewArgs, type MutationCreateStandardReviewQuestionArgs, type MutationCreateStandardReviewTemplateArgs, type MutationCreateStandardReviewTemplateQuestionArgs, type MutationCreateTagArgs, type MutationCreateTagsArgs, type MutationCreateTaskArgs, type MutationCreateTaskTemplateArgs, type MutationCreateXeroLeaveRequestArgs, type MutationDeleteApiTokenArgs, type MutationDeleteBundledPersonArgs, type MutationDeleteJobArgs, type MutationDeleteLeaveRequestArgs, type MutationDeleteLoginArgs, type MutationDeletePersonConnectionArgs, type MutationDeletePersonConnectionsArgs, type MutationDeletePositionArgs, type MutationDeleteStandardReviewQuestionArgs, type MutationDeleteStandardReviewTemplateQuestionArgs, type MutationDeleteTagArgs, type MutationDenyKeypayLeaveLeaveRequestArgs, type MutationDenyLeaveRequestArgs, type MutationDenyXeroLeaveRequestArgs, type MutationDuplicateTemplateArgs, type MutationInitializeIntegrationArgs, type MutationInvitePersonArgs, type MutationJoinOrgArgs, type MutationLogInArgs, type MutationLogInWithProviderArgs, type MutationMarkNotificationsReadArgs, type MutationMarkNotificationsUnreadArgs, type MutationPauseIntegrationArgs, type MutationProcessAssignmentArgs, type MutationProcessAssignmentsArgs, type MutationProcessLeaveRequestArgs, type MutationProcessStandardReviewArgs, type MutationReassignAssignmentArgs, type MutationReassignCertificateArgs, type MutationReassignTaskArgs, type MutationReinviteLoginArgs, type MutationRemovePeopleFromBundlesArgs, type MutationRemovePeopleFromTagsArgs, type MutationRequestApprovalsArgs, type MutationRequestPasswordResetArgs, type MutationResetXeroAuIntegrationArgs, type MutationRestoreAssignmentArgs, type MutationRestoreBundleArgs, type MutationRestoreIntegrationArgs, type MutationRestoreNotesArgs, type MutationRestorePersonArgs, type MutationRestoreReviewCycleArgs, type MutationRestoreSavedQuestionArgs, type MutationRestoreStandardReviewArgs, type MutationRestoreStandardReviewTemplateArgs, type MutationRestoreTemplateArgs, type MutationScheduleStandardReviewArgs, type MutationSetActiveLoginArgs, type MutationSignUpArgs, type MutationSubmitBasicAbnFormArgs, type MutationSubmitBasicBankAccountFormArgs, type MutationSubmitBasicEmergencyContactFormArgs, type MutationSubmitBasicPersonalDetailsFormArgs, type MutationSubmitBasicPreEmploymentFormArgs, type MutationSubmitBasicSuperFormArgs, type MutationSubmitBasicTaxFormArgs, type MutationSubmitCertificateArgs, type MutationSubmitDocumentArgs, type MutationSubmitKeypayEmployeeFormArgs, type MutationSubmitQuestionnaireArgs, type MutationSubmitStandardReviewArgs, type MutationSubmitStandardReviewQuestionArgs, type MutationSubmitTaskArgs, type MutationTerminatePersonArgs, type MutationTriggerIntegrationSyncArgs, type MutationUnmatchPersonConnectionsArgs, type MutationUnpauseIntegrationArgs, type MutationUnscheduleStandardReviewArgs, type MutationUpdateAccountArgs, type MutationUpdateAssignmentArgs, type MutationUpdateAssignmentsArgs, type MutationUpdateBasicAbnFormTemplateArgs, type MutationUpdateBasicBankAccountFormTemplateArgs, type MutationUpdateBasicEmergencyContactFormTemplateArgs, type MutationUpdateBasicPersonalDetailsFormTemplateArgs, type MutationUpdateBasicPreEmploymentFormTemplateArgs, type MutationUpdateBasicSuperFormTemplateArgs, type MutationUpdateBasicTaxFormTemplateArgs, type MutationUpdateBundleArgs, type MutationUpdateCertificateArgs, type MutationUpdateCertificateTemplateArgs, type MutationUpdateDocumentArgs, type MutationUpdateDocumentTemplateArgs, type MutationUpdateIntegrationArgs, type MutationUpdateJobArgs, type MutationUpdateKeypayEmployeeFormTemplateArgs, type MutationUpdateKeypayIntegrationArgs, type MutationUpdateKeypayLeaveIntegrationArgs, type MutationUpdateLocationArgs, type MutationUpdateNoteArgs, type MutationUpdateOnboardingAssignmentsArgs, type MutationUpdateOrgArgs, type MutationUpdatePaperworkAssignmentArgs, type MutationUpdatePersonArgs, type MutationUpdatePersonConnectionArgs, type MutationUpdatePositionArgs, type MutationUpdatePositionsArgs, type MutationUpdateQuestionnaireArgs, type MutationUpdateQuestionnaireTemplateArgs, type MutationUpdateReviewCycleArgs, type MutationUpdateSavedQuestionArgs, type MutationUpdateStandardReviewArgs, type MutationUpdateStandardReviewQuestionArgs, type MutationUpdateStandardReviewTemplateArgs, type MutationUpdateStandardReviewTemplateQuestionArgs, type MutationUpdateTagArgs, type MutationUpdateTaskArgs, type MutationUpdateTaskTemplateArgs, type MutationUpdateUserPasswordArgs, type MutationUpdateXeroAuIntegrationArgs, type Note, type Notification, NotificationType, type Org, type OrgBundlesArgs, type OrgFeatures, type OrgFeaturesInput, type OrgIntegrationsArgs, type OrgPeopleArgs, type OrgReviewCyclesArgs, type OrgSavedQuestionsArgs, type OrgTemplatesArgs, type PaperworkAssignment, type PaperworkAssignmentNotificationsArgs, type PaperworkSummary, PayPeriod, type Person, type PersonAssignmentsArgs, type PersonBankAccountsChange, type PersonBankAccountsChangeInput, type PersonCertificatesArgs, type PersonChange, type PersonConnection, type PersonConnectionLeaveHoursEstimateArgs, type PersonDataImportLine, type PersonDataTransferConfigInput, type PersonDateOfBirthChange, type PersonDateOfBirthChangeInput, type PersonDocumentsArgs, type PersonEmergencyContactsChange, type PersonEmergencyContactsChangeInput, type PersonFormsArgs, type PersonFullNameChange, type PersonFullNameChangeInput, type PersonGenderChange, type PersonGenderChangeInput, type PersonNotesArgs, type PersonNotificationsArgs, type PersonPersonalEmailChange, type PersonPersonalEmailChangeInput, type PersonPersonalPhoneChange, type PersonPersonalPhoneChangeInput, type PersonPostalAddressChange, type PersonPostalAddressChangeInput, type PersonQuestionnairesArgs, type PersonRemunerationChange, type PersonResidentialAddressChange, type PersonResidentialAddressChangeInput, type PersonReviewsArgs, PersonRole, PersonStatus, type PersonSuperFundsChange, type PersonSuperFundsChangeInput, type PersonTasksArgs, type PersonTaxDetailsChange, type PersonTaxDetailsChangeInput, type PersonTenureChange, type PersonTenureChangeInput, type Position, type Query, type QueryAccountArgs, type QueryAssignmentArgs, type QueryBasicAbnFormTemplateArgs, type QueryBasicBankAccountFormTemplateArgs, type QueryBasicEmergencyContactFormTemplateArgs, type QueryBasicPersonalDetailsFormTemplateArgs, type QueryBasicPreEmploymentFormTemplateArgs, type QueryBasicSuperFormTemplateArgs, type QueryBasicTaxFormTemplateArgs, type QueryBundleArgs, type QueryCertificateArgs, type QueryCertificateTemplateArgs, type QueryDataImportArgs, type QueryDataImportLineArgs, type QueryDocumentArgs, type QueryDocumentTemplateArgs, type QueryFormArgs, type QueryIntegrationArgs, type QueryJobArgs, type QueryKeypayEmployeeArgs, type QueryKeypayEmployeeFormTemplateArgs, type QueryKeypayLeaveEmployeeArgs, type QueryLeaveRequestArgs, type QueryNoteArgs, type QueryOrgArgs, type QueryPersonArgs, type QueryPersonConnectionArgs, type QueryQuestionnaireArgs, type QueryQuestionnaireTemplateArgs, type QueryReviewCycleArgs, type QuerySavedQuestionArgs, type QueryStandardReviewArgs, type QueryStandardReviewTemplateArgs, type QueryTaskArgs, type QueryTaskTemplateArgs, type QueryTemplateArgs, type QueryUserArgs, type Question, type QuestionConfig, type QuestionConfigInput, type QuestionLikert5Config, type QuestionLikert5ConfigInput, type QuestionLikert5Response, type QuestionLikert5ResponseInput, type QuestionMultipleChoiceConfig, type QuestionMultipleChoiceConfigInput, type QuestionMultipleChoiceOtherConfig, type QuestionMultipleChoiceOtherConfigInput, type QuestionMultipleChoiceOtherResponse, type QuestionMultipleChoiceOtherResponseInput, type QuestionMultipleChoiceResponse, type QuestionMultipleChoiceResponseInput, type QuestionResponse, type QuestionResponseInput, type QuestionTemplateInput, type QuestionTextConfig, type QuestionTextConfigInput, type QuestionTextResponse, type QuestionTextResponseInput, QuestionType, type Questionnaire, type QuestionnaireNotificationsArgs, type QuestionnaireQuestion, type QuestionnaireQuestionAnswerInput, type QuestionnaireQuestionInput, type QuestionnaireTemplate, type QuestionnaireTemplateQuestion, type ReviewCycle, type ReviewCycleReviewsArgs, ReviewRelation, type SavedQuestion, type Scalars, type Session, type SharedCalendarEvent, type SignatureUploadDocumentField, type SignatureUploadDocumentFieldConfigInput, type SignatureUploadDocumentFieldInput, type SmartDocumentField, type SmartDocumentFieldConfigInput, type SmartDocumentFieldInput, SmartDocumentFieldType, type StandardReview, type StandardReviewNotification, type StandardReviewNotificationsArgs, type StandardReviewQuestion, StandardReviewQuestionRespondent, type StandardReviewQuestionsArgs, StandardReviewStatus, type StandardReviewTemplate, type StandardReviewTemplateQuestion, SuperFundNomination, type Tag, TagColor, type TagInput, type Task, type TaskNotificationsArgs, type TaskTemplate, TaxEmploymentBasis, TaxFileNumberExemption, TaxResidencyStatus, type Template, type TemplateInput, type TemplateParameter, type TemplateParameterInput, type TemplateParameterInputValue, TemplateParameterType, type TemplateParameterValue, type TextDocumentField, type TextDocumentFieldConfigInput, type TextDocumentFieldInput, type UpdatePersonConnectionMutation, type UpdatePersonConnectionMutationVariables, type UpdatePersonMutation, type UpdatePersonMutationVariables, type Upload, type User, type XeroAuBankAccount, type XeroAuEmployee, XeroAuEmploymentBasis, XeroAuGender, type XeroAuIntegration, type XeroAuIntegrationFeaturesArgs, XeroAuResidencyStatus, type XeroAuSuperFund, type XeroAuSuperMembership, XeroAuTfnExemptionType, type XeroLeaveEmployee, type XeroLeaveIntegration, type XeroLeaveIntegrationFeaturesArgs };
5996
+ export { type Account, type AccountAppsArgs, type AccountFeatures, type AccountFeaturesInput, AccountFlag, type ActivateIntegrationMutation, type ActivateIntegrationMutationVariables, AllocationMethod, type AnniversaryEvent, type ApiToken, type App, AppCategory, type AppConfig, type AppConfigWebhooks, AppStatus, type AppendIntegrationLogMutation, type AppendIntegrationLogMutationVariables, type Approval, ApprovalStatus, type Archivable, type Assignment, type AssignmentNotification, type AssignmentNotificationsArgs, AssignmentRelation, AssignmentStatus, AssignmentType, AuthMethod, AuthProvider, AuthState, type AuthorizeIntegrationMutation, type AuthorizeIntegrationMutationVariables, type BasicAbnForm, type BasicAbnFormNotificationsArgs, type BasicAbnFormTemplate, type BasicBankAccountForm, type BasicBankAccountFormNotificationsArgs, type BasicBankAccountFormTemplate, type BasicEmergencyContactForm, type BasicEmergencyContactFormNotificationsArgs, type BasicEmergencyContactFormTemplate, type BasicPersonalDetailsForm, type BasicPersonalDetailsFormNotificationsArgs, type BasicPersonalDetailsFormTemplate, type BasicPreEmploymentForm, type BasicPreEmploymentFormNotificationsArgs, type BasicPreEmploymentFormTemplate, type BasicSuperForm, type BasicSuperFormNotificationsArgs, type BasicSuperFormTemplate, type BasicTaxForm, type BasicTaxFormNotificationsArgs, type BasicTaxFormTemplate, type Birthday, type BirthdayEvent, type BirthdayInput, type Bundle, type BundledPerson, type BundledTemplate, type BundledTemplateInput, type Certificate, type CertificateNotificationsArgs, CertificateProof, type CertificateTemplate, type ChoiceDocumentField, type ChoiceDocumentFieldConfigInput, type ChoiceDocumentFieldConfigOptionInput, type ChoiceDocumentFieldInput, type ChoiceDocumentFieldOption, type ChoiceDocumentFieldOptionInput, type CompleteSyncMutation, type CompleteSyncMutationVariables, type ConnectionRemote, type ConnectionRemoteInput, ConnectionStatus, type CreateApiTokenMutation, type CreateApiTokenMutationVariables, type CreateDataImportMutation, type CreateDataImportMutationVariables, type CreateLeaveRequestMutation, type CreateLeaveRequestMutationVariables, type CreatePersonConnectionMutation, type CreatePersonConnectionMutationVariables, type CreatePersonDataImportLineMutation, type CreatePersonDataImportLineMutationVariables, type CreatePersonMutation, type CreatePersonMutationVariables, type DataExport, DataExportType, type DataImport, type DataImportLine, type DateDocumentField, type DateDocumentFieldConfigInput, type DateDocumentFieldInput, type DeleteApiTokenMutation, type DeleteApiTokenMutationVariables, type DeletePersonConnectionMutation, type DeletePersonConnectionMutationVariables, type Department, type Document, type DocumentField, type DocumentFieldConfigInput, type DocumentFieldInput, DocumentFieldResponder, type DocumentNotificationsArgs, type DocumentTemplate, type EmailNotificationSettings, type EmailNotificationSettingsInput, type Exact, ExpiryStatus, FieldPresence, type Form, type FormNotificationsArgs, FormOrderBy, FormType, Gender, type GenericIntegration, type GenericIntegrationFeaturesArgs, type GetApiTokensQuery, type GetApiTokensQueryVariables, type GetIntegrationQuery, type GetIntegrationQueryVariables, type GetLeaveRequestsQuery, type GetLeaveRequestsQueryVariables, type GetMyAppsQuery, type GetMyAppsQueryVariables, type GetPeopleQuery, type GetPeopleQueryVariables, type GetPersonConnectionsQuery, type GetPersonConnectionsQueryVariables, type Incremental, type InitializeIntegrationMutation, type InitializeIntegrationMutationVariables, type InputMaybe, type Integration, type IntegrationConnection, type IntegrationFeatures, type IntegrationFeaturesArgs, type IntegrationFeaturesInput, type IntegrationLog, type IntegrationLogInput, IntegrationStatus, type IntegrationSync, type IntegrationSyncEvent, IntegrationSyncEventType, IntegrationSyncStatus, IntegrationType, type Job, JobStatus, type KeypayBusiness, type KeypayEmployee, type KeypayEmployeeForm, type KeypayEmployeeFormNotificationsArgs, type KeypayEmployeeFormTemplate, KeypayEmployeeStatus, KeypayEmploymentType, KeypayGender, type KeypayIntegration, type KeypayIntegrationFeaturesArgs, type KeypayLeaveEmployee, type KeypayLeaveIntegration, type KeypayLeaveIntegrationFeaturesArgs, type LeaveBalance, type LeaveCategory, type LeaveCategoryInput, type LeaveHoursEstimate, type LeaveRequest, type LeaveRequestNotification, type LeaveRequestNotificationsArgs, LeaveRequestStatus, type Location, type Login, type MakeEmpty, type MakeMaybe, type MakeOptional, type Maybe, type Media, type MultiLineTextDocumentField, type MultiLineTextDocumentFieldConfigInput, type MultiLineTextDocumentFieldInput, type Mutation, type MutationAcceptLoginArgs, type MutationActivateIntegrationArgs, type MutationActivatePersonArgs, type MutationAddPeopleToBundlesArgs, type MutationAddPeopleToTagsArgs, type MutationAppendIntegrationLogArgs, type MutationApproveAssignmentArgs, type MutationApproveKeypayLeaveLeaveRequestArgs, type MutationApproveLeaveRequestArgs, type MutationApproveXeroLeaveRequestArgs, type MutationArchiveAssignmentArgs, type MutationArchiveBundleArgs, type MutationArchiveIntegrationArgs, type MutationArchiveNotesArgs, type MutationArchiveOrgArgs, type MutationArchivePersonArgs, type MutationArchiveReviewCycleArgs, type MutationArchiveSavedQuestionArgs, type MutationArchiveStandardReviewArgs, type MutationArchiveStandardReviewTemplateArgs, type MutationArchiveTemplateArgs, type MutationAssignAssignmentsArgs, type MutationAssignBasicAbnFormArgs, type MutationAssignBasicBankAccountFormArgs, type MutationAssignBasicEmergencyContactFormArgs, type MutationAssignBasicPersonalDetailsFormArgs, type MutationAssignBasicPreEmploymentFormArgs, type MutationAssignBasicSuperFormArgs, type MutationAssignBasicTaxFormArgs, type MutationAssignCertificateArgs, type MutationAssignDocumentArgs, type MutationAssignKeypayEmployeeFormArgs, type MutationAssignQuestionnaireArgs, type MutationAssignStandardReviewArgs, type MutationAssignTaskArgs, type MutationAuthorizeIntegrationArgs, type MutationCancelLeaveRequestArgs, type MutationCompleteIntegrationSyncArgs, type MutationCompletePasswordResetArgs, type MutationConfirmEmailArgs, type MutationConfirmProfileArgs, type MutationConfirmProviderArgs, type MutationCreateAccountArgs, type MutationCreateApiTokenArgs, type MutationCreateAssignmentsArgs, type MutationCreateBasicAbnFormArgs, type MutationCreateBasicAbnFormTemplateArgs, type MutationCreateBasicBankAccountFormArgs, type MutationCreateBasicBankAccountFormTemplateArgs, type MutationCreateBasicEmergencyContactFormArgs, type MutationCreateBasicEmergencyContactFormTemplateArgs, type MutationCreateBasicPersonalDetailsFormArgs, type MutationCreateBasicPersonalDetailsFormTemplateArgs, type MutationCreateBasicPreEmploymentFormArgs, type MutationCreateBasicPreEmploymentFormTemplateArgs, type MutationCreateBasicSuperFormArgs, type MutationCreateBasicSuperFormTemplateArgs, type MutationCreateBasicTaxFormArgs, type MutationCreateBasicTaxFormTemplateArgs, type MutationCreateBundleArgs, type MutationCreateBundledPersonArgs, type MutationCreateCertificateArgs, type MutationCreateCertificateTemplateArgs, type MutationCreateDataExportArgs, type MutationCreateDataImportArgs, type MutationCreateDocumentArgs, type MutationCreateDocumentTemplateArgs, type MutationCreateIntegrationArgs, type MutationCreateIntegrationLogArgs, type MutationCreateJobArgs, type MutationCreateKeypayEmployeeFormArgs, type MutationCreateKeypayEmployeeFormTemplateArgs, type MutationCreateKeypayLeaveLeaveRequestArgs, type MutationCreateLeaveRequestArgs, type MutationCreateLocalPersonConnectionsArgs, type MutationCreateLocationArgs, type MutationCreateLoginArgs, type MutationCreateManualDataImportArgs, type MutationCreateNoteArgs, type MutationCreateOrgArgs, type MutationCreatePersonArgs, type MutationCreatePersonConnectionArgs, type MutationCreatePersonDataImportLineArgs, type MutationCreatePositionArgs, type MutationCreateQuestionnaireArgs, type MutationCreateQuestionnaireTemplateArgs, type MutationCreateReviewCycleArgs, type MutationCreateSavedQuestionArgs, type MutationCreateStandaloneCertificateArgs, type MutationCreateStandaloneDocumentArgs, type MutationCreateStandaloneQuestionnaireArgs, type MutationCreateStandaloneStandardReviewArgs, type MutationCreateStandaloneTaskArgs, type MutationCreateStandardReviewArgs, type MutationCreateStandardReviewQuestionArgs, type MutationCreateStandardReviewTemplateArgs, type MutationCreateStandardReviewTemplateQuestionArgs, type MutationCreateTagArgs, type MutationCreateTagsArgs, type MutationCreateTaskArgs, type MutationCreateTaskTemplateArgs, type MutationCreateXeroLeaveRequestArgs, type MutationDeleteApiTokenArgs, type MutationDeleteBundledPersonArgs, type MutationDeleteJobArgs, type MutationDeleteLeaveRequestArgs, type MutationDeleteLoginArgs, type MutationDeletePersonConnectionArgs, type MutationDeletePersonConnectionsArgs, type MutationDeletePositionArgs, type MutationDeleteStandardReviewQuestionArgs, type MutationDeleteStandardReviewTemplateQuestionArgs, type MutationDeleteTagArgs, type MutationDenyKeypayLeaveLeaveRequestArgs, type MutationDenyLeaveRequestArgs, type MutationDenyXeroLeaveRequestArgs, type MutationDuplicateTemplateArgs, type MutationInitializeIntegrationArgs, type MutationInvitePersonArgs, type MutationJoinOrgArgs, type MutationLogInArgs, type MutationLogInWithProviderArgs, type MutationMarkNotificationsReadArgs, type MutationMarkNotificationsUnreadArgs, type MutationPauseIntegrationArgs, type MutationProcessAssignmentArgs, type MutationProcessAssignmentsArgs, type MutationProcessLeaveRequestArgs, type MutationProcessStandardReviewArgs, type MutationReassignAssignmentArgs, type MutationReassignCertificateArgs, type MutationReassignTaskArgs, type MutationReinviteLoginArgs, type MutationRemovePeopleFromBundlesArgs, type MutationRemovePeopleFromTagsArgs, type MutationRequestApprovalsArgs, type MutationRequestPasswordResetArgs, type MutationResetXeroAuIntegrationArgs, type MutationRestoreAssignmentArgs, type MutationRestoreBundleArgs, type MutationRestoreIntegrationArgs, type MutationRestoreNotesArgs, type MutationRestorePersonArgs, type MutationRestoreReviewCycleArgs, type MutationRestoreSavedQuestionArgs, type MutationRestoreStandardReviewArgs, type MutationRestoreStandardReviewTemplateArgs, type MutationRestoreTemplateArgs, type MutationScheduleStandardReviewArgs, type MutationSetActiveLoginArgs, type MutationSignUpArgs, type MutationSubmitBasicAbnFormArgs, type MutationSubmitBasicBankAccountFormArgs, type MutationSubmitBasicEmergencyContactFormArgs, type MutationSubmitBasicPersonalDetailsFormArgs, type MutationSubmitBasicPreEmploymentFormArgs, type MutationSubmitBasicSuperFormArgs, type MutationSubmitBasicTaxFormArgs, type MutationSubmitCertificateArgs, type MutationSubmitDocumentArgs, type MutationSubmitKeypayEmployeeFormArgs, type MutationSubmitQuestionnaireArgs, type MutationSubmitStandardReviewArgs, type MutationSubmitStandardReviewQuestionArgs, type MutationSubmitTaskArgs, type MutationTerminatePersonArgs, type MutationTriggerIntegrationSyncArgs, type MutationUnmatchPersonConnectionsArgs, type MutationUnpauseIntegrationArgs, type MutationUnscheduleStandardReviewArgs, type MutationUpdateAccountArgs, type MutationUpdateAssignmentArgs, type MutationUpdateAssignmentsArgs, type MutationUpdateBasicAbnFormTemplateArgs, type MutationUpdateBasicBankAccountFormTemplateArgs, type MutationUpdateBasicEmergencyContactFormTemplateArgs, type MutationUpdateBasicPersonalDetailsFormTemplateArgs, type MutationUpdateBasicPreEmploymentFormTemplateArgs, type MutationUpdateBasicSuperFormTemplateArgs, type MutationUpdateBasicTaxFormTemplateArgs, type MutationUpdateBundleArgs, type MutationUpdateCertificateArgs, type MutationUpdateCertificateTemplateArgs, type MutationUpdateDocumentArgs, type MutationUpdateDocumentTemplateArgs, type MutationUpdateIntegrationArgs, type MutationUpdateJobArgs, type MutationUpdateKeypayEmployeeFormTemplateArgs, type MutationUpdateKeypayIntegrationArgs, type MutationUpdateKeypayLeaveIntegrationArgs, type MutationUpdateLocationArgs, type MutationUpdateNoteArgs, type MutationUpdateOnboardingAssignmentsArgs, type MutationUpdateOrgArgs, type MutationUpdatePaperworkAssignmentArgs, type MutationUpdatePersonArgs, type MutationUpdatePersonConnectionArgs, type MutationUpdatePositionArgs, type MutationUpdatePositionsArgs, type MutationUpdateQuestionnaireArgs, type MutationUpdateQuestionnaireTemplateArgs, type MutationUpdateReviewCycleArgs, type MutationUpdateSavedQuestionArgs, type MutationUpdateStandardReviewArgs, type MutationUpdateStandardReviewQuestionArgs, type MutationUpdateStandardReviewTemplateArgs, type MutationUpdateStandardReviewTemplateQuestionArgs, type MutationUpdateTagArgs, type MutationUpdateTaskArgs, type MutationUpdateTaskTemplateArgs, type MutationUpdateUserPasswordArgs, type MutationUpdateXeroAuIntegrationArgs, type Note, type Notification, NotificationType, type Org, type OrgBundlesArgs, type OrgFeatures, type OrgFeaturesInput, type OrgIntegrationsArgs, type OrgPeopleArgs, type OrgReviewCyclesArgs, type OrgSavedQuestionsArgs, type OrgTemplatesArgs, type PaperworkAssignment, type PaperworkAssignmentNotificationsArgs, type PaperworkSummary, PayPeriod, type Person, type PersonAssignmentsArgs, type PersonBankAccountsChange, type PersonBankAccountsChangeInput, type PersonCertificatesArgs, type PersonChange, type PersonConnection, type PersonConnectionLeaveHoursEstimateArgs, type PersonDataImportLine, type PersonDataTransferConfigInput, type PersonDateOfBirthChange, type PersonDateOfBirthChangeInput, type PersonDocumentsArgs, type PersonEmergencyContactsChange, type PersonEmergencyContactsChangeInput, type PersonFormsArgs, type PersonFullNameChange, type PersonFullNameChangeInput, type PersonGenderChange, type PersonGenderChangeInput, type PersonNotesArgs, type PersonNotificationsArgs, type PersonPersonalEmailChange, type PersonPersonalEmailChangeInput, type PersonPersonalPhoneChange, type PersonPersonalPhoneChangeInput, type PersonPostalAddressChange, type PersonPostalAddressChangeInput, type PersonQuestionnairesArgs, type PersonRemunerationChange, type PersonResidentialAddressChange, type PersonResidentialAddressChangeInput, type PersonReviewsArgs, PersonRole, PersonStatus, type PersonSuperFundsChange, type PersonSuperFundsChangeInput, type PersonTasksArgs, type PersonTaxDetailsChange, type PersonTaxDetailsChangeInput, type PersonTenureChange, type PersonTenureChangeInput, type Position, type Query, type QueryAccountArgs, type QueryAssignmentArgs, type QueryBasicAbnFormTemplateArgs, type QueryBasicBankAccountFormTemplateArgs, type QueryBasicEmergencyContactFormTemplateArgs, type QueryBasicPersonalDetailsFormTemplateArgs, type QueryBasicPreEmploymentFormTemplateArgs, type QueryBasicSuperFormTemplateArgs, type QueryBasicTaxFormTemplateArgs, type QueryBundleArgs, type QueryCertificateArgs, type QueryCertificateTemplateArgs, type QueryDataImportArgs, type QueryDataImportLineArgs, type QueryDocumentArgs, type QueryDocumentTemplateArgs, type QueryFormArgs, type QueryIntegrationArgs, type QueryJobArgs, type QueryKeypayEmployeeArgs, type QueryKeypayEmployeeFormTemplateArgs, type QueryKeypayLeaveEmployeeArgs, type QueryLeaveRequestArgs, type QueryNoteArgs, type QueryOrgArgs, type QueryPersonArgs, type QueryPersonConnectionArgs, type QueryQuestionnaireArgs, type QueryQuestionnaireTemplateArgs, type QueryReviewCycleArgs, type QuerySavedQuestionArgs, type QueryStandardReviewArgs, type QueryStandardReviewTemplateArgs, type QueryTaskArgs, type QueryTaskTemplateArgs, type QueryTemplateArgs, type QueryUserArgs, type Question, type QuestionConfig, type QuestionConfigInput, type QuestionLikert5Config, type QuestionLikert5ConfigInput, type QuestionLikert5Response, type QuestionLikert5ResponseInput, type QuestionMultipleChoiceConfig, type QuestionMultipleChoiceConfigInput, type QuestionMultipleChoiceOtherConfig, type QuestionMultipleChoiceOtherConfigInput, type QuestionMultipleChoiceOtherResponse, type QuestionMultipleChoiceOtherResponseInput, type QuestionMultipleChoiceResponse, type QuestionMultipleChoiceResponseInput, type QuestionResponse, type QuestionResponseInput, type QuestionTemplateInput, type QuestionTextConfig, type QuestionTextConfigInput, type QuestionTextResponse, type QuestionTextResponseInput, QuestionType, type Questionnaire, type QuestionnaireNotificationsArgs, type QuestionnaireQuestion, type QuestionnaireQuestionAnswerInput, type QuestionnaireQuestionInput, type QuestionnaireTemplate, type QuestionnaireTemplateQuestion, type ReviewCycle, type ReviewCycleReviewsArgs, ReviewRelation, type SavedQuestion, type Scalars, type Session, type SharedCalendarEvent, type SignatureUploadDocumentField, type SignatureUploadDocumentFieldConfigInput, type SignatureUploadDocumentFieldInput, type SmartDocumentField, type SmartDocumentFieldConfigInput, type SmartDocumentFieldInput, SmartDocumentFieldType, type StandardReview, type StandardReviewNotification, type StandardReviewNotificationsArgs, type StandardReviewQuestion, StandardReviewQuestionRespondent, type StandardReviewQuestionsArgs, StandardReviewStatus, type StandardReviewTemplate, type StandardReviewTemplateQuestion, SuperFundNomination, type Tag, TagColor, type TagInput, type Task, type TaskNotificationsArgs, type TaskTemplate, TaxEmploymentBasis, TaxFileNumberExemption, TaxResidencyStatus, type Template, type TemplateInput, type TemplateParameter, type TemplateParameterInput, type TemplateParameterInputValue, TemplateParameterType, type TemplateParameterValue, type TextDocumentField, type TextDocumentFieldConfigInput, type TextDocumentFieldInput, type UpdateLeaveRequestMutation, type UpdateLeaveRequestMutationVariables, type UpdatePersonConnectionMutation, type UpdatePersonConnectionMutationVariables, type UpdatePersonMutation, type UpdatePersonMutationVariables, type Upload, type User, type XeroAuBankAccount, type XeroAuEmployee, XeroAuEmploymentBasis, XeroAuGender, type XeroAuIntegration, type XeroAuIntegrationFeaturesArgs, XeroAuResidencyStatus, type XeroAuSuperFund, type XeroAuSuperMembership, XeroAuTfnExemptionType, type XeroLeaveEmployee, type XeroLeaveIntegration, type XeroLeaveIntegrationFeaturesArgs };