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