@chrt-inc/typescript-sdk 1.888.0 → 1.891.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.js +2 -2
- package/dist/cjs/api/resources/trackingIntegrations/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/trackingIntegrations/client/Client.js +7 -2
- package/dist/cjs/api/resources/trackingIntegrations/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/index.js +2 -1
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/client/Client.d.ts +29 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/client/Client.js +27 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/client/index.js +2 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/index.d.ts +2 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/index.js +18 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.d.ts +93 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.js +328 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/index.js +17 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/AssetsListV1Request.d.ts +21 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/AssetsListV1Request.js +5 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/ReelablesAssetClientUpdate1.d.ts +14 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/ReelablesAssetClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/index.d.ts +1 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/index.js +17 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/index.d.ts +6 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/index.js +45 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/Client.d.ts +51 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/Client.js +135 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/index.js +17 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/TimeseriesDataPointsV1Request.d.ts +14 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/TimeseriesDataPointsV1Request.js +5 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/index.d.ts +1 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/index.js +17 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/Client.d.ts +62 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/Client.js +197 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/index.js +17 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/WorkspacesListV1Request.d.ts +21 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/WorkspacesListV1Request.js +5 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/index.d.ts +1 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/index.js +17 -0
- package/dist/cjs/api/types/ReelablesAsset1.d.ts +22 -0
- package/dist/cjs/api/types/ReelablesAsset1.js +5 -0
- package/dist/cjs/api/types/ReelablesAssetListRes.d.ts +8 -0
- package/dist/cjs/api/types/ReelablesAssetListRes.js +5 -0
- package/dist/cjs/api/types/ReelablesAssetSortByEnum.d.ts +8 -0
- package/dist/cjs/api/types/ReelablesAssetSortByEnum.js +10 -0
- package/dist/cjs/api/types/ReelablesAssetSyncRes.d.ts +8 -0
- package/dist/cjs/api/types/ReelablesAssetSyncRes.js +5 -0
- package/dist/cjs/api/types/ReelablesDataPoint1.d.ts +12 -0
- package/dist/cjs/api/types/ReelablesDataPoint1.js +5 -0
- package/dist/cjs/api/types/ReelablesDataPointMetadata1.d.ts +6 -0
- package/dist/cjs/api/types/ReelablesDataPointMetadata1.js +5 -0
- package/dist/cjs/api/types/ReelablesLabel1.d.ts +9 -0
- package/dist/cjs/api/types/ReelablesLabel1.js +5 -0
- package/dist/cjs/api/types/ReelablesTimeseriesRes.d.ts +7 -0
- package/dist/cjs/api/types/ReelablesTimeseriesRes.js +5 -0
- package/dist/cjs/api/types/ReelablesWorkspace1.d.ts +13 -0
- package/dist/cjs/api/types/ReelablesWorkspace1.js +5 -0
- package/dist/cjs/api/types/ReelablesWorkspaceListRes.d.ts +8 -0
- package/dist/cjs/api/types/ReelablesWorkspaceListRes.js +5 -0
- package/dist/cjs/api/types/ReelablesWorkspaceSortByEnum.d.ts +4 -0
- package/dist/cjs/api/types/ReelablesWorkspaceSortByEnum.js +5 -0
- package/dist/cjs/api/types/ReelablesWorkspaceSyncRes.d.ts +9 -0
- package/dist/cjs/api/types/ReelablesWorkspaceSyncRes.js +5 -0
- package/dist/cjs/api/types/index.d.ts +12 -0
- package/dist/cjs/api/types/index.js +12 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/trackingIntegrations/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/trackingIntegrations/client/Client.mjs +5 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/index.mjs +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/client/Client.d.mts +29 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/client/Client.mjs +23 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/client/index.d.mts +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/client/index.mjs +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/index.d.mts +2 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/index.mjs +2 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.d.mts +93 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.mjs +291 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/index.d.mts +2 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/index.mjs +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/AssetsListV1Request.d.mts +21 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/AssetsListV1Request.mjs +4 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/ReelablesAssetClientUpdate1.d.mts +14 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/ReelablesAssetClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/index.d.mts +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/index.mjs +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/index.d.mts +6 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/index.mjs +6 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/Client.d.mts +51 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/Client.mjs +98 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/index.d.mts +2 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/index.mjs +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/TimeseriesDataPointsV1Request.d.mts +14 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/TimeseriesDataPointsV1Request.mjs +4 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/index.d.mts +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/index.mjs +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/Client.d.mts +62 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/Client.mjs +160 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/index.d.mts +2 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/index.mjs +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/WorkspacesListV1Request.d.mts +21 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/WorkspacesListV1Request.mjs +4 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/index.d.mts +1 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/index.mjs +1 -0
- package/dist/esm/api/types/ReelablesAsset1.d.mts +22 -0
- package/dist/esm/api/types/ReelablesAsset1.mjs +4 -0
- package/dist/esm/api/types/ReelablesAssetListRes.d.mts +8 -0
- package/dist/esm/api/types/ReelablesAssetListRes.mjs +4 -0
- package/dist/esm/api/types/ReelablesAssetSortByEnum.d.mts +8 -0
- package/dist/esm/api/types/ReelablesAssetSortByEnum.mjs +7 -0
- package/dist/esm/api/types/ReelablesAssetSyncRes.d.mts +8 -0
- package/dist/esm/api/types/ReelablesAssetSyncRes.mjs +4 -0
- package/dist/esm/api/types/ReelablesDataPoint1.d.mts +12 -0
- package/dist/esm/api/types/ReelablesDataPoint1.mjs +4 -0
- package/dist/esm/api/types/ReelablesDataPointMetadata1.d.mts +6 -0
- package/dist/esm/api/types/ReelablesDataPointMetadata1.mjs +4 -0
- package/dist/esm/api/types/ReelablesLabel1.d.mts +9 -0
- package/dist/esm/api/types/ReelablesLabel1.mjs +4 -0
- package/dist/esm/api/types/ReelablesTimeseriesRes.d.mts +7 -0
- package/dist/esm/api/types/ReelablesTimeseriesRes.mjs +4 -0
- package/dist/esm/api/types/ReelablesWorkspace1.d.mts +13 -0
- package/dist/esm/api/types/ReelablesWorkspace1.mjs +4 -0
- package/dist/esm/api/types/ReelablesWorkspaceListRes.d.mts +8 -0
- package/dist/esm/api/types/ReelablesWorkspaceListRes.mjs +4 -0
- package/dist/esm/api/types/ReelablesWorkspaceSortByEnum.d.mts +4 -0
- package/dist/esm/api/types/ReelablesWorkspaceSortByEnum.mjs +4 -0
- package/dist/esm/api/types/ReelablesWorkspaceSyncRes.d.mts +9 -0
- package/dist/esm/api/types/ReelablesWorkspaceSyncRes.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +12 -0
- package/dist/esm/api/types/index.mjs +12 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +476 -0
package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/index.js
ADDED
|
@@ -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);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * as assets from "./assets/index.js";
|
|
2
|
+
export * as timeseries from "./timeseries/index.js";
|
|
3
|
+
export * as workspaces from "./workspaces/index.js";
|
|
4
|
+
export * from "./assets/client/requests/index.js";
|
|
5
|
+
export * from "./timeseries/client/requests/index.js";
|
|
6
|
+
export * from "./workspaces/client/requests/index.js";
|
|
@@ -0,0 +1,45 @@
|
|
|
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.workspaces = exports.timeseries = exports.assets = void 0;
|
|
40
|
+
exports.assets = __importStar(require("./assets/index.js"));
|
|
41
|
+
exports.timeseries = __importStar(require("./timeseries/index.js"));
|
|
42
|
+
exports.workspaces = __importStar(require("./workspaces/index.js"));
|
|
43
|
+
__exportStar(require("./assets/client/requests/index.js"), exports);
|
|
44
|
+
__exportStar(require("./timeseries/client/requests/index.js"), exports);
|
|
45
|
+
__exportStar(require("./workspaces/client/requests/index.js"), exports);
|
|
@@ -0,0 +1,51 @@
|
|
|
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 Timeseries {
|
|
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 Timeseries {
|
|
31
|
+
protected readonly _options: Timeseries.Options;
|
|
32
|
+
constructor(_options?: Timeseries.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Refreshes and returns Reelables location data points within the requested time range. | authz: min_org_role=operator | () -> (ReelablesTimeseriesRes)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} assetId
|
|
37
|
+
* @param {Chrt.trackingIntegrations.reelables.TimeseriesDataPointsV1Request} request
|
|
38
|
+
* @param {Timeseries.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await client.trackingIntegrations.reelables.timeseries.dataPointsV1("asset_id", {
|
|
44
|
+
* start_timestamp: "2024-01-15T09:30:00Z",
|
|
45
|
+
* end_timestamp: "2024-01-15T09:30:00Z"
|
|
46
|
+
* })
|
|
47
|
+
*/
|
|
48
|
+
dataPointsV1(assetId: string, request: Chrt.trackingIntegrations.reelables.TimeseriesDataPointsV1Request, requestOptions?: Timeseries.RequestOptions): core.HttpResponsePromise<Chrt.ReelablesTimeseriesRes>;
|
|
49
|
+
private __dataPointsV1;
|
|
50
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
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.Timeseries = 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 Timeseries {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
|
+
this._options = _options;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Refreshes and returns Reelables location data points within the requested time range. | authz: min_org_role=operator | () -> (ReelablesTimeseriesRes)
|
|
60
|
+
*
|
|
61
|
+
* @param {string} assetId
|
|
62
|
+
* @param {Chrt.trackingIntegrations.reelables.TimeseriesDataPointsV1Request} request
|
|
63
|
+
* @param {Timeseries.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.trackingIntegrations.reelables.timeseries.dataPointsV1("asset_id", {
|
|
69
|
+
* start_timestamp: "2024-01-15T09:30:00Z",
|
|
70
|
+
* end_timestamp: "2024-01-15T09:30:00Z"
|
|
71
|
+
* })
|
|
72
|
+
*/
|
|
73
|
+
dataPointsV1(assetId, request, requestOptions) {
|
|
74
|
+
return core.HttpResponsePromise.fromPromise(this.__dataPointsV1(assetId, request, requestOptions));
|
|
75
|
+
}
|
|
76
|
+
__dataPointsV1(assetId, request, requestOptions) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
var _a, _b, _c, _d;
|
|
79
|
+
const { start_timestamp: startTimestamp, end_timestamp: endTimestamp } = request;
|
|
80
|
+
const _queryParams = {};
|
|
81
|
+
_queryParams["start_timestamp"] = startTimestamp;
|
|
82
|
+
_queryParams["end_timestamp"] = endTimestamp;
|
|
83
|
+
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);
|
|
84
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
85
|
+
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, `tracking_integrations/reelables/timeseries/data_points/v1/${encodeURIComponent(assetId)}`),
|
|
86
|
+
method: "GET",
|
|
87
|
+
headers: _headers,
|
|
88
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
89
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
90
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
91
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
92
|
+
});
|
|
93
|
+
if (_response.ok) {
|
|
94
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
95
|
+
}
|
|
96
|
+
if (_response.error.reason === "status-code") {
|
|
97
|
+
switch (_response.error.statusCode) {
|
|
98
|
+
case 422:
|
|
99
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
100
|
+
default:
|
|
101
|
+
throw new errors.ChrtError({
|
|
102
|
+
statusCode: _response.error.statusCode,
|
|
103
|
+
body: _response.error.body,
|
|
104
|
+
rawResponse: _response.rawResponse,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
switch (_response.error.reason) {
|
|
109
|
+
case "non-json":
|
|
110
|
+
throw new errors.ChrtError({
|
|
111
|
+
statusCode: _response.error.statusCode,
|
|
112
|
+
body: _response.error.rawBody,
|
|
113
|
+
rawResponse: _response.rawResponse,
|
|
114
|
+
});
|
|
115
|
+
case "timeout":
|
|
116
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking_integrations/reelables/timeseries/data_points/v1/{asset_id}.");
|
|
117
|
+
case "unknown":
|
|
118
|
+
throw new errors.ChrtError({
|
|
119
|
+
message: _response.error.errorMessage,
|
|
120
|
+
rawResponse: _response.rawResponse,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
_getAuthorizationHeader() {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
128
|
+
if (bearer != null) {
|
|
129
|
+
return `Bearer ${bearer}`;
|
|
130
|
+
}
|
|
131
|
+
return undefined;
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.Timeseries = Timeseries;
|
|
@@ -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,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* start_timestamp: "2024-01-15T09:30:00Z",
|
|
8
|
+
* end_timestamp: "2024-01-15T09:30:00Z"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface TimeseriesDataPointsV1Request {
|
|
12
|
+
start_timestamp: string;
|
|
13
|
+
end_timestamp: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type TimeseriesDataPointsV1Request } from "./TimeseriesDataPointsV1Request.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);
|
|
@@ -0,0 +1,62 @@
|
|
|
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 Workspaces {
|
|
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 Workspaces {
|
|
31
|
+
protected readonly _options: Workspaces.Options;
|
|
32
|
+
constructor(_options?: Workspaces.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Lists cached Reelables workspaces for the caller's organization. | authz: min_org_role=operator | () -> (ReelablesWorkspaceListRes)
|
|
35
|
+
*
|
|
36
|
+
* @param {Chrt.trackingIntegrations.reelables.WorkspacesListV1Request} request
|
|
37
|
+
* @param {Workspaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.trackingIntegrations.reelables.workspaces.listV1({
|
|
43
|
+
* sort_by: "name",
|
|
44
|
+
* sort_order: "asc",
|
|
45
|
+
* page: 1,
|
|
46
|
+
* page_size: 1
|
|
47
|
+
* })
|
|
48
|
+
*/
|
|
49
|
+
listV1(request?: Chrt.trackingIntegrations.reelables.WorkspacesListV1Request, requestOptions?: Workspaces.RequestOptions): core.HttpResponsePromise<Chrt.ReelablesWorkspaceListRes>;
|
|
50
|
+
private __listV1;
|
|
51
|
+
/**
|
|
52
|
+
* Synchronizes Reelables workspaces available to the caller's organization without deleting missing workspaces. | authz: min_org_role=operator | () -> (ReelablesWorkspaceSyncRes)
|
|
53
|
+
*
|
|
54
|
+
* @param {Workspaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await client.trackingIntegrations.reelables.workspaces.syncV1()
|
|
58
|
+
*/
|
|
59
|
+
syncV1(requestOptions?: Workspaces.RequestOptions): core.HttpResponsePromise<Chrt.ReelablesWorkspaceSyncRes>;
|
|
60
|
+
private __syncV1;
|
|
61
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
62
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
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.Workspaces = 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 Workspaces {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
|
+
this._options = _options;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Lists cached Reelables workspaces for the caller's organization. | authz: min_org_role=operator | () -> (ReelablesWorkspaceListRes)
|
|
60
|
+
*
|
|
61
|
+
* @param {Chrt.trackingIntegrations.reelables.WorkspacesListV1Request} request
|
|
62
|
+
* @param {Workspaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.trackingIntegrations.reelables.workspaces.listV1({
|
|
68
|
+
* sort_by: "name",
|
|
69
|
+
* sort_order: "asc",
|
|
70
|
+
* page: 1,
|
|
71
|
+
* page_size: 1
|
|
72
|
+
* })
|
|
73
|
+
*/
|
|
74
|
+
listV1(request = {}, requestOptions) {
|
|
75
|
+
return core.HttpResponsePromise.fromPromise(this.__listV1(request, requestOptions));
|
|
76
|
+
}
|
|
77
|
+
__listV1() {
|
|
78
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
79
|
+
var _a, _b, _c, _d, _e, _f;
|
|
80
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize } = request;
|
|
81
|
+
const _queryParams = {};
|
|
82
|
+
if (sortBy !== undefined) {
|
|
83
|
+
_queryParams["sort_by"] = sortBy;
|
|
84
|
+
}
|
|
85
|
+
if (sortOrder !== undefined) {
|
|
86
|
+
_queryParams["sort_order"] = sortOrder;
|
|
87
|
+
}
|
|
88
|
+
if (page !== undefined) {
|
|
89
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
90
|
+
}
|
|
91
|
+
if (pageSize !== undefined) {
|
|
92
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
93
|
+
}
|
|
94
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
95
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
96
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "tracking_integrations/reelables/workspaces/list/v1"),
|
|
97
|
+
method: "GET",
|
|
98
|
+
headers: _headers,
|
|
99
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
100
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
101
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
102
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
103
|
+
});
|
|
104
|
+
if (_response.ok) {
|
|
105
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
106
|
+
}
|
|
107
|
+
if (_response.error.reason === "status-code") {
|
|
108
|
+
switch (_response.error.statusCode) {
|
|
109
|
+
case 422:
|
|
110
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
111
|
+
default:
|
|
112
|
+
throw new errors.ChrtError({
|
|
113
|
+
statusCode: _response.error.statusCode,
|
|
114
|
+
body: _response.error.body,
|
|
115
|
+
rawResponse: _response.rawResponse,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
switch (_response.error.reason) {
|
|
120
|
+
case "non-json":
|
|
121
|
+
throw new errors.ChrtError({
|
|
122
|
+
statusCode: _response.error.statusCode,
|
|
123
|
+
body: _response.error.rawBody,
|
|
124
|
+
rawResponse: _response.rawResponse,
|
|
125
|
+
});
|
|
126
|
+
case "timeout":
|
|
127
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking_integrations/reelables/workspaces/list/v1.");
|
|
128
|
+
case "unknown":
|
|
129
|
+
throw new errors.ChrtError({
|
|
130
|
+
message: _response.error.errorMessage,
|
|
131
|
+
rawResponse: _response.rawResponse,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Synchronizes Reelables workspaces available to the caller's organization without deleting missing workspaces. | authz: min_org_role=operator | () -> (ReelablesWorkspaceSyncRes)
|
|
138
|
+
*
|
|
139
|
+
* @param {Workspaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* await client.trackingIntegrations.reelables.workspaces.syncV1()
|
|
143
|
+
*/
|
|
144
|
+
syncV1(requestOptions) {
|
|
145
|
+
return core.HttpResponsePromise.fromPromise(this.__syncV1(requestOptions));
|
|
146
|
+
}
|
|
147
|
+
__syncV1(requestOptions) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
var _a, _b, _c, _d;
|
|
150
|
+
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);
|
|
151
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
152
|
+
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, "tracking_integrations/reelables/workspaces/sync/v1"),
|
|
153
|
+
method: "POST",
|
|
154
|
+
headers: _headers,
|
|
155
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
156
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
157
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
158
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
159
|
+
});
|
|
160
|
+
if (_response.ok) {
|
|
161
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
162
|
+
}
|
|
163
|
+
if (_response.error.reason === "status-code") {
|
|
164
|
+
throw new errors.ChrtError({
|
|
165
|
+
statusCode: _response.error.statusCode,
|
|
166
|
+
body: _response.error.body,
|
|
167
|
+
rawResponse: _response.rawResponse,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
switch (_response.error.reason) {
|
|
171
|
+
case "non-json":
|
|
172
|
+
throw new errors.ChrtError({
|
|
173
|
+
statusCode: _response.error.statusCode,
|
|
174
|
+
body: _response.error.rawBody,
|
|
175
|
+
rawResponse: _response.rawResponse,
|
|
176
|
+
});
|
|
177
|
+
case "timeout":
|
|
178
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking_integrations/reelables/workspaces/sync/v1.");
|
|
179
|
+
case "unknown":
|
|
180
|
+
throw new errors.ChrtError({
|
|
181
|
+
message: _response.error.errorMessage,
|
|
182
|
+
rawResponse: _response.rawResponse,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
_getAuthorizationHeader() {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
190
|
+
if (bearer != null) {
|
|
191
|
+
return `Bearer ${bearer}`;
|
|
192
|
+
}
|
|
193
|
+
return undefined;
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
exports.Workspaces = Workspaces;
|
|
@@ -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,21 @@
|
|
|
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
|
+
* sort_by: "name",
|
|
9
|
+
* sort_order: "asc",
|
|
10
|
+
* page: 1,
|
|
11
|
+
* page_size: 1
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface WorkspacesListV1Request {
|
|
15
|
+
/** Field to sort by */
|
|
16
|
+
sort_by?: Chrt.ReelablesWorkspaceSortByEnum | null;
|
|
17
|
+
/** Sort order (asc or desc) */
|
|
18
|
+
sort_order?: Chrt.SortOrderEnum | null;
|
|
19
|
+
page?: number | null;
|
|
20
|
+
page_size?: number | null;
|
|
21
|
+
}
|