@chrt-inc/typescript-sdk 1.441.1 → 1.441.2
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 +11 -9
- package/dist/cjs/Client.d.ts +3 -3
- package/dist/cjs/Client.js +19 -19
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.js +2 -2
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/requests/BodyLineItemGroupsS3ObjectPostAddV1BillingLineItemGroupsS3ObjectsAddV1LineItemGroupIdPost.d.ts +2 -3
- package/dist/cjs/api/resources/index.d.ts +1 -2
- package/dist/cjs/api/resources/index.js +2 -3
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +6 -72
- package/dist/cjs/api/resources/orgs/client/Client.js +14 -348
- package/dist/cjs/api/resources/orgs/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/orgs/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/orgs/resources/index.js +4 -1
- package/dist/cjs/api/resources/orgs/resources/privateData/client/Client.d.ts +44 -0
- package/dist/cjs/api/resources/orgs/resources/privateData/client/Client.js +118 -0
- package/dist/cjs/api/resources/orgs/resources/privateData/index.d.ts +1 -0
- package/dist/cjs/{core/exports.js → api/resources/orgs/resources/privateData/index.js} +1 -1
- package/dist/cjs/api/resources/orgs/resources/publicData/client/Client.d.ts +96 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/client/Client.js +361 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/client/index.d.ts +2 -0
- package/dist/cjs/{core/file → api/resources/orgs/resources/publicData/client}/index.js +1 -2
- package/dist/cjs/api/resources/orgs/resources/publicData/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/orgs/resources/publicData/index.d.ts +1 -0
- package/dist/cjs/{exports.js → api/resources/orgs/resources/publicData/index.js} +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.js +2 -2
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1ShippingTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.d.ts +2 -3
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.js +2 -2
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1ShippingTaskGroupsS3ObjectAddV1TaskGroupIdPost.d.ts +2 -3
- package/dist/cjs/api/resources/users/client/Client.d.ts +6 -77
- package/dist/cjs/api/resources/users/client/Client.js +11 -349
- package/dist/cjs/api/resources/users/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/users/client/index.js +0 -15
- package/dist/cjs/api/resources/users/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/users/resources/index.js +4 -1
- package/dist/cjs/api/resources/users/resources/privateData/client/Client.d.ts +87 -0
- package/dist/cjs/api/resources/users/resources/privateData/client/Client.js +309 -0
- package/dist/cjs/api/resources/users/resources/privateData/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/users/resources/privateData/client/index.js +17 -0
- package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/FirebaseCloudMessagingTokenClientCreate1.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/privateData/index.d.ts +1 -0
- package/dist/cjs/api/resources/users/resources/privateData/index.js +17 -0
- package/dist/cjs/api/resources/users/resources/publicData/client/Client.d.ts +44 -0
- package/dist/cjs/api/resources/users/resources/publicData/client/Client.js +118 -0
- package/dist/cjs/api/resources/users/resources/publicData/client/index.js +2 -0
- package/dist/cjs/api/resources/users/resources/publicData/index.d.ts +1 -0
- package/dist/cjs/api/resources/users/resources/publicData/index.js +17 -0
- package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.d.ts +1 -1
- package/dist/cjs/api/types/TaskGroupS3ObjectMetadata1.d.ts +1 -1
- package/dist/cjs/api/types/ValidationError.d.ts +2 -0
- package/dist/cjs/core/index.d.ts +0 -1
- package/dist/cjs/core/index.js +1 -2
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +0 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -3
- package/dist/esm/Client.mjs +7 -7
- package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.mjs +2 -2
- package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/requests/BodyLineItemGroupsS3ObjectPostAddV1BillingLineItemGroupsS3ObjectsAddV1LineItemGroupIdPost.d.mts +2 -3
- package/dist/esm/api/resources/index.d.mts +1 -2
- package/dist/esm/api/resources/index.mjs +1 -2
- package/dist/esm/api/resources/orgs/client/Client.d.mts +6 -72
- package/dist/esm/api/resources/orgs/client/Client.mjs +10 -344
- package/dist/esm/api/resources/orgs/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/orgs/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/orgs/resources/index.mjs +3 -0
- package/dist/esm/api/resources/orgs/resources/privateData/client/Client.d.mts +44 -0
- package/dist/esm/api/resources/orgs/resources/privateData/client/Client.mjs +81 -0
- package/dist/esm/api/resources/orgs/resources/privateData/client/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/privateData/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/privateData/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/Client.d.mts +96 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/Client.mjs +324 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/index.d.mts +2 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/orgs/resources/publicData/client/requests/index.mjs +1 -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/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.mjs +2 -2
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1ShippingTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.d.mts +2 -3
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.mjs +2 -2
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1ShippingTaskGroupsS3ObjectAddV1TaskGroupIdPost.d.mts +2 -3
- package/dist/esm/api/resources/users/client/Client.d.mts +6 -77
- package/dist/esm/api/resources/users/client/Client.mjs +10 -315
- package/dist/esm/api/resources/users/client/index.d.mts +0 -1
- package/dist/esm/api/resources/users/client/index.mjs +1 -1
- package/dist/esm/api/resources/users/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/users/resources/index.mjs +3 -0
- package/dist/esm/api/resources/users/resources/privateData/client/Client.d.mts +87 -0
- package/dist/esm/api/resources/users/resources/privateData/client/Client.mjs +272 -0
- package/dist/esm/api/resources/users/resources/privateData/client/index.d.mts +2 -0
- package/dist/esm/api/resources/users/resources/privateData/client/index.mjs +1 -0
- package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/FirebaseCloudMessagingTokenClientCreate1.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/privateData/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/users/resources/privateData/index.d.mts +1 -0
- package/dist/esm/api/resources/users/resources/privateData/index.mjs +1 -0
- package/dist/esm/api/resources/users/resources/publicData/client/Client.d.mts +44 -0
- package/dist/esm/api/resources/users/resources/publicData/client/Client.mjs +81 -0
- package/dist/esm/api/resources/users/resources/publicData/client/index.d.mts +1 -0
- package/dist/esm/api/resources/users/resources/publicData/client/index.mjs +1 -0
- package/dist/esm/api/resources/users/resources/publicData/index.d.mts +1 -0
- package/dist/esm/api/resources/users/resources/publicData/index.mjs +1 -0
- package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.d.mts +1 -1
- package/dist/esm/api/types/TaskGroupS3ObjectMetadata1.d.mts +1 -1
- package/dist/esm/api/types/ValidationError.d.mts +2 -0
- package/dist/esm/core/index.d.mts +0 -1
- package/dist/esm/core/index.mjs +0 -1
- package/dist/esm/index.d.mts +0 -1
- package/dist/esm/index.mjs +0 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1962 -1956
- package/dist/cjs/core/exports.d.ts +0 -1
- package/dist/cjs/core/file/exports.d.ts +0 -1
- package/dist/cjs/core/file/file.d.ts +0 -5
- package/dist/cjs/core/file/file.js +0 -203
- package/dist/cjs/core/file/index.d.ts +0 -2
- package/dist/cjs/core/file/types.d.ts +0 -66
- package/dist/cjs/exports.d.ts +0 -1
- package/dist/esm/core/exports.d.mts +0 -1
- package/dist/esm/core/exports.mjs +0 -1
- package/dist/esm/core/file/exports.d.mts +0 -1
- package/dist/esm/core/file/file.d.mts +0 -5
- package/dist/esm/core/file/file.mjs +0 -167
- package/dist/esm/core/file/index.d.mts +0 -2
- package/dist/esm/core/file/index.mjs +0 -2
- package/dist/esm/core/file/types.d.mts +0 -66
- package/dist/esm/exports.d.mts +0 -1
- package/dist/esm/exports.mjs +0 -1
- /package/dist/{esm/api/resources/users/client/requests/index.mjs → cjs/api/resources/orgs/resources/privateData/client/index.d.ts} +0 -0
- /package/dist/cjs/api/resources/{users/client/requests → orgs/resources/privateData/client}/index.js +0 -0
- /package/dist/cjs/api/resources/orgs/{client → resources/publicData/client}/requests/CreateOrgPublicDataReq.d.ts +0 -0
- /package/dist/cjs/api/resources/orgs/{client → resources/publicData/client}/requests/CreateOrgPublicDataReq.js +0 -0
- /package/dist/cjs/api/resources/orgs/{client → resources/publicData/client}/requests/UpdateOrgPublicDataReq.d.ts +0 -0
- /package/dist/cjs/api/resources/orgs/{client → resources/publicData/client}/requests/UpdateOrgPublicDataReq.js +0 -0
- /package/dist/cjs/{core/file/exports.js → api/resources/orgs/resources/publicData/client/requests/index.js} +0 -0
- /package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/FirebaseCloudMessagingTokenClientCreate1.js +0 -0
- /package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientCreate1.d.ts +0 -0
- /package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientCreate1.js +0 -0
- /package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientUpdate1.d.ts +0 -0
- /package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientUpdate1.js +0 -0
- /package/dist/cjs/api/resources/users/{client → resources/privateData/client}/requests/index.d.ts +0 -0
- /package/dist/cjs/{core/file/types.js → api/resources/users/resources/privateData/client/requests/index.js} +0 -0
- /package/dist/{esm/core/file/exports.mjs → cjs/api/resources/users/resources/publicData/client/index.d.ts} +0 -0
- /package/dist/esm/{core/file/types.mjs → api/resources/orgs/resources/privateData/client/index.d.mts} +0 -0
- /package/dist/esm/api/resources/orgs/{client → resources/publicData/client}/requests/CreateOrgPublicDataReq.d.mts +0 -0
- /package/dist/esm/api/resources/orgs/{client → resources/publicData/client}/requests/CreateOrgPublicDataReq.mjs +0 -0
- /package/dist/esm/api/resources/orgs/{client → resources/publicData/client}/requests/UpdateOrgPublicDataReq.d.mts +0 -0
- /package/dist/esm/api/resources/orgs/{client → resources/publicData/client}/requests/UpdateOrgPublicDataReq.mjs +0 -0
- /package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/FirebaseCloudMessagingTokenClientCreate1.mjs +0 -0
- /package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientCreate1.d.mts +0 -0
- /package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientCreate1.mjs +0 -0
- /package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientUpdate1.d.mts +0 -0
- /package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/UserPrivateDataClientUpdate1.mjs +0 -0
- /package/dist/esm/api/resources/users/{client → resources/privateData/client}/requests/index.d.mts +0 -0
package/README.md
CHANGED
|
@@ -41,7 +41,9 @@ Instantiate and use the client with the following:
|
|
|
41
41
|
import { ChrtClient } from "@chrt-inc/typescript-sdk";
|
|
42
42
|
|
|
43
43
|
const client = new ChrtClient({ token: "YOUR_TOKEN" });
|
|
44
|
-
await client.orgs.
|
|
44
|
+
await client.orgs.setOrgTypeV1({
|
|
45
|
+
org_type: "courier",
|
|
46
|
+
});
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
## Request and Response Types
|
|
@@ -52,7 +54,7 @@ following namespace:
|
|
|
52
54
|
```typescript
|
|
53
55
|
import { Chrt } from "@chrt-inc/typescript-sdk";
|
|
54
56
|
|
|
55
|
-
const request: Chrt.
|
|
57
|
+
const request: Chrt.SetOrgTypeReq = {
|
|
56
58
|
...
|
|
57
59
|
};
|
|
58
60
|
```
|
|
@@ -66,7 +68,7 @@ will be thrown.
|
|
|
66
68
|
import { ChrtError } from "@chrt-inc/typescript-sdk";
|
|
67
69
|
|
|
68
70
|
try {
|
|
69
|
-
await client.orgs.
|
|
71
|
+
await client.orgs.setOrgTypeV1(...);
|
|
70
72
|
} catch (err) {
|
|
71
73
|
if (err instanceof ChrtError) {
|
|
72
74
|
console.log(err.statusCode);
|
|
@@ -474,7 +476,7 @@ const text = new TextDecoder().decode(bytes);
|
|
|
474
476
|
If you would like to send additional headers as part of the request, use the `headers` request option.
|
|
475
477
|
|
|
476
478
|
```typescript
|
|
477
|
-
const response = await client.orgs.
|
|
479
|
+
const response = await client.orgs.setOrgTypeV1(..., {
|
|
478
480
|
headers: {
|
|
479
481
|
'X-Custom-Header': 'custom value'
|
|
480
482
|
}
|
|
@@ -486,7 +488,7 @@ const response = await client.orgs.createOrgPublicDataV1(..., {
|
|
|
486
488
|
If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
|
|
487
489
|
|
|
488
490
|
```typescript
|
|
489
|
-
const response = await client.orgs.
|
|
491
|
+
const response = await client.orgs.setOrgTypeV1(..., {
|
|
490
492
|
queryParams: {
|
|
491
493
|
'customQueryParamKey': 'custom query param value'
|
|
492
494
|
}
|
|
@@ -508,7 +510,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
|
|
|
508
510
|
Use the `maxRetries` request option to configure this behavior.
|
|
509
511
|
|
|
510
512
|
```typescript
|
|
511
|
-
const response = await client.orgs.
|
|
513
|
+
const response = await client.orgs.setOrgTypeV1(..., {
|
|
512
514
|
maxRetries: 0 // override maxRetries at the request level
|
|
513
515
|
});
|
|
514
516
|
```
|
|
@@ -518,7 +520,7 @@ const response = await client.orgs.createOrgPublicDataV1(..., {
|
|
|
518
520
|
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
519
521
|
|
|
520
522
|
```typescript
|
|
521
|
-
const response = await client.orgs.
|
|
523
|
+
const response = await client.orgs.setOrgTypeV1(..., {
|
|
522
524
|
timeoutInSeconds: 30 // override timeout to 30s
|
|
523
525
|
});
|
|
524
526
|
```
|
|
@@ -529,7 +531,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
|
|
|
529
531
|
|
|
530
532
|
```typescript
|
|
531
533
|
const controller = new AbortController();
|
|
532
|
-
const response = await client.orgs.
|
|
534
|
+
const response = await client.orgs.setOrgTypeV1(..., {
|
|
533
535
|
abortSignal: controller.signal
|
|
534
536
|
});
|
|
535
537
|
controller.abort(); // aborts the request
|
|
@@ -541,7 +543,7 @@ The SDK provides access to raw response data, including headers, through the `.w
|
|
|
541
543
|
The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
|
|
542
544
|
|
|
543
545
|
```typescript
|
|
544
|
-
const { data, rawResponse } = await client.orgs.
|
|
546
|
+
const { data, rawResponse } = await client.orgs.setOrgTypeV1(...).withRawResponse();
|
|
545
547
|
|
|
546
548
|
console.log(data);
|
|
547
549
|
console.log(rawResponse.headers['X-My-Header']);
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
import * as environments from "./environments.js";
|
|
5
5
|
import * as core from "./core/index.js";
|
|
6
6
|
import { Orgs } from "./api/resources/orgs/client/Client.js";
|
|
7
|
-
import { Users } from "./api/resources/users/client/Client.js";
|
|
8
7
|
import { Utils } from "./api/resources/utils/client/Client.js";
|
|
9
8
|
import { Analytics } from "./api/resources/analytics/client/Client.js";
|
|
10
9
|
import { Billing } from "./api/resources/billing/client/Client.js";
|
|
11
10
|
import { Notifications } from "./api/resources/notifications/client/Client.js";
|
|
12
11
|
import { Shipping } from "./api/resources/shipping/client/Client.js";
|
|
13
12
|
import { Tracking } from "./api/resources/tracking/client/Client.js";
|
|
13
|
+
import { Users } from "./api/resources/users/client/Client.js";
|
|
14
14
|
export declare namespace ChrtClient {
|
|
15
15
|
interface Options {
|
|
16
16
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
@@ -37,20 +37,20 @@ export declare namespace ChrtClient {
|
|
|
37
37
|
export declare class ChrtClient {
|
|
38
38
|
protected readonly _options: ChrtClient.Options;
|
|
39
39
|
protected _orgs: Orgs | undefined;
|
|
40
|
-
protected _users: Users | undefined;
|
|
41
40
|
protected _utils: Utils | undefined;
|
|
42
41
|
protected _analytics: Analytics | undefined;
|
|
43
42
|
protected _billing: Billing | undefined;
|
|
44
43
|
protected _notifications: Notifications | undefined;
|
|
45
44
|
protected _shipping: Shipping | undefined;
|
|
46
45
|
protected _tracking: Tracking | undefined;
|
|
46
|
+
protected _users: Users | undefined;
|
|
47
47
|
constructor(_options?: ChrtClient.Options);
|
|
48
48
|
get orgs(): Orgs;
|
|
49
|
-
get users(): Users;
|
|
50
49
|
get utils(): Utils;
|
|
51
50
|
get analytics(): Analytics;
|
|
52
51
|
get billing(): Billing;
|
|
53
52
|
get notifications(): Notifications;
|
|
54
53
|
get shipping(): Shipping;
|
|
55
54
|
get tracking(): Tracking;
|
|
55
|
+
get users(): Users;
|
|
56
56
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -40,20 +40,20 @@ exports.ChrtClient = void 0;
|
|
|
40
40
|
const core = __importStar(require("./core/index.js"));
|
|
41
41
|
const headers_js_1 = require("./core/headers.js");
|
|
42
42
|
const Client_js_1 = require("./api/resources/orgs/client/Client.js");
|
|
43
|
-
const Client_js_2 = require("./api/resources/
|
|
44
|
-
const Client_js_3 = require("./api/resources/
|
|
45
|
-
const Client_js_4 = require("./api/resources/
|
|
46
|
-
const Client_js_5 = require("./api/resources/
|
|
47
|
-
const Client_js_6 = require("./api/resources/
|
|
48
|
-
const Client_js_7 = require("./api/resources/
|
|
49
|
-
const Client_js_8 = require("./api/resources/
|
|
43
|
+
const Client_js_2 = require("./api/resources/utils/client/Client.js");
|
|
44
|
+
const Client_js_3 = require("./api/resources/analytics/client/Client.js");
|
|
45
|
+
const Client_js_4 = require("./api/resources/billing/client/Client.js");
|
|
46
|
+
const Client_js_5 = require("./api/resources/notifications/client/Client.js");
|
|
47
|
+
const Client_js_6 = require("./api/resources/shipping/client/Client.js");
|
|
48
|
+
const Client_js_7 = require("./api/resources/tracking/client/Client.js");
|
|
49
|
+
const Client_js_8 = require("./api/resources/users/client/Client.js");
|
|
50
50
|
class ChrtClient {
|
|
51
51
|
constructor(_options = {}) {
|
|
52
52
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
53
53
|
"X-Fern-Language": "JavaScript",
|
|
54
54
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
55
|
-
"X-Fern-SDK-Version": "1.441.
|
|
56
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.441.
|
|
55
|
+
"X-Fern-SDK-Version": "1.441.2",
|
|
56
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.441.2",
|
|
57
57
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
58
58
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
59
59
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -62,33 +62,33 @@ class ChrtClient {
|
|
|
62
62
|
var _a;
|
|
63
63
|
return ((_a = this._orgs) !== null && _a !== void 0 ? _a : (this._orgs = new Client_js_1.Orgs(this._options)));
|
|
64
64
|
}
|
|
65
|
-
get users() {
|
|
66
|
-
var _a;
|
|
67
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_2.Users(this._options)));
|
|
68
|
-
}
|
|
69
65
|
get utils() {
|
|
70
66
|
var _a;
|
|
71
|
-
return ((_a = this._utils) !== null && _a !== void 0 ? _a : (this._utils = new
|
|
67
|
+
return ((_a = this._utils) !== null && _a !== void 0 ? _a : (this._utils = new Client_js_2.Utils(this._options)));
|
|
72
68
|
}
|
|
73
69
|
get analytics() {
|
|
74
70
|
var _a;
|
|
75
|
-
return ((_a = this._analytics) !== null && _a !== void 0 ? _a : (this._analytics = new
|
|
71
|
+
return ((_a = this._analytics) !== null && _a !== void 0 ? _a : (this._analytics = new Client_js_3.Analytics(this._options)));
|
|
76
72
|
}
|
|
77
73
|
get billing() {
|
|
78
74
|
var _a;
|
|
79
|
-
return ((_a = this._billing) !== null && _a !== void 0 ? _a : (this._billing = new
|
|
75
|
+
return ((_a = this._billing) !== null && _a !== void 0 ? _a : (this._billing = new Client_js_4.Billing(this._options)));
|
|
80
76
|
}
|
|
81
77
|
get notifications() {
|
|
82
78
|
var _a;
|
|
83
|
-
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new
|
|
79
|
+
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_5.Notifications(this._options)));
|
|
84
80
|
}
|
|
85
81
|
get shipping() {
|
|
86
82
|
var _a;
|
|
87
|
-
return ((_a = this._shipping) !== null && _a !== void 0 ? _a : (this._shipping = new
|
|
83
|
+
return ((_a = this._shipping) !== null && _a !== void 0 ? _a : (this._shipping = new Client_js_6.Shipping(this._options)));
|
|
88
84
|
}
|
|
89
85
|
get tracking() {
|
|
90
86
|
var _a;
|
|
91
|
-
return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new
|
|
87
|
+
return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new Client_js_7.Tracking(this._options)));
|
|
88
|
+
}
|
|
89
|
+
get users() {
|
|
90
|
+
var _a;
|
|
91
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_8.Users(this._options)));
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
exports.ChrtClient = ChrtClient;
|
|
@@ -61,7 +61,7 @@ export declare class S3Objects {
|
|
|
61
61
|
* @example
|
|
62
62
|
* import { createReadStream } from "fs";
|
|
63
63
|
* await client.billing.lineItemGroups.s3Objects.addV1("line_item_group_id", {
|
|
64
|
-
* file:
|
|
64
|
+
* file: "file"
|
|
65
65
|
* })
|
|
66
66
|
*/
|
|
67
67
|
addV1(lineItemGroupId: string, request: Chrt.billing.lineItemGroups.BodyLineItemGroupsS3ObjectPostAddV1BillingLineItemGroupsS3ObjectsAddV1LineItemGroupIdPost, requestOptions?: S3Objects.RequestOptions): core.HttpResponsePromise<boolean>;
|
package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.js
CHANGED
|
@@ -179,7 +179,7 @@ class S3Objects {
|
|
|
179
179
|
* @example
|
|
180
180
|
* import { createReadStream } from "fs";
|
|
181
181
|
* await client.billing.lineItemGroups.s3Objects.addV1("line_item_group_id", {
|
|
182
|
-
* file:
|
|
182
|
+
* file: "file"
|
|
183
183
|
* })
|
|
184
184
|
*/
|
|
185
185
|
addV1(lineItemGroupId, request, requestOptions) {
|
|
@@ -189,7 +189,7 @@ class S3Objects {
|
|
|
189
189
|
return __awaiter(this, void 0, void 0, function* () {
|
|
190
190
|
var _a, _b, _c, _d;
|
|
191
191
|
const _request = yield core.newFormData();
|
|
192
|
-
|
|
192
|
+
_request.append("file", request.file);
|
|
193
193
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
194
194
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ Authorization: yield this._getAuthorizationHeader() }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
195
195
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as core from "../../../../../../../../../core/index.js";
|
|
5
4
|
/**
|
|
6
5
|
* @example
|
|
7
6
|
* {
|
|
8
|
-
* file:
|
|
7
|
+
* file: "file"
|
|
9
8
|
* }
|
|
10
9
|
*/
|
|
11
10
|
export interface BodyLineItemGroupsS3ObjectPostAddV1BillingLineItemGroupsS3ObjectsAddV1LineItemGroupIdPost {
|
|
12
|
-
file:
|
|
11
|
+
file: string;
|
|
13
12
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
export * as billing from "./billing/index.js";
|
|
2
2
|
export * as orgs from "./orgs/index.js";
|
|
3
3
|
export * as shipping from "./shipping/index.js";
|
|
4
|
-
export * as users from "./users/index.js";
|
|
5
4
|
export * as utils from "./utils/index.js";
|
|
6
5
|
export * as analytics from "./analytics/index.js";
|
|
7
6
|
export * as notifications from "./notifications/index.js";
|
|
8
7
|
export * as tracking from "./tracking/index.js";
|
|
8
|
+
export * as users from "./users/index.js";
|
|
9
9
|
export * from "./orgs/client/requests/index.js";
|
|
10
|
-
export * from "./users/client/requests/index.js";
|
|
11
10
|
export * from "./utils/client/requests/index.js";
|
|
@@ -36,15 +36,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.users = exports.tracking = exports.notifications = exports.analytics = exports.utils = exports.shipping = exports.orgs = exports.billing = void 0;
|
|
40
40
|
exports.billing = __importStar(require("./billing/index.js"));
|
|
41
41
|
exports.orgs = __importStar(require("./orgs/index.js"));
|
|
42
42
|
exports.shipping = __importStar(require("./shipping/index.js"));
|
|
43
|
-
exports.users = __importStar(require("./users/index.js"));
|
|
44
43
|
exports.utils = __importStar(require("./utils/index.js"));
|
|
45
44
|
exports.analytics = __importStar(require("./analytics/index.js"));
|
|
46
45
|
exports.notifications = __importStar(require("./notifications/index.js"));
|
|
47
46
|
exports.tracking = __importStar(require("./tracking/index.js"));
|
|
47
|
+
exports.users = __importStar(require("./users/index.js"));
|
|
48
48
|
__exportStar(require("./orgs/client/requests/index.js"), exports);
|
|
49
|
-
__exportStar(require("./users/client/requests/index.js"), exports);
|
|
50
49
|
__exportStar(require("./utils/client/requests/index.js"), exports);
|
|
@@ -6,7 +6,9 @@ import * as core from "../../../../core/index.js";
|
|
|
6
6
|
import * as Chrt from "../../../index.js";
|
|
7
7
|
import { Connections } from "../resources/connections/client/Client.js";
|
|
8
8
|
import { OffChrtShipperOrg } from "../resources/offChrtShipperOrg/client/Client.js";
|
|
9
|
+
import { PrivateData } from "../resources/privateData/client/Client.js";
|
|
9
10
|
import { OrgProfiles } from "../resources/orgProfiles/client/Client.js";
|
|
11
|
+
import { PublicData } from "../resources/publicData/client/Client.js";
|
|
10
12
|
import { OrgInfoForConnections } from "../resources/orgInfoForConnections/client/Client.js";
|
|
11
13
|
export declare namespace Orgs {
|
|
12
14
|
interface Options {
|
|
@@ -35,12 +37,16 @@ export declare class Orgs {
|
|
|
35
37
|
protected readonly _options: Orgs.Options;
|
|
36
38
|
protected _connections: Connections | undefined;
|
|
37
39
|
protected _offChrtShipperOrg: OffChrtShipperOrg | undefined;
|
|
40
|
+
protected _privateData: PrivateData | undefined;
|
|
38
41
|
protected _orgProfiles: OrgProfiles | undefined;
|
|
42
|
+
protected _publicData: PublicData | undefined;
|
|
39
43
|
protected _orgInfoForConnections: OrgInfoForConnections | undefined;
|
|
40
44
|
constructor(_options?: Orgs.Options);
|
|
41
45
|
get connections(): Connections;
|
|
42
46
|
get offChrtShipperOrg(): OffChrtShipperOrg;
|
|
47
|
+
get privateData(): PrivateData;
|
|
43
48
|
get orgProfiles(): OrgProfiles;
|
|
49
|
+
get publicData(): PublicData;
|
|
44
50
|
get orgInfoForConnections(): OrgInfoForConnections;
|
|
45
51
|
/**
|
|
46
52
|
* Retrieves basic organization information from the authentication service. | () -> (OrgInfoResponse)
|
|
@@ -62,78 +68,6 @@ export declare class Orgs {
|
|
|
62
68
|
*/
|
|
63
69
|
listMembersV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgMemberDetails[]>;
|
|
64
70
|
private __listMembersV1;
|
|
65
|
-
/**
|
|
66
|
-
* Retrieves private organization data for the caller's organization. | authz: min_org_role=operator | () -> (OrgPrivateData1)
|
|
67
|
-
*
|
|
68
|
-
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* await client.orgs.getOrgPrivateDataV1()
|
|
72
|
-
*/
|
|
73
|
-
getOrgPrivateDataV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgPrivateData1>;
|
|
74
|
-
private __getOrgPrivateDataV1;
|
|
75
|
-
/**
|
|
76
|
-
* Retrieves public organization data for the caller's organization. | () -> (OrgPublicData1)
|
|
77
|
-
*
|
|
78
|
-
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* await client.orgs.getOrgPublicDataV1()
|
|
82
|
-
*/
|
|
83
|
-
getOrgPublicDataV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgPublicData1>;
|
|
84
|
-
private __getOrgPublicDataV1;
|
|
85
|
-
/**
|
|
86
|
-
* Creates org_public_data and org_private_data documents for the caller's organization using org_type from JWT. | (CreateOrgPublicDataReq) -> (CreateOrgPublicDataRes)
|
|
87
|
-
*
|
|
88
|
-
* @param {Chrt.CreateOrgPublicDataReq} request
|
|
89
|
-
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
90
|
-
*
|
|
91
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* await client.orgs.createOrgPublicDataV1()
|
|
95
|
-
*/
|
|
96
|
-
createOrgPublicDataV1(request?: Chrt.CreateOrgPublicDataReq, requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.CreateOrgPublicDataRes>;
|
|
97
|
-
private __createOrgPublicDataV1;
|
|
98
|
-
/**
|
|
99
|
-
* Updates the handle and/or company_name for the caller's organization. | (UpdateOrgPublicDataReq) -> (bool)
|
|
100
|
-
*
|
|
101
|
-
* @param {Chrt.UpdateOrgPublicDataReq} request
|
|
102
|
-
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
103
|
-
*
|
|
104
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
105
|
-
*
|
|
106
|
-
* @example
|
|
107
|
-
* await client.orgs.updateOrgPublicDataV1()
|
|
108
|
-
*/
|
|
109
|
-
updateOrgPublicDataV1(request?: Chrt.UpdateOrgPublicDataReq, requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
110
|
-
private __updateOrgPublicDataV1;
|
|
111
|
-
/**
|
|
112
|
-
* Retrieves public organization data for a specific organization by ID. | () -> (OrgPublicData1)
|
|
113
|
-
*
|
|
114
|
-
* @param {string} orgId
|
|
115
|
-
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
116
|
-
*
|
|
117
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* await client.orgs.getOrgPublicDataByOrgIdV1("org_id")
|
|
121
|
-
*/
|
|
122
|
-
getOrgPublicDataByOrgIdV1(orgId: string, requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgPublicData1>;
|
|
123
|
-
private __getOrgPublicDataByOrgIdV1;
|
|
124
|
-
/**
|
|
125
|
-
* Returns True when the provided handle is available, otherwise False. | () -> (bool)
|
|
126
|
-
*
|
|
127
|
-
* @param {string} handle
|
|
128
|
-
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
|
-
*
|
|
130
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
131
|
-
*
|
|
132
|
-
* @example
|
|
133
|
-
* await client.orgs.getOrgPublicDataHandleAvailabilityV1("handle")
|
|
134
|
-
*/
|
|
135
|
-
getOrgPublicDataHandleAvailabilityV1(handle: string, requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
136
|
-
private __getOrgPublicDataHandleAvailabilityV1;
|
|
137
71
|
/**
|
|
138
72
|
* Sets the org_type in Clerk's JWT public metadata. Returns True if already set and matching, sets it if not present, or raises exception if conflicting. | (SetOrgTypeReq) -> (bool)
|
|
139
73
|
*
|