rcs-js 1.0.6 → 1.0.8
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/Client.d.ts +73 -3
- package/Client.js +253 -70
- package/api/client/requests/GetCompanyRequest.d.ts +17 -0
- package/api/client/requests/RegisterCompanyRequest.d.ts +39 -0
- package/api/client/requests/UpdateCompanyRequest.d.ts +17 -0
- package/api/client/requests/index.d.ts +3 -0
- package/api/errors/BadRequestError.d.ts +1 -2
- package/api/errors/InternalServerError.d.ts +1 -2
- package/api/errors/NotFoundError.d.ts +8 -0
- package/api/errors/NotFoundError.js +41 -0
- package/api/errors/UnauthorizedError.d.ts +1 -2
- package/api/errors/index.d.ts +1 -0
- package/api/errors/index.js +1 -0
- package/api/types/AdditionalEmail.d.ts +9 -0
- package/api/types/AdditionalPhoneNumber.d.ts +9 -0
- package/api/types/AdditionalPhoneNumber.js +5 -0
- package/api/types/AdditionalWebsite.d.ts +9 -0
- package/api/types/AdditionalWebsite.js +5 -0
- package/api/types/BadRequestErrorBody.d.ts +3 -1
- package/api/types/BadRequestErrorBodyError.d.ts +10 -0
- package/api/types/BadRequestErrorBodyError.js +5 -0
- package/api/types/Company.d.ts +56 -0
- package/api/types/Company.js +5 -0
- package/api/types/CompanyAdditionalEmailsItem.d.ts +9 -0
- package/api/types/CompanyAdditionalEmailsItem.js +5 -0
- package/api/types/CompanyAdditionalPhoneNumbersItem.d.ts +9 -0
- package/api/types/CompanyAdditionalPhoneNumbersItem.js +5 -0
- package/api/types/CompanyAdditionalWebsitesItem.d.ts +9 -0
- package/api/types/CompanyAdditionalWebsitesItem.js +5 -0
- package/api/types/CompanyContact.d.ts +21 -0
- package/api/types/CompanyContact.js +5 -0
- package/api/types/CompanyDetails.d.ts +19 -0
- package/api/types/CompanyDetails.js +5 -0
- package/api/types/InternalServerErrorBody.d.ts +1 -0
- package/api/types/NotFoundErrorBody.d.ts +6 -0
- package/api/types/NotFoundErrorBody.js +5 -0
- package/api/types/Optionals.d.ts +13 -0
- package/api/types/Optionals.js +5 -0
- package/api/types/PointOfContact.d.ts +11 -0
- package/api/types/PointOfContact.js +5 -0
- package/api/types/RegisterCompanyResponse.d.ts +8 -0
- package/api/types/RegisterCompanyResponse.js +5 -0
- package/api/types/RegisterCompanyResponseBrand.d.ts +7 -0
- package/api/types/RegisterCompanyResponseBrand.js +5 -0
- package/api/types/SendMessageRequest.d.ts +5 -0
- package/api/types/SendMessageRequest.js +5 -0
- package/{dist/api/types/SendResponse.d.ts → api/types/SendMessageResponse.d.ts} +1 -1
- package/api/types/SendMessageResponse.js +5 -0
- package/api/types/UpdateCompanyResponse.d.ts +8 -0
- package/api/types/UpdateCompanyResponse.js +5 -0
- package/api/types/UpdateCompanyResponseBrand.d.ts +7 -0
- package/api/types/UpdateCompanyResponseBrand.js +5 -0
- package/api/types/index.d.ts +19 -2
- package/api/types/index.js +19 -2
- package/dist/Client.d.ts +73 -3
- package/dist/Client.js +253 -70
- package/dist/api/client/requests/GetCompanyRequest.d.ts +17 -0
- package/dist/api/client/requests/GetCompanyRequest.js +5 -0
- package/dist/api/client/requests/RegisterCompanyRequest.d.ts +39 -0
- package/dist/api/client/requests/RegisterCompanyRequest.js +5 -0
- package/dist/api/client/requests/UpdateCompanyRequest.d.ts +17 -0
- package/dist/api/client/requests/UpdateCompanyRequest.js +5 -0
- package/dist/api/client/requests/index.d.ts +3 -0
- package/dist/api/errors/BadRequestError.d.ts +1 -2
- package/dist/api/errors/InternalServerError.d.ts +1 -2
- package/dist/api/errors/NotFoundError.d.ts +8 -0
- package/dist/api/errors/NotFoundError.js +41 -0
- package/dist/api/errors/UnauthorizedError.d.ts +1 -2
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +1 -0
- package/dist/api/types/AdditionalEmail.d.ts +9 -0
- package/dist/api/types/AdditionalEmail.js +5 -0
- package/dist/api/types/AdditionalPhoneNumber.d.ts +9 -0
- package/dist/api/types/AdditionalPhoneNumber.js +5 -0
- package/dist/api/types/AdditionalWebsite.d.ts +9 -0
- package/dist/api/types/AdditionalWebsite.js +5 -0
- package/dist/api/types/BadRequestErrorBody.d.ts +3 -1
- package/dist/api/types/BadRequestErrorBodyError.d.ts +10 -0
- package/dist/api/types/BadRequestErrorBodyError.js +5 -0
- package/dist/api/types/Company.d.ts +56 -0
- package/dist/api/types/Company.js +5 -0
- package/dist/api/types/CompanyAdditionalEmailsItem.d.ts +9 -0
- package/dist/api/types/CompanyAdditionalEmailsItem.js +5 -0
- package/dist/api/types/CompanyAdditionalPhoneNumbersItem.d.ts +9 -0
- package/dist/api/types/CompanyAdditionalPhoneNumbersItem.js +5 -0
- package/dist/api/types/CompanyAdditionalWebsitesItem.d.ts +9 -0
- package/dist/api/types/CompanyAdditionalWebsitesItem.js +5 -0
- package/dist/api/types/CompanyContact.d.ts +21 -0
- package/dist/api/types/CompanyContact.js +5 -0
- package/dist/api/types/CompanyDetails.d.ts +19 -0
- package/dist/api/types/CompanyDetails.js +5 -0
- package/dist/api/types/InternalServerErrorBody.d.ts +1 -0
- package/dist/api/types/NotFoundErrorBody.d.ts +6 -0
- package/dist/api/types/NotFoundErrorBody.js +5 -0
- package/dist/api/types/Optionals.d.ts +13 -0
- package/dist/api/types/Optionals.js +5 -0
- package/dist/api/types/PointOfContact.d.ts +11 -0
- package/dist/api/types/PointOfContact.js +5 -0
- package/dist/api/types/RegisterCompanyResponse.d.ts +8 -0
- package/dist/api/types/RegisterCompanyResponse.js +5 -0
- package/dist/api/types/RegisterCompanyResponseBrand.d.ts +7 -0
- package/dist/api/types/RegisterCompanyResponseBrand.js +5 -0
- package/dist/api/types/SendMessageRequest.d.ts +5 -0
- package/dist/api/types/SendMessageRequest.js +5 -0
- package/{api/types/SendResponse.d.ts → dist/api/types/SendMessageResponse.d.ts} +1 -1
- package/dist/api/types/SendMessageResponse.js +5 -0
- package/dist/api/types/UpdateCompanyResponse.d.ts +8 -0
- package/dist/api/types/UpdateCompanyResponse.js +5 -0
- package/dist/api/types/UpdateCompanyResponseBrand.d.ts +7 -0
- package/dist/api/types/UpdateCompanyResponseBrand.js +5 -0
- package/dist/api/types/index.d.ts +19 -2
- package/dist/api/types/index.js +19 -2
- package/dist/serialization/client/getCompany.d.ts +11 -0
- package/dist/serialization/client/getCompany.js +32 -0
- package/dist/serialization/client/index.d.ts +1 -0
- package/dist/serialization/client/index.js +14 -0
- package/dist/serialization/client/requests/RegisterCompanyRequest.d.ts +19 -0
- package/dist/serialization/client/requests/RegisterCompanyRequest.js +40 -0
- package/dist/serialization/client/requests/UpdateCompanyRequest.d.ts +20 -0
- package/dist/serialization/client/requests/UpdateCompanyRequest.js +41 -0
- package/dist/serialization/client/requests/index.d.ts +2 -0
- package/dist/serialization/client/requests/index.js +5 -1
- package/dist/serialization/types/AdditionalEmail.d.ts +13 -0
- package/dist/serialization/types/AdditionalEmail.js +34 -0
- package/dist/serialization/types/AdditionalPhoneNumber.d.ts +13 -0
- package/dist/serialization/types/AdditionalPhoneNumber.js +34 -0
- package/dist/serialization/types/AdditionalWebsite.d.ts +13 -0
- package/dist/serialization/types/AdditionalWebsite.js +34 -0
- package/dist/serialization/types/BadRequestErrorBody.d.ts +3 -1
- package/dist/serialization/types/BadRequestErrorBody.js +3 -1
- package/dist/serialization/types/BadRequestErrorBodyError.d.ts +16 -0
- package/dist/serialization/types/BadRequestErrorBodyError.js +37 -0
- package/dist/serialization/types/Company.d.ts +39 -0
- package/dist/serialization/types/Company.js +60 -0
- package/dist/serialization/types/CompanyAdditionalEmailsItem.d.ts +13 -0
- package/dist/serialization/types/CompanyAdditionalEmailsItem.js +34 -0
- package/dist/serialization/types/CompanyAdditionalPhoneNumbersItem.d.ts +13 -0
- package/dist/serialization/types/CompanyAdditionalPhoneNumbersItem.js +34 -0
- package/dist/serialization/types/CompanyAdditionalWebsitesItem.d.ts +13 -0
- package/dist/serialization/types/CompanyAdditionalWebsitesItem.js +34 -0
- package/dist/serialization/types/CompanyContact.d.ts +19 -0
- package/dist/serialization/types/CompanyContact.js +40 -0
- package/dist/serialization/types/CompanyDetails.d.ts +18 -0
- package/dist/serialization/types/CompanyDetails.js +39 -0
- package/dist/serialization/types/InternalServerErrorBody.d.ts +1 -0
- package/dist/serialization/types/InternalServerErrorBody.js +1 -0
- package/dist/serialization/types/NotFoundErrorBody.d.ts +12 -0
- package/dist/serialization/types/NotFoundErrorBody.js +33 -0
- package/dist/serialization/types/Optionals.d.ts +18 -0
- package/dist/serialization/types/Optionals.js +39 -0
- package/dist/serialization/types/PointOfContact.d.ts +14 -0
- package/dist/serialization/types/PointOfContact.js +35 -0
- package/dist/serialization/types/RegisterCompanyResponse.d.ts +14 -0
- package/dist/serialization/types/RegisterCompanyResponse.js +35 -0
- package/dist/serialization/types/RegisterCompanyResponseBrand.d.ts +13 -0
- package/dist/serialization/types/RegisterCompanyResponseBrand.js +34 -0
- package/dist/serialization/types/{SendRequest.d.ts → SendMessageRequest.d.ts} +2 -2
- package/dist/serialization/types/{SendRequest.js → SendMessageRequest.js} +2 -2
- package/{serialization/types/SendResponse.d.ts → dist/serialization/types/SendMessageResponse.d.ts} +2 -2
- package/dist/serialization/types/{SendResponse.js → SendMessageResponse.js} +2 -2
- package/dist/serialization/types/UpdateCompanyResponse.d.ts +14 -0
- package/dist/serialization/types/UpdateCompanyResponse.js +35 -0
- package/dist/serialization/types/UpdateCompanyResponseBrand.d.ts +13 -0
- package/dist/serialization/types/UpdateCompanyResponseBrand.js +34 -0
- package/dist/serialization/types/index.d.ts +19 -2
- package/dist/serialization/types/index.js +19 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +5 -13
- package/serialization/client/getCompany.d.ts +11 -0
- package/serialization/client/getCompany.js +32 -0
- package/serialization/client/index.d.ts +1 -0
- package/serialization/client/index.js +14 -0
- package/serialization/client/requests/RegisterCompanyRequest.d.ts +19 -0
- package/serialization/client/requests/RegisterCompanyRequest.js +40 -0
- package/serialization/client/requests/UpdateCompanyRequest.d.ts +20 -0
- package/serialization/client/requests/UpdateCompanyRequest.js +41 -0
- package/serialization/client/requests/index.d.ts +2 -0
- package/serialization/client/requests/index.js +5 -1
- package/serialization/types/AdditionalEmail.d.ts +13 -0
- package/serialization/types/AdditionalEmail.js +34 -0
- package/serialization/types/AdditionalPhoneNumber.d.ts +13 -0
- package/serialization/types/AdditionalPhoneNumber.js +34 -0
- package/serialization/types/AdditionalWebsite.d.ts +13 -0
- package/serialization/types/AdditionalWebsite.js +34 -0
- package/serialization/types/BadRequestErrorBody.d.ts +3 -1
- package/serialization/types/BadRequestErrorBody.js +3 -1
- package/serialization/types/BadRequestErrorBodyError.d.ts +16 -0
- package/serialization/types/BadRequestErrorBodyError.js +37 -0
- package/serialization/types/Company.d.ts +39 -0
- package/serialization/types/Company.js +60 -0
- package/serialization/types/CompanyAdditionalEmailsItem.d.ts +13 -0
- package/serialization/types/CompanyAdditionalEmailsItem.js +34 -0
- package/serialization/types/CompanyAdditionalPhoneNumbersItem.d.ts +13 -0
- package/serialization/types/CompanyAdditionalPhoneNumbersItem.js +34 -0
- package/serialization/types/CompanyAdditionalWebsitesItem.d.ts +13 -0
- package/serialization/types/CompanyAdditionalWebsitesItem.js +34 -0
- package/serialization/types/CompanyContact.d.ts +19 -0
- package/serialization/types/CompanyContact.js +40 -0
- package/serialization/types/CompanyDetails.d.ts +18 -0
- package/serialization/types/CompanyDetails.js +39 -0
- package/serialization/types/InternalServerErrorBody.d.ts +1 -0
- package/serialization/types/InternalServerErrorBody.js +1 -0
- package/serialization/types/NotFoundErrorBody.d.ts +12 -0
- package/serialization/types/NotFoundErrorBody.js +33 -0
- package/serialization/types/Optionals.d.ts +18 -0
- package/serialization/types/Optionals.js +39 -0
- package/serialization/types/PointOfContact.d.ts +14 -0
- package/serialization/types/PointOfContact.js +35 -0
- package/serialization/types/RegisterCompanyResponse.d.ts +14 -0
- package/serialization/types/RegisterCompanyResponse.js +35 -0
- package/serialization/types/RegisterCompanyResponseBrand.d.ts +13 -0
- package/serialization/types/RegisterCompanyResponseBrand.js +34 -0
- package/serialization/types/{SendRequest.d.ts → SendMessageRequest.d.ts} +2 -2
- package/serialization/types/{SendRequest.js → SendMessageRequest.js} +2 -2
- package/{dist/serialization/types/SendResponse.d.ts → serialization/types/SendMessageResponse.d.ts} +2 -2
- package/serialization/types/{SendResponse.js → SendMessageResponse.js} +2 -2
- package/serialization/types/UpdateCompanyResponse.d.ts +14 -0
- package/serialization/types/UpdateCompanyResponse.js +35 -0
- package/serialization/types/UpdateCompanyResponseBrand.d.ts +13 -0
- package/serialization/types/UpdateCompanyResponseBrand.js +34 -0
- package/serialization/types/index.d.ts +19 -2
- package/serialization/types/index.js +19 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/types/SendRequest.d.ts +0 -5
- package/dist/api/types/SendRequest.d.ts +0 -5
- /package/api/{types/SendRequest.js → client/requests/GetCompanyRequest.js} +0 -0
- /package/api/{types/SendResponse.js → client/requests/RegisterCompanyRequest.js} +0 -0
- /package/{dist/api/types/SendRequest.js → api/client/requests/UpdateCompanyRequest.js} +0 -0
- /package/{dist/api/types/SendResponse.js → api/types/AdditionalEmail.js} +0 -0
package/dist/Client.js
CHANGED
|
@@ -73,7 +73,7 @@ class PinnacleClient {
|
|
|
73
73
|
const _response = yield core.fetcher({
|
|
74
74
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "check_rcs"),
|
|
75
75
|
method: "GET",
|
|
76
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.
|
|
76
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
77
77
|
contentType: "application/json",
|
|
78
78
|
queryParameters: _queryParams,
|
|
79
79
|
requestType: "json",
|
|
@@ -92,26 +92,11 @@ class PinnacleClient {
|
|
|
92
92
|
if (_response.error.reason === "status-code") {
|
|
93
93
|
switch (_response.error.statusCode) {
|
|
94
94
|
case 400:
|
|
95
|
-
throw new Pinnacle.BadRequestError(
|
|
96
|
-
unrecognizedObjectKeys: "passthrough",
|
|
97
|
-
allowUnrecognizedUnionMembers: true,
|
|
98
|
-
allowUnrecognizedEnumValues: true,
|
|
99
|
-
breadcrumbsPrefix: ["response"],
|
|
100
|
-
}));
|
|
95
|
+
throw new Pinnacle.BadRequestError(_response.error.body);
|
|
101
96
|
case 401:
|
|
102
|
-
throw new Pinnacle.UnauthorizedError(
|
|
103
|
-
unrecognizedObjectKeys: "passthrough",
|
|
104
|
-
allowUnrecognizedUnionMembers: true,
|
|
105
|
-
allowUnrecognizedEnumValues: true,
|
|
106
|
-
breadcrumbsPrefix: ["response"],
|
|
107
|
-
}));
|
|
97
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body);
|
|
108
98
|
case 500:
|
|
109
|
-
throw new Pinnacle.InternalServerError(
|
|
110
|
-
unrecognizedObjectKeys: "passthrough",
|
|
111
|
-
allowUnrecognizedUnionMembers: true,
|
|
112
|
-
allowUnrecognizedEnumValues: true,
|
|
113
|
-
breadcrumbsPrefix: ["response"],
|
|
114
|
-
}));
|
|
99
|
+
throw new Pinnacle.InternalServerError(_response.error.body);
|
|
115
100
|
default:
|
|
116
101
|
throw new errors.PinnacleError({
|
|
117
102
|
statusCode: _response.error.statusCode,
|
|
@@ -155,7 +140,7 @@ class PinnacleClient {
|
|
|
155
140
|
const _response = yield core.fetcher({
|
|
156
141
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "update_settings"),
|
|
157
142
|
method: "POST",
|
|
158
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.
|
|
143
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
159
144
|
contentType: "application/json",
|
|
160
145
|
requestType: "json",
|
|
161
146
|
body: serializers.UpdateSettingsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -174,26 +159,11 @@ class PinnacleClient {
|
|
|
174
159
|
if (_response.error.reason === "status-code") {
|
|
175
160
|
switch (_response.error.statusCode) {
|
|
176
161
|
case 400:
|
|
177
|
-
throw new Pinnacle.BadRequestError(
|
|
178
|
-
unrecognizedObjectKeys: "passthrough",
|
|
179
|
-
allowUnrecognizedUnionMembers: true,
|
|
180
|
-
allowUnrecognizedEnumValues: true,
|
|
181
|
-
breadcrumbsPrefix: ["response"],
|
|
182
|
-
}));
|
|
162
|
+
throw new Pinnacle.BadRequestError(_response.error.body);
|
|
183
163
|
case 401:
|
|
184
|
-
throw new Pinnacle.UnauthorizedError(
|
|
185
|
-
unrecognizedObjectKeys: "passthrough",
|
|
186
|
-
allowUnrecognizedUnionMembers: true,
|
|
187
|
-
allowUnrecognizedEnumValues: true,
|
|
188
|
-
breadcrumbsPrefix: ["response"],
|
|
189
|
-
}));
|
|
164
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body);
|
|
190
165
|
case 500:
|
|
191
|
-
throw new Pinnacle.InternalServerError(
|
|
192
|
-
unrecognizedObjectKeys: "passthrough",
|
|
193
|
-
allowUnrecognizedUnionMembers: true,
|
|
194
|
-
allowUnrecognizedEnumValues: true,
|
|
195
|
-
breadcrumbsPrefix: ["response"],
|
|
196
|
-
}));
|
|
166
|
+
throw new Pinnacle.InternalServerError(_response.error.body);
|
|
197
167
|
default:
|
|
198
168
|
throw new errors.PinnacleError({
|
|
199
169
|
statusCode: _response.error.statusCode,
|
|
@@ -233,7 +203,7 @@ class PinnacleClient {
|
|
|
233
203
|
const _response = yield core.fetcher({
|
|
234
204
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "get_account_number"),
|
|
235
205
|
method: "GET",
|
|
236
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.
|
|
206
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
237
207
|
contentType: "application/json",
|
|
238
208
|
requestType: "json",
|
|
239
209
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -251,19 +221,9 @@ class PinnacleClient {
|
|
|
251
221
|
if (_response.error.reason === "status-code") {
|
|
252
222
|
switch (_response.error.statusCode) {
|
|
253
223
|
case 401:
|
|
254
|
-
throw new Pinnacle.UnauthorizedError(
|
|
255
|
-
unrecognizedObjectKeys: "passthrough",
|
|
256
|
-
allowUnrecognizedUnionMembers: true,
|
|
257
|
-
allowUnrecognizedEnumValues: true,
|
|
258
|
-
breadcrumbsPrefix: ["response"],
|
|
259
|
-
}));
|
|
224
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body);
|
|
260
225
|
case 500:
|
|
261
|
-
throw new Pinnacle.InternalServerError(
|
|
262
|
-
unrecognizedObjectKeys: "passthrough",
|
|
263
|
-
allowUnrecognizedUnionMembers: true,
|
|
264
|
-
allowUnrecognizedEnumValues: true,
|
|
265
|
-
breadcrumbsPrefix: ["response"],
|
|
266
|
-
}));
|
|
226
|
+
throw new Pinnacle.InternalServerError(_response.error.body);
|
|
267
227
|
default:
|
|
268
228
|
throw new errors.PinnacleError({
|
|
269
229
|
statusCode: _response.error.statusCode,
|
|
@@ -289,7 +249,7 @@ class PinnacleClient {
|
|
|
289
249
|
/**
|
|
290
250
|
* Send a SMS or RCS message to a phone number
|
|
291
251
|
*
|
|
292
|
-
* @param {Pinnacle.
|
|
252
|
+
* @param {Pinnacle.SendMessageRequest} request
|
|
293
253
|
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
294
254
|
*
|
|
295
255
|
* @throws {@link Pinnacle.BadRequestError}
|
|
@@ -297,7 +257,7 @@ class PinnacleClient {
|
|
|
297
257
|
* @throws {@link Pinnacle.InternalServerError}
|
|
298
258
|
*
|
|
299
259
|
* @example
|
|
300
|
-
* await client.
|
|
260
|
+
* await client.sendMessage({
|
|
301
261
|
* phoneNumber: "phone_number",
|
|
302
262
|
* messageType: "card",
|
|
303
263
|
* message: {
|
|
@@ -307,22 +267,22 @@ class PinnacleClient {
|
|
|
307
267
|
* }
|
|
308
268
|
* })
|
|
309
269
|
*/
|
|
310
|
-
|
|
270
|
+
sendMessage(request, requestOptions) {
|
|
311
271
|
var _a;
|
|
312
272
|
return __awaiter(this, void 0, void 0, function* () {
|
|
313
273
|
const _response = yield core.fetcher({
|
|
314
274
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send"),
|
|
315
275
|
method: "POST",
|
|
316
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.
|
|
276
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
317
277
|
contentType: "application/json",
|
|
318
278
|
requestType: "json",
|
|
319
|
-
body: serializers.
|
|
279
|
+
body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
320
280
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
321
281
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
322
282
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
323
283
|
});
|
|
324
284
|
if (_response.ok) {
|
|
325
|
-
return serializers.
|
|
285
|
+
return serializers.SendMessageResponse.parseOrThrow(_response.body, {
|
|
326
286
|
unrecognizedObjectKeys: "passthrough",
|
|
327
287
|
allowUnrecognizedUnionMembers: true,
|
|
328
288
|
allowUnrecognizedEnumValues: true,
|
|
@@ -332,26 +292,249 @@ class PinnacleClient {
|
|
|
332
292
|
if (_response.error.reason === "status-code") {
|
|
333
293
|
switch (_response.error.statusCode) {
|
|
334
294
|
case 400:
|
|
335
|
-
throw new Pinnacle.BadRequestError(
|
|
336
|
-
unrecognizedObjectKeys: "passthrough",
|
|
337
|
-
allowUnrecognizedUnionMembers: true,
|
|
338
|
-
allowUnrecognizedEnumValues: true,
|
|
339
|
-
breadcrumbsPrefix: ["response"],
|
|
340
|
-
}));
|
|
295
|
+
throw new Pinnacle.BadRequestError(_response.error.body);
|
|
341
296
|
case 401:
|
|
342
|
-
throw new Pinnacle.UnauthorizedError(
|
|
343
|
-
unrecognizedObjectKeys: "passthrough",
|
|
344
|
-
allowUnrecognizedUnionMembers: true,
|
|
345
|
-
allowUnrecognizedEnumValues: true,
|
|
346
|
-
breadcrumbsPrefix: ["response"],
|
|
347
|
-
}));
|
|
297
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body);
|
|
348
298
|
case 500:
|
|
349
|
-
throw new Pinnacle.InternalServerError(
|
|
299
|
+
throw new Pinnacle.InternalServerError(_response.error.body);
|
|
300
|
+
default:
|
|
301
|
+
throw new errors.PinnacleError({
|
|
302
|
+
statusCode: _response.error.statusCode,
|
|
303
|
+
body: _response.error.body,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
switch (_response.error.reason) {
|
|
308
|
+
case "non-json":
|
|
309
|
+
throw new errors.PinnacleError({
|
|
310
|
+
statusCode: _response.error.statusCode,
|
|
311
|
+
body: _response.error.rawBody,
|
|
312
|
+
});
|
|
313
|
+
case "timeout":
|
|
314
|
+
throw new errors.PinnacleTimeoutError();
|
|
315
|
+
case "unknown":
|
|
316
|
+
throw new errors.PinnacleError({
|
|
317
|
+
message: _response.error.errorMessage,
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Retrieve the company's information (i.e. approval status, company name, etc.). Search by company ID or company name.
|
|
324
|
+
*
|
|
325
|
+
* @param {Pinnacle.GetCompanyRequest} request
|
|
326
|
+
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
327
|
+
*
|
|
328
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
329
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
330
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
331
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
332
|
+
*
|
|
333
|
+
* @example
|
|
334
|
+
* await client.getCompany()
|
|
335
|
+
*/
|
|
336
|
+
getCompany(request = {}, requestOptions) {
|
|
337
|
+
var _a;
|
|
338
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
339
|
+
const { companyId, companyName } = request;
|
|
340
|
+
const _queryParams = {};
|
|
341
|
+
if (companyId != null) {
|
|
342
|
+
_queryParams["companyId"] = companyId.toString();
|
|
343
|
+
}
|
|
344
|
+
if (companyName != null) {
|
|
345
|
+
_queryParams["companyName"] = companyName;
|
|
346
|
+
}
|
|
347
|
+
const _response = yield core.fetcher({
|
|
348
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "company"),
|
|
349
|
+
method: "GET",
|
|
350
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
351
|
+
contentType: "application/json",
|
|
352
|
+
queryParameters: _queryParams,
|
|
353
|
+
requestType: "json",
|
|
354
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
355
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
356
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
357
|
+
});
|
|
358
|
+
if (_response.ok) {
|
|
359
|
+
return serializers.getCompany.Response.parseOrThrow(_response.body, {
|
|
360
|
+
unrecognizedObjectKeys: "passthrough",
|
|
361
|
+
allowUnrecognizedUnionMembers: true,
|
|
362
|
+
allowUnrecognizedEnumValues: true,
|
|
363
|
+
breadcrumbsPrefix: ["response"],
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
if (_response.error.reason === "status-code") {
|
|
367
|
+
switch (_response.error.statusCode) {
|
|
368
|
+
case 400:
|
|
369
|
+
throw new Pinnacle.BadRequestError(_response.error.body);
|
|
370
|
+
case 401:
|
|
371
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body);
|
|
372
|
+
case 404:
|
|
373
|
+
throw new Pinnacle.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
|
|
350
374
|
unrecognizedObjectKeys: "passthrough",
|
|
351
375
|
allowUnrecognizedUnionMembers: true,
|
|
352
376
|
allowUnrecognizedEnumValues: true,
|
|
353
377
|
breadcrumbsPrefix: ["response"],
|
|
354
378
|
}));
|
|
379
|
+
case 500:
|
|
380
|
+
throw new Pinnacle.InternalServerError(_response.error.body);
|
|
381
|
+
default:
|
|
382
|
+
throw new errors.PinnacleError({
|
|
383
|
+
statusCode: _response.error.statusCode,
|
|
384
|
+
body: _response.error.body,
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
switch (_response.error.reason) {
|
|
389
|
+
case "non-json":
|
|
390
|
+
throw new errors.PinnacleError({
|
|
391
|
+
statusCode: _response.error.statusCode,
|
|
392
|
+
body: _response.error.rawBody,
|
|
393
|
+
});
|
|
394
|
+
case "timeout":
|
|
395
|
+
throw new errors.PinnacleTimeoutError();
|
|
396
|
+
case "unknown":
|
|
397
|
+
throw new errors.PinnacleError({
|
|
398
|
+
message: _response.error.errorMessage,
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Register a company for RCS with the Pinnacle platform
|
|
405
|
+
*
|
|
406
|
+
* @param {Pinnacle.RegisterCompanyRequest} request
|
|
407
|
+
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
408
|
+
*
|
|
409
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
410
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
411
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
412
|
+
*
|
|
413
|
+
* @example
|
|
414
|
+
* await client.registerCompany({
|
|
415
|
+
* company: {
|
|
416
|
+
* name: "name",
|
|
417
|
+
* address: "address",
|
|
418
|
+
* ein: "ein",
|
|
419
|
+
* description: "description",
|
|
420
|
+
* brandColor: "brandColor",
|
|
421
|
+
* logoUrl: "logoUrl",
|
|
422
|
+
* heroUrl: "heroUrl"
|
|
423
|
+
* },
|
|
424
|
+
* companyContact: {
|
|
425
|
+
* primaryWebsiteUrl: "primaryWebsiteUrl",
|
|
426
|
+
* primaryWebsiteLabel: "primaryWebsiteLabel",
|
|
427
|
+
* primaryPhone: "primaryPhone",
|
|
428
|
+
* primaryPhoneLabel: "primaryPhoneLabel",
|
|
429
|
+
* primaryEmail: "primaryEmail",
|
|
430
|
+
* primaryEmailLabel: "primaryEmailLabel",
|
|
431
|
+
* privacyPolicyUrl: "privacyPolicyUrl",
|
|
432
|
+
* tosUrl: "tosUrl"
|
|
433
|
+
* },
|
|
434
|
+
* pointOfContact: {
|
|
435
|
+
* pocName: "pocName",
|
|
436
|
+
* pocTitle: "pocTitle",
|
|
437
|
+
* pocEmail: "pocEmail"
|
|
438
|
+
* }
|
|
439
|
+
* })
|
|
440
|
+
*/
|
|
441
|
+
registerCompany(request, requestOptions) {
|
|
442
|
+
var _a;
|
|
443
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
444
|
+
const _response = yield core.fetcher({
|
|
445
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "company/register"),
|
|
446
|
+
method: "POST",
|
|
447
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
448
|
+
contentType: "application/json",
|
|
449
|
+
requestType: "json",
|
|
450
|
+
body: serializers.RegisterCompanyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
451
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
452
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
453
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
454
|
+
});
|
|
455
|
+
if (_response.ok) {
|
|
456
|
+
return serializers.RegisterCompanyResponse.parseOrThrow(_response.body, {
|
|
457
|
+
unrecognizedObjectKeys: "passthrough",
|
|
458
|
+
allowUnrecognizedUnionMembers: true,
|
|
459
|
+
allowUnrecognizedEnumValues: true,
|
|
460
|
+
breadcrumbsPrefix: ["response"],
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
if (_response.error.reason === "status-code") {
|
|
464
|
+
switch (_response.error.statusCode) {
|
|
465
|
+
case 400:
|
|
466
|
+
throw new Pinnacle.BadRequestError(_response.error.body);
|
|
467
|
+
case 401:
|
|
468
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body);
|
|
469
|
+
case 500:
|
|
470
|
+
throw new Pinnacle.InternalServerError(_response.error.body);
|
|
471
|
+
default:
|
|
472
|
+
throw new errors.PinnacleError({
|
|
473
|
+
statusCode: _response.error.statusCode,
|
|
474
|
+
body: _response.error.body,
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
switch (_response.error.reason) {
|
|
479
|
+
case "non-json":
|
|
480
|
+
throw new errors.PinnacleError({
|
|
481
|
+
statusCode: _response.error.statusCode,
|
|
482
|
+
body: _response.error.rawBody,
|
|
483
|
+
});
|
|
484
|
+
case "timeout":
|
|
485
|
+
throw new errors.PinnacleTimeoutError();
|
|
486
|
+
case "unknown":
|
|
487
|
+
throw new errors.PinnacleError({
|
|
488
|
+
message: _response.error.errorMessage,
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Update a company on the Pinnacle platform
|
|
495
|
+
*
|
|
496
|
+
* @param {Pinnacle.UpdateCompanyRequest} request
|
|
497
|
+
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
498
|
+
*
|
|
499
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
500
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
501
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
502
|
+
*
|
|
503
|
+
* @example
|
|
504
|
+
* await client.updateCompany({
|
|
505
|
+
* companyId: "companyId"
|
|
506
|
+
* })
|
|
507
|
+
*/
|
|
508
|
+
updateCompany(request, requestOptions) {
|
|
509
|
+
var _a;
|
|
510
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
511
|
+
const _response = yield core.fetcher({
|
|
512
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "company/update"),
|
|
513
|
+
method: "POST",
|
|
514
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
515
|
+
contentType: "application/json",
|
|
516
|
+
requestType: "json",
|
|
517
|
+
body: serializers.UpdateCompanyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
518
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
519
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
520
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
521
|
+
});
|
|
522
|
+
if (_response.ok) {
|
|
523
|
+
return serializers.UpdateCompanyResponse.parseOrThrow(_response.body, {
|
|
524
|
+
unrecognizedObjectKeys: "passthrough",
|
|
525
|
+
allowUnrecognizedUnionMembers: true,
|
|
526
|
+
allowUnrecognizedEnumValues: true,
|
|
527
|
+
breadcrumbsPrefix: ["response"],
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
if (_response.error.reason === "status-code") {
|
|
531
|
+
switch (_response.error.statusCode) {
|
|
532
|
+
case 400:
|
|
533
|
+
throw new Pinnacle.BadRequestError(_response.error.body);
|
|
534
|
+
case 401:
|
|
535
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body);
|
|
536
|
+
case 500:
|
|
537
|
+
throw new Pinnacle.InternalServerError(_response.error.body);
|
|
355
538
|
default:
|
|
356
539
|
throw new errors.PinnacleError({
|
|
357
540
|
statusCode: _response.error.statusCode,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {}
|
|
7
|
+
*/
|
|
8
|
+
export interface GetCompanyRequest {
|
|
9
|
+
/**
|
|
10
|
+
* The unique identifier for the company
|
|
11
|
+
*/
|
|
12
|
+
companyId?: number;
|
|
13
|
+
/**
|
|
14
|
+
* The name of the company
|
|
15
|
+
*/
|
|
16
|
+
companyName?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Pinnacle from "../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* company: {
|
|
9
|
+
* name: "name",
|
|
10
|
+
* address: "address",
|
|
11
|
+
* ein: "ein",
|
|
12
|
+
* description: "description",
|
|
13
|
+
* brandColor: "brandColor",
|
|
14
|
+
* logoUrl: "logoUrl",
|
|
15
|
+
* heroUrl: "heroUrl"
|
|
16
|
+
* },
|
|
17
|
+
* companyContact: {
|
|
18
|
+
* primaryWebsiteUrl: "primaryWebsiteUrl",
|
|
19
|
+
* primaryWebsiteLabel: "primaryWebsiteLabel",
|
|
20
|
+
* primaryPhone: "primaryPhone",
|
|
21
|
+
* primaryPhoneLabel: "primaryPhoneLabel",
|
|
22
|
+
* primaryEmail: "primaryEmail",
|
|
23
|
+
* primaryEmailLabel: "primaryEmailLabel",
|
|
24
|
+
* privacyPolicyUrl: "privacyPolicyUrl",
|
|
25
|
+
* tosUrl: "tosUrl"
|
|
26
|
+
* },
|
|
27
|
+
* pointOfContact: {
|
|
28
|
+
* pocName: "pocName",
|
|
29
|
+
* pocTitle: "pocTitle",
|
|
30
|
+
* pocEmail: "pocEmail"
|
|
31
|
+
* }
|
|
32
|
+
* }
|
|
33
|
+
*/
|
|
34
|
+
export interface RegisterCompanyRequest {
|
|
35
|
+
company: Pinnacle.CompanyDetails;
|
|
36
|
+
companyContact: Pinnacle.CompanyContact;
|
|
37
|
+
pointOfContact: Pinnacle.PointOfContact;
|
|
38
|
+
optionals?: Pinnacle.Optionals;
|
|
39
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Pinnacle from "../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* companyId: "companyId"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface UpdateCompanyRequest {
|
|
12
|
+
companyId: string;
|
|
13
|
+
company?: Pinnacle.Company;
|
|
14
|
+
companyContact?: Pinnacle.CompanyContact;
|
|
15
|
+
pointOfContact?: Pinnacle.PointOfContact;
|
|
16
|
+
optionals?: Pinnacle.Optionals;
|
|
17
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { type CheckRcsCapabilityRequest } from "./CheckRcsCapabilityRequest";
|
|
2
2
|
export { type UpdateSettingsRequest } from "./UpdateSettingsRequest";
|
|
3
|
+
export { type GetCompanyRequest } from "./GetCompanyRequest";
|
|
4
|
+
export { type RegisterCompanyRequest } from "./RegisterCompanyRequest";
|
|
5
|
+
export { type UpdateCompanyRequest } from "./UpdateCompanyRequest";
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as errors from "../../errors/index";
|
|
5
|
-
import * as Pinnacle from "../index";
|
|
6
5
|
export declare class BadRequestError extends errors.PinnacleError {
|
|
7
|
-
constructor(body
|
|
6
|
+
constructor(body?: unknown);
|
|
8
7
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as errors from "../../errors/index";
|
|
5
|
-
import * as Pinnacle from "../index";
|
|
6
5
|
export declare class InternalServerError extends errors.PinnacleError {
|
|
7
|
-
constructor(body
|
|
6
|
+
constructor(body?: unknown);
|
|
8
7
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as errors from "../../errors/index";
|
|
5
|
+
import * as Pinnacle from "../index";
|
|
6
|
+
export declare class NotFoundError extends errors.PinnacleError {
|
|
7
|
+
constructor(body: Pinnacle.NotFoundErrorBody);
|
|
8
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.NotFoundError = void 0;
|
|
30
|
+
const errors = __importStar(require("../../errors/index"));
|
|
31
|
+
class NotFoundError extends errors.PinnacleError {
|
|
32
|
+
constructor(body) {
|
|
33
|
+
super({
|
|
34
|
+
message: "NotFoundError",
|
|
35
|
+
statusCode: 404,
|
|
36
|
+
body: body,
|
|
37
|
+
});
|
|
38
|
+
Object.setPrototypeOf(this, NotFoundError.prototype);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.NotFoundError = NotFoundError;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as errors from "../../errors/index";
|
|
5
|
-
import * as Pinnacle from "../index";
|
|
6
5
|
export declare class UnauthorizedError extends errors.PinnacleError {
|
|
7
|
-
constructor(body
|
|
6
|
+
constructor(body?: unknown);
|
|
8
7
|
}
|
package/dist/api/errors/index.js
CHANGED
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./BadRequestError"), exports);
|
|
18
18
|
__exportStar(require("./UnauthorizedError"), exports);
|
|
19
19
|
__exportStar(require("./InternalServerError"), exports);
|
|
20
|
+
__exportStar(require("./NotFoundError"), exports);
|