@rippling/rippling-sdk 0.2.0-alpha.73 → 0.2.0-alpha.74

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 (43) hide show
  1. package/client.d.mts +12 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +12 -0
  4. package/client.d.ts.map +1 -1
  5. package/client.js +12 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +12 -0
  8. package/client.mjs.map +1 -1
  9. package/examples/manifest/dental-practice-management/dental-practice-management.ts +1 -1
  10. package/package.json +1 -1
  11. package/resources/index.d.mts +2 -0
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +2 -0
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +5 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +2 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/worker-change-fields.d.mts +44 -0
  20. package/resources/worker-change-fields.d.mts.map +1 -0
  21. package/resources/worker-change-fields.d.ts +44 -0
  22. package/resources/worker-change-fields.d.ts.map +1 -0
  23. package/resources/worker-change-fields.js +21 -0
  24. package/resources/worker-change-fields.js.map +1 -0
  25. package/resources/worker-change-fields.mjs +17 -0
  26. package/resources/worker-change-fields.mjs.map +1 -0
  27. package/resources/worker-changes.d.mts +267 -0
  28. package/resources/worker-changes.d.mts.map +1 -0
  29. package/resources/worker-changes.d.ts +267 -0
  30. package/resources/worker-changes.d.ts.map +1 -0
  31. package/resources/worker-changes.js +36 -0
  32. package/resources/worker-changes.js.map +1 -0
  33. package/resources/worker-changes.mjs +32 -0
  34. package/resources/worker-changes.mjs.map +1 -0
  35. package/src/client.ts +38 -0
  36. package/src/resources/index.ts +13 -0
  37. package/src/resources/worker-change-fields.ts +63 -0
  38. package/src/resources/worker-changes.ts +354 -0
  39. package/src/version.ts +1 -1
  40. package/version.d.mts +1 -1
  41. package/version.d.ts +1 -1
  42. package/version.js +1 -1
  43. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -515,6 +515,19 @@ import {
515
515
  WorkLocations,
516
516
  WorkLocationsPageCursorURL,
517
517
  } from './resources/work-locations';
518
+ import {
519
+ WorkerChangeFieldListResponse,
520
+ WorkerChangeFieldListResponsesPageCursorURL,
521
+ WorkerChangeFields,
522
+ } from './resources/worker-change-fields';
523
+ import {
524
+ WorkerChangeListParams,
525
+ WorkerChangeListResponse,
526
+ WorkerChangeListResponsesPageCursorURL,
527
+ WorkerChangeRetrieveParams,
528
+ WorkerChangeRetrieveResponse,
529
+ WorkerChanges,
530
+ } from './resources/worker-changes';
518
531
  import {
519
532
  WorkerTimeSplitCreateParams,
520
533
  WorkerTimeSplitCreateResponse,
@@ -1576,6 +1589,14 @@ export class RipplingSDK {
1576
1589
  * Unassigned shifts that are part of a schedule
1577
1590
  */
1578
1591
  unassignedshifts: API.Unassignedshifts = new API.Unassignedshifts(this);
1592
+ /**
1593
+ * Historical changes to worker data over time
1594
+ */
1595
+ workerChanges: API.WorkerChanges = new API.WorkerChanges(this);
1596
+ /**
1597
+ * Historical changes to worker data over time
1598
+ */
1599
+ workerChangeFields: API.WorkerChangeFields = new API.WorkerChangeFields(this);
1579
1600
  /**
1580
1601
  * Job related information for the company
1581
1602
  */
@@ -1661,6 +1682,8 @@ RipplingSDK.Shiftassignments = Shiftassignments;
1661
1682
  RipplingSDK.SoftwareDeployments = SoftwareDeployments;
1662
1683
  RipplingSDK.Titles = Titles;
1663
1684
  RipplingSDK.Unassignedshifts = Unassignedshifts;
1685
+ RipplingSDK.WorkerChanges = WorkerChanges;
1686
+ RipplingSDK.WorkerChangeFields = WorkerChangeFields;
1664
1687
  RipplingSDK.WorkerTimeSplits = WorkerTimeSplits;
1665
1688
  RipplingSDK.WorkflowActionExecutions = WorkflowActionExecutions;
1666
1689
  RipplingSDK.ShiftAssignments = ShiftAssignments;
@@ -2283,6 +2306,21 @@ export declare namespace RipplingSDK {
2283
2306
  type UnassignedshiftUpdateParams as UnassignedshiftUpdateParams,
2284
2307
  };
2285
2308
 
2309
+ export {
2310
+ WorkerChanges as WorkerChanges,
2311
+ type WorkerChangeListResponse as WorkerChangeListResponse,
2312
+ type WorkerChangeRetrieveResponse as WorkerChangeRetrieveResponse,
2313
+ type WorkerChangeListResponsesPageCursorURL as WorkerChangeListResponsesPageCursorURL,
2314
+ type WorkerChangeListParams as WorkerChangeListParams,
2315
+ type WorkerChangeRetrieveParams as WorkerChangeRetrieveParams,
2316
+ };
2317
+
2318
+ export {
2319
+ WorkerChangeFields as WorkerChangeFields,
2320
+ type WorkerChangeFieldListResponse as WorkerChangeFieldListResponse,
2321
+ type WorkerChangeFieldListResponsesPageCursorURL as WorkerChangeFieldListResponsesPageCursorURL,
2322
+ };
2323
+
2286
2324
  export {
2287
2325
  WorkerTimeSplits as WorkerTimeSplits,
2288
2326
  type WorkerTimeSplitListResponse as WorkerTimeSplitListResponse,
@@ -535,6 +535,19 @@ 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';
538
551
  export {
539
552
  WorkerTimeSplits,
540
553
  type WorkerTimeSplitListResponse,
@@ -0,0 +1,63 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { PageCursorURL, PagePromise } from '../core/pagination';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ /**
8
+ * Historical changes to worker data over time
9
+ */
10
+ export class WorkerChangeFields extends APIResource {
11
+ /**
12
+ * A list of worker change fields.
13
+ *
14
+ * - Requires: `Worker Changes API`
15
+ */
16
+ list(
17
+ options?: RequestOptions,
18
+ ): PagePromise<WorkerChangeFieldListResponsesPageCursorURL, WorkerChangeFieldListResponse> {
19
+ return this._client.getAPIList(
20
+ '/worker-change-fields/',
21
+ PageCursorURL<WorkerChangeFieldListResponse>,
22
+ options,
23
+ );
24
+ }
25
+ }
26
+
27
+ export type WorkerChangeFieldListResponsesPageCursorURL = PageCursorURL<WorkerChangeFieldListResponse>;
28
+
29
+ export interface WorkerChangeFieldListResponse {
30
+ /**
31
+ * High-level grouping for the field.
32
+ */
33
+ category: 'PERSONAL' | 'JOB' | 'COMPENSATION' | 'BENEFITS' | 'CUSTOM' | 'COUNTRY_SPECIFIC';
34
+
35
+ /**
36
+ * UI label for the field (English).
37
+ */
38
+ field_display_name: string;
39
+
40
+ /**
41
+ * Field key in snake_case. Use directly in ?filter=field_key eq '...' on GET
42
+ * /worker-changes. Naming convention: public DTO fields use the DTO field name
43
+ * verbatim (work_email, title); nested fields use dot notation
44
+ * (compensation.base_salary); custom fields use custom_fields.<custom_field_id>;
45
+ * country-specific fields use country_fields.<field_name>. Filter semantics:
46
+ * filtering GET /worker-changes by field_key returns events that contain at least
47
+ * one change to this field, but the changes[] array on those events is NOT pruned
48
+ * — consumers receive the full event payload including changes to other fields.
49
+ */
50
+ field_key: string;
51
+
52
+ /**
53
+ * Value type of the field.
54
+ */
55
+ value_type: 'STRING' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'CURRENCY' | 'ENUM' | 'REFERENCE';
56
+ }
57
+
58
+ export declare namespace WorkerChangeFields {
59
+ export {
60
+ type WorkerChangeFieldListResponse as WorkerChangeFieldListResponse,
61
+ type WorkerChangeFieldListResponsesPageCursorURL as WorkerChangeFieldListResponsesPageCursorURL,
62
+ };
63
+ }
@@ -0,0 +1,354 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import * as BusinessPartnersAPI from './business-partners';
5
+ import * as WorkersAPI from './workers';
6
+ import { APIPromise } from '../core/api-promise';
7
+ import { PageCursorURL, PagePromise } from '../core/pagination';
8
+ import { RequestOptions } from '../internal/request-options';
9
+ import { path } from '../internal/utils/path';
10
+
11
+ /**
12
+ * Historical changes to worker data over time
13
+ */
14
+ export class WorkerChanges extends APIResource {
15
+ /**
16
+ * A list of worker changes.
17
+ *
18
+ * - Requires: `Worker Changes API`
19
+ * - Filterable fields: `worker_id`, `applied_on`, `effective_on`, `changed_by_id`,
20
+ * `reason_code`, `field_key`, `event_type`
21
+ * - Expandable fields: `worker`, `changed_by`
22
+ * - Sortable fields: `id`, `created_at`, `updated_at`, `applied_on`,
23
+ * `effective_on`
24
+ */
25
+ list(
26
+ query: WorkerChangeListParams | null | undefined = {},
27
+ options?: RequestOptions,
28
+ ): PagePromise<WorkerChangeListResponsesPageCursorURL, WorkerChangeListResponse> {
29
+ return this._client.getAPIList('/worker-changes/', PageCursorURL<WorkerChangeListResponse>, {
30
+ query,
31
+ ...options,
32
+ });
33
+ }
34
+
35
+ /**
36
+ * Retrieve a specific worker change
37
+ */
38
+ retrieve(
39
+ id: string,
40
+ query: WorkerChangeRetrieveParams | null | undefined = {},
41
+ options?: RequestOptions,
42
+ ): APIPromise<WorkerChangeRetrieveResponse> {
43
+ return this._client.get(path`/worker-changes/${id}/`, { query, ...options });
44
+ }
45
+ }
46
+
47
+ export type WorkerChangeListResponsesPageCursorURL = PageCursorURL<WorkerChangeListResponse>;
48
+
49
+ export interface WorkerChangeListResponse {
50
+ /**
51
+ * Identifier field
52
+ */
53
+ id: string;
54
+
55
+ /**
56
+ * When the change was persisted (approval time for changes that went through an
57
+ * approval workflow). UTC. Monotonically increasing as new commits land; use as
58
+ * the cursor axis for incremental polling.
59
+ */
60
+ applied_on: string;
61
+
62
+ /**
63
+ * Field-level changes captured by this event. Per-field REDACTED entries appear
64
+ * for fields the caller cannot read so consumers can detect that a change occurred
65
+ * even when the value is hidden. Events where every changed field is invisible to
66
+ * the caller — either internal fields not exposed via the public Object Graph, or
67
+ * fields the caller's role has zero read permission on — are dropped from the
68
+ * response entirely (they never appear with an all-REDACTED changes array).
69
+ */
70
+ changes: Array<WorkerChangeListResponse.Change>;
71
+
72
+ /**
73
+ * Record creation date
74
+ */
75
+ created_at: string;
76
+
77
+ /**
78
+ * When the change is true in the business domain. Can be past, present, or future.
79
+ * Independent of applied_on. UTC.
80
+ */
81
+ effective_on: string;
82
+
83
+ /**
84
+ * The lifecycle event type this change represents. CHANGE is the catch-all for
85
+ * non-lifecycle field edits.
86
+ */
87
+ event_type:
88
+ | 'HIRE'
89
+ | 'CHANGE'
90
+ | 'SCHEDULED_CHANGE'
91
+ | 'OFFBOARD'
92
+ | 'SCHEDULED_OFFBOARD'
93
+ | 'IMPORT'
94
+ | 'UNDO'
95
+ | 'EFFECTIVE_DATE_AMENDMENT';
96
+
97
+ /**
98
+ * Record update date
99
+ */
100
+ updated_at: string;
101
+
102
+ /**
103
+ * The worker affected by this change.
104
+ */
105
+ worker_id: string;
106
+
107
+ /**
108
+ * The actor as the current Worker DTO. Returned only when expand=changed_by is
109
+ * requested.
110
+ *
111
+ * Expandable field
112
+ */
113
+ changed_by?: WorkersAPI.Worker;
114
+
115
+ /**
116
+ * Actor who made the change. Null for system-initiated events.
117
+ */
118
+ changed_by_id?: string;
119
+
120
+ /**
121
+ * INITIAL (census import at company onboarding) or HISTORICAL (historical data
122
+ * imported later). Set only when event_type is IMPORT.
123
+ */
124
+ import_type?: 'INITIAL' | 'HISTORICAL';
125
+
126
+ /**
127
+ * Structured transition reason (e.g. 'PROMOTION', 'MARKET_ADJUSTMENT'). Populated
128
+ * only when the company has configured transition reasons and the change went
129
+ * through a role transition with one selected. Null for most companies and events.
130
+ */
131
+ reason_code?: string;
132
+
133
+ /**
134
+ * For amendments or undos, the id of the worker-change event being modified.
135
+ */
136
+ referenced_transaction_id?: string;
137
+
138
+ /**
139
+ * The affected worker as the current Worker DTO. Returned only when expand=worker
140
+ * is requested. Includes terminated employees.
141
+ *
142
+ * Expandable field
143
+ */
144
+ worker?: WorkersAPI.Worker;
145
+ }
146
+
147
+ export namespace WorkerChangeListResponse {
148
+ export interface Change {
149
+ /**
150
+ * VISIBLE or REDACTED. REDACTED means the caller's role lacks permission to read
151
+ * this field; from_value/to_value are null but the entry still appears so
152
+ * consumers know a change occurred.
153
+ */
154
+ display_type: 'VISIBLE' | 'REDACTED';
155
+
156
+ /**
157
+ * UI label for the field (English).
158
+ */
159
+ field_display_name: string;
160
+
161
+ /**
162
+ * Field key in snake_case.
163
+ */
164
+ field_key: string;
165
+
166
+ /**
167
+ * The underlying value type of this field. Populated regardless of display_type so
168
+ * consumers can interpret from_value / to_value or anticipate a future typed
169
+ * representation.
170
+ */
171
+ value_type: 'STRING' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'CURRENCY' | 'ENUM' | 'REFERENCE';
172
+
173
+ /**
174
+ * Value before the change, rendered as a display string (locale- and
175
+ * currency-formatted per the activity-log convention). Null when display_type is
176
+ * REDACTED. Typed JSON values are tracked as a future addition; consult value_type
177
+ * to interpret the rendering.
178
+ */
179
+ from_value?: string;
180
+
181
+ /**
182
+ * Value after the change, rendered as a display string. Null when display_type is
183
+ * REDACTED. See from_value for notes on typed-value plans.
184
+ */
185
+ to_value?: string;
186
+ }
187
+ }
188
+
189
+ /**
190
+ * Meta information for the response.
191
+ */
192
+ export interface WorkerChangeRetrieveResponse extends BusinessPartnersAPI.Meta {
193
+ /**
194
+ * Identifier field
195
+ */
196
+ id: string;
197
+
198
+ /**
199
+ * When the change was persisted (approval time for changes that went through an
200
+ * approval workflow). UTC. Monotonically increasing as new commits land; use as
201
+ * the cursor axis for incremental polling.
202
+ */
203
+ applied_on: string;
204
+
205
+ /**
206
+ * Field-level changes captured by this event. Per-field REDACTED entries appear
207
+ * for fields the caller cannot read so consumers can detect that a change occurred
208
+ * even when the value is hidden. Events where every changed field is invisible to
209
+ * the caller — either internal fields not exposed via the public Object Graph, or
210
+ * fields the caller's role has zero read permission on — are dropped from the
211
+ * response entirely (they never appear with an all-REDACTED changes array).
212
+ */
213
+ changes: Array<WorkerChangeRetrieveResponse.Change>;
214
+
215
+ /**
216
+ * Record creation date
217
+ */
218
+ created_at: string;
219
+
220
+ /**
221
+ * When the change is true in the business domain. Can be past, present, or future.
222
+ * Independent of applied_on. UTC.
223
+ */
224
+ effective_on: string;
225
+
226
+ /**
227
+ * The lifecycle event type this change represents. CHANGE is the catch-all for
228
+ * non-lifecycle field edits.
229
+ */
230
+ event_type:
231
+ | 'HIRE'
232
+ | 'CHANGE'
233
+ | 'SCHEDULED_CHANGE'
234
+ | 'OFFBOARD'
235
+ | 'SCHEDULED_OFFBOARD'
236
+ | 'IMPORT'
237
+ | 'UNDO'
238
+ | 'EFFECTIVE_DATE_AMENDMENT';
239
+
240
+ /**
241
+ * Record update date
242
+ */
243
+ updated_at: string;
244
+
245
+ /**
246
+ * The worker affected by this change.
247
+ */
248
+ worker_id: string;
249
+
250
+ /**
251
+ * The actor as the current Worker DTO. Returned only when expand=changed_by is
252
+ * requested.
253
+ *
254
+ * Expandable field
255
+ */
256
+ changed_by?: WorkersAPI.Worker;
257
+
258
+ /**
259
+ * Actor who made the change. Null for system-initiated events.
260
+ */
261
+ changed_by_id?: string;
262
+
263
+ /**
264
+ * INITIAL (census import at company onboarding) or HISTORICAL (historical data
265
+ * imported later). Set only when event_type is IMPORT.
266
+ */
267
+ import_type?: 'INITIAL' | 'HISTORICAL';
268
+
269
+ /**
270
+ * Structured transition reason (e.g. 'PROMOTION', 'MARKET_ADJUSTMENT'). Populated
271
+ * only when the company has configured transition reasons and the change went
272
+ * through a role transition with one selected. Null for most companies and events.
273
+ */
274
+ reason_code?: string;
275
+
276
+ /**
277
+ * For amendments or undos, the id of the worker-change event being modified.
278
+ */
279
+ referenced_transaction_id?: string;
280
+
281
+ /**
282
+ * The affected worker as the current Worker DTO. Returned only when expand=worker
283
+ * is requested. Includes terminated employees.
284
+ *
285
+ * Expandable field
286
+ */
287
+ worker?: WorkersAPI.Worker;
288
+ }
289
+
290
+ export namespace WorkerChangeRetrieveResponse {
291
+ export interface Change {
292
+ /**
293
+ * VISIBLE or REDACTED. REDACTED means the caller's role lacks permission to read
294
+ * this field; from_value/to_value are null but the entry still appears so
295
+ * consumers know a change occurred.
296
+ */
297
+ display_type: 'VISIBLE' | 'REDACTED';
298
+
299
+ /**
300
+ * UI label for the field (English).
301
+ */
302
+ field_display_name: string;
303
+
304
+ /**
305
+ * Field key in snake_case.
306
+ */
307
+ field_key: string;
308
+
309
+ /**
310
+ * The underlying value type of this field. Populated regardless of display_type so
311
+ * consumers can interpret from_value / to_value or anticipate a future typed
312
+ * representation.
313
+ */
314
+ value_type: 'STRING' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'CURRENCY' | 'ENUM' | 'REFERENCE';
315
+
316
+ /**
317
+ * Value before the change, rendered as a display string (locale- and
318
+ * currency-formatted per the activity-log convention). Null when display_type is
319
+ * REDACTED. Typed JSON values are tracked as a future addition; consult value_type
320
+ * to interpret the rendering.
321
+ */
322
+ from_value?: string;
323
+
324
+ /**
325
+ * Value after the change, rendered as a display string. Null when display_type is
326
+ * REDACTED. See from_value for notes on typed-value plans.
327
+ */
328
+ to_value?: string;
329
+ }
330
+ }
331
+
332
+ export interface WorkerChangeListParams {
333
+ cursor?: string;
334
+
335
+ expand?: string;
336
+
337
+ filter?: string;
338
+
339
+ order_by?: string;
340
+ }
341
+
342
+ export interface WorkerChangeRetrieveParams {
343
+ expand?: string;
344
+ }
345
+
346
+ export declare namespace WorkerChanges {
347
+ export {
348
+ type WorkerChangeListResponse as WorkerChangeListResponse,
349
+ type WorkerChangeRetrieveResponse as WorkerChangeRetrieveResponse,
350
+ type WorkerChangeListResponsesPageCursorURL as WorkerChangeListResponsesPageCursorURL,
351
+ type WorkerChangeListParams as WorkerChangeListParams,
352
+ type WorkerChangeRetrieveParams as WorkerChangeRetrieveParams,
353
+ };
354
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.2.0-alpha.73'; // x-release-please-version
1
+ export const VERSION = '0.2.0-alpha.74'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.2.0-alpha.73";
1
+ export declare const VERSION = "0.2.0-alpha.74";
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.73";
1
+ export declare const VERSION = "0.2.0-alpha.74";
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.73'; // x-release-please-version
4
+ exports.VERSION = '0.2.0-alpha.74'; // 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.73'; // x-release-please-version
1
+ export const VERSION = '0.2.0-alpha.74'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map