@rippling/rippling-sdk 0.2.0-alpha.61 → 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 (85) 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/examples/manifest/field-service-dispatch/field-service-dispatch.ts +530 -0
  10. package/examples/manifest/grant-program-management/grant-program-management.ts +594 -0
  11. package/examples/manifest/procurement-approval-hub/procurement-approval-hub.ts +554 -0
  12. package/lib/manifest/custom-object-page-layout.d.mts +0 -6
  13. package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
  14. package/lib/manifest/custom-object-page-layout.d.ts +0 -6
  15. package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
  16. package/lib/manifest/custom-object-page-layout.js +16 -5
  17. package/lib/manifest/custom-object-page-layout.js.map +1 -1
  18. package/lib/manifest/custom-object-page-layout.mjs +16 -5
  19. package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
  20. package/lib/manifest/index.d.mts +1 -1
  21. package/lib/manifest/index.d.mts.map +1 -1
  22. package/lib/manifest/index.d.ts +1 -1
  23. package/lib/manifest/index.d.ts.map +1 -1
  24. package/lib/manifest/index.js.map +1 -1
  25. package/lib/manifest/index.mjs.map +1 -1
  26. package/package.json +1 -1
  27. package/resources/app-users.d.mts +186 -0
  28. package/resources/app-users.d.mts.map +1 -0
  29. package/resources/app-users.d.ts +186 -0
  30. package/resources/app-users.d.ts.map +1 -0
  31. package/resources/app-users.js +32 -0
  32. package/resources/app-users.js.map +1 -0
  33. package/resources/app-users.mjs +28 -0
  34. package/resources/app-users.mjs.map +1 -0
  35. package/resources/device-orders.d.mts +147 -0
  36. package/resources/device-orders.d.mts.map +1 -0
  37. package/resources/device-orders.d.ts +147 -0
  38. package/resources/device-orders.d.ts.map +1 -0
  39. package/resources/device-orders.js +34 -0
  40. package/resources/device-orders.js.map +1 -0
  41. package/resources/device-orders.mjs +30 -0
  42. package/resources/device-orders.mjs.map +1 -0
  43. package/resources/devices.d.mts +272 -0
  44. package/resources/devices.d.mts.map +1 -0
  45. package/resources/devices.d.ts +272 -0
  46. package/resources/devices.d.ts.map +1 -0
  47. package/resources/devices.js +32 -0
  48. package/resources/devices.js.map +1 -0
  49. package/resources/devices.mjs +28 -0
  50. package/resources/devices.mjs.map +1 -0
  51. package/resources/functions/deployments.d.mts +8 -0
  52. package/resources/functions/deployments.d.mts.map +1 -1
  53. package/resources/functions/deployments.d.ts +8 -0
  54. package/resources/functions/deployments.d.ts.map +1 -1
  55. package/resources/index.d.mts +3 -0
  56. package/resources/index.d.mts.map +1 -1
  57. package/resources/index.d.ts +3 -0
  58. package/resources/index.d.ts.map +1 -1
  59. package/resources/index.js +8 -2
  60. package/resources/index.js.map +1 -1
  61. package/resources/index.mjs +3 -0
  62. package/resources/index.mjs.map +1 -1
  63. package/resources/job-assignments.d.mts +12 -12
  64. package/resources/job-assignments.d.mts.map +1 -1
  65. package/resources/job-assignments.d.ts +12 -12
  66. package/resources/job-assignments.d.ts.map +1 -1
  67. package/resources/workers.d.mts +13 -0
  68. package/resources/workers.d.mts.map +1 -1
  69. package/resources/workers.d.ts +13 -0
  70. package/resources/workers.d.ts.map +1 -1
  71. package/src/client.ts +66 -0
  72. package/src/lib/manifest/custom-object-page-layout.ts +14 -9
  73. package/src/lib/manifest/index.ts +0 -2
  74. package/src/resources/app-users.ts +270 -0
  75. package/src/resources/device-orders.ts +200 -0
  76. package/src/resources/devices.ts +496 -0
  77. package/src/resources/functions/deployments.ts +10 -0
  78. package/src/resources/index.ts +24 -0
  79. package/src/resources/job-assignments.ts +12 -12
  80. package/src/resources/workers.ts +15 -0
  81. package/src/version.ts +1 -1
  82. package/version.d.mts +1 -1
  83. package/version.d.ts +1 -1
  84. package/version.js +1 -1
  85. package/version.mjs +1 -1
@@ -0,0 +1,186 @@
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
+ * Mappings between Rippling workers and their user accounts in third-party apps
9
+ */
10
+ export declare class AppUsers extends APIResource {
11
+ /**
12
+ * A list of app users.
13
+ *
14
+ * - Requires: `API Tier 1`
15
+ * - Filterable fields: `worker_id`, `spoke_user_identifier`, `app_handle`,
16
+ * `created_at`, `updated_at`
17
+ * - Expandable fields: `worker`
18
+ * - Sortable fields: `id`, `created_at`, `updated_at`
19
+ */
20
+ list(query?: AppUserListParams | null | undefined, options?: RequestOptions): PagePromise<AppUserListResponsesPageCursorURL, AppUserListResponse>;
21
+ /**
22
+ * Retrieve a specific app user
23
+ */
24
+ retrieve(id: string, query?: AppUserRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<AppUserRetrieveResponse>;
25
+ }
26
+ export type AppUserListResponsesPageCursorURL = PageCursorURL<AppUserListResponse>;
27
+ /**
28
+ * Maps a Rippling worker (if any) to their user account in a third-party
29
+ * app (e.g. Slack, Jira, GitHub). Sourced from SpokeUser records.
30
+ *
31
+ * Includes orphan accounts — third-party app accounts with no matching
32
+ * Rippling worker (`worker_id=None`, `match_state=NOT_MATCHED`). These are
33
+ * the primary signal for IT-admin triage. Uses `BaseResourceDTO` rather
34
+ * than `BaseEmployeeResourceDTO` so the platform's role-based auto-filter
35
+ * does not silently drop orphans for non-admin tokens. Company scoping is
36
+ * enforced explicitly in `AppUsersAPIViewSet.get_queryset`; the `app-users.read`
37
+ * scope is the access gate.
38
+ *
39
+ * Resource name aligns with how the product surfaces these in the UI
40
+ * ("Slack account", "GitHub account") and matches the equivalent concept
41
+ * in Okta's IAM API (AppUser).
42
+ *
43
+ * Designed for point lookups: list endpoint requires at least one filter
44
+ * on `worker_id` or `spoke_user_identifier` to prevent bulk enumeration of the
45
+ * org's identity graph across connected apps.
46
+ *
47
+ * `spoke_user_identifier` reads `SpokeUser.spokeId` — the user identifier
48
+ * stored for the third-party account. Depending on the integration, this may
49
+ * be an email, username, account handle, or app-specific user id.
50
+ */
51
+ export interface AppUserListResponse {
52
+ /**
53
+ * Identifier field
54
+ */
55
+ id: string;
56
+ /**
57
+ * Record creation date
58
+ */
59
+ created_at: string;
60
+ /**
61
+ * Record update date
62
+ */
63
+ updated_at: string;
64
+ /**
65
+ * Human-readable display name for the third-party app (e.g. 'Slack', 'GitHub').
66
+ * Sourced from the customer-configured SpokeOwner.app_display_name; falls back to
67
+ * a title-cased app handle when the customer hasn't set one.
68
+ */
69
+ app_display_name?: string;
70
+ /**
71
+ * Machine-readable identifier for the third-party app (e.g. 'slack', 'jira',
72
+ * 'asana'). Stable across the App Shop catalog.
73
+ */
74
+ app_handle?: string;
75
+ /**
76
+ * The user's email address in the third-party app, if known. Null when the app
77
+ * does not expose an email or Rippling did not capture one.
78
+ */
79
+ external_email?: string;
80
+ /**
81
+ * The user's display name in the third-party app, if known. Null when the app does
82
+ * not surface a separate username.
83
+ */
84
+ external_username?: string;
85
+ /**
86
+ * Whether this third-party account has been matched to a Rippling worker.
87
+ */
88
+ match_state?: 'MATCHED' | 'NOT_MATCHED' | 'IGNORED';
89
+ /**
90
+ * Provisioning lifecycle state of this account in the third-party app.
91
+ */
92
+ push_state?: 'INIT' | 'EMPLOYEE_CONFIRMATION_PENDING' | 'EMPLOYEE_CONFIRMATION_ACCEPTED' | 'EMPLOYEE_CONFIRMATION_REJECTED' | 'INVITE_PENDING' | 'INVITE_CONFIRMED' | 'INVITE_FAILED' | 'CREATE_PENDING' | 'CREATE_CONFIRMED' | 'CREATE_FAILED' | 'DELETE_PENDING' | 'DELETE_CONFIRMED' | 'DELETE_FAILED' | 'SUSPEND_PENDING' | 'SUSPEND_CONFIRMED' | 'SUSPEND_FAILED';
93
+ /**
94
+ * Identifier for the user's account in the third-party app workspace. Depending on
95
+ * the integration, this may be an email, username, account handle, or app-specific
96
+ * user id.
97
+ */
98
+ spoke_user_identifier?: string;
99
+ /**
100
+ * The Rippling worker associated with this external app account. Expanding this
101
+ * field requires both `app-users.read` and `workers.read` scopes.
102
+ *
103
+ * Expandable field
104
+ */
105
+ worker?: WorkersAPI.Worker;
106
+ /**
107
+ * ID of the Rippling worker associated with this external app account.
108
+ */
109
+ worker_id?: string;
110
+ }
111
+ /**
112
+ * Meta information for the response.
113
+ */
114
+ export interface AppUserRetrieveResponse extends BusinessPartnersAPI.Meta {
115
+ /**
116
+ * Identifier field
117
+ */
118
+ id: string;
119
+ /**
120
+ * Record creation date
121
+ */
122
+ created_at: string;
123
+ /**
124
+ * Record update date
125
+ */
126
+ updated_at: string;
127
+ /**
128
+ * Human-readable display name for the third-party app (e.g. 'Slack', 'GitHub').
129
+ * Sourced from the customer-configured SpokeOwner.app_display_name; falls back to
130
+ * a title-cased app handle when the customer hasn't set one.
131
+ */
132
+ app_display_name?: string;
133
+ /**
134
+ * Machine-readable identifier for the third-party app (e.g. 'slack', 'jira',
135
+ * 'asana'). Stable across the App Shop catalog.
136
+ */
137
+ app_handle?: string;
138
+ /**
139
+ * The user's email address in the third-party app, if known. Null when the app
140
+ * does not expose an email or Rippling did not capture one.
141
+ */
142
+ external_email?: string;
143
+ /**
144
+ * The user's display name in the third-party app, if known. Null when the app does
145
+ * not surface a separate username.
146
+ */
147
+ external_username?: string;
148
+ /**
149
+ * Whether this third-party account has been matched to a Rippling worker.
150
+ */
151
+ match_state?: 'MATCHED' | 'NOT_MATCHED' | 'IGNORED';
152
+ /**
153
+ * Provisioning lifecycle state of this account in the third-party app.
154
+ */
155
+ push_state?: 'INIT' | 'EMPLOYEE_CONFIRMATION_PENDING' | 'EMPLOYEE_CONFIRMATION_ACCEPTED' | 'EMPLOYEE_CONFIRMATION_REJECTED' | 'INVITE_PENDING' | 'INVITE_CONFIRMED' | 'INVITE_FAILED' | 'CREATE_PENDING' | 'CREATE_CONFIRMED' | 'CREATE_FAILED' | 'DELETE_PENDING' | 'DELETE_CONFIRMED' | 'DELETE_FAILED' | 'SUSPEND_PENDING' | 'SUSPEND_CONFIRMED' | 'SUSPEND_FAILED';
156
+ /**
157
+ * Identifier for the user's account in the third-party app workspace. Depending on
158
+ * the integration, this may be an email, username, account handle, or app-specific
159
+ * user id.
160
+ */
161
+ spoke_user_identifier?: string;
162
+ /**
163
+ * The Rippling worker associated with this external app account. Expanding this
164
+ * field requires both `app-users.read` and `workers.read` scopes.
165
+ *
166
+ * Expandable field
167
+ */
168
+ worker?: WorkersAPI.Worker;
169
+ /**
170
+ * ID of the Rippling worker associated with this external app account.
171
+ */
172
+ worker_id?: string;
173
+ }
174
+ export interface AppUserListParams {
175
+ cursor?: string;
176
+ expand?: string;
177
+ filter?: string;
178
+ order_by?: string;
179
+ }
180
+ export interface AppUserRetrieveParams {
181
+ expand?: string;
182
+ }
183
+ export declare namespace AppUsers {
184
+ export { type AppUserListResponse as AppUserListResponse, type AppUserRetrieveResponse as AppUserRetrieveResponse, type AppUserListResponsesPageCursorURL as AppUserListResponsesPageCursorURL, type AppUserListParams as AppUserListParams, type AppUserRetrieveParams as AppUserRetrieveParams, };
185
+ }
186
+ //# sourceMappingURL=app-users.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-users.d.ts","sourceRoot":"","sources":["../src/resources/app-users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,mBAAmB,+BAA4B;AAC3D,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,8BAA2B;AAChE,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;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AAC;IAChC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -0,0 +1,32 @@
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.AppUsers = 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
+ * Mappings between Rippling workers and their user accounts in third-party apps
10
+ */
11
+ class AppUsers extends resource_1.APIResource {
12
+ /**
13
+ * A list of app users.
14
+ *
15
+ * - Requires: `API Tier 1`
16
+ * - Filterable fields: `worker_id`, `spoke_user_identifier`, `app_handle`,
17
+ * `created_at`, `updated_at`
18
+ * - Expandable fields: `worker`
19
+ * - Sortable fields: `id`, `created_at`, `updated_at`
20
+ */
21
+ list(query = {}, options) {
22
+ return this._client.getAPIList('/app-users/', (pagination_1.PageCursorURL), { query, ...options });
23
+ }
24
+ /**
25
+ * Retrieve a specific app user
26
+ */
27
+ retrieve(id, query = {}, options) {
28
+ return this._client.get((0, path_1.path) `/app-users/${id}/`, { query, ...options });
29
+ }
30
+ }
31
+ exports.AppUsers = AppUsers;
32
+ //# sourceMappingURL=app-users.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-users.js","sourceRoot":"","sources":["../src/resources/app-users.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAgE;AAEhE,oDAA8C;AAE9C;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;OAQG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,0BAAkC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF;AA3BD,4BA2BC"}
@@ -0,0 +1,28 @@
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
+ * Mappings between Rippling workers and their user accounts in third-party apps
7
+ */
8
+ export class AppUsers extends APIResource {
9
+ /**
10
+ * A list of app users.
11
+ *
12
+ * - Requires: `API Tier 1`
13
+ * - Filterable fields: `worker_id`, `spoke_user_identifier`, `app_handle`,
14
+ * `created_at`, `updated_at`
15
+ * - Expandable fields: `worker`
16
+ * - Sortable fields: `id`, `created_at`, `updated_at`
17
+ */
18
+ list(query = {}, options) {
19
+ return this._client.getAPIList('/app-users/', (PageCursorURL), { query, ...options });
20
+ }
21
+ /**
22
+ * Retrieve a specific app user
23
+ */
24
+ retrieve(id, query = {}, options) {
25
+ return this._client.get(path `/app-users/${id}/`, { query, ...options });
26
+ }
27
+ }
28
+ //# sourceMappingURL=app-users.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-users.mjs","sourceRoot":"","sources":["../src/resources/app-users.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,QAAS,SAAQ,WAAW;IACvC;;;;;;;;OAQG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,aAAkC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF"}
@@ -0,0 +1,147 @@
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
+ * Device orders (new device shipments, retrievals, etc.) for company workers
9
+ */
10
+ export declare class DeviceOrders extends APIResource {
11
+ /**
12
+ * A list of device orders.
13
+ *
14
+ * - Requires: `API Tier 2`
15
+ * - Filterable fields: `worker_id`, `status`
16
+ * - Expandable fields: `worker`
17
+ * - Sortable fields: `id`, `created_at`, `updated_at`
18
+ */
19
+ list(query?: DeviceOrderListParams | null | undefined, options?: RequestOptions): PagePromise<DeviceOrderListResponsesPageCursorURL, DeviceOrderListResponse>;
20
+ /**
21
+ * Retrieve a specific device order
22
+ */
23
+ retrieve(id: string, query?: DeviceOrderRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<DeviceOrderRetrieveResponse>;
24
+ }
25
+ export type DeviceOrderListResponsesPageCursorURL = PageCursorURL<DeviceOrderListResponse>;
26
+ export interface DeviceOrderListResponse {
27
+ /**
28
+ * Identifier field
29
+ */
30
+ id: string;
31
+ /**
32
+ * Record creation date
33
+ */
34
+ created_at: string;
35
+ /**
36
+ * Record update date
37
+ */
38
+ updated_at: string;
39
+ /**
40
+ * True when a cancellation has been requested but not yet completed.
41
+ */
42
+ cancel_requested?: boolean;
43
+ /**
44
+ * When the order reached a terminal state (COMPLETED, FAILED, or CANCELED).
45
+ */
46
+ completed_at?: string;
47
+ /**
48
+ * The type of hardware order, as reported by the underlying inventory order (for
49
+ * example: New Device Order, Warehouse Return, Warehouse Order, Add Existing
50
+ * Device, Assign Device, Empty Order, or Sell Device).
51
+ */
52
+ order_type?: string;
53
+ /**
54
+ * The ID of the role that requested the order (often an IT admin). Null if
55
+ * system-created.
56
+ */
57
+ requested_by_id?: string;
58
+ /**
59
+ * The order lifecycle state (InventoryFlowState): CREATED, RUNNING, COMPLETED,
60
+ * FAILED, CANCELING, CANCELED.
61
+ */
62
+ status?: string;
63
+ /**
64
+ * The warehouse / vendor provider servicing the order (e.g. CDW, INGRAMMICRO,
65
+ * TD_SYNNEX, GROWRK).
66
+ */
67
+ warehouse_provider?: string;
68
+ /**
69
+ * The worker the order is for.
70
+ *
71
+ * Expandable field
72
+ */
73
+ worker?: WorkersAPI.Worker;
74
+ /**
75
+ * The ID of the worker the order is for (the recipient). Null if unassigned.
76
+ */
77
+ worker_id?: string;
78
+ }
79
+ /**
80
+ * Meta information for the response.
81
+ */
82
+ export interface DeviceOrderRetrieveResponse extends BusinessPartnersAPI.Meta {
83
+ /**
84
+ * Identifier field
85
+ */
86
+ id: string;
87
+ /**
88
+ * Record creation date
89
+ */
90
+ created_at: string;
91
+ /**
92
+ * Record update date
93
+ */
94
+ updated_at: string;
95
+ /**
96
+ * True when a cancellation has been requested but not yet completed.
97
+ */
98
+ cancel_requested?: boolean;
99
+ /**
100
+ * When the order reached a terminal state (COMPLETED, FAILED, or CANCELED).
101
+ */
102
+ completed_at?: string;
103
+ /**
104
+ * The type of hardware order, as reported by the underlying inventory order (for
105
+ * example: New Device Order, Warehouse Return, Warehouse Order, Add Existing
106
+ * Device, Assign Device, Empty Order, or Sell Device).
107
+ */
108
+ order_type?: string;
109
+ /**
110
+ * The ID of the role that requested the order (often an IT admin). Null if
111
+ * system-created.
112
+ */
113
+ requested_by_id?: string;
114
+ /**
115
+ * The order lifecycle state (InventoryFlowState): CREATED, RUNNING, COMPLETED,
116
+ * FAILED, CANCELING, CANCELED.
117
+ */
118
+ status?: string;
119
+ /**
120
+ * The warehouse / vendor provider servicing the order (e.g. CDW, INGRAMMICRO,
121
+ * TD_SYNNEX, GROWRK).
122
+ */
123
+ warehouse_provider?: string;
124
+ /**
125
+ * The worker the order is for.
126
+ *
127
+ * Expandable field
128
+ */
129
+ worker?: WorkersAPI.Worker;
130
+ /**
131
+ * The ID of the worker the order is for (the recipient). Null if unassigned.
132
+ */
133
+ worker_id?: string;
134
+ }
135
+ export interface DeviceOrderListParams {
136
+ cursor?: string;
137
+ expand?: string;
138
+ filter?: string;
139
+ order_by?: string;
140
+ }
141
+ export interface DeviceOrderRetrieveParams {
142
+ expand?: string;
143
+ }
144
+ export declare namespace DeviceOrders {
145
+ export { type DeviceOrderListResponse as DeviceOrderListResponse, type DeviceOrderRetrieveResponse as DeviceOrderRetrieveResponse, type DeviceOrderListResponsesPageCursorURL as DeviceOrderListResponsesPageCursorURL, type DeviceOrderListParams as DeviceOrderListParams, type DeviceOrderRetrieveParams as DeviceOrderRetrieveParams, };
146
+ }
147
+ //# sourceMappingURL=device-orders.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-orders.d.mts","sourceRoot":"","sources":["../src/resources/device-orders.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,mBAAmB,gCAA4B;AAC3D,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,+BAA2B;AAChE,OAAO,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AAC;IAEnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;OAIG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -0,0 +1,147 @@
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
+ * Device orders (new device shipments, retrievals, etc.) for company workers
9
+ */
10
+ export declare class DeviceOrders extends APIResource {
11
+ /**
12
+ * A list of device orders.
13
+ *
14
+ * - Requires: `API Tier 2`
15
+ * - Filterable fields: `worker_id`, `status`
16
+ * - Expandable fields: `worker`
17
+ * - Sortable fields: `id`, `created_at`, `updated_at`
18
+ */
19
+ list(query?: DeviceOrderListParams | null | undefined, options?: RequestOptions): PagePromise<DeviceOrderListResponsesPageCursorURL, DeviceOrderListResponse>;
20
+ /**
21
+ * Retrieve a specific device order
22
+ */
23
+ retrieve(id: string, query?: DeviceOrderRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<DeviceOrderRetrieveResponse>;
24
+ }
25
+ export type DeviceOrderListResponsesPageCursorURL = PageCursorURL<DeviceOrderListResponse>;
26
+ export interface DeviceOrderListResponse {
27
+ /**
28
+ * Identifier field
29
+ */
30
+ id: string;
31
+ /**
32
+ * Record creation date
33
+ */
34
+ created_at: string;
35
+ /**
36
+ * Record update date
37
+ */
38
+ updated_at: string;
39
+ /**
40
+ * True when a cancellation has been requested but not yet completed.
41
+ */
42
+ cancel_requested?: boolean;
43
+ /**
44
+ * When the order reached a terminal state (COMPLETED, FAILED, or CANCELED).
45
+ */
46
+ completed_at?: string;
47
+ /**
48
+ * The type of hardware order, as reported by the underlying inventory order (for
49
+ * example: New Device Order, Warehouse Return, Warehouse Order, Add Existing
50
+ * Device, Assign Device, Empty Order, or Sell Device).
51
+ */
52
+ order_type?: string;
53
+ /**
54
+ * The ID of the role that requested the order (often an IT admin). Null if
55
+ * system-created.
56
+ */
57
+ requested_by_id?: string;
58
+ /**
59
+ * The order lifecycle state (InventoryFlowState): CREATED, RUNNING, COMPLETED,
60
+ * FAILED, CANCELING, CANCELED.
61
+ */
62
+ status?: string;
63
+ /**
64
+ * The warehouse / vendor provider servicing the order (e.g. CDW, INGRAMMICRO,
65
+ * TD_SYNNEX, GROWRK).
66
+ */
67
+ warehouse_provider?: string;
68
+ /**
69
+ * The worker the order is for.
70
+ *
71
+ * Expandable field
72
+ */
73
+ worker?: WorkersAPI.Worker;
74
+ /**
75
+ * The ID of the worker the order is for (the recipient). Null if unassigned.
76
+ */
77
+ worker_id?: string;
78
+ }
79
+ /**
80
+ * Meta information for the response.
81
+ */
82
+ export interface DeviceOrderRetrieveResponse extends BusinessPartnersAPI.Meta {
83
+ /**
84
+ * Identifier field
85
+ */
86
+ id: string;
87
+ /**
88
+ * Record creation date
89
+ */
90
+ created_at: string;
91
+ /**
92
+ * Record update date
93
+ */
94
+ updated_at: string;
95
+ /**
96
+ * True when a cancellation has been requested but not yet completed.
97
+ */
98
+ cancel_requested?: boolean;
99
+ /**
100
+ * When the order reached a terminal state (COMPLETED, FAILED, or CANCELED).
101
+ */
102
+ completed_at?: string;
103
+ /**
104
+ * The type of hardware order, as reported by the underlying inventory order (for
105
+ * example: New Device Order, Warehouse Return, Warehouse Order, Add Existing
106
+ * Device, Assign Device, Empty Order, or Sell Device).
107
+ */
108
+ order_type?: string;
109
+ /**
110
+ * The ID of the role that requested the order (often an IT admin). Null if
111
+ * system-created.
112
+ */
113
+ requested_by_id?: string;
114
+ /**
115
+ * The order lifecycle state (InventoryFlowState): CREATED, RUNNING, COMPLETED,
116
+ * FAILED, CANCELING, CANCELED.
117
+ */
118
+ status?: string;
119
+ /**
120
+ * The warehouse / vendor provider servicing the order (e.g. CDW, INGRAMMICRO,
121
+ * TD_SYNNEX, GROWRK).
122
+ */
123
+ warehouse_provider?: string;
124
+ /**
125
+ * The worker the order is for.
126
+ *
127
+ * Expandable field
128
+ */
129
+ worker?: WorkersAPI.Worker;
130
+ /**
131
+ * The ID of the worker the order is for (the recipient). Null if unassigned.
132
+ */
133
+ worker_id?: string;
134
+ }
135
+ export interface DeviceOrderListParams {
136
+ cursor?: string;
137
+ expand?: string;
138
+ filter?: string;
139
+ order_by?: string;
140
+ }
141
+ export interface DeviceOrderRetrieveParams {
142
+ expand?: string;
143
+ }
144
+ export declare namespace DeviceOrders {
145
+ export { type DeviceOrderListResponse as DeviceOrderListResponse, type DeviceOrderRetrieveResponse as DeviceOrderRetrieveResponse, type DeviceOrderListResponsesPageCursorURL as DeviceOrderListResponsesPageCursorURL, type DeviceOrderListParams as DeviceOrderListParams, type DeviceOrderRetrieveParams as DeviceOrderRetrieveParams, };
146
+ }
147
+ //# sourceMappingURL=device-orders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-orders.d.ts","sourceRoot":"","sources":["../src/resources/device-orders.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,mBAAmB,+BAA4B;AAC3D,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,8BAA2B;AAChE,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;OAOG;IACH,IAAI,CACF,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,qCAAqC,EAAE,uBAAuB,CAAC;IAO9E;;OAEG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;CAG3C;AAED,MAAM,MAAM,qCAAqC,GAAG,aAAa,CAAC,uBAAuB,CAAC,CAAC;AAE3F,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;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IAAI,2BAA2B,EAC/D,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -0,0 +1,34 @@
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.DeviceOrders = 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
+ * Device orders (new device shipments, retrievals, etc.) for company workers
10
+ */
11
+ class DeviceOrders extends resource_1.APIResource {
12
+ /**
13
+ * A list of device orders.
14
+ *
15
+ * - Requires: `API Tier 2`
16
+ * - Filterable fields: `worker_id`, `status`
17
+ * - Expandable fields: `worker`
18
+ * - Sortable fields: `id`, `created_at`, `updated_at`
19
+ */
20
+ list(query = {}, options) {
21
+ return this._client.getAPIList('/device-orders/', (pagination_1.PageCursorURL), {
22
+ query,
23
+ ...options,
24
+ });
25
+ }
26
+ /**
27
+ * Retrieve a specific device order
28
+ */
29
+ retrieve(id, query = {}, options) {
30
+ return this._client.get((0, path_1.path) `/device-orders/${id}/`, { query, ...options });
31
+ }
32
+ }
33
+ exports.DeviceOrders = DeviceOrders;
34
+ //# sourceMappingURL=device-orders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-orders.js","sourceRoot":"","sources":["../src/resources/device-orders.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAgE;AAEhE,oDAA8C;AAE9C;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;OAOG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,0BAAsC,CAAA,EAAE;YACxF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AA7BD,oCA6BC"}
@@ -0,0 +1,30 @@
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
+ * Device orders (new device shipments, retrievals, etc.) for company workers
7
+ */
8
+ export class DeviceOrders extends APIResource {
9
+ /**
10
+ * A list of device orders.
11
+ *
12
+ * - Requires: `API Tier 2`
13
+ * - Filterable fields: `worker_id`, `status`
14
+ * - Expandable fields: `worker`
15
+ * - Sortable fields: `id`, `created_at`, `updated_at`
16
+ */
17
+ list(query = {}, options) {
18
+ return this._client.getAPIList('/device-orders/', (PageCursorURL), {
19
+ query,
20
+ ...options,
21
+ });
22
+ }
23
+ /**
24
+ * Retrieve a specific device order
25
+ */
26
+ retrieve(id, query = {}, options) {
27
+ return this._client.get(path `/device-orders/${id}/`, { query, ...options });
28
+ }
29
+ }
30
+ //# sourceMappingURL=device-orders.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-orders.mjs","sourceRoot":"","sources":["../src/resources/device-orders.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,YAAa,SAAQ,WAAW;IAC3C;;;;;;;OAOG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,aAAsC,CAAA,EAAE;YACxF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF"}