@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
|
@@ -12,6 +12,7 @@ export interface OrgPublicData1 {
|
|
|
12
12
|
name: string;
|
|
13
13
|
/** Must be a string starting with `org_` */
|
|
14
14
|
org_id: string;
|
|
15
|
+
org_public_data_s3_object_metadata_ids?: string[];
|
|
15
16
|
org_type: Chrt.OrgTypeEnum;
|
|
16
17
|
phone_number?: string | null;
|
|
17
18
|
schema_version: number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface OrgPublicDataS3ObjectMetadata1 {
|
|
5
|
+
_id: string;
|
|
6
|
+
ai_generated_description?: string | null;
|
|
7
|
+
blurhash?: string | null;
|
|
8
|
+
/** MIME type of the uploaded file (e.g., 'image/jpeg', 'application/pdf') */
|
|
9
|
+
content_type?: string | null;
|
|
10
|
+
/** Original filename of the uploaded file */
|
|
11
|
+
filename?: string | null;
|
|
12
|
+
org_public_data_id: string;
|
|
13
|
+
s3_key_prefix?: "orgs/org_public_data_s3_object_metadata";
|
|
14
|
+
schema_version: number;
|
|
15
|
+
uploaded_at_timestamp: string;
|
|
16
|
+
/** Must be a string starting with `org_` */
|
|
17
|
+
uploaded_by_org_id: string;
|
|
18
|
+
/** Must be a string starting with `user_` */
|
|
19
|
+
uploaded_by_user_id: string;
|
|
20
|
+
user_generated_description?: string | null;
|
|
21
|
+
}
|
|
@@ -7,6 +7,10 @@ export interface ShipperCoordinatorConnection1 {
|
|
|
7
7
|
coordinator_default_department_id?: string | null;
|
|
8
8
|
/** Must be a string starting with `org_` */
|
|
9
9
|
coordinator_org_id: string;
|
|
10
|
+
known_shipper?: boolean | null;
|
|
11
|
+
known_shipper_last_edited_at_timestamp?: string | null;
|
|
12
|
+
/** Must be a string starting with `user_` */
|
|
13
|
+
known_shipper_last_edited_by_user_id?: string | null;
|
|
10
14
|
off_chrt_shipper_org_data_id?: string | null;
|
|
11
15
|
schema_version: number;
|
|
12
16
|
shipper_customer_id_for_coordinator_stripe_connect_account?: string | null;
|
|
@@ -1,61 +1,105 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type SpecialHandlingCodeEnum1 = "ACT" | "AOG" | "ATT" | "AVI" | "BIG" | "BUP" | "CAO" | "CAT" | "COL" | "COM" | "CRT" | "DIP" | "EAP" | "EAT" | "EAW" | "ECC" | "ECP" | "ELI" | "ELM" | "EMD" | "ERT" | "FIL" | "FRI" | "FRO" | "GOH" | "HEA" | "HEG" | "HUM" | "ICE" | "LHO" | "LIC" | "MAG" | "MAL" | "MUW" | "NSC" | "NWP" | "OBX" | "OHG" | "PAC" | "PEA" | "PEF" | "PEM" | "PEP" | "PER" | "PES" | "PIL" | "PIP" | "QRT" | "RAC" | "RBI" | "RBM" | "RCL" | "RCM" | "RCX" | "RDS" | "REQ" | "REX" | "RFG" | "RFL" | "RFS" | "RFW" | "RGX" | "RIS" | "RLI" | "RLM" | "RMD" | "RNG" | "ROP" | "ROX" | "RPB" | "RPG" | "RRE" | "RRW" | "RRY" | "RSB" | "RSC" | "RXB" | "RXC" | "RXD" | "RXE" | "RXG" | "RXS" | "SCO" | "SHL" | "SHR" | "SPF" | "SPX" | "SUR" | "SWP" | "VAL" | "VOL" | "VUN" | "WET" | "XPS";
|
|
4
|
+
export type SpecialHandlingCodeEnum1 = "ACT" | "AGC" | "ALO" | "AOG" | "ATT" | "AVI" | "AXA" | "BIG" | "BSA" | "BUP" | "CAO" | "CAT" | "CC" | "COF" | "COL" | "COM" | "COU" | "CRT" | "CSL" | "CUR" | "DDX" | "DGD" | "DGR" | "DIC" | "DIP" | "DIR" | "DNS" | "EAP" | "EAT" | "EAW" | "EBI" | "EBM" | "ECC" | "ECP" | "ELI" | "ELM" | "EMD" | "ERT" | "EXC" | "FIL" | "FRA" | "FRC" | "FRI" | "FRO" | "FTR" | "GCR" | "GLD" | "GOB" | "GOH" | "HEA" | "HEG" | "HNT" | "HST" | "HUM" | "IAT" | "IBS" | "ICE" | "IMP" | "LHO" | "LIC" | "MAG" | "MAL" | "MDC" | "MEX" | "MUW" | "NSC" | "NST" | "NWP" | "OBX" | "OHG" | "PAC" | "PAX" | "PEA" | "PEB" | "PED" | "PEF" | "PEL" | "PEM" | "PEP" | "PER" | "PES" | "PHY" | "PIL" | "PIP" | "PPR" | "PRI" | "PRO" | "PXD" | "PXS" | "QRT" | "QWT" | "RAC" | "RBI" | "RBM" | "RCL" | "RCM" | "RCS" | "RCX" | "RDS" | "REQ" | "REX" | "RFG" | "RFL" | "RFS" | "RFW" | "RGX" | "RIS" | "RLI" | "RLM" | "RMD" | "RNG" | "ROP" | "ROX" | "RPB" | "RPG" | "RRE" | "RRW" | "RRY" | "RSB" | "RSC" | "RXB" | "RXC" | "RXD" | "RXE" | "RXG" | "RXS" | "SBU" | "SCO" | "SEC" | "SEN" | "SHL" | "SHR" | "SMC" | "SML" | "SMU" | "SPF" | "SPX" | "SSS" | "SUR" | "SVC" | "SWP" | "TRC" | "TRU" | "TTS" | "TTT" | "UCB" | "UKS" | "ULD" | "UNKN" | "VAL" | "VEH" | "VIC" | "VOL" | "VUN" | "WET" | "XPS";
|
|
5
5
|
export declare const SpecialHandlingCodeEnum1: {
|
|
6
6
|
readonly Act: "ACT";
|
|
7
|
+
readonly Agc: "AGC";
|
|
8
|
+
readonly Alo: "ALO";
|
|
7
9
|
readonly Aog: "AOG";
|
|
8
10
|
readonly Att: "ATT";
|
|
9
11
|
readonly Avi: "AVI";
|
|
12
|
+
readonly Axa: "AXA";
|
|
10
13
|
readonly Big: "BIG";
|
|
14
|
+
readonly Bsa: "BSA";
|
|
11
15
|
readonly Bup: "BUP";
|
|
12
16
|
readonly Cao: "CAO";
|
|
13
17
|
readonly Cat: "CAT";
|
|
18
|
+
readonly Cc: "CC";
|
|
19
|
+
readonly Cof: "COF";
|
|
14
20
|
readonly Col: "COL";
|
|
15
21
|
readonly Com: "COM";
|
|
22
|
+
readonly Cou: "COU";
|
|
16
23
|
readonly Crt: "CRT";
|
|
24
|
+
readonly Csl: "CSL";
|
|
25
|
+
readonly Cur: "CUR";
|
|
26
|
+
readonly Ddx: "DDX";
|
|
27
|
+
readonly Dgd: "DGD";
|
|
28
|
+
readonly Dgr: "DGR";
|
|
29
|
+
readonly Dic: "DIC";
|
|
17
30
|
readonly Dip: "DIP";
|
|
31
|
+
readonly Dir: "DIR";
|
|
32
|
+
readonly Dns: "DNS";
|
|
18
33
|
readonly Eap: "EAP";
|
|
19
34
|
readonly Eat: "EAT";
|
|
20
35
|
readonly Eaw: "EAW";
|
|
36
|
+
readonly Ebi: "EBI";
|
|
37
|
+
readonly Ebm: "EBM";
|
|
21
38
|
readonly Ecc: "ECC";
|
|
22
39
|
readonly Ecp: "ECP";
|
|
23
40
|
readonly Eli: "ELI";
|
|
24
41
|
readonly Elm: "ELM";
|
|
25
42
|
readonly Emd: "EMD";
|
|
26
43
|
readonly Ert: "ERT";
|
|
44
|
+
readonly Exc: "EXC";
|
|
27
45
|
readonly Fil: "FIL";
|
|
46
|
+
readonly Fra: "FRA";
|
|
47
|
+
readonly Frc: "FRC";
|
|
28
48
|
readonly Fri: "FRI";
|
|
29
49
|
readonly Fro: "FRO";
|
|
50
|
+
readonly Ftr: "FTR";
|
|
51
|
+
readonly Gcr: "GCR";
|
|
52
|
+
readonly Gld: "GLD";
|
|
53
|
+
readonly Gob: "GOB";
|
|
30
54
|
readonly Goh: "GOH";
|
|
31
55
|
readonly Hea: "HEA";
|
|
32
56
|
readonly Heg: "HEG";
|
|
57
|
+
readonly Hnt: "HNT";
|
|
58
|
+
readonly Hst: "HST";
|
|
33
59
|
readonly Hum: "HUM";
|
|
60
|
+
readonly Iat: "IAT";
|
|
61
|
+
readonly Ibs: "IBS";
|
|
34
62
|
readonly Ice: "ICE";
|
|
63
|
+
readonly Imp: "IMP";
|
|
35
64
|
readonly Lho: "LHO";
|
|
36
65
|
readonly Lic: "LIC";
|
|
37
66
|
readonly Mag: "MAG";
|
|
38
67
|
readonly Mal: "MAL";
|
|
68
|
+
readonly Mdc: "MDC";
|
|
69
|
+
readonly Mex: "MEX";
|
|
39
70
|
readonly Muw: "MUW";
|
|
40
71
|
readonly Nsc: "NSC";
|
|
72
|
+
readonly Nst: "NST";
|
|
41
73
|
readonly Nwp: "NWP";
|
|
42
74
|
readonly Obx: "OBX";
|
|
43
75
|
readonly Ohg: "OHG";
|
|
44
76
|
readonly Pac: "PAC";
|
|
77
|
+
readonly Pax: "PAX";
|
|
45
78
|
readonly Pea: "PEA";
|
|
79
|
+
readonly Peb: "PEB";
|
|
80
|
+
readonly Ped: "PED";
|
|
46
81
|
readonly Pef: "PEF";
|
|
82
|
+
readonly Pel: "PEL";
|
|
47
83
|
readonly Pem: "PEM";
|
|
48
84
|
readonly Pep: "PEP";
|
|
49
85
|
readonly Per: "PER";
|
|
50
86
|
readonly Pes: "PES";
|
|
87
|
+
readonly Phy: "PHY";
|
|
51
88
|
readonly Pil: "PIL";
|
|
52
89
|
readonly Pip: "PIP";
|
|
90
|
+
readonly Ppr: "PPR";
|
|
91
|
+
readonly Pri: "PRI";
|
|
92
|
+
readonly Pro: "PRO";
|
|
93
|
+
readonly Pxd: "PXD";
|
|
94
|
+
readonly Pxs: "PXS";
|
|
53
95
|
readonly Qrt: "QRT";
|
|
96
|
+
readonly Qwt: "QWT";
|
|
54
97
|
readonly Rac: "RAC";
|
|
55
98
|
readonly Rbi: "RBI";
|
|
56
99
|
readonly Rbm: "RBM";
|
|
57
100
|
readonly Rcl: "RCL";
|
|
58
101
|
readonly Rcm: "RCM";
|
|
102
|
+
readonly Rcs: "RCS";
|
|
59
103
|
readonly Rcx: "RCX";
|
|
60
104
|
readonly Rds: "RDS";
|
|
61
105
|
readonly Req: "REQ";
|
|
@@ -85,14 +129,32 @@ export declare const SpecialHandlingCodeEnum1: {
|
|
|
85
129
|
readonly Rxe: "RXE";
|
|
86
130
|
readonly Rxg: "RXG";
|
|
87
131
|
readonly Rxs: "RXS";
|
|
132
|
+
readonly Sbu: "SBU";
|
|
88
133
|
readonly Sco: "SCO";
|
|
134
|
+
readonly Sec: "SEC";
|
|
135
|
+
readonly Sen: "SEN";
|
|
89
136
|
readonly Shl: "SHL";
|
|
90
137
|
readonly Shr: "SHR";
|
|
138
|
+
readonly Smc: "SMC";
|
|
139
|
+
readonly Sml: "SML";
|
|
140
|
+
readonly Smu: "SMU";
|
|
91
141
|
readonly Spf: "SPF";
|
|
92
142
|
readonly Spx: "SPX";
|
|
143
|
+
readonly Sss: "SSS";
|
|
93
144
|
readonly Sur: "SUR";
|
|
145
|
+
readonly Svc: "SVC";
|
|
94
146
|
readonly Swp: "SWP";
|
|
147
|
+
readonly Trc: "TRC";
|
|
148
|
+
readonly Tru: "TRU";
|
|
149
|
+
readonly Tts: "TTS";
|
|
150
|
+
readonly Ttt: "TTT";
|
|
151
|
+
readonly Ucb: "UCB";
|
|
152
|
+
readonly Uks: "UKS";
|
|
153
|
+
readonly Uld: "ULD";
|
|
154
|
+
readonly Unkn: "UNKN";
|
|
95
155
|
readonly Val: "VAL";
|
|
156
|
+
readonly Veh: "VEH";
|
|
157
|
+
readonly Vic: "VIC";
|
|
96
158
|
readonly Vol: "VOL";
|
|
97
159
|
readonly Vun: "VUN";
|
|
98
160
|
readonly Wet: "WET";
|
|
@@ -3,58 +3,102 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const SpecialHandlingCodeEnum1 = {
|
|
5
5
|
Act: "ACT",
|
|
6
|
+
Agc: "AGC",
|
|
7
|
+
Alo: "ALO",
|
|
6
8
|
Aog: "AOG",
|
|
7
9
|
Att: "ATT",
|
|
8
10
|
Avi: "AVI",
|
|
11
|
+
Axa: "AXA",
|
|
9
12
|
Big: "BIG",
|
|
13
|
+
Bsa: "BSA",
|
|
10
14
|
Bup: "BUP",
|
|
11
15
|
Cao: "CAO",
|
|
12
16
|
Cat: "CAT",
|
|
17
|
+
Cc: "CC",
|
|
18
|
+
Cof: "COF",
|
|
13
19
|
Col: "COL",
|
|
14
20
|
Com: "COM",
|
|
21
|
+
Cou: "COU",
|
|
15
22
|
Crt: "CRT",
|
|
23
|
+
Csl: "CSL",
|
|
24
|
+
Cur: "CUR",
|
|
25
|
+
Ddx: "DDX",
|
|
26
|
+
Dgd: "DGD",
|
|
27
|
+
Dgr: "DGR",
|
|
28
|
+
Dic: "DIC",
|
|
16
29
|
Dip: "DIP",
|
|
30
|
+
Dir: "DIR",
|
|
31
|
+
Dns: "DNS",
|
|
17
32
|
Eap: "EAP",
|
|
18
33
|
Eat: "EAT",
|
|
19
34
|
Eaw: "EAW",
|
|
35
|
+
Ebi: "EBI",
|
|
36
|
+
Ebm: "EBM",
|
|
20
37
|
Ecc: "ECC",
|
|
21
38
|
Ecp: "ECP",
|
|
22
39
|
Eli: "ELI",
|
|
23
40
|
Elm: "ELM",
|
|
24
41
|
Emd: "EMD",
|
|
25
42
|
Ert: "ERT",
|
|
43
|
+
Exc: "EXC",
|
|
26
44
|
Fil: "FIL",
|
|
45
|
+
Fra: "FRA",
|
|
46
|
+
Frc: "FRC",
|
|
27
47
|
Fri: "FRI",
|
|
28
48
|
Fro: "FRO",
|
|
49
|
+
Ftr: "FTR",
|
|
50
|
+
Gcr: "GCR",
|
|
51
|
+
Gld: "GLD",
|
|
52
|
+
Gob: "GOB",
|
|
29
53
|
Goh: "GOH",
|
|
30
54
|
Hea: "HEA",
|
|
31
55
|
Heg: "HEG",
|
|
56
|
+
Hnt: "HNT",
|
|
57
|
+
Hst: "HST",
|
|
32
58
|
Hum: "HUM",
|
|
59
|
+
Iat: "IAT",
|
|
60
|
+
Ibs: "IBS",
|
|
33
61
|
Ice: "ICE",
|
|
62
|
+
Imp: "IMP",
|
|
34
63
|
Lho: "LHO",
|
|
35
64
|
Lic: "LIC",
|
|
36
65
|
Mag: "MAG",
|
|
37
66
|
Mal: "MAL",
|
|
67
|
+
Mdc: "MDC",
|
|
68
|
+
Mex: "MEX",
|
|
38
69
|
Muw: "MUW",
|
|
39
70
|
Nsc: "NSC",
|
|
71
|
+
Nst: "NST",
|
|
40
72
|
Nwp: "NWP",
|
|
41
73
|
Obx: "OBX",
|
|
42
74
|
Ohg: "OHG",
|
|
43
75
|
Pac: "PAC",
|
|
76
|
+
Pax: "PAX",
|
|
44
77
|
Pea: "PEA",
|
|
78
|
+
Peb: "PEB",
|
|
79
|
+
Ped: "PED",
|
|
45
80
|
Pef: "PEF",
|
|
81
|
+
Pel: "PEL",
|
|
46
82
|
Pem: "PEM",
|
|
47
83
|
Pep: "PEP",
|
|
48
84
|
Per: "PER",
|
|
49
85
|
Pes: "PES",
|
|
86
|
+
Phy: "PHY",
|
|
50
87
|
Pil: "PIL",
|
|
51
88
|
Pip: "PIP",
|
|
89
|
+
Ppr: "PPR",
|
|
90
|
+
Pri: "PRI",
|
|
91
|
+
Pro: "PRO",
|
|
92
|
+
Pxd: "PXD",
|
|
93
|
+
Pxs: "PXS",
|
|
52
94
|
Qrt: "QRT",
|
|
95
|
+
Qwt: "QWT",
|
|
53
96
|
Rac: "RAC",
|
|
54
97
|
Rbi: "RBI",
|
|
55
98
|
Rbm: "RBM",
|
|
56
99
|
Rcl: "RCL",
|
|
57
100
|
Rcm: "RCM",
|
|
101
|
+
Rcs: "RCS",
|
|
58
102
|
Rcx: "RCX",
|
|
59
103
|
Rds: "RDS",
|
|
60
104
|
Req: "REQ",
|
|
@@ -84,14 +128,32 @@ export const SpecialHandlingCodeEnum1 = {
|
|
|
84
128
|
Rxe: "RXE",
|
|
85
129
|
Rxg: "RXG",
|
|
86
130
|
Rxs: "RXS",
|
|
131
|
+
Sbu: "SBU",
|
|
87
132
|
Sco: "SCO",
|
|
133
|
+
Sec: "SEC",
|
|
134
|
+
Sen: "SEN",
|
|
88
135
|
Shl: "SHL",
|
|
89
136
|
Shr: "SHR",
|
|
137
|
+
Smc: "SMC",
|
|
138
|
+
Sml: "SML",
|
|
139
|
+
Smu: "SMU",
|
|
90
140
|
Spf: "SPF",
|
|
91
141
|
Spx: "SPX",
|
|
142
|
+
Sss: "SSS",
|
|
92
143
|
Sur: "SUR",
|
|
144
|
+
Svc: "SVC",
|
|
93
145
|
Swp: "SWP",
|
|
146
|
+
Trc: "TRC",
|
|
147
|
+
Tru: "TRU",
|
|
148
|
+
Tts: "TTS",
|
|
149
|
+
Ttt: "TTT",
|
|
150
|
+
Ucb: "UCB",
|
|
151
|
+
Uks: "UKS",
|
|
152
|
+
Uld: "ULD",
|
|
153
|
+
Unkn: "UNKN",
|
|
94
154
|
Val: "VAL",
|
|
155
|
+
Veh: "VEH",
|
|
156
|
+
Vic: "VIC",
|
|
95
157
|
Vol: "VOL",
|
|
96
158
|
Vun: "VUN",
|
|
97
159
|
Wet: "WET",
|
|
@@ -204,7 +204,22 @@ export * from "./ChampFlightStatus1.mjs";
|
|
|
204
204
|
export * from "./ChampFlightStatusEvent1.mjs";
|
|
205
205
|
export * from "./ChampOriginAndDestination.mjs";
|
|
206
206
|
export * from "./ChampQuantity.mjs";
|
|
207
|
-
export * from "./
|
|
207
|
+
export * from "./ChrtGptAssistantMessageItem.mjs";
|
|
208
|
+
export * from "./ChrtGptCompletedEvent.mjs";
|
|
209
|
+
export * from "./ChrtGptConversation1.mjs";
|
|
210
|
+
export * from "./ChrtGptConversationListRes.mjs";
|
|
211
|
+
export * from "./ChrtGptConversationRes.mjs";
|
|
212
|
+
export * from "./ChrtGptConversationSortByEnum.mjs";
|
|
213
|
+
export * from "./ChrtGptErrorEvent.mjs";
|
|
214
|
+
export * from "./ChrtGptEvent.mjs";
|
|
215
|
+
export * from "./ChrtGptHistoryItem.mjs";
|
|
216
|
+
export * from "./ChrtGptStartedEvent.mjs";
|
|
217
|
+
export * from "./ChrtGptTextDeltaEvent.mjs";
|
|
218
|
+
export * from "./ChrtGptTitleEvent.mjs";
|
|
219
|
+
export * from "./ChrtGptToolCalledEvent.mjs";
|
|
220
|
+
export * from "./ChrtGptToolOutputEvent.mjs";
|
|
221
|
+
export * from "./ChrtGptUserMessageItem.mjs";
|
|
222
|
+
export * from "./ChrtGptWebSearchEvent.mjs";
|
|
208
223
|
export * from "./ChrtGroundProviderRates1.mjs";
|
|
209
224
|
export * from "./ChrtGroundProviderRatesListRes.mjs";
|
|
210
225
|
export * from "./ChrtGroundProviderRatesSortByEnum.mjs";
|
|
@@ -298,6 +313,7 @@ export * from "./DepartmentTypeaheadFieldEnum.mjs";
|
|
|
298
313
|
export * from "./DepartmentTypeaheadResult.mjs";
|
|
299
314
|
export * from "./DepartmentTypeaheadValue.mjs";
|
|
300
315
|
export * from "./DeviceExpandedRes.mjs";
|
|
316
|
+
export * from "./DeviceForCargoRes.mjs";
|
|
301
317
|
export * from "./DeviceLimitedForList1.mjs";
|
|
302
318
|
export * from "./DeviceListRes.mjs";
|
|
303
319
|
export * from "./DevicePausedTimeWindow1.mjs";
|
|
@@ -590,6 +606,7 @@ export * from "./OrgMembersAndDrivers.mjs";
|
|
|
590
606
|
export * from "./OrgMembersAndDriversListRes.mjs";
|
|
591
607
|
export * from "./OrgPrivateData1.mjs";
|
|
592
608
|
export * from "./OrgPublicData1.mjs";
|
|
609
|
+
export * from "./OrgPublicDataS3ObjectMetadata1.mjs";
|
|
593
610
|
export * from "./OrgRoleEnum.mjs";
|
|
594
611
|
export * from "./OrgShippingIntegrationEnum1.mjs";
|
|
595
612
|
export * from "./OrgTypeEnum.mjs";
|
|
@@ -204,7 +204,22 @@ export * from "./ChampFlightStatus1.mjs";
|
|
|
204
204
|
export * from "./ChampFlightStatusEvent1.mjs";
|
|
205
205
|
export * from "./ChampOriginAndDestination.mjs";
|
|
206
206
|
export * from "./ChampQuantity.mjs";
|
|
207
|
-
export * from "./
|
|
207
|
+
export * from "./ChrtGptAssistantMessageItem.mjs";
|
|
208
|
+
export * from "./ChrtGptCompletedEvent.mjs";
|
|
209
|
+
export * from "./ChrtGptConversation1.mjs";
|
|
210
|
+
export * from "./ChrtGptConversationListRes.mjs";
|
|
211
|
+
export * from "./ChrtGptConversationRes.mjs";
|
|
212
|
+
export * from "./ChrtGptConversationSortByEnum.mjs";
|
|
213
|
+
export * from "./ChrtGptErrorEvent.mjs";
|
|
214
|
+
export * from "./ChrtGptEvent.mjs";
|
|
215
|
+
export * from "./ChrtGptHistoryItem.mjs";
|
|
216
|
+
export * from "./ChrtGptStartedEvent.mjs";
|
|
217
|
+
export * from "./ChrtGptTextDeltaEvent.mjs";
|
|
218
|
+
export * from "./ChrtGptTitleEvent.mjs";
|
|
219
|
+
export * from "./ChrtGptToolCalledEvent.mjs";
|
|
220
|
+
export * from "./ChrtGptToolOutputEvent.mjs";
|
|
221
|
+
export * from "./ChrtGptUserMessageItem.mjs";
|
|
222
|
+
export * from "./ChrtGptWebSearchEvent.mjs";
|
|
208
223
|
export * from "./ChrtGroundProviderRates1.mjs";
|
|
209
224
|
export * from "./ChrtGroundProviderRatesListRes.mjs";
|
|
210
225
|
export * from "./ChrtGroundProviderRatesSortByEnum.mjs";
|
|
@@ -298,6 +313,7 @@ export * from "./DepartmentTypeaheadFieldEnum.mjs";
|
|
|
298
313
|
export * from "./DepartmentTypeaheadResult.mjs";
|
|
299
314
|
export * from "./DepartmentTypeaheadValue.mjs";
|
|
300
315
|
export * from "./DeviceExpandedRes.mjs";
|
|
316
|
+
export * from "./DeviceForCargoRes.mjs";
|
|
301
317
|
export * from "./DeviceLimitedForList1.mjs";
|
|
302
318
|
export * from "./DeviceListRes.mjs";
|
|
303
319
|
export * from "./DevicePausedTimeWindow1.mjs";
|
|
@@ -590,6 +606,7 @@ export * from "./OrgMembersAndDrivers.mjs";
|
|
|
590
606
|
export * from "./OrgMembersAndDriversListRes.mjs";
|
|
591
607
|
export * from "./OrgPrivateData1.mjs";
|
|
592
608
|
export * from "./OrgPublicData1.mjs";
|
|
609
|
+
export * from "./OrgPublicDataS3ObjectMetadata1.mjs";
|
|
593
610
|
export * from "./OrgRoleEnum.mjs";
|
|
594
611
|
export * from "./OrgShippingIntegrationEnum1.mjs";
|
|
595
612
|
export * from "./OrgTypeEnum.mjs";
|
|
@@ -3,5 +3,6 @@ export * from "./runtime/index.mjs";
|
|
|
3
3
|
export * as url from "./url/index.mjs";
|
|
4
4
|
export * from "./auth/index.mjs";
|
|
5
5
|
export * from "./base64.mjs";
|
|
6
|
+
export * from "./stream/index.mjs";
|
|
6
7
|
export * from "./form-data-utils/index.mjs";
|
|
7
8
|
export * as file from "./file/index.mjs";
|
package/dist/esm/core/index.mjs
CHANGED
|
@@ -3,5 +3,6 @@ export * from "./runtime/index.mjs";
|
|
|
3
3
|
export * as url from "./url/index.mjs";
|
|
4
4
|
export * from "./auth/index.mjs";
|
|
5
5
|
export * from "./base64.mjs";
|
|
6
|
+
export * from "./stream/index.mjs";
|
|
6
7
|
export * from "./form-data-utils/index.mjs";
|
|
7
8
|
export * as file from "./file/index.mjs";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare namespace Stream {
|
|
2
|
+
interface Args {
|
|
3
|
+
/**
|
|
4
|
+
* The HTTP response stream to read from.
|
|
5
|
+
*/
|
|
6
|
+
stream: ReadableStream;
|
|
7
|
+
/**
|
|
8
|
+
* The event shape to use for parsing the stream data.
|
|
9
|
+
*/
|
|
10
|
+
eventShape: JsonEvent | SseEvent;
|
|
11
|
+
/**
|
|
12
|
+
* An abort signal to stop the stream.
|
|
13
|
+
*/
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
}
|
|
16
|
+
interface JsonEvent {
|
|
17
|
+
type: "json";
|
|
18
|
+
messageTerminator: string;
|
|
19
|
+
}
|
|
20
|
+
interface SseEvent {
|
|
21
|
+
type: "sse";
|
|
22
|
+
streamTerminator?: string;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export declare class Stream<T> implements AsyncIterable<T> {
|
|
26
|
+
private stream;
|
|
27
|
+
private parse;
|
|
28
|
+
/**
|
|
29
|
+
* The prefix to use for each message. For example,
|
|
30
|
+
* for SSE, the prefix is "data: ".
|
|
31
|
+
*/
|
|
32
|
+
private prefix;
|
|
33
|
+
private messageTerminator;
|
|
34
|
+
private streamTerminator;
|
|
35
|
+
private controller;
|
|
36
|
+
constructor({ stream, parse, eventShape, signal }: Stream.Args & {
|
|
37
|
+
parse: (val: unknown) => Promise<T>;
|
|
38
|
+
});
|
|
39
|
+
private iterMessages;
|
|
40
|
+
[Symbol.asyncIterator](): AsyncIterator<T, void, unknown>;
|
|
41
|
+
private decodeChunk;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Browser polyfill for ReadableStream
|
|
45
|
+
*/
|
|
46
|
+
export declare function readableStreamAsyncIterable<T>(stream: any): AsyncIterableIterator<T>;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
11
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
12
|
+
var m = o[Symbol.asyncIterator], i;
|
|
13
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
14
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
15
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
16
|
+
};
|
|
17
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
18
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
19
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
20
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
21
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
22
|
+
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
23
|
+
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
24
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
25
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
26
|
+
function fulfill(value) { resume("next", value); }
|
|
27
|
+
function reject(value) { resume("throw", value); }
|
|
28
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
29
|
+
};
|
|
30
|
+
import { RUNTIME } from "../runtime/index.mjs";
|
|
31
|
+
const DATA_PREFIX = "data:";
|
|
32
|
+
export class Stream {
|
|
33
|
+
constructor({ stream, parse, eventShape, signal }) {
|
|
34
|
+
this.controller = new AbortController();
|
|
35
|
+
this.stream = stream;
|
|
36
|
+
this.parse = parse;
|
|
37
|
+
if (eventShape.type === "sse") {
|
|
38
|
+
this.prefix = DATA_PREFIX;
|
|
39
|
+
this.messageTerminator = "\n";
|
|
40
|
+
this.streamTerminator = eventShape.streamTerminator;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.messageTerminator = eventShape.messageTerminator;
|
|
44
|
+
}
|
|
45
|
+
signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", () => this.controller.abort());
|
|
46
|
+
}
|
|
47
|
+
iterMessages() {
|
|
48
|
+
return __asyncGenerator(this, arguments, function* iterMessages_1() {
|
|
49
|
+
var _a, e_1, _b, _c;
|
|
50
|
+
this.controller.signal;
|
|
51
|
+
const stream = readableStreamAsyncIterable(this.stream);
|
|
52
|
+
let buf = "";
|
|
53
|
+
let prefixSeen = false;
|
|
54
|
+
try {
|
|
55
|
+
for (var _d = true, stream_1 = __asyncValues(stream), stream_1_1; stream_1_1 = yield __await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) {
|
|
56
|
+
_c = stream_1_1.value;
|
|
57
|
+
_d = false;
|
|
58
|
+
const chunk = _c;
|
|
59
|
+
buf += this.decodeChunk(chunk);
|
|
60
|
+
let terminatorIndex;
|
|
61
|
+
while ((terminatorIndex = buf.indexOf(this.messageTerminator)) >= 0) {
|
|
62
|
+
let line = buf.slice(0, terminatorIndex + 1);
|
|
63
|
+
buf = buf.slice(terminatorIndex + this.messageTerminator.length);
|
|
64
|
+
if (!line.trim()) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if (!prefixSeen && this.prefix != null) {
|
|
68
|
+
const prefixIndex = line.indexOf(this.prefix);
|
|
69
|
+
if (prefixIndex === -1) {
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
prefixSeen = true;
|
|
73
|
+
line = line.slice(prefixIndex + this.prefix.length);
|
|
74
|
+
}
|
|
75
|
+
if (this.streamTerminator != null && line.includes(this.streamTerminator)) {
|
|
76
|
+
return yield __await(void 0);
|
|
77
|
+
}
|
|
78
|
+
const message = yield __await(this.parse(JSON.parse(line)));
|
|
79
|
+
yield yield __await(message);
|
|
80
|
+
prefixSeen = false;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
85
|
+
finally {
|
|
86
|
+
try {
|
|
87
|
+
if (!_d && !_a && (_b = stream_1.return)) yield __await(_b.call(stream_1));
|
|
88
|
+
}
|
|
89
|
+
finally { if (e_1) throw e_1.error; }
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
[Symbol.asyncIterator]() {
|
|
94
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
95
|
+
var _b, e_2, _c, _d;
|
|
96
|
+
try {
|
|
97
|
+
for (var _e = true, _f = __asyncValues(this.iterMessages()), _g; _g = yield __await(_f.next()), _b = _g.done, !_b; _e = true) {
|
|
98
|
+
_d = _g.value;
|
|
99
|
+
_e = false;
|
|
100
|
+
const message = _d;
|
|
101
|
+
yield yield __await(message);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
105
|
+
finally {
|
|
106
|
+
try {
|
|
107
|
+
if (!_e && !_b && (_c = _f.return)) yield __await(_c.call(_f));
|
|
108
|
+
}
|
|
109
|
+
finally { if (e_2) throw e_2.error; }
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
decodeChunk(chunk) {
|
|
114
|
+
let decoded = "";
|
|
115
|
+
// If TextDecoder is present, use it
|
|
116
|
+
if (typeof TextDecoder !== "undefined") {
|
|
117
|
+
const decoder = new TextDecoder("utf8");
|
|
118
|
+
decoded += decoder.decode(chunk);
|
|
119
|
+
}
|
|
120
|
+
// Buffer is present in Node.js environment
|
|
121
|
+
else if (RUNTIME.type === "node" && typeof chunk !== "undefined") {
|
|
122
|
+
decoded += Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
123
|
+
}
|
|
124
|
+
return decoded;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Browser polyfill for ReadableStream
|
|
129
|
+
*/
|
|
130
|
+
// biome-ignore lint/suspicious/noExplicitAny: allow explicit any
|
|
131
|
+
export function readableStreamAsyncIterable(stream) {
|
|
132
|
+
if (stream[Symbol.asyncIterator]) {
|
|
133
|
+
return stream;
|
|
134
|
+
}
|
|
135
|
+
const reader = stream.getReader();
|
|
136
|
+
return {
|
|
137
|
+
next() {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
try {
|
|
140
|
+
const result = yield reader.read();
|
|
141
|
+
if (result === null || result === void 0 ? void 0 : result.done) {
|
|
142
|
+
reader.releaseLock();
|
|
143
|
+
} // release lock when stream becomes closed
|
|
144
|
+
return result;
|
|
145
|
+
}
|
|
146
|
+
catch (e) {
|
|
147
|
+
reader.releaseLock(); // release lock when stream becomes errored
|
|
148
|
+
throw e;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
return() {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
const cancelPromise = reader.cancel();
|
|
155
|
+
reader.releaseLock();
|
|
156
|
+
yield cancelPromise;
|
|
157
|
+
return { done: true, value: undefined };
|
|
158
|
+
});
|
|
159
|
+
},
|
|
160
|
+
[Symbol.asyncIterator]() {
|
|
161
|
+
return this;
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stream } from "./Stream.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stream } from "./Stream.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.1024.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.1024.0";
|