@chrt-inc/typescript-sdk 1.526.0 → 1.527.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 (62) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.d.ts +1 -0
  3. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.js +5 -1
  4. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupsListForCourierOrgV1Request.d.ts +3 -0
  5. package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/adHoc/client/Client.d.ts +20 -4
  6. package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/adHoc/client/Client.js +69 -4
  7. package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/adHoc/client/requests/CreateAdHocLineItemGroupReq.d.ts +2 -0
  8. package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/adHoc/client/requests/SetAdHocTaskGroupReq.d.ts +12 -0
  9. package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/adHoc/client/requests/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/billing/resources/statements/client/Client.d.ts +34 -4
  11. package/dist/cjs/api/resources/billing/resources/statements/client/Client.js +159 -25
  12. package/dist/cjs/api/resources/billing/resources/statements/client/requests/{BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingUpdateOffChrtSettlementStateV1StatementIdPatch.d.ts → BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingStatementsUpdateOffChrtSettlementStateV1StatementIdPatch.d.ts} +1 -1
  13. package/dist/cjs/api/resources/billing/resources/statements/client/requests/{BodyStatementsPatchUpdateSettlementTypeV1BillingUpdateSettlementTypeV1StatementIdPatch.d.ts → BodyStatementsPatchUpdateSettlementTypeV1BillingStatementsUpdateSettlementTypeV1StatementIdPatch.d.ts} +1 -1
  14. package/dist/cjs/api/resources/billing/resources/statements/client/requests/BodyStatementsPatchUpdateSettlementTypeV1BillingStatementsUpdateSettlementTypeV1StatementIdPatch.js +5 -0
  15. package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.d.ts +56 -0
  16. package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.js +5 -0
  17. package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.ts +3 -0
  18. package/dist/cjs/api/resources/billing/resources/statements/client/requests/index.d.ts +3 -2
  19. package/dist/cjs/api/types/LineItemGroup1.d.ts +3 -0
  20. package/dist/cjs/api/types/Statement1.d.ts +2 -0
  21. package/dist/cjs/api/types/StatementExpandedListItem.d.ts +9 -0
  22. package/dist/cjs/api/types/StatementExpandedListItem.js +5 -0
  23. package/dist/cjs/api/types/StatementsExpandedListRes.d.ts +8 -0
  24. package/dist/cjs/api/types/StatementsExpandedListRes.js +5 -0
  25. package/dist/cjs/api/types/index.d.ts +2 -0
  26. package/dist/cjs/api/types/index.js +2 -0
  27. package/dist/cjs/version.d.ts +1 -1
  28. package/dist/cjs/version.js +1 -1
  29. package/dist/esm/Client.mjs +2 -2
  30. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.d.mts +1 -0
  31. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.mjs +5 -1
  32. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupsListForCourierOrgV1Request.d.mts +3 -0
  33. package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/adHoc/client/Client.d.mts +20 -4
  34. package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/adHoc/client/Client.mjs +69 -4
  35. package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/adHoc/client/requests/CreateAdHocLineItemGroupReq.d.mts +2 -0
  36. package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/adHoc/client/requests/SetAdHocTaskGroupReq.d.mts +12 -0
  37. package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/adHoc/client/requests/index.d.mts +1 -0
  38. package/dist/esm/api/resources/billing/resources/statements/client/Client.d.mts +34 -4
  39. package/dist/esm/api/resources/billing/resources/statements/client/Client.mjs +159 -25
  40. package/dist/esm/api/resources/billing/resources/statements/client/requests/{BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingUpdateOffChrtSettlementStateV1StatementIdPatch.d.mts → BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingStatementsUpdateOffChrtSettlementStateV1StatementIdPatch.d.mts} +1 -1
  41. package/dist/esm/api/resources/billing/resources/statements/client/requests/{BodyStatementsPatchUpdateSettlementTypeV1BillingUpdateSettlementTypeV1StatementIdPatch.d.mts → BodyStatementsPatchUpdateSettlementTypeV1BillingStatementsUpdateSettlementTypeV1StatementIdPatch.d.mts} +1 -1
  42. package/dist/esm/api/resources/billing/resources/statements/client/requests/BodyStatementsPatchUpdateSettlementTypeV1BillingStatementsUpdateSettlementTypeV1StatementIdPatch.mjs +4 -0
  43. package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.d.mts +56 -0
  44. package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.mjs +4 -0
  45. package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.mts +3 -0
  46. package/dist/esm/api/resources/billing/resources/statements/client/requests/index.d.mts +3 -2
  47. package/dist/esm/api/types/LineItemGroup1.d.mts +3 -0
  48. package/dist/esm/api/types/Statement1.d.mts +2 -0
  49. package/dist/esm/api/types/StatementExpandedListItem.d.mts +9 -0
  50. package/dist/esm/api/types/StatementExpandedListItem.mjs +4 -0
  51. package/dist/esm/api/types/StatementsExpandedListRes.d.mts +8 -0
  52. package/dist/esm/api/types/StatementsExpandedListRes.mjs +4 -0
  53. package/dist/esm/api/types/index.d.mts +2 -0
  54. package/dist/esm/api/types/index.mjs +2 -0
  55. package/dist/esm/version.d.mts +1 -1
  56. package/dist/esm/version.mjs +1 -1
  57. package/package.json +1 -1
  58. package/reference.md +160 -6
  59. /package/dist/cjs/api/resources/billing/resources/{statements/client/requests/BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingUpdateOffChrtSettlementStateV1StatementIdPatch.js → lineItemGroups/resources/adHoc/client/requests/SetAdHocTaskGroupReq.js} +0 -0
  60. /package/dist/cjs/api/resources/billing/resources/statements/client/requests/{BodyStatementsPatchUpdateSettlementTypeV1BillingUpdateSettlementTypeV1StatementIdPatch.js → BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingStatementsUpdateOffChrtSettlementStateV1StatementIdPatch.js} +0 -0
  61. /package/dist/esm/api/resources/billing/resources/{statements/client/requests/BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingUpdateOffChrtSettlementStateV1StatementIdPatch.mjs → lineItemGroups/resources/adHoc/client/requests/SetAdHocTaskGroupReq.mjs} +0 -0
  62. /package/dist/esm/api/resources/billing/resources/statements/client/requests/{BodyStatementsPatchUpdateSettlementTypeV1BillingUpdateSettlementTypeV1StatementIdPatch.mjs → BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingStatementsUpdateOffChrtSettlementStateV1StatementIdPatch.mjs} +0 -0
@@ -74,7 +74,7 @@ class Statements {
74
74
  var _a, _b, _c, _d;
75
75
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
76
76
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
77
- 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/v1/${encodeURIComponent(statementId)}`),
77
+ 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/statements/v1/${encodeURIComponent(statementId)}`),
78
78
  method: "GET",
79
79
  headers: _headers,
80
80
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -105,7 +105,7 @@ class Statements {
105
105
  rawResponse: _response.rawResponse,
106
106
  });
107
107
  case "timeout":
108
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing/v1/{statement_id}.");
108
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing/statements/v1/{statement_id}.");
109
109
  case "unknown":
110
110
  throw new errors.ChrtError({
111
111
  message: _response.error.errorMessage,
@@ -133,7 +133,7 @@ class Statements {
133
133
  var _a, _b, _c, _d;
134
134
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
135
135
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
136
- 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/by_lig_id/v1/${encodeURIComponent(lineItemGroupId)}`),
136
+ 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/statements/by_lig_id/v1/${encodeURIComponent(lineItemGroupId)}`),
137
137
  method: "GET",
138
138
  headers: _headers,
139
139
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -164,7 +164,7 @@ class Statements {
164
164
  rawResponse: _response.rawResponse,
165
165
  });
166
166
  case "timeout":
167
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing/by_lig_id/v1/{line_item_group_id}.");
167
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing/statements/by_lig_id/v1/{line_item_group_id}.");
168
168
  case "unknown":
169
169
  throw new errors.ChrtError({
170
170
  message: _response.error.errorMessage,
@@ -194,7 +194,7 @@ class Statements {
194
194
  var _a, _b, _c, _d;
195
195
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
196
196
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
197
- 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/expanded/retrieve/v1"),
197
+ 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/statements/expanded/retrieve/v1"),
198
198
  method: "POST",
199
199
  headers: _headers,
200
200
  contentType: "application/json",
@@ -228,7 +228,7 @@ class Statements {
228
228
  rawResponse: _response.rawResponse,
229
229
  });
230
230
  case "timeout":
231
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/expanded/retrieve/v1.");
231
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/statements/expanded/retrieve/v1.");
232
232
  case "unknown":
233
233
  throw new errors.ChrtError({
234
234
  message: _response.error.errorMessage,
@@ -252,6 +252,7 @@ class Statements {
252
252
  * page: 1,
253
253
  * page_size: 1,
254
254
  * filter_settlement_type: "stripe_connect",
255
+ * filter_order_id: "filter_order_id",
255
256
  * filter_payment_origin_org_id: "filter_payment_origin_org_id",
256
257
  * filter_payment_destination_org_id: "filter_payment_destination_org_id",
257
258
  * filter_owned_by_org_id: "filter_owned_by_org_id",
@@ -269,7 +270,7 @@ class Statements {
269
270
  __listV1() {
270
271
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
271
272
  var _a, _b, _c, _d, _e, _f;
272
- 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;
273
+ const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_status: filterStatus, filter_settlement_type: filterSettlementType, filter_order_id: filterOrderId, 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;
273
274
  const _queryParams = {};
274
275
  if (sortBy !== undefined) {
275
276
  _queryParams["sort_by"] = sortBy;
@@ -294,6 +295,9 @@ class Statements {
294
295
  if (filterSettlementType !== undefined) {
295
296
  _queryParams["filter_settlement_type"] = filterSettlementType;
296
297
  }
298
+ if (filterOrderId !== undefined) {
299
+ _queryParams["filter_order_id"] = filterOrderId;
300
+ }
297
301
  if (filterPaymentOriginOrgId !== undefined) {
298
302
  _queryParams["filter_payment_origin_org_id"] = filterPaymentOriginOrgId;
299
303
  }
@@ -323,7 +327,7 @@ class Statements {
323
327
  }
324
328
  let _headers = (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
325
329
  const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
326
- 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"),
330
+ 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/statements/list/v1"),
327
331
  method: "GET",
328
332
  headers: _headers,
329
333
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -354,7 +358,137 @@ class Statements {
354
358
  rawResponse: _response.rawResponse,
355
359
  });
356
360
  case "timeout":
357
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing/list/v1.");
361
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing/statements/list/v1.");
362
+ case "unknown":
363
+ throw new errors.ChrtError({
364
+ message: _response.error.errorMessage,
365
+ rawResponse: _response.rawResponse,
366
+ });
367
+ }
368
+ });
369
+ }
370
+ /**
371
+ * Lists statements with expanded LIGs and task groups, using filtering, sorting, and pagination. | authz_personas=[statement_org_operators, statement_driver] | () -> (StatementsExpandedListRes)
372
+ *
373
+ * @param {Chrt.billing.StatementsExpandedListV1Request} request
374
+ * @param {Statements.RequestOptions} requestOptions - Request-specific configuration.
375
+ *
376
+ * @throws {@link Chrt.UnprocessableEntityError}
377
+ *
378
+ * @example
379
+ * await client.billing.statements.expandedListV1({
380
+ * sort_by: "amount",
381
+ * sort_order: "asc",
382
+ * page: 1,
383
+ * page_size: 1,
384
+ * filter_settlement_type: "stripe_connect",
385
+ * filter_order_id: "filter_order_id",
386
+ * filter_payment_origin_org_id: "filter_payment_origin_org_id",
387
+ * filter_payment_destination_org_id: "filter_payment_destination_org_id",
388
+ * filter_owned_by_org_id: "filter_owned_by_org_id",
389
+ * filter_staged_at_timestamp_gte: "2024-01-15T09:30:00Z",
390
+ * filter_staged_at_timestamp_lte: "2024-01-15T09:30:00Z",
391
+ * filter_opened_at_timestamp_gte: "2024-01-15T09:30:00Z",
392
+ * filter_opened_at_timestamp_lte: "2024-01-15T09:30:00Z",
393
+ * filter_paid_at_timestamp_gte: "2024-01-15T09:30:00Z",
394
+ * filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z"
395
+ * })
396
+ */
397
+ expandedListV1(request = {}, requestOptions) {
398
+ return core.HttpResponsePromise.fromPromise(this.__expandedListV1(request, requestOptions));
399
+ }
400
+ __expandedListV1() {
401
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
402
+ var _a, _b, _c, _d, _e, _f;
403
+ const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_status: filterStatus, filter_settlement_type: filterSettlementType, filter_order_id: filterOrderId, 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;
404
+ const _queryParams = {};
405
+ if (sortBy !== undefined) {
406
+ _queryParams["sort_by"] = sortBy;
407
+ }
408
+ if (sortOrder !== undefined) {
409
+ _queryParams["sort_order"] = sortOrder;
410
+ }
411
+ if (page !== undefined) {
412
+ _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
413
+ }
414
+ if (pageSize !== undefined) {
415
+ _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
416
+ }
417
+ if (filterStatus !== undefined) {
418
+ if (Array.isArray(filterStatus)) {
419
+ _queryParams["filter_status"] = filterStatus.map((item) => item);
420
+ }
421
+ else {
422
+ _queryParams["filter_status"] = filterStatus;
423
+ }
424
+ }
425
+ if (filterSettlementType !== undefined) {
426
+ _queryParams["filter_settlement_type"] = filterSettlementType;
427
+ }
428
+ if (filterOrderId !== undefined) {
429
+ _queryParams["filter_order_id"] = filterOrderId;
430
+ }
431
+ if (filterPaymentOriginOrgId !== undefined) {
432
+ _queryParams["filter_payment_origin_org_id"] = filterPaymentOriginOrgId;
433
+ }
434
+ if (filterPaymentDestinationOrgId !== undefined) {
435
+ _queryParams["filter_payment_destination_org_id"] = filterPaymentDestinationOrgId;
436
+ }
437
+ if (filterOwnedByOrgId !== undefined) {
438
+ _queryParams["filter_owned_by_org_id"] = filterOwnedByOrgId;
439
+ }
440
+ if (filterStagedAtTimestampGte !== undefined) {
441
+ _queryParams["filter_staged_at_timestamp_gte"] = filterStagedAtTimestampGte;
442
+ }
443
+ if (filterStagedAtTimestampLte !== undefined) {
444
+ _queryParams["filter_staged_at_timestamp_lte"] = filterStagedAtTimestampLte;
445
+ }
446
+ if (filterOpenedAtTimestampGte !== undefined) {
447
+ _queryParams["filter_opened_at_timestamp_gte"] = filterOpenedAtTimestampGte;
448
+ }
449
+ if (filterOpenedAtTimestampLte !== undefined) {
450
+ _queryParams["filter_opened_at_timestamp_lte"] = filterOpenedAtTimestampLte;
451
+ }
452
+ if (filterPaidAtTimestampGte !== undefined) {
453
+ _queryParams["filter_paid_at_timestamp_gte"] = filterPaidAtTimestampGte;
454
+ }
455
+ if (filterPaidAtTimestampLte !== undefined) {
456
+ _queryParams["filter_paid_at_timestamp_lte"] = filterPaidAtTimestampLte;
457
+ }
458
+ let _headers = (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
459
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
460
+ 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/statements/expanded/list/v1"),
461
+ method: "POST",
462
+ headers: _headers,
463
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
464
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
465
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
466
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
467
+ });
468
+ if (_response.ok) {
469
+ return { data: _response.body, rawResponse: _response.rawResponse };
470
+ }
471
+ if (_response.error.reason === "status-code") {
472
+ switch (_response.error.statusCode) {
473
+ case 422:
474
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
475
+ default:
476
+ throw new errors.ChrtError({
477
+ statusCode: _response.error.statusCode,
478
+ body: _response.error.body,
479
+ rawResponse: _response.rawResponse,
480
+ });
481
+ }
482
+ }
483
+ switch (_response.error.reason) {
484
+ case "non-json":
485
+ throw new errors.ChrtError({
486
+ statusCode: _response.error.statusCode,
487
+ body: _response.error.rawBody,
488
+ rawResponse: _response.rawResponse,
489
+ });
490
+ case "timeout":
491
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/statements/expanded/list/v1.");
358
492
  case "unknown":
359
493
  throw new errors.ChrtError({
360
494
  message: _response.error.errorMessage,
@@ -385,7 +519,7 @@ class Statements {
385
519
  var _a, _b, _c, _d;
386
520
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
387
521
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
388
- 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/create/v1"),
522
+ 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/statements/create/v1"),
389
523
  method: "POST",
390
524
  headers: _headers,
391
525
  contentType: "application/json",
@@ -419,7 +553,7 @@ class Statements {
419
553
  rawResponse: _response.rawResponse,
420
554
  });
421
555
  case "timeout":
422
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/create/v1.");
556
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/statements/create/v1.");
423
557
  case "unknown":
424
558
  throw new errors.ChrtError({
425
559
  message: _response.error.errorMessage,
@@ -447,7 +581,7 @@ class Statements {
447
581
  var _a, _b, _c, _d;
448
582
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
449
583
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
450
- 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/delete/v1/${encodeURIComponent(statementId)}`),
584
+ 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/statements/delete/v1/${encodeURIComponent(statementId)}`),
451
585
  method: "DELETE",
452
586
  headers: _headers,
453
587
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -478,7 +612,7 @@ class Statements {
478
612
  rawResponse: _response.rawResponse,
479
613
  });
480
614
  case "timeout":
481
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing/delete/v1/{statement_id}.");
615
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing/statements/delete/v1/{statement_id}.");
482
616
  case "unknown":
483
617
  throw new errors.ChrtError({
484
618
  message: _response.error.errorMessage,
@@ -491,7 +625,7 @@ class Statements {
491
625
  * Updates the settlement type of a statement. Statement must be in STAGED status. | authz: org_type=[courier, forwarder], min_org_role=operator, authz_personas=[statement_owner_operators], statement_status=STAGED | (SettlementTypeEnum1) -> (Statement1)
492
626
  *
493
627
  * @param {string} statementId
494
- * @param {Chrt.billing.BodyStatementsPatchUpdateSettlementTypeV1BillingUpdateSettlementTypeV1StatementIdPatch} request
628
+ * @param {Chrt.billing.BodyStatementsPatchUpdateSettlementTypeV1BillingStatementsUpdateSettlementTypeV1StatementIdPatch} request
495
629
  * @param {Statements.RequestOptions} requestOptions - Request-specific configuration.
496
630
  *
497
631
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -509,7 +643,7 @@ class Statements {
509
643
  var _a, _b, _c, _d;
510
644
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
511
645
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
512
- 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/update_settlement_type/v1/${encodeURIComponent(statementId)}`),
646
+ 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/statements/update_settlement_type/v1/${encodeURIComponent(statementId)}`),
513
647
  method: "PATCH",
514
648
  headers: _headers,
515
649
  contentType: "application/json",
@@ -543,7 +677,7 @@ class Statements {
543
677
  rawResponse: _response.rawResponse,
544
678
  });
545
679
  case "timeout":
546
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing/update_settlement_type/v1/{statement_id}.");
680
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing/statements/update_settlement_type/v1/{statement_id}.");
547
681
  case "unknown":
548
682
  throw new errors.ChrtError({
549
683
  message: _response.error.errorMessage,
@@ -556,7 +690,7 @@ class Statements {
556
690
  * Updates the status of an off-CHRT settlement statement. Used to manually transition OFF_CHRT statements between STAGED, OPEN, PAID, and VOID. | authz: org_type=[courier, forwarder], min_org_role=operator, authz_personas=[statement_owner_operators] | (StatementStatusEnum1) -> (Statement1)
557
691
  *
558
692
  * @param {string} statementId
559
- * @param {Chrt.billing.BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingUpdateOffChrtSettlementStateV1StatementIdPatch} request
693
+ * @param {Chrt.billing.BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingStatementsUpdateOffChrtSettlementStateV1StatementIdPatch} request
560
694
  * @param {Statements.RequestOptions} requestOptions - Request-specific configuration.
561
695
  *
562
696
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -574,7 +708,7 @@ class Statements {
574
708
  var _a, _b, _c, _d;
575
709
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
576
710
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
577
- 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/update_off_chrt_settlement_state/v1/${encodeURIComponent(statementId)}`),
711
+ 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/statements/update_off_chrt_settlement_state/v1/${encodeURIComponent(statementId)}`),
578
712
  method: "PATCH",
579
713
  headers: _headers,
580
714
  contentType: "application/json",
@@ -608,7 +742,7 @@ class Statements {
608
742
  rawResponse: _response.rawResponse,
609
743
  });
610
744
  case "timeout":
611
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing/update_off_chrt_settlement_state/v1/{statement_id}.");
745
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing/statements/update_off_chrt_settlement_state/v1/{statement_id}.");
612
746
  case "unknown":
613
747
  throw new errors.ChrtError({
614
748
  message: _response.error.errorMessage,
@@ -637,7 +771,7 @@ class Statements {
637
771
  var _a, _b, _c, _d;
638
772
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
639
773
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
640
- 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/open_invoice/v1/${encodeURIComponent(statementId)}`),
774
+ 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/statements/open_invoice/v1/${encodeURIComponent(statementId)}`),
641
775
  method: "POST",
642
776
  headers: _headers,
643
777
  contentType: "application/json",
@@ -671,7 +805,7 @@ class Statements {
671
805
  rawResponse: _response.rawResponse,
672
806
  });
673
807
  case "timeout":
674
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/open_invoice/v1/{statement_id}.");
808
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/statements/open_invoice/v1/{statement_id}.");
675
809
  case "unknown":
676
810
  throw new errors.ChrtError({
677
811
  message: _response.error.errorMessage,
@@ -699,7 +833,7 @@ class Statements {
699
833
  var _a, _b, _c, _d;
700
834
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
701
835
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
702
- 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/sync_invoice/v1/${encodeURIComponent(statementId)}`),
836
+ 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/statements/sync_invoice/v1/${encodeURIComponent(statementId)}`),
703
837
  method: "POST",
704
838
  headers: _headers,
705
839
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -730,7 +864,7 @@ class Statements {
730
864
  rawResponse: _response.rawResponse,
731
865
  });
732
866
  case "timeout":
733
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/sync_invoice/v1/{statement_id}.");
867
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/statements/sync_invoice/v1/{statement_id}.");
734
868
  case "unknown":
735
869
  throw new errors.ChrtError({
736
870
  message: _response.error.errorMessage,
@@ -758,7 +892,7 @@ class Statements {
758
892
  var _a, _b, _c, _d;
759
893
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
760
894
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
761
- 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)}`),
895
+ 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/statements/void_invoice/v1/${encodeURIComponent(statementId)}`),
762
896
  method: "POST",
763
897
  headers: _headers,
764
898
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -789,7 +923,7 @@ class Statements {
789
923
  rawResponse: _response.rawResponse,
790
924
  });
791
925
  case "timeout":
792
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/void_invoice/v1/{statement_id}.");
926
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/statements/void_invoice/v1/{statement_id}.");
793
927
  case "unknown":
794
928
  throw new errors.ChrtError({
795
929
  message: _response.error.errorMessage,
@@ -8,6 +8,6 @@ import * as Chrt from "../../../../../../index.js";
8
8
  * new_status: "staged"
9
9
  * }
10
10
  */
11
- export interface BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingUpdateOffChrtSettlementStateV1StatementIdPatch {
11
+ export interface BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingStatementsUpdateOffChrtSettlementStateV1StatementIdPatch {
12
12
  new_status: Chrt.StatementStatusEnum1;
13
13
  }
@@ -8,6 +8,6 @@ import * as Chrt from "../../../../../../index.js";
8
8
  * settlement_type: "stripe_connect"
9
9
  * }
10
10
  */
11
- export interface BodyStatementsPatchUpdateSettlementTypeV1BillingUpdateSettlementTypeV1StatementIdPatch {
11
+ export interface BodyStatementsPatchUpdateSettlementTypeV1BillingStatementsUpdateSettlementTypeV1StatementIdPatch {
12
12
  settlement_type: Chrt.SettlementTypeEnum1;
13
13
  }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,56 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../index.js";
5
+ /**
6
+ * @example
7
+ * {
8
+ * sort_by: "amount",
9
+ * sort_order: "asc",
10
+ * page: 1,
11
+ * page_size: 1,
12
+ * filter_settlement_type: "stripe_connect",
13
+ * filter_order_id: "filter_order_id",
14
+ * filter_payment_origin_org_id: "filter_payment_origin_org_id",
15
+ * filter_payment_destination_org_id: "filter_payment_destination_org_id",
16
+ * filter_owned_by_org_id: "filter_owned_by_org_id",
17
+ * filter_staged_at_timestamp_gte: "2024-01-15T09:30:00Z",
18
+ * filter_staged_at_timestamp_lte: "2024-01-15T09:30:00Z",
19
+ * filter_opened_at_timestamp_gte: "2024-01-15T09:30:00Z",
20
+ * filter_opened_at_timestamp_lte: "2024-01-15T09:30:00Z",
21
+ * filter_paid_at_timestamp_gte: "2024-01-15T09:30:00Z",
22
+ * filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z"
23
+ * }
24
+ */
25
+ export interface StatementsExpandedListV1Request {
26
+ /** Field to sort by */
27
+ sort_by?: Chrt.StatementSortByEnum | null;
28
+ /** Sort order (ascending or descending) */
29
+ sort_order?: Chrt.SortOrderEnum | null;
30
+ page?: number | null;
31
+ page_size?: number | null;
32
+ /** Filter by statement status(es) */
33
+ filter_status?: (Chrt.StatementStatusEnum1 | null) | (Chrt.StatementStatusEnum1 | null)[];
34
+ /** Filter by settlement type */
35
+ filter_settlement_type?: Chrt.SettlementTypeEnum1 | null;
36
+ /** Filter by order ID (returns statements whose order_ids list contains this value) */
37
+ filter_order_id?: string | null;
38
+ /** Filter by payment origin org ID */
39
+ filter_payment_origin_org_id?: string | null;
40
+ /** Filter by payment destination org ID */
41
+ filter_payment_destination_org_id?: string | null;
42
+ /** Filter by owned by org ID */
43
+ filter_owned_by_org_id?: string | null;
44
+ /** Filter by staged_at_timestamp >= value */
45
+ filter_staged_at_timestamp_gte?: string | null;
46
+ /** Filter by staged_at_timestamp <= value */
47
+ filter_staged_at_timestamp_lte?: string | null;
48
+ /** Filter by opened_at_timestamp >= value */
49
+ filter_opened_at_timestamp_gte?: string | null;
50
+ /** Filter by opened_at_timestamp <= value */
51
+ filter_opened_at_timestamp_lte?: string | null;
52
+ /** Filter by paid_at_timestamp >= value */
53
+ filter_paid_at_timestamp_gte?: string | null;
54
+ /** Filter by paid_at_timestamp <= value */
55
+ filter_paid_at_timestamp_lte?: string | null;
56
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,6 +10,7 @@ import * as Chrt from "../../../../../../index.js";
10
10
  * page: 1,
11
11
  * page_size: 1,
12
12
  * filter_settlement_type: "stripe_connect",
13
+ * filter_order_id: "filter_order_id",
13
14
  * filter_payment_origin_org_id: "filter_payment_origin_org_id",
14
15
  * filter_payment_destination_org_id: "filter_payment_destination_org_id",
15
16
  * filter_owned_by_org_id: "filter_owned_by_org_id",
@@ -32,6 +33,8 @@ export interface StatementsListV1Request {
32
33
  filter_status?: (Chrt.StatementStatusEnum1 | null) | (Chrt.StatementStatusEnum1 | null)[];
33
34
  /** Filter by settlement type */
34
35
  filter_settlement_type?: Chrt.SettlementTypeEnum1 | null;
36
+ /** Filter by order ID (returns statements whose order_ids list contains this value) */
37
+ filter_order_id?: string | null;
35
38
  /** Filter by payment origin org ID */
36
39
  filter_payment_origin_org_id?: string | null;
37
40
  /** Filter by payment destination org ID */
@@ -1,6 +1,7 @@
1
1
  export { type StatementExpandedRetrieveReq } from "./StatementExpandedRetrieveReq.js";
2
2
  export { type StatementsListV1Request } from "./StatementsListV1Request.js";
3
+ export { type StatementsExpandedListV1Request } from "./StatementsExpandedListV1Request.js";
3
4
  export { type CreateStatementReq } from "./CreateStatementReq.js";
4
- export { type BodyStatementsPatchUpdateSettlementTypeV1BillingUpdateSettlementTypeV1StatementIdPatch } from "./BodyStatementsPatchUpdateSettlementTypeV1BillingUpdateSettlementTypeV1StatementIdPatch.js";
5
- export { type BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingUpdateOffChrtSettlementStateV1StatementIdPatch } from "./BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingUpdateOffChrtSettlementStateV1StatementIdPatch.js";
5
+ export { type BodyStatementsPatchUpdateSettlementTypeV1BillingStatementsUpdateSettlementTypeV1StatementIdPatch } from "./BodyStatementsPatchUpdateSettlementTypeV1BillingStatementsUpdateSettlementTypeV1StatementIdPatch.js";
6
+ export { type BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingStatementsUpdateOffChrtSettlementStateV1StatementIdPatch } from "./BodyStatementsPatchUpdateOffChrtSettlementStateV1BillingStatementsUpdateOffChrtSettlementStateV1StatementIdPatch.js";
6
7
  export { type OpenInvoiceReq } from "./OpenInvoiceReq.js";
@@ -5,7 +5,10 @@ import * as Chrt from "../index.js";
5
5
  export interface LineItemGroup1 {
6
6
  schema_version: number;
7
7
  _id: string;
8
+ is_ad_hoc?: boolean;
8
9
  task_group_id?: string | null;
10
+ order_id?: string | null;
11
+ order_short_id?: string | null;
9
12
  rate_sheet_id?: string | null;
10
13
  line_items: Chrt.LineItem1[];
11
14
  line_item_group_s3_object_metadata_ids?: string[];
@@ -6,6 +6,8 @@ export interface Statement1 {
6
6
  schema_version: number;
7
7
  _id: string;
8
8
  line_item_group_ids?: string[];
9
+ order_ids?: string[];
10
+ order_short_ids?: string[];
9
11
  amount?: number | null;
10
12
  units?: Chrt.UnitsEnum;
11
13
  /** Must be a string starting with `user_` */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface StatementExpandedListItem {
6
+ statement: Chrt.Statement1;
7
+ line_item_groups: Chrt.LineItemGroup1[];
8
+ task_groups: Chrt.TaskGroup1[];
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface StatementsExpandedListRes {
6
+ statements: Chrt.StatementExpandedListItem[];
7
+ total_count: number;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -194,9 +194,11 @@ export * from "./ShippingTaskTaskArtifactCompletedWebhookPayload.js";
194
194
  export * from "./SortOrderEnum.js";
195
195
  export * from "./StartOfWeek.js";
196
196
  export * from "./Statement1.js";
197
+ export * from "./StatementExpandedListItem.js";
197
198
  export * from "./StatementExpandedRes.js";
198
199
  export * from "./StatementSortByEnum.js";
199
200
  export * from "./StatementStatusEnum1.js";
201
+ export * from "./StatementsExpandedListRes.js";
200
202
  export * from "./StatementsListRes.js";
201
203
  export * from "./StationaryCluster.js";
202
204
  export * from "./StripeConnectAccountOnboardingLinkRes.js";
@@ -210,9 +210,11 @@ __exportStar(require("./ShippingTaskTaskArtifactCompletedWebhookPayload.js"), ex
210
210
  __exportStar(require("./SortOrderEnum.js"), exports);
211
211
  __exportStar(require("./StartOfWeek.js"), exports);
212
212
  __exportStar(require("./Statement1.js"), exports);
213
+ __exportStar(require("./StatementExpandedListItem.js"), exports);
213
214
  __exportStar(require("./StatementExpandedRes.js"), exports);
214
215
  __exportStar(require("./StatementSortByEnum.js"), exports);
215
216
  __exportStar(require("./StatementStatusEnum1.js"), exports);
217
+ __exportStar(require("./StatementsExpandedListRes.js"), exports);
216
218
  __exportStar(require("./StatementsListRes.js"), exports);
217
219
  __exportStar(require("./StationaryCluster.js"), exports);
218
220
  __exportStar(require("./StripeConnectAccountOnboardingLinkRes.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.526.0";
1
+ export declare const SDK_VERSION = "1.527.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.526.0";
4
+ exports.SDK_VERSION = "1.527.0";
@@ -17,8 +17,8 @@ export class ChrtClient {
17
17
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
18
18
  "X-Fern-Language": "JavaScript",
19
19
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
20
- "X-Fern-SDK-Version": "1.526.0",
21
- "User-Agent": "@chrt-inc/typescript-sdk/1.526.0",
20
+ "X-Fern-SDK-Version": "1.527.0",
21
+ "User-Agent": "@chrt-inc/typescript-sdk/1.527.0",
22
22
  "X-Fern-Runtime": core.RUNTIME.type,
23
23
  "X-Fern-Runtime-Version": core.RUNTIME.version,
24
24
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -64,6 +64,7 @@ export declare class LineItemGroups {
64
64
  * await client.billing.lineItemGroups.listForCourierOrgV1({
65
65
  * filter_driver_id: "filter_driver_id",
66
66
  * filter_attached_to_statement: true,
67
+ * filter_order_id: "filter_order_id",
67
68
  * filter_payment_role: "origin",
68
69
  * page: 1,
69
70
  * page_size: 1