@chrt-inc/typescript-sdk 1.1020.0 → 1.1024.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/README.md +12 -9
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/chrtGpt/client/Client.d.ts +6 -13
- package/dist/cjs/api/resources/chrtGpt/client/Client.js +24 -17
- package/dist/cjs/api/resources/chrtGpt/client/requests/{ChrtGptMessageReq.d.ts → ChrtGptReq.d.ts} +1 -1
- package/dist/cjs/api/resources/chrtGpt/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/chrtGpt/index.d.ts +1 -0
- package/dist/cjs/api/resources/chrtGpt/index.js +1 -0
- package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/Client.d.ts +65 -0
- package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/Client.js +205 -0
- package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/index.js +17 -0
- package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/requests/ConversationsListV1Request.d.ts +21 -0
- package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/chrtGpt/resources/conversations/index.d.ts +1 -0
- package/dist/cjs/api/resources/chrtGpt/resources/conversations/index.js +17 -0
- package/dist/cjs/api/resources/chrtGpt/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/chrtGpt/resources/index.js +41 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/Client.d.ts +18 -1
- package/dist/cjs/api/resources/orgs/resources/connections/client/Client.js +75 -6
- package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ConnectionsListShippersForCoordinatorV1Request.d.ts +4 -1
- package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.d.ts +12 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/client/Client.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/index.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/index.js +1 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/resources/index.js +41 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.d.ts +86 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.js +319 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/index.js +17 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.d.ts +13 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/index.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/index.js +17 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +47 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +195 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesForCargoV1Request.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesForCargoV1Request.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoV1Request.d.ts +14 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoV1Request.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoV1Request.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoV1Request.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/types/ChrtGptAssistantMessageItem.d.ts +8 -0
- package/dist/cjs/api/types/ChrtGptAssistantMessageItem.js +5 -0
- package/dist/cjs/api/types/ChrtGptCompletedEvent.d.ts +11 -0
- package/dist/cjs/api/types/ChrtGptCompletedEvent.js +5 -0
- package/dist/cjs/api/types/ChrtGptConversation1.d.ts +14 -0
- package/dist/cjs/api/types/ChrtGptConversation1.js +5 -0
- package/dist/cjs/api/types/ChrtGptConversationListRes.d.ts +8 -0
- package/dist/cjs/api/types/ChrtGptConversationListRes.js +5 -0
- package/dist/cjs/api/types/ChrtGptConversationRes.d.ts +9 -0
- package/dist/cjs/api/types/ChrtGptConversationRes.js +5 -0
- package/dist/cjs/api/types/ChrtGptConversationSortByEnum.d.ts +8 -0
- package/dist/cjs/api/types/ChrtGptConversationSortByEnum.js +10 -0
- package/dist/cjs/api/types/ChrtGptErrorEvent.d.ts +9 -0
- package/dist/cjs/api/types/ChrtGptErrorEvent.js +5 -0
- package/dist/cjs/api/types/ChrtGptEvent.d.ts +31 -0
- package/dist/cjs/api/types/ChrtGptEvent.js +5 -0
- package/dist/cjs/api/types/ChrtGptHistoryItem.d.ts +22 -0
- package/dist/cjs/api/types/ChrtGptHistoryItem.js +5 -0
- package/dist/{esm/api/types/ChrtGptMessageRes.d.mts → cjs/api/types/ChrtGptStartedEvent.d.ts} +4 -2
- package/dist/cjs/api/types/ChrtGptStartedEvent.js +5 -0
- package/dist/cjs/api/types/ChrtGptTextDeltaEvent.d.ts +8 -0
- package/dist/cjs/api/types/ChrtGptTextDeltaEvent.js +5 -0
- package/dist/cjs/api/types/ChrtGptTitleEvent.d.ts +11 -0
- package/dist/cjs/api/types/ChrtGptTitleEvent.js +5 -0
- package/dist/cjs/api/types/ChrtGptToolCalledEvent.d.ts +12 -0
- package/dist/cjs/api/types/ChrtGptToolCalledEvent.js +5 -0
- package/dist/cjs/api/types/ChrtGptToolOutputEvent.d.ts +9 -0
- package/dist/cjs/api/types/ChrtGptToolOutputEvent.js +5 -0
- package/dist/cjs/api/types/ChrtGptUserMessageItem.d.ts +6 -0
- package/dist/cjs/api/types/ChrtGptUserMessageItem.js +5 -0
- package/dist/cjs/api/types/ChrtGptWebSearchEvent.d.ts +18 -0
- package/dist/cjs/api/types/ChrtGptWebSearchEvent.js +5 -0
- package/dist/cjs/api/types/DeviceForCargoRes.d.ts +17 -0
- package/dist/cjs/api/types/DeviceForCargoRes.js +5 -0
- package/dist/cjs/api/types/OrgPublicData1.d.ts +1 -0
- package/dist/cjs/api/types/OrgPublicDataS3ObjectMetadata1.d.ts +21 -0
- package/dist/cjs/api/types/OrgPublicDataS3ObjectMetadata1.js +5 -0
- package/dist/cjs/api/types/ShipperCoordinatorConnection1.d.ts +4 -0
- package/dist/cjs/api/types/SpecialHandlingCodeEnum1.d.ts +63 -1
- package/dist/cjs/api/types/SpecialHandlingCodeEnum1.js +62 -0
- package/dist/cjs/api/types/index.d.ts +18 -1
- package/dist/cjs/api/types/index.js +18 -1
- package/dist/cjs/core/index.d.ts +1 -0
- package/dist/cjs/core/index.js +1 -0
- package/dist/cjs/core/stream/Stream.d.ts +46 -0
- package/dist/cjs/core/stream/Stream.js +169 -0
- package/dist/cjs/core/stream/index.d.ts +1 -0
- package/dist/cjs/core/stream/index.js +5 -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/chrtGpt/client/Client.d.mts +6 -13
- package/dist/esm/api/resources/chrtGpt/client/Client.mjs +24 -17
- package/dist/esm/api/resources/chrtGpt/client/requests/{ChrtGptMessageReq.d.mts → ChrtGptReq.d.mts} +1 -1
- package/dist/esm/api/resources/chrtGpt/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/chrtGpt/index.d.mts +1 -0
- package/dist/esm/api/resources/chrtGpt/index.mjs +1 -0
- package/dist/esm/api/resources/chrtGpt/resources/conversations/client/Client.d.mts +65 -0
- package/dist/esm/api/resources/chrtGpt/resources/conversations/client/Client.mjs +168 -0
- package/dist/esm/api/resources/chrtGpt/resources/conversations/client/index.d.mts +2 -0
- package/dist/esm/api/resources/chrtGpt/resources/conversations/client/index.mjs +1 -0
- package/dist/esm/api/resources/chrtGpt/resources/conversations/client/requests/ConversationsListV1Request.d.mts +21 -0
- package/dist/esm/api/resources/chrtGpt/resources/conversations/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/chrtGpt/resources/conversations/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/chrtGpt/resources/conversations/index.d.mts +1 -0
- package/dist/esm/api/resources/chrtGpt/resources/conversations/index.mjs +1 -0
- package/dist/esm/api/resources/chrtGpt/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/chrtGpt/resources/index.mjs +2 -0
- package/dist/esm/api/resources/orgs/resources/connections/client/Client.d.mts +18 -1
- package/dist/esm/api/resources/orgs/resources/connections/client/Client.mjs +75 -6
- package/dist/esm/api/resources/orgs/resources/connections/client/requests/ConnectionsListShippersForCoordinatorV1Request.d.mts +4 -1
- package/dist/esm/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.d.mts +12 -0
- package/dist/esm/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/connections/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/Client.mjs +5 -0
- package/dist/esm/api/resources/orgs/resources/publicData/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/orgs/resources/publicData/resources/index.mjs +2 -0
- package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.d.mts +86 -0
- package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.mjs +282 -0
- package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/index.d.mts +2 -0
- package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.d.mts +13 -0
- package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +47 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +195 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesForCargoV1Request.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesForCargoV1Request.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoV1Request.d.mts +14 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoV1Request.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoV1Request.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoV1Request.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/index.d.mts +3 -0
- package/dist/esm/api/types/ChrtGptAssistantMessageItem.d.mts +8 -0
- package/dist/esm/api/types/ChrtGptAssistantMessageItem.mjs +4 -0
- package/dist/esm/api/types/ChrtGptCompletedEvent.d.mts +11 -0
- package/dist/esm/api/types/ChrtGptCompletedEvent.mjs +4 -0
- package/dist/esm/api/types/ChrtGptConversation1.d.mts +14 -0
- package/dist/esm/api/types/ChrtGptConversation1.mjs +4 -0
- package/dist/esm/api/types/ChrtGptConversationListRes.d.mts +8 -0
- package/dist/esm/api/types/ChrtGptConversationListRes.mjs +4 -0
- package/dist/esm/api/types/ChrtGptConversationRes.d.mts +9 -0
- package/dist/esm/api/types/ChrtGptConversationRes.mjs +4 -0
- package/dist/esm/api/types/ChrtGptConversationSortByEnum.d.mts +8 -0
- package/dist/esm/api/types/ChrtGptConversationSortByEnum.mjs +7 -0
- package/dist/esm/api/types/ChrtGptErrorEvent.d.mts +9 -0
- package/dist/esm/api/types/ChrtGptErrorEvent.mjs +4 -0
- package/dist/esm/api/types/ChrtGptEvent.d.mts +31 -0
- package/dist/esm/api/types/ChrtGptEvent.mjs +4 -0
- package/dist/esm/api/types/ChrtGptHistoryItem.d.mts +22 -0
- package/dist/esm/api/types/ChrtGptHistoryItem.mjs +4 -0
- package/dist/{cjs/api/types/ChrtGptMessageRes.d.ts → esm/api/types/ChrtGptStartedEvent.d.mts} +4 -2
- package/dist/esm/api/types/ChrtGptStartedEvent.mjs +4 -0
- package/dist/esm/api/types/ChrtGptTextDeltaEvent.d.mts +8 -0
- package/dist/esm/api/types/ChrtGptTextDeltaEvent.mjs +4 -0
- package/dist/esm/api/types/ChrtGptTitleEvent.d.mts +11 -0
- package/dist/esm/api/types/ChrtGptTitleEvent.mjs +4 -0
- package/dist/esm/api/types/ChrtGptToolCalledEvent.d.mts +12 -0
- package/dist/esm/api/types/ChrtGptToolCalledEvent.mjs +4 -0
- package/dist/esm/api/types/ChrtGptToolOutputEvent.d.mts +9 -0
- package/dist/esm/api/types/ChrtGptToolOutputEvent.mjs +4 -0
- package/dist/esm/api/types/ChrtGptUserMessageItem.d.mts +6 -0
- package/dist/esm/api/types/ChrtGptUserMessageItem.mjs +4 -0
- package/dist/esm/api/types/ChrtGptWebSearchEvent.d.mts +18 -0
- package/dist/esm/api/types/ChrtGptWebSearchEvent.mjs +4 -0
- package/dist/esm/api/types/DeviceForCargoRes.d.mts +17 -0
- package/dist/esm/api/types/DeviceForCargoRes.mjs +4 -0
- package/dist/esm/api/types/OrgPublicData1.d.mts +1 -0
- package/dist/esm/api/types/OrgPublicDataS3ObjectMetadata1.d.mts +21 -0
- package/dist/esm/api/types/OrgPublicDataS3ObjectMetadata1.mjs +4 -0
- package/dist/esm/api/types/ShipperCoordinatorConnection1.d.mts +4 -0
- package/dist/esm/api/types/SpecialHandlingCodeEnum1.d.mts +63 -1
- package/dist/esm/api/types/SpecialHandlingCodeEnum1.mjs +62 -0
- package/dist/esm/api/types/index.d.mts +18 -1
- package/dist/esm/api/types/index.mjs +18 -1
- package/dist/esm/core/index.d.mts +1 -0
- package/dist/esm/core/index.mjs +1 -0
- package/dist/esm/core/stream/Stream.d.mts +46 -0
- package/dist/esm/core/stream/Stream.mjs +164 -0
- package/dist/esm/core/stream/index.d.mts +1 -0
- package/dist/esm/core/stream/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +843 -181
- /package/dist/cjs/api/resources/chrtGpt/client/requests/{ChrtGptMessageReq.js → ChrtGptReq.js} +0 -0
- /package/dist/cjs/api/{types/ChrtGptMessageRes.js → resources/chrtGpt/resources/conversations/client/requests/ConversationsListV1Request.js} +0 -0
- /package/dist/esm/api/resources/chrtGpt/client/requests/{ChrtGptMessageReq.mjs → ChrtGptReq.mjs} +0 -0
- /package/dist/esm/api/{types/ChrtGptMessageRes.mjs → resources/chrtGpt/resources/conversations/client/requests/ConversationsListV1Request.mjs} +0 -0
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as environments from "../../../../../../environments.mjs";
|
|
5
5
|
import * as core from "../../../../../../core/index.mjs";
|
|
6
6
|
import * as Chrt from "../../../../../index.mjs";
|
|
7
|
+
import { S3Object } from "../resources/s3Object/client/Client.mjs";
|
|
7
8
|
export declare namespace PublicData {
|
|
8
9
|
interface Options {
|
|
9
10
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
@@ -29,7 +30,9 @@ export declare namespace PublicData {
|
|
|
29
30
|
}
|
|
30
31
|
export declare class PublicData {
|
|
31
32
|
protected readonly _options: PublicData.Options;
|
|
33
|
+
protected _s3Object: S3Object | undefined;
|
|
32
34
|
constructor(_options?: PublicData.Options);
|
|
35
|
+
get s3Object(): S3Object;
|
|
33
36
|
/**
|
|
34
37
|
* Returns the organization avatar URL or a placeholder. | () -> (str)
|
|
35
38
|
*
|
|
@@ -15,10 +15,15 @@ import * as core from "../../../../../../core/index.mjs";
|
|
|
15
15
|
import * as Chrt from "../../../../../index.mjs";
|
|
16
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
17
17
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
18
|
+
import { S3Object } from "../resources/s3Object/client/Client.mjs";
|
|
18
19
|
export class PublicData {
|
|
19
20
|
constructor(_options = {}) {
|
|
20
21
|
this._options = _options;
|
|
21
22
|
}
|
|
23
|
+
get s3Object() {
|
|
24
|
+
var _a;
|
|
25
|
+
return ((_a = this._s3Object) !== null && _a !== void 0 ? _a : (this._s3Object = new S3Object(this._options)));
|
|
26
|
+
}
|
|
22
27
|
/**
|
|
23
28
|
* Returns the organization avatar URL or a placeholder. | () -> (str)
|
|
24
29
|
*
|
package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.d.mts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
6
|
+
import * as Chrt from "../../../../../../../index.mjs";
|
|
7
|
+
export declare namespace S3Object {
|
|
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 S3Object {
|
|
31
|
+
protected readonly _options: S3Object.Options;
|
|
32
|
+
constructor(_options?: S3Object.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Uploads a file, such as a logo, to the caller's organization public data. Retains uploaded files; previews require a clean malware scan. | authz: min_org_role=operator | (UploadFile) -> (OrgPublicDataS3ObjectMetadata1)
|
|
35
|
+
*
|
|
36
|
+
* @param {Chrt.orgs.publicData.BodyPostOrgPublicDataS3ObjectAddV1} request
|
|
37
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* import { createReadStream } from "fs";
|
|
43
|
+
* await client.orgs.publicData.s3Object.addV1({
|
|
44
|
+
* file: fs.createReadStream("/path/to/your/file")
|
|
45
|
+
* })
|
|
46
|
+
*/
|
|
47
|
+
addV1(request: Chrt.orgs.publicData.BodyPostOrgPublicDataS3ObjectAddV1, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<Chrt.OrgPublicDataS3ObjectMetadata1>;
|
|
48
|
+
private __addV1;
|
|
49
|
+
/**
|
|
50
|
+
* Deletes an S3 object and its metadata from the caller's organization public data. | authz: min_org_role=operator | () -> (bool)
|
|
51
|
+
*
|
|
52
|
+
* @param {string} orgPublicDataS3ObjectMetadataId
|
|
53
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
|
+
*
|
|
55
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* await client.orgs.publicData.s3Object.deleteV1("org_public_data_s3_object_metadata_id")
|
|
59
|
+
*/
|
|
60
|
+
deleteV1(orgPublicDataS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
61
|
+
private __deleteV1;
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves metadata for an organization public data S3 object. | () -> (OrgPublicDataS3ObjectMetadata1)
|
|
64
|
+
*
|
|
65
|
+
* @param {string} orgPublicDataS3ObjectMetadataId
|
|
66
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.orgs.publicData.s3Object.getS3ObjectMetadataV1("org_public_data_s3_object_metadata_id")
|
|
72
|
+
*/
|
|
73
|
+
getS3ObjectMetadataV1(orgPublicDataS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<Chrt.OrgPublicDataS3ObjectMetadata1>;
|
|
74
|
+
private __getS3ObjectMetadataV1;
|
|
75
|
+
/**
|
|
76
|
+
* Streams an organization public data S3 object file from storage. | () -> (binary)
|
|
77
|
+
* @throws {@link Chrt.ForbiddenError}
|
|
78
|
+
* @throws {@link Chrt.NotFoundError}
|
|
79
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
80
|
+
* @throws {@link Chrt.LockedError}
|
|
81
|
+
* @throws {@link Chrt.ServiceUnavailableError}
|
|
82
|
+
*/
|
|
83
|
+
getV1(orgPublicDataS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
84
|
+
private __getV1;
|
|
85
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
86
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
import * as environments from "../../../../../../../../environments.mjs";
|
|
14
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
15
|
+
import * as Chrt from "../../../../../../../index.mjs";
|
|
16
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../core/headers.mjs";
|
|
17
|
+
import * as errors from "../../../../../../../../errors/index.mjs";
|
|
18
|
+
export class S3Object {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
|
+
this._options = _options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Uploads a file, such as a logo, to the caller's organization public data. Retains uploaded files; previews require a clean malware scan. | authz: min_org_role=operator | (UploadFile) -> (OrgPublicDataS3ObjectMetadata1)
|
|
24
|
+
*
|
|
25
|
+
* @param {Chrt.orgs.publicData.BodyPostOrgPublicDataS3ObjectAddV1} request
|
|
26
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* import { createReadStream } from "fs";
|
|
32
|
+
* await client.orgs.publicData.s3Object.addV1({
|
|
33
|
+
* file: fs.createReadStream("/path/to/your/file")
|
|
34
|
+
* })
|
|
35
|
+
*/
|
|
36
|
+
addV1(request, requestOptions) {
|
|
37
|
+
return core.HttpResponsePromise.fromPromise(this.__addV1(request, requestOptions));
|
|
38
|
+
}
|
|
39
|
+
__addV1(request, requestOptions) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
var _a, _b, _c, _d;
|
|
42
|
+
const _request = yield core.newFormData();
|
|
43
|
+
yield _request.appendFile("file", request.file);
|
|
44
|
+
const _maybeEncodedRequest = yield _request.getRequest();
|
|
45
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ Authorization: yield this._getAuthorizationHeader() }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
46
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
47
|
+
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, "orgs/org_public_data/s3_object/add/v1"),
|
|
48
|
+
method: "POST",
|
|
49
|
+
headers: _headers,
|
|
50
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
51
|
+
requestType: "file",
|
|
52
|
+
duplex: _maybeEncodedRequest.duplex,
|
|
53
|
+
body: _maybeEncodedRequest.body,
|
|
54
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
55
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
56
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
57
|
+
});
|
|
58
|
+
if (_response.ok) {
|
|
59
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
60
|
+
}
|
|
61
|
+
if (_response.error.reason === "status-code") {
|
|
62
|
+
switch (_response.error.statusCode) {
|
|
63
|
+
case 422:
|
|
64
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
65
|
+
default:
|
|
66
|
+
throw new errors.ChrtError({
|
|
67
|
+
statusCode: _response.error.statusCode,
|
|
68
|
+
body: _response.error.body,
|
|
69
|
+
rawResponse: _response.rawResponse,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
switch (_response.error.reason) {
|
|
74
|
+
case "non-json":
|
|
75
|
+
throw new errors.ChrtError({
|
|
76
|
+
statusCode: _response.error.statusCode,
|
|
77
|
+
body: _response.error.rawBody,
|
|
78
|
+
rawResponse: _response.rawResponse,
|
|
79
|
+
});
|
|
80
|
+
case "timeout":
|
|
81
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /orgs/org_public_data/s3_object/add/v1.");
|
|
82
|
+
case "unknown":
|
|
83
|
+
throw new errors.ChrtError({
|
|
84
|
+
message: _response.error.errorMessage,
|
|
85
|
+
rawResponse: _response.rawResponse,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Deletes an S3 object and its metadata from the caller's organization public data. | authz: min_org_role=operator | () -> (bool)
|
|
92
|
+
*
|
|
93
|
+
* @param {string} orgPublicDataS3ObjectMetadataId
|
|
94
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* await client.orgs.publicData.s3Object.deleteV1("org_public_data_s3_object_metadata_id")
|
|
100
|
+
*/
|
|
101
|
+
deleteV1(orgPublicDataS3ObjectMetadataId, requestOptions) {
|
|
102
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteV1(orgPublicDataS3ObjectMetadataId, requestOptions));
|
|
103
|
+
}
|
|
104
|
+
__deleteV1(orgPublicDataS3ObjectMetadataId, requestOptions) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
var _a, _b, _c, _d;
|
|
107
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
108
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
109
|
+
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, `orgs/org_public_data/s3_object/delete/v1/${encodeURIComponent(orgPublicDataS3ObjectMetadataId)}`),
|
|
110
|
+
method: "DELETE",
|
|
111
|
+
headers: _headers,
|
|
112
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
113
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
114
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
115
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
116
|
+
});
|
|
117
|
+
if (_response.ok) {
|
|
118
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
119
|
+
}
|
|
120
|
+
if (_response.error.reason === "status-code") {
|
|
121
|
+
switch (_response.error.statusCode) {
|
|
122
|
+
case 422:
|
|
123
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
124
|
+
default:
|
|
125
|
+
throw new errors.ChrtError({
|
|
126
|
+
statusCode: _response.error.statusCode,
|
|
127
|
+
body: _response.error.body,
|
|
128
|
+
rawResponse: _response.rawResponse,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
switch (_response.error.reason) {
|
|
133
|
+
case "non-json":
|
|
134
|
+
throw new errors.ChrtError({
|
|
135
|
+
statusCode: _response.error.statusCode,
|
|
136
|
+
body: _response.error.rawBody,
|
|
137
|
+
rawResponse: _response.rawResponse,
|
|
138
|
+
});
|
|
139
|
+
case "timeout":
|
|
140
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /orgs/org_public_data/s3_object/delete/v1/{org_public_data_s3_object_metadata_id}.");
|
|
141
|
+
case "unknown":
|
|
142
|
+
throw new errors.ChrtError({
|
|
143
|
+
message: _response.error.errorMessage,
|
|
144
|
+
rawResponse: _response.rawResponse,
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Retrieves metadata for an organization public data S3 object. | () -> (OrgPublicDataS3ObjectMetadata1)
|
|
151
|
+
*
|
|
152
|
+
* @param {string} orgPublicDataS3ObjectMetadataId
|
|
153
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
154
|
+
*
|
|
155
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* await client.orgs.publicData.s3Object.getS3ObjectMetadataV1("org_public_data_s3_object_metadata_id")
|
|
159
|
+
*/
|
|
160
|
+
getS3ObjectMetadataV1(orgPublicDataS3ObjectMetadataId, requestOptions) {
|
|
161
|
+
return core.HttpResponsePromise.fromPromise(this.__getS3ObjectMetadataV1(orgPublicDataS3ObjectMetadataId, requestOptions));
|
|
162
|
+
}
|
|
163
|
+
__getS3ObjectMetadataV1(orgPublicDataS3ObjectMetadataId, requestOptions) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
var _a, _b, _c, _d;
|
|
166
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
167
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
168
|
+
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, `orgs/org_public_data/s3_object/s3_object_metadata/v1/${encodeURIComponent(orgPublicDataS3ObjectMetadataId)}`),
|
|
169
|
+
method: "GET",
|
|
170
|
+
headers: _headers,
|
|
171
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
172
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
173
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
174
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
175
|
+
});
|
|
176
|
+
if (_response.ok) {
|
|
177
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
178
|
+
}
|
|
179
|
+
if (_response.error.reason === "status-code") {
|
|
180
|
+
switch (_response.error.statusCode) {
|
|
181
|
+
case 422:
|
|
182
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
183
|
+
default:
|
|
184
|
+
throw new errors.ChrtError({
|
|
185
|
+
statusCode: _response.error.statusCode,
|
|
186
|
+
body: _response.error.body,
|
|
187
|
+
rawResponse: _response.rawResponse,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
switch (_response.error.reason) {
|
|
192
|
+
case "non-json":
|
|
193
|
+
throw new errors.ChrtError({
|
|
194
|
+
statusCode: _response.error.statusCode,
|
|
195
|
+
body: _response.error.rawBody,
|
|
196
|
+
rawResponse: _response.rawResponse,
|
|
197
|
+
});
|
|
198
|
+
case "timeout":
|
|
199
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /orgs/org_public_data/s3_object/s3_object_metadata/v1/{org_public_data_s3_object_metadata_id}.");
|
|
200
|
+
case "unknown":
|
|
201
|
+
throw new errors.ChrtError({
|
|
202
|
+
message: _response.error.errorMessage,
|
|
203
|
+
rawResponse: _response.rawResponse,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Streams an organization public data S3 object file from storage. | () -> (binary)
|
|
210
|
+
* @throws {@link Chrt.ForbiddenError}
|
|
211
|
+
* @throws {@link Chrt.NotFoundError}
|
|
212
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
213
|
+
* @throws {@link Chrt.LockedError}
|
|
214
|
+
* @throws {@link Chrt.ServiceUnavailableError}
|
|
215
|
+
*/
|
|
216
|
+
getV1(orgPublicDataS3ObjectMetadataId, requestOptions) {
|
|
217
|
+
return core.HttpResponsePromise.fromPromise(this.__getV1(orgPublicDataS3ObjectMetadataId, requestOptions));
|
|
218
|
+
}
|
|
219
|
+
__getV1(orgPublicDataS3ObjectMetadataId, requestOptions) {
|
|
220
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
+
var _a, _b, _c, _d;
|
|
222
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
223
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
224
|
+
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, `orgs/org_public_data/s3_object/v1/${encodeURIComponent(orgPublicDataS3ObjectMetadataId)}`),
|
|
225
|
+
method: "GET",
|
|
226
|
+
headers: _headers,
|
|
227
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
228
|
+
responseType: "binary-response",
|
|
229
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
230
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
231
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
232
|
+
});
|
|
233
|
+
if (_response.ok) {
|
|
234
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
235
|
+
}
|
|
236
|
+
if (_response.error.reason === "status-code") {
|
|
237
|
+
switch (_response.error.statusCode) {
|
|
238
|
+
case 403:
|
|
239
|
+
throw new Chrt.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
240
|
+
case 404:
|
|
241
|
+
throw new Chrt.NotFoundError(_response.error.body, _response.rawResponse);
|
|
242
|
+
case 422:
|
|
243
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
244
|
+
case 423:
|
|
245
|
+
throw new Chrt.LockedError(_response.error.body, _response.rawResponse);
|
|
246
|
+
case 503:
|
|
247
|
+
throw new Chrt.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
248
|
+
default:
|
|
249
|
+
throw new errors.ChrtError({
|
|
250
|
+
statusCode: _response.error.statusCode,
|
|
251
|
+
body: _response.error.body,
|
|
252
|
+
rawResponse: _response.rawResponse,
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
switch (_response.error.reason) {
|
|
257
|
+
case "non-json":
|
|
258
|
+
throw new errors.ChrtError({
|
|
259
|
+
statusCode: _response.error.statusCode,
|
|
260
|
+
body: _response.error.rawBody,
|
|
261
|
+
rawResponse: _response.rawResponse,
|
|
262
|
+
});
|
|
263
|
+
case "timeout":
|
|
264
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /orgs/org_public_data/s3_object/v1/{org_public_data_s3_object_metadata_id}.");
|
|
265
|
+
case "unknown":
|
|
266
|
+
throw new errors.ChrtError({
|
|
267
|
+
message: _response.error.errorMessage,
|
|
268
|
+
rawResponse: _response.rawResponse,
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
_getAuthorizationHeader() {
|
|
274
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
275
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
276
|
+
if (bearer != null) {
|
|
277
|
+
return `Bearer ${bearer}`;
|
|
278
|
+
}
|
|
279
|
+
return undefined;
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../../../../../../../../../core/index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* file: fs.createReadStream("/path/to/your/file")
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface BodyPostOrgPublicDataS3ObjectAddV1 {
|
|
12
|
+
file: core.file.Uploadable.FileLike;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type BodyPostOrgPublicDataS3ObjectAddV1 } from "./BodyPostOrgPublicDataS3ObjectAddV1.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -31,7 +31,7 @@ export declare class Devices {
|
|
|
31
31
|
protected readonly _options: Devices.Options;
|
|
32
32
|
constructor(_options?: Devices.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Archives a device
|
|
34
|
+
* Archives a device without an active session or cargo. Terminate or unlink tracking first. | auth: api_key | () -> (bool)
|
|
35
35
|
*
|
|
36
36
|
* @param {Chrt.tracking.DevicesArchiveV1Request} request
|
|
37
37
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -45,6 +45,21 @@ export declare class Devices {
|
|
|
45
45
|
*/
|
|
46
46
|
archiveV1(request: Chrt.tracking.DevicesArchiveV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
47
47
|
private __archiveV1;
|
|
48
|
+
/**
|
|
49
|
+
* Lists devices currently or previously linked to a cargo, ordered by MAC address. Access follows the cargo's order. | authz_personas=[coordinator_org_operators, shipper_org_operators, executor_org_operators, driver_for_executor] | () -> (list[DeviceForCargoRes])
|
|
50
|
+
*
|
|
51
|
+
* @param {Chrt.tracking.DevicesForCargoV1Request} request
|
|
52
|
+
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await client.tracking.devices.forCargoV1({
|
|
58
|
+
* cargo_id: "cargo_id"
|
|
59
|
+
* })
|
|
60
|
+
*/
|
|
61
|
+
forCargoV1(request: Chrt.tracking.DevicesForCargoV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<Chrt.DeviceForCargoRes[]>;
|
|
62
|
+
private __forCargoV1;
|
|
48
63
|
/**
|
|
49
64
|
* Retrieves a single device by its ID with expanded sessions and cargos. Access restricted to the caller's organization or shared organizations. | auth: api_key | authz: min_org_role=operator | () -> (DeviceExpandedRes)
|
|
50
65
|
*
|
|
@@ -60,6 +75,22 @@ export declare class Devices {
|
|
|
60
75
|
*/
|
|
61
76
|
getV1(request: Chrt.tracking.DevicesGetV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<Chrt.DeviceExpandedRes>;
|
|
62
77
|
private __getV1;
|
|
78
|
+
/**
|
|
79
|
+
* Links an owned device to cargo and activates its tracker. Relinking the same cargo reactivates a stopped tracker. | authz: min_org_role=operator | authz_personas=[coordinator_org_operators, shipper_org_operators, executor_org_operators] | () -> (bool)
|
|
80
|
+
*
|
|
81
|
+
* @param {Chrt.tracking.DevicesLinkToCargoV1Request} request
|
|
82
|
+
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* await client.tracking.devices.linkToCargoV1({
|
|
88
|
+
* device_id: "device_id",
|
|
89
|
+
* cargo_id: "cargo_id"
|
|
90
|
+
* })
|
|
91
|
+
*/
|
|
92
|
+
linkToCargoV1(request: Chrt.tracking.DevicesLinkToCargoV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
93
|
+
private __linkToCargoV1;
|
|
63
94
|
/**
|
|
64
95
|
* Lists devices with filtering, sorting, and pagination. Use org_scope to restrict to owned, shared, or both (default). | auth: api_key | authz: min_org_role=operator | () -> (DeviceListRes)
|
|
65
96
|
*
|
|
@@ -143,6 +174,21 @@ export declare class Devices {
|
|
|
143
174
|
*/
|
|
144
175
|
typeaheadV1(request: Chrt.tracking.DevicesTypeaheadV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<Chrt.DeviceTypeaheadResult[]>;
|
|
145
176
|
private __typeaheadV1;
|
|
177
|
+
/**
|
|
178
|
+
* Unlinks an owned device from its cargo and deactivates its tracker. Returns false when the device is not linked to cargo. | authz: min_org_role=operator | () -> (bool)
|
|
179
|
+
*
|
|
180
|
+
* @param {Chrt.tracking.DevicesUnlinkFromCargoV1Request} request
|
|
181
|
+
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
182
|
+
*
|
|
183
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* await client.tracking.devices.unlinkFromCargoV1({
|
|
187
|
+
* device_id: "device_id"
|
|
188
|
+
* })
|
|
189
|
+
*/
|
|
190
|
+
unlinkFromCargoV1(request: Chrt.tracking.DevicesUnlinkFromCargoV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
191
|
+
private __unlinkFromCargoV1;
|
|
146
192
|
/**
|
|
147
193
|
* Unpauses a device. Closes the open pause time window. | auth: api_key | () -> (bool)
|
|
148
194
|
*
|