@chrt-inc/typescript-sdk 1.1020.0 → 1.1025.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 (90) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/orgs/resources/connections/client/Client.d.ts +18 -1
  3. package/dist/cjs/api/resources/orgs/resources/connections/client/Client.js +75 -6
  4. package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ConnectionsListShippersForCoordinatorV1Request.d.ts +4 -1
  5. package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.d.ts +12 -0
  6. package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.js +5 -0
  7. package/dist/cjs/api/resources/orgs/resources/connections/client/requests/index.d.ts +1 -0
  8. package/dist/cjs/api/resources/orgs/resources/publicData/client/Client.d.ts +3 -0
  9. package/dist/cjs/api/resources/orgs/resources/publicData/client/Client.js +5 -0
  10. package/dist/cjs/api/resources/orgs/resources/publicData/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/orgs/resources/publicData/index.js +1 -0
  12. package/dist/cjs/api/resources/orgs/resources/publicData/resources/index.d.ts +2 -0
  13. package/dist/cjs/api/resources/orgs/resources/publicData/resources/index.js +41 -0
  14. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.d.ts +86 -0
  15. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.js +319 -0
  16. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/index.d.ts +2 -0
  17. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/index.js +17 -0
  18. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.d.ts +13 -0
  19. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.js +5 -0
  20. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.d.ts +1 -0
  21. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.js +2 -0
  22. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/index.js +17 -0
  24. package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +47 -1
  25. package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +195 -1
  26. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesForCargoV1Request.d.ts +12 -0
  27. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesForCargoV1Request.js +5 -0
  28. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoV1Request.d.ts +14 -0
  29. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoV1Request.js +5 -0
  30. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoV1Request.d.ts +12 -0
  31. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoV1Request.js +5 -0
  32. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/index.d.ts +3 -0
  33. package/dist/cjs/api/types/DeviceForCargoRes.d.ts +17 -0
  34. package/dist/cjs/api/types/DeviceForCargoRes.js +5 -0
  35. package/dist/cjs/api/types/OrgPublicData1.d.ts +1 -0
  36. package/dist/cjs/api/types/OrgPublicDataS3ObjectMetadata1.d.ts +21 -0
  37. package/dist/cjs/api/types/OrgPublicDataS3ObjectMetadata1.js +5 -0
  38. package/dist/cjs/api/types/ShipperCoordinatorConnection1.d.ts +4 -0
  39. package/dist/cjs/api/types/SpecialHandlingCodeEnum1.d.ts +63 -1
  40. package/dist/cjs/api/types/SpecialHandlingCodeEnum1.js +62 -0
  41. package/dist/cjs/api/types/index.d.ts +2 -0
  42. package/dist/cjs/api/types/index.js +2 -0
  43. package/dist/cjs/version.d.ts +1 -1
  44. package/dist/cjs/version.js +1 -1
  45. package/dist/esm/Client.mjs +2 -2
  46. package/dist/esm/api/resources/orgs/resources/connections/client/Client.d.mts +18 -1
  47. package/dist/esm/api/resources/orgs/resources/connections/client/Client.mjs +75 -6
  48. package/dist/esm/api/resources/orgs/resources/connections/client/requests/ConnectionsListShippersForCoordinatorV1Request.d.mts +4 -1
  49. package/dist/esm/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.d.mts +12 -0
  50. package/dist/esm/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.mjs +4 -0
  51. package/dist/esm/api/resources/orgs/resources/connections/client/requests/index.d.mts +1 -0
  52. package/dist/esm/api/resources/orgs/resources/publicData/client/Client.d.mts +3 -0
  53. package/dist/esm/api/resources/orgs/resources/publicData/client/Client.mjs +5 -0
  54. package/dist/esm/api/resources/orgs/resources/publicData/index.d.mts +1 -0
  55. package/dist/esm/api/resources/orgs/resources/publicData/index.mjs +1 -0
  56. package/dist/esm/api/resources/orgs/resources/publicData/resources/index.d.mts +2 -0
  57. package/dist/esm/api/resources/orgs/resources/publicData/resources/index.mjs +2 -0
  58. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.d.mts +86 -0
  59. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.mjs +282 -0
  60. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/index.d.mts +2 -0
  61. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/index.mjs +1 -0
  62. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.d.mts +13 -0
  63. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.mjs +4 -0
  64. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.d.mts +1 -0
  65. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.mjs +1 -0
  66. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/index.d.mts +1 -0
  67. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/index.mjs +1 -0
  68. package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +47 -1
  69. package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +195 -1
  70. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesForCargoV1Request.d.mts +12 -0
  71. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesForCargoV1Request.mjs +4 -0
  72. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoV1Request.d.mts +14 -0
  73. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoV1Request.mjs +4 -0
  74. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoV1Request.d.mts +12 -0
  75. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoV1Request.mjs +4 -0
  76. package/dist/esm/api/resources/tracking/resources/devices/client/requests/index.d.mts +3 -0
  77. package/dist/esm/api/types/DeviceForCargoRes.d.mts +17 -0
  78. package/dist/esm/api/types/DeviceForCargoRes.mjs +4 -0
  79. package/dist/esm/api/types/OrgPublicData1.d.mts +1 -0
  80. package/dist/esm/api/types/OrgPublicDataS3ObjectMetadata1.d.mts +21 -0
  81. package/dist/esm/api/types/OrgPublicDataS3ObjectMetadata1.mjs +4 -0
  82. package/dist/esm/api/types/ShipperCoordinatorConnection1.d.mts +4 -0
  83. package/dist/esm/api/types/SpecialHandlingCodeEnum1.d.mts +63 -1
  84. package/dist/esm/api/types/SpecialHandlingCodeEnum1.mjs +62 -0
  85. package/dist/esm/api/types/index.d.mts +2 -0
  86. package/dist/esm/api/types/index.mjs +2 -0
  87. package/dist/esm/version.d.mts +1 -1
  88. package/dist/esm/version.mjs +1 -1
  89. package/package.json +1 -1
  90. package/reference.md +527 -1
@@ -62,8 +62,8 @@ class ChrtClient {
62
62
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
63
63
  "X-Fern-Language": "JavaScript",
64
64
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
65
- "X-Fern-SDK-Version": "1.1020.0",
66
- "User-Agent": "@chrt-inc/typescript-sdk/1.1020.0",
65
+ "X-Fern-SDK-Version": "1.1025.0",
66
+ "User-Agent": "@chrt-inc/typescript-sdk/1.1025.0",
67
67
  "X-Fern-Runtime": core.RUNTIME.type,
68
68
  "X-Fern-Runtime-Version": core.RUNTIME.version,
69
69
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -192,6 +192,22 @@ export declare class Connections {
192
192
  */
193
193
  setShipperCoordinatorDefaultDepartmentV1(connectionId: string, request?: Chrt.orgs.ShipperCoordinatorConnectionClientUpdate1, requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<boolean>;
194
194
  private __setShipperCoordinatorDefaultDepartmentV1;
195
+ /**
196
+ * Sets the coordinator's known-shipper designation for an on- or off-CHRT shipper and records who changed it and when. | authz: allowed_org_types=[provider], min_org_role=operator | (ShipperCoordinatorUpdateKnownShipperReq) -> (bool)
197
+ *
198
+ * @param {string} connectionId
199
+ * @param {Chrt.orgs.ShipperCoordinatorUpdateKnownShipperReq} request
200
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
201
+ *
202
+ * @throws {@link Chrt.UnprocessableEntityError}
203
+ *
204
+ * @example
205
+ * await client.orgs.connections.setShipperCoordinatorKnownShipperV1("connection_id", {
206
+ * known_shipper: true
207
+ * })
208
+ */
209
+ setShipperCoordinatorKnownShipperV1(connectionId: string, request: Chrt.orgs.ShipperCoordinatorUpdateKnownShipperReq, requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<boolean>;
210
+ private __setShipperCoordinatorKnownShipperV1;
195
211
  /**
196
212
  * Lists the caller's shipper connections with filtering, pagination, and identity search. | authz: allowed_org_types=[provider] | () -> (ShipperCoordinatorConnectionsForCoordinatorListRes)
197
213
  *
@@ -206,7 +222,8 @@ export declare class Connections {
206
222
  * page: 1,
207
223
  * page_size: 1,
208
224
  * filter_connection_ids: ["filter_connection_ids"],
209
- * filter_connected: true
225
+ * filter_connected: true,
226
+ * filter_known_shipper: true
210
227
  * })
211
228
  */
212
229
  listShippersForCoordinatorV1(request?: Chrt.orgs.ConnectionsListShippersForCoordinatorV1Request, requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<Chrt.ShipperCoordinatorConnectionsForCoordinatorListRes>;
@@ -760,6 +760,71 @@ class Connections {
760
760
  }
761
761
  });
762
762
  }
763
+ /**
764
+ * Sets the coordinator's known-shipper designation for an on- or off-CHRT shipper and records who changed it and when. | authz: allowed_org_types=[provider], min_org_role=operator | (ShipperCoordinatorUpdateKnownShipperReq) -> (bool)
765
+ *
766
+ * @param {string} connectionId
767
+ * @param {Chrt.orgs.ShipperCoordinatorUpdateKnownShipperReq} request
768
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
769
+ *
770
+ * @throws {@link Chrt.UnprocessableEntityError}
771
+ *
772
+ * @example
773
+ * await client.orgs.connections.setShipperCoordinatorKnownShipperV1("connection_id", {
774
+ * known_shipper: true
775
+ * })
776
+ */
777
+ setShipperCoordinatorKnownShipperV1(connectionId, request, requestOptions) {
778
+ return core.HttpResponsePromise.fromPromise(this.__setShipperCoordinatorKnownShipperV1(connectionId, request, requestOptions));
779
+ }
780
+ __setShipperCoordinatorKnownShipperV1(connectionId, request, requestOptions) {
781
+ return __awaiter(this, void 0, void 0, function* () {
782
+ var _a, _b, _c, _d;
783
+ 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);
784
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
785
+ 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/connections/set_shipper_coordinator_known_shipper/v1/${encodeURIComponent(connectionId)}`),
786
+ method: "PATCH",
787
+ headers: _headers,
788
+ contentType: "application/json",
789
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
790
+ requestType: "json",
791
+ body: request,
792
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
793
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
794
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
795
+ });
796
+ if (_response.ok) {
797
+ return { data: _response.body, rawResponse: _response.rawResponse };
798
+ }
799
+ if (_response.error.reason === "status-code") {
800
+ switch (_response.error.statusCode) {
801
+ case 422:
802
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
803
+ default:
804
+ throw new errors.ChrtError({
805
+ statusCode: _response.error.statusCode,
806
+ body: _response.error.body,
807
+ rawResponse: _response.rawResponse,
808
+ });
809
+ }
810
+ }
811
+ switch (_response.error.reason) {
812
+ case "non-json":
813
+ throw new errors.ChrtError({
814
+ statusCode: _response.error.statusCode,
815
+ body: _response.error.rawBody,
816
+ rawResponse: _response.rawResponse,
817
+ });
818
+ case "timeout":
819
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /orgs/connections/set_shipper_coordinator_known_shipper/v1/{connection_id}.");
820
+ case "unknown":
821
+ throw new errors.ChrtError({
822
+ message: _response.error.errorMessage,
823
+ rawResponse: _response.rawResponse,
824
+ });
825
+ }
826
+ });
827
+ }
763
828
  /**
764
829
  * Lists the caller's shipper connections with filtering, pagination, and identity search. | authz: allowed_org_types=[provider] | () -> (ShipperCoordinatorConnectionsForCoordinatorListRes)
765
830
  *
@@ -774,7 +839,8 @@ class Connections {
774
839
  * page: 1,
775
840
  * page_size: 1,
776
841
  * filter_connection_ids: ["filter_connection_ids"],
777
- * filter_connected: true
842
+ * filter_connected: true,
843
+ * filter_known_shipper: true
778
844
  * })
779
845
  */
780
846
  listShippersForCoordinatorV1(request = {}, requestOptions) {
@@ -782,8 +848,8 @@ class Connections {
782
848
  }
783
849
  __listShippersForCoordinatorV1() {
784
850
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
785
- var _a, _b, _c, _d, _e, _f, _g;
786
- const { search, page, page_size: pageSize, filter_connection_ids: filterConnectionIds, filter_connected: filterConnected, } = request;
851
+ var _a, _b, _c, _d, _e, _f, _g, _h;
852
+ const { search, page, page_size: pageSize, filter_connection_ids: filterConnectionIds, filter_connected: filterConnected, filter_known_shipper: filterKnownShipper, } = request;
787
853
  const _queryParams = {};
788
854
  if (search !== undefined) {
789
855
  _queryParams["search"] = search;
@@ -805,9 +871,12 @@ class Connections {
805
871
  if (filterConnected !== undefined) {
806
872
  _queryParams["filter_connected"] = (_c = filterConnected === null || filterConnected === void 0 ? void 0 : filterConnected.toString()) !== null && _c !== void 0 ? _c : null;
807
873
  }
808
- let _headers = (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
809
- const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
810
- url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.ChrtEnvironment.Local, "orgs/connections/shippers/list/for_coordinator/v1"),
874
+ if (filterKnownShipper !== undefined) {
875
+ _queryParams["filter_known_shipper"] = (_d = filterKnownShipper === null || filterKnownShipper === void 0 ? void 0 : filterKnownShipper.toString()) !== null && _d !== void 0 ? _d : null;
876
+ }
877
+ let _headers = (0, headers_js_1.mergeHeaders)((_e = this._options) === null || _e === void 0 ? void 0 : _e.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
878
+ const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
879
+ url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.ChrtEnvironment.Local, "orgs/connections/shippers/list/for_coordinator/v1"),
811
880
  method: "GET",
812
881
  headers: _headers,
813
882
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -8,7 +8,8 @@
8
8
  * page: 1,
9
9
  * page_size: 1,
10
10
  * filter_connection_ids: ["filter_connection_ids"],
11
- * filter_connected: true
11
+ * filter_connected: true,
12
+ * filter_known_shipper: true
12
13
  * }
13
14
  */
14
15
  export interface ConnectionsListShippersForCoordinatorV1Request {
@@ -20,4 +21,6 @@ export interface ConnectionsListShippersForCoordinatorV1Request {
20
21
  filter_connection_ids?: (string | null) | (string | null)[];
21
22
  /** Filter by connection status */
22
23
  filter_connected?: boolean | null;
24
+ /** Filter by the coordinator's known-shipper designation */
25
+ filter_known_shipper?: boolean | null;
23
26
  }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * known_shipper: true
8
+ * }
9
+ */
10
+ export interface ShipperCoordinatorUpdateKnownShipperReq {
11
+ known_shipper: boolean;
12
+ }
@@ -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 });
@@ -4,4 +4,5 @@ export { type ConnectionsListExecutorsGeoSearchForCoordinatorV1Request } from ".
4
4
  export { type ConnectionsListExecutorsForCoordinatorV1Request } from "./ConnectionsListExecutorsForCoordinatorV1Request.js";
5
5
  export { type CoordinatorExecutorUpdateAutoAssignReq } from "./CoordinatorExecutorUpdateAutoAssignReq.js";
6
6
  export { type ShipperCoordinatorConnectionClientUpdate1 } from "./ShipperCoordinatorConnectionClientUpdate1.js";
7
+ export { type ShipperCoordinatorUpdateKnownShipperReq } from "./ShipperCoordinatorUpdateKnownShipperReq.js";
7
8
  export { type ConnectionsListShippersForCoordinatorV1Request } from "./ConnectionsListShippersForCoordinatorV1Request.js";
@@ -4,6 +4,7 @@
4
4
  import * as environments from "../../../../../../environments.js";
5
5
  import * as core from "../../../../../../core/index.js";
6
6
  import * as Chrt from "../../../../../index.js";
7
+ import { S3Object } from "../resources/s3Object/client/Client.js";
7
8
  export declare namespace PublicData {
8
9
  interface Options {
9
10
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -29,7 +30,9 @@ export declare namespace PublicData {
29
30
  }
30
31
  export declare class PublicData {
31
32
  protected readonly _options: PublicData.Options;
33
+ protected _s3Object: S3Object | undefined;
32
34
  constructor(_options?: PublicData.Options);
35
+ get s3Object(): S3Object;
33
36
  /**
34
37
  * Returns the organization avatar URL or a placeholder. | () -> (str)
35
38
  *
@@ -51,10 +51,15 @@ const core = __importStar(require("../../../../../../core/index.js"));
51
51
  const Chrt = __importStar(require("../../../../../index.js"));
52
52
  const headers_js_1 = require("../../../../../../core/headers.js");
53
53
  const errors = __importStar(require("../../../../../../errors/index.js"));
54
+ const Client_js_1 = require("../resources/s3Object/client/Client.js");
54
55
  class PublicData {
55
56
  constructor(_options = {}) {
56
57
  this._options = _options;
57
58
  }
59
+ get s3Object() {
60
+ var _a;
61
+ return ((_a = this._s3Object) !== null && _a !== void 0 ? _a : (this._s3Object = new Client_js_1.S3Object(this._options)));
62
+ }
58
63
  /**
59
64
  * Returns the organization avatar URL or a placeholder. | () -> (str)
60
65
  *
@@ -1 +1,2 @@
1
1
  export * from "./client/index.js";
2
+ export * from "./resources/index.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./resources/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * as s3Object from "./s3Object/index.js";
2
+ export * from "./s3Object/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.s3Object = void 0;
40
+ exports.s3Object = __importStar(require("./s3Object/index.js"));
41
+ __exportStar(require("./s3Object/client/requests/index.js"), exports);
@@ -0,0 +1,86 @@
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 S3Object {
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 S3Object {
31
+ protected readonly _options: S3Object.Options;
32
+ constructor(_options?: S3Object.Options);
33
+ /**
34
+ * Uploads a file, such as a logo, to the caller's organization public data. Retains uploaded files; previews require a clean malware scan. | authz: min_org_role=operator | (UploadFile) -> (OrgPublicDataS3ObjectMetadata1)
35
+ *
36
+ * @param {Chrt.orgs.publicData.BodyPostOrgPublicDataS3ObjectAddV1} request
37
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * import { createReadStream } from "fs";
43
+ * await client.orgs.publicData.s3Object.addV1({
44
+ * file: fs.createReadStream("/path/to/your/file")
45
+ * })
46
+ */
47
+ addV1(request: Chrt.orgs.publicData.BodyPostOrgPublicDataS3ObjectAddV1, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<Chrt.OrgPublicDataS3ObjectMetadata1>;
48
+ private __addV1;
49
+ /**
50
+ * Deletes an S3 object and its metadata from the caller's organization public data. | authz: min_org_role=operator | () -> (bool)
51
+ *
52
+ * @param {string} orgPublicDataS3ObjectMetadataId
53
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @throws {@link Chrt.UnprocessableEntityError}
56
+ *
57
+ * @example
58
+ * await client.orgs.publicData.s3Object.deleteV1("org_public_data_s3_object_metadata_id")
59
+ */
60
+ deleteV1(orgPublicDataS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<boolean>;
61
+ private __deleteV1;
62
+ /**
63
+ * Retrieves metadata for an organization public data S3 object. | () -> (OrgPublicDataS3ObjectMetadata1)
64
+ *
65
+ * @param {string} orgPublicDataS3ObjectMetadataId
66
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
67
+ *
68
+ * @throws {@link Chrt.UnprocessableEntityError}
69
+ *
70
+ * @example
71
+ * await client.orgs.publicData.s3Object.getS3ObjectMetadataV1("org_public_data_s3_object_metadata_id")
72
+ */
73
+ getS3ObjectMetadataV1(orgPublicDataS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<Chrt.OrgPublicDataS3ObjectMetadata1>;
74
+ private __getS3ObjectMetadataV1;
75
+ /**
76
+ * Streams an organization public data S3 object file from storage. | () -> (binary)
77
+ * @throws {@link Chrt.ForbiddenError}
78
+ * @throws {@link Chrt.NotFoundError}
79
+ * @throws {@link Chrt.UnprocessableEntityError}
80
+ * @throws {@link Chrt.LockedError}
81
+ * @throws {@link Chrt.ServiceUnavailableError}
82
+ */
83
+ getV1(orgPublicDataS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
84
+ private __getV1;
85
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
86
+ }