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

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 (68) 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/lib/manifest/custom-object-page-layout.d.mts +0 -6
  10. package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
  11. package/lib/manifest/custom-object-page-layout.d.ts +0 -6
  12. package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
  13. package/lib/manifest/custom-object-page-layout.js +16 -5
  14. package/lib/manifest/custom-object-page-layout.js.map +1 -1
  15. package/lib/manifest/custom-object-page-layout.mjs +16 -5
  16. package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
  17. package/lib/manifest/index.d.mts +1 -1
  18. package/lib/manifest/index.d.mts.map +1 -1
  19. package/lib/manifest/index.d.ts +1 -1
  20. package/lib/manifest/index.d.ts.map +1 -1
  21. package/lib/manifest/index.js.map +1 -1
  22. package/lib/manifest/index.mjs.map +1 -1
  23. package/package.json +1 -1
  24. package/resources/app-users.d.mts +186 -0
  25. package/resources/app-users.d.mts.map +1 -0
  26. package/resources/app-users.d.ts +186 -0
  27. package/resources/app-users.d.ts.map +1 -0
  28. package/resources/app-users.js +32 -0
  29. package/resources/app-users.js.map +1 -0
  30. package/resources/app-users.mjs +28 -0
  31. package/resources/app-users.mjs.map +1 -0
  32. package/resources/devices.d.mts +272 -0
  33. package/resources/devices.d.mts.map +1 -0
  34. package/resources/devices.d.ts +272 -0
  35. package/resources/devices.d.ts.map +1 -0
  36. package/resources/devices.js +32 -0
  37. package/resources/devices.js.map +1 -0
  38. package/resources/devices.mjs +28 -0
  39. package/resources/devices.mjs.map +1 -0
  40. package/resources/functions/deployments.d.mts +8 -0
  41. package/resources/functions/deployments.d.mts.map +1 -1
  42. package/resources/functions/deployments.d.ts +8 -0
  43. package/resources/functions/deployments.d.ts.map +1 -1
  44. package/resources/index.d.mts +2 -0
  45. package/resources/index.d.mts.map +1 -1
  46. package/resources/index.d.ts +2 -0
  47. package/resources/index.d.ts.map +1 -1
  48. package/resources/index.js +6 -2
  49. package/resources/index.js.map +1 -1
  50. package/resources/index.mjs +2 -0
  51. package/resources/index.mjs.map +1 -1
  52. package/resources/workers.d.mts +13 -0
  53. package/resources/workers.d.mts.map +1 -1
  54. package/resources/workers.d.ts +13 -0
  55. package/resources/workers.d.ts.map +1 -1
  56. package/src/client.ts +44 -0
  57. package/src/lib/manifest/custom-object-page-layout.ts +14 -9
  58. package/src/lib/manifest/index.ts +0 -2
  59. package/src/resources/app-users.ts +270 -0
  60. package/src/resources/devices.ts +496 -0
  61. package/src/resources/functions/deployments.ts +10 -0
  62. package/src/resources/index.ts +16 -0
  63. package/src/resources/workers.ts +15 -0
  64. package/src/version.ts +1 -1
  65. package/version.d.mts +1 -1
  66. package/version.d.ts +1 -1
  67. package/version.js +1 -1
  68. package/version.mjs +1 -1
@@ -0,0 +1,270 @@
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
+ * Mappings between Rippling workers and their user accounts in third-party apps
13
+ */
14
+ export class AppUsers extends APIResource {
15
+ /**
16
+ * A list of app users.
17
+ *
18
+ * - Requires: `API Tier 1`
19
+ * - Filterable fields: `worker_id`, `spoke_user_identifier`, `app_handle`,
20
+ * `created_at`, `updated_at`
21
+ * - Expandable fields: `worker`
22
+ * - Sortable fields: `id`, `created_at`, `updated_at`
23
+ */
24
+ list(
25
+ query: AppUserListParams | null | undefined = {},
26
+ options?: RequestOptions,
27
+ ): PagePromise<AppUserListResponsesPageCursorURL, AppUserListResponse> {
28
+ return this._client.getAPIList('/app-users/', PageCursorURL<AppUserListResponse>, { query, ...options });
29
+ }
30
+
31
+ /**
32
+ * Retrieve a specific app user
33
+ */
34
+ retrieve(
35
+ id: string,
36
+ query: AppUserRetrieveParams | null | undefined = {},
37
+ options?: RequestOptions,
38
+ ): APIPromise<AppUserRetrieveResponse> {
39
+ return this._client.get(path`/app-users/${id}/`, { query, ...options });
40
+ }
41
+ }
42
+
43
+ export type AppUserListResponsesPageCursorURL = PageCursorURL<AppUserListResponse>;
44
+
45
+ /**
46
+ * Maps a Rippling worker (if any) to their user account in a third-party
47
+ * app (e.g. Slack, Jira, GitHub). Sourced from SpokeUser records.
48
+ *
49
+ * Includes orphan accounts — third-party app accounts with no matching
50
+ * Rippling worker (`worker_id=None`, `match_state=NOT_MATCHED`). These are
51
+ * the primary signal for IT-admin triage. Uses `BaseResourceDTO` rather
52
+ * than `BaseEmployeeResourceDTO` so the platform's role-based auto-filter
53
+ * does not silently drop orphans for non-admin tokens. Company scoping is
54
+ * enforced explicitly in `AppUsersAPIViewSet.get_queryset`; the `app-users.read`
55
+ * scope is the access gate.
56
+ *
57
+ * Resource name aligns with how the product surfaces these in the UI
58
+ * ("Slack account", "GitHub account") and matches the equivalent concept
59
+ * in Okta's IAM API (AppUser).
60
+ *
61
+ * Designed for point lookups: list endpoint requires at least one filter
62
+ * on `worker_id` or `spoke_user_identifier` to prevent bulk enumeration of the
63
+ * org's identity graph across connected apps.
64
+ *
65
+ * `spoke_user_identifier` reads `SpokeUser.spokeId` — the user identifier
66
+ * stored for the third-party account. Depending on the integration, this may
67
+ * be an email, username, account handle, or app-specific user id.
68
+ */
69
+ export interface AppUserListResponse {
70
+ /**
71
+ * Identifier field
72
+ */
73
+ id: string;
74
+
75
+ /**
76
+ * Record creation date
77
+ */
78
+ created_at: string;
79
+
80
+ /**
81
+ * Record update date
82
+ */
83
+ updated_at: string;
84
+
85
+ /**
86
+ * Human-readable display name for the third-party app (e.g. 'Slack', 'GitHub').
87
+ * Sourced from the customer-configured SpokeOwner.app_display_name; falls back to
88
+ * a title-cased app handle when the customer hasn't set one.
89
+ */
90
+ app_display_name?: string;
91
+
92
+ /**
93
+ * Machine-readable identifier for the third-party app (e.g. 'slack', 'jira',
94
+ * 'asana'). Stable across the App Shop catalog.
95
+ */
96
+ app_handle?: string;
97
+
98
+ /**
99
+ * The user's email address in the third-party app, if known. Null when the app
100
+ * does not expose an email or Rippling did not capture one.
101
+ */
102
+ external_email?: string;
103
+
104
+ /**
105
+ * The user's display name in the third-party app, if known. Null when the app does
106
+ * not surface a separate username.
107
+ */
108
+ external_username?: string;
109
+
110
+ /**
111
+ * Whether this third-party account has been matched to a Rippling worker.
112
+ */
113
+ match_state?: 'MATCHED' | 'NOT_MATCHED' | 'IGNORED';
114
+
115
+ /**
116
+ * Provisioning lifecycle state of this account in the third-party app.
117
+ */
118
+ push_state?:
119
+ | 'INIT'
120
+ | 'EMPLOYEE_CONFIRMATION_PENDING'
121
+ | 'EMPLOYEE_CONFIRMATION_ACCEPTED'
122
+ | 'EMPLOYEE_CONFIRMATION_REJECTED'
123
+ | 'INVITE_PENDING'
124
+ | 'INVITE_CONFIRMED'
125
+ | 'INVITE_FAILED'
126
+ | 'CREATE_PENDING'
127
+ | 'CREATE_CONFIRMED'
128
+ | 'CREATE_FAILED'
129
+ | 'DELETE_PENDING'
130
+ | 'DELETE_CONFIRMED'
131
+ | 'DELETE_FAILED'
132
+ | 'SUSPEND_PENDING'
133
+ | 'SUSPEND_CONFIRMED'
134
+ | 'SUSPEND_FAILED';
135
+
136
+ /**
137
+ * Identifier for the user's account in the third-party app workspace. Depending on
138
+ * the integration, this may be an email, username, account handle, or app-specific
139
+ * user id.
140
+ */
141
+ spoke_user_identifier?: string;
142
+
143
+ /**
144
+ * The Rippling worker associated with this external app account. Expanding this
145
+ * field requires both `app-users.read` and `workers.read` scopes.
146
+ *
147
+ * Expandable field
148
+ */
149
+ worker?: WorkersAPI.Worker;
150
+
151
+ /**
152
+ * ID of the Rippling worker associated with this external app account.
153
+ */
154
+ worker_id?: string;
155
+ }
156
+
157
+ /**
158
+ * Meta information for the response.
159
+ */
160
+ export interface AppUserRetrieveResponse extends BusinessPartnersAPI.Meta {
161
+ /**
162
+ * Identifier field
163
+ */
164
+ id: string;
165
+
166
+ /**
167
+ * Record creation date
168
+ */
169
+ created_at: string;
170
+
171
+ /**
172
+ * Record update date
173
+ */
174
+ updated_at: string;
175
+
176
+ /**
177
+ * Human-readable display name for the third-party app (e.g. 'Slack', 'GitHub').
178
+ * Sourced from the customer-configured SpokeOwner.app_display_name; falls back to
179
+ * a title-cased app handle when the customer hasn't set one.
180
+ */
181
+ app_display_name?: string;
182
+
183
+ /**
184
+ * Machine-readable identifier for the third-party app (e.g. 'slack', 'jira',
185
+ * 'asana'). Stable across the App Shop catalog.
186
+ */
187
+ app_handle?: string;
188
+
189
+ /**
190
+ * The user's email address in the third-party app, if known. Null when the app
191
+ * does not expose an email or Rippling did not capture one.
192
+ */
193
+ external_email?: string;
194
+
195
+ /**
196
+ * The user's display name in the third-party app, if known. Null when the app does
197
+ * not surface a separate username.
198
+ */
199
+ external_username?: string;
200
+
201
+ /**
202
+ * Whether this third-party account has been matched to a Rippling worker.
203
+ */
204
+ match_state?: 'MATCHED' | 'NOT_MATCHED' | 'IGNORED';
205
+
206
+ /**
207
+ * Provisioning lifecycle state of this account in the third-party app.
208
+ */
209
+ push_state?:
210
+ | 'INIT'
211
+ | 'EMPLOYEE_CONFIRMATION_PENDING'
212
+ | 'EMPLOYEE_CONFIRMATION_ACCEPTED'
213
+ | 'EMPLOYEE_CONFIRMATION_REJECTED'
214
+ | 'INVITE_PENDING'
215
+ | 'INVITE_CONFIRMED'
216
+ | 'INVITE_FAILED'
217
+ | 'CREATE_PENDING'
218
+ | 'CREATE_CONFIRMED'
219
+ | 'CREATE_FAILED'
220
+ | 'DELETE_PENDING'
221
+ | 'DELETE_CONFIRMED'
222
+ | 'DELETE_FAILED'
223
+ | 'SUSPEND_PENDING'
224
+ | 'SUSPEND_CONFIRMED'
225
+ | 'SUSPEND_FAILED';
226
+
227
+ /**
228
+ * Identifier for the user's account in the third-party app workspace. Depending on
229
+ * the integration, this may be an email, username, account handle, or app-specific
230
+ * user id.
231
+ */
232
+ spoke_user_identifier?: string;
233
+
234
+ /**
235
+ * The Rippling worker associated with this external app account. Expanding this
236
+ * field requires both `app-users.read` and `workers.read` scopes.
237
+ *
238
+ * Expandable field
239
+ */
240
+ worker?: WorkersAPI.Worker;
241
+
242
+ /**
243
+ * ID of the Rippling worker associated with this external app account.
244
+ */
245
+ worker_id?: string;
246
+ }
247
+
248
+ export interface AppUserListParams {
249
+ cursor?: string;
250
+
251
+ expand?: string;
252
+
253
+ filter?: string;
254
+
255
+ order_by?: string;
256
+ }
257
+
258
+ export interface AppUserRetrieveParams {
259
+ expand?: string;
260
+ }
261
+
262
+ export declare namespace AppUsers {
263
+ export {
264
+ type AppUserListResponse as AppUserListResponse,
265
+ type AppUserRetrieveResponse as AppUserRetrieveResponse,
266
+ type AppUserListResponsesPageCursorURL as AppUserListResponsesPageCursorURL,
267
+ type AppUserListParams as AppUserListParams,
268
+ type AppUserRetrieveParams as AppUserRetrieveParams,
269
+ };
270
+ }