@rippling/rippling-sdk 0.2.0-alpha.63 → 0.2.0-alpha.68

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 (88) hide show
  1. package/client.d.mts +0 -12
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +0 -12
  4. package/client.d.ts.map +1 -1
  5. package/client.js +0 -12
  6. package/client.js.map +1 -1
  7. package/client.mjs +0 -12
  8. package/client.mjs.map +1 -1
  9. package/examples/manifest/dental-practice-management/dental-practice-management.ts +28 -9
  10. package/examples/manifest/gym-membership-management/gym-membership-management.ts +8 -7
  11. package/examples/manifest/simple-todo-app/simple-todo-app.ts +4 -2
  12. package/examples/manifest/todo-app-without-object-list-view/functions/todo-page.ts +487 -0
  13. package/examples/manifest/todo-app-without-object-list-view/todo-app-without-object-list-view.ts +111 -0
  14. package/functions.d.mts +5 -5
  15. package/functions.d.mts.map +1 -1
  16. package/functions.d.ts +5 -5
  17. package/functions.d.ts.map +1 -1
  18. package/functions.js +1 -1
  19. package/functions.js.map +1 -1
  20. package/functions.mjs +1 -1
  21. package/functions.mjs.map +1 -1
  22. package/lib/manifest/field.d.mts +9 -0
  23. package/lib/manifest/field.d.mts.map +1 -1
  24. package/lib/manifest/field.d.ts +9 -0
  25. package/lib/manifest/field.d.ts.map +1 -1
  26. package/lib/manifest/field.js +3 -0
  27. package/lib/manifest/field.js.map +1 -1
  28. package/lib/manifest/field.mjs +3 -0
  29. package/lib/manifest/field.mjs.map +1 -1
  30. package/lib/manifest/index.d.mts +1 -1
  31. package/lib/manifest/index.d.mts.map +1 -1
  32. package/lib/manifest/index.d.ts +1 -1
  33. package/lib/manifest/index.d.ts.map +1 -1
  34. package/lib/manifest/index.js.map +1 -1
  35. package/lib/manifest/index.mjs.map +1 -1
  36. package/lib/manifest/manifest-function.d.mts +4 -7
  37. package/lib/manifest/manifest-function.d.mts.map +1 -1
  38. package/lib/manifest/manifest-function.d.ts +4 -7
  39. package/lib/manifest/manifest-function.d.ts.map +1 -1
  40. package/lib/manifest/manifest-function.js +7 -11
  41. package/lib/manifest/manifest-function.js.map +1 -1
  42. package/lib/manifest/manifest-function.mjs +7 -10
  43. package/lib/manifest/manifest-function.mjs.map +1 -1
  44. package/package.json +1 -1
  45. package/resources/index.d.mts +0 -2
  46. package/resources/index.d.mts.map +1 -1
  47. package/resources/index.d.ts +0 -2
  48. package/resources/index.d.ts.map +1 -1
  49. package/resources/index.js +1 -5
  50. package/resources/index.js.map +1 -1
  51. package/resources/index.mjs +0 -2
  52. package/resources/index.mjs.map +1 -1
  53. package/resources/workers.d.mts +37 -2
  54. package/resources/workers.d.mts.map +1 -1
  55. package/resources/workers.d.ts +37 -2
  56. package/resources/workers.d.ts.map +1 -1
  57. package/resources/workers.js +2 -2
  58. package/resources/workers.mjs +2 -2
  59. package/src/client.ts +0 -38
  60. package/src/functions.ts +10 -5
  61. package/src/lib/manifest/field.ts +12 -0
  62. package/src/lib/manifest/index.ts +0 -1
  63. package/src/lib/manifest/manifest-function.ts +8 -18
  64. package/src/resources/index.ts +0 -13
  65. package/src/resources/workers.ts +43 -2
  66. package/src/version.ts +1 -1
  67. package/version.d.mts +1 -1
  68. package/version.d.ts +1 -1
  69. package/version.js +1 -1
  70. package/version.mjs +1 -1
  71. package/resources/worker-change-fields.d.mts +0 -45
  72. package/resources/worker-change-fields.d.mts.map +0 -1
  73. package/resources/worker-change-fields.d.ts +0 -45
  74. package/resources/worker-change-fields.d.ts.map +0 -1
  75. package/resources/worker-change-fields.js +0 -21
  76. package/resources/worker-change-fields.js.map +0 -1
  77. package/resources/worker-change-fields.mjs +0 -17
  78. package/resources/worker-change-fields.mjs.map +0 -1
  79. package/resources/worker-changes.d.mts +0 -267
  80. package/resources/worker-changes.d.mts.map +0 -1
  81. package/resources/worker-changes.d.ts +0 -267
  82. package/resources/worker-changes.d.ts.map +0 -1
  83. package/resources/worker-changes.js +0 -36
  84. package/resources/worker-changes.js.map +0 -1
  85. package/resources/worker-changes.mjs +0 -32
  86. package/resources/worker-changes.mjs.map +0 -1
  87. package/src/resources/worker-change-fields.ts +0 -64
  88. package/src/resources/worker-changes.ts +0 -354
@@ -174,7 +174,6 @@ export {
174
174
  export {
175
175
  ManifestFunction,
176
176
  ManifestFunction as Function,
177
- type FunctionCodeFile,
178
177
  type ManifestFunctionProps,
179
178
  } from './manifest-function';
180
179
 
@@ -1,11 +1,7 @@
1
- import * as fs from 'node:fs';
2
-
3
1
  import { getExistingManifestContext, type ExistingManifestContextOptions } from './existing-manifest-context';
4
2
  import type { ManifestComponentDeletion, ManifestScope } from './manifest-builder';
5
3
  import { optionalStringComponentField, requireStringComponentField } from './_existing-component-fields';
6
4
 
7
- export type FunctionCodeFile = `./${string}.ts` | `/${string}.ts`;
8
-
9
5
  /**
10
6
  * Initialization properties for {@link ManifestFunction}.
11
7
  */
@@ -23,12 +19,11 @@ export interface ManifestFunctionProps {
23
19
  */
24
20
  name: string;
25
21
  /**
26
- * Path to a TypeScript handler source file. The file must export an
27
- * `onRipplingEvent` function. Its contents are serialized to `code_draft`.
22
+ * TypeScript handler source code. Must export an `onRipplingEvent` function.
28
23
  *
29
24
  * Optional. @default `''`
30
25
  */
31
- codeFile?: FunctionCodeFile;
26
+ code?: string;
32
27
  /**
33
28
  * Human-readable description of what this function does.
34
29
  *
@@ -85,7 +80,7 @@ export interface ManifestFunctionProps {
85
80
  * apiName: 'gym_today_schedule_fn',
86
81
  * name: 'Today\'s schedule (SDUI)',
87
82
  * description: 'Searchable grid of class sessions',
88
- * codeFile: './functions/gym_today_schedule_fn/code.ts',
83
+ * code: handlerSource,
89
84
  * dependencies: {
90
85
  * '@rippling/rippling-sdk': '^0.2.0-alpha.33',
91
86
  * },
@@ -107,8 +102,7 @@ export class ManifestFunction {
107
102
 
108
103
  private readonly _apiName: string;
109
104
  private readonly _name: string;
110
- private readonly _codeFile: FunctionCodeFile | undefined;
111
- private _codeDraft: string | undefined;
105
+ private readonly _code: string;
112
106
  private readonly _description: string;
113
107
  private readonly _dependencies: Record<string, string> | undefined;
114
108
  private readonly _deploymentOptions: Record<string, any> | undefined;
@@ -122,7 +116,7 @@ export class ManifestFunction {
122
116
  constructor(scope: ManifestScope, props: ManifestFunctionProps) {
123
117
  this._apiName = props.apiName;
124
118
  this._name = props.name;
125
- this._codeFile = props.codeFile;
119
+ this._code = props.code ?? '';
126
120
  this._description = props.description;
127
121
  this._dependencies = props.dependencies;
128
122
  this._deploymentOptions = props.deploymentOptions;
@@ -145,16 +139,14 @@ export class ManifestFunction {
145
139
  name: requireStringComponentField(component, 'name', ManifestFunction.componentType),
146
140
  description: optionalStringComponentField(component, 'description'),
147
141
  };
148
- const codeDraft = optionalStringComponentField(component, 'code_draft');
142
+ if (component['code_draft'] !== undefined) props.code = component['code_draft'];
149
143
  if (component['dependencies'] !== undefined) props.dependencies = component['dependencies'];
150
144
  if (component['deployment_options'] !== undefined) {
151
145
  props.deploymentOptions = component['deployment_options'];
152
146
  }
153
147
  if (component['allowed_domains'] !== undefined) props.allowedDomains = component['allowed_domains'];
154
148
  if (component['is_async'] !== undefined) props.isAsync = component['is_async'];
155
- const manifestFunction = new ManifestFunction(scope, props);
156
- manifestFunction._codeDraft = codeDraft;
157
- return manifestFunction;
149
+ return new ManifestFunction(scope, props);
158
150
  }
159
151
 
160
152
  /**
@@ -176,9 +168,7 @@ export class ManifestFunction {
176
168
  api_name: this._apiName,
177
169
  description: this._description,
178
170
  };
179
- const codeDraft =
180
- this._codeDraft ?? (this._codeFile ? fs.readFileSync(this._codeFile, 'utf-8') : undefined);
181
- if (codeDraft) component['code_draft'] = codeDraft;
171
+ if (this._code) component['code_draft'] = this._code;
182
172
  if (this._dependencies != null) component['dependencies'] = this._dependencies;
183
173
  if (this._deploymentOptions != null) component['deployment_options'] = this._deploymentOptions;
184
174
  if (this._allowedDomains != null) component['allowed_domains'] = this._allowedDomains;
@@ -535,19 +535,6 @@ export {
535
535
  type WorkLocationUpdateParams,
536
536
  type WorkLocationsPageCursorURL,
537
537
  } from './work-locations';
538
- export {
539
- WorkerChangeFields,
540
- type WorkerChangeFieldListResponse,
541
- type WorkerChangeFieldListResponsesPageCursorURL,
542
- } from './worker-change-fields';
543
- export {
544
- WorkerChanges,
545
- type WorkerChangeListResponse,
546
- type WorkerChangeRetrieveResponse,
547
- type WorkerChangeListParams,
548
- type WorkerChangeRetrieveParams,
549
- type WorkerChangeListResponsesPageCursorURL,
550
- } from './worker-changes';
551
538
  export {
552
539
  WorkerTimeSplits,
553
540
  type WorkerTimeSplitListResponse,
@@ -25,8 +25,8 @@ export class Workers extends APIResource {
25
25
  * - Filterable fields: `status`, `work_email`, `user_id`, `created_at`,
26
26
  * `updated_at`
27
27
  * - Expandable fields: `user`, `manager`, `legal_entity`, `employment_type`,
28
- * `compensation`, `department`, `teams`, `level`, `custom_fields`,
29
- * `business_partners`
28
+ * `compensation`, `department`, `teams`, `level`, `job_function`,
29
+ * `custom_fields`, `business_partners`
30
30
  * - Sortable fields: `id`, `created_at`, `updated_at`
31
31
  */
32
32
  list(
@@ -684,6 +684,19 @@ export interface Worker {
684
684
  */
685
685
  is_manager?: boolean;
686
686
 
687
+ /**
688
+ * The worker's job function. When expanded, this field requires
689
+ * `job-functions.read`.
690
+ *
691
+ * Expandable field
692
+ */
693
+ job_function?: Worker.JobFunction;
694
+
695
+ /**
696
+ * ID of the worker's job function.
697
+ */
698
+ job_function_id?: string;
699
+
687
700
  /**
688
701
  * The worker's associated legal entity.
689
702
  *
@@ -865,6 +878,34 @@ export namespace Worker {
865
878
  }
866
879
  }
867
880
 
881
+ /**
882
+ * The worker's job function. When expanded, this field requires
883
+ * `job-functions.read`.
884
+ *
885
+ * Expandable field
886
+ */
887
+ export interface JobFunction {
888
+ /**
889
+ * Identifier field
890
+ */
891
+ id: string;
892
+
893
+ /**
894
+ * Record creation date
895
+ */
896
+ created_at: string;
897
+
898
+ /**
899
+ * Record update date
900
+ */
901
+ updated_at: string;
902
+
903
+ /**
904
+ * Displayed name of the job function
905
+ */
906
+ name?: string;
907
+ }
908
+
868
909
  /**
869
910
  * The location that the worker is mapped to for tax purposes. In the case that a
870
911
  * worker is remote, the location's type is remote.
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.2.0-alpha.63'; // x-release-please-version
1
+ export const VERSION = '0.2.0-alpha.68'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.2.0-alpha.63";
1
+ export declare const VERSION = "0.2.0-alpha.68";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.2.0-alpha.63";
1
+ export declare const VERSION = "0.2.0-alpha.68";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.2.0-alpha.63'; // x-release-please-version
4
+ exports.VERSION = '0.2.0-alpha.68'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.2.0-alpha.63'; // x-release-please-version
1
+ export const VERSION = '0.2.0-alpha.68'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,45 +0,0 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { PageCursorURL, PagePromise } from "../core/pagination.mjs";
3
- import { RequestOptions } from "../internal/request-options.mjs";
4
- /**
5
- * Historical changes to worker data over time
6
- */
7
- export declare class WorkerChangeFields extends APIResource {
8
- /**
9
- * A list of worker change fields.
10
- *
11
- * - Requires: `API Tier 2`
12
- */
13
- list(options?: RequestOptions): PagePromise<WorkerChangeFieldListResponsesPageCursorURL, WorkerChangeFieldListResponse>;
14
- }
15
- export type WorkerChangeFieldListResponsesPageCursorURL = PageCursorURL<WorkerChangeFieldListResponse>;
16
- export interface WorkerChangeFieldListResponse {
17
- /**
18
- * High-level grouping for the field.
19
- */
20
- category: 'PERSONAL' | 'JOB' | 'COMPENSATION' | 'BENEFITS' | 'CUSTOM' | 'COUNTRY_SPECIFIC';
21
- /**
22
- * UI label for the field (English).
23
- */
24
- field_display_name: string;
25
- /**
26
- * Field key in snake_case. Use directly in ?filter=field_key eq '...' on GET
27
- * /worker-changes. Naming convention: public DTO fields use the DTO field name
28
- * verbatim (work_email, title); nested fields use dot notation
29
- * (compensation.base_salary); custom fields use custom_fields.<custom_field_id>;
30
- * country-specific fields use the ISO country prefix (us.eeo.race). Filter
31
- * semantics: filtering GET /worker-changes by field_key returns events that
32
- * contain at least one change to this field, but the changes[] array on those
33
- * events is NOT pruned — consumers receive the full event payload including
34
- * changes to other fields.
35
- */
36
- field_key: string;
37
- /**
38
- * Value type of the field.
39
- */
40
- value_type: 'STRING' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'CURRENCY' | 'ENUM' | 'REFERENCE';
41
- }
42
- export declare namespace WorkerChangeFields {
43
- export { type WorkerChangeFieldListResponse as WorkerChangeFieldListResponse, type WorkerChangeFieldListResponsesPageCursorURL as WorkerChangeFieldListResponsesPageCursorURL, };
44
- }
45
- //# sourceMappingURL=worker-change-fields.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-change-fields.d.mts","sourceRoot":"","sources":["../src/resources/worker-change-fields.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,+BAA2B;AAChE,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;IACjD;;;;OAIG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,2CAA2C,EAAE,6BAA6B,CAAC;CAO3F;AAED,MAAM,MAAM,2CAA2C,GAAG,aAAa,CAAC,6BAA6B,CAAC,CAAC;AAEvG,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,QAAQ,EAAE,UAAU,GAAG,KAAK,GAAG,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,kBAAkB,CAAC;IAE3F;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;;;;;;;;;OAUG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;CACvG;AAED,MAAM,CAAC,OAAO,WAAW,kBAAkB,CAAC;IAC1C,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2CAA2C,IAAI,2CAA2C,GAChG,CAAC;CACH"}
@@ -1,45 +0,0 @@
1
- import { APIResource } from "../core/resource.js";
2
- import { PageCursorURL, PagePromise } from "../core/pagination.js";
3
- import { RequestOptions } from "../internal/request-options.js";
4
- /**
5
- * Historical changes to worker data over time
6
- */
7
- export declare class WorkerChangeFields extends APIResource {
8
- /**
9
- * A list of worker change fields.
10
- *
11
- * - Requires: `API Tier 2`
12
- */
13
- list(options?: RequestOptions): PagePromise<WorkerChangeFieldListResponsesPageCursorURL, WorkerChangeFieldListResponse>;
14
- }
15
- export type WorkerChangeFieldListResponsesPageCursorURL = PageCursorURL<WorkerChangeFieldListResponse>;
16
- export interface WorkerChangeFieldListResponse {
17
- /**
18
- * High-level grouping for the field.
19
- */
20
- category: 'PERSONAL' | 'JOB' | 'COMPENSATION' | 'BENEFITS' | 'CUSTOM' | 'COUNTRY_SPECIFIC';
21
- /**
22
- * UI label for the field (English).
23
- */
24
- field_display_name: string;
25
- /**
26
- * Field key in snake_case. Use directly in ?filter=field_key eq '...' on GET
27
- * /worker-changes. Naming convention: public DTO fields use the DTO field name
28
- * verbatim (work_email, title); nested fields use dot notation
29
- * (compensation.base_salary); custom fields use custom_fields.<custom_field_id>;
30
- * country-specific fields use the ISO country prefix (us.eeo.race). Filter
31
- * semantics: filtering GET /worker-changes by field_key returns events that
32
- * contain at least one change to this field, but the changes[] array on those
33
- * events is NOT pruned — consumers receive the full event payload including
34
- * changes to other fields.
35
- */
36
- field_key: string;
37
- /**
38
- * Value type of the field.
39
- */
40
- value_type: 'STRING' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'CURRENCY' | 'ENUM' | 'REFERENCE';
41
- }
42
- export declare namespace WorkerChangeFields {
43
- export { type WorkerChangeFieldListResponse as WorkerChangeFieldListResponse, type WorkerChangeFieldListResponsesPageCursorURL as WorkerChangeFieldListResponsesPageCursorURL, };
44
- }
45
- //# sourceMappingURL=worker-change-fields.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-change-fields.d.ts","sourceRoot":"","sources":["../src/resources/worker-change-fields.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,8BAA2B;AAChE,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;IACjD;;;;OAIG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,2CAA2C,EAAE,6BAA6B,CAAC;CAO3F;AAED,MAAM,MAAM,2CAA2C,GAAG,aAAa,CAAC,6BAA6B,CAAC,CAAC;AAEvG,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,QAAQ,EAAE,UAAU,GAAG,KAAK,GAAG,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,kBAAkB,CAAC;IAE3F;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;;;;;;;;;OAUG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;CACvG;AAED,MAAM,CAAC,OAAO,WAAW,kBAAkB,CAAC;IAC1C,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2CAA2C,IAAI,2CAA2C,GAChG,CAAC;CACH"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.WorkerChangeFields = void 0;
5
- const resource_1 = require("../core/resource.js");
6
- const pagination_1 = require("../core/pagination.js");
7
- /**
8
- * Historical changes to worker data over time
9
- */
10
- class WorkerChangeFields extends resource_1.APIResource {
11
- /**
12
- * A list of worker change fields.
13
- *
14
- * - Requires: `API Tier 2`
15
- */
16
- list(options) {
17
- return this._client.getAPIList('/worker-change-fields/', (pagination_1.PageCursorURL), options);
18
- }
19
- }
20
- exports.WorkerChangeFields = WorkerChangeFields;
21
- //# sourceMappingURL=worker-change-fields.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-change-fields.js","sourceRoot":"","sources":["../src/resources/worker-change-fields.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAC/C,sDAAgE;AAGhE;;GAEG;AACH,MAAa,kBAAmB,SAAQ,sBAAW;IACjD;;;;OAIG;IACH,IAAI,CACF,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,wBAAwB,EACxB,CAAA,0BAA4C,CAAA,EAC5C,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAfD,gDAeC"}
@@ -1,17 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
3
- import { PageCursorURL } from "../core/pagination.mjs";
4
- /**
5
- * Historical changes to worker data over time
6
- */
7
- export class WorkerChangeFields extends APIResource {
8
- /**
9
- * A list of worker change fields.
10
- *
11
- * - Requires: `API Tier 2`
12
- */
13
- list(options) {
14
- return this._client.getAPIList('/worker-change-fields/', (PageCursorURL), options);
15
- }
16
- }
17
- //# sourceMappingURL=worker-change-fields.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-change-fields.mjs","sourceRoot":"","sources":["../src/resources/worker-change-fields.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,aAAa,EAAe,+BAA2B;AAGhE;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IACjD;;;;OAIG;IACH,IAAI,CACF,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,wBAAwB,EACxB,CAAA,aAA4C,CAAA,EAC5C,OAAO,CACR,CAAC;IACJ,CAAC;CACF"}
@@ -1,267 +0,0 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import * as BusinessPartnersAPI from "./business-partners.mjs";
3
- import * as WorkersAPI from "./workers.mjs";
4
- import { APIPromise } from "../core/api-promise.mjs";
5
- import { PageCursorURL, PagePromise } from "../core/pagination.mjs";
6
- import { RequestOptions } from "../internal/request-options.mjs";
7
- /**
8
- * Historical changes to worker data over time
9
- */
10
- export declare class WorkerChanges extends APIResource {
11
- /**
12
- * A list of worker changes.
13
- *
14
- * - Requires: `API Tier 2`
15
- * - Filterable fields: `worker_id`, `applied_on`, `effective_on`, `changed_by_id`,
16
- * `reason_code`, `field_key`, `event_type`
17
- * - Expandable fields: `worker`, `changed_by`
18
- * - Sortable fields: `id`, `created_at`, `updated_at`, `applied_on`,
19
- * `effective_on`
20
- */
21
- list(query?: WorkerChangeListParams | null | undefined, options?: RequestOptions): PagePromise<WorkerChangeListResponsesPageCursorURL, WorkerChangeListResponse>;
22
- /**
23
- * Retrieve a specific worker change
24
- */
25
- retrieve(id: string, query?: WorkerChangeRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<WorkerChangeRetrieveResponse>;
26
- }
27
- export type WorkerChangeListResponsesPageCursorURL = PageCursorURL<WorkerChangeListResponse>;
28
- export interface WorkerChangeListResponse {
29
- /**
30
- * Identifier field
31
- */
32
- id: string;
33
- /**
34
- * When the change was persisted (approval time for changes that went through an
35
- * approval workflow). UTC. Monotonically increasing as new commits land; use as
36
- * the cursor axis for incremental polling.
37
- */
38
- applied_on: string;
39
- /**
40
- * Field-level changes captured by this event. Per-field REDACTED entries appear
41
- * for fields the caller cannot read so consumers can detect that a change occurred
42
- * even when the value is hidden. Events where every changed field is invisible to
43
- * the caller — either internal fields not exposed via the public Object Graph, or
44
- * fields the caller's role has zero read permission on — are dropped from the
45
- * response entirely (they never appear with an all-REDACTED changes array).
46
- */
47
- changes: Array<WorkerChangeListResponse.Change>;
48
- /**
49
- * Record creation date
50
- */
51
- created_at: string;
52
- /**
53
- * When the change is true in the business domain. Can be past, present, or future.
54
- * Independent of applied_on. UTC.
55
- */
56
- effective_on: string;
57
- /**
58
- * The lifecycle event type this change represents. CHANGE is the catch-all for
59
- * non-lifecycle field edits.
60
- */
61
- event_type: 'HIRE' | 'CHANGE' | 'SCHEDULED_CHANGE' | 'OFFBOARD' | 'SCHEDULED_OFFBOARD' | 'IMPORT' | 'UNDO' | 'EFFECTIVE_DATE_AMENDMENT';
62
- /**
63
- * Record update date
64
- */
65
- updated_at: string;
66
- /**
67
- * The worker affected by this change.
68
- */
69
- worker_id: string;
70
- /**
71
- * The actor as the current Worker DTO. Returned only when expand=changed_by is
72
- * requested.
73
- *
74
- * Expandable field
75
- */
76
- changed_by?: WorkersAPI.Worker;
77
- /**
78
- * Actor who made the change. Null for system-initiated events.
79
- */
80
- changed_by_id?: string;
81
- /**
82
- * INITIAL (census import at company onboarding) or HISTORICAL (historical data
83
- * imported later). Set only when event_type is IMPORT.
84
- */
85
- import_type?: 'INITIAL' | 'HISTORICAL';
86
- /**
87
- * Structured transition reason (e.g. 'PROMOTION', 'MARKET_ADJUSTMENT'). Populated
88
- * only when the company has configured transition reasons and the change went
89
- * through a role transition with one selected. Null for most companies and events.
90
- */
91
- reason_code?: string;
92
- /**
93
- * For amendments or undos, the id of the worker-change event being modified.
94
- */
95
- referenced_transaction_id?: string;
96
- /**
97
- * The affected worker as the current Worker DTO. Returned only when expand=worker
98
- * is requested. Includes terminated employees.
99
- *
100
- * Expandable field
101
- */
102
- worker?: WorkersAPI.Worker;
103
- }
104
- export declare namespace WorkerChangeListResponse {
105
- interface Change {
106
- /**
107
- * VISIBLE or REDACTED. REDACTED means the caller's role lacks permission to read
108
- * this field; from_value/to_value are null but the entry still appears so
109
- * consumers know a change occurred.
110
- */
111
- display_type: 'VISIBLE' | 'REDACTED';
112
- /**
113
- * UI label for the field (English).
114
- */
115
- field_display_name: string;
116
- /**
117
- * Field key in snake_case (see GET /worker-change-fields for the valid set).
118
- */
119
- field_key: string;
120
- /**
121
- * The underlying value type of this field. Populated regardless of display_type so
122
- * consumers can interpret from_value / to_value (or anticipate a future typed
123
- * representation) without a separate lookup against GET /worker-change-fields.
124
- */
125
- value_type: 'STRING' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'CURRENCY' | 'ENUM' | 'REFERENCE';
126
- /**
127
- * Value before the change, rendered as a display string (locale- and
128
- * currency-formatted per the activity-log convention). Null when display_type is
129
- * REDACTED. Typed JSON values are tracked as a future addition; consult value_type
130
- * to interpret the rendering.
131
- */
132
- from_value?: string;
133
- /**
134
- * Value after the change, rendered as a display string. Null when display_type is
135
- * REDACTED. See from_value for notes on typed-value plans.
136
- */
137
- to_value?: string;
138
- }
139
- }
140
- /**
141
- * Meta information for the response.
142
- */
143
- export interface WorkerChangeRetrieveResponse extends BusinessPartnersAPI.Meta {
144
- /**
145
- * Identifier field
146
- */
147
- id: string;
148
- /**
149
- * When the change was persisted (approval time for changes that went through an
150
- * approval workflow). UTC. Monotonically increasing as new commits land; use as
151
- * the cursor axis for incremental polling.
152
- */
153
- applied_on: string;
154
- /**
155
- * Field-level changes captured by this event. Per-field REDACTED entries appear
156
- * for fields the caller cannot read so consumers can detect that a change occurred
157
- * even when the value is hidden. Events where every changed field is invisible to
158
- * the caller — either internal fields not exposed via the public Object Graph, or
159
- * fields the caller's role has zero read permission on — are dropped from the
160
- * response entirely (they never appear with an all-REDACTED changes array).
161
- */
162
- changes: Array<WorkerChangeRetrieveResponse.Change>;
163
- /**
164
- * Record creation date
165
- */
166
- created_at: string;
167
- /**
168
- * When the change is true in the business domain. Can be past, present, or future.
169
- * Independent of applied_on. UTC.
170
- */
171
- effective_on: string;
172
- /**
173
- * The lifecycle event type this change represents. CHANGE is the catch-all for
174
- * non-lifecycle field edits.
175
- */
176
- event_type: 'HIRE' | 'CHANGE' | 'SCHEDULED_CHANGE' | 'OFFBOARD' | 'SCHEDULED_OFFBOARD' | 'IMPORT' | 'UNDO' | 'EFFECTIVE_DATE_AMENDMENT';
177
- /**
178
- * Record update date
179
- */
180
- updated_at: string;
181
- /**
182
- * The worker affected by this change.
183
- */
184
- worker_id: string;
185
- /**
186
- * The actor as the current Worker DTO. Returned only when expand=changed_by is
187
- * requested.
188
- *
189
- * Expandable field
190
- */
191
- changed_by?: WorkersAPI.Worker;
192
- /**
193
- * Actor who made the change. Null for system-initiated events.
194
- */
195
- changed_by_id?: string;
196
- /**
197
- * INITIAL (census import at company onboarding) or HISTORICAL (historical data
198
- * imported later). Set only when event_type is IMPORT.
199
- */
200
- import_type?: 'INITIAL' | 'HISTORICAL';
201
- /**
202
- * Structured transition reason (e.g. 'PROMOTION', 'MARKET_ADJUSTMENT'). Populated
203
- * only when the company has configured transition reasons and the change went
204
- * through a role transition with one selected. Null for most companies and events.
205
- */
206
- reason_code?: string;
207
- /**
208
- * For amendments or undos, the id of the worker-change event being modified.
209
- */
210
- referenced_transaction_id?: string;
211
- /**
212
- * The affected worker as the current Worker DTO. Returned only when expand=worker
213
- * is requested. Includes terminated employees.
214
- *
215
- * Expandable field
216
- */
217
- worker?: WorkersAPI.Worker;
218
- }
219
- export declare namespace WorkerChangeRetrieveResponse {
220
- interface Change {
221
- /**
222
- * VISIBLE or REDACTED. REDACTED means the caller's role lacks permission to read
223
- * this field; from_value/to_value are null but the entry still appears so
224
- * consumers know a change occurred.
225
- */
226
- display_type: 'VISIBLE' | 'REDACTED';
227
- /**
228
- * UI label for the field (English).
229
- */
230
- field_display_name: string;
231
- /**
232
- * Field key in snake_case (see GET /worker-change-fields for the valid set).
233
- */
234
- field_key: string;
235
- /**
236
- * The underlying value type of this field. Populated regardless of display_type so
237
- * consumers can interpret from_value / to_value (or anticipate a future typed
238
- * representation) without a separate lookup against GET /worker-change-fields.
239
- */
240
- value_type: 'STRING' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'CURRENCY' | 'ENUM' | 'REFERENCE';
241
- /**
242
- * Value before the change, rendered as a display string (locale- and
243
- * currency-formatted per the activity-log convention). Null when display_type is
244
- * REDACTED. Typed JSON values are tracked as a future addition; consult value_type
245
- * to interpret the rendering.
246
- */
247
- from_value?: string;
248
- /**
249
- * Value after the change, rendered as a display string. Null when display_type is
250
- * REDACTED. See from_value for notes on typed-value plans.
251
- */
252
- to_value?: string;
253
- }
254
- }
255
- export interface WorkerChangeListParams {
256
- cursor?: string;
257
- expand?: string;
258
- filter?: string;
259
- order_by?: string;
260
- }
261
- export interface WorkerChangeRetrieveParams {
262
- expand?: string;
263
- }
264
- export declare namespace WorkerChanges {
265
- export { type WorkerChangeListResponse as WorkerChangeListResponse, type WorkerChangeRetrieveResponse as WorkerChangeRetrieveResponse, type WorkerChangeListResponsesPageCursorURL as WorkerChangeListResponsesPageCursorURL, type WorkerChangeListParams as WorkerChangeListParams, type WorkerChangeRetrieveParams as WorkerChangeRetrieveParams, };
266
- }
267
- //# sourceMappingURL=worker-changes.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker-changes.d.mts","sourceRoot":"","sources":["../src/resources/worker-changes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AA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