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

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 (41) hide show
  1. package/client.d.mts +6 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +6 -0
  4. package/client.d.ts.map +1 -1
  5. package/client.js +6 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +6 -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/package.json +1 -1
  13. package/resources/device-orders.d.mts +147 -0
  14. package/resources/device-orders.d.mts.map +1 -0
  15. package/resources/device-orders.d.ts +147 -0
  16. package/resources/device-orders.d.ts.map +1 -0
  17. package/resources/device-orders.js +34 -0
  18. package/resources/device-orders.js.map +1 -0
  19. package/resources/device-orders.mjs +30 -0
  20. package/resources/device-orders.mjs.map +1 -0
  21. package/resources/index.d.mts +1 -0
  22. package/resources/index.d.mts.map +1 -1
  23. package/resources/index.d.ts +1 -0
  24. package/resources/index.d.ts.map +1 -1
  25. package/resources/index.js +4 -2
  26. package/resources/index.js.map +1 -1
  27. package/resources/index.mjs +1 -0
  28. package/resources/index.mjs.map +1 -1
  29. package/resources/job-assignments.d.mts +12 -12
  30. package/resources/job-assignments.d.mts.map +1 -1
  31. package/resources/job-assignments.d.ts +12 -12
  32. package/resources/job-assignments.d.ts.map +1 -1
  33. package/src/client.ts +22 -0
  34. package/src/resources/device-orders.ts +200 -0
  35. package/src/resources/index.ts +8 -0
  36. package/src/resources/job-assignments.ts +12 -12
  37. package/src/version.ts +1 -1
  38. package/version.d.mts +1 -1
  39. package/version.d.ts +1 -1
  40. package/version.js +1 -1
  41. package/version.mjs +1 -1
@@ -0,0 +1,554 @@
1
+ /*
2
+ * Procurement Approval Hub - vendors, contracts, purchase requests, approvals, and invoices.
3
+ *
4
+ * pa_vendor__c <- vendor profile and risk tier
5
+ * pa_contract__c <- vendor agreement and spend ceiling
6
+ * pa_purchase_request__c <- request tied to a vendor and optional contract
7
+ * pa_approval_step__c <- approval routing line for a request
8
+ * pa_invoice__c <- invoice received against a contract
9
+ *
10
+ * Run:
11
+ * yarn tsn examples/manifest/procurement-approval-hub/procurement-approval-hub.ts \
12
+ * > examples/manifest/procurement-approval-hub/manifest.json
13
+ */
14
+
15
+ import {
16
+ Category,
17
+ CustomObject,
18
+ CustomObjectFieldSection,
19
+ CustomObjectPageLayout,
20
+ DateField,
21
+ EmailField,
22
+ FormulaField,
23
+ ListViewDef,
24
+ LongTextField,
25
+ LookupField,
26
+ ManifestBuilder,
27
+ ManifestFunction,
28
+ NumberField,
29
+ ParentChildField,
30
+ Rule,
31
+ SelectField,
32
+ SummaryField,
33
+ TextField,
34
+ Validation,
35
+ Workflow,
36
+ } from '@rippling/rippling-sdk/lib/manifest';
37
+
38
+ const manifest = new ManifestBuilder({
39
+ key: 'procurement_approval_hub',
40
+ name: 'Procurement Approval Hub',
41
+ description: 'Vendor contracts, purchase requests, approval routing, and invoice tracking',
42
+ });
43
+
44
+ const category = new Category(manifest, {
45
+ apiName: 'procurement__c',
46
+ name: 'Procurement',
47
+ description: 'Procurement workflow and vendor governance records',
48
+ });
49
+
50
+ const vendorObj = new CustomObject(manifest, {
51
+ apiName: 'pa_vendor__c',
52
+ name: 'Vendor',
53
+ pluralLabel: 'Vendors',
54
+ category,
55
+ description: 'Vendor profile, risk tier, and compliance owner',
56
+ });
57
+
58
+ const vendorSection = new CustomObjectFieldSection(vendorObj, {
59
+ name: 'Vendor',
60
+ sectionId: 'sec_pa_vendor',
61
+ });
62
+
63
+ const vendorLegalNameField = new TextField(vendorObj, {
64
+ apiName: 'legal_name__c',
65
+ displayName: 'Legal name',
66
+ description: 'Registered legal vendor name',
67
+ required: true,
68
+ maxLength: 200,
69
+ section: vendorSection,
70
+ });
71
+
72
+ const vendorCategoryField = new SelectField(vendorObj, {
73
+ apiName: 'vendor_category__c',
74
+ displayName: 'Vendor category',
75
+ description: 'Primary spend category',
76
+ options: ['Software', 'Facilities', 'Professional services', 'Marketing', 'Hardware', 'Other'],
77
+ required: true,
78
+ section: vendorSection,
79
+ });
80
+
81
+ const vendorRiskField = new SelectField(vendorObj, {
82
+ apiName: 'risk_tier__c',
83
+ displayName: 'Risk tier',
84
+ description: 'Risk tier from diligence review',
85
+ options: ['Low', 'Medium', 'High', 'Critical'],
86
+ required: true,
87
+ section: vendorSection,
88
+ });
89
+
90
+ const vendorContactEmailField = new EmailField(vendorObj, {
91
+ apiName: 'contact_email__c',
92
+ displayName: 'Contact email',
93
+ description: 'Primary vendor contact email',
94
+ section: vendorSection,
95
+ });
96
+
97
+ const contractObj = new CustomObject(manifest, {
98
+ apiName: 'pa_contract__c',
99
+ name: 'Contract',
100
+ pluralLabel: 'Contracts',
101
+ category,
102
+ description: 'Vendor contract with dates, status, and spend ceiling',
103
+ });
104
+
105
+ const contractSection = new CustomObjectFieldSection(contractObj, {
106
+ name: 'Contract',
107
+ sectionId: 'sec_pa_contract',
108
+ });
109
+
110
+ const contractVendorRef = new ParentChildField(contractObj, {
111
+ apiName: 'vendor_ref__c',
112
+ displayName: 'Vendor',
113
+ target: vendorObj,
114
+ relatedDataLabel: 'Contracts',
115
+ parentChildType: 'PRIMARY',
116
+ enableParentOwnerInheritance: false,
117
+ description: 'Vendor this contract belongs to',
118
+ section: contractSection,
119
+ });
120
+
121
+ const contractStatusField = new SelectField(contractObj, {
122
+ apiName: 'status__c',
123
+ displayName: 'Status',
124
+ description: 'Contract lifecycle status',
125
+ options: ['Draft', 'In review', 'Active', 'Expired', 'Terminated'],
126
+ required: true,
127
+ section: contractSection,
128
+ });
129
+
130
+ const contractStartDateField = new DateField(contractObj, {
131
+ apiName: 'start_date__c',
132
+ displayName: 'Start date',
133
+ description: 'Contract effective date',
134
+ section: contractSection,
135
+ });
136
+
137
+ const contractEndDateField = new DateField(contractObj, {
138
+ apiName: 'end_date__c',
139
+ displayName: 'End date',
140
+ description: 'Contract expiration date',
141
+ section: contractSection,
142
+ });
143
+
144
+ const contractCeilingCentsField = new NumberField(contractObj, {
145
+ apiName: 'spend_ceiling_cents__c',
146
+ displayName: 'Spend ceiling (cents)',
147
+ description: 'Approved maximum spend in cents',
148
+ decimalPlaces: 0,
149
+ section: contractSection,
150
+ });
151
+
152
+ const contractTermsField = new LongTextField(contractObj, {
153
+ apiName: 'key_terms__c',
154
+ displayName: 'Key terms',
155
+ description: 'Renewal, data processing, and termination notes',
156
+ maxLength: 6000,
157
+ section: contractSection,
158
+ });
159
+
160
+ const requestObj = new CustomObject(manifest, {
161
+ apiName: 'pa_purchase_request__c',
162
+ name: 'Purchase request',
163
+ pluralLabel: 'Purchase requests',
164
+ category,
165
+ description: 'Purchase request with business justification and approval state',
166
+ });
167
+
168
+ const requestSection = new CustomObjectFieldSection(requestObj, {
169
+ name: 'Purchase request',
170
+ sectionId: 'sec_pa_request',
171
+ });
172
+
173
+ const requestVendorRef = new LookupField(requestObj, {
174
+ apiName: 'vendor_ref__c',
175
+ displayName: 'Vendor',
176
+ target: vendorObj,
177
+ relatedDataLabel: 'Purchase requests',
178
+ description: 'Preferred or selected vendor',
179
+ required: true,
180
+ section: requestSection,
181
+ });
182
+
183
+ const requestContractRef = new LookupField(requestObj, {
184
+ apiName: 'contract_ref__c',
185
+ displayName: 'Contract',
186
+ target: contractObj,
187
+ relatedDataLabel: 'Purchase requests',
188
+ description: 'Contract used for this request, if any',
189
+ section: requestSection,
190
+ });
191
+
192
+ const requestAmountCentsField = new NumberField(requestObj, {
193
+ apiName: 'amount_cents__c',
194
+ displayName: 'Amount (cents)',
195
+ description: 'Requested spend amount in cents',
196
+ decimalPlaces: 0,
197
+ required: true,
198
+ section: requestSection,
199
+ });
200
+
201
+ const requestStatusField = new SelectField(requestObj, {
202
+ apiName: 'status__c',
203
+ displayName: 'Status',
204
+ description: 'Approval status',
205
+ options: ['Draft', 'Submitted', 'In approval', 'Approved', 'Rejected', 'Ordered'],
206
+ required: true,
207
+ section: requestSection,
208
+ });
209
+
210
+ const requestNeedByField = new DateField(requestObj, {
211
+ apiName: 'need_by__c',
212
+ displayName: 'Need by',
213
+ description: 'Requested delivery or purchase date',
214
+ section: requestSection,
215
+ });
216
+
217
+ const requestJustificationField = new LongTextField(requestObj, {
218
+ apiName: 'business_justification__c',
219
+ displayName: 'Business justification',
220
+ description: 'Why the purchase is needed',
221
+ maxLength: 6000,
222
+ section: requestSection,
223
+ });
224
+
225
+ const approvalObj = new CustomObject(manifest, {
226
+ apiName: 'pa_approval_step__c',
227
+ name: 'Approval step',
228
+ pluralLabel: 'Approval steps',
229
+ category,
230
+ description: 'Approval routing line tied to a purchase request',
231
+ });
232
+
233
+ const approvalSection = new CustomObjectFieldSection(approvalObj, {
234
+ name: 'Approval step',
235
+ sectionId: 'sec_pa_approval',
236
+ });
237
+
238
+ const approvalRequestRef = new ParentChildField(approvalObj, {
239
+ apiName: 'purchase_request_ref__c',
240
+ displayName: 'Purchase request',
241
+ target: requestObj,
242
+ relatedDataLabel: 'Approval steps',
243
+ parentChildType: 'PRIMARY',
244
+ enableParentOwnerInheritance: true,
245
+ description: 'Purchase request this approval belongs to',
246
+ section: approvalSection,
247
+ });
248
+
249
+ const approvalSequenceField = new NumberField(approvalObj, {
250
+ apiName: 'sequence__c',
251
+ displayName: 'Sequence',
252
+ description: 'Approval sequence number',
253
+ decimalPlaces: 0,
254
+ required: true,
255
+ section: approvalSection,
256
+ });
257
+
258
+ const approvalRoleField = new SelectField(approvalObj, {
259
+ apiName: 'approval_role__c',
260
+ displayName: 'Approval role',
261
+ description: 'Approval lane',
262
+ options: ['Budget owner', 'Finance', 'Security', 'Legal', 'Procurement'],
263
+ required: true,
264
+ section: approvalSection,
265
+ });
266
+
267
+ const approvalStatusField = new SelectField(approvalObj, {
268
+ apiName: 'status__c',
269
+ displayName: 'Status',
270
+ description: 'Approval step status',
271
+ options: ['Pending', 'Approved', 'Rejected', 'Skipped'],
272
+ required: true,
273
+ section: approvalSection,
274
+ });
275
+
276
+ const invoiceObj = new CustomObject(manifest, {
277
+ apiName: 'pa_invoice__c',
278
+ name: 'Invoice',
279
+ pluralLabel: 'Invoices',
280
+ category,
281
+ description: 'Invoice received against a vendor contract',
282
+ });
283
+
284
+ const invoiceSection = new CustomObjectFieldSection(invoiceObj, {
285
+ name: 'Invoice',
286
+ sectionId: 'sec_pa_invoice',
287
+ });
288
+
289
+ const invoiceContractRef = new ParentChildField(invoiceObj, {
290
+ apiName: 'contract_ref__c',
291
+ displayName: 'Contract',
292
+ target: contractObj,
293
+ relatedDataLabel: 'Invoices',
294
+ parentChildType: 'PRIMARY',
295
+ enableParentOwnerInheritance: false,
296
+ description: 'Contract this invoice is billed against',
297
+ section: invoiceSection,
298
+ });
299
+
300
+ const invoiceNumberField = new TextField(invoiceObj, {
301
+ apiName: 'invoice_number__c',
302
+ displayName: 'Invoice number',
303
+ description: 'Vendor invoice number',
304
+ maxLength: 120,
305
+ required: true,
306
+ section: invoiceSection,
307
+ });
308
+
309
+ const invoiceAmountCentsField = new NumberField(invoiceObj, {
310
+ apiName: 'amount_cents__c',
311
+ displayName: 'Amount (cents)',
312
+ description: 'Invoice amount in cents',
313
+ decimalPlaces: 0,
314
+ required: true,
315
+ section: invoiceSection,
316
+ });
317
+
318
+ const invoiceStatusField = new SelectField(invoiceObj, {
319
+ apiName: 'status__c',
320
+ displayName: 'Status',
321
+ description: 'Invoice processing status',
322
+ options: ['Received', 'Matched', 'Approved', 'Paid', 'Exception'],
323
+ required: true,
324
+ section: invoiceSection,
325
+ });
326
+
327
+ const contractCountOnVendor = new SummaryField(vendorObj, {
328
+ apiName: 'contract_count__c',
329
+ displayName: 'Contracts',
330
+ aggregates: contractStatusField,
331
+ using: 'COUNT',
332
+ lookup: contractVendorRef,
333
+ description: 'Contracts for this vendor',
334
+ section: vendorSection,
335
+ });
336
+
337
+ const approvalCountOnRequest = new SummaryField(requestObj, {
338
+ apiName: 'approval_step_count__c',
339
+ displayName: 'Approval steps',
340
+ aggregates: approvalRoleField,
341
+ using: 'COUNT',
342
+ lookup: approvalRequestRef,
343
+ description: 'Approval steps attached to this request',
344
+ section: requestSection,
345
+ });
346
+
347
+ const invoicedAmountOnContract = new SummaryField(contractObj, {
348
+ apiName: 'invoiced_amount_cents__c',
349
+ displayName: 'Invoiced amount (cents)',
350
+ aggregates: invoiceAmountCentsField,
351
+ using: 'SUM',
352
+ lookup: invoiceContractRef,
353
+ description: 'Total invoice amount billed against this contract',
354
+ section: contractSection,
355
+ });
356
+
357
+ const requestLabelField = new FormulaField(requestObj, {
358
+ apiName: 'approval_label__c',
359
+ displayName: 'Approval label',
360
+ description: 'Status and amount for approval queues',
361
+ fieldType: 'TEXT',
362
+ maxLength: 240,
363
+ formula: "CONCATENATE(status__c, ' - ', amount_cents__c)",
364
+ section: requestSection,
365
+ });
366
+
367
+ new Validation(contractObj, {
368
+ ruleId: 'pa_contract_end_after_start',
369
+ displayName: 'Contract end must be after start',
370
+ rqlFormula: '(end_date__c <= start_date__c)',
371
+ errorMessage: 'Contract end date must be after start date.',
372
+ ruleDescription: 'Prevents inverted contract terms',
373
+ state: 'ACTIVE',
374
+ level: 'FIELD',
375
+ fieldRef: contractEndDateField,
376
+ });
377
+
378
+ new Validation(requestObj, {
379
+ ruleId: 'pa_request_amount_positive',
380
+ displayName: 'Request amount must be positive',
381
+ rqlFormula: '(amount_cents__c <= 0)',
382
+ errorMessage: 'Amount must be greater than zero.',
383
+ ruleDescription: 'Blocks zero-value purchase requests',
384
+ state: 'ACTIVE',
385
+ level: 'FIELD',
386
+ fieldRef: requestAmountCentsField,
387
+ });
388
+
389
+ new Rule(requestObj, {
390
+ flowId: 'pa_default_request_status',
391
+ flowName: 'Default purchase request status',
392
+ triggerType: 'CREATE',
393
+ description: 'New purchase requests start as Draft',
394
+ actions: [{ targetField: requestStatusField, fixedValue: ['Draft'] }],
395
+ });
396
+
397
+ new Rule(approvalObj, {
398
+ flowId: 'pa_default_approval_status',
399
+ flowName: 'Default approval step status',
400
+ triggerType: 'CREATE',
401
+ description: 'New approval steps start Pending',
402
+ actions: [{ targetField: approvalStatusField, fixedValue: ['Pending'] }],
403
+ });
404
+
405
+ new ListViewDef(vendorObj, {
406
+ viewId: 'view_pa_vendors',
407
+ name: 'Vendors',
408
+ description: 'Vendor directory with risk and contract count',
409
+ fields: [
410
+ 'name',
411
+ vendorLegalNameField,
412
+ vendorCategoryField,
413
+ vendorRiskField,
414
+ vendorContactEmailField,
415
+ contractCountOnVendor,
416
+ ],
417
+ orderBy: vendorLegalNameField,
418
+ sortOrder: 'ASC',
419
+ isPublic: true,
420
+ objectScope: 'all',
421
+ });
422
+
423
+ new ListViewDef(contractObj, {
424
+ viewId: 'view_pa_contracts',
425
+ name: 'Contracts',
426
+ description: 'Contract inventory with dates and invoiced amount',
427
+ fields: [
428
+ 'name',
429
+ contractVendorRef,
430
+ contractStatusField,
431
+ contractStartDateField,
432
+ contractEndDateField,
433
+ contractCeilingCentsField,
434
+ invoicedAmountOnContract,
435
+ ],
436
+ orderBy: contractEndDateField,
437
+ sortOrder: 'ASC',
438
+ isPublic: true,
439
+ objectScope: 'all',
440
+ });
441
+
442
+ new ListViewDef(requestObj, {
443
+ viewId: 'view_pa_purchase_requests',
444
+ name: 'Purchase requests',
445
+ description: 'Approval queue for purchase requests',
446
+ fields: [
447
+ 'name',
448
+ requestVendorRef,
449
+ requestContractRef,
450
+ requestAmountCentsField,
451
+ requestStatusField,
452
+ requestNeedByField,
453
+ approvalCountOnRequest,
454
+ requestLabelField,
455
+ ],
456
+ orderBy: requestNeedByField,
457
+ sortOrder: 'ASC',
458
+ isPublic: true,
459
+ objectScope: 'all',
460
+ });
461
+
462
+ new ListViewDef(approvalObj, {
463
+ viewId: 'view_pa_approval_steps',
464
+ name: 'Approval steps',
465
+ description: 'Approval routing lines by request',
466
+ fields: ['name', approvalRequestRef, approvalSequenceField, approvalRoleField, approvalStatusField],
467
+ orderBy: approvalSequenceField,
468
+ sortOrder: 'ASC',
469
+ isPublic: true,
470
+ objectScope: 'all',
471
+ });
472
+
473
+ new ListViewDef(invoiceObj, {
474
+ viewId: 'view_pa_invoices',
475
+ name: 'Invoices',
476
+ description: 'Invoices received against contracts',
477
+ fields: ['name', invoiceContractRef, invoiceNumberField, invoiceAmountCentsField, invoiceStatusField],
478
+ orderBy: invoiceContractRef,
479
+ sortOrder: 'ASC',
480
+ isPublic: true,
481
+ objectScope: 'all',
482
+ });
483
+
484
+ CustomObjectPageLayout.basic(vendorObj, {
485
+ section: vendorSection,
486
+ fields: [
487
+ 'name',
488
+ vendorLegalNameField,
489
+ vendorCategoryField,
490
+ vendorRiskField,
491
+ vendorContactEmailField,
492
+ contractCountOnVendor,
493
+ ],
494
+ });
495
+
496
+ CustomObjectPageLayout.basic(contractObj, {
497
+ section: contractSection,
498
+ fields: [
499
+ 'name',
500
+ contractVendorRef,
501
+ contractStatusField,
502
+ contractStartDateField,
503
+ contractEndDateField,
504
+ contractCeilingCentsField,
505
+ invoicedAmountOnContract,
506
+ contractTermsField,
507
+ ],
508
+ });
509
+
510
+ CustomObjectPageLayout.basic(requestObj, {
511
+ section: requestSection,
512
+ fields: [
513
+ 'name',
514
+ requestVendorRef,
515
+ requestContractRef,
516
+ requestAmountCentsField,
517
+ requestStatusField,
518
+ requestNeedByField,
519
+ approvalCountOnRequest,
520
+ requestLabelField,
521
+ requestJustificationField,
522
+ ],
523
+ });
524
+
525
+ CustomObjectPageLayout.basic(approvalObj, {
526
+ section: approvalSection,
527
+ fields: ['name', approvalRequestRef, approvalSequenceField, approvalRoleField, approvalStatusField],
528
+ });
529
+
530
+ CustomObjectPageLayout.basic(invoiceObj, {
531
+ section: invoiceSection,
532
+ fields: ['name', invoiceContractRef, invoiceNumberField, invoiceAmountCentsField, invoiceStatusField],
533
+ });
534
+
535
+ const routeApprovalFunction = new ManifestFunction(manifest, {
536
+ apiName: 'pa_route_purchase_request_fn',
537
+ name: 'Route purchase request approvals',
538
+ description: 'Function invoked by workflow when a purchase request is submitted',
539
+ });
540
+
541
+ new Workflow(manifest, {
542
+ definitionId: 'pa_purchase_request_submitted_workflow',
543
+ title: 'Purchase request submitted',
544
+ description: 'Routes purchase requests into approval steps when request records are created',
545
+ function: routeApprovalFunction,
546
+ trigger: {
547
+ automation_event_type: 'AUTOMATION_EVENT_TYPE_RECORD_CHANGE',
548
+ og_module: 'custom_objects',
549
+ base_model: requestObj.getApiName(),
550
+ record_change_operation_type: 'RECORD_CHANGE_OPERATION_TYPE_CREATE',
551
+ },
552
+ });
553
+
554
+ console.log(manifest.preview());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rippling/rippling-sdk",
3
- "version": "0.2.0-alpha.61",
3
+ "version": "0.2.0-alpha.62",
4
4
  "description": "The official TypeScript library for the Rippling SDK API",
5
5
  "author": "Rippling SDK <no-reply@rippling.com>",
6
6
  "types": "./index.d.ts",
@@ -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