@chrt-inc/typescript-sdk 1.359.0 → 1.363.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 (127) hide show
  1. package/dist/cjs/Client.d.ts +3 -6
  2. package/dist/cjs/Client.js +9 -14
  3. package/dist/cjs/api/resources/index.d.ts +2 -3
  4. package/dist/cjs/api/resources/index.js +3 -4
  5. package/dist/cjs/api/resources/notifications/client/Client.d.ts +41 -6
  6. package/dist/cjs/api/resources/notifications/client/Client.js +171 -8
  7. package/dist/cjs/api/resources/notifications/client/index.d.ts +1 -0
  8. package/dist/cjs/api/resources/notifications/client/index.js +15 -0
  9. package/dist/cjs/api/resources/notifications/client/requests/NotificationReq.d.ts +17 -0
  10. package/dist/cjs/api/resources/notifications/client/requests/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/notifications/index.d.ts +0 -1
  12. package/dist/cjs/api/resources/notifications/index.js +0 -1
  13. package/dist/cjs/api/types/ChrtEmailRecipient.d.ts +10 -0
  14. package/dist/cjs/api/types/{CourierNotificationEventEnum.js → ChrtEmailRecipient.js} +7 -0
  15. package/dist/cjs/api/types/NotificationRes.d.ts +10 -0
  16. package/dist/cjs/api/types/index.d.ts +2 -6
  17. package/dist/cjs/api/types/index.js +2 -6
  18. package/dist/cjs/version.d.ts +1 -1
  19. package/dist/cjs/version.js +1 -1
  20. package/dist/esm/Client.d.mts +3 -6
  21. package/dist/esm/Client.mjs +5 -10
  22. package/dist/esm/api/resources/index.d.mts +2 -3
  23. package/dist/esm/api/resources/index.mjs +2 -3
  24. package/dist/esm/api/resources/notifications/client/Client.d.mts +41 -6
  25. package/dist/esm/api/resources/notifications/client/Client.mjs +138 -8
  26. package/dist/esm/api/resources/notifications/client/index.d.mts +1 -0
  27. package/dist/esm/api/resources/notifications/client/index.mjs +1 -1
  28. package/dist/esm/api/resources/notifications/client/requests/NotificationReq.d.mts +17 -0
  29. package/dist/esm/api/resources/notifications/client/requests/index.d.mts +1 -0
  30. package/dist/esm/api/resources/notifications/index.d.mts +0 -1
  31. package/dist/esm/api/resources/notifications/index.mjs +0 -1
  32. package/dist/esm/api/types/ChrtEmailRecipient.d.mts +10 -0
  33. package/dist/esm/api/types/ChrtEmailRecipient.mjs +9 -0
  34. package/dist/esm/api/types/NotificationRes.d.mts +10 -0
  35. package/dist/esm/api/types/index.d.mts +2 -6
  36. package/dist/esm/api/types/index.mjs +2 -6
  37. package/dist/esm/version.d.mts +1 -1
  38. package/dist/esm/version.mjs +1 -1
  39. package/package.json +1 -1
  40. package/reference.md +13 -255
  41. package/dist/cjs/api/resources/notifications/resources/courier/client/Client.d.ts +0 -59
  42. package/dist/cjs/api/resources/notifications/resources/courier/client/Client.js +0 -183
  43. package/dist/cjs/api/resources/notifications/resources/courier/client/index.d.ts +0 -2
  44. package/dist/cjs/api/resources/notifications/resources/courier/client/index.js +0 -17
  45. package/dist/cjs/api/resources/notifications/resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.d.ts +0 -18
  46. package/dist/cjs/api/resources/notifications/resources/courier/client/requests/index.d.ts +0 -1
  47. package/dist/cjs/api/resources/notifications/resources/courier/index.d.ts +0 -1
  48. package/dist/cjs/api/resources/notifications/resources/courier/index.js +0 -17
  49. package/dist/cjs/api/resources/notifications/resources/index.d.ts +0 -4
  50. package/dist/cjs/api/resources/notifications/resources/index.js +0 -43
  51. package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.d.ts +0 -59
  52. package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.js +0 -183
  53. package/dist/cjs/api/resources/notifications/resources/shipper/client/index.d.ts +0 -2
  54. package/dist/cjs/api/resources/notifications/resources/shipper/client/index.js +0 -17
  55. package/dist/cjs/api/resources/notifications/resources/shipper/client/requests/ShipperNotificationPreferencesClientCreate1.d.ts +0 -18
  56. package/dist/cjs/api/resources/notifications/resources/shipper/client/requests/index.d.ts +0 -1
  57. package/dist/cjs/api/resources/notifications/resources/shipper/client/requests/index.js +0 -2
  58. package/dist/cjs/api/resources/notifications/resources/shipper/index.d.ts +0 -1
  59. package/dist/cjs/api/resources/notifications/resources/shipper/index.js +0 -17
  60. package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.d.ts +0 -59
  61. package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.js +0 -186
  62. package/dist/cjs/api/resources/taskArtifactNotifications/client/index.d.ts +0 -2
  63. package/dist/cjs/api/resources/taskArtifactNotifications/client/index.js +0 -17
  64. package/dist/cjs/api/resources/taskArtifactNotifications/client/requests/TaskArtifactNotificationPreferencesClientCreate1.d.ts +0 -18
  65. package/dist/cjs/api/resources/taskArtifactNotifications/client/requests/TaskArtifactNotificationPreferencesClientCreate1.js +0 -5
  66. package/dist/cjs/api/resources/taskArtifactNotifications/client/requests/index.d.ts +0 -1
  67. package/dist/cjs/api/resources/taskArtifactNotifications/client/requests/index.js +0 -2
  68. package/dist/cjs/api/resources/taskArtifactNotifications/index.d.ts +0 -1
  69. package/dist/cjs/api/resources/taskArtifactNotifications/index.js +0 -17
  70. package/dist/cjs/api/types/CourierNotificationEventEnum.d.ts +0 -7
  71. package/dist/cjs/api/types/CourierNotificationPreferences1.d.ts +0 -18
  72. package/dist/cjs/api/types/CourierNotificationPreferences1.js +0 -5
  73. package/dist/cjs/api/types/NotificationChannelEnum.d.ts +0 -13
  74. package/dist/cjs/api/types/NotificationChannelEnum.js +0 -12
  75. package/dist/cjs/api/types/ShipperNotificationEventEnum.d.ts +0 -7
  76. package/dist/cjs/api/types/ShipperNotificationEventEnum.js +0 -5
  77. package/dist/cjs/api/types/ShipperNotificationPreferences1.d.ts +0 -18
  78. package/dist/cjs/api/types/ShipperNotificationPreferences1.js +0 -5
  79. package/dist/cjs/api/types/TaskArtifactNotificationPreferences1.d.ts +0 -18
  80. package/dist/cjs/api/types/TaskArtifactNotificationPreferences1.js +0 -5
  81. package/dist/esm/api/resources/notifications/resources/courier/client/Client.d.mts +0 -59
  82. package/dist/esm/api/resources/notifications/resources/courier/client/Client.mjs +0 -146
  83. package/dist/esm/api/resources/notifications/resources/courier/client/index.d.mts +0 -2
  84. package/dist/esm/api/resources/notifications/resources/courier/client/index.mjs +0 -1
  85. package/dist/esm/api/resources/notifications/resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.d.mts +0 -18
  86. package/dist/esm/api/resources/notifications/resources/courier/client/requests/index.d.mts +0 -1
  87. package/dist/esm/api/resources/notifications/resources/courier/index.d.mts +0 -1
  88. package/dist/esm/api/resources/notifications/resources/courier/index.mjs +0 -1
  89. package/dist/esm/api/resources/notifications/resources/index.d.mts +0 -4
  90. package/dist/esm/api/resources/notifications/resources/index.mjs +0 -4
  91. package/dist/esm/api/resources/notifications/resources/shipper/client/Client.d.mts +0 -59
  92. package/dist/esm/api/resources/notifications/resources/shipper/client/Client.mjs +0 -146
  93. package/dist/esm/api/resources/notifications/resources/shipper/client/index.d.mts +0 -2
  94. package/dist/esm/api/resources/notifications/resources/shipper/client/index.mjs +0 -1
  95. package/dist/esm/api/resources/notifications/resources/shipper/client/requests/ShipperNotificationPreferencesClientCreate1.d.mts +0 -18
  96. package/dist/esm/api/resources/notifications/resources/shipper/client/requests/index.d.mts +0 -1
  97. package/dist/esm/api/resources/notifications/resources/shipper/client/requests/index.mjs +0 -1
  98. package/dist/esm/api/resources/notifications/resources/shipper/index.d.mts +0 -1
  99. package/dist/esm/api/resources/notifications/resources/shipper/index.mjs +0 -1
  100. package/dist/esm/api/resources/taskArtifactNotifications/client/Client.d.mts +0 -59
  101. package/dist/esm/api/resources/taskArtifactNotifications/client/Client.mjs +0 -149
  102. package/dist/esm/api/resources/taskArtifactNotifications/client/index.d.mts +0 -2
  103. package/dist/esm/api/resources/taskArtifactNotifications/client/index.mjs +0 -1
  104. package/dist/esm/api/resources/taskArtifactNotifications/client/requests/TaskArtifactNotificationPreferencesClientCreate1.d.mts +0 -18
  105. package/dist/esm/api/resources/taskArtifactNotifications/client/requests/TaskArtifactNotificationPreferencesClientCreate1.mjs +0 -4
  106. package/dist/esm/api/resources/taskArtifactNotifications/client/requests/index.d.mts +0 -1
  107. package/dist/esm/api/resources/taskArtifactNotifications/client/requests/index.mjs +0 -1
  108. package/dist/esm/api/resources/taskArtifactNotifications/index.d.mts +0 -1
  109. package/dist/esm/api/resources/taskArtifactNotifications/index.mjs +0 -1
  110. package/dist/esm/api/types/CourierNotificationEventEnum.d.mts +0 -7
  111. package/dist/esm/api/types/CourierNotificationEventEnum.mjs +0 -4
  112. package/dist/esm/api/types/CourierNotificationPreferences1.d.mts +0 -18
  113. package/dist/esm/api/types/CourierNotificationPreferences1.mjs +0 -4
  114. package/dist/esm/api/types/NotificationChannelEnum.d.mts +0 -13
  115. package/dist/esm/api/types/NotificationChannelEnum.mjs +0 -9
  116. package/dist/esm/api/types/ShipperNotificationEventEnum.d.mts +0 -7
  117. package/dist/esm/api/types/ShipperNotificationEventEnum.mjs +0 -4
  118. package/dist/esm/api/types/ShipperNotificationPreferences1.d.mts +0 -18
  119. package/dist/esm/api/types/ShipperNotificationPreferences1.mjs +0 -4
  120. package/dist/esm/api/types/TaskArtifactNotificationPreferences1.d.mts +0 -18
  121. package/dist/esm/api/types/TaskArtifactNotificationPreferences1.mjs +0 -4
  122. /package/dist/cjs/api/resources/notifications/{resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.js → client/requests/NotificationReq.js} +0 -0
  123. /package/dist/cjs/api/resources/notifications/{resources/courier/client → client}/requests/index.js +0 -0
  124. /package/dist/cjs/api/{resources/notifications/resources/shipper/client/requests/ShipperNotificationPreferencesClientCreate1.js → types/NotificationRes.js} +0 -0
  125. /package/dist/esm/api/resources/notifications/{resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.mjs → client/requests/NotificationReq.mjs} +0 -0
  126. /package/dist/esm/api/resources/notifications/{resources/courier/client → client}/requests/index.mjs +0 -0
  127. /package/dist/esm/api/{resources/notifications/resources/shipper/client/requests/ShipperNotificationPreferencesClientCreate1.mjs → types/NotificationRes.mjs} +0 -0
@@ -8,7 +8,7 @@ import { Connections } from "./api/resources/connections/client/Client.js";
8
8
  import { OrgProfiles } from "./api/resources/orgProfiles/client/Client.js";
9
9
  import { Dev } from "./api/resources/dev/client/Client.js";
10
10
  import { Flights } from "./api/resources/flights/client/Client.js";
11
- import { TaskArtifactNotifications } from "./api/resources/taskArtifactNotifications/client/Client.js";
11
+ import { Notifications } from "./api/resources/notifications/client/Client.js";
12
12
  import { Drivers } from "./api/resources/drivers/client/Client.js";
13
13
  import { Cargos } from "./api/resources/cargos/client/Client.js";
14
14
  import { TaskArtifacts } from "./api/resources/taskArtifacts/client/Client.js";
@@ -23,7 +23,6 @@ import { Root } from "./api/resources/root/client/Client.js";
23
23
  import { Users } from "./api/resources/users/client/Client.js";
24
24
  import { Utils } from "./api/resources/utils/client/Client.js";
25
25
  import { Billing } from "./api/resources/billing/client/Client.js";
26
- import { Notifications } from "./api/resources/notifications/client/Client.js";
27
26
  import { OrgInfoForConnections } from "./api/resources/orgInfoForConnections/client/Client.js";
28
27
  import { Tracking } from "./api/resources/tracking/client/Client.js";
29
28
  export declare namespace ChrtClient {
@@ -56,7 +55,7 @@ export declare class ChrtClient {
56
55
  protected _orgProfiles: OrgProfiles | undefined;
57
56
  protected _dev: Dev | undefined;
58
57
  protected _flights: Flights | undefined;
59
- protected _taskArtifactNotifications: TaskArtifactNotifications | undefined;
58
+ protected _notifications: Notifications | undefined;
60
59
  protected _drivers: Drivers | undefined;
61
60
  protected _cargos: Cargos | undefined;
62
61
  protected _taskArtifacts: TaskArtifacts | undefined;
@@ -71,7 +70,6 @@ export declare class ChrtClient {
71
70
  protected _users: Users | undefined;
72
71
  protected _utils: Utils | undefined;
73
72
  protected _billing: Billing | undefined;
74
- protected _notifications: Notifications | undefined;
75
73
  protected _orgInfoForConnections: OrgInfoForConnections | undefined;
76
74
  protected _tracking: Tracking | undefined;
77
75
  constructor(_options?: ChrtClient.Options);
@@ -80,7 +78,7 @@ export declare class ChrtClient {
80
78
  get orgProfiles(): OrgProfiles;
81
79
  get dev(): Dev;
82
80
  get flights(): Flights;
83
- get taskArtifactNotifications(): TaskArtifactNotifications;
81
+ get notifications(): Notifications;
84
82
  get drivers(): Drivers;
85
83
  get cargos(): Cargos;
86
84
  get taskArtifacts(): TaskArtifacts;
@@ -95,7 +93,6 @@ export declare class ChrtClient {
95
93
  get users(): Users;
96
94
  get utils(): Utils;
97
95
  get billing(): Billing;
98
- get notifications(): Notifications;
99
96
  get orgInfoForConnections(): OrgInfoForConnections;
100
97
  get tracking(): Tracking;
101
98
  }
@@ -44,7 +44,7 @@ const Client_js_2 = require("./api/resources/connections/client/Client.js");
44
44
  const Client_js_3 = require("./api/resources/orgProfiles/client/Client.js");
45
45
  const Client_js_4 = require("./api/resources/dev/client/Client.js");
46
46
  const Client_js_5 = require("./api/resources/flights/client/Client.js");
47
- const Client_js_6 = require("./api/resources/taskArtifactNotifications/client/Client.js");
47
+ const Client_js_6 = require("./api/resources/notifications/client/Client.js");
48
48
  const Client_js_7 = require("./api/resources/drivers/client/Client.js");
49
49
  const Client_js_8 = require("./api/resources/cargos/client/Client.js");
50
50
  const Client_js_9 = require("./api/resources/taskArtifacts/client/Client.js");
@@ -59,16 +59,15 @@ const Client_js_17 = require("./api/resources/root/client/Client.js");
59
59
  const Client_js_18 = require("./api/resources/users/client/Client.js");
60
60
  const Client_js_19 = require("./api/resources/utils/client/Client.js");
61
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");
62
+ const Client_js_21 = require("./api/resources/orgInfoForConnections/client/Client.js");
63
+ const Client_js_22 = require("./api/resources/tracking/client/Client.js");
65
64
  class ChrtClient {
66
65
  constructor(_options = {}) {
67
66
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
68
67
  "X-Fern-Language": "JavaScript",
69
68
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
70
- "X-Fern-SDK-Version": "1.359.0",
71
- "User-Agent": "@chrt-inc/typescript-sdk/1.359.0",
69
+ "X-Fern-SDK-Version": "1.363.0",
70
+ "User-Agent": "@chrt-inc/typescript-sdk/1.363.0",
72
71
  "X-Fern-Runtime": core.RUNTIME.type,
73
72
  "X-Fern-Runtime-Version": core.RUNTIME.version,
74
73
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -93,9 +92,9 @@ class ChrtClient {
93
92
  var _a;
94
93
  return ((_a = this._flights) !== null && _a !== void 0 ? _a : (this._flights = new Client_js_5.Flights(this._options)));
95
94
  }
96
- get taskArtifactNotifications() {
95
+ get notifications() {
97
96
  var _a;
98
- return ((_a = this._taskArtifactNotifications) !== null && _a !== void 0 ? _a : (this._taskArtifactNotifications = new Client_js_6.TaskArtifactNotifications(this._options)));
97
+ return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_6.Notifications(this._options)));
99
98
  }
100
99
  get drivers() {
101
100
  var _a;
@@ -153,17 +152,13 @@ class ChrtClient {
153
152
  var _a;
154
153
  return ((_a = this._billing) !== null && _a !== void 0 ? _a : (this._billing = new Client_js_20.Billing(this._options)));
155
154
  }
156
- get notifications() {
157
- var _a;
158
- return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_21.Notifications(this._options)));
159
- }
160
155
  get orgInfoForConnections() {
161
156
  var _a;
162
- return ((_a = this._orgInfoForConnections) !== null && _a !== void 0 ? _a : (this._orgInfoForConnections = new Client_js_22.OrgInfoForConnections(this._options)));
157
+ return ((_a = this._orgInfoForConnections) !== null && _a !== void 0 ? _a : (this._orgInfoForConnections = new Client_js_21.OrgInfoForConnections(this._options)));
163
158
  }
164
159
  get tracking() {
165
160
  var _a;
166
- return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new Client_js_23.Tracking(this._options)));
161
+ return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new Client_js_22.Tracking(this._options)));
167
162
  }
168
163
  }
169
164
  exports.ChrtClient = ChrtClient;
@@ -8,7 +8,7 @@ export * as payments from "./payments/index.js";
8
8
  export * as orgProfiles from "./orgProfiles/index.js";
9
9
  export * as dev from "./dev/index.js";
10
10
  export * as flights from "./flights/index.js";
11
- export * as taskArtifactNotifications from "./taskArtifactNotifications/index.js";
11
+ export * as notifications from "./notifications/index.js";
12
12
  export * as drivers from "./drivers/index.js";
13
13
  export * as cargos from "./cargos/index.js";
14
14
  export * as taskArtifacts from "./taskArtifacts/index.js";
@@ -19,13 +19,12 @@ export * as orgs from "./orgs/index.js";
19
19
  export * as root from "./root/index.js";
20
20
  export * as users from "./users/index.js";
21
21
  export * as utils from "./utils/index.js";
22
- export * as notifications from "./notifications/index.js";
23
22
  export * as orgInfoForConnections from "./orgInfoForConnections/index.js";
24
23
  export * as tracking from "./tracking/index.js";
25
24
  export * from "./payments/client/requests/index.js";
26
25
  export * from "./orgProfiles/client/requests/index.js";
27
26
  export * from "./dev/client/requests/index.js";
28
- export * from "./taskArtifactNotifications/client/requests/index.js";
27
+ export * from "./notifications/client/requests/index.js";
29
28
  export * from "./drivers/client/requests/index.js";
30
29
  export * from "./taskArtifacts/client/requests/index.js";
31
30
  export * from "./offChrtShipperOrg/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.tracking = exports.orgInfoForConnections = exports.notifications = exports.utils = exports.users = exports.root = exports.orgs = exports.shipperContactInfo = exports.tasks = exports.offChrtShipperOrg = exports.taskArtifacts = exports.cargos = exports.drivers = exports.taskArtifactNotifications = exports.flights = exports.dev = exports.orgProfiles = exports.payments = exports.taskGroups = exports.orders = exports.orderDrafts = exports.billing = exports.connections = void 0;
39
+ exports.tracking = exports.orgInfoForConnections = exports.utils = exports.users = exports.root = exports.orgs = exports.shipperContactInfo = exports.tasks = exports.offChrtShipperOrg = exports.taskArtifacts = exports.cargos = exports.drivers = exports.notifications = exports.flights = exports.dev = exports.orgProfiles = exports.payments = exports.taskGroups = exports.orders = exports.orderDrafts = exports.billing = exports.connections = void 0;
40
40
  exports.connections = __importStar(require("./connections/index.js"));
41
41
  __exportStar(require("./connections/types/index.js"), exports);
42
42
  exports.billing = __importStar(require("./billing/index.js"));
@@ -47,7 +47,7 @@ exports.payments = __importStar(require("./payments/index.js"));
47
47
  exports.orgProfiles = __importStar(require("./orgProfiles/index.js"));
48
48
  exports.dev = __importStar(require("./dev/index.js"));
49
49
  exports.flights = __importStar(require("./flights/index.js"));
50
- exports.taskArtifactNotifications = __importStar(require("./taskArtifactNotifications/index.js"));
50
+ exports.notifications = __importStar(require("./notifications/index.js"));
51
51
  exports.drivers = __importStar(require("./drivers/index.js"));
52
52
  exports.cargos = __importStar(require("./cargos/index.js"));
53
53
  exports.taskArtifacts = __importStar(require("./taskArtifacts/index.js"));
@@ -58,13 +58,12 @@ exports.orgs = __importStar(require("./orgs/index.js"));
58
58
  exports.root = __importStar(require("./root/index.js"));
59
59
  exports.users = __importStar(require("./users/index.js"));
60
60
  exports.utils = __importStar(require("./utils/index.js"));
61
- exports.notifications = __importStar(require("./notifications/index.js"));
62
61
  exports.orgInfoForConnections = __importStar(require("./orgInfoForConnections/index.js"));
63
62
  exports.tracking = __importStar(require("./tracking/index.js"));
64
63
  __exportStar(require("./payments/client/requests/index.js"), exports);
65
64
  __exportStar(require("./orgProfiles/client/requests/index.js"), exports);
66
65
  __exportStar(require("./dev/client/requests/index.js"), exports);
67
- __exportStar(require("./taskArtifactNotifications/client/requests/index.js"), exports);
66
+ __exportStar(require("./notifications/client/requests/index.js"), exports);
68
67
  __exportStar(require("./drivers/client/requests/index.js"), exports);
69
68
  __exportStar(require("./taskArtifacts/client/requests/index.js"), exports);
70
69
  __exportStar(require("./offChrtShipperOrg/client/requests/index.js"), exports);
@@ -3,8 +3,7 @@
3
3
  */
4
4
  import * as environments from "../../../../environments.js";
5
5
  import * as core from "../../../../core/index.js";
6
- import { Shipper } from "../resources/shipper/client/Client.js";
7
- import { Courier } from "../resources/courier/client/Client.js";
6
+ import * as Chrt from "../../../index.js";
8
7
  export declare namespace Notifications {
9
8
  interface Options {
10
9
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -15,12 +14,48 @@ export declare namespace Notifications {
15
14
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
16
15
  fetcher?: core.FetchFunction;
17
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
+ }
18
29
  }
19
30
  export declare class Notifications {
20
31
  protected readonly _options: Notifications.Options;
21
- protected _shipper: Shipper | undefined;
22
- protected _courier: Courier | undefined;
23
32
  constructor(_options?: Notifications.Options);
24
- get shipper(): Shipper;
25
- get courier(): Courier;
33
+ /**
34
+ * Development notification endpoint that returns the caller's ID for testing. | () -> (str)
35
+ *
36
+ * @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
37
+ *
38
+ * @example
39
+ * await client.notifications.getNotificationV1()
40
+ */
41
+ getNotificationV1(requestOptions?: Notifications.RequestOptions): core.HttpResponsePromise<string>;
42
+ private __getNotificationV1;
43
+ /**
44
+ * Send a notification email to a chrt.com recipient. | (NotificationReq) -> (NotificationRes)
45
+ *
46
+ * @param {Chrt.NotificationReq} request
47
+ * @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
48
+ *
49
+ * @throws {@link Chrt.UnprocessableEntityError}
50
+ *
51
+ * @example
52
+ * await client.notifications.createNotificationV1({
53
+ * recipient: "aaron",
54
+ * name: "name",
55
+ * message: "message"
56
+ * })
57
+ */
58
+ createNotificationV1(request: Chrt.NotificationReq, requestOptions?: Notifications.RequestOptions): core.HttpResponsePromise<Chrt.NotificationRes>;
59
+ private __createNotificationV1;
60
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
26
61
  }
@@ -2,21 +2,184 @@
2
2
  /**
3
3
  * This file was auto-generated by Fern from our API Definition.
4
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
+ };
5
47
  Object.defineProperty(exports, "__esModule", { value: true });
6
48
  exports.Notifications = void 0;
7
- const Client_js_1 = require("../resources/shipper/client/Client.js");
8
- const Client_js_2 = require("../resources/courier/client/Client.js");
49
+ const environments = __importStar(require("../../../../environments.js"));
50
+ const core = __importStar(require("../../../../core/index.js"));
51
+ const headers_js_1 = require("../../../../core/headers.js");
52
+ const errors = __importStar(require("../../../../errors/index.js"));
53
+ const Chrt = __importStar(require("../../../index.js"));
9
54
  class Notifications {
10
55
  constructor(_options = {}) {
11
56
  this._options = _options;
12
57
  }
13
- get shipper() {
14
- var _a;
15
- return ((_a = this._shipper) !== null && _a !== void 0 ? _a : (this._shipper = new Client_js_1.Shipper(this._options)));
58
+ /**
59
+ * Development notification endpoint that returns the caller's ID for testing. | () -> (str)
60
+ *
61
+ * @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
62
+ *
63
+ * @example
64
+ * await client.notifications.getNotificationV1()
65
+ */
66
+ getNotificationV1(requestOptions) {
67
+ return core.HttpResponsePromise.fromPromise(this.__getNotificationV1(requestOptions));
68
+ }
69
+ __getNotificationV1(requestOptions) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ var _a, _b, _c, _d;
72
+ 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);
73
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
74
+ 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, "notifications/v1"),
75
+ method: "GET",
76
+ headers: _headers,
77
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
78
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
79
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
80
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
81
+ });
82
+ if (_response.ok) {
83
+ return { data: _response.body, rawResponse: _response.rawResponse };
84
+ }
85
+ if (_response.error.reason === "status-code") {
86
+ throw new errors.ChrtError({
87
+ statusCode: _response.error.statusCode,
88
+ body: _response.error.body,
89
+ rawResponse: _response.rawResponse,
90
+ });
91
+ }
92
+ switch (_response.error.reason) {
93
+ case "non-json":
94
+ throw new errors.ChrtError({
95
+ statusCode: _response.error.statusCode,
96
+ body: _response.error.rawBody,
97
+ rawResponse: _response.rawResponse,
98
+ });
99
+ case "timeout":
100
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /notifications/v1.");
101
+ case "unknown":
102
+ throw new errors.ChrtError({
103
+ message: _response.error.errorMessage,
104
+ rawResponse: _response.rawResponse,
105
+ });
106
+ }
107
+ });
108
+ }
109
+ /**
110
+ * Send a notification email to a chrt.com recipient. | (NotificationReq) -> (NotificationRes)
111
+ *
112
+ * @param {Chrt.NotificationReq} request
113
+ * @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
114
+ *
115
+ * @throws {@link Chrt.UnprocessableEntityError}
116
+ *
117
+ * @example
118
+ * await client.notifications.createNotificationV1({
119
+ * recipient: "aaron",
120
+ * name: "name",
121
+ * message: "message"
122
+ * })
123
+ */
124
+ createNotificationV1(request, requestOptions) {
125
+ return core.HttpResponsePromise.fromPromise(this.__createNotificationV1(request, requestOptions));
126
+ }
127
+ __createNotificationV1(request, requestOptions) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ var _a, _b, _c, _d;
130
+ 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);
131
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
132
+ 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, "notifications/v1"),
133
+ method: "POST",
134
+ headers: _headers,
135
+ contentType: "application/json",
136
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
137
+ requestType: "json",
138
+ body: request,
139
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
140
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
141
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
142
+ });
143
+ if (_response.ok) {
144
+ return { data: _response.body, rawResponse: _response.rawResponse };
145
+ }
146
+ if (_response.error.reason === "status-code") {
147
+ switch (_response.error.statusCode) {
148
+ case 422:
149
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
150
+ default:
151
+ throw new errors.ChrtError({
152
+ statusCode: _response.error.statusCode,
153
+ body: _response.error.body,
154
+ rawResponse: _response.rawResponse,
155
+ });
156
+ }
157
+ }
158
+ switch (_response.error.reason) {
159
+ case "non-json":
160
+ throw new errors.ChrtError({
161
+ statusCode: _response.error.statusCode,
162
+ body: _response.error.rawBody,
163
+ rawResponse: _response.rawResponse,
164
+ });
165
+ case "timeout":
166
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /notifications/v1.");
167
+ case "unknown":
168
+ throw new errors.ChrtError({
169
+ message: _response.error.errorMessage,
170
+ rawResponse: _response.rawResponse,
171
+ });
172
+ }
173
+ });
16
174
  }
17
- get courier() {
18
- var _a;
19
- return ((_a = this._courier) !== null && _a !== void 0 ? _a : (this._courier = new Client_js_2.Courier(this._options)));
175
+ _getAuthorizationHeader() {
176
+ return __awaiter(this, void 0, void 0, function* () {
177
+ const bearer = yield core.Supplier.get(this._options.token);
178
+ if (bearer != null) {
179
+ return `Bearer ${bearer}`;
180
+ }
181
+ return undefined;
182
+ });
20
183
  }
21
184
  }
22
185
  exports.Notifications = Notifications;
@@ -1 +1,2 @@
1
1
  export {};
2
+ export * from "./requests/index.js";
@@ -1,2 +1,17 @@
1
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
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,17 @@
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
+ * recipient: "aaron",
9
+ * name: "name",
10
+ * message: "message"
11
+ * }
12
+ */
13
+ export interface NotificationReq {
14
+ recipient: Chrt.ChrtEmailRecipient;
15
+ name: string;
16
+ message: string;
17
+ }
@@ -0,0 +1 @@
1
+ export { type NotificationReq } from "./NotificationReq.js";
@@ -1,2 +1 @@
1
1
  export * from "./client/index.js";
2
- export * from "./resources/index.js";
@@ -15,4 +15,3 @@ 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,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type ChrtEmailRecipient = "aaron" | "paul" | "kyle" | "philip";
5
+ export declare const ChrtEmailRecipient: {
6
+ readonly Aaron: "aaron";
7
+ readonly Paul: "paul";
8
+ readonly Kyle: "kyle";
9
+ readonly Philip: "philip";
10
+ };
@@ -3,3 +3,10 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ChrtEmailRecipient = void 0;
7
+ exports.ChrtEmailRecipient = {
8
+ Aaron: "aaron",
9
+ Paul: "paul",
10
+ Kyle: "kyle",
11
+ Philip: "philip",
12
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface NotificationRes {
5
+ success: boolean;
6
+ name: string;
7
+ message: string;
8
+ recipient: string;
9
+ request_id: string;
10
+ }
@@ -10,11 +10,10 @@ export * from "./CargoClientCreate1.js";
10
10
  export * from "./CargoClientUpdate1.js";
11
11
  export * from "./CargoStatusEnum1.js";
12
12
  export * from "./CargoTypeEnum1.js";
13
+ export * from "./ChrtEmailRecipient.js";
13
14
  export * from "./ChrtGroundCourierTaskActionEnum1.js";
14
15
  export * from "./ClerkOrgData.js";
15
16
  export * from "./CourierConnectionRes.js";
16
- export * from "./CourierNotificationEventEnum.js";
17
- export * from "./CourierNotificationPreferences1.js";
18
17
  export * from "./CourierOrgInfoForConnections1.js";
19
18
  export * from "./CourierOrgProfile1.js";
20
19
  export * from "./CreateCheckoutSessionRes.js";
@@ -51,7 +50,7 @@ export * from "./LocationProperties.js";
51
50
  export * from "./MultiLineString.js";
52
51
  export * from "./MultiPoint.js";
53
52
  export * from "./MultiPolygon.js";
54
- export * from "./NotificationChannelEnum.js";
53
+ export * from "./NotificationRes.js";
55
54
  export * from "./OffChrtShipperOrg1.js";
56
55
  export * from "./OnboardCourierTaskActionEnum1.js";
57
56
  export * from "./Order1.js";
@@ -97,8 +96,6 @@ export * from "./ShipperContact1.js";
97
96
  export * from "./ShipperContactClientCreate1.js";
98
97
  export * from "./ShipperCourierConnection1.js";
99
98
  export * from "./ShipperForwarderConnection1.js";
100
- export * from "./ShipperNotificationEventEnum.js";
101
- export * from "./ShipperNotificationPreferences1.js";
102
99
  export * from "./ShipperOrgInfoForConnections1.js";
103
100
  export * from "./SortOrderEnum.js";
104
101
  export * from "./Statement1.js";
@@ -111,7 +108,6 @@ export * from "./StripeConnectInvoiceStatusEnum.js";
111
108
  export * from "./Task1.js";
112
109
  export * from "./TaskArtifact1.js";
113
110
  export * from "./TaskArtifactClientCreate1.js";
114
- export * from "./TaskArtifactNotificationPreferences1.js";
115
111
  export * from "./TaskArtifactS3ObjectMetadata1.js";
116
112
  export * from "./TaskArtifactStatusEnum1.js";
117
113
  export * from "./TaskArtifactTypeEnum1.js";
@@ -26,11 +26,10 @@ __exportStar(require("./CargoClientCreate1.js"), exports);
26
26
  __exportStar(require("./CargoClientUpdate1.js"), exports);
27
27
  __exportStar(require("./CargoStatusEnum1.js"), exports);
28
28
  __exportStar(require("./CargoTypeEnum1.js"), exports);
29
+ __exportStar(require("./ChrtEmailRecipient.js"), exports);
29
30
  __exportStar(require("./ChrtGroundCourierTaskActionEnum1.js"), exports);
30
31
  __exportStar(require("./ClerkOrgData.js"), exports);
31
32
  __exportStar(require("./CourierConnectionRes.js"), exports);
32
- __exportStar(require("./CourierNotificationEventEnum.js"), exports);
33
- __exportStar(require("./CourierNotificationPreferences1.js"), exports);
34
33
  __exportStar(require("./CourierOrgInfoForConnections1.js"), exports);
35
34
  __exportStar(require("./CourierOrgProfile1.js"), exports);
36
35
  __exportStar(require("./CreateCheckoutSessionRes.js"), exports);
@@ -67,7 +66,7 @@ __exportStar(require("./LocationProperties.js"), exports);
67
66
  __exportStar(require("./MultiLineString.js"), exports);
68
67
  __exportStar(require("./MultiPoint.js"), exports);
69
68
  __exportStar(require("./MultiPolygon.js"), exports);
70
- __exportStar(require("./NotificationChannelEnum.js"), exports);
69
+ __exportStar(require("./NotificationRes.js"), exports);
71
70
  __exportStar(require("./OffChrtShipperOrg1.js"), exports);
72
71
  __exportStar(require("./OnboardCourierTaskActionEnum1.js"), exports);
73
72
  __exportStar(require("./Order1.js"), exports);
@@ -113,8 +112,6 @@ __exportStar(require("./ShipperContact1.js"), exports);
113
112
  __exportStar(require("./ShipperContactClientCreate1.js"), exports);
114
113
  __exportStar(require("./ShipperCourierConnection1.js"), exports);
115
114
  __exportStar(require("./ShipperForwarderConnection1.js"), exports);
116
- __exportStar(require("./ShipperNotificationEventEnum.js"), exports);
117
- __exportStar(require("./ShipperNotificationPreferences1.js"), exports);
118
115
  __exportStar(require("./ShipperOrgInfoForConnections1.js"), exports);
119
116
  __exportStar(require("./SortOrderEnum.js"), exports);
120
117
  __exportStar(require("./Statement1.js"), exports);
@@ -127,7 +124,6 @@ __exportStar(require("./StripeConnectInvoiceStatusEnum.js"), exports);
127
124
  __exportStar(require("./Task1.js"), exports);
128
125
  __exportStar(require("./TaskArtifact1.js"), exports);
129
126
  __exportStar(require("./TaskArtifactClientCreate1.js"), exports);
130
- __exportStar(require("./TaskArtifactNotificationPreferences1.js"), exports);
131
127
  __exportStar(require("./TaskArtifactS3ObjectMetadata1.js"), exports);
132
128
  __exportStar(require("./TaskArtifactStatusEnum1.js"), exports);
133
129
  __exportStar(require("./TaskArtifactTypeEnum1.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.359.0";
1
+ export declare const SDK_VERSION = "1.363.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.359.0";
4
+ exports.SDK_VERSION = "1.363.0";