@rippling/rippling-sdk 0.2.0-alpha.73 → 0.2.0-alpha.75
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.
- package/client.d.mts +12 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -0
- package/client.d.ts.map +1 -1
- package/client.js +12 -0
- package/client.js.map +1 -1
- package/client.mjs +12 -0
- package/client.mjs.map +1 -1
- package/examples/manifest/dental-practice-management/dental-practice-management.ts +10 -4
- package/lib/manifest/custom-object-action.d.mts +39 -0
- package/lib/manifest/custom-object-action.d.mts.map +1 -0
- package/lib/manifest/custom-object-action.d.ts +39 -0
- package/lib/manifest/custom-object-action.d.ts.map +1 -0
- package/lib/manifest/custom-object-action.js +55 -0
- package/lib/manifest/custom-object-action.js.map +1 -0
- package/lib/manifest/custom-object-action.mjs +51 -0
- package/lib/manifest/custom-object-action.mjs.map +1 -0
- package/lib/manifest/custom-object-page-layout.d.mts +1 -4
- package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
- package/lib/manifest/custom-object-page-layout.d.ts +1 -4
- package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
- package/lib/manifest/custom-object-page-layout.js +1 -5
- package/lib/manifest/custom-object-page-layout.js.map +1 -1
- package/lib/manifest/custom-object-page-layout.mjs +1 -5
- package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
- package/lib/manifest/existing-manifest-context.d.mts +3 -0
- package/lib/manifest/existing-manifest-context.d.mts.map +1 -1
- package/lib/manifest/existing-manifest-context.d.ts +3 -0
- package/lib/manifest/existing-manifest-context.d.ts.map +1 -1
- package/lib/manifest/existing-manifest-context.js +16 -0
- package/lib/manifest/existing-manifest-context.js.map +1 -1
- package/lib/manifest/existing-manifest-context.mjs +16 -0
- package/lib/manifest/existing-manifest-context.mjs.map +1 -1
- package/lib/manifest/index.d.mts +1 -0
- package/lib/manifest/index.d.mts.map +1 -1
- package/lib/manifest/index.d.ts +1 -0
- package/lib/manifest/index.d.ts.map +1 -1
- package/lib/manifest/index.js +3 -1
- package/lib/manifest/index.js.map +1 -1
- package/lib/manifest/index.mjs +1 -0
- package/lib/manifest/index.mjs.map +1 -1
- package/lib/manifest/manifest-builder.d.mts +1 -1
- package/lib/manifest/manifest-builder.d.mts.map +1 -1
- package/lib/manifest/manifest-builder.d.ts +1 -1
- package/lib/manifest/manifest-builder.d.ts.map +1 -1
- package/lib/manifest/manifest-builder.js.map +1 -1
- package/lib/manifest/manifest-builder.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/worker-change-fields.d.mts +44 -0
- package/resources/worker-change-fields.d.mts.map +1 -0
- package/resources/worker-change-fields.d.ts +44 -0
- package/resources/worker-change-fields.d.ts.map +1 -0
- package/resources/worker-change-fields.js +21 -0
- package/resources/worker-change-fields.js.map +1 -0
- package/resources/worker-change-fields.mjs +17 -0
- package/resources/worker-change-fields.mjs.map +1 -0
- package/resources/worker-changes.d.mts +267 -0
- package/resources/worker-changes.d.mts.map +1 -0
- package/resources/worker-changes.d.ts +267 -0
- package/resources/worker-changes.d.ts.map +1 -0
- package/resources/worker-changes.js +36 -0
- package/resources/worker-changes.js.map +1 -0
- package/resources/worker-changes.mjs +32 -0
- package/resources/worker-changes.mjs.map +1 -0
- package/src/client.ts +38 -0
- package/src/lib/manifest/custom-object-action.ts +100 -0
- package/src/lib/manifest/custom-object-page-layout.ts +3 -11
- package/src/lib/manifest/existing-manifest-context.ts +31 -0
- package/src/lib/manifest/index.ts +8 -0
- package/src/lib/manifest/manifest-builder.ts +1 -0
- package/src/resources/index.ts +13 -0
- package/src/resources/worker-change-fields.ts +63 -0
- package/src/resources/worker-changes.ts +354 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as BusinessPartnersAPI from "./business-partners.js";
|
|
3
|
+
import * as WorkersAPI from "./workers.js";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
5
|
+
import { PageCursorURL, PagePromise } from "../core/pagination.js";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
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: `Worker Changes API`
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-changes.d.ts","sourceRoot":"","sources":["../src/resources/worker-changes.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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.WorkerChanges = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Historical changes to worker data over time
|
|
10
|
+
*/
|
|
11
|
+
class WorkerChanges extends resource_1.APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* A list of worker changes.
|
|
14
|
+
*
|
|
15
|
+
* - Requires: `Worker Changes API`
|
|
16
|
+
* - Filterable fields: `worker_id`, `applied_on`, `effective_on`, `changed_by_id`,
|
|
17
|
+
* `reason_code`, `field_key`, `event_type`
|
|
18
|
+
* - Expandable fields: `worker`, `changed_by`
|
|
19
|
+
* - Sortable fields: `id`, `created_at`, `updated_at`, `applied_on`,
|
|
20
|
+
* `effective_on`
|
|
21
|
+
*/
|
|
22
|
+
list(query = {}, options) {
|
|
23
|
+
return this._client.getAPIList('/worker-changes/', (pagination_1.PageCursorURL), {
|
|
24
|
+
query,
|
|
25
|
+
...options,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Retrieve a specific worker change
|
|
30
|
+
*/
|
|
31
|
+
retrieve(id, query = {}, options) {
|
|
32
|
+
return this._client.get((0, path_1.path) `/worker-changes/${id}/`, { query, ...options });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.WorkerChanges = WorkerChanges;
|
|
36
|
+
//# sourceMappingURL=worker-changes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-changes.js","sourceRoot":"","sources":["../src/resources/worker-changes.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAgE;AAEhE,oDAA8C;AAE9C;;GAEG;AACH,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;OASG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAA,0BAAuC,CAAA,EAAE;YAC1F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,QAAuD,EAAE,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AA/BD,sCA+BC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Historical changes to worker data over time
|
|
7
|
+
*/
|
|
8
|
+
export class WorkerChanges extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* A list of worker changes.
|
|
11
|
+
*
|
|
12
|
+
* - Requires: `Worker Changes API`
|
|
13
|
+
* - Filterable fields: `worker_id`, `applied_on`, `effective_on`, `changed_by_id`,
|
|
14
|
+
* `reason_code`, `field_key`, `event_type`
|
|
15
|
+
* - Expandable fields: `worker`, `changed_by`
|
|
16
|
+
* - Sortable fields: `id`, `created_at`, `updated_at`, `applied_on`,
|
|
17
|
+
* `effective_on`
|
|
18
|
+
*/
|
|
19
|
+
list(query = {}, options) {
|
|
20
|
+
return this._client.getAPIList('/worker-changes/', (PageCursorURL), {
|
|
21
|
+
query,
|
|
22
|
+
...options,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Retrieve a specific worker change
|
|
27
|
+
*/
|
|
28
|
+
retrieve(id, query = {}, options) {
|
|
29
|
+
return this._client.get(path `/worker-changes/${id}/`, { query, ...options });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=worker-changes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-changes.mjs","sourceRoot":"","sources":["../src/resources/worker-changes.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,OAAO,EAAE,aAAa,EAAe,+BAA2B;AAEhE,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;OASG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAA,aAAuC,CAAA,EAAE;YAC1F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,QAAuD,EAAE,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,mBAAmB,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF"}
|
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,
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { generateId } from './_helpers';
|
|
2
|
+
import type { CustomObject } from './custom-object';
|
|
3
|
+
import { getExistingManifestContext, type ExistingManifestContextOptions } from './existing-manifest-context';
|
|
4
|
+
import type { ManifestComponentDeletion } from './manifest-builder';
|
|
5
|
+
import type { ManifestFunction } from './manifest-function';
|
|
6
|
+
import { requireArrayComponentField, requireStringComponentField } from './_existing-component-fields';
|
|
7
|
+
|
|
8
|
+
export type CustomObjectActionVisibilityPreference = 'LIST_VIEW' | 'DETAIL_VIEW';
|
|
9
|
+
|
|
10
|
+
export interface CustomObjectActionDeletionIdentifier {
|
|
11
|
+
actionId: string;
|
|
12
|
+
objectRqlName: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CustomObjectActionProps {
|
|
16
|
+
/** Stable identifier for this action. Auto-generated when omitted. */
|
|
17
|
+
actionId?: string;
|
|
18
|
+
/** Display name shown in the list or detail view. */
|
|
19
|
+
name: string;
|
|
20
|
+
/** Function invoked by the action. */
|
|
21
|
+
function: ManifestFunction;
|
|
22
|
+
/** Views where the action is shown. */
|
|
23
|
+
visibilityPreferences: CustomObjectActionVisibilityPreference[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface CustomObjectActionLoadFromExistingOptions extends ExistingManifestContextOptions {
|
|
27
|
+
customObjectApiName?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Defines an action shown on a custom object's list or detail view. */
|
|
31
|
+
export class CustomObjectAction {
|
|
32
|
+
static readonly componentType = 'CUSTOM_OBJECT_ACTION' as const;
|
|
33
|
+
|
|
34
|
+
static toDeletionIdentifier(identifier: CustomObjectActionDeletionIdentifier): ManifestComponentDeletion {
|
|
35
|
+
return {
|
|
36
|
+
type: CustomObjectAction.componentType,
|
|
37
|
+
action_id: identifier.actionId,
|
|
38
|
+
object_rql_name: identifier.objectRqlName,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
private readonly _actionId: string;
|
|
43
|
+
private readonly _objectRqlName: string;
|
|
44
|
+
private readonly _name: string;
|
|
45
|
+
private readonly _functionApiName: string;
|
|
46
|
+
private readonly _visibilityPreferences: CustomObjectActionVisibilityPreference[];
|
|
47
|
+
|
|
48
|
+
constructor(customObject: CustomObject, props: CustomObjectActionProps) {
|
|
49
|
+
if (!props.name.trim()) throw new Error('CustomObjectAction: name cannot be empty');
|
|
50
|
+
this._actionId = props.actionId ?? generateId('action');
|
|
51
|
+
this._objectRqlName = customObject.getApiName();
|
|
52
|
+
this._name = props.name;
|
|
53
|
+
this._functionApiName = props.function.getApiName();
|
|
54
|
+
this._visibilityPreferences = [...props.visibilityPreferences];
|
|
55
|
+
customObject._register(this);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
static loadFromExisting(
|
|
59
|
+
actionId: string,
|
|
60
|
+
options: CustomObjectActionLoadFromExistingOptions = {},
|
|
61
|
+
): CustomObjectAction {
|
|
62
|
+
return getExistingManifestContext(options).loadCustomObjectAction(actionId, options);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** @internal Hydrates an action from existing manifest wire JSON. */
|
|
66
|
+
static _fromExistingComponent(
|
|
67
|
+
customObject: CustomObject,
|
|
68
|
+
component: Record<string, any>,
|
|
69
|
+
resolveFunction: (apiName: string) => ManifestFunction,
|
|
70
|
+
): CustomObjectAction {
|
|
71
|
+
return new CustomObjectAction(customObject, {
|
|
72
|
+
actionId: requireStringComponentField(component, 'action_id', CustomObjectAction.componentType),
|
|
73
|
+
name: requireStringComponentField(component, 'name', CustomObjectAction.componentType),
|
|
74
|
+
function: resolveFunction(
|
|
75
|
+
requireStringComponentField(component, 'function_api_name', CustomObjectAction.componentType),
|
|
76
|
+
),
|
|
77
|
+
visibilityPreferences: requireArrayComponentField<CustomObjectActionVisibilityPreference>(
|
|
78
|
+
component,
|
|
79
|
+
'visibility_preferences',
|
|
80
|
+
CustomObjectAction.componentType,
|
|
81
|
+
),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
getActionId(): string {
|
|
86
|
+
return this._actionId;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
toDict(): Record<string, any> {
|
|
90
|
+
return {
|
|
91
|
+
type: CustomObjectAction.componentType,
|
|
92
|
+
action_id: this._actionId,
|
|
93
|
+
object_rql_name: this._objectRqlName,
|
|
94
|
+
name: this._name,
|
|
95
|
+
function_api_name: this._functionApiName,
|
|
96
|
+
object_type: 'CUSTOM',
|
|
97
|
+
visibility_preferences: this._visibilityPreferences,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -8,7 +8,6 @@ import type {
|
|
|
8
8
|
import { getExistingManifestContext, type ExistingManifestContextOptions } from './existing-manifest-context';
|
|
9
9
|
import type { Field } from './field';
|
|
10
10
|
import type { ManifestComponentDeletion } from './manifest-builder';
|
|
11
|
-
import type { ManifestFunction } from './manifest-function';
|
|
12
11
|
import { requireStringComponentField } from './_existing-component-fields';
|
|
13
12
|
|
|
14
13
|
export interface PageLayoutDeletionIdentifier {
|
|
@@ -25,7 +24,6 @@ export type HeaderFieldKey = string;
|
|
|
25
24
|
export type FieldRqlName = string;
|
|
26
25
|
export type RelatedObjectRqlName = string;
|
|
27
26
|
export type CanvasCompositionId = string;
|
|
28
|
-
type HeaderButtonKey = string;
|
|
29
27
|
|
|
30
28
|
export type JsonPrimitive = string | number | boolean | null;
|
|
31
29
|
export type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
|
|
@@ -88,8 +86,6 @@ export interface HeaderEdits {
|
|
|
88
86
|
newFields?: NewHeaderField[];
|
|
89
87
|
/** Ordered list of header field RQL names. Custom header keys are accepted and converted. Optional. */
|
|
90
88
|
headerFieldsOrder?: FieldRqlName[];
|
|
91
|
-
/** Action functions to show in the header. Optional. */
|
|
92
|
-
buttons?: ManifestFunction[];
|
|
93
89
|
}
|
|
94
90
|
|
|
95
91
|
interface SerializedSystemHeaderFieldEdit extends Omit<SystemHeaderFieldEdit, 'newRqlField'> {
|
|
@@ -97,11 +93,10 @@ interface SerializedSystemHeaderFieldEdit extends Omit<SystemHeaderFieldEdit, 'n
|
|
|
97
93
|
}
|
|
98
94
|
|
|
99
95
|
interface SerializedHeaderEdits
|
|
100
|
-
extends Omit<HeaderEdits, 'newTitleField' | 'newDescriptionField' | 'systemFieldEdits'
|
|
96
|
+
extends Omit<HeaderEdits, 'newTitleField' | 'newDescriptionField' | 'systemFieldEdits'> {
|
|
101
97
|
newTitleField?: FieldRqlName | null;
|
|
102
98
|
newDescriptionField?: FieldRqlName | null;
|
|
103
99
|
systemFieldEdits?: Record<HeaderFieldKey, SerializedSystemHeaderFieldEdit>;
|
|
104
|
-
buttons?: HeaderButtonKey[];
|
|
105
100
|
}
|
|
106
101
|
|
|
107
102
|
// ---------------------------------------------------------------------------
|
|
@@ -562,7 +557,7 @@ export interface CustomObjectPageLayoutProps {
|
|
|
562
557
|
*/
|
|
563
558
|
tabEdits?: TabEdits;
|
|
564
559
|
/**
|
|
565
|
-
* Header configuration — title
|
|
560
|
+
* Header configuration — title and description fields.
|
|
566
561
|
*
|
|
567
562
|
* Optional. @default `{}`
|
|
568
563
|
*/
|
|
@@ -905,7 +900,6 @@ const HEADER_EDIT_KEYS = new Set([
|
|
|
905
900
|
'systemFieldEdits',
|
|
906
901
|
'newFields',
|
|
907
902
|
'headerFieldsOrder',
|
|
908
|
-
'buttons',
|
|
909
903
|
]);
|
|
910
904
|
|
|
911
905
|
const SYSTEM_HEADER_FIELD_EDIT_KEYS = new Set(['newRqlField', 'deleted']);
|
|
@@ -972,9 +966,7 @@ function normalizeHeaderEdits(headerEdits: HeaderEdits): SerializedHeaderEdits {
|
|
|
972
966
|
);
|
|
973
967
|
}
|
|
974
968
|
|
|
975
|
-
const {
|
|
976
|
-
const normalized: SerializedHeaderEdits = { ...rest };
|
|
977
|
-
if (buttons != null) normalized.buttons = buttons.map((button) => button.getApiName());
|
|
969
|
+
const normalized: SerializedHeaderEdits = { ...headerEdits };
|
|
978
970
|
|
|
979
971
|
if (headerEdits.headerFieldsOrder == null) return normalized;
|
|
980
972
|
return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { App } from './app';
|
|
2
2
|
import { Category } from './category';
|
|
3
3
|
import { CustomObject } from './custom-object';
|
|
4
|
+
import { CustomObjectAction } from './custom-object-action';
|
|
4
5
|
import { CustomObjectFieldSection } from './custom-object-field-section';
|
|
5
6
|
import { CustomObjectPageLayout } from './custom-object-page-layout';
|
|
6
7
|
import { Field } from './field';
|
|
@@ -78,6 +79,7 @@ function componentLabel(component: Record<string, any>): string {
|
|
|
78
79
|
component['api_name'] ??
|
|
79
80
|
component['layout_id'] ??
|
|
80
81
|
component['view_id'] ??
|
|
82
|
+
component['action_id'] ??
|
|
81
83
|
component['rule_id'] ??
|
|
82
84
|
component['flow_id'] ??
|
|
83
85
|
component['sdui_page_id'] ??
|
|
@@ -223,6 +225,18 @@ export class ExistingManifestContext {
|
|
|
223
225
|
return this.loadListViewComponent(component);
|
|
224
226
|
}
|
|
225
227
|
|
|
228
|
+
loadCustomObjectAction(actionId: string, options: ExistingManifestObjectOptions = {}): CustomObjectAction {
|
|
229
|
+
const objectApiName = options.customObjectApiName;
|
|
230
|
+
const component = this.findUnique(
|
|
231
|
+
'CUSTOM_OBJECT_ACTION',
|
|
232
|
+
(candidate) =>
|
|
233
|
+
candidate['action_id'] === actionId &&
|
|
234
|
+
(objectApiName == null || candidate['object_rql_name'] === objectApiName),
|
|
235
|
+
`CUSTOM_OBJECT_ACTION ${objectApiName != null ? `${objectApiName}.` : ''}${actionId}`,
|
|
236
|
+
);
|
|
237
|
+
return this.loadCustomObjectActionComponent(component);
|
|
238
|
+
}
|
|
239
|
+
|
|
226
240
|
loadPageLayout(
|
|
227
241
|
layoutIdOrApiName: string,
|
|
228
242
|
options: ExistingManifestObjectOptions = {},
|
|
@@ -295,6 +309,8 @@ export class ExistingManifestContext {
|
|
|
295
309
|
return this.loadCategoryComponent(component);
|
|
296
310
|
case 'CUSTOM_OBJECT':
|
|
297
311
|
return this.loadCustomObjectComponent(component);
|
|
312
|
+
case 'CUSTOM_OBJECT_ACTION':
|
|
313
|
+
return this.loadCustomObjectActionComponent(component);
|
|
298
314
|
case 'CUSTOM_OBJECT_FIELD_SECTION':
|
|
299
315
|
return this.loadFieldSectionComponent(component);
|
|
300
316
|
case 'CUSTOM_OBJECT_FIELD':
|
|
@@ -408,6 +424,21 @@ export class ExistingManifestContext {
|
|
|
408
424
|
});
|
|
409
425
|
}
|
|
410
426
|
|
|
427
|
+
private loadCustomObjectActionComponent(component: Record<string, any>): CustomObjectAction {
|
|
428
|
+
const objectApiName = requireStringComponentField(
|
|
429
|
+
component,
|
|
430
|
+
'object_rql_name',
|
|
431
|
+
CustomObjectAction.componentType,
|
|
432
|
+
);
|
|
433
|
+
const actionId = requireStringComponentField(component, 'action_id', CustomObjectAction.componentType);
|
|
434
|
+
const cacheKey = this.cacheKey('CUSTOM_OBJECT_ACTION', `${objectApiName}.${actionId}`);
|
|
435
|
+
return this.getOrLoad(cacheKey, () =>
|
|
436
|
+
CustomObjectAction._fromExistingComponent(this.loadCustomObject(objectApiName), component, (apiName) =>
|
|
437
|
+
this.loadFunction(apiName),
|
|
438
|
+
),
|
|
439
|
+
);
|
|
440
|
+
}
|
|
441
|
+
|
|
411
442
|
private loadPageLayoutComponent(component: Record<string, any>): CustomObjectPageLayout {
|
|
412
443
|
const layoutId = requireStringComponentField(
|
|
413
444
|
component,
|
|
@@ -144,6 +144,14 @@ export {
|
|
|
144
144
|
type SummaryFieldProps,
|
|
145
145
|
} from './field';
|
|
146
146
|
|
|
147
|
+
export {
|
|
148
|
+
CustomObjectAction,
|
|
149
|
+
type CustomObjectActionDeletionIdentifier,
|
|
150
|
+
type CustomObjectActionLoadFromExistingOptions,
|
|
151
|
+
type CustomObjectActionProps,
|
|
152
|
+
type CustomObjectActionVisibilityPreference,
|
|
153
|
+
} from './custom-object-action';
|
|
154
|
+
|
|
147
155
|
export {
|
|
148
156
|
ExistingManifestContext,
|
|
149
157
|
type ExistingManifest,
|