@chrt-inc/typescript-sdk 1.384.0 → 1.391.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 (142) hide show
  1. package/dist/cjs/Client.d.ts +3 -0
  2. package/dist/cjs/Client.js +15 -10
  3. package/dist/cjs/api/resources/analytics/client/Client.d.ts +23 -0
  4. package/dist/cjs/api/resources/analytics/client/Client.js +17 -0
  5. package/dist/cjs/api/resources/analytics/client/index.d.ts +1 -0
  6. package/dist/cjs/api/resources/analytics/client/index.js +2 -0
  7. package/dist/cjs/api/resources/analytics/index.d.ts +2 -0
  8. package/dist/cjs/api/resources/analytics/index.js +18 -0
  9. package/dist/cjs/api/resources/analytics/resources/index.d.ts +2 -0
  10. package/dist/cjs/api/resources/analytics/resources/index.js +41 -0
  11. package/dist/cjs/api/resources/analytics/resources/shipping/client/Client.d.ts +50 -0
  12. package/dist/cjs/api/resources/analytics/resources/shipping/client/Client.js +133 -0
  13. package/dist/cjs/api/resources/analytics/resources/shipping/client/index.d.ts +2 -0
  14. package/dist/cjs/api/resources/analytics/resources/shipping/client/index.js +17 -0
  15. package/dist/cjs/api/resources/analytics/resources/shipping/client/requests/AnalyticsTimePeriodRequest.d.ts +18 -0
  16. package/dist/cjs/api/resources/analytics/resources/shipping/client/requests/AnalyticsTimePeriodRequest.js +5 -0
  17. package/dist/cjs/api/resources/analytics/resources/shipping/client/requests/index.d.ts +1 -0
  18. package/dist/cjs/api/resources/analytics/resources/shipping/client/requests/index.js +2 -0
  19. package/dist/cjs/api/resources/analytics/resources/shipping/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/analytics/resources/shipping/index.js +17 -0
  21. package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.d.ts +2 -2
  22. package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.js +3 -3
  23. package/dist/cjs/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/requests/BodyLineItemGroupsS3ObjectPostAddV1BillingLineItemGroupsS3ObjectsAddV1LineItemGroupIdPost.d.ts +2 -2
  24. package/dist/cjs/api/resources/dev/client/Client.d.ts +7 -14
  25. package/dist/cjs/api/resources/dev/client/Client.js +25 -65
  26. package/dist/cjs/api/resources/dev/client/requests/AgentReq.d.ts +10 -0
  27. package/dist/cjs/api/resources/dev/client/requests/AgentReq.js +5 -0
  28. package/dist/cjs/api/resources/dev/client/requests/index.d.ts +1 -0
  29. package/dist/cjs/api/resources/index.d.ts +2 -0
  30. package/dist/cjs/api/resources/index.js +3 -1
  31. package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/Client.d.ts +2 -2
  32. package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/Client.js +3 -3
  33. package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.d.ts +2 -2
  34. package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/Client.d.ts +2 -2
  35. package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/Client.js +3 -3
  36. package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.d.ts +2 -2
  37. package/dist/cjs/api/resources/users/client/Client.d.ts +38 -0
  38. package/dist/cjs/api/resources/users/client/Client.js +178 -0
  39. package/dist/cjs/api/resources/users/client/index.d.ts +1 -0
  40. package/dist/cjs/api/resources/users/client/index.js +15 -0
  41. package/dist/cjs/api/resources/users/client/requests/UserPrivateDataClientCreate1.d.ts +14 -0
  42. package/dist/cjs/api/resources/users/client/requests/UserPrivateDataClientCreate1.js +5 -0
  43. package/dist/cjs/api/resources/users/client/requests/UserPrivateDataClientUpdate1.d.ts +11 -0
  44. package/dist/cjs/api/resources/users/client/requests/UserPrivateDataClientUpdate1.js +5 -0
  45. package/dist/cjs/api/resources/users/client/requests/index.d.ts +2 -0
  46. package/dist/cjs/api/resources/users/client/requests/index.js +2 -0
  47. package/dist/cjs/api/types/AgentRes.d.ts +8 -0
  48. package/dist/cjs/api/types/AgentRes.js +5 -0
  49. package/dist/cjs/api/types/AnalyticsTimeBucketResponse.d.ts +8 -0
  50. package/dist/cjs/api/types/AnalyticsTimeBucketResponse.js +5 -0
  51. package/dist/cjs/api/types/LineItemGroupS3ObjectMetadata1.d.ts +4 -0
  52. package/dist/cjs/api/types/OrderAndTaskGroupExpandedReq.d.ts +1 -0
  53. package/dist/cjs/api/types/OrderDraftExpanded.d.ts +1 -0
  54. package/dist/cjs/api/types/OrderExpanded.d.ts +1 -0
  55. package/dist/cjs/api/types/StartOfWeek.d.ts +13 -0
  56. package/dist/cjs/api/types/StartOfWeek.js +15 -0
  57. package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.d.ts +4 -0
  58. package/dist/cjs/api/types/TaskGroupS3ObjectMetadata1.d.ts +4 -0
  59. package/dist/cjs/api/types/TimeBucket.d.ts +7 -0
  60. package/dist/cjs/api/types/TimeBucket.js +5 -0
  61. package/dist/cjs/api/types/TimeGranularity.d.ts +11 -0
  62. package/dist/cjs/api/types/TimeGranularity.js +13 -0
  63. package/dist/cjs/api/types/TimezoneEnum.d.ts +23 -0
  64. package/dist/cjs/api/types/TimezoneEnum.js +25 -0
  65. package/dist/cjs/api/types/UserPrivateData1.d.ts +12 -0
  66. package/dist/cjs/api/types/UserPrivateData1.js +5 -0
  67. package/dist/cjs/api/types/index.d.ts +7 -0
  68. package/dist/cjs/api/types/index.js +7 -0
  69. package/dist/cjs/version.d.ts +1 -1
  70. package/dist/cjs/version.js +1 -1
  71. package/dist/esm/Client.d.mts +3 -0
  72. package/dist/esm/Client.mjs +7 -2
  73. package/dist/esm/api/resources/analytics/client/Client.d.mts +23 -0
  74. package/dist/esm/api/resources/analytics/client/Client.mjs +13 -0
  75. package/dist/esm/api/resources/analytics/client/index.d.mts +1 -0
  76. package/dist/esm/api/resources/analytics/client/index.mjs +1 -0
  77. package/dist/esm/api/resources/analytics/index.d.mts +2 -0
  78. package/dist/esm/api/resources/analytics/index.mjs +2 -0
  79. package/dist/esm/api/resources/analytics/resources/index.d.mts +2 -0
  80. package/dist/esm/api/resources/analytics/resources/index.mjs +2 -0
  81. package/dist/esm/api/resources/analytics/resources/shipping/client/Client.d.mts +50 -0
  82. package/dist/esm/api/resources/analytics/resources/shipping/client/Client.mjs +96 -0
  83. package/dist/esm/api/resources/analytics/resources/shipping/client/index.d.mts +2 -0
  84. package/dist/esm/api/resources/analytics/resources/shipping/client/index.mjs +1 -0
  85. package/dist/esm/api/resources/analytics/resources/shipping/client/requests/AnalyticsTimePeriodRequest.d.mts +18 -0
  86. package/dist/esm/api/resources/analytics/resources/shipping/client/requests/AnalyticsTimePeriodRequest.mjs +4 -0
  87. package/dist/esm/api/resources/analytics/resources/shipping/client/requests/index.d.mts +1 -0
  88. package/dist/esm/api/resources/analytics/resources/shipping/client/requests/index.mjs +1 -0
  89. package/dist/esm/api/resources/analytics/resources/shipping/index.d.mts +1 -0
  90. package/dist/esm/api/resources/analytics/resources/shipping/index.mjs +1 -0
  91. package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.d.mts +2 -2
  92. package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/Client.mjs +3 -3
  93. package/dist/esm/api/resources/billing/resources/lineItemGroups/resources/s3Objects/client/requests/BodyLineItemGroupsS3ObjectPostAddV1BillingLineItemGroupsS3ObjectsAddV1LineItemGroupIdPost.d.mts +2 -2
  94. package/dist/esm/api/resources/dev/client/Client.d.mts +7 -14
  95. package/dist/esm/api/resources/dev/client/Client.mjs +25 -65
  96. package/dist/esm/api/resources/dev/client/requests/AgentReq.d.mts +10 -0
  97. package/dist/esm/api/resources/dev/client/requests/AgentReq.mjs +4 -0
  98. package/dist/esm/api/resources/dev/client/requests/index.d.mts +1 -0
  99. package/dist/esm/api/resources/index.d.mts +2 -0
  100. package/dist/esm/api/resources/index.mjs +2 -0
  101. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/Client.d.mts +2 -2
  102. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/Client.mjs +3 -3
  103. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.d.mts +2 -2
  104. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/Client.d.mts +2 -2
  105. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/Client.mjs +3 -3
  106. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.d.mts +2 -2
  107. package/dist/esm/api/resources/users/client/Client.d.mts +38 -0
  108. package/dist/esm/api/resources/users/client/Client.mjs +178 -0
  109. package/dist/esm/api/resources/users/client/index.d.mts +1 -0
  110. package/dist/esm/api/resources/users/client/index.mjs +1 -1
  111. package/dist/esm/api/resources/users/client/requests/UserPrivateDataClientCreate1.d.mts +14 -0
  112. package/dist/esm/api/resources/users/client/requests/UserPrivateDataClientCreate1.mjs +4 -0
  113. package/dist/esm/api/resources/users/client/requests/UserPrivateDataClientUpdate1.d.mts +11 -0
  114. package/dist/esm/api/resources/users/client/requests/UserPrivateDataClientUpdate1.mjs +4 -0
  115. package/dist/esm/api/resources/users/client/requests/index.d.mts +2 -0
  116. package/dist/esm/api/resources/users/client/requests/index.mjs +1 -0
  117. package/dist/esm/api/types/AgentRes.d.mts +8 -0
  118. package/dist/esm/api/types/AgentRes.mjs +4 -0
  119. package/dist/esm/api/types/AnalyticsTimeBucketResponse.d.mts +8 -0
  120. package/dist/esm/api/types/AnalyticsTimeBucketResponse.mjs +4 -0
  121. package/dist/esm/api/types/LineItemGroupS3ObjectMetadata1.d.mts +4 -0
  122. package/dist/esm/api/types/OrderAndTaskGroupExpandedReq.d.mts +1 -0
  123. package/dist/esm/api/types/OrderDraftExpanded.d.mts +1 -0
  124. package/dist/esm/api/types/OrderExpanded.d.mts +1 -0
  125. package/dist/esm/api/types/StartOfWeek.d.mts +13 -0
  126. package/dist/esm/api/types/StartOfWeek.mjs +12 -0
  127. package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.d.mts +4 -0
  128. package/dist/esm/api/types/TaskGroupS3ObjectMetadata1.d.mts +4 -0
  129. package/dist/esm/api/types/TimeBucket.d.mts +7 -0
  130. package/dist/esm/api/types/TimeBucket.mjs +4 -0
  131. package/dist/esm/api/types/TimeGranularity.d.mts +11 -0
  132. package/dist/esm/api/types/TimeGranularity.mjs +10 -0
  133. package/dist/esm/api/types/TimezoneEnum.d.mts +23 -0
  134. package/dist/esm/api/types/TimezoneEnum.mjs +22 -0
  135. package/dist/esm/api/types/UserPrivateData1.d.mts +12 -0
  136. package/dist/esm/api/types/UserPrivateData1.mjs +4 -0
  137. package/dist/esm/api/types/index.d.mts +7 -0
  138. package/dist/esm/api/types/index.mjs +7 -0
  139. package/dist/esm/version.d.mts +1 -1
  140. package/dist/esm/version.mjs +1 -1
  141. package/package.json +1 -1
  142. package/reference.md +268 -64
@@ -21,6 +21,7 @@ import { Orgs } from "./api/resources/orgs/client/Client.js";
21
21
  import { Root } from "./api/resources/root/client/Client.js";
22
22
  import { Users } from "./api/resources/users/client/Client.js";
23
23
  import { Utils } from "./api/resources/utils/client/Client.js";
24
+ import { Analytics } from "./api/resources/analytics/client/Client.js";
24
25
  import { Billing } from "./api/resources/billing/client/Client.js";
25
26
  import { Notifications } from "./api/resources/notifications/client/Client.js";
26
27
  import { OrgInfoForConnections } from "./api/resources/orgInfoForConnections/client/Client.js";
@@ -68,6 +69,7 @@ export declare class ChrtClient {
68
69
  protected _root: Root | undefined;
69
70
  protected _users: Users | undefined;
70
71
  protected _utils: Utils | undefined;
72
+ protected _analytics: Analytics | undefined;
71
73
  protected _billing: Billing | undefined;
72
74
  protected _notifications: Notifications | undefined;
73
75
  protected _orgInfoForConnections: OrgInfoForConnections | undefined;
@@ -91,6 +93,7 @@ export declare class ChrtClient {
91
93
  get root(): Root;
92
94
  get users(): Users;
93
95
  get utils(): Utils;
96
+ get analytics(): Analytics;
94
97
  get billing(): Billing;
95
98
  get notifications(): Notifications;
96
99
  get orgInfoForConnections(): OrgInfoForConnections;
@@ -57,17 +57,18 @@ const Client_js_15 = require("./api/resources/orgs/client/Client.js");
57
57
  const Client_js_16 = require("./api/resources/root/client/Client.js");
58
58
  const Client_js_17 = require("./api/resources/users/client/Client.js");
59
59
  const Client_js_18 = require("./api/resources/utils/client/Client.js");
60
- const Client_js_19 = require("./api/resources/billing/client/Client.js");
61
- const Client_js_20 = require("./api/resources/notifications/client/Client.js");
62
- const Client_js_21 = require("./api/resources/orgInfoForConnections/client/Client.js");
63
- const Client_js_22 = require("./api/resources/tracking/client/Client.js");
60
+ const Client_js_19 = require("./api/resources/analytics/client/Client.js");
61
+ const Client_js_20 = require("./api/resources/billing/client/Client.js");
62
+ const Client_js_21 = require("./api/resources/notifications/client/Client.js");
63
+ const Client_js_22 = require("./api/resources/orgInfoForConnections/client/Client.js");
64
+ const Client_js_23 = require("./api/resources/tracking/client/Client.js");
64
65
  class ChrtClient {
65
66
  constructor(_options = {}) {
66
67
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
67
68
  "X-Fern-Language": "JavaScript",
68
69
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
69
- "X-Fern-SDK-Version": "1.384.0",
70
- "User-Agent": "@chrt-inc/typescript-sdk/1.384.0",
70
+ "X-Fern-SDK-Version": "1.391.0",
71
+ "User-Agent": "@chrt-inc/typescript-sdk/1.391.0",
71
72
  "X-Fern-Runtime": core.RUNTIME.type,
72
73
  "X-Fern-Runtime-Version": core.RUNTIME.version,
73
74
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -144,21 +145,25 @@ class ChrtClient {
144
145
  var _a;
145
146
  return ((_a = this._utils) !== null && _a !== void 0 ? _a : (this._utils = new Client_js_18.Utils(this._options)));
146
147
  }
148
+ get analytics() {
149
+ var _a;
150
+ return ((_a = this._analytics) !== null && _a !== void 0 ? _a : (this._analytics = new Client_js_19.Analytics(this._options)));
151
+ }
147
152
  get billing() {
148
153
  var _a;
149
- return ((_a = this._billing) !== null && _a !== void 0 ? _a : (this._billing = new Client_js_19.Billing(this._options)));
154
+ return ((_a = this._billing) !== null && _a !== void 0 ? _a : (this._billing = new Client_js_20.Billing(this._options)));
150
155
  }
151
156
  get notifications() {
152
157
  var _a;
153
- return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_20.Notifications(this._options)));
158
+ return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_21.Notifications(this._options)));
154
159
  }
155
160
  get orgInfoForConnections() {
156
161
  var _a;
157
- return ((_a = this._orgInfoForConnections) !== null && _a !== void 0 ? _a : (this._orgInfoForConnections = new Client_js_21.OrgInfoForConnections(this._options)));
162
+ return ((_a = this._orgInfoForConnections) !== null && _a !== void 0 ? _a : (this._orgInfoForConnections = new Client_js_22.OrgInfoForConnections(this._options)));
158
163
  }
159
164
  get tracking() {
160
165
  var _a;
161
- return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new Client_js_22.Tracking(this._options)));
166
+ return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new Client_js_23.Tracking(this._options)));
162
167
  }
163
168
  }
164
169
  exports.ChrtClient = ChrtClient;
@@ -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 { Shipping } from "../resources/shipping/client/Client.js";
7
+ export declare namespace Analytics {
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 Analytics {
19
+ protected readonly _options: Analytics.Options;
20
+ protected _shipping: Shipping | undefined;
21
+ constructor(_options?: Analytics.Options);
22
+ get shipping(): Shipping;
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.Analytics = void 0;
7
+ const Client_js_1 = require("../resources/shipping/client/Client.js");
8
+ class Analytics {
9
+ constructor(_options = {}) {
10
+ this._options = _options;
11
+ }
12
+ get shipping() {
13
+ var _a;
14
+ return ((_a = this._shipping) !== null && _a !== void 0 ? _a : (this._shipping = new Client_js_1.Shipping(this._options)));
15
+ }
16
+ }
17
+ exports.Analytics = Analytics;
@@ -0,0 +1 @@
1
+ export {};
@@ -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 shipping from "./shipping/index.js";
2
+ export * from "./shipping/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.shipping = void 0;
40
+ exports.shipping = __importStar(require("./shipping/index.js"));
41
+ __exportStar(require("./shipping/client/requests/index.js"), exports);
@@ -0,0 +1,50 @@
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 Shipping {
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 Shipping {
31
+ protected readonly _options: Shipping.Options;
32
+ constructor(_options?: Shipping.Options);
33
+ /**
34
+ * Retrieves order counts bucketed by time period. | (AnalyticsTimePeriodRequest) -> (AnalyticsTimeBucketResponse)
35
+ *
36
+ * @param {Chrt.analytics.AnalyticsTimePeriodRequest} request
37
+ * @param {Shipping.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.analytics.shipping.retrieveOrdersCountV1({
43
+ * start: "2024-01-15T09:30:00Z",
44
+ * end: "2024-01-15T09:30:00Z"
45
+ * })
46
+ */
47
+ retrieveOrdersCountV1(request: Chrt.analytics.AnalyticsTimePeriodRequest, requestOptions?: Shipping.RequestOptions): core.HttpResponsePromise<Chrt.AnalyticsTimeBucketResponse>;
48
+ private __retrieveOrdersCountV1;
49
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
50
+ }
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.Shipping = void 0;
49
+ const environments = __importStar(require("../../../../../../environments.js"));
50
+ const core = __importStar(require("../../../../../../core/index.js"));
51
+ const Chrt = __importStar(require("../../../../../index.js"));
52
+ const headers_js_1 = require("../../../../../../core/headers.js");
53
+ const errors = __importStar(require("../../../../../../errors/index.js"));
54
+ class Shipping {
55
+ constructor(_options = {}) {
56
+ this._options = _options;
57
+ }
58
+ /**
59
+ * Retrieves order counts bucketed by time period. | (AnalyticsTimePeriodRequest) -> (AnalyticsTimeBucketResponse)
60
+ *
61
+ * @param {Chrt.analytics.AnalyticsTimePeriodRequest} request
62
+ * @param {Shipping.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Chrt.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.analytics.shipping.retrieveOrdersCountV1({
68
+ * start: "2024-01-15T09:30:00Z",
69
+ * end: "2024-01-15T09:30:00Z"
70
+ * })
71
+ */
72
+ retrieveOrdersCountV1(request, requestOptions) {
73
+ return core.HttpResponsePromise.fromPromise(this.__retrieveOrdersCountV1(request, requestOptions));
74
+ }
75
+ __retrieveOrdersCountV1(request, requestOptions) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ var _a, _b, _c, _d;
78
+ 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);
79
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
80
+ 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, "analytics/shipping/orders/count/v1"),
81
+ method: "POST",
82
+ headers: _headers,
83
+ contentType: "application/json",
84
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
85
+ requestType: "json",
86
+ body: request,
87
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
88
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
89
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
90
+ });
91
+ if (_response.ok) {
92
+ return { data: _response.body, rawResponse: _response.rawResponse };
93
+ }
94
+ if (_response.error.reason === "status-code") {
95
+ switch (_response.error.statusCode) {
96
+ case 422:
97
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
98
+ default:
99
+ throw new errors.ChrtError({
100
+ statusCode: _response.error.statusCode,
101
+ body: _response.error.body,
102
+ rawResponse: _response.rawResponse,
103
+ });
104
+ }
105
+ }
106
+ switch (_response.error.reason) {
107
+ case "non-json":
108
+ throw new errors.ChrtError({
109
+ statusCode: _response.error.statusCode,
110
+ body: _response.error.rawBody,
111
+ rawResponse: _response.rawResponse,
112
+ });
113
+ case "timeout":
114
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /analytics/shipping/orders/count/v1.");
115
+ case "unknown":
116
+ throw new errors.ChrtError({
117
+ message: _response.error.errorMessage,
118
+ rawResponse: _response.rawResponse,
119
+ });
120
+ }
121
+ });
122
+ }
123
+ _getAuthorizationHeader() {
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ const bearer = yield core.Supplier.get(this._options.token);
126
+ if (bearer != null) {
127
+ return `Bearer ${bearer}`;
128
+ }
129
+ return undefined;
130
+ });
131
+ }
132
+ }
133
+ exports.Shipping = Shipping;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
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("./requests/index.js"), exports);
@@ -0,0 +1,18 @@
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
+ * start: "2024-01-15T09:30:00Z",
9
+ * end: "2024-01-15T09:30:00Z"
10
+ * }
11
+ */
12
+ export interface AnalyticsTimePeriodRequest {
13
+ start: string;
14
+ end: string;
15
+ granularity?: Chrt.TimeGranularity;
16
+ timezone?: Chrt.TimezoneEnum;
17
+ start_of_week?: Chrt.StartOfWeek | null;
18
+ }
@@ -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 @@
1
+ export { type AnalyticsTimePeriodRequest } from "./AnalyticsTimePeriodRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
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);
@@ -50,7 +50,7 @@ export declare class S3Objects {
50
50
  getV1(lineItemGroupS3ObjectMetadataId: string, requestOptions?: S3Objects.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
51
51
  private __getV1;
52
52
  /**
53
- * Uploads an image file to a line item group with automatic blurhash generation. | authz_personas=[lig_org_operators, lig_driver] | (UploadFile) -> (bool)
53
+ * Uploads a file (image, PDF, etc.) to a line item group. Automatic blurhash generation for images. | authz_personas=[lig_org_operators, lig_driver] | (UploadFile) -> (bool)
54
54
  *
55
55
  * @param {string} lineItemGroupId
56
56
  * @param {Chrt.billing.lineItemGroups.BodyLineItemGroupsS3ObjectPostAddV1BillingLineItemGroupsS3ObjectsAddV1LineItemGroupIdPost} request
@@ -61,7 +61,7 @@ export declare class S3Objects {
61
61
  * @example
62
62
  * import { createReadStream } from "fs";
63
63
  * await client.billing.lineItemGroups.s3Objects.addV1("line_item_group_id", {
64
- * image: fs.createReadStream("/path/to/your/file")
64
+ * file: fs.createReadStream("/path/to/your/file")
65
65
  * })
66
66
  */
67
67
  addV1(lineItemGroupId: string, request: Chrt.billing.lineItemGroups.BodyLineItemGroupsS3ObjectPostAddV1BillingLineItemGroupsS3ObjectsAddV1LineItemGroupIdPost, requestOptions?: S3Objects.RequestOptions): core.HttpResponsePromise<boolean>;
@@ -168,7 +168,7 @@ class S3Objects {
168
168
  });
169
169
  }
170
170
  /**
171
- * Uploads an image file to a line item group with automatic blurhash generation. | authz_personas=[lig_org_operators, lig_driver] | (UploadFile) -> (bool)
171
+ * Uploads a file (image, PDF, etc.) to a line item group. Automatic blurhash generation for images. | authz_personas=[lig_org_operators, lig_driver] | (UploadFile) -> (bool)
172
172
  *
173
173
  * @param {string} lineItemGroupId
174
174
  * @param {Chrt.billing.lineItemGroups.BodyLineItemGroupsS3ObjectPostAddV1BillingLineItemGroupsS3ObjectsAddV1LineItemGroupIdPost} request
@@ -179,7 +179,7 @@ class S3Objects {
179
179
  * @example
180
180
  * import { createReadStream } from "fs";
181
181
  * await client.billing.lineItemGroups.s3Objects.addV1("line_item_group_id", {
182
- * image: fs.createReadStream("/path/to/your/file")
182
+ * file: fs.createReadStream("/path/to/your/file")
183
183
  * })
184
184
  */
185
185
  addV1(lineItemGroupId, request, requestOptions) {
@@ -189,7 +189,7 @@ class S3Objects {
189
189
  return __awaiter(this, void 0, void 0, function* () {
190
190
  var _a, _b, _c, _d;
191
191
  const _request = yield core.newFormData();
192
- yield _request.appendFile("image", request.image);
192
+ yield _request.appendFile("file", request.file);
193
193
  const _maybeEncodedRequest = yield _request.getRequest();
194
194
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ Authorization: yield this._getAuthorizationHeader() }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
195
195
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -5,9 +5,9 @@ import * as core from "../../../../../../../../../core/index.js";
5
5
  /**
6
6
  * @example
7
7
  * {
8
- * image: fs.createReadStream("/path/to/your/file")
8
+ * file: fs.createReadStream("/path/to/your/file")
9
9
  * }
10
10
  */
11
11
  export interface BodyLineItemGroupsS3ObjectPostAddV1BillingLineItemGroupsS3ObjectsAddV1LineItemGroupIdPost {
12
- image: core.file.Uploadable.FileLike;
12
+ file: core.file.Uploadable.FileLike;
13
13
  }
@@ -31,15 +31,18 @@ export declare class Dev {
31
31
  protected readonly _options: Dev.Options;
32
32
  constructor(_options?: Dev.Options);
33
33
  /**
34
- * Experimental endpoint for running AI agentic workflows. Returns the caller's ID for testing purposes. | () -> (str)
34
+ * Runs a customer service agent that responds with logistics fun facts (real order data not yet available). | (AgentReq) -> (AgentRes)
35
35
  *
36
+ * @param {Chrt.AgentReq} request
36
37
  * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
37
38
  *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
38
41
  * @example
39
- * await client.dev.getAgentV1()
42
+ * await client.dev.postAgentV1()
40
43
  */
41
- getAgentV1(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<string>;
42
- private __getAgentV1;
44
+ postAgentV1(request?: Chrt.AgentReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.AgentRes>;
45
+ private __postAgentV1;
43
46
  /**
44
47
  * (DEPRECATED) Extracts and returns the user ID from the authenticated request's JWT token. | () -> (str)
45
48
  *
@@ -80,16 +83,6 @@ export declare class Dev {
80
83
  */
81
84
  getEmailV1(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<string>;
82
85
  private __getEmailV1;
83
- /**
84
- * Experimental endpoint for running durable execution workflows. Returns the caller's ID for testing purposes. | () -> (dict[str, Any])
85
- *
86
- * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
87
- *
88
- * @example
89
- * await client.dev.getDurableV1()
90
- */
91
- getDurableV1(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
92
- private __getDurableV1;
93
86
  /**
94
87
  * Development template endpoint that returns the caller's ID for testing. | () -> (str)
95
88
  *