@chrt-inc/typescript-sdk 0.0.170-d → 0.0.170-f

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 (70) hide show
  1. package/dist/cjs/Client.d.ts +3 -6
  2. package/dist/cjs/Client.js +39 -44
  3. package/dist/cjs/api/resources/index.d.ts +1 -4
  4. package/dist/cjs/api/resources/index.js +2 -5
  5. package/dist/cjs/api/resources/notifications/client/Client.d.ts +6 -37
  6. package/dist/cjs/api/resources/notifications/client/Client.js +8 -165
  7. package/dist/cjs/api/resources/notifications/client/index.d.ts +0 -1
  8. package/dist/cjs/api/resources/notifications/client/index.js +0 -15
  9. package/dist/cjs/api/resources/notifications/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/notifications/index.js +1 -0
  11. package/dist/cjs/api/resources/{notificationsShipper → notifications/resources/courier}/client/Client.d.ts +14 -14
  12. package/dist/cjs/api/resources/notifications/resources/courier/client/Client.js +179 -0
  13. package/dist/cjs/api/resources/notifications/{client → resources/courier/client}/requests/CourierNotificationPreferencesClientCreate1.d.ts +1 -1
  14. package/dist/cjs/api/resources/notifications/resources/index.d.ts +4 -0
  15. package/dist/cjs/api/resources/notifications/resources/index.js +43 -0
  16. package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.d.ts +57 -0
  17. package/dist/cjs/api/resources/{notificationsShipper → notifications/resources/shipper}/client/Client.js +13 -13
  18. package/dist/cjs/api/resources/notifications/resources/shipper/client/index.d.ts +2 -0
  19. package/dist/cjs/api/resources/notifications/resources/shipper/client/index.js +17 -0
  20. package/dist/cjs/api/resources/{notificationsShipper → notifications/resources/shipper}/client/requests/ShipperNotificationPreferencesClientCreate1.d.ts +1 -1
  21. package/dist/cjs/api/resources/notifications/resources/shipper/index.d.ts +1 -0
  22. package/dist/cjs/api/resources/notifications/resources/shipper/index.js +17 -0
  23. package/dist/cjs/version.d.ts +1 -1
  24. package/dist/cjs/version.js +1 -1
  25. package/dist/esm/Client.d.mts +3 -6
  26. package/dist/esm/Client.mjs +7 -12
  27. package/dist/esm/api/resources/index.d.mts +1 -4
  28. package/dist/esm/api/resources/index.mjs +1 -4
  29. package/dist/esm/api/resources/notifications/client/Client.d.mts +6 -37
  30. package/dist/esm/api/resources/notifications/client/Client.mjs +8 -132
  31. package/dist/esm/api/resources/notifications/client/index.d.mts +0 -1
  32. package/dist/esm/api/resources/notifications/client/index.mjs +1 -1
  33. package/dist/esm/api/resources/notifications/index.d.mts +1 -0
  34. package/dist/esm/api/resources/notifications/index.mjs +1 -0
  35. package/dist/esm/api/resources/{notificationsShipper → notifications/resources/courier}/client/Client.d.mts +14 -14
  36. package/dist/esm/api/resources/notifications/resources/courier/client/Client.mjs +142 -0
  37. package/dist/esm/api/resources/notifications/{client → resources/courier/client}/requests/CourierNotificationPreferencesClientCreate1.d.mts +1 -1
  38. package/dist/esm/api/resources/notifications/resources/index.d.mts +4 -0
  39. package/dist/esm/api/resources/notifications/resources/index.mjs +4 -0
  40. package/dist/esm/api/resources/notifications/resources/shipper/client/Client.d.mts +57 -0
  41. package/dist/esm/api/resources/{notificationsShipper → notifications/resources/shipper}/client/Client.mjs +11 -11
  42. package/dist/esm/api/resources/notifications/resources/shipper/client/index.d.mts +2 -0
  43. package/dist/esm/api/resources/notifications/resources/shipper/client/index.mjs +1 -0
  44. package/dist/esm/api/resources/{notificationsShipper → notifications/resources/shipper}/client/requests/ShipperNotificationPreferencesClientCreate1.d.mts +1 -1
  45. package/dist/esm/api/resources/notifications/resources/shipper/index.d.mts +1 -0
  46. package/dist/esm/api/resources/notifications/resources/shipper/index.mjs +1 -0
  47. package/dist/esm/version.d.mts +1 -1
  48. package/dist/esm/version.mjs +1 -1
  49. package/package.json +1 -1
  50. package/reference.md +244 -244
  51. /package/dist/cjs/api/resources/{notificationsShipper → notifications/resources/courier}/client/index.d.ts +0 -0
  52. /package/dist/cjs/api/resources/{notificationsShipper → notifications/resources/courier}/client/index.js +0 -0
  53. /package/dist/cjs/api/resources/notifications/{client → resources/courier/client}/requests/CourierNotificationPreferencesClientCreate1.js +0 -0
  54. /package/dist/cjs/api/resources/notifications/{client → resources/courier/client}/requests/index.d.ts +0 -0
  55. /package/dist/cjs/api/resources/notifications/{client → resources/courier/client}/requests/index.js +0 -0
  56. /package/dist/cjs/api/resources/{notificationsShipper → notifications/resources/courier}/index.d.ts +0 -0
  57. /package/dist/cjs/api/resources/{notificationsShipper → notifications/resources/courier}/index.js +0 -0
  58. /package/dist/cjs/api/resources/{notificationsShipper → notifications/resources/shipper}/client/requests/ShipperNotificationPreferencesClientCreate1.js +0 -0
  59. /package/dist/cjs/api/resources/{notificationsShipper → notifications/resources/shipper}/client/requests/index.d.ts +0 -0
  60. /package/dist/cjs/api/resources/{notificationsShipper → notifications/resources/shipper}/client/requests/index.js +0 -0
  61. /package/dist/esm/api/resources/{notificationsShipper → notifications/resources/courier}/client/index.d.mts +0 -0
  62. /package/dist/esm/api/resources/{notificationsShipper → notifications/resources/courier}/client/index.mjs +0 -0
  63. /package/dist/esm/api/resources/notifications/{client → resources/courier/client}/requests/CourierNotificationPreferencesClientCreate1.mjs +0 -0
  64. /package/dist/esm/api/resources/notifications/{client → resources/courier/client}/requests/index.d.mts +0 -0
  65. /package/dist/esm/api/resources/notifications/{client → resources/courier/client}/requests/index.mjs +0 -0
  66. /package/dist/esm/api/resources/{notificationsShipper → notifications/resources/courier}/index.d.mts +0 -0
  67. /package/dist/esm/api/resources/{notificationsShipper → notifications/resources/courier}/index.mjs +0 -0
  68. /package/dist/esm/api/resources/{notificationsShipper → notifications/resources/shipper}/client/requests/ShipperNotificationPreferencesClientCreate1.mjs +0 -0
  69. /package/dist/esm/api/resources/{notificationsShipper → notifications/resources/shipper}/client/requests/index.d.mts +0 -0
  70. /package/dist/esm/api/resources/{notificationsShipper → notifications/resources/shipper}/client/requests/index.mjs +0 -0
@@ -6,8 +6,6 @@ import * as core from "./core/index.js";
6
6
  import { Root } from "./api/resources/root/client/Client.js";
7
7
  import { Dev } from "./api/resources/dev/client/Client.js";
8
8
  import { Directory } from "./api/resources/directory/client/Client.js";
9
- import { Notifications } from "./api/resources/notifications/client/Client.js";
10
- import { NotificationsShipper } from "./api/resources/notificationsShipper/client/Client.js";
11
9
  import { OortConnections } from "./api/resources/oortConnections/client/Client.js";
12
10
  import { OortCourierPayDriverLineItemGroups } from "./api/resources/oortCourierPayDriverLineItemGroups/client/Client.js";
13
11
  import { OortCourierPayDriverPayouts } from "./api/resources/oortCourierPayDriverPayouts/client/Client.js";
@@ -24,6 +22,7 @@ import { OortTaskGroups } from "./api/resources/oortTaskGroups/client/Client.js"
24
22
  import { Orgs } from "./api/resources/orgs/client/Client.js";
25
23
  import { Payments } from "./api/resources/payments/client/Client.js";
26
24
  import { Users } from "./api/resources/users/client/Client.js";
25
+ import { Notifications } from "./api/resources/notifications/client/Client.js";
27
26
  export declare namespace ChrtClient {
28
27
  interface Options {
29
28
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -50,8 +49,6 @@ export declare class ChrtClient {
50
49
  protected _root: Root | undefined;
51
50
  protected _dev: Dev | undefined;
52
51
  protected _directory: Directory | undefined;
53
- protected _notifications: Notifications | undefined;
54
- protected _notificationsShipper: NotificationsShipper | undefined;
55
52
  protected _oortConnections: OortConnections | undefined;
56
53
  protected _oortCourierPayDriverLineItemGroups: OortCourierPayDriverLineItemGroups | undefined;
57
54
  protected _oortCourierPayDriverPayouts: OortCourierPayDriverPayouts | undefined;
@@ -68,12 +65,11 @@ export declare class ChrtClient {
68
65
  protected _orgs: Orgs | undefined;
69
66
  protected _payments: Payments | undefined;
70
67
  protected _users: Users | undefined;
68
+ protected _notifications: Notifications | undefined;
71
69
  constructor(_options?: ChrtClient.Options);
72
70
  get root(): Root;
73
71
  get dev(): Dev;
74
72
  get directory(): Directory;
75
- get notifications(): Notifications;
76
- get notificationsShipper(): NotificationsShipper;
77
73
  get oortConnections(): OortConnections;
78
74
  get oortCourierPayDriverLineItemGroups(): OortCourierPayDriverLineItemGroups;
79
75
  get oortCourierPayDriverPayouts(): OortCourierPayDriverPayouts;
@@ -90,4 +86,5 @@ export declare class ChrtClient {
90
86
  get orgs(): Orgs;
91
87
  get payments(): Payments;
92
88
  get users(): Users;
89
+ get notifications(): Notifications;
93
90
  }
@@ -42,31 +42,30 @@ const headers_js_1 = require("./core/headers.js");
42
42
  const Client_js_1 = require("./api/resources/root/client/Client.js");
43
43
  const Client_js_2 = require("./api/resources/dev/client/Client.js");
44
44
  const Client_js_3 = require("./api/resources/directory/client/Client.js");
45
- const Client_js_4 = require("./api/resources/notifications/client/Client.js");
46
- const Client_js_5 = require("./api/resources/notificationsShipper/client/Client.js");
47
- const Client_js_6 = require("./api/resources/oortConnections/client/Client.js");
48
- const Client_js_7 = require("./api/resources/oortCourierPayDriverLineItemGroups/client/Client.js");
49
- const Client_js_8 = require("./api/resources/oortCourierPayDriverPayouts/client/Client.js");
50
- const Client_js_9 = require("./api/resources/oortCourierPayDriverRateSheets/client/Client.js");
51
- const Client_js_10 = require("./api/resources/oortDrivers/client/Client.js");
52
- const Client_js_11 = require("./api/resources/oortMilestoneNotificationPreferences/client/Client.js");
53
- const Client_js_12 = require("./api/resources/oortMilestones/client/Client.js");
54
- const Client_js_13 = require("./api/resources/oortOffChrtShipperOrgConnectionInfo/client/Client.js");
55
- const Client_js_14 = require("./api/resources/oortOrders/client/Client.js");
56
- const Client_js_15 = require("./api/resources/oortOrgConnectionInfos/client/Client.js");
57
- const Client_js_16 = require("./api/resources/oortOrgProfiles/client/Client.js");
58
- const Client_js_17 = require("./api/resources/oortShipperContactInfo/client/Client.js");
59
- const Client_js_18 = require("./api/resources/oortTaskGroups/client/Client.js");
60
- const Client_js_19 = require("./api/resources/orgs/client/Client.js");
61
- const Client_js_20 = require("./api/resources/payments/client/Client.js");
62
- const Client_js_21 = require("./api/resources/users/client/Client.js");
45
+ const Client_js_4 = require("./api/resources/oortConnections/client/Client.js");
46
+ const Client_js_5 = require("./api/resources/oortCourierPayDriverLineItemGroups/client/Client.js");
47
+ const Client_js_6 = require("./api/resources/oortCourierPayDriverPayouts/client/Client.js");
48
+ const Client_js_7 = require("./api/resources/oortCourierPayDriverRateSheets/client/Client.js");
49
+ const Client_js_8 = require("./api/resources/oortDrivers/client/Client.js");
50
+ const Client_js_9 = require("./api/resources/oortMilestoneNotificationPreferences/client/Client.js");
51
+ const Client_js_10 = require("./api/resources/oortMilestones/client/Client.js");
52
+ const Client_js_11 = require("./api/resources/oortOffChrtShipperOrgConnectionInfo/client/Client.js");
53
+ const Client_js_12 = require("./api/resources/oortOrders/client/Client.js");
54
+ const Client_js_13 = require("./api/resources/oortOrgConnectionInfos/client/Client.js");
55
+ const Client_js_14 = require("./api/resources/oortOrgProfiles/client/Client.js");
56
+ const Client_js_15 = require("./api/resources/oortShipperContactInfo/client/Client.js");
57
+ const Client_js_16 = require("./api/resources/oortTaskGroups/client/Client.js");
58
+ const Client_js_17 = require("./api/resources/orgs/client/Client.js");
59
+ const Client_js_18 = require("./api/resources/payments/client/Client.js");
60
+ const Client_js_19 = require("./api/resources/users/client/Client.js");
61
+ const Client_js_20 = require("./api/resources/notifications/client/Client.js");
63
62
  class ChrtClient {
64
63
  constructor(_options = {}) {
65
64
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
66
65
  "X-Fern-Language": "JavaScript",
67
66
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
68
- "X-Fern-SDK-Version": "0.0.170-d",
69
- "User-Agent": "@chrt-inc/typescript-sdk/0.0.170-d",
67
+ "X-Fern-SDK-Version": "0.0.170-f",
68
+ "User-Agent": "@chrt-inc/typescript-sdk/0.0.170-f",
70
69
  "X-Fern-Runtime": core.RUNTIME.type,
71
70
  "X-Fern-Runtime-Version": core.RUNTIME.version,
72
71
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -83,77 +82,73 @@ class ChrtClient {
83
82
  var _a;
84
83
  return ((_a = this._directory) !== null && _a !== void 0 ? _a : (this._directory = new Client_js_3.Directory(this._options)));
85
84
  }
86
- get notifications() {
87
- var _a;
88
- return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_4.Notifications(this._options)));
89
- }
90
- get notificationsShipper() {
91
- var _a;
92
- return ((_a = this._notificationsShipper) !== null && _a !== void 0 ? _a : (this._notificationsShipper = new Client_js_5.NotificationsShipper(this._options)));
93
- }
94
85
  get oortConnections() {
95
86
  var _a;
96
- return ((_a = this._oortConnections) !== null && _a !== void 0 ? _a : (this._oortConnections = new Client_js_6.OortConnections(this._options)));
87
+ return ((_a = this._oortConnections) !== null && _a !== void 0 ? _a : (this._oortConnections = new Client_js_4.OortConnections(this._options)));
97
88
  }
98
89
  get oortCourierPayDriverLineItemGroups() {
99
90
  var _a;
100
- return ((_a = this._oortCourierPayDriverLineItemGroups) !== null && _a !== void 0 ? _a : (this._oortCourierPayDriverLineItemGroups = new Client_js_7.OortCourierPayDriverLineItemGroups(this._options)));
91
+ return ((_a = this._oortCourierPayDriverLineItemGroups) !== null && _a !== void 0 ? _a : (this._oortCourierPayDriverLineItemGroups = new Client_js_5.OortCourierPayDriverLineItemGroups(this._options)));
101
92
  }
102
93
  get oortCourierPayDriverPayouts() {
103
94
  var _a;
104
- return ((_a = this._oortCourierPayDriverPayouts) !== null && _a !== void 0 ? _a : (this._oortCourierPayDriverPayouts = new Client_js_8.OortCourierPayDriverPayouts(this._options)));
95
+ return ((_a = this._oortCourierPayDriverPayouts) !== null && _a !== void 0 ? _a : (this._oortCourierPayDriverPayouts = new Client_js_6.OortCourierPayDriverPayouts(this._options)));
105
96
  }
106
97
  get oortCourierPayDriverRateSheets() {
107
98
  var _a;
108
- return ((_a = this._oortCourierPayDriverRateSheets) !== null && _a !== void 0 ? _a : (this._oortCourierPayDriverRateSheets = new Client_js_9.OortCourierPayDriverRateSheets(this._options)));
99
+ return ((_a = this._oortCourierPayDriverRateSheets) !== null && _a !== void 0 ? _a : (this._oortCourierPayDriverRateSheets = new Client_js_7.OortCourierPayDriverRateSheets(this._options)));
109
100
  }
110
101
  get oortDrivers() {
111
102
  var _a;
112
- return ((_a = this._oortDrivers) !== null && _a !== void 0 ? _a : (this._oortDrivers = new Client_js_10.OortDrivers(this._options)));
103
+ return ((_a = this._oortDrivers) !== null && _a !== void 0 ? _a : (this._oortDrivers = new Client_js_8.OortDrivers(this._options)));
113
104
  }
114
105
  get oortMilestoneNotificationPreferences() {
115
106
  var _a;
116
- return ((_a = this._oortMilestoneNotificationPreferences) !== null && _a !== void 0 ? _a : (this._oortMilestoneNotificationPreferences = new Client_js_11.OortMilestoneNotificationPreferences(this._options)));
107
+ return ((_a = this._oortMilestoneNotificationPreferences) !== null && _a !== void 0 ? _a : (this._oortMilestoneNotificationPreferences = new Client_js_9.OortMilestoneNotificationPreferences(this._options)));
117
108
  }
118
109
  get oortMilestones() {
119
110
  var _a;
120
- return ((_a = this._oortMilestones) !== null && _a !== void 0 ? _a : (this._oortMilestones = new Client_js_12.OortMilestones(this._options)));
111
+ return ((_a = this._oortMilestones) !== null && _a !== void 0 ? _a : (this._oortMilestones = new Client_js_10.OortMilestones(this._options)));
121
112
  }
122
113
  get oortOffChrtShipperOrgConnectionInfo() {
123
114
  var _a;
124
- return ((_a = this._oortOffChrtShipperOrgConnectionInfo) !== null && _a !== void 0 ? _a : (this._oortOffChrtShipperOrgConnectionInfo = new Client_js_13.OortOffChrtShipperOrgConnectionInfo(this._options)));
115
+ return ((_a = this._oortOffChrtShipperOrgConnectionInfo) !== null && _a !== void 0 ? _a : (this._oortOffChrtShipperOrgConnectionInfo = new Client_js_11.OortOffChrtShipperOrgConnectionInfo(this._options)));
125
116
  }
126
117
  get oortOrders() {
127
118
  var _a;
128
- return ((_a = this._oortOrders) !== null && _a !== void 0 ? _a : (this._oortOrders = new Client_js_14.OortOrders(this._options)));
119
+ return ((_a = this._oortOrders) !== null && _a !== void 0 ? _a : (this._oortOrders = new Client_js_12.OortOrders(this._options)));
129
120
  }
130
121
  get oortOrgConnectionInfos() {
131
122
  var _a;
132
- return ((_a = this._oortOrgConnectionInfos) !== null && _a !== void 0 ? _a : (this._oortOrgConnectionInfos = new Client_js_15.OortOrgConnectionInfos(this._options)));
123
+ return ((_a = this._oortOrgConnectionInfos) !== null && _a !== void 0 ? _a : (this._oortOrgConnectionInfos = new Client_js_13.OortOrgConnectionInfos(this._options)));
133
124
  }
134
125
  get oortOrgProfiles() {
135
126
  var _a;
136
- return ((_a = this._oortOrgProfiles) !== null && _a !== void 0 ? _a : (this._oortOrgProfiles = new Client_js_16.OortOrgProfiles(this._options)));
127
+ return ((_a = this._oortOrgProfiles) !== null && _a !== void 0 ? _a : (this._oortOrgProfiles = new Client_js_14.OortOrgProfiles(this._options)));
137
128
  }
138
129
  get oortShipperContactInfo() {
139
130
  var _a;
140
- return ((_a = this._oortShipperContactInfo) !== null && _a !== void 0 ? _a : (this._oortShipperContactInfo = new Client_js_17.OortShipperContactInfo(this._options)));
131
+ return ((_a = this._oortShipperContactInfo) !== null && _a !== void 0 ? _a : (this._oortShipperContactInfo = new Client_js_15.OortShipperContactInfo(this._options)));
141
132
  }
142
133
  get oortTaskGroups() {
143
134
  var _a;
144
- return ((_a = this._oortTaskGroups) !== null && _a !== void 0 ? _a : (this._oortTaskGroups = new Client_js_18.OortTaskGroups(this._options)));
135
+ return ((_a = this._oortTaskGroups) !== null && _a !== void 0 ? _a : (this._oortTaskGroups = new Client_js_16.OortTaskGroups(this._options)));
145
136
  }
146
137
  get orgs() {
147
138
  var _a;
148
- return ((_a = this._orgs) !== null && _a !== void 0 ? _a : (this._orgs = new Client_js_19.Orgs(this._options)));
139
+ return ((_a = this._orgs) !== null && _a !== void 0 ? _a : (this._orgs = new Client_js_17.Orgs(this._options)));
149
140
  }
150
141
  get payments() {
151
142
  var _a;
152
- return ((_a = this._payments) !== null && _a !== void 0 ? _a : (this._payments = new Client_js_20.Payments(this._options)));
143
+ return ((_a = this._payments) !== null && _a !== void 0 ? _a : (this._payments = new Client_js_18.Payments(this._options)));
153
144
  }
154
145
  get users() {
155
146
  var _a;
156
- return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_21.Users(this._options)));
147
+ return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_19.Users(this._options)));
148
+ }
149
+ get notifications() {
150
+ var _a;
151
+ return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_20.Notifications(this._options)));
157
152
  }
158
153
  }
159
154
  exports.ChrtClient = ChrtClient;
@@ -2,8 +2,6 @@ export * as root from "./root/index.js";
2
2
  export * from "./root/types/index.js";
3
3
  export * as dev from "./dev/index.js";
4
4
  export * as directory from "./directory/index.js";
5
- export * as notifications from "./notifications/index.js";
6
- export * as notificationsShipper from "./notificationsShipper/index.js";
7
5
  export * as oortConnections from "./oortConnections/index.js";
8
6
  export * as oortCourierPayDriverLineItemGroups from "./oortCourierPayDriverLineItemGroups/index.js";
9
7
  export * as oortCourierPayDriverPayouts from "./oortCourierPayDriverPayouts/index.js";
@@ -20,10 +18,9 @@ export * as oortTaskGroups from "./oortTaskGroups/index.js";
20
18
  export * as orgs from "./orgs/index.js";
21
19
  export * as payments from "./payments/index.js";
22
20
  export * as users from "./users/index.js";
21
+ export * as notifications from "./notifications/index.js";
23
22
  export * from "./dev/client/requests/index.js";
24
23
  export * from "./directory/client/requests/index.js";
25
- export * from "./notifications/client/requests/index.js";
26
- export * from "./notificationsShipper/client/requests/index.js";
27
24
  export * from "./oortConnections/client/requests/index.js";
28
25
  export * from "./oortCourierPayDriverLineItemGroups/client/requests/index.js";
29
26
  export * from "./oortCourierPayDriverPayouts/client/requests/index.js";
@@ -36,13 +36,11 @@ 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.users = exports.payments = exports.orgs = exports.oortTaskGroups = exports.oortShipperContactInfo = exports.oortOrgProfiles = exports.oortOrgConnectionInfos = exports.oortOrders = exports.oortOffChrtShipperOrgConnectionInfo = exports.oortMilestones = exports.oortMilestoneNotificationPreferences = exports.oortDrivers = exports.oortCourierPayDriverRateSheets = exports.oortCourierPayDriverPayouts = exports.oortCourierPayDriverLineItemGroups = exports.oortConnections = exports.notificationsShipper = exports.notifications = exports.directory = exports.dev = exports.root = void 0;
39
+ exports.notifications = exports.users = exports.payments = exports.orgs = exports.oortTaskGroups = exports.oortShipperContactInfo = exports.oortOrgProfiles = exports.oortOrgConnectionInfos = exports.oortOrders = exports.oortOffChrtShipperOrgConnectionInfo = exports.oortMilestones = exports.oortMilestoneNotificationPreferences = exports.oortDrivers = exports.oortCourierPayDriverRateSheets = exports.oortCourierPayDriverPayouts = exports.oortCourierPayDriverLineItemGroups = exports.oortConnections = exports.directory = exports.dev = exports.root = void 0;
40
40
  exports.root = __importStar(require("./root/index.js"));
41
41
  __exportStar(require("./root/types/index.js"), exports);
42
42
  exports.dev = __importStar(require("./dev/index.js"));
43
43
  exports.directory = __importStar(require("./directory/index.js"));
44
- exports.notifications = __importStar(require("./notifications/index.js"));
45
- exports.notificationsShipper = __importStar(require("./notificationsShipper/index.js"));
46
44
  exports.oortConnections = __importStar(require("./oortConnections/index.js"));
47
45
  exports.oortCourierPayDriverLineItemGroups = __importStar(require("./oortCourierPayDriverLineItemGroups/index.js"));
48
46
  exports.oortCourierPayDriverPayouts = __importStar(require("./oortCourierPayDriverPayouts/index.js"));
@@ -59,10 +57,9 @@ exports.oortTaskGroups = __importStar(require("./oortTaskGroups/index.js"));
59
57
  exports.orgs = __importStar(require("./orgs/index.js"));
60
58
  exports.payments = __importStar(require("./payments/index.js"));
61
59
  exports.users = __importStar(require("./users/index.js"));
60
+ exports.notifications = __importStar(require("./notifications/index.js"));
62
61
  __exportStar(require("./dev/client/requests/index.js"), exports);
63
62
  __exportStar(require("./directory/client/requests/index.js"), exports);
64
- __exportStar(require("./notifications/client/requests/index.js"), exports);
65
- __exportStar(require("./notificationsShipper/client/requests/index.js"), exports);
66
63
  __exportStar(require("./oortConnections/client/requests/index.js"), exports);
67
64
  __exportStar(require("./oortCourierPayDriverLineItemGroups/client/requests/index.js"), exports);
68
65
  __exportStar(require("./oortCourierPayDriverPayouts/client/requests/index.js"), exports);
@@ -3,7 +3,8 @@
3
3
  */
4
4
  import * as environments from "../../../../environments.js";
5
5
  import * as core from "../../../../core/index.js";
6
- import * as Chrt from "../../../index.js";
6
+ import { Courier } from "../resources/courier/client/Client.js";
7
+ import { Shipper } from "../resources/shipper/client/Client.js";
7
8
  export declare namespace Notifications {
8
9
  interface Options {
9
10
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -14,44 +15,12 @@ export declare namespace Notifications {
14
15
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
15
16
  fetcher?: core.FetchFunction;
16
17
  }
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 headers to include in the request. */
25
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
26
- }
27
18
  }
28
19
  export declare class Notifications {
29
20
  protected readonly _options: Notifications.Options;
21
+ protected _courier: Courier | undefined;
22
+ protected _shipper: Shipper | undefined;
30
23
  constructor(_options?: Notifications.Options);
31
- /**
32
- * Get notification preferences by org id from jwt
33
- *
34
- * @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
35
- *
36
- * @example
37
- * await client.notifications.getCourierNotificationsPreferencesByOrgId()
38
- */
39
- getCourierNotificationsPreferencesByOrgId(requestOptions?: Notifications.RequestOptions): core.HttpResponsePromise<Chrt.CourierNotificationPreferences1>;
40
- private __getCourierNotificationsPreferencesByOrgId;
41
- /**
42
- * Create/Update notification preferences for org in jwt
43
- *
44
- * @param {Chrt.CourierNotificationPreferencesClientCreate1} request
45
- * @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
46
- *
47
- * @throws {@link Chrt.UnprocessableEntityError}
48
- *
49
- * @example
50
- * await client.notifications.postCourierNotificationsPreferencesByOrgId({
51
- * schema_version: 1
52
- * })
53
- */
54
- postCourierNotificationsPreferencesByOrgId(request: Chrt.CourierNotificationPreferencesClientCreate1, requestOptions?: Notifications.RequestOptions): core.HttpResponsePromise<string>;
55
- private __postCourierNotificationsPreferencesByOrgId;
56
- protected _getAuthorizationHeader(): Promise<string | undefined>;
24
+ get courier(): Courier;
25
+ get shipper(): Shipper;
57
26
  }
@@ -2,178 +2,21 @@
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
- };
47
5
  Object.defineProperty(exports, "__esModule", { value: true });
48
6
  exports.Notifications = 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"));
7
+ const Client_js_1 = require("../resources/courier/client/Client.js");
8
+ const Client_js_2 = require("../resources/shipper/client/Client.js");
54
9
  class Notifications {
55
10
  constructor(_options = {}) {
56
11
  this._options = _options;
57
12
  }
58
- /**
59
- * Get notification preferences by org id from jwt
60
- *
61
- * @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
62
- *
63
- * @example
64
- * await client.notifications.getCourierNotificationsPreferencesByOrgId()
65
- */
66
- getCourierNotificationsPreferencesByOrgId(requestOptions) {
67
- return core.HttpResponsePromise.fromPromise(this.__getCourierNotificationsPreferencesByOrgId(requestOptions));
68
- }
69
- __getCourierNotificationsPreferencesByOrgId(requestOptions) {
70
- return __awaiter(this, void 0, void 0, function* () {
71
- var _a, _b, _c, _d;
72
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
73
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "notifications/courier_notification_preferences/by_org_id"),
74
- method: "GET",
75
- 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),
76
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
77
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
78
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
79
- });
80
- if (_response.ok) {
81
- return { data: _response.body, rawResponse: _response.rawResponse };
82
- }
83
- if (_response.error.reason === "status-code") {
84
- throw new errors.ChrtError({
85
- statusCode: _response.error.statusCode,
86
- body: _response.error.body,
87
- rawResponse: _response.rawResponse,
88
- });
89
- }
90
- switch (_response.error.reason) {
91
- case "non-json":
92
- throw new errors.ChrtError({
93
- statusCode: _response.error.statusCode,
94
- body: _response.error.rawBody,
95
- rawResponse: _response.rawResponse,
96
- });
97
- case "timeout":
98
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /notifications/courier_notification_preferences/by_org_id.");
99
- case "unknown":
100
- throw new errors.ChrtError({
101
- message: _response.error.errorMessage,
102
- rawResponse: _response.rawResponse,
103
- });
104
- }
105
- });
106
- }
107
- /**
108
- * Create/Update notification preferences for org in jwt
109
- *
110
- * @param {Chrt.CourierNotificationPreferencesClientCreate1} request
111
- * @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
112
- *
113
- * @throws {@link Chrt.UnprocessableEntityError}
114
- *
115
- * @example
116
- * await client.notifications.postCourierNotificationsPreferencesByOrgId({
117
- * schema_version: 1
118
- * })
119
- */
120
- postCourierNotificationsPreferencesByOrgId(request, requestOptions) {
121
- return core.HttpResponsePromise.fromPromise(this.__postCourierNotificationsPreferencesByOrgId(request, requestOptions));
122
- }
123
- __postCourierNotificationsPreferencesByOrgId(request, requestOptions) {
124
- return __awaiter(this, void 0, void 0, function* () {
125
- var _a, _b, _c, _d;
126
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
127
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "notifications/courier_notification_preferences/create"),
128
- method: "POST",
129
- 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),
130
- contentType: "application/json",
131
- requestType: "json",
132
- body: request,
133
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
134
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
135
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
136
- });
137
- if (_response.ok) {
138
- return { data: _response.body, rawResponse: _response.rawResponse };
139
- }
140
- if (_response.error.reason === "status-code") {
141
- switch (_response.error.statusCode) {
142
- case 422:
143
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
144
- default:
145
- throw new errors.ChrtError({
146
- statusCode: _response.error.statusCode,
147
- body: _response.error.body,
148
- rawResponse: _response.rawResponse,
149
- });
150
- }
151
- }
152
- switch (_response.error.reason) {
153
- case "non-json":
154
- throw new errors.ChrtError({
155
- statusCode: _response.error.statusCode,
156
- body: _response.error.rawBody,
157
- rawResponse: _response.rawResponse,
158
- });
159
- case "timeout":
160
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /notifications/courier_notification_preferences/create.");
161
- case "unknown":
162
- throw new errors.ChrtError({
163
- message: _response.error.errorMessage,
164
- rawResponse: _response.rawResponse,
165
- });
166
- }
167
- });
13
+ get courier() {
14
+ var _a;
15
+ return ((_a = this._courier) !== null && _a !== void 0 ? _a : (this._courier = new Client_js_1.Courier(this._options)));
168
16
  }
169
- _getAuthorizationHeader() {
170
- return __awaiter(this, void 0, void 0, function* () {
171
- const bearer = yield core.Supplier.get(this._options.token);
172
- if (bearer != null) {
173
- return `Bearer ${bearer}`;
174
- }
175
- return undefined;
176
- });
17
+ get shipper() {
18
+ var _a;
19
+ return ((_a = this._shipper) !== null && _a !== void 0 ? _a : (this._shipper = new Client_js_2.Shipper(this._options)));
177
20
  }
178
21
  }
179
22
  exports.Notifications = Notifications;
@@ -1,2 +1 @@
1
1
  export {};
2
- export * from "./requests/index.js";
@@ -1,17 +1,2 @@
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
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./requests/index.js"), exports);
@@ -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);
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
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 NotificationsShipper {
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 Courier {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
10
10
  /** Specify a custom URL to connect the client to. */
@@ -25,33 +25,33 @@ export declare namespace NotificationsShipper {
25
25
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
26
26
  }
27
27
  }
28
- export declare class NotificationsShipper {
29
- protected readonly _options: NotificationsShipper.Options;
30
- constructor(_options?: NotificationsShipper.Options);
28
+ export declare class Courier {
29
+ protected readonly _options: Courier.Options;
30
+ constructor(_options?: Courier.Options);
31
31
  /**
32
32
  * Get notification preferences by org id from jwt
33
33
  *
34
- * @param {NotificationsShipper.RequestOptions} requestOptions - Request-specific configuration.
34
+ * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
35
35
  *
36
36
  * @example
37
- * await client.notificationsShipper.getNotificationsPreferencesByOrgId()
37
+ * await client.notifications.courier.getNotificationsPreferencesByOrgId()
38
38
  */
39
- getNotificationsPreferencesByOrgId(requestOptions?: NotificationsShipper.RequestOptions): core.HttpResponsePromise<Chrt.ShipperNotificationPreferences1>;
39
+ getNotificationsPreferencesByOrgId(requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<Chrt.CourierNotificationPreferences1>;
40
40
  private __getNotificationsPreferencesByOrgId;
41
41
  /**
42
42
  * Create/Update notification preferences for org in jwt
43
43
  *
44
- * @param {Chrt.ShipperNotificationPreferencesClientCreate1} request
45
- * @param {NotificationsShipper.RequestOptions} requestOptions - Request-specific configuration.
44
+ * @param {Chrt.notifications.CourierNotificationPreferencesClientCreate1} request
45
+ * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
46
46
  *
47
47
  * @throws {@link Chrt.UnprocessableEntityError}
48
48
  *
49
49
  * @example
50
- * await client.notificationsShipper.postNotificationsPreferencesByOrgId({
50
+ * await client.notifications.courier.postNotificationsPreferencesByOrgId({
51
51
  * schema_version: 1
52
52
  * })
53
53
  */
54
- postNotificationsPreferencesByOrgId(request: Chrt.ShipperNotificationPreferencesClientCreate1, requestOptions?: NotificationsShipper.RequestOptions): core.HttpResponsePromise<string>;
54
+ postNotificationsPreferencesByOrgId(request: Chrt.notifications.CourierNotificationPreferencesClientCreate1, requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<string>;
55
55
  private __postNotificationsPreferencesByOrgId;
56
56
  protected _getAuthorizationHeader(): Promise<string | undefined>;
57
57
  }