@chrt-inc/typescript-sdk 1.344.1 → 1.353.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.
Files changed (50) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/billing/resources/statements/client/Client.d.ts +7 -9
  3. package/dist/cjs/api/resources/billing/resources/statements/client/Client.js +10 -18
  4. package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.ts +1 -7
  5. package/dist/cjs/api/resources/orgs/client/Client.d.ts +10 -0
  6. package/dist/cjs/api/resources/orgs/client/Client.js +51 -0
  7. package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +14 -0
  8. package/dist/cjs/api/resources/taskGroups/client/Client.js +60 -0
  9. package/dist/cjs/api/resources/tracking/resources/sharingSettings/client/Client.d.ts +13 -13
  10. package/dist/cjs/api/resources/tracking/resources/sharingSettings/client/Client.js +48 -48
  11. package/dist/cjs/api/types/LineItemGroupStatusEnum1.d.ts +1 -2
  12. package/dist/cjs/api/types/LineItemGroupStatusEnum1.js +0 -1
  13. package/dist/cjs/api/types/OrgPrivateData1.d.ts +20 -0
  14. package/dist/cjs/api/types/Statement1.d.ts +0 -3
  15. package/dist/cjs/api/types/StatementSortByEnum.d.ts +1 -2
  16. package/dist/cjs/api/types/StatementSortByEnum.js +0 -1
  17. package/dist/cjs/api/types/StatementStatusEnum1.d.ts +1 -2
  18. package/dist/cjs/api/types/StatementStatusEnum1.js +0 -1
  19. package/dist/cjs/api/types/index.d.ts +1 -1
  20. package/dist/cjs/api/types/index.js +1 -1
  21. package/dist/cjs/version.d.ts +1 -1
  22. package/dist/cjs/version.js +1 -1
  23. package/dist/esm/Client.mjs +2 -2
  24. package/dist/esm/api/resources/billing/resources/statements/client/Client.d.mts +7 -9
  25. package/dist/esm/api/resources/billing/resources/statements/client/Client.mjs +10 -18
  26. package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.mts +1 -7
  27. package/dist/esm/api/resources/orgs/client/Client.d.mts +10 -0
  28. package/dist/esm/api/resources/orgs/client/Client.mjs +51 -0
  29. package/dist/esm/api/resources/taskGroups/client/Client.d.mts +14 -0
  30. package/dist/esm/api/resources/taskGroups/client/Client.mjs +60 -0
  31. package/dist/esm/api/resources/tracking/resources/sharingSettings/client/Client.d.mts +13 -13
  32. package/dist/esm/api/resources/tracking/resources/sharingSettings/client/Client.mjs +48 -48
  33. package/dist/esm/api/types/LineItemGroupStatusEnum1.d.mts +1 -2
  34. package/dist/esm/api/types/LineItemGroupStatusEnum1.mjs +0 -1
  35. package/dist/esm/api/types/OrgPrivateData1.d.mts +20 -0
  36. package/dist/esm/api/types/Statement1.d.mts +0 -3
  37. package/dist/esm/api/types/StatementSortByEnum.d.mts +1 -2
  38. package/dist/esm/api/types/StatementSortByEnum.mjs +0 -1
  39. package/dist/esm/api/types/StatementStatusEnum1.d.mts +1 -2
  40. package/dist/esm/api/types/StatementStatusEnum1.mjs +0 -1
  41. package/dist/esm/api/types/index.d.mts +1 -1
  42. package/dist/esm/api/types/index.mjs +1 -1
  43. package/dist/esm/version.d.mts +1 -1
  44. package/dist/esm/version.mjs +1 -1
  45. package/package.json +1 -1
  46. package/reference.md +153 -29
  47. package/dist/cjs/api/types/SyncInvoiceRes.d.ts +0 -10
  48. package/dist/esm/api/types/SyncInvoiceRes.d.mts +0 -10
  49. /package/dist/cjs/api/types/{SyncInvoiceRes.js → OrgPrivateData1.js} +0 -0
  50. /package/dist/esm/api/types/{SyncInvoiceRes.mjs → OrgPrivateData1.mjs} +0 -0
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface OrgPrivateData1 {
6
+ schema_version: number;
7
+ org_type: Chrt.OrgTypeEnum;
8
+ /** Must be a string starting with `org_` */
9
+ org_id: string;
10
+ stripe_connect_account_id?: string | null;
11
+ default_rate_sheet__routed__shipper_pay_courier?: string | null;
12
+ default_rate_sheet__on_demand__shipper_pay_courier?: string | null;
13
+ default_rate_sheet__routed__courier_pay_driver?: string | null;
14
+ default_rate_sheet__on_demand__courier_pay_driver?: string | null;
15
+ default_rate_sheet__routed__shipper_pay_forwarder?: string | null;
16
+ default_rate_sheet__on_demand__shipper_pay_forwarder?: string | null;
17
+ default_rate_sheet__routed__forwarder_pay_courier?: string | null;
18
+ default_rate_sheet__on_demand__forwarder_pay_courier?: string | null;
19
+ _id: string;
20
+ }
@@ -29,14 +29,11 @@ export interface Statement1 {
29
29
  staged_at_timestamp?: string | null;
30
30
  opened_at_timestamp?: string | null;
31
31
  paid_at_timestamp?: string | null;
32
- voided_at_timestamp?: string | null;
33
32
  uncollectible_at_timestamp?: string | null;
34
33
  /** Must be a string starting with `user_` */
35
34
  marked_open_by_user_id?: string | null;
36
35
  /** Must be a string starting with `user_` */
37
36
  marked_paid_by_user_id?: string | null;
38
37
  /** Must be a string starting with `user_` */
39
- marked_voided_by_user_id?: string | null;
40
- /** Must be a string starting with `user_` */
41
38
  marked_uncollectible_by_user_id?: string | null;
42
39
  }
@@ -1,12 +1,11 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type StatementSortByEnum = "amount" | "staged_at_timestamp" | "opened_at_timestamp" | "paid_at_timestamp" | "voided_at_timestamp" | "uncollectible_at_timestamp";
4
+ export type StatementSortByEnum = "amount" | "staged_at_timestamp" | "opened_at_timestamp" | "paid_at_timestamp" | "uncollectible_at_timestamp";
5
5
  export declare const StatementSortByEnum: {
6
6
  readonly Amount: "amount";
7
7
  readonly StagedAtTimestamp: "staged_at_timestamp";
8
8
  readonly OpenedAtTimestamp: "opened_at_timestamp";
9
9
  readonly PaidAtTimestamp: "paid_at_timestamp";
10
- readonly VoidedAtTimestamp: "voided_at_timestamp";
11
10
  readonly UncollectibleAtTimestamp: "uncollectible_at_timestamp";
12
11
  };
@@ -9,6 +9,5 @@ exports.StatementSortByEnum = {
9
9
  StagedAtTimestamp: "staged_at_timestamp",
10
10
  OpenedAtTimestamp: "opened_at_timestamp",
11
11
  PaidAtTimestamp: "paid_at_timestamp",
12
- VoidedAtTimestamp: "voided_at_timestamp",
13
12
  UncollectibleAtTimestamp: "uncollectible_at_timestamp",
14
13
  };
@@ -1,11 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type StatementStatusEnum1 = "staged" | "open" | "paid" | "uncollectible" | "void";
4
+ export type StatementStatusEnum1 = "staged" | "open" | "paid" | "uncollectible";
5
5
  export declare const StatementStatusEnum1: {
6
6
  readonly Staged: "staged";
7
7
  readonly Open: "open";
8
8
  readonly Paid: "paid";
9
9
  readonly Uncollectible: "uncollectible";
10
- readonly Void: "void";
11
10
  };
@@ -9,5 +9,4 @@ exports.StatementStatusEnum1 = {
9
9
  Open: "open",
10
10
  Paid: "paid",
11
11
  Uncollectible: "uncollectible",
12
- Void: "void",
13
12
  };
@@ -67,6 +67,7 @@ export * from "./OrdersExpandedListRes.js";
67
67
  export * from "./OrdersNewDraftRes.js";
68
68
  export * from "./OrgMemberDetails.js";
69
69
  export * from "./OrgMembersAndDrivers.js";
70
+ export * from "./OrgPrivateData1.js";
70
71
  export * from "./OrgProfileRes1.js";
71
72
  export * from "./OrgPublicData1.js";
72
73
  export * from "./OrgRoleEnum.js";
@@ -106,7 +107,6 @@ export * from "./StatementStatusEnum1.js";
106
107
  export * from "./StatementsListRes.js";
107
108
  export * from "./StripeConnectAccountOnboardingLinkRes.js";
108
109
  export * from "./StripeConnectInvoiceStatusEnum.js";
109
- export * from "./SyncInvoiceRes.js";
110
110
  export * from "./Task1.js";
111
111
  export * from "./TaskArtifact1.js";
112
112
  export * from "./TaskArtifactClientCreate1.js";
@@ -83,6 +83,7 @@ __exportStar(require("./OrdersExpandedListRes.js"), exports);
83
83
  __exportStar(require("./OrdersNewDraftRes.js"), exports);
84
84
  __exportStar(require("./OrgMemberDetails.js"), exports);
85
85
  __exportStar(require("./OrgMembersAndDrivers.js"), exports);
86
+ __exportStar(require("./OrgPrivateData1.js"), exports);
86
87
  __exportStar(require("./OrgProfileRes1.js"), exports);
87
88
  __exportStar(require("./OrgPublicData1.js"), exports);
88
89
  __exportStar(require("./OrgRoleEnum.js"), exports);
@@ -122,7 +123,6 @@ __exportStar(require("./StatementStatusEnum1.js"), exports);
122
123
  __exportStar(require("./StatementsListRes.js"), exports);
123
124
  __exportStar(require("./StripeConnectAccountOnboardingLinkRes.js"), exports);
124
125
  __exportStar(require("./StripeConnectInvoiceStatusEnum.js"), exports);
125
- __exportStar(require("./SyncInvoiceRes.js"), exports);
126
126
  __exportStar(require("./Task1.js"), exports);
127
127
  __exportStar(require("./TaskArtifact1.js"), exports);
128
128
  __exportStar(require("./TaskArtifactClientCreate1.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.344.1";
1
+ export declare const SDK_VERSION = "1.353.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.344.1";
4
+ exports.SDK_VERSION = "1.353.0";
@@ -31,8 +31,8 @@ export class ChrtClient {
31
31
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
32
32
  "X-Fern-Language": "JavaScript",
33
33
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
34
- "X-Fern-SDK-Version": "1.344.1",
35
- "User-Agent": "@chrt-inc/typescript-sdk/1.344.1",
34
+ "X-Fern-SDK-Version": "1.353.0",
35
+ "User-Agent": "@chrt-inc/typescript-sdk/1.353.0",
36
36
  "X-Fern-Runtime": core.RUNTIME.type,
37
37
  "X-Fern-Runtime-Version": core.RUNTIME.version,
38
38
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -94,9 +94,7 @@ export declare class Statements {
94
94
  * filter_opened_at_timestamp_gte: "2024-01-15T09:30:00Z",
95
95
  * filter_opened_at_timestamp_lte: "2024-01-15T09:30:00Z",
96
96
  * filter_paid_at_timestamp_gte: "2024-01-15T09:30:00Z",
97
- * filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z",
98
- * filter_voided_at_timestamp_gte: "2024-01-15T09:30:00Z",
99
- * filter_voided_at_timestamp_lte: "2024-01-15T09:30:00Z"
97
+ * filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z"
100
98
  * })
101
99
  */
102
100
  listV1(request?: Chrt.billing.StatementsListV1Request, requestOptions?: Statements.RequestOptions): core.HttpResponsePromise<Chrt.StatementsListRes>;
@@ -177,7 +175,7 @@ export declare class Statements {
177
175
  openInvoiceV1(statementId: string, request?: Chrt.billing.OpenInvoiceReq, requestOptions?: Statements.RequestOptions): core.HttpResponsePromise<Chrt.Statement1>;
178
176
  private __openInvoiceV1;
179
177
  /**
180
- * Syncs invoice state from Stripe to the Statement and LineItemGroups. The webhook usually keeps invoices up to date, but users can manually trigger a sync. | authz: min_org_role=operator | () -> (SyncInvoiceRes)
178
+ * Syncs invoice state from Stripe Connect to the Statement and LineItemGroups. The webhook usually keeps invoices up to date, but users can manually trigger a sync. | authz: org_type=[courier, forwarder, shipper], min_org_role=operator, authz_personas=[statement_org_operators] | () -> (Statement1)
181
179
  *
182
180
  * @param {string} statementId
183
181
  * @param {Statements.RequestOptions} requestOptions - Request-specific configuration.
@@ -187,10 +185,10 @@ export declare class Statements {
187
185
  * @example
188
186
  * await client.billing.statements.syncInvoiceV1("statement_id")
189
187
  */
190
- syncInvoiceV1(statementId: string, requestOptions?: Statements.RequestOptions): core.HttpResponsePromise<Chrt.SyncInvoiceRes>;
188
+ syncInvoiceV1(statementId: string, requestOptions?: Statements.RequestOptions): core.HttpResponsePromise<Chrt.Statement1>;
191
189
  private __syncInvoiceV1;
192
190
  /**
193
- * Cancels/voids a Stripe Connect invoice. Statement must be OPEN or VOID. | authz: org_type=[courier, forwarder], min_org_role=operator, authz_personas=[statement_owner_operators], statement_status=OPEN, VOID | () -> (Statement1)
191
+ * Voids a Stripe Connect invoice. Statement reverts to STAGED and LIGs revert to FINALIZED. | authz: org_type=[courier, forwarder], min_org_role=operator, authz_personas=[statement_owner_operators], statement_status=OPEN | () -> (Statement1)
194
192
  *
195
193
  * @param {string} statementId
196
194
  * @param {Statements.RequestOptions} requestOptions - Request-specific configuration.
@@ -198,9 +196,9 @@ export declare class Statements {
198
196
  * @throws {@link Chrt.UnprocessableEntityError}
199
197
  *
200
198
  * @example
201
- * await client.billing.statements.cancelInvoiceV1("statement_id")
199
+ * await client.billing.statements.voidInvoiceV1("statement_id")
202
200
  */
203
- cancelInvoiceV1(statementId: string, requestOptions?: Statements.RequestOptions): core.HttpResponsePromise<Chrt.Statement1>;
204
- private __cancelInvoiceV1;
201
+ voidInvoiceV1(statementId: string, requestOptions?: Statements.RequestOptions): core.HttpResponsePromise<Chrt.Statement1>;
202
+ private __voidInvoiceV1;
205
203
  protected _getAuthorizationHeader(): Promise<string | undefined>;
206
204
  }
@@ -224,9 +224,7 @@ export class Statements {
224
224
  * filter_opened_at_timestamp_gte: "2024-01-15T09:30:00Z",
225
225
  * filter_opened_at_timestamp_lte: "2024-01-15T09:30:00Z",
226
226
  * filter_paid_at_timestamp_gte: "2024-01-15T09:30:00Z",
227
- * filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z",
228
- * filter_voided_at_timestamp_gte: "2024-01-15T09:30:00Z",
229
- * filter_voided_at_timestamp_lte: "2024-01-15T09:30:00Z"
227
+ * filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z"
230
228
  * })
231
229
  */
232
230
  listV1(request = {}, requestOptions) {
@@ -235,7 +233,7 @@ export class Statements {
235
233
  __listV1() {
236
234
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
237
235
  var _a, _b, _c, _d, _e, _f;
238
- const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_status: filterStatus, filter_settlement_type: filterSettlementType, filter_payment_origin_org_id: filterPaymentOriginOrgId, filter_payment_destination_org_id: filterPaymentDestinationOrgId, filter_owned_by_org_id: filterOwnedByOrgId, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_opened_at_timestamp_gte: filterOpenedAtTimestampGte, filter_opened_at_timestamp_lte: filterOpenedAtTimestampLte, filter_paid_at_timestamp_gte: filterPaidAtTimestampGte, filter_paid_at_timestamp_lte: filterPaidAtTimestampLte, filter_voided_at_timestamp_gte: filterVoidedAtTimestampGte, filter_voided_at_timestamp_lte: filterVoidedAtTimestampLte, } = request;
236
+ const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_status: filterStatus, filter_settlement_type: filterSettlementType, filter_payment_origin_org_id: filterPaymentOriginOrgId, filter_payment_destination_org_id: filterPaymentDestinationOrgId, filter_owned_by_org_id: filterOwnedByOrgId, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_opened_at_timestamp_gte: filterOpenedAtTimestampGte, filter_opened_at_timestamp_lte: filterOpenedAtTimestampLte, filter_paid_at_timestamp_gte: filterPaidAtTimestampGte, filter_paid_at_timestamp_lte: filterPaidAtTimestampLte, } = request;
239
237
  const _queryParams = {};
240
238
  if (sortBy !== undefined) {
241
239
  _queryParams["sort_by"] = sortBy;
@@ -287,12 +285,6 @@ export class Statements {
287
285
  if (filterPaidAtTimestampLte !== undefined) {
288
286
  _queryParams["filter_paid_at_timestamp_lte"] = filterPaidAtTimestampLte;
289
287
  }
290
- if (filterVoidedAtTimestampGte !== undefined) {
291
- _queryParams["filter_voided_at_timestamp_gte"] = filterVoidedAtTimestampGte;
292
- }
293
- if (filterVoidedAtTimestampLte !== undefined) {
294
- _queryParams["filter_voided_at_timestamp_lte"] = filterVoidedAtTimestampLte;
295
- }
296
288
  let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
297
289
  const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
298
290
  url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "billing/list/v1"),
@@ -653,7 +645,7 @@ export class Statements {
653
645
  });
654
646
  }
655
647
  /**
656
- * Syncs invoice state from Stripe to the Statement and LineItemGroups. The webhook usually keeps invoices up to date, but users can manually trigger a sync. | authz: min_org_role=operator | () -> (SyncInvoiceRes)
648
+ * Syncs invoice state from Stripe Connect to the Statement and LineItemGroups. The webhook usually keeps invoices up to date, but users can manually trigger a sync. | authz: org_type=[courier, forwarder, shipper], min_org_role=operator, authz_personas=[statement_org_operators] | () -> (Statement1)
657
649
  *
658
650
  * @param {string} statementId
659
651
  * @param {Statements.RequestOptions} requestOptions - Request-specific configuration.
@@ -712,7 +704,7 @@ export class Statements {
712
704
  });
713
705
  }
714
706
  /**
715
- * Cancels/voids a Stripe Connect invoice. Statement must be OPEN or VOID. | authz: org_type=[courier, forwarder], min_org_role=operator, authz_personas=[statement_owner_operators], statement_status=OPEN, VOID | () -> (Statement1)
707
+ * Voids a Stripe Connect invoice. Statement reverts to STAGED and LIGs revert to FINALIZED. | authz: org_type=[courier, forwarder], min_org_role=operator, authz_personas=[statement_owner_operators], statement_status=OPEN | () -> (Statement1)
716
708
  *
717
709
  * @param {string} statementId
718
710
  * @param {Statements.RequestOptions} requestOptions - Request-specific configuration.
@@ -720,17 +712,17 @@ export class Statements {
720
712
  * @throws {@link Chrt.UnprocessableEntityError}
721
713
  *
722
714
  * @example
723
- * await client.billing.statements.cancelInvoiceV1("statement_id")
715
+ * await client.billing.statements.voidInvoiceV1("statement_id")
724
716
  */
725
- cancelInvoiceV1(statementId, requestOptions) {
726
- return core.HttpResponsePromise.fromPromise(this.__cancelInvoiceV1(statementId, requestOptions));
717
+ voidInvoiceV1(statementId, requestOptions) {
718
+ return core.HttpResponsePromise.fromPromise(this.__voidInvoiceV1(statementId, requestOptions));
727
719
  }
728
- __cancelInvoiceV1(statementId, requestOptions) {
720
+ __voidInvoiceV1(statementId, requestOptions) {
729
721
  return __awaiter(this, void 0, void 0, function* () {
730
722
  var _a, _b, _c, _d;
731
723
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
732
724
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
733
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing/cancel_invoice/v1/${encodeURIComponent(statementId)}`),
725
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing/void_invoice/v1/${encodeURIComponent(statementId)}`),
734
726
  method: "POST",
735
727
  headers: _headers,
736
728
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -761,7 +753,7 @@ export class Statements {
761
753
  rawResponse: _response.rawResponse,
762
754
  });
763
755
  case "timeout":
764
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/cancel_invoice/v1/{statement_id}.");
756
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/void_invoice/v1/{statement_id}.");
765
757
  case "unknown":
766
758
  throw new errors.ChrtError({
767
759
  message: _response.error.errorMessage,
@@ -18,9 +18,7 @@ import * as Chrt from "../../../../../../index.mjs";
18
18
  * filter_opened_at_timestamp_gte: "2024-01-15T09:30:00Z",
19
19
  * filter_opened_at_timestamp_lte: "2024-01-15T09:30:00Z",
20
20
  * filter_paid_at_timestamp_gte: "2024-01-15T09:30:00Z",
21
- * filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z",
22
- * filter_voided_at_timestamp_gte: "2024-01-15T09:30:00Z",
23
- * filter_voided_at_timestamp_lte: "2024-01-15T09:30:00Z"
21
+ * filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z"
24
22
  * }
25
23
  */
26
24
  export interface StatementsListV1Request {
@@ -52,8 +50,4 @@ export interface StatementsListV1Request {
52
50
  filter_paid_at_timestamp_gte?: string | null;
53
51
  /** Filter by paid_at_timestamp <= value */
54
52
  filter_paid_at_timestamp_lte?: string | null;
55
- /** Filter by voided_at_timestamp >= value */
56
- filter_voided_at_timestamp_gte?: string | null;
57
- /** Filter by voided_at_timestamp <= value */
58
- filter_voided_at_timestamp_lte?: string | null;
59
53
  }
@@ -50,6 +50,16 @@ export declare class Orgs {
50
50
  */
51
51
  listMembersV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgMemberDetails[]>;
52
52
  private __listMembersV1;
53
+ /**
54
+ * Retrieves private organization data for the caller's organization. | authz: min_org_role=operator | () -> (OrgPrivateData1)
55
+ *
56
+ * @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
57
+ *
58
+ * @example
59
+ * await client.orgs.getOrgPrivateDataV1()
60
+ */
61
+ getOrgPrivateDataV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgPrivateData1>;
62
+ private __getOrgPrivateDataV1;
53
63
  /**
54
64
  * Retrieves public organization data for the caller's organization. | () -> (OrgPublicData1)
55
65
  *
@@ -121,6 +121,57 @@ export class Orgs {
121
121
  }
122
122
  });
123
123
  }
124
+ /**
125
+ * Retrieves private organization data for the caller's organization. | authz: min_org_role=operator | () -> (OrgPrivateData1)
126
+ *
127
+ * @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
128
+ *
129
+ * @example
130
+ * await client.orgs.getOrgPrivateDataV1()
131
+ */
132
+ getOrgPrivateDataV1(requestOptions) {
133
+ return core.HttpResponsePromise.fromPromise(this.__getOrgPrivateDataV1(requestOptions));
134
+ }
135
+ __getOrgPrivateDataV1(requestOptions) {
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ var _a, _b, _c, _d;
138
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
139
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
140
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "orgs/org_private_data/v1"),
141
+ method: "GET",
142
+ headers: _headers,
143
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
144
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
145
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
146
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
147
+ });
148
+ if (_response.ok) {
149
+ return { data: _response.body, rawResponse: _response.rawResponse };
150
+ }
151
+ if (_response.error.reason === "status-code") {
152
+ throw new errors.ChrtError({
153
+ statusCode: _response.error.statusCode,
154
+ body: _response.error.body,
155
+ rawResponse: _response.rawResponse,
156
+ });
157
+ }
158
+ switch (_response.error.reason) {
159
+ case "non-json":
160
+ throw new errors.ChrtError({
161
+ statusCode: _response.error.statusCode,
162
+ body: _response.error.rawBody,
163
+ rawResponse: _response.rawResponse,
164
+ });
165
+ case "timeout":
166
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /orgs/org_private_data/v1.");
167
+ case "unknown":
168
+ throw new errors.ChrtError({
169
+ message: _response.error.errorMessage,
170
+ rawResponse: _response.rawResponse,
171
+ });
172
+ }
173
+ });
174
+ }
124
175
  /**
125
176
  * Retrieves public organization data for the caller's organization. | () -> (OrgPublicData1)
126
177
  *
@@ -113,6 +113,20 @@ export declare class TaskGroups {
113
113
  */
114
114
  updateCourierOrgV1(taskGroupId: string, request: Chrt.UpdateCourierOrgReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
115
115
  private __updateCourierOrgV1;
116
+ /**
117
+ * Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
118
+ *
119
+ * @param {string} rateSheetId
120
+ * @param {string} taskGroupId
121
+ * @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
122
+ *
123
+ * @throws {@link Chrt.UnprocessableEntityError}
124
+ *
125
+ * @example
126
+ * await client.taskGroups.assignRateSheetV1("rate_sheet_id", "task_group_id")
127
+ */
128
+ assignRateSheetV1(rateSheetId: string, taskGroupId: string, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
129
+ private __assignRateSheetV1;
116
130
  /**
117
131
  * Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
118
132
  *
@@ -347,6 +347,66 @@ export class TaskGroups {
347
347
  }
348
348
  });
349
349
  }
350
+ /**
351
+ * Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
352
+ *
353
+ * @param {string} rateSheetId
354
+ * @param {string} taskGroupId
355
+ * @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
356
+ *
357
+ * @throws {@link Chrt.UnprocessableEntityError}
358
+ *
359
+ * @example
360
+ * await client.taskGroups.assignRateSheetV1("rate_sheet_id", "task_group_id")
361
+ */
362
+ assignRateSheetV1(rateSheetId, taskGroupId, requestOptions) {
363
+ return core.HttpResponsePromise.fromPromise(this.__assignRateSheetV1(rateSheetId, taskGroupId, requestOptions));
364
+ }
365
+ __assignRateSheetV1(rateSheetId, taskGroupId, requestOptions) {
366
+ return __awaiter(this, void 0, void 0, function* () {
367
+ var _a, _b, _c, _d;
368
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
369
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
370
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `oort/task_groups/assign_rate_sheet/v1/${encodeURIComponent(rateSheetId)}/${encodeURIComponent(taskGroupId)}`),
371
+ method: "PATCH",
372
+ headers: _headers,
373
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
374
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
375
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
376
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
377
+ });
378
+ if (_response.ok) {
379
+ return { data: _response.body, rawResponse: _response.rawResponse };
380
+ }
381
+ if (_response.error.reason === "status-code") {
382
+ switch (_response.error.statusCode) {
383
+ case 422:
384
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
385
+ default:
386
+ throw new errors.ChrtError({
387
+ statusCode: _response.error.statusCode,
388
+ body: _response.error.body,
389
+ rawResponse: _response.rawResponse,
390
+ });
391
+ }
392
+ }
393
+ switch (_response.error.reason) {
394
+ case "non-json":
395
+ throw new errors.ChrtError({
396
+ statusCode: _response.error.statusCode,
397
+ body: _response.error.rawBody,
398
+ rawResponse: _response.rawResponse,
399
+ });
400
+ case "timeout":
401
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/task_groups/assign_rate_sheet/v1/{rate_sheet_id}/{task_group_id}.");
402
+ case "unknown":
403
+ throw new errors.ChrtError({
404
+ message: _response.error.errorMessage,
405
+ rawResponse: _response.rawResponse,
406
+ });
407
+ }
408
+ });
409
+ }
350
410
  /**
351
411
  * Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
352
412
  *
@@ -30,19 +30,6 @@ export declare namespace SharingSettings {
30
30
  export declare class SharingSettings {
31
31
  protected readonly _options: SharingSettings.Options;
32
32
  constructor(_options?: SharingSettings.Options);
33
- /**
34
- * Get all tracking datasets and their sharing settings for a given order. | authz_personas=[shipper_org_operators, forwarder_org_operators, courier_org_operators] | () -> (list[TrackingSharingSettingsRes])
35
- *
36
- * @param {string} orderIdOrShortId
37
- * @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
38
- *
39
- * @throws {@link Chrt.UnprocessableEntityError}
40
- *
41
- * @example
42
- * await client.tracking.sharingSettings.getSettingsV1("order_id_or_short_id")
43
- */
44
- getSettingsV1(orderIdOrShortId: string, requestOptions?: SharingSettings.RequestOptions): core.HttpResponsePromise<Chrt.TrackingSharingSettingsRes[]>;
45
- private __getSettingsV1;
46
33
  /**
47
34
  * Updates the sharing settings for a task group by driver tracking dataset. | authz_personas=[forwarder_org_operators, shipper_org_operators, courier_org_operators, courier_driver] | (TaskGroupByDriverSharingSettingsUpdateReq) -> (TaskGroupByDriverSharingSettings1)
48
35
  *
@@ -96,5 +83,18 @@ export declare class SharingSettings {
96
83
  */
97
84
  cargoByDeviceSettingsV1(request: Chrt.tracking.CargoByDeviceSharingSettingsUpdateReq, requestOptions?: SharingSettings.RequestOptions): core.HttpResponsePromise<Chrt.CargoByDeviceSharingSettings1>;
98
85
  private __cargoByDeviceSettingsV1;
86
+ /**
87
+ * Get all tracking datasets and their sharing settings for a given order. If authenticated, returns datasets the user has direct access to plus public datasets. If unauthenticated, returns only datasets with public=True. | () -> (list[TrackingSharingSettingsRes])
88
+ *
89
+ * @param {string} orderIdOrShortId
90
+ * @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
91
+ *
92
+ * @throws {@link Chrt.UnprocessableEntityError}
93
+ *
94
+ * @example
95
+ * await client.tracking.sharingSettings.getSettingsV1("order_id_or_short_id")
96
+ */
97
+ getSettingsV1(orderIdOrShortId: string, requestOptions?: SharingSettings.RequestOptions): core.HttpResponsePromise<Chrt.TrackingSharingSettingsRes[]>;
98
+ private __getSettingsV1;
99
99
  protected _getAuthorizationHeader(): Promise<string | undefined>;
100
100
  }