@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/Client.js
CHANGED
|
@@ -57,8 +57,8 @@ class ChrtClient {
|
|
|
57
57
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
58
58
|
"X-Fern-Language": "JavaScript",
|
|
59
59
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
60
|
-
"X-Fern-SDK-Version": "1.
|
|
61
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
60
|
+
"X-Fern-SDK-Version": "1.891.0",
|
|
61
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.891.0",
|
|
62
62
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
63
63
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
64
64
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../environments.js";
|
|
5
5
|
import * as core from "../../../../core/index.js";
|
|
6
|
+
import { Reelables } from "../resources/reelables/client/Client.js";
|
|
6
7
|
import { Tive } from "../resources/tive/client/Client.js";
|
|
7
8
|
export declare namespace TrackingIntegrations {
|
|
8
9
|
interface Options {
|
|
@@ -17,7 +18,9 @@ export declare namespace TrackingIntegrations {
|
|
|
17
18
|
}
|
|
18
19
|
export declare class TrackingIntegrations {
|
|
19
20
|
protected readonly _options: TrackingIntegrations.Options;
|
|
21
|
+
protected _reelables: Reelables | undefined;
|
|
20
22
|
protected _tive: Tive | undefined;
|
|
21
23
|
constructor(_options?: TrackingIntegrations.Options);
|
|
24
|
+
get reelables(): Reelables;
|
|
22
25
|
get tive(): Tive;
|
|
23
26
|
}
|
|
@@ -4,14 +4,19 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.TrackingIntegrations = void 0;
|
|
7
|
-
const Client_js_1 = require("../resources/
|
|
7
|
+
const Client_js_1 = require("../resources/reelables/client/Client.js");
|
|
8
|
+
const Client_js_2 = require("../resources/tive/client/Client.js");
|
|
8
9
|
class TrackingIntegrations {
|
|
9
10
|
constructor(_options = {}) {
|
|
10
11
|
this._options = _options;
|
|
11
12
|
}
|
|
13
|
+
get reelables() {
|
|
14
|
+
var _a;
|
|
15
|
+
return ((_a = this._reelables) !== null && _a !== void 0 ? _a : (this._reelables = new Client_js_1.Reelables(this._options)));
|
|
16
|
+
}
|
|
12
17
|
get tive() {
|
|
13
18
|
var _a;
|
|
14
|
-
return ((_a = this._tive) !== null && _a !== void 0 ? _a : (this._tive = new
|
|
19
|
+
return ((_a = this._tive) !== null && _a !== void 0 ? _a : (this._tive = new Client_js_2.Tive(this._options)));
|
|
15
20
|
}
|
|
16
21
|
}
|
|
17
22
|
exports.TrackingIntegrations = TrackingIntegrations;
|
|
@@ -33,5 +33,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.tive = void 0;
|
|
36
|
+
exports.tive = exports.reelables = void 0;
|
|
37
|
+
exports.reelables = __importStar(require("./reelables/index.js"));
|
|
37
38
|
exports.tive = __importStar(require("./tive/index.js"));
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Assets } from "../resources/assets/client/Client.js";
|
|
7
|
+
import { Timeseries } from "../resources/timeseries/client/Client.js";
|
|
8
|
+
import { Workspaces } from "../resources/workspaces/client/Client.js";
|
|
9
|
+
export declare namespace Reelables {
|
|
10
|
+
interface Options {
|
|
11
|
+
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
12
|
+
/** Specify a custom URL to connect the client to. */
|
|
13
|
+
baseUrl?: core.Supplier<string>;
|
|
14
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
15
|
+
/** Additional headers to include in requests. */
|
|
16
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
17
|
+
fetcher?: core.FetchFunction;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export declare class Reelables {
|
|
21
|
+
protected readonly _options: Reelables.Options;
|
|
22
|
+
protected _assets: Assets | undefined;
|
|
23
|
+
protected _timeseries: Timeseries | undefined;
|
|
24
|
+
protected _workspaces: Workspaces | undefined;
|
|
25
|
+
constructor(_options?: Reelables.Options);
|
|
26
|
+
get assets(): Assets;
|
|
27
|
+
get timeseries(): Timeseries;
|
|
28
|
+
get workspaces(): Workspaces;
|
|
29
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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.Reelables = void 0;
|
|
7
|
+
const Client_js_1 = require("../resources/assets/client/Client.js");
|
|
8
|
+
const Client_js_2 = require("../resources/timeseries/client/Client.js");
|
|
9
|
+
const Client_js_3 = require("../resources/workspaces/client/Client.js");
|
|
10
|
+
class Reelables {
|
|
11
|
+
constructor(_options = {}) {
|
|
12
|
+
this._options = _options;
|
|
13
|
+
}
|
|
14
|
+
get assets() {
|
|
15
|
+
var _a;
|
|
16
|
+
return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new Client_js_1.Assets(this._options)));
|
|
17
|
+
}
|
|
18
|
+
get timeseries() {
|
|
19
|
+
var _a;
|
|
20
|
+
return ((_a = this._timeseries) !== null && _a !== void 0 ? _a : (this._timeseries = new Client_js_2.Timeseries(this._options)));
|
|
21
|
+
}
|
|
22
|
+
get workspaces() {
|
|
23
|
+
var _a;
|
|
24
|
+
return ((_a = this._workspaces) !== null && _a !== void 0 ? _a : (this._workspaces = new Client_js_3.Workspaces(this._options)));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.Reelables = Reelables;
|
|
@@ -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,93 @@
|
|
|
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 Assets {
|
|
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 Assets {
|
|
31
|
+
protected readonly _options: Assets.Options;
|
|
32
|
+
constructor(_options?: Assets.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Refreshes and retrieves a Reelables asset by its external ID. | authz: min_org_role=operator | () -> (ReelablesAsset1)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} assetId
|
|
37
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.trackingIntegrations.reelables.assets.getV1("asset_id")
|
|
43
|
+
*/
|
|
44
|
+
getV1(assetId: string, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Chrt.ReelablesAsset1>;
|
|
45
|
+
private __getV1;
|
|
46
|
+
/**
|
|
47
|
+
* Lists cached Reelables assets for a workspace. | authz: min_org_role=operator | () -> (ReelablesAssetListRes)
|
|
48
|
+
*
|
|
49
|
+
* @param {string} workspaceId
|
|
50
|
+
* @param {Chrt.trackingIntegrations.reelables.AssetsListV1Request} request
|
|
51
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
52
|
+
*
|
|
53
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* await client.trackingIntegrations.reelables.assets.listV1("workspace_id", {
|
|
57
|
+
* sort_by: "asset_id",
|
|
58
|
+
* sort_order: "asc",
|
|
59
|
+
* page: 1,
|
|
60
|
+
* page_size: 1
|
|
61
|
+
* })
|
|
62
|
+
*/
|
|
63
|
+
listV1(workspaceId: string, request?: Chrt.trackingIntegrations.reelables.AssetsListV1Request, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Chrt.ReelablesAssetListRes>;
|
|
64
|
+
private __listV1;
|
|
65
|
+
/**
|
|
66
|
+
* Synchronizes all Reelables assets for a cached workspace. | authz: min_org_role=operator | () -> (ReelablesAssetSyncRes)
|
|
67
|
+
*
|
|
68
|
+
* @param {string} workspaceId
|
|
69
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* await client.trackingIntegrations.reelables.assets.syncV1("workspace_id")
|
|
75
|
+
*/
|
|
76
|
+
syncV1(workspaceId: string, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Chrt.ReelablesAssetSyncRes>;
|
|
77
|
+
private __syncV1;
|
|
78
|
+
/**
|
|
79
|
+
* Updates a Reelables asset, applying name changes upstream before updating CHRT. | authz: min_org_role=operator | (ReelablesAssetClientUpdate1) -> (ReelablesAsset1)
|
|
80
|
+
*
|
|
81
|
+
* @param {string} assetId
|
|
82
|
+
* @param {Chrt.trackingIntegrations.reelables.ReelablesAssetClientUpdate1} request
|
|
83
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
84
|
+
*
|
|
85
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* await client.trackingIntegrations.reelables.assets.updateV1("asset_id")
|
|
89
|
+
*/
|
|
90
|
+
updateV1(assetId: string, request?: Chrt.trackingIntegrations.reelables.ReelablesAssetClientUpdate1, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Chrt.ReelablesAsset1>;
|
|
91
|
+
private __updateV1;
|
|
92
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
93
|
+
}
|
|
@@ -0,0 +1,328 @@
|
|
|
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.Assets = 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 Assets {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
|
+
this._options = _options;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Refreshes and retrieves a Reelables asset by its external ID. | authz: min_org_role=operator | () -> (ReelablesAsset1)
|
|
60
|
+
*
|
|
61
|
+
* @param {string} assetId
|
|
62
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.trackingIntegrations.reelables.assets.getV1("asset_id")
|
|
68
|
+
*/
|
|
69
|
+
getV1(assetId, requestOptions) {
|
|
70
|
+
return core.HttpResponsePromise.fromPromise(this.__getV1(assetId, requestOptions));
|
|
71
|
+
}
|
|
72
|
+
__getV1(assetId, requestOptions) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
var _a, _b, _c, _d;
|
|
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);
|
|
76
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
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, `tracking_integrations/reelables/assets/get/v1/${encodeURIComponent(assetId)}`),
|
|
78
|
+
method: "GET",
|
|
79
|
+
headers: _headers,
|
|
80
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
81
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
82
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
83
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
84
|
+
});
|
|
85
|
+
if (_response.ok) {
|
|
86
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
87
|
+
}
|
|
88
|
+
if (_response.error.reason === "status-code") {
|
|
89
|
+
switch (_response.error.statusCode) {
|
|
90
|
+
case 422:
|
|
91
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
92
|
+
default:
|
|
93
|
+
throw new errors.ChrtError({
|
|
94
|
+
statusCode: _response.error.statusCode,
|
|
95
|
+
body: _response.error.body,
|
|
96
|
+
rawResponse: _response.rawResponse,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
switch (_response.error.reason) {
|
|
101
|
+
case "non-json":
|
|
102
|
+
throw new errors.ChrtError({
|
|
103
|
+
statusCode: _response.error.statusCode,
|
|
104
|
+
body: _response.error.rawBody,
|
|
105
|
+
rawResponse: _response.rawResponse,
|
|
106
|
+
});
|
|
107
|
+
case "timeout":
|
|
108
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking_integrations/reelables/assets/get/v1/{asset_id}.");
|
|
109
|
+
case "unknown":
|
|
110
|
+
throw new errors.ChrtError({
|
|
111
|
+
message: _response.error.errorMessage,
|
|
112
|
+
rawResponse: _response.rawResponse,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Lists cached Reelables assets for a workspace. | authz: min_org_role=operator | () -> (ReelablesAssetListRes)
|
|
119
|
+
*
|
|
120
|
+
* @param {string} workspaceId
|
|
121
|
+
* @param {Chrt.trackingIntegrations.reelables.AssetsListV1Request} request
|
|
122
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
123
|
+
*
|
|
124
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* await client.trackingIntegrations.reelables.assets.listV1("workspace_id", {
|
|
128
|
+
* sort_by: "asset_id",
|
|
129
|
+
* sort_order: "asc",
|
|
130
|
+
* page: 1,
|
|
131
|
+
* page_size: 1
|
|
132
|
+
* })
|
|
133
|
+
*/
|
|
134
|
+
listV1(workspaceId, request = {}, requestOptions) {
|
|
135
|
+
return core.HttpResponsePromise.fromPromise(this.__listV1(workspaceId, request, requestOptions));
|
|
136
|
+
}
|
|
137
|
+
__listV1(workspaceId_1) {
|
|
138
|
+
return __awaiter(this, arguments, void 0, function* (workspaceId, request = {}, requestOptions) {
|
|
139
|
+
var _a, _b, _c, _d, _e, _f;
|
|
140
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize } = request;
|
|
141
|
+
const _queryParams = {};
|
|
142
|
+
if (sortBy !== undefined) {
|
|
143
|
+
_queryParams["sort_by"] = sortBy;
|
|
144
|
+
}
|
|
145
|
+
if (sortOrder !== undefined) {
|
|
146
|
+
_queryParams["sort_order"] = sortOrder;
|
|
147
|
+
}
|
|
148
|
+
if (page !== undefined) {
|
|
149
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
150
|
+
}
|
|
151
|
+
if (pageSize !== undefined) {
|
|
152
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
153
|
+
}
|
|
154
|
+
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);
|
|
155
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
156
|
+
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/assets/list/v1/${encodeURIComponent(workspaceId)}`),
|
|
157
|
+
method: "GET",
|
|
158
|
+
headers: _headers,
|
|
159
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
160
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
161
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
162
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
163
|
+
});
|
|
164
|
+
if (_response.ok) {
|
|
165
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
166
|
+
}
|
|
167
|
+
if (_response.error.reason === "status-code") {
|
|
168
|
+
switch (_response.error.statusCode) {
|
|
169
|
+
case 422:
|
|
170
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
171
|
+
default:
|
|
172
|
+
throw new errors.ChrtError({
|
|
173
|
+
statusCode: _response.error.statusCode,
|
|
174
|
+
body: _response.error.body,
|
|
175
|
+
rawResponse: _response.rawResponse,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
switch (_response.error.reason) {
|
|
180
|
+
case "non-json":
|
|
181
|
+
throw new errors.ChrtError({
|
|
182
|
+
statusCode: _response.error.statusCode,
|
|
183
|
+
body: _response.error.rawBody,
|
|
184
|
+
rawResponse: _response.rawResponse,
|
|
185
|
+
});
|
|
186
|
+
case "timeout":
|
|
187
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking_integrations/reelables/assets/list/v1/{workspace_id}.");
|
|
188
|
+
case "unknown":
|
|
189
|
+
throw new errors.ChrtError({
|
|
190
|
+
message: _response.error.errorMessage,
|
|
191
|
+
rawResponse: _response.rawResponse,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Synchronizes all Reelables assets for a cached workspace. | authz: min_org_role=operator | () -> (ReelablesAssetSyncRes)
|
|
198
|
+
*
|
|
199
|
+
* @param {string} workspaceId
|
|
200
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
201
|
+
*
|
|
202
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* await client.trackingIntegrations.reelables.assets.syncV1("workspace_id")
|
|
206
|
+
*/
|
|
207
|
+
syncV1(workspaceId, requestOptions) {
|
|
208
|
+
return core.HttpResponsePromise.fromPromise(this.__syncV1(workspaceId, requestOptions));
|
|
209
|
+
}
|
|
210
|
+
__syncV1(workspaceId, requestOptions) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
var _a, _b, _c, _d;
|
|
213
|
+
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);
|
|
214
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
215
|
+
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/assets/sync/v1/${encodeURIComponent(workspaceId)}`),
|
|
216
|
+
method: "POST",
|
|
217
|
+
headers: _headers,
|
|
218
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
219
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
220
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
221
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
222
|
+
});
|
|
223
|
+
if (_response.ok) {
|
|
224
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
225
|
+
}
|
|
226
|
+
if (_response.error.reason === "status-code") {
|
|
227
|
+
switch (_response.error.statusCode) {
|
|
228
|
+
case 422:
|
|
229
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
230
|
+
default:
|
|
231
|
+
throw new errors.ChrtError({
|
|
232
|
+
statusCode: _response.error.statusCode,
|
|
233
|
+
body: _response.error.body,
|
|
234
|
+
rawResponse: _response.rawResponse,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
switch (_response.error.reason) {
|
|
239
|
+
case "non-json":
|
|
240
|
+
throw new errors.ChrtError({
|
|
241
|
+
statusCode: _response.error.statusCode,
|
|
242
|
+
body: _response.error.rawBody,
|
|
243
|
+
rawResponse: _response.rawResponse,
|
|
244
|
+
});
|
|
245
|
+
case "timeout":
|
|
246
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking_integrations/reelables/assets/sync/v1/{workspace_id}.");
|
|
247
|
+
case "unknown":
|
|
248
|
+
throw new errors.ChrtError({
|
|
249
|
+
message: _response.error.errorMessage,
|
|
250
|
+
rawResponse: _response.rawResponse,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Updates a Reelables asset, applying name changes upstream before updating CHRT. | authz: min_org_role=operator | (ReelablesAssetClientUpdate1) -> (ReelablesAsset1)
|
|
257
|
+
*
|
|
258
|
+
* @param {string} assetId
|
|
259
|
+
* @param {Chrt.trackingIntegrations.reelables.ReelablesAssetClientUpdate1} request
|
|
260
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
261
|
+
*
|
|
262
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
263
|
+
*
|
|
264
|
+
* @example
|
|
265
|
+
* await client.trackingIntegrations.reelables.assets.updateV1("asset_id")
|
|
266
|
+
*/
|
|
267
|
+
updateV1(assetId, request = {}, requestOptions) {
|
|
268
|
+
return core.HttpResponsePromise.fromPromise(this.__updateV1(assetId, request, requestOptions));
|
|
269
|
+
}
|
|
270
|
+
__updateV1(assetId_1) {
|
|
271
|
+
return __awaiter(this, arguments, void 0, function* (assetId, request = {}, requestOptions) {
|
|
272
|
+
var _a, _b, _c, _d;
|
|
273
|
+
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);
|
|
274
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
275
|
+
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/assets/update/v1/${encodeURIComponent(assetId)}`),
|
|
276
|
+
method: "PATCH",
|
|
277
|
+
headers: _headers,
|
|
278
|
+
contentType: "application/json",
|
|
279
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
280
|
+
requestType: "json",
|
|
281
|
+
body: request,
|
|
282
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
283
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
284
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
285
|
+
});
|
|
286
|
+
if (_response.ok) {
|
|
287
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
288
|
+
}
|
|
289
|
+
if (_response.error.reason === "status-code") {
|
|
290
|
+
switch (_response.error.statusCode) {
|
|
291
|
+
case 422:
|
|
292
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
293
|
+
default:
|
|
294
|
+
throw new errors.ChrtError({
|
|
295
|
+
statusCode: _response.error.statusCode,
|
|
296
|
+
body: _response.error.body,
|
|
297
|
+
rawResponse: _response.rawResponse,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
switch (_response.error.reason) {
|
|
302
|
+
case "non-json":
|
|
303
|
+
throw new errors.ChrtError({
|
|
304
|
+
statusCode: _response.error.statusCode,
|
|
305
|
+
body: _response.error.rawBody,
|
|
306
|
+
rawResponse: _response.rawResponse,
|
|
307
|
+
});
|
|
308
|
+
case "timeout":
|
|
309
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /tracking_integrations/reelables/assets/update/v1/{asset_id}.");
|
|
310
|
+
case "unknown":
|
|
311
|
+
throw new errors.ChrtError({
|
|
312
|
+
message: _response.error.errorMessage,
|
|
313
|
+
rawResponse: _response.rawResponse,
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
_getAuthorizationHeader() {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
321
|
+
if (bearer != null) {
|
|
322
|
+
return `Bearer ${bearer}`;
|
|
323
|
+
}
|
|
324
|
+
return undefined;
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
exports.Assets = Assets;
|
|
@@ -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: "asset_id",
|
|
9
|
+
* sort_order: "asc",
|
|
10
|
+
* page: 1,
|
|
11
|
+
* page_size: 1
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface AssetsListV1Request {
|
|
15
|
+
/** Field to sort by */
|
|
16
|
+
sort_by?: Chrt.ReelablesAssetSortByEnum | null;
|
|
17
|
+
/** Sort order (asc or desc) */
|
|
18
|
+
sort_order?: Chrt.SortOrderEnum | null;
|
|
19
|
+
page?: number | null;
|
|
20
|
+
page_size?: number | null;
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
*/
|
|
9
|
+
export interface ReelablesAssetClientUpdate1 {
|
|
10
|
+
destination_geofence_location?: Chrt.LocationFeature | null;
|
|
11
|
+
destination_geofence_location__set_to_None?: boolean;
|
|
12
|
+
destination_geofence_radius_miles?: number | null;
|
|
13
|
+
name?: string | null;
|
|
14
|
+
}
|