@chrt-inc/typescript-sdk 0.0.170-e → 0.0.170-g
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 -7
- package/dist/cjs/Client.d.ts +3 -6
- package/dist/cjs/Client.js +39 -44
- package/dist/cjs/api/index.d.ts +1 -1
- package/dist/cjs/api/index.js +1 -1
- package/dist/cjs/api/resources/index.d.ts +1 -5
- package/dist/cjs/api/resources/index.js +2 -6
- package/dist/cjs/api/resources/notifications/client/Client.d.ts +3 -37
- package/dist/cjs/api/resources/notifications/client/Client.js +7 -169
- package/dist/cjs/api/resources/notifications/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/notifications/client/index.js +0 -15
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.d.ts +57 -0
- package/dist/cjs/api/resources/{directory → notifications/resources/courier}/client/Client.js +69 -18
- package/dist/cjs/api/resources/notifications/{client → resources/courier/client}/requests/CourierNotificationPreferencesClientCreate1.d.ts +1 -1
- package/dist/cjs/api/resources/notifications/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/notifications/resources/index.js +3 -1
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.js +12 -12
- package/dist/cjs/api/resources/oortOffChrtShipperOrgConnectionInfo/client/Client.d.ts +10 -0
- package/dist/cjs/api/resources/oortOffChrtShipperOrgConnectionInfo/client/Client.js +52 -0
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +18 -18
- package/dist/cjs/api/resources/orgs/client/Client.js +30 -30
- package/dist/cjs/api/resources/payments/client/Client.d.ts +0 -8
- package/dist/cjs/api/resources/payments/client/Client.js +0 -47
- package/dist/cjs/api/resources/root/client/Client.d.ts +15 -34
- package/dist/cjs/api/resources/root/client/Client.js +20 -116
- package/dist/cjs/api/resources/root/index.d.ts +0 -1
- package/dist/cjs/api/resources/root/index.js +0 -1
- package/dist/cjs/api/resources/users/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/users/client/Client.js +4 -4
- package/dist/cjs/api/types/index.d.ts +0 -2
- package/dist/cjs/api/types/index.js +0 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -6
- package/dist/esm/Client.mjs +7 -12
- package/dist/esm/api/index.d.mts +1 -1
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/resources/index.d.mts +1 -5
- package/dist/esm/api/resources/index.mjs +1 -5
- package/dist/esm/api/resources/notifications/client/Client.d.mts +3 -37
- package/dist/esm/api/resources/notifications/client/Client.mjs +5 -134
- package/dist/esm/api/resources/notifications/client/index.d.mts +0 -1
- package/dist/esm/api/resources/notifications/client/index.mjs +1 -1
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.d.mts +57 -0
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.mjs +142 -0
- package/dist/esm/api/resources/notifications/{client → resources/courier/client}/requests/CourierNotificationPreferencesClientCreate1.d.mts +1 -1
- package/dist/esm/api/resources/notifications/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/notifications/resources/index.mjs +2 -0
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.mjs +12 -12
- package/dist/esm/api/resources/oortOffChrtShipperOrgConnectionInfo/client/Client.d.mts +10 -0
- package/dist/esm/api/resources/oortOffChrtShipperOrgConnectionInfo/client/Client.mjs +52 -0
- package/dist/esm/api/resources/orgs/client/Client.d.mts +18 -18
- package/dist/esm/api/resources/orgs/client/Client.mjs +30 -30
- package/dist/esm/api/resources/payments/client/Client.d.mts +0 -8
- package/dist/esm/api/resources/payments/client/Client.mjs +0 -47
- package/dist/esm/api/resources/root/client/Client.d.mts +15 -34
- package/dist/esm/api/resources/root/client/Client.mjs +20 -116
- package/dist/esm/api/resources/root/index.d.mts +0 -1
- package/dist/esm/api/resources/root/index.mjs +0 -1
- package/dist/esm/api/resources/users/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/users/client/Client.mjs +4 -4
- package/dist/esm/api/types/index.d.mts +0 -2
- package/dist/esm/api/types/index.mjs +0 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +170 -315
- package/dist/cjs/api/resources/directory/client/Client.d.ts +0 -45
- package/dist/cjs/api/resources/directory/client/requests/DbQueryParams.d.ts +0 -12
- package/dist/cjs/api/resources/directory/client/requests/DbQueryParams.js +0 -5
- package/dist/cjs/api/resources/directory/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/notifications/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/root/types/PydanticResponse.d.ts +0 -8
- package/dist/cjs/api/resources/root/types/PydanticResponse.js +0 -5
- package/dist/cjs/api/resources/root/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/root/types/index.js +0 -17
- package/dist/cjs/api/types/Shipper2.d.ts +0 -20
- package/dist/cjs/api/types/Shipper2.js +0 -5
- package/dist/cjs/api/types/StreetAddress1.d.ts +0 -18
- package/dist/cjs/api/types/StreetAddress1.js +0 -5
- package/dist/esm/api/resources/directory/client/Client.d.mts +0 -45
- package/dist/esm/api/resources/directory/client/Client.mjs +0 -91
- package/dist/esm/api/resources/directory/client/requests/DbQueryParams.d.mts +0 -12
- package/dist/esm/api/resources/directory/client/requests/DbQueryParams.mjs +0 -4
- package/dist/esm/api/resources/directory/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/notifications/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/root/types/PydanticResponse.d.mts +0 -8
- package/dist/esm/api/resources/root/types/PydanticResponse.mjs +0 -4
- package/dist/esm/api/resources/root/types/index.d.mts +0 -1
- package/dist/esm/api/resources/root/types/index.mjs +0 -1
- package/dist/esm/api/types/Shipper2.d.mts +0 -20
- package/dist/esm/api/types/Shipper2.mjs +0 -4
- package/dist/esm/api/types/StreetAddress1.d.mts +0 -18
- package/dist/esm/api/types/StreetAddress1.mjs +0 -4
- /package/dist/cjs/api/resources/{directory → notifications/resources/courier}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{directory → notifications/resources/courier}/client/index.js +0 -0
- /package/dist/cjs/api/resources/notifications/{client → resources/courier/client}/requests/CourierNotificationPreferencesClientCreate1.js +0 -0
- /package/dist/cjs/api/resources/notifications/{client → resources/courier/client}/requests/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{directory → notifications/resources/courier}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{directory → notifications/resources/courier}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{directory → notifications/resources/courier}/index.js +0 -0
- /package/dist/esm/api/resources/{directory → notifications/resources/courier}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{directory → notifications/resources/courier}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/notifications/{client → resources/courier/client}/requests/CourierNotificationPreferencesClientCreate1.mjs +0 -0
- /package/dist/esm/api/resources/notifications/{client → resources/courier/client}/requests/index.d.mts +0 -0
- /package/dist/esm/api/resources/{directory → notifications/resources/courier}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{directory → notifications/resources/courier}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{directory → notifications/resources/courier}/index.mjs +0 -0
|
@@ -25,12 +25,12 @@ export class Orgs {
|
|
|
25
25
|
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
|
-
* await client.orgs.
|
|
28
|
+
* await client.orgs.getHandle()
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
30
|
+
getHandle(requestOptions) {
|
|
31
|
+
return core.HttpResponsePromise.fromPromise(this.__getHandle(requestOptions));
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
__getHandle(requestOptions) {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
35
|
var _a, _b, _c, _d;
|
|
36
36
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -129,16 +129,16 @@ export class Orgs {
|
|
|
129
129
|
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
130
130
|
*
|
|
131
131
|
* @example
|
|
132
|
-
* await client.orgs.
|
|
132
|
+
* await client.orgs.listMembers()
|
|
133
133
|
*/
|
|
134
|
-
|
|
135
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
134
|
+
listMembers(requestOptions) {
|
|
135
|
+
return core.HttpResponsePromise.fromPromise(this.__listMembers(requestOptions));
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
__listMembers(requestOptions) {
|
|
138
138
|
return __awaiter(this, void 0, void 0, function* () {
|
|
139
139
|
var _a, _b, _c, _d;
|
|
140
140
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
141
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "orgs/members"),
|
|
141
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "orgs/members/list"),
|
|
142
142
|
method: "GET",
|
|
143
143
|
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
144
144
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -163,7 +163,7 @@ export class Orgs {
|
|
|
163
163
|
rawResponse: _response.rawResponse,
|
|
164
164
|
});
|
|
165
165
|
case "timeout":
|
|
166
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /orgs/members.");
|
|
166
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /orgs/members/list.");
|
|
167
167
|
case "unknown":
|
|
168
168
|
throw new errors.ChrtError({
|
|
169
169
|
message: _response.error.errorMessage,
|
|
@@ -178,12 +178,12 @@ export class Orgs {
|
|
|
178
178
|
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
179
179
|
*
|
|
180
180
|
* @example
|
|
181
|
-
* await client.orgs.
|
|
181
|
+
* await client.orgs.getPublicData()
|
|
182
182
|
*/
|
|
183
|
-
|
|
184
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
183
|
+
getPublicData(requestOptions) {
|
|
184
|
+
return core.HttpResponsePromise.fromPromise(this.__getPublicData(requestOptions));
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
__getPublicData(requestOptions) {
|
|
187
187
|
return __awaiter(this, void 0, void 0, function* () {
|
|
188
188
|
var _a, _b, _c, _d;
|
|
189
189
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -230,19 +230,19 @@ export class Orgs {
|
|
|
230
230
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
231
231
|
*
|
|
232
232
|
* @example
|
|
233
|
-
* await client.orgs.
|
|
233
|
+
* await client.orgs.createPublicData({
|
|
234
234
|
* company_name: "company_name",
|
|
235
235
|
* handle: "handle"
|
|
236
236
|
* })
|
|
237
237
|
*/
|
|
238
|
-
|
|
239
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
238
|
+
createPublicData(request, requestOptions) {
|
|
239
|
+
return core.HttpResponsePromise.fromPromise(this.__createPublicData(request, requestOptions));
|
|
240
240
|
}
|
|
241
|
-
|
|
241
|
+
__createPublicData(request, requestOptions) {
|
|
242
242
|
return __awaiter(this, void 0, void 0, function* () {
|
|
243
243
|
var _a, _b, _c, _d;
|
|
244
244
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
245
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "orgs/public_data"),
|
|
245
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "orgs/public_data/create"),
|
|
246
246
|
method: "POST",
|
|
247
247
|
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
248
248
|
contentType: "application/json",
|
|
@@ -275,7 +275,7 @@ export class Orgs {
|
|
|
275
275
|
rawResponse: _response.rawResponse,
|
|
276
276
|
});
|
|
277
277
|
case "timeout":
|
|
278
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /orgs/public_data.");
|
|
278
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /orgs/public_data/create.");
|
|
279
279
|
case "unknown":
|
|
280
280
|
throw new errors.ChrtError({
|
|
281
281
|
message: _response.error.errorMessage,
|
|
@@ -293,16 +293,16 @@ export class Orgs {
|
|
|
293
293
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
294
294
|
*
|
|
295
295
|
* @example
|
|
296
|
-
* await client.orgs.
|
|
296
|
+
* await client.orgs.updatePublicData()
|
|
297
297
|
*/
|
|
298
|
-
|
|
299
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
298
|
+
updatePublicData(request = {}, requestOptions) {
|
|
299
|
+
return core.HttpResponsePromise.fromPromise(this.__updatePublicData(request, requestOptions));
|
|
300
300
|
}
|
|
301
|
-
|
|
301
|
+
__updatePublicData() {
|
|
302
302
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
303
303
|
var _a, _b, _c, _d;
|
|
304
304
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
305
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "orgs/public_data"),
|
|
305
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "orgs/public_data/update"),
|
|
306
306
|
method: "PATCH",
|
|
307
307
|
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
308
308
|
contentType: "application/json",
|
|
@@ -335,7 +335,7 @@ export class Orgs {
|
|
|
335
335
|
rawResponse: _response.rawResponse,
|
|
336
336
|
});
|
|
337
337
|
case "timeout":
|
|
338
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /orgs/public_data.");
|
|
338
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /orgs/public_data/update.");
|
|
339
339
|
case "unknown":
|
|
340
340
|
throw new errors.ChrtError({
|
|
341
341
|
message: _response.error.errorMessage,
|
|
@@ -353,12 +353,12 @@ export class Orgs {
|
|
|
353
353
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
354
354
|
*
|
|
355
355
|
* @example
|
|
356
|
-
* await client.orgs.
|
|
356
|
+
* await client.orgs.getPublicDataByOrgId("org_id")
|
|
357
357
|
*/
|
|
358
|
-
|
|
359
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
358
|
+
getPublicDataByOrgId(orgId, requestOptions) {
|
|
359
|
+
return core.HttpResponsePromise.fromPromise(this.__getPublicDataByOrgId(orgId, requestOptions));
|
|
360
360
|
}
|
|
361
|
-
|
|
361
|
+
__getPublicDataByOrgId(orgId, requestOptions) {
|
|
362
362
|
return __awaiter(this, void 0, void 0, function* () {
|
|
363
363
|
var _a, _b, _c, _d;
|
|
364
364
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -57,13 +57,5 @@ export declare class Payments {
|
|
|
57
57
|
*/
|
|
58
58
|
syncStripeToClerk(requestOptions?: Payments.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
59
59
|
private __syncStripeToClerk;
|
|
60
|
-
/**
|
|
61
|
-
* @param {Payments.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* await client.payments.webhook()
|
|
65
|
-
*/
|
|
66
|
-
webhook(requestOptions?: Payments.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
67
|
-
private __webhook;
|
|
68
60
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
69
61
|
}
|
|
@@ -134,53 +134,6 @@ export class Payments {
|
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
/**
|
|
138
|
-
* @param {Payments.RequestOptions} requestOptions - Request-specific configuration.
|
|
139
|
-
*
|
|
140
|
-
* @example
|
|
141
|
-
* await client.payments.webhook()
|
|
142
|
-
*/
|
|
143
|
-
webhook(requestOptions) {
|
|
144
|
-
return core.HttpResponsePromise.fromPromise(this.__webhook(requestOptions));
|
|
145
|
-
}
|
|
146
|
-
__webhook(requestOptions) {
|
|
147
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
-
var _a, _b, _c, _d;
|
|
149
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
150
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "payments/webhook"),
|
|
151
|
-
method: "POST",
|
|
152
|
-
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
153
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
154
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
155
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
156
|
-
});
|
|
157
|
-
if (_response.ok) {
|
|
158
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
159
|
-
}
|
|
160
|
-
if (_response.error.reason === "status-code") {
|
|
161
|
-
throw new errors.ChrtError({
|
|
162
|
-
statusCode: _response.error.statusCode,
|
|
163
|
-
body: _response.error.body,
|
|
164
|
-
rawResponse: _response.rawResponse,
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
switch (_response.error.reason) {
|
|
168
|
-
case "non-json":
|
|
169
|
-
throw new errors.ChrtError({
|
|
170
|
-
statusCode: _response.error.statusCode,
|
|
171
|
-
body: _response.error.rawBody,
|
|
172
|
-
rawResponse: _response.rawResponse,
|
|
173
|
-
});
|
|
174
|
-
case "timeout":
|
|
175
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /payments/webhook.");
|
|
176
|
-
case "unknown":
|
|
177
|
-
throw new errors.ChrtError({
|
|
178
|
-
message: _response.error.errorMessage,
|
|
179
|
-
rawResponse: _response.rawResponse,
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
137
|
_getAuthorizationHeader() {
|
|
185
138
|
return __awaiter(this, void 0, void 0, function* () {
|
|
186
139
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../environments.mjs";
|
|
5
5
|
import * as core from "../../../../core/index.mjs";
|
|
6
|
-
import * as Chrt from "../../../index.mjs";
|
|
7
6
|
export declare namespace Root {
|
|
8
7
|
interface Options {
|
|
9
8
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
@@ -34,61 +33,43 @@ export declare class Root {
|
|
|
34
33
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
34
|
*
|
|
36
35
|
* @example
|
|
37
|
-
* await client.root.
|
|
36
|
+
* await client.root.pingUnauthd()
|
|
38
37
|
*/
|
|
39
|
-
|
|
40
|
-
private
|
|
38
|
+
pingUnauthd(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
39
|
+
private __pingUnauthd;
|
|
41
40
|
/**
|
|
42
41
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
42
|
*
|
|
44
43
|
* @example
|
|
45
|
-
* await client.root.
|
|
44
|
+
* await client.root.pingAuthd()
|
|
46
45
|
*/
|
|
47
|
-
|
|
48
|
-
private
|
|
46
|
+
pingAuthd(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<Record<string, string>>;
|
|
47
|
+
private __pingAuthd;
|
|
49
48
|
/**
|
|
50
49
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
50
|
*
|
|
52
51
|
* @example
|
|
53
|
-
* await client.root.
|
|
52
|
+
* await client.root.failure()
|
|
54
53
|
*/
|
|
55
|
-
|
|
56
|
-
private
|
|
57
|
-
/**
|
|
58
|
-
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* await client.root.getFailure()
|
|
62
|
-
*/
|
|
63
|
-
getFailure(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
64
|
-
private __getFailure;
|
|
54
|
+
failure(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
55
|
+
private __failure;
|
|
65
56
|
/**
|
|
66
57
|
* Used for monitoring system health
|
|
67
58
|
*
|
|
68
59
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
69
60
|
*
|
|
70
61
|
* @example
|
|
71
|
-
* await client.root.
|
|
62
|
+
* await client.root.health()
|
|
72
63
|
*/
|
|
73
|
-
|
|
74
|
-
private
|
|
64
|
+
health(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
65
|
+
private __health;
|
|
75
66
|
/**
|
|
76
67
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
68
|
*
|
|
78
69
|
* @example
|
|
79
|
-
* await client.root.
|
|
80
|
-
*/
|
|
81
|
-
getOptionallyAuthd(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
82
|
-
private __getOptionallyAuthd;
|
|
83
|
-
/**
|
|
84
|
-
* This route exposes pydantic models - which are not returned by any other route - to the OpenAPI spec to ensure they get included during sdk codegen
|
|
85
|
-
*
|
|
86
|
-
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* await client.root.pydantic()
|
|
70
|
+
* await client.root.pingOptionallyAuthd()
|
|
90
71
|
*/
|
|
91
|
-
|
|
92
|
-
private
|
|
72
|
+
pingOptionallyAuthd(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
73
|
+
private __pingOptionallyAuthd;
|
|
93
74
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
94
75
|
}
|
|
@@ -24,12 +24,12 @@ export class Root {
|
|
|
24
24
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
|
-
* await client.root.
|
|
27
|
+
* await client.root.pingUnauthd()
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
29
|
+
pingUnauthd(requestOptions) {
|
|
30
|
+
return core.HttpResponsePromise.fromPromise(this.__pingUnauthd(requestOptions));
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
__pingUnauthd(requestOptions) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
34
|
var _a, _b, _c, _d;
|
|
35
35
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -71,12 +71,12 @@ export class Root {
|
|
|
71
71
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
72
72
|
*
|
|
73
73
|
* @example
|
|
74
|
-
* await client.root.
|
|
74
|
+
* await client.root.pingAuthd()
|
|
75
75
|
*/
|
|
76
|
-
|
|
77
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
76
|
+
pingAuthd(requestOptions) {
|
|
77
|
+
return core.HttpResponsePromise.fromPromise(this.__pingAuthd(requestOptions));
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
__pingAuthd(requestOptions) {
|
|
80
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
81
|
var _a, _b, _c, _d;
|
|
82
82
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -118,59 +118,12 @@ export class Root {
|
|
|
118
118
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
119
119
|
*
|
|
120
120
|
* @example
|
|
121
|
-
* await client.root.
|
|
121
|
+
* await client.root.failure()
|
|
122
122
|
*/
|
|
123
|
-
|
|
124
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
123
|
+
failure(requestOptions) {
|
|
124
|
+
return core.HttpResponsePromise.fromPromise(this.__failure(requestOptions));
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
-
var _a, _b, _c, _d;
|
|
129
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
130
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "authd"),
|
|
131
|
-
method: "POST",
|
|
132
|
-
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
133
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
134
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
135
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
136
|
-
});
|
|
137
|
-
if (_response.ok) {
|
|
138
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
139
|
-
}
|
|
140
|
-
if (_response.error.reason === "status-code") {
|
|
141
|
-
throw new errors.ChrtError({
|
|
142
|
-
statusCode: _response.error.statusCode,
|
|
143
|
-
body: _response.error.body,
|
|
144
|
-
rawResponse: _response.rawResponse,
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
switch (_response.error.reason) {
|
|
148
|
-
case "non-json":
|
|
149
|
-
throw new errors.ChrtError({
|
|
150
|
-
statusCode: _response.error.statusCode,
|
|
151
|
-
body: _response.error.rawBody,
|
|
152
|
-
rawResponse: _response.rawResponse,
|
|
153
|
-
});
|
|
154
|
-
case "timeout":
|
|
155
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /authd.");
|
|
156
|
-
case "unknown":
|
|
157
|
-
throw new errors.ChrtError({
|
|
158
|
-
message: _response.error.errorMessage,
|
|
159
|
-
rawResponse: _response.rawResponse,
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
166
|
-
*
|
|
167
|
-
* @example
|
|
168
|
-
* await client.root.getFailure()
|
|
169
|
-
*/
|
|
170
|
-
getFailure(requestOptions) {
|
|
171
|
-
return core.HttpResponsePromise.fromPromise(this.__getFailure(requestOptions));
|
|
172
|
-
}
|
|
173
|
-
__getFailure(requestOptions) {
|
|
126
|
+
__failure(requestOptions) {
|
|
174
127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
175
128
|
var _a, _b, _c, _d;
|
|
176
129
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -214,12 +167,12 @@ export class Root {
|
|
|
214
167
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
215
168
|
*
|
|
216
169
|
* @example
|
|
217
|
-
* await client.root.
|
|
170
|
+
* await client.root.health()
|
|
218
171
|
*/
|
|
219
|
-
|
|
220
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
172
|
+
health(requestOptions) {
|
|
173
|
+
return core.HttpResponsePromise.fromPromise(this.__health(requestOptions));
|
|
221
174
|
}
|
|
222
|
-
|
|
175
|
+
__health(requestOptions) {
|
|
223
176
|
return __awaiter(this, void 0, void 0, function* () {
|
|
224
177
|
var _a, _b, _c, _d;
|
|
225
178
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -261,12 +214,12 @@ export class Root {
|
|
|
261
214
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
262
215
|
*
|
|
263
216
|
* @example
|
|
264
|
-
* await client.root.
|
|
217
|
+
* await client.root.pingOptionallyAuthd()
|
|
265
218
|
*/
|
|
266
|
-
|
|
267
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
219
|
+
pingOptionallyAuthd(requestOptions) {
|
|
220
|
+
return core.HttpResponsePromise.fromPromise(this.__pingOptionallyAuthd(requestOptions));
|
|
268
221
|
}
|
|
269
|
-
|
|
222
|
+
__pingOptionallyAuthd(requestOptions) {
|
|
270
223
|
return __awaiter(this, void 0, void 0, function* () {
|
|
271
224
|
var _a, _b, _c, _d;
|
|
272
225
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -304,55 +257,6 @@ export class Root {
|
|
|
304
257
|
}
|
|
305
258
|
});
|
|
306
259
|
}
|
|
307
|
-
/**
|
|
308
|
-
* This route exposes pydantic models - which are not returned by any other route - to the OpenAPI spec to ensure they get included during sdk codegen
|
|
309
|
-
*
|
|
310
|
-
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
311
|
-
*
|
|
312
|
-
* @example
|
|
313
|
-
* await client.root.pydantic()
|
|
314
|
-
*/
|
|
315
|
-
pydantic(requestOptions) {
|
|
316
|
-
return core.HttpResponsePromise.fromPromise(this.__pydantic(requestOptions));
|
|
317
|
-
}
|
|
318
|
-
__pydantic(requestOptions) {
|
|
319
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
-
var _a, _b, _c, _d;
|
|
321
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
322
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "pydantic"),
|
|
323
|
-
method: "GET",
|
|
324
|
-
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
325
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
326
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
327
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
328
|
-
});
|
|
329
|
-
if (_response.ok) {
|
|
330
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
331
|
-
}
|
|
332
|
-
if (_response.error.reason === "status-code") {
|
|
333
|
-
throw new errors.ChrtError({
|
|
334
|
-
statusCode: _response.error.statusCode,
|
|
335
|
-
body: _response.error.body,
|
|
336
|
-
rawResponse: _response.rawResponse,
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
switch (_response.error.reason) {
|
|
340
|
-
case "non-json":
|
|
341
|
-
throw new errors.ChrtError({
|
|
342
|
-
statusCode: _response.error.statusCode,
|
|
343
|
-
body: _response.error.rawBody,
|
|
344
|
-
rawResponse: _response.rawResponse,
|
|
345
|
-
});
|
|
346
|
-
case "timeout":
|
|
347
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /pydantic.");
|
|
348
|
-
case "unknown":
|
|
349
|
-
throw new errors.ChrtError({
|
|
350
|
-
message: _response.error.errorMessage,
|
|
351
|
-
rawResponse: _response.rawResponse,
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
260
|
_getAuthorizationHeader() {
|
|
357
261
|
return __awaiter(this, void 0, void 0, function* () {
|
|
358
262
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -32,9 +32,9 @@ export declare class Users {
|
|
|
32
32
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
|
-
* await client.users.
|
|
35
|
+
* await client.users.getPublicData()
|
|
36
36
|
*/
|
|
37
|
-
|
|
38
|
-
private
|
|
37
|
+
getPublicData(requestOptions?: Users.RequestOptions): core.HttpResponsePromise<Chrt.UserPublicData6>;
|
|
38
|
+
private __getPublicData;
|
|
39
39
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
40
40
|
}
|
|
@@ -22,12 +22,12 @@ export class Users {
|
|
|
22
22
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
|
-
* await client.users.
|
|
25
|
+
* await client.users.getPublicData()
|
|
26
26
|
*/
|
|
27
|
-
|
|
28
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
27
|
+
getPublicData(requestOptions) {
|
|
28
|
+
return core.HttpResponsePromise.fromPromise(this.__getPublicData(requestOptions));
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
__getPublicData(requestOptions) {
|
|
31
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
32
|
var _a, _b, _c, _d;
|
|
33
33
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -58,14 +58,12 @@ export * from "./Position3D.mjs";
|
|
|
58
58
|
export * from "./PriceNameEnum.mjs";
|
|
59
59
|
export * from "./ReceivablesInvoice1.mjs";
|
|
60
60
|
export * from "./RouteTypeEnum1.mjs";
|
|
61
|
-
export * from "./Shipper2.mjs";
|
|
62
61
|
export * from "./ShipperContactInfo1.mjs";
|
|
63
62
|
export * from "./ShipperContactInfoClientCreate1.mjs";
|
|
64
63
|
export * from "./ShipperCourierConnection1.mjs";
|
|
65
64
|
export * from "./ShipperNotificationEventEnum.mjs";
|
|
66
65
|
export * from "./ShipperNotificationPreferences1.mjs";
|
|
67
66
|
export * from "./ShipperOrgConnectionInfo1.mjs";
|
|
68
|
-
export * from "./StreetAddress1.mjs";
|
|
69
67
|
export * from "./StripeConnectInvoice1.mjs";
|
|
70
68
|
export * from "./Task1.mjs";
|
|
71
69
|
export * from "./TaskActionEnum1.mjs";
|
|
@@ -58,14 +58,12 @@ export * from "./Position3D.mjs";
|
|
|
58
58
|
export * from "./PriceNameEnum.mjs";
|
|
59
59
|
export * from "./ReceivablesInvoice1.mjs";
|
|
60
60
|
export * from "./RouteTypeEnum1.mjs";
|
|
61
|
-
export * from "./Shipper2.mjs";
|
|
62
61
|
export * from "./ShipperContactInfo1.mjs";
|
|
63
62
|
export * from "./ShipperContactInfoClientCreate1.mjs";
|
|
64
63
|
export * from "./ShipperCourierConnection1.mjs";
|
|
65
64
|
export * from "./ShipperNotificationEventEnum.mjs";
|
|
66
65
|
export * from "./ShipperNotificationPreferences1.mjs";
|
|
67
66
|
export * from "./ShipperOrgConnectionInfo1.mjs";
|
|
68
|
-
export * from "./StreetAddress1.mjs";
|
|
69
67
|
export * from "./StripeConnectInvoice1.mjs";
|
|
70
68
|
export * from "./Task1.mjs";
|
|
71
69
|
export * from "./TaskActionEnum1.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.170-
|
|
1
|
+
export declare const SDK_VERSION = "0.0.170-g";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.170-
|
|
1
|
+
export const SDK_VERSION = "0.0.170-g";
|