@chrt-inc/typescript-sdk 1.390.0 → 1.391.0
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/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +15 -10
- package/dist/cjs/api/resources/analytics/client/Client.d.ts +23 -0
- package/dist/cjs/api/resources/analytics/client/Client.js +17 -0
- package/dist/cjs/api/resources/analytics/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/analytics/client/index.js +2 -0
- package/dist/cjs/api/resources/analytics/index.d.ts +2 -0
- package/dist/cjs/api/resources/analytics/index.js +18 -0
- package/dist/cjs/api/resources/analytics/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/analytics/resources/index.js +41 -0
- package/dist/cjs/api/resources/analytics/resources/shipping/client/Client.d.ts +50 -0
- package/dist/cjs/api/resources/analytics/resources/shipping/client/Client.js +133 -0
- package/dist/cjs/api/resources/analytics/resources/shipping/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/analytics/resources/shipping/client/index.js +17 -0
- package/dist/cjs/api/resources/analytics/resources/shipping/client/requests/AnalyticsTimePeriodRequest.d.ts +18 -0
- package/dist/cjs/api/resources/analytics/resources/shipping/client/requests/AnalyticsTimePeriodRequest.js +5 -0
- package/dist/cjs/api/resources/analytics/resources/shipping/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/analytics/resources/shipping/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/analytics/resources/shipping/index.d.ts +1 -0
- package/dist/cjs/api/resources/analytics/resources/shipping/index.js +17 -0
- package/dist/cjs/api/resources/dev/client/Client.d.ts +7 -14
- package/dist/cjs/api/resources/dev/client/Client.js +25 -65
- package/dist/cjs/api/resources/dev/client/requests/AgentReq.d.ts +10 -0
- package/dist/cjs/api/resources/dev/client/requests/AgentReq.js +5 -0
- package/dist/cjs/api/resources/dev/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/users/client/Client.d.ts +38 -0
- package/dist/cjs/api/resources/users/client/Client.js +178 -0
- package/dist/cjs/api/resources/users/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/users/client/index.js +15 -0
- package/dist/cjs/api/resources/users/client/requests/UserPrivateDataClientCreate1.d.ts +14 -0
- package/dist/cjs/api/resources/users/client/requests/UserPrivateDataClientCreate1.js +5 -0
- package/dist/cjs/api/resources/users/client/requests/UserPrivateDataClientUpdate1.d.ts +11 -0
- package/dist/cjs/api/resources/users/client/requests/UserPrivateDataClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/users/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/users/client/requests/index.js +2 -0
- package/dist/cjs/api/types/AgentRes.d.ts +8 -0
- package/dist/cjs/api/types/AgentRes.js +5 -0
- package/dist/cjs/api/types/AnalyticsTimeBucketResponse.d.ts +8 -0
- package/dist/cjs/api/types/AnalyticsTimeBucketResponse.js +5 -0
- package/dist/cjs/api/types/OrderAndTaskGroupExpandedReq.d.ts +1 -0
- package/dist/cjs/api/types/OrderDraftExpanded.d.ts +1 -0
- package/dist/cjs/api/types/OrderExpanded.d.ts +1 -0
- package/dist/cjs/api/types/StartOfWeek.d.ts +13 -0
- package/dist/cjs/api/types/StartOfWeek.js +15 -0
- package/dist/cjs/api/types/TimeBucket.d.ts +7 -0
- package/dist/cjs/api/types/TimeBucket.js +5 -0
- package/dist/cjs/api/types/TimeGranularity.d.ts +11 -0
- package/dist/cjs/api/types/TimeGranularity.js +13 -0
- package/dist/cjs/api/types/TimezoneEnum.d.ts +23 -0
- package/dist/cjs/api/types/TimezoneEnum.js +25 -0
- package/dist/cjs/api/types/UserPrivateData1.d.ts +12 -0
- package/dist/cjs/api/types/UserPrivateData1.js +5 -0
- package/dist/cjs/api/types/index.d.ts +7 -0
- package/dist/cjs/api/types/index.js +7 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +7 -2
- package/dist/esm/api/resources/analytics/client/Client.d.mts +23 -0
- package/dist/esm/api/resources/analytics/client/Client.mjs +13 -0
- package/dist/esm/api/resources/analytics/client/index.d.mts +1 -0
- package/dist/esm/api/resources/analytics/client/index.mjs +1 -0
- package/dist/esm/api/resources/analytics/index.d.mts +2 -0
- package/dist/esm/api/resources/analytics/index.mjs +2 -0
- package/dist/esm/api/resources/analytics/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/analytics/resources/index.mjs +2 -0
- package/dist/esm/api/resources/analytics/resources/shipping/client/Client.d.mts +50 -0
- package/dist/esm/api/resources/analytics/resources/shipping/client/Client.mjs +96 -0
- package/dist/esm/api/resources/analytics/resources/shipping/client/index.d.mts +2 -0
- package/dist/esm/api/resources/analytics/resources/shipping/client/index.mjs +1 -0
- package/dist/esm/api/resources/analytics/resources/shipping/client/requests/AnalyticsTimePeriodRequest.d.mts +18 -0
- package/dist/esm/api/resources/analytics/resources/shipping/client/requests/AnalyticsTimePeriodRequest.mjs +4 -0
- package/dist/esm/api/resources/analytics/resources/shipping/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/analytics/resources/shipping/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/analytics/resources/shipping/index.d.mts +1 -0
- package/dist/esm/api/resources/analytics/resources/shipping/index.mjs +1 -0
- package/dist/esm/api/resources/dev/client/Client.d.mts +7 -14
- package/dist/esm/api/resources/dev/client/Client.mjs +25 -65
- package/dist/esm/api/resources/dev/client/requests/AgentReq.d.mts +10 -0
- package/dist/esm/api/resources/dev/client/requests/AgentReq.mjs +4 -0
- package/dist/esm/api/resources/dev/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/resources/users/client/Client.d.mts +38 -0
- package/dist/esm/api/resources/users/client/Client.mjs +178 -0
- package/dist/esm/api/resources/users/client/index.d.mts +1 -0
- package/dist/esm/api/resources/users/client/index.mjs +1 -1
- package/dist/esm/api/resources/users/client/requests/UserPrivateDataClientCreate1.d.mts +14 -0
- package/dist/esm/api/resources/users/client/requests/UserPrivateDataClientCreate1.mjs +4 -0
- package/dist/esm/api/resources/users/client/requests/UserPrivateDataClientUpdate1.d.mts +11 -0
- package/dist/esm/api/resources/users/client/requests/UserPrivateDataClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/users/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/users/client/requests/index.mjs +1 -0
- package/dist/esm/api/types/AgentRes.d.mts +8 -0
- package/dist/esm/api/types/AgentRes.mjs +4 -0
- package/dist/esm/api/types/AnalyticsTimeBucketResponse.d.mts +8 -0
- package/dist/esm/api/types/AnalyticsTimeBucketResponse.mjs +4 -0
- package/dist/esm/api/types/OrderAndTaskGroupExpandedReq.d.mts +1 -0
- package/dist/esm/api/types/OrderDraftExpanded.d.mts +1 -0
- package/dist/esm/api/types/OrderExpanded.d.mts +1 -0
- package/dist/esm/api/types/StartOfWeek.d.mts +13 -0
- package/dist/esm/api/types/StartOfWeek.mjs +12 -0
- package/dist/esm/api/types/TimeBucket.d.mts +7 -0
- package/dist/esm/api/types/TimeBucket.mjs +4 -0
- package/dist/esm/api/types/TimeGranularity.d.mts +11 -0
- package/dist/esm/api/types/TimeGranularity.mjs +10 -0
- package/dist/esm/api/types/TimezoneEnum.d.mts +23 -0
- package/dist/esm/api/types/TimezoneEnum.mjs +22 -0
- package/dist/esm/api/types/UserPrivateData1.d.mts +12 -0
- package/dist/esm/api/types/UserPrivateData1.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +7 -0
- package/dist/esm/api/types/index.mjs +7 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +262 -58
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { Orgs } from "./api/resources/orgs/client/Client.js";
|
|
|
21
21
|
import { Root } from "./api/resources/root/client/Client.js";
|
|
22
22
|
import { Users } from "./api/resources/users/client/Client.js";
|
|
23
23
|
import { Utils } from "./api/resources/utils/client/Client.js";
|
|
24
|
+
import { Analytics } from "./api/resources/analytics/client/Client.js";
|
|
24
25
|
import { Billing } from "./api/resources/billing/client/Client.js";
|
|
25
26
|
import { Notifications } from "./api/resources/notifications/client/Client.js";
|
|
26
27
|
import { OrgInfoForConnections } from "./api/resources/orgInfoForConnections/client/Client.js";
|
|
@@ -68,6 +69,7 @@ export declare class ChrtClient {
|
|
|
68
69
|
protected _root: Root | undefined;
|
|
69
70
|
protected _users: Users | undefined;
|
|
70
71
|
protected _utils: Utils | undefined;
|
|
72
|
+
protected _analytics: Analytics | undefined;
|
|
71
73
|
protected _billing: Billing | undefined;
|
|
72
74
|
protected _notifications: Notifications | undefined;
|
|
73
75
|
protected _orgInfoForConnections: OrgInfoForConnections | undefined;
|
|
@@ -91,6 +93,7 @@ export declare class ChrtClient {
|
|
|
91
93
|
get root(): Root;
|
|
92
94
|
get users(): Users;
|
|
93
95
|
get utils(): Utils;
|
|
96
|
+
get analytics(): Analytics;
|
|
94
97
|
get billing(): Billing;
|
|
95
98
|
get notifications(): Notifications;
|
|
96
99
|
get orgInfoForConnections(): OrgInfoForConnections;
|
package/dist/cjs/Client.js
CHANGED
|
@@ -57,17 +57,18 @@ const Client_js_15 = require("./api/resources/orgs/client/Client.js");
|
|
|
57
57
|
const Client_js_16 = require("./api/resources/root/client/Client.js");
|
|
58
58
|
const Client_js_17 = require("./api/resources/users/client/Client.js");
|
|
59
59
|
const Client_js_18 = require("./api/resources/utils/client/Client.js");
|
|
60
|
-
const Client_js_19 = require("./api/resources/
|
|
61
|
-
const Client_js_20 = require("./api/resources/
|
|
62
|
-
const Client_js_21 = require("./api/resources/
|
|
63
|
-
const Client_js_22 = require("./api/resources/
|
|
60
|
+
const Client_js_19 = require("./api/resources/analytics/client/Client.js");
|
|
61
|
+
const Client_js_20 = require("./api/resources/billing/client/Client.js");
|
|
62
|
+
const Client_js_21 = require("./api/resources/notifications/client/Client.js");
|
|
63
|
+
const Client_js_22 = require("./api/resources/orgInfoForConnections/client/Client.js");
|
|
64
|
+
const Client_js_23 = require("./api/resources/tracking/client/Client.js");
|
|
64
65
|
class ChrtClient {
|
|
65
66
|
constructor(_options = {}) {
|
|
66
67
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
67
68
|
"X-Fern-Language": "JavaScript",
|
|
68
69
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
69
|
-
"X-Fern-SDK-Version": "1.
|
|
70
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
70
|
+
"X-Fern-SDK-Version": "1.391.0",
|
|
71
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.391.0",
|
|
71
72
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
72
73
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
73
74
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -144,21 +145,25 @@ class ChrtClient {
|
|
|
144
145
|
var _a;
|
|
145
146
|
return ((_a = this._utils) !== null && _a !== void 0 ? _a : (this._utils = new Client_js_18.Utils(this._options)));
|
|
146
147
|
}
|
|
148
|
+
get analytics() {
|
|
149
|
+
var _a;
|
|
150
|
+
return ((_a = this._analytics) !== null && _a !== void 0 ? _a : (this._analytics = new Client_js_19.Analytics(this._options)));
|
|
151
|
+
}
|
|
147
152
|
get billing() {
|
|
148
153
|
var _a;
|
|
149
|
-
return ((_a = this._billing) !== null && _a !== void 0 ? _a : (this._billing = new
|
|
154
|
+
return ((_a = this._billing) !== null && _a !== void 0 ? _a : (this._billing = new Client_js_20.Billing(this._options)));
|
|
150
155
|
}
|
|
151
156
|
get notifications() {
|
|
152
157
|
var _a;
|
|
153
|
-
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new
|
|
158
|
+
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_21.Notifications(this._options)));
|
|
154
159
|
}
|
|
155
160
|
get orgInfoForConnections() {
|
|
156
161
|
var _a;
|
|
157
|
-
return ((_a = this._orgInfoForConnections) !== null && _a !== void 0 ? _a : (this._orgInfoForConnections = new
|
|
162
|
+
return ((_a = this._orgInfoForConnections) !== null && _a !== void 0 ? _a : (this._orgInfoForConnections = new Client_js_22.OrgInfoForConnections(this._options)));
|
|
158
163
|
}
|
|
159
164
|
get tracking() {
|
|
160
165
|
var _a;
|
|
161
|
-
return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new
|
|
166
|
+
return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new Client_js_23.Tracking(this._options)));
|
|
162
167
|
}
|
|
163
168
|
}
|
|
164
169
|
exports.ChrtClient = ChrtClient;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments.js";
|
|
5
|
+
import * as core from "../../../../core/index.js";
|
|
6
|
+
import { Shipping } from "../resources/shipping/client/Client.js";
|
|
7
|
+
export declare namespace Analytics {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export declare class Analytics {
|
|
19
|
+
protected readonly _options: Analytics.Options;
|
|
20
|
+
protected _shipping: Shipping | undefined;
|
|
21
|
+
constructor(_options?: Analytics.Options);
|
|
22
|
+
get shipping(): Shipping;
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Analytics = void 0;
|
|
7
|
+
const Client_js_1 = require("../resources/shipping/client/Client.js");
|
|
8
|
+
class Analytics {
|
|
9
|
+
constructor(_options = {}) {
|
|
10
|
+
this._options = _options;
|
|
11
|
+
}
|
|
12
|
+
get shipping() {
|
|
13
|
+
var _a;
|
|
14
|
+
return ((_a = this._shipping) !== null && _a !== void 0 ? _a : (this._shipping = new Client_js_1.Shipping(this._options)));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.Analytics = Analytics;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
18
|
+
__exportStar(require("./resources/index.js"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.shipping = void 0;
|
|
40
|
+
exports.shipping = __importStar(require("./shipping/index.js"));
|
|
41
|
+
__exportStar(require("./shipping/client/requests/index.js"), exports);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments.js";
|
|
5
|
+
import * as core from "../../../../../../core/index.js";
|
|
6
|
+
import * as Chrt from "../../../../../index.js";
|
|
7
|
+
export declare namespace Shipping {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
26
|
+
/** Additional headers to include in the request. */
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare class Shipping {
|
|
31
|
+
protected readonly _options: Shipping.Options;
|
|
32
|
+
constructor(_options?: Shipping.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves order counts bucketed by time period. | (AnalyticsTimePeriodRequest) -> (AnalyticsTimeBucketResponse)
|
|
35
|
+
*
|
|
36
|
+
* @param {Chrt.analytics.AnalyticsTimePeriodRequest} request
|
|
37
|
+
* @param {Shipping.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.analytics.shipping.retrieveOrdersCountV1({
|
|
43
|
+
* start: "2024-01-15T09:30:00Z",
|
|
44
|
+
* end: "2024-01-15T09:30:00Z"
|
|
45
|
+
* })
|
|
46
|
+
*/
|
|
47
|
+
retrieveOrdersCountV1(request: Chrt.analytics.AnalyticsTimePeriodRequest, requestOptions?: Shipping.RequestOptions): core.HttpResponsePromise<Chrt.AnalyticsTimeBucketResponse>;
|
|
48
|
+
private __retrieveOrdersCountV1;
|
|
49
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.Shipping = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../../../environments.js"));
|
|
50
|
+
const core = __importStar(require("../../../../../../core/index.js"));
|
|
51
|
+
const Chrt = __importStar(require("../../../../../index.js"));
|
|
52
|
+
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
|
+
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
|
+
class Shipping {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
|
+
this._options = _options;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Retrieves order counts bucketed by time period. | (AnalyticsTimePeriodRequest) -> (AnalyticsTimeBucketResponse)
|
|
60
|
+
*
|
|
61
|
+
* @param {Chrt.analytics.AnalyticsTimePeriodRequest} request
|
|
62
|
+
* @param {Shipping.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.analytics.shipping.retrieveOrdersCountV1({
|
|
68
|
+
* start: "2024-01-15T09:30:00Z",
|
|
69
|
+
* end: "2024-01-15T09:30:00Z"
|
|
70
|
+
* })
|
|
71
|
+
*/
|
|
72
|
+
retrieveOrdersCountV1(request, requestOptions) {
|
|
73
|
+
return core.HttpResponsePromise.fromPromise(this.__retrieveOrdersCountV1(request, requestOptions));
|
|
74
|
+
}
|
|
75
|
+
__retrieveOrdersCountV1(request, requestOptions) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
var _a, _b, _c, _d;
|
|
78
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
79
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
80
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "analytics/shipping/orders/count/v1"),
|
|
81
|
+
method: "POST",
|
|
82
|
+
headers: _headers,
|
|
83
|
+
contentType: "application/json",
|
|
84
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
85
|
+
requestType: "json",
|
|
86
|
+
body: request,
|
|
87
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
88
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
89
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
90
|
+
});
|
|
91
|
+
if (_response.ok) {
|
|
92
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
93
|
+
}
|
|
94
|
+
if (_response.error.reason === "status-code") {
|
|
95
|
+
switch (_response.error.statusCode) {
|
|
96
|
+
case 422:
|
|
97
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
98
|
+
default:
|
|
99
|
+
throw new errors.ChrtError({
|
|
100
|
+
statusCode: _response.error.statusCode,
|
|
101
|
+
body: _response.error.body,
|
|
102
|
+
rawResponse: _response.rawResponse,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
switch (_response.error.reason) {
|
|
107
|
+
case "non-json":
|
|
108
|
+
throw new errors.ChrtError({
|
|
109
|
+
statusCode: _response.error.statusCode,
|
|
110
|
+
body: _response.error.rawBody,
|
|
111
|
+
rawResponse: _response.rawResponse,
|
|
112
|
+
});
|
|
113
|
+
case "timeout":
|
|
114
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /analytics/shipping/orders/count/v1.");
|
|
115
|
+
case "unknown":
|
|
116
|
+
throw new errors.ChrtError({
|
|
117
|
+
message: _response.error.errorMessage,
|
|
118
|
+
rawResponse: _response.rawResponse,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
_getAuthorizationHeader() {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
126
|
+
if (bearer != null) {
|
|
127
|
+
return `Bearer ${bearer}`;
|
|
128
|
+
}
|
|
129
|
+
return undefined;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.Shipping = Shipping;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* start: "2024-01-15T09:30:00Z",
|
|
9
|
+
* end: "2024-01-15T09:30:00Z"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface AnalyticsTimePeriodRequest {
|
|
13
|
+
start: string;
|
|
14
|
+
end: string;
|
|
15
|
+
granularity?: Chrt.TimeGranularity;
|
|
16
|
+
timezone?: Chrt.TimezoneEnum;
|
|
17
|
+
start_of_week?: Chrt.StartOfWeek | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type AnalyticsTimePeriodRequest } from "./AnalyticsTimePeriodRequest.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -31,15 +31,18 @@ export declare class Dev {
|
|
|
31
31
|
protected readonly _options: Dev.Options;
|
|
32
32
|
constructor(_options?: Dev.Options);
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Runs a customer service agent that responds with logistics fun facts (real order data not yet available). | (AgentReq) -> (AgentRes)
|
|
35
35
|
*
|
|
36
|
+
* @param {Chrt.AgentReq} request
|
|
36
37
|
* @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
38
|
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
38
41
|
* @example
|
|
39
|
-
* await client.dev.
|
|
42
|
+
* await client.dev.postAgentV1()
|
|
40
43
|
*/
|
|
41
|
-
|
|
42
|
-
private
|
|
44
|
+
postAgentV1(request?: Chrt.AgentReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.AgentRes>;
|
|
45
|
+
private __postAgentV1;
|
|
43
46
|
/**
|
|
44
47
|
* (DEPRECATED) Extracts and returns the user ID from the authenticated request's JWT token. | () -> (str)
|
|
45
48
|
*
|
|
@@ -80,16 +83,6 @@ export declare class Dev {
|
|
|
80
83
|
*/
|
|
81
84
|
getEmailV1(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<string>;
|
|
82
85
|
private __getEmailV1;
|
|
83
|
-
/**
|
|
84
|
-
* Experimental endpoint for running durable execution workflows. Returns the caller's ID for testing purposes. | () -> (dict[str, Any])
|
|
85
|
-
*
|
|
86
|
-
* @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* await client.dev.getDurableV1()
|
|
90
|
-
*/
|
|
91
|
-
getDurableV1(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
92
|
-
private __getDurableV1;
|
|
93
86
|
/**
|
|
94
87
|
* Development template endpoint that returns the caller's ID for testing. | () -> (str)
|
|
95
88
|
*
|
|
@@ -48,33 +48,39 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
48
48
|
exports.Dev = void 0;
|
|
49
49
|
const environments = __importStar(require("../../../../environments.js"));
|
|
50
50
|
const core = __importStar(require("../../../../core/index.js"));
|
|
51
|
+
const Chrt = __importStar(require("../../../index.js"));
|
|
51
52
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
52
53
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
|
-
const Chrt = __importStar(require("../../../index.js"));
|
|
54
54
|
class Dev {
|
|
55
55
|
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Runs a customer service agent that responds with logistics fun facts (real order data not yet available). | (AgentReq) -> (AgentRes)
|
|
60
60
|
*
|
|
61
|
+
* @param {Chrt.AgentReq} request
|
|
61
62
|
* @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
63
|
*
|
|
64
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
65
|
+
*
|
|
63
66
|
* @example
|
|
64
|
-
* await client.dev.
|
|
67
|
+
* await client.dev.postAgentV1()
|
|
65
68
|
*/
|
|
66
|
-
|
|
67
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
69
|
+
postAgentV1(request = {}, requestOptions) {
|
|
70
|
+
return core.HttpResponsePromise.fromPromise(this.__postAgentV1(request, requestOptions));
|
|
68
71
|
}
|
|
69
|
-
|
|
70
|
-
return __awaiter(this,
|
|
72
|
+
__postAgentV1() {
|
|
73
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
71
74
|
var _a, _b, _c, _d;
|
|
72
75
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
73
76
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
74
77
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "dev/agent/v1"),
|
|
75
|
-
method: "
|
|
78
|
+
method: "POST",
|
|
76
79
|
headers: _headers,
|
|
80
|
+
contentType: "application/json",
|
|
77
81
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
82
|
+
requestType: "json",
|
|
83
|
+
body: request,
|
|
78
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
79
85
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
80
86
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -83,11 +89,16 @@ class Dev {
|
|
|
83
89
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
84
90
|
}
|
|
85
91
|
if (_response.error.reason === "status-code") {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
switch (_response.error.statusCode) {
|
|
93
|
+
case 422:
|
|
94
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
95
|
+
default:
|
|
96
|
+
throw new errors.ChrtError({
|
|
97
|
+
statusCode: _response.error.statusCode,
|
|
98
|
+
body: _response.error.body,
|
|
99
|
+
rawResponse: _response.rawResponse,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
91
102
|
}
|
|
92
103
|
switch (_response.error.reason) {
|
|
93
104
|
case "non-json":
|
|
@@ -97,7 +108,7 @@ class Dev {
|
|
|
97
108
|
rawResponse: _response.rawResponse,
|
|
98
109
|
});
|
|
99
110
|
case "timeout":
|
|
100
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
111
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/v1.");
|
|
101
112
|
case "unknown":
|
|
102
113
|
throw new errors.ChrtError({
|
|
103
114
|
message: _response.error.errorMessage,
|
|
@@ -310,57 +321,6 @@ class Dev {
|
|
|
310
321
|
}
|
|
311
322
|
});
|
|
312
323
|
}
|
|
313
|
-
/**
|
|
314
|
-
* Experimental endpoint for running durable execution workflows. Returns the caller's ID for testing purposes. | () -> (dict[str, Any])
|
|
315
|
-
*
|
|
316
|
-
* @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
|
|
317
|
-
*
|
|
318
|
-
* @example
|
|
319
|
-
* await client.dev.getDurableV1()
|
|
320
|
-
*/
|
|
321
|
-
getDurableV1(requestOptions) {
|
|
322
|
-
return core.HttpResponsePromise.fromPromise(this.__getDurableV1(requestOptions));
|
|
323
|
-
}
|
|
324
|
-
__getDurableV1(requestOptions) {
|
|
325
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
326
|
-
var _a, _b, _c, _d;
|
|
327
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
328
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
329
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "dev/durable/v1"),
|
|
330
|
-
method: "GET",
|
|
331
|
-
headers: _headers,
|
|
332
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
333
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
334
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
335
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
336
|
-
});
|
|
337
|
-
if (_response.ok) {
|
|
338
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
339
|
-
}
|
|
340
|
-
if (_response.error.reason === "status-code") {
|
|
341
|
-
throw new errors.ChrtError({
|
|
342
|
-
statusCode: _response.error.statusCode,
|
|
343
|
-
body: _response.error.body,
|
|
344
|
-
rawResponse: _response.rawResponse,
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
switch (_response.error.reason) {
|
|
348
|
-
case "non-json":
|
|
349
|
-
throw new errors.ChrtError({
|
|
350
|
-
statusCode: _response.error.statusCode,
|
|
351
|
-
body: _response.error.rawBody,
|
|
352
|
-
rawResponse: _response.rawResponse,
|
|
353
|
-
});
|
|
354
|
-
case "timeout":
|
|
355
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /dev/durable/v1.");
|
|
356
|
-
case "unknown":
|
|
357
|
-
throw new errors.ChrtError({
|
|
358
|
-
message: _response.error.errorMessage,
|
|
359
|
-
rawResponse: _response.rawResponse,
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
324
|
/**
|
|
365
325
|
* Development template endpoint that returns the caller's ID for testing. | () -> (str)
|
|
366
326
|
*
|