@chrt-inc/typescript-sdk 1.658.0 → 1.661.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 (68) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/billing/client/Client.d.ts +3 -0
  3. package/dist/cjs/api/resources/billing/client/Client.js +5 -0
  4. package/dist/cjs/api/resources/billing/resources/index.d.ts +1 -0
  5. package/dist/cjs/api/resources/billing/resources/index.js +2 -1
  6. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.d.ts +13 -0
  7. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.js +59 -0
  8. package/dist/cjs/api/resources/billing/resources/lineItems/client/Client.d.ts +23 -0
  9. package/dist/cjs/api/resources/billing/resources/lineItems/client/Client.js +17 -0
  10. package/dist/cjs/api/resources/billing/resources/lineItems/client/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/billing/resources/lineItems/client/index.js +2 -0
  12. package/dist/cjs/api/resources/billing/resources/lineItems/index.d.ts +2 -0
  13. package/dist/cjs/api/resources/billing/resources/lineItems/index.js +18 -0
  14. package/dist/cjs/api/resources/billing/resources/lineItems/resources/index.d.ts +2 -0
  15. package/dist/cjs/api/resources/billing/resources/lineItems/resources/index.js +41 -0
  16. package/dist/cjs/api/resources/billing/resources/lineItems/resources/s3Objects/client/Client.d.ts +83 -0
  17. package/dist/cjs/api/resources/billing/resources/lineItems/resources/s3Objects/client/Client.js +308 -0
  18. package/dist/cjs/api/resources/billing/resources/lineItems/resources/s3Objects/client/index.d.ts +2 -0
  19. package/dist/cjs/api/resources/billing/resources/lineItems/resources/s3Objects/client/index.js +17 -0
  20. package/dist/cjs/api/resources/billing/resources/lineItems/resources/s3Objects/client/requests/BodyLineItemsS3ObjectPostAddV1BillingLineItemsS3ObjectsAddV1LineItemIdPost.d.ts +13 -0
  21. package/dist/cjs/api/resources/billing/resources/lineItems/resources/s3Objects/client/requests/BodyLineItemsS3ObjectPostAddV1BillingLineItemsS3ObjectsAddV1LineItemIdPost.js +5 -0
  22. package/dist/cjs/api/resources/billing/resources/lineItems/resources/s3Objects/client/requests/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/billing/resources/lineItems/resources/s3Objects/client/requests/index.js +2 -0
  24. package/dist/cjs/api/resources/billing/resources/lineItems/resources/s3Objects/index.d.ts +1 -0
  25. package/dist/cjs/api/resources/billing/resources/lineItems/resources/s3Objects/index.js +17 -0
  26. package/dist/cjs/api/types/LineItemGroupLineItemsRes.d.ts +11 -0
  27. package/dist/cjs/api/types/LineItemGroupLineItemsRes.js +5 -0
  28. package/dist/cjs/api/types/LineItemS3ObjectMetadata1.d.ts +19 -0
  29. package/dist/cjs/api/types/LineItemS3ObjectMetadata1.js +5 -0
  30. package/dist/cjs/api/types/index.d.ts +2 -0
  31. package/dist/cjs/api/types/index.js +2 -0
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/Client.mjs +2 -2
  35. package/dist/esm/api/resources/billing/client/Client.d.mts +3 -0
  36. package/dist/esm/api/resources/billing/client/Client.mjs +5 -0
  37. package/dist/esm/api/resources/billing/resources/index.d.mts +1 -0
  38. package/dist/esm/api/resources/billing/resources/index.mjs +1 -0
  39. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.d.mts +13 -0
  40. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.mjs +59 -0
  41. package/dist/esm/api/resources/billing/resources/lineItems/client/Client.d.mts +23 -0
  42. package/dist/esm/api/resources/billing/resources/lineItems/client/Client.mjs +13 -0
  43. package/dist/esm/api/resources/billing/resources/lineItems/client/index.d.mts +1 -0
  44. package/dist/esm/api/resources/billing/resources/lineItems/client/index.mjs +1 -0
  45. package/dist/esm/api/resources/billing/resources/lineItems/index.d.mts +2 -0
  46. package/dist/esm/api/resources/billing/resources/lineItems/index.mjs +2 -0
  47. package/dist/esm/api/resources/billing/resources/lineItems/resources/index.d.mts +2 -0
  48. package/dist/esm/api/resources/billing/resources/lineItems/resources/index.mjs +2 -0
  49. package/dist/esm/api/resources/billing/resources/lineItems/resources/s3Objects/client/Client.d.mts +83 -0
  50. package/dist/esm/api/resources/billing/resources/lineItems/resources/s3Objects/client/Client.mjs +271 -0
  51. package/dist/esm/api/resources/billing/resources/lineItems/resources/s3Objects/client/index.d.mts +2 -0
  52. package/dist/esm/api/resources/billing/resources/lineItems/resources/s3Objects/client/index.mjs +1 -0
  53. package/dist/esm/api/resources/billing/resources/lineItems/resources/s3Objects/client/requests/BodyLineItemsS3ObjectPostAddV1BillingLineItemsS3ObjectsAddV1LineItemIdPost.d.mts +13 -0
  54. package/dist/esm/api/resources/billing/resources/lineItems/resources/s3Objects/client/requests/BodyLineItemsS3ObjectPostAddV1BillingLineItemsS3ObjectsAddV1LineItemIdPost.mjs +4 -0
  55. package/dist/esm/api/resources/billing/resources/lineItems/resources/s3Objects/client/requests/index.d.mts +1 -0
  56. package/dist/esm/api/resources/billing/resources/lineItems/resources/s3Objects/client/requests/index.mjs +1 -0
  57. package/dist/esm/api/resources/billing/resources/lineItems/resources/s3Objects/index.d.mts +1 -0
  58. package/dist/esm/api/resources/billing/resources/lineItems/resources/s3Objects/index.mjs +1 -0
  59. package/dist/esm/api/types/LineItemGroupLineItemsRes.d.mts +11 -0
  60. package/dist/esm/api/types/LineItemGroupLineItemsRes.mjs +4 -0
  61. package/dist/esm/api/types/LineItemS3ObjectMetadata1.d.mts +19 -0
  62. package/dist/esm/api/types/LineItemS3ObjectMetadata1.mjs +4 -0
  63. package/dist/esm/api/types/index.d.mts +2 -0
  64. package/dist/esm/api/types/index.mjs +2 -0
  65. package/dist/esm/version.d.mts +1 -1
  66. package/dist/esm/version.mjs +1 -1
  67. package/package.json +1 -1
  68. package/reference.md +327 -0
@@ -56,8 +56,8 @@ class ChrtClient {
56
56
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
57
57
  "X-Fern-Language": "JavaScript",
58
58
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
59
- "X-Fern-SDK-Version": "1.658.0",
60
- "User-Agent": "@chrt-inc/typescript-sdk/1.658.0",
59
+ "X-Fern-SDK-Version": "1.661.0",
60
+ "User-Agent": "@chrt-inc/typescript-sdk/1.661.0",
61
61
  "X-Fern-Runtime": core.RUNTIME.type,
62
62
  "X-Fern-Runtime-Version": core.RUNTIME.version,
63
63
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -13,6 +13,7 @@ import { RateSheetMappings } from "../resources/rateSheetMappings/client/Client.
13
13
  import { Statements } from "../resources/statements/client/Client.js";
14
14
  import { Stripe } from "../resources/stripe/client/Client.js";
15
15
  import { StripeConnect } from "../resources/stripeConnect/client/Client.js";
16
+ import { LineItems } from "../resources/lineItems/client/Client.js";
16
17
  export declare namespace Billing {
17
18
  interface Options {
18
19
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -36,6 +37,7 @@ export declare class Billing {
36
37
  protected _statements: Statements | undefined;
37
38
  protected _stripe: Stripe | undefined;
38
39
  protected _stripeConnect: StripeConnect | undefined;
40
+ protected _lineItems: LineItems | undefined;
39
41
  constructor(_options?: Billing.Options);
40
42
  get billingLedgers(): BillingLedgers;
41
43
  get billingLedgerPeriods(): BillingLedgerPeriods;
@@ -47,4 +49,5 @@ export declare class Billing {
47
49
  get statements(): Statements;
48
50
  get stripe(): Stripe;
49
51
  get stripeConnect(): StripeConnect;
52
+ get lineItems(): LineItems;
50
53
  }
@@ -14,6 +14,7 @@ const Client_js_7 = require("../resources/rateSheetMappings/client/Client.js");
14
14
  const Client_js_8 = require("../resources/statements/client/Client.js");
15
15
  const Client_js_9 = require("../resources/stripe/client/Client.js");
16
16
  const Client_js_10 = require("../resources/stripeConnect/client/Client.js");
17
+ const Client_js_11 = require("../resources/lineItems/client/Client.js");
17
18
  class Billing {
18
19
  constructor(_options = {}) {
19
20
  this._options = _options;
@@ -58,5 +59,9 @@ class Billing {
58
59
  var _a;
59
60
  return ((_a = this._stripeConnect) !== null && _a !== void 0 ? _a : (this._stripeConnect = new Client_js_10.StripeConnect(this._options)));
60
61
  }
62
+ get lineItems() {
63
+ var _a;
64
+ return ((_a = this._lineItems) !== null && _a !== void 0 ? _a : (this._lineItems = new Client_js_11.LineItems(this._options)));
65
+ }
61
66
  }
62
67
  exports.Billing = Billing;
@@ -8,6 +8,7 @@ export * as rateSheetMappings from "./rateSheetMappings/index.js";
8
8
  export * as statements from "./statements/index.js";
9
9
  export * as stripe from "./stripe/index.js";
10
10
  export * as stripeConnect from "./stripeConnect/index.js";
11
+ export * as lineItems from "./lineItems/index.js";
11
12
  export * from "./billingLedgers/client/requests/index.js";
12
13
  export * from "./billingLedgerPeriods/client/requests/index.js";
13
14
  export * from "./lineItemGroups/client/requests/index.js";
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.stripeConnect = exports.stripe = exports.statements = exports.rateSheetMappings = exports.onboardCourierRateSheets = exports.cargoOnFlightRateSheets = exports.chrtGroundProviderRateSheets = exports.lineItemGroups = exports.billingLedgerPeriods = exports.billingLedgers = void 0;
39
+ exports.lineItems = exports.stripeConnect = exports.stripe = exports.statements = exports.rateSheetMappings = exports.onboardCourierRateSheets = exports.cargoOnFlightRateSheets = exports.chrtGroundProviderRateSheets = exports.lineItemGroups = exports.billingLedgerPeriods = exports.billingLedgers = void 0;
40
40
  exports.billingLedgers = __importStar(require("./billingLedgers/index.js"));
41
41
  exports.billingLedgerPeriods = __importStar(require("./billingLedgerPeriods/index.js"));
42
42
  exports.lineItemGroups = __importStar(require("./lineItemGroups/index.js"));
@@ -47,6 +47,7 @@ exports.rateSheetMappings = __importStar(require("./rateSheetMappings/index.js")
47
47
  exports.statements = __importStar(require("./statements/index.js"));
48
48
  exports.stripe = __importStar(require("./stripe/index.js"));
49
49
  exports.stripeConnect = __importStar(require("./stripeConnect/index.js"));
50
+ exports.lineItems = __importStar(require("./lineItems/index.js"));
50
51
  __exportStar(require("./billingLedgers/client/requests/index.js"), exports);
51
52
  __exportStar(require("./billingLedgerPeriods/client/requests/index.js"), exports);
52
53
  __exportStar(require("./lineItemGroups/client/requests/index.js"), exports);
@@ -49,6 +49,19 @@ export declare class LineItemGroups {
49
49
  */
50
50
  getByIdV1(id: string, requestOptions?: LineItemGroups.RequestOptions): core.HttpResponsePromise<Chrt.LineItemGroup1>;
51
51
  private __getByIdV1;
52
+ /**
53
+ * Retrieves all LineItems referenced by a LineItemGroup the caller can access. | authz_personas=[lig_org_operators, lig_driver] | () -> (LineItemGroupLineItemsRes)
54
+ *
55
+ * @param {string} lineItemGroupId
56
+ * @param {LineItemGroups.RequestOptions} requestOptions - Request-specific configuration.
57
+ *
58
+ * @throws {@link Chrt.UnprocessableEntityError}
59
+ *
60
+ * @example
61
+ * await client.billing.lineItemGroups.getLineItemsV1("line_item_group_id")
62
+ */
63
+ getLineItemsV1(lineItemGroupId: string, requestOptions?: LineItemGroups.RequestOptions): core.HttpResponsePromise<Chrt.LineItemGroupLineItemsRes>;
64
+ private __getLineItemsV1;
52
65
  /**
53
66
  * Lists LineItemGroups the caller owns, is a payment counterparty on, or is the destination driver for. | authz_personas=[lig_org_operators, lig_driver] | () -> (LineItemGroupListRes)
54
67
  *
@@ -124,6 +124,65 @@ class LineItemGroups {
124
124
  }
125
125
  });
126
126
  }
127
+ /**
128
+ * Retrieves all LineItems referenced by a LineItemGroup the caller can access. | authz_personas=[lig_org_operators, lig_driver] | () -> (LineItemGroupLineItemsRes)
129
+ *
130
+ * @param {string} lineItemGroupId
131
+ * @param {LineItemGroups.RequestOptions} requestOptions - Request-specific configuration.
132
+ *
133
+ * @throws {@link Chrt.UnprocessableEntityError}
134
+ *
135
+ * @example
136
+ * await client.billing.lineItemGroups.getLineItemsV1("line_item_group_id")
137
+ */
138
+ getLineItemsV1(lineItemGroupId, requestOptions) {
139
+ return core.HttpResponsePromise.fromPromise(this.__getLineItemsV1(lineItemGroupId, requestOptions));
140
+ }
141
+ __getLineItemsV1(lineItemGroupId, requestOptions) {
142
+ return __awaiter(this, void 0, void 0, function* () {
143
+ var _a, _b, _c, _d;
144
+ 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);
145
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
146
+ 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/line_item_groups/line_items/v1/${encodeURIComponent(lineItemGroupId)}`),
147
+ method: "GET",
148
+ headers: _headers,
149
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
150
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
151
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
152
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
153
+ });
154
+ if (_response.ok) {
155
+ return { data: _response.body, rawResponse: _response.rawResponse };
156
+ }
157
+ if (_response.error.reason === "status-code") {
158
+ switch (_response.error.statusCode) {
159
+ case 422:
160
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
161
+ default:
162
+ throw new errors.ChrtError({
163
+ statusCode: _response.error.statusCode,
164
+ body: _response.error.body,
165
+ rawResponse: _response.rawResponse,
166
+ });
167
+ }
168
+ }
169
+ switch (_response.error.reason) {
170
+ case "non-json":
171
+ throw new errors.ChrtError({
172
+ statusCode: _response.error.statusCode,
173
+ body: _response.error.rawBody,
174
+ rawResponse: _response.rawResponse,
175
+ });
176
+ case "timeout":
177
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing/line_item_groups/line_items/v1/{line_item_group_id}.");
178
+ case "unknown":
179
+ throw new errors.ChrtError({
180
+ message: _response.error.errorMessage,
181
+ rawResponse: _response.rawResponse,
182
+ });
183
+ }
184
+ });
185
+ }
127
186
  /**
128
187
  * Lists LineItemGroups the caller owns, is a payment counterparty on, or is the destination driver for. | authz_personas=[lig_org_operators, lig_driver] | () -> (LineItemGroupListRes)
129
188
  *
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments.js";
5
+ import * as core from "../../../../../../core/index.js";
6
+ import { S3Objects } from "../resources/s3Objects/client/Client.js";
7
+ export declare namespace LineItems {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.ChrtEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ token?: core.Supplier<core.BearerToken | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
+ fetcher?: core.FetchFunction;
16
+ }
17
+ }
18
+ export declare class LineItems {
19
+ protected readonly _options: LineItems.Options;
20
+ protected _s3Objects: S3Objects | undefined;
21
+ constructor(_options?: LineItems.Options);
22
+ get s3Objects(): S3Objects;
23
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LineItems = void 0;
7
+ const Client_js_1 = require("../resources/s3Objects/client/Client.js");
8
+ class LineItems {
9
+ constructor(_options = {}) {
10
+ this._options = _options;
11
+ }
12
+ get s3Objects() {
13
+ var _a;
14
+ return ((_a = this._s3Objects) !== null && _a !== void 0 ? _a : (this._s3Objects = new Client_js_1.S3Objects(this._options)));
15
+ }
16
+ }
17
+ exports.LineItems = LineItems;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ export * from "./resources/index.js";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./resources/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * as s3Objects from "./s3Objects/index.js";
2
+ export * from "./s3Objects/client/requests/index.js";
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.s3Objects = void 0;
40
+ exports.s3Objects = __importStar(require("./s3Objects/index.js"));
41
+ __exportStar(require("./s3Objects/client/requests/index.js"), exports);
@@ -0,0 +1,83 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../../../environments.js";
5
+ import * as core from "../../../../../../../../core/index.js";
6
+ import * as Chrt from "../../../../../../../index.js";
7
+ export declare namespace S3Objects {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.ChrtEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ token?: core.Supplier<core.BearerToken | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
+ fetcher?: core.FetchFunction;
16
+ }
17
+ interface RequestOptions {
18
+ /** The maximum time to wait for a response in seconds. */
19
+ timeoutInSeconds?: number;
20
+ /** The number of times to retry the request. Defaults to 2. */
21
+ maxRetries?: number;
22
+ /** A hook to abort the request. */
23
+ abortSignal?: AbortSignal;
24
+ /** Additional query string parameters to include in the request. */
25
+ queryParams?: Record<string, unknown>;
26
+ /** Additional headers to include in the request. */
27
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
+ }
29
+ }
30
+ export declare class S3Objects {
31
+ protected readonly _options: S3Objects.Options;
32
+ constructor(_options?: S3Objects.Options);
33
+ /**
34
+ * Retrieves metadata for a line item S3 object. | authz_personas=[lig_org_operators, lig_driver] | () -> (LineItemS3ObjectMetadata1)
35
+ *
36
+ * @param {string} lineItemS3ObjectMetadataId
37
+ * @param {S3Objects.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.billing.lineItems.s3Objects.getS3ObjectMetadataV1("line_item_s3_object_metadata_id")
43
+ */
44
+ getS3ObjectMetadataV1(lineItemS3ObjectMetadataId: string, requestOptions?: S3Objects.RequestOptions): core.HttpResponsePromise<Chrt.LineItemS3ObjectMetadata1>;
45
+ private __getS3ObjectMetadataV1;
46
+ /**
47
+ * Streams a line item S3 object file from storage. | authz_personas=[lig_org_operators, lig_driver] | () -> (binary)
48
+ * @throws {@link Chrt.UnprocessableEntityError}
49
+ */
50
+ getV1(lineItemS3ObjectMetadataId: string, requestOptions?: S3Objects.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
51
+ private __getV1;
52
+ /**
53
+ * Uploads a file to a line item. Automatic blurhash generation for images. | authz_personas=[lig_org_operators, lig_driver] | (UploadFile) -> (bool)
54
+ *
55
+ * @param {string} lineItemId
56
+ * @param {Chrt.billing.lineItems.BodyLineItemsS3ObjectPostAddV1BillingLineItemsS3ObjectsAddV1LineItemIdPost} request
57
+ * @param {S3Objects.RequestOptions} requestOptions - Request-specific configuration.
58
+ *
59
+ * @throws {@link Chrt.UnprocessableEntityError}
60
+ *
61
+ * @example
62
+ * import { createReadStream } from "fs";
63
+ * await client.billing.lineItems.s3Objects.addV1("line_item_id", {
64
+ * file: fs.createReadStream("/path/to/your/file")
65
+ * })
66
+ */
67
+ addV1(lineItemId: string, request: Chrt.billing.lineItems.BodyLineItemsS3ObjectPostAddV1BillingLineItemsS3ObjectsAddV1LineItemIdPost, requestOptions?: S3Objects.RequestOptions): core.HttpResponsePromise<boolean>;
68
+ private __addV1;
69
+ /**
70
+ * Deletes an S3 object metadata and the associated S3 object from a line item. | authz_personas=[lig_org_operators, lig_driver] | () -> (bool)
71
+ *
72
+ * @param {string} lineItemS3ObjectMetadataId
73
+ * @param {S3Objects.RequestOptions} requestOptions - Request-specific configuration.
74
+ *
75
+ * @throws {@link Chrt.UnprocessableEntityError}
76
+ *
77
+ * @example
78
+ * await client.billing.lineItems.s3Objects.deleteV1("line_item_s3_object_metadata_id")
79
+ */
80
+ deleteV1(lineItemS3ObjectMetadataId: string, requestOptions?: S3Objects.RequestOptions): core.HttpResponsePromise<boolean>;
81
+ private __deleteV1;
82
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
83
+ }