@rippling/rippling-sdk 0.2.0-alpha.56 → 0.2.0-alpha.57

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 (61) hide show
  1. package/client.d.mts +18 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +18 -0
  4. package/client.d.ts.map +1 -1
  5. package/client.js +18 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +18 -0
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/employee-documents.d.mts +115 -0
  11. package/resources/employee-documents.d.mts.map +1 -0
  12. package/resources/employee-documents.d.ts +115 -0
  13. package/resources/employee-documents.d.ts.map +1 -0
  14. package/resources/employee-documents.js +18 -0
  15. package/resources/employee-documents.js.map +1 -0
  16. package/resources/employee-documents.mjs +14 -0
  17. package/resources/employee-documents.mjs.map +1 -0
  18. package/resources/index.d.mts +3 -0
  19. package/resources/index.d.mts.map +1 -1
  20. package/resources/index.d.ts +3 -0
  21. package/resources/index.d.ts.map +1 -1
  22. package/resources/index.js +8 -2
  23. package/resources/index.js.map +1 -1
  24. package/resources/index.mjs +3 -0
  25. package/resources/index.mjs.map +1 -1
  26. package/resources/job-assignments.d.mts +18 -0
  27. package/resources/job-assignments.d.mts.map +1 -1
  28. package/resources/job-assignments.d.ts +18 -0
  29. package/resources/job-assignments.d.ts.map +1 -1
  30. package/resources/worker-change-fields.d.mts +45 -0
  31. package/resources/worker-change-fields.d.mts.map +1 -0
  32. package/resources/worker-change-fields.d.ts +45 -0
  33. package/resources/worker-change-fields.d.ts.map +1 -0
  34. package/resources/worker-change-fields.js +21 -0
  35. package/resources/worker-change-fields.js.map +1 -0
  36. package/resources/worker-change-fields.mjs +17 -0
  37. package/resources/worker-change-fields.mjs.map +1 -0
  38. package/resources/worker-changes.d.mts +267 -0
  39. package/resources/worker-changes.d.mts.map +1 -0
  40. package/resources/worker-changes.d.ts +267 -0
  41. package/resources/worker-changes.d.ts.map +1 -0
  42. package/resources/worker-changes.js +36 -0
  43. package/resources/worker-changes.js.map +1 -0
  44. package/resources/worker-changes.mjs +32 -0
  45. package/resources/worker-changes.mjs.map +1 -0
  46. package/resources/workflow-action-executions.d.mts +18 -3
  47. package/resources/workflow-action-executions.d.mts.map +1 -1
  48. package/resources/workflow-action-executions.d.ts +18 -3
  49. package/resources/workflow-action-executions.d.ts.map +1 -1
  50. package/src/client.ts +54 -0
  51. package/src/resources/employee-documents.ts +141 -0
  52. package/src/resources/index.ts +18 -0
  53. package/src/resources/job-assignments.ts +22 -0
  54. package/src/resources/worker-change-fields.ts +64 -0
  55. package/src/resources/worker-changes.ts +354 -0
  56. package/src/resources/workflow-action-executions.ts +18 -3
  57. package/src/version.ts +1 -1
  58. package/version.d.mts +1 -1
  59. package/version.d.ts +1 -1
  60. package/version.js +1 -1
  61. package/version.mjs +1 -1
@@ -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: `API Tier 2`
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 (see GET /worker-change-fields for the valid set).
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) without a separate lookup against GET /worker-change-fields.
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 (see GET /worker-change-fields for the valid set).
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) without a separate lookup against GET /worker-change-fields.
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
+ }
@@ -462,7 +462,12 @@ export declare namespace WorkflowActionExecutionCreateParams {
462
462
  action_type: 'evaluate_rql';
463
463
 
464
464
  /**
465
- * Query and retrieve specific records from Rippling
465
+ * Query and retrieve records from Rippling. Pick a Query mode: Basic (SELECTION)
466
+ * returns matching record IDs for a chosen Rippling model via a wizard-built
467
+ * filter; Advanced (QUERY) evaluates a free-form RQL formula and returns a value
468
+ * of any RQL type (scalar or list). Always express filtering inside this action
469
+ * (via the SELECTION filter wizard or the QUERY formula) — do not fetch records
470
+ * and filter in code downstream.
466
471
  */
467
472
  payload:
468
473
  | EvaluateRqlActionRequest.EvaluateRqlSelectionPayload
@@ -473,7 +478,12 @@ export declare namespace WorkflowActionExecutionCreateParams {
473
478
 
474
479
  export namespace EvaluateRqlActionRequest {
475
480
  /**
476
- * Query and retrieve specific records from Rippling
481
+ * Query and retrieve records from Rippling. Pick a Query mode: Basic (SELECTION)
482
+ * returns matching record IDs for a chosen Rippling model via a wizard-built
483
+ * filter; Advanced (QUERY) evaluates a free-form RQL formula and returns a value
484
+ * of any RQL type (scalar or list). Always express filtering inside this action
485
+ * (via the SELECTION filter wizard or the QUERY formula) — do not fetch records
486
+ * and filter in code downstream.
477
487
  */
478
488
  export interface EvaluateRqlSelectionPayload {
479
489
  queryType: 'SELECTION';
@@ -482,7 +492,12 @@ export declare namespace WorkflowActionExecutionCreateParams {
482
492
  }
483
493
 
484
494
  /**
485
- * Query and retrieve specific records from Rippling
495
+ * Query and retrieve records from Rippling. Pick a Query mode: Basic (SELECTION)
496
+ * returns matching record IDs for a chosen Rippling model via a wizard-built
497
+ * filter; Advanced (QUERY) evaluates a free-form RQL formula and returns a value
498
+ * of any RQL type (scalar or list). Always express filtering inside this action
499
+ * (via the SELECTION filter wizard or the QUERY formula) — do not fetch records
500
+ * and filter in code downstream.
486
501
  */
487
502
  export interface EvaluateRqlQueryPayload {
488
503
  queryType: 'QUERY';
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.2.0-alpha.56'; // x-release-please-version
1
+ export const VERSION = '0.2.0-alpha.57'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.2.0-alpha.56";
1
+ export declare const VERSION = "0.2.0-alpha.57";
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.56";
1
+ export declare const VERSION = "0.2.0-alpha.57";
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.56'; // x-release-please-version
4
+ exports.VERSION = '0.2.0-alpha.57'; // 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.56'; // x-release-please-version
1
+ export const VERSION = '0.2.0-alpha.57'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map