@rippling/rippling-sdk 0.2.0-alpha.60 → 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.
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/examples/manifest/dental-practice-management/dental-practice-management.ts +5 -6
- package/examples/manifest/field-service-dispatch/field-service-dispatch.ts +530 -0
- package/examples/manifest/grant-program-management/grant-program-management.ts +594 -0
- package/examples/manifest/gym-membership-management/gym-membership-management.ts +5 -6
- package/examples/manifest/procurement-approval-hub/procurement-approval-hub.ts +554 -0
- package/examples/manifest/simple-todo-app/simple-todo-app.ts +1 -3
- package/lib/manifest/index.d.mts +1 -1
- package/lib/manifest/index.d.mts.map +1 -1
- package/lib/manifest/index.d.ts +1 -1
- package/lib/manifest/index.d.ts.map +1 -1
- package/lib/manifest/index.js.map +1 -1
- package/lib/manifest/index.mjs.map +1 -1
- package/lib/manifest/manifest-function.d.mts +7 -4
- package/lib/manifest/manifest-function.d.mts.map +1 -1
- package/lib/manifest/manifest-function.d.ts +7 -4
- package/lib/manifest/manifest-function.d.ts.map +1 -1
- package/lib/manifest/manifest-function.js +11 -7
- package/lib/manifest/manifest-function.js.map +1 -1
- package/lib/manifest/manifest-function.mjs +10 -7
- package/lib/manifest/manifest-function.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/device-orders.d.mts +147 -0
- package/resources/device-orders.d.mts.map +1 -0
- package/resources/device-orders.d.ts +147 -0
- package/resources/device-orders.d.ts.map +1 -0
- package/resources/device-orders.js +34 -0
- package/resources/device-orders.js.map +1 -0
- package/resources/device-orders.mjs +30 -0
- package/resources/device-orders.mjs.map +1 -0
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/job-assignments.d.mts +12 -12
- package/resources/job-assignments.d.mts.map +1 -1
- package/resources/job-assignments.d.ts +12 -12
- package/resources/job-assignments.d.ts.map +1 -1
- package/src/client.ts +22 -0
- package/src/lib/manifest/index.ts +1 -0
- package/src/lib/manifest/manifest-function.ts +18 -8
- package/src/resources/device-orders.ts +200 -0
- package/src/resources/index.ts +8 -0
- package/src/resources/job-assignments.ts +12 -12
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-function.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest-function.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":"AAEA,OAAO,EAA8B,KAAK,8BAA8B,EAAE,wCAAoC;AAC9G,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,+BAA2B;AAGnF,MAAM,MAAM,gBAAgB,GAAG,KAAK,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACxC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"./manifest-builder.js";
|
|
3
|
+
export type FunctionCodeFile = `./${string}.ts` | `/${string}.ts`;
|
|
3
4
|
/**
|
|
4
5
|
* Initialization properties for {@link ManifestFunction}.
|
|
5
6
|
*/
|
|
@@ -17,11 +18,12 @@ export interface ManifestFunctionProps {
|
|
|
17
18
|
*/
|
|
18
19
|
name: string;
|
|
19
20
|
/**
|
|
20
|
-
* TypeScript handler source
|
|
21
|
+
* Path to a TypeScript handler source file. The file must export an
|
|
22
|
+
* `onRipplingEvent` function. Its contents are serialized to `code_draft`.
|
|
21
23
|
*
|
|
22
24
|
* Optional. @default `''`
|
|
23
25
|
*/
|
|
24
|
-
|
|
26
|
+
codeFile?: FunctionCodeFile;
|
|
25
27
|
/**
|
|
26
28
|
* Human-readable description of what this function does.
|
|
27
29
|
*
|
|
@@ -77,7 +79,7 @@ export interface ManifestFunctionProps {
|
|
|
77
79
|
* apiName: 'gym_today_schedule_fn',
|
|
78
80
|
* name: 'Today\'s schedule (SDUI)',
|
|
79
81
|
* description: 'Searchable grid of class sessions',
|
|
80
|
-
*
|
|
82
|
+
* codeFile: './functions/gym_today_schedule_fn/code.ts',
|
|
81
83
|
* dependencies: {
|
|
82
84
|
* '@rippling/rippling-sdk': '^0.2.0-alpha.33',
|
|
83
85
|
* },
|
|
@@ -92,7 +94,8 @@ export declare class ManifestFunction {
|
|
|
92
94
|
static toDeletionIdentifier(apiName: string): ManifestComponentDeletion;
|
|
93
95
|
private readonly _apiName;
|
|
94
96
|
private readonly _name;
|
|
95
|
-
private readonly
|
|
97
|
+
private readonly _codeFile;
|
|
98
|
+
private _codeDraft;
|
|
96
99
|
private readonly _description;
|
|
97
100
|
private readonly _dependencies;
|
|
98
101
|
private readonly _deploymentOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-function.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest-function.d.ts","sourceRoot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AkC;IACrE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAuB;IACvD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IAEnC;;;OAGG;gBACS,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,qBAAqB;IAY9D;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,8BAAmC,GAAG,gBAAgB;IAIxG,sEAAsE;IACtE,MAAM,CAAC,sBAAsB,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB;IAkBrG;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAgB9B"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ManifestFunction = void 0;
|
|
4
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
5
|
+
const fs = tslib_1.__importStar(require("node:fs"));
|
|
4
6
|
const existing_manifest_context_1 = require("./existing-manifest-context.js");
|
|
5
7
|
const _existing_component_fields_1 = require("./_existing-component-fields.js");
|
|
6
8
|
/**
|
|
@@ -26,7 +28,7 @@ const _existing_component_fields_1 = require("./_existing-component-fields.js");
|
|
|
26
28
|
* apiName: 'gym_today_schedule_fn',
|
|
27
29
|
* name: 'Today\'s schedule (SDUI)',
|
|
28
30
|
* description: 'Searchable grid of class sessions',
|
|
29
|
-
*
|
|
31
|
+
* codeFile: './functions/gym_today_schedule_fn/code.ts',
|
|
30
32
|
* dependencies: {
|
|
31
33
|
* '@rippling/rippling-sdk': '^0.2.0-alpha.33',
|
|
32
34
|
* },
|
|
@@ -50,7 +52,7 @@ class ManifestFunction {
|
|
|
50
52
|
constructor(scope, props) {
|
|
51
53
|
this._apiName = props.apiName;
|
|
52
54
|
this._name = props.name;
|
|
53
|
-
this.
|
|
55
|
+
this._codeFile = props.codeFile;
|
|
54
56
|
this._description = props.description;
|
|
55
57
|
this._dependencies = props.dependencies;
|
|
56
58
|
this._deploymentOptions = props.deploymentOptions;
|
|
@@ -71,8 +73,7 @@ class ManifestFunction {
|
|
|
71
73
|
name: (0, _existing_component_fields_1.requireStringComponentField)(component, 'name', ManifestFunction.componentType),
|
|
72
74
|
description: (0, _existing_component_fields_1.optionalStringComponentField)(component, 'description'),
|
|
73
75
|
};
|
|
74
|
-
|
|
75
|
-
props.code = component['code_draft'];
|
|
76
|
+
const codeDraft = (0, _existing_component_fields_1.optionalStringComponentField)(component, 'code_draft');
|
|
76
77
|
if (component['dependencies'] !== undefined)
|
|
77
78
|
props.dependencies = component['dependencies'];
|
|
78
79
|
if (component['deployment_options'] !== undefined) {
|
|
@@ -82,7 +83,9 @@ class ManifestFunction {
|
|
|
82
83
|
props.allowedDomains = component['allowed_domains'];
|
|
83
84
|
if (component['is_async'] !== undefined)
|
|
84
85
|
props.isAsync = component['is_async'];
|
|
85
|
-
|
|
86
|
+
const manifestFunction = new ManifestFunction(scope, props);
|
|
87
|
+
manifestFunction._codeDraft = codeDraft;
|
|
88
|
+
return manifestFunction;
|
|
86
89
|
}
|
|
87
90
|
/**
|
|
88
91
|
* Returns the api_name of this function (e.g. `'gym_today_schedule_fn'`).
|
|
@@ -102,8 +105,9 @@ class ManifestFunction {
|
|
|
102
105
|
api_name: this._apiName,
|
|
103
106
|
description: this._description,
|
|
104
107
|
};
|
|
105
|
-
|
|
106
|
-
|
|
108
|
+
const codeDraft = this._codeDraft ?? (this._codeFile ? fs.readFileSync(this._codeFile, 'utf-8') : undefined);
|
|
109
|
+
if (codeDraft)
|
|
110
|
+
component['code_draft'] = codeDraft;
|
|
107
111
|
if (this._dependencies != null)
|
|
108
112
|
component['dependencies'] = this._dependencies;
|
|
109
113
|
if (this._deploymentOptions != null)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-function.js","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest-function.js","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":";;;;AAAA,oDAA8B;AAE9B,8EAA8G;AAE9G,gFAAyG;AA4DzG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAa,gBAAgB;IAG3B,MAAM,CAAC,oBAAoB,CAAC,OAAe;QACzC,OAAO;YACL,IAAI,EAAE,gBAAgB,CAAC,aAAa;YACpC,QAAQ,EAAE,OAAO;SAClB,CAAC;IACJ,CAAC;IAYD;;;OAGG;IACH,YAAY,KAAoB,EAAE,KAA4B;QAC5D,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,iBAAiB,CAAC;QAClD,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC;QACvC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAe,EAAE,UAA0C,EAAE;QACnF,OAAO,IAAA,sDAA0B,EAAC,OAAO,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACnE,CAAC;IAED,sEAAsE;IACtE,MAAM,CAAC,sBAAsB,CAAC,KAAoB,EAAE,SAA8B;QAChF,MAAM,KA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AAC,YAAY;SAC/B,CAAC;QACF,MAAM,SAAS,GACb,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAC7F,IAAI,SAAS;YAAE,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;QACnD,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI;YAAE,SAAS,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;QAC/E,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI;YAAE,SAAS,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC;QAC/F,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI;YAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;QACtF,IAAI,IAAI,CAAC,QAAQ;YAAE,SAAS,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;QAChD,OAAO,SAAS,CAAC;IACnB,CAAC;;AAzFH,4CA0FC;AAzFiB,8BAAa,GAAG,UAAmB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
1
2
|
import { getExistingManifestContext } from "./existing-manifest-context.mjs";
|
|
2
3
|
import { optionalStringComponentField, requireStringComponentField } from "./_existing-component-fields.mjs";
|
|
3
4
|
/**
|
|
@@ -23,7 +24,7 @@ import { optionalStringComponentField, requireStringComponentField } from "./_ex
|
|
|
23
24
|
* apiName: 'gym_today_schedule_fn',
|
|
24
25
|
* name: 'Today\'s schedule (SDUI)',
|
|
25
26
|
* description: 'Searchable grid of class sessions',
|
|
26
|
-
*
|
|
27
|
+
* codeFile: './functions/gym_today_schedule_fn/code.ts',
|
|
27
28
|
* dependencies: {
|
|
28
29
|
* '@rippling/rippling-sdk': '^0.2.0-alpha.33',
|
|
29
30
|
* },
|
|
@@ -47,7 +48,7 @@ export class ManifestFunction {
|
|
|
47
48
|
constructor(scope, props) {
|
|
48
49
|
this._apiName = props.apiName;
|
|
49
50
|
this._name = props.name;
|
|
50
|
-
this.
|
|
51
|
+
this._codeFile = props.codeFile;
|
|
51
52
|
this._description = props.description;
|
|
52
53
|
this._dependencies = props.dependencies;
|
|
53
54
|
this._deploymentOptions = props.deploymentOptions;
|
|
@@ -68,8 +69,7 @@ export class ManifestFunction {
|
|
|
68
69
|
name: requireStringComponentField(component, 'name', ManifestFunction.componentType),
|
|
69
70
|
description: optionalStringComponentField(component, 'description'),
|
|
70
71
|
};
|
|
71
|
-
|
|
72
|
-
props.code = component['code_draft'];
|
|
72
|
+
const codeDraft = optionalStringComponentField(component, 'code_draft');
|
|
73
73
|
if (component['dependencies'] !== undefined)
|
|
74
74
|
props.dependencies = component['dependencies'];
|
|
75
75
|
if (component['deployment_options'] !== undefined) {
|
|
@@ -79,7 +79,9 @@ export class ManifestFunction {
|
|
|
79
79
|
props.allowedDomains = component['allowed_domains'];
|
|
80
80
|
if (component['is_async'] !== undefined)
|
|
81
81
|
props.isAsync = component['is_async'];
|
|
82
|
-
|
|
82
|
+
const manifestFunction = new ManifestFunction(scope, props);
|
|
83
|
+
manifestFunction._codeDraft = codeDraft;
|
|
84
|
+
return manifestFunction;
|
|
83
85
|
}
|
|
84
86
|
/**
|
|
85
87
|
* Returns the api_name of this function (e.g. `'gym_today_schedule_fn'`).
|
|
@@ -99,8 +101,9 @@ export class ManifestFunction {
|
|
|
99
101
|
api_name: this._apiName,
|
|
100
102
|
description: this._description,
|
|
101
103
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
const codeDraft = this._codeDraft ?? (this._codeFile ? fs.readFileSync(this._codeFile, 'utf-8') : undefined);
|
|
105
|
+
if (codeDraft)
|
|
106
|
+
component['code_draft'] = codeDraft;
|
|
104
107
|
if (this._dependencies != null)
|
|
105
108
|
component['dependencies'] = this._dependencies;
|
|
106
109
|
if (this._deploymentOptions != null)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-function.mjs","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAuC,wCAAoC;AAE9G,OAAO,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,yCAAqC;
|
|
1
|
+
{"version":3,"file":"manifest-function.mjs","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,0BAA0B,EAAuC,wCAAoC;AAE9G,OAAO,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,yCAAqC;AA4DzG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,OAAO,gBAAgB;IAG3B,MAAM,CAAC,oBAAoB,CAAC,OAAe;QACzC,OAAO;YACL,IAAI,EAAE,gBAAgB,CAAC,aAAa;YACpC,QAAQ,EAAE,OAAO;SAClB,CAAC;IACJ,CAAC;IAYD;;;OAGG;IACH,YAAY,KAAoB,EAAE,KAA4B;QAC5D,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,iBAAiB,CAAC;QAClD,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC;QACvC,KAAK,CAAC,SAAS,CAAC,IA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U;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,MAAM,SAAS,GAAwB;YACrC,IAAI,EAAE,gBAAgB,CAAC,aAAa;YACpC,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,IAAI,CAAC,YAAY;SAC/B,CAAC;QACF,MAAM,SAAS,GACb,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAC7F,IAAI,SAAS;YAAE,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;QACnD,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI;YAAE,SAAS,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;QAC/E,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI;YAAE,SAAS,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC;QAC/F,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI;YAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;QACtF,IAAI,IAAI,CAAC,QAAQ;YAAE,SAAS,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;QAChD,OAAO,SAAS,CAAC;IACnB,CAAC;;AAxFe,8BAAa,GAAG,UAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -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,EAAE,cAAc,EAAE,wCAAoC;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;IACH,eAAe,CAAC,EAAE,MAAM,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CAAqC,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,uBAA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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,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"}
|
package/resources/index.d.mts
CHANGED
|
@@ -17,6 +17,7 @@ export { CustomObjects, type CustomObject, type CustomObjectCreateParams, type C
|
|
|
17
17
|
export { CustomPages, type CustomPageListResponse, type CustomPageCreateResponse, type CustomPageRetrieveResponse, type CustomPageUpdateResponse, type CustomPageCreateParams, type CustomPageUpdateParams, type CustomPageListResponsesPageCursorURL, } from "./custom-pages.mjs";
|
|
18
18
|
export { CustomSettings, type CustomSettingListResponse, type CustomSettingCreateResponse, type CustomSettingRetrieveResponse, type CustomSettingUpdateResponse, type CustomSettingListParams, type CustomSettingCreateParams, type CustomSettingUpdateParams, type CustomSettingListResponsesPageCursorURL, } from "./custom-settings.mjs";
|
|
19
19
|
export { Departments, type Department, type DepartmentRetrieveResponse, type DepartmentListParams, type DepartmentCreateParams, type DepartmentRetrieveParams, type DepartmentUpdateParams, type DepartmentsPageCursorURL, } from "./departments.mjs";
|
|
20
|
+
export { DeviceOrders, type DeviceOrderListResponse, type DeviceOrderRetrieveResponse, type DeviceOrderListParams, type DeviceOrderRetrieveParams, type DeviceOrderListResponsesPageCursorURL, } from "./device-orders.mjs";
|
|
20
21
|
export { DraftHires, type DraftHireCreateResponse, type DraftHireCreateParams } from "./draft-hires.mjs";
|
|
21
22
|
export { EarningTypes, type EarningTypeListResponse, type EarningTypeListResponsesPageCursorURL, } from "./earning-types.mjs";
|
|
22
23
|
export { EarningsInputs, type EarningsInputListResponse, type EarningsInputCreateResponse, type EarningsInputCreateParams, type EarningsInputListResponsesPageCursorURL, } from "./earnings-inputs.mjs";
|