rcs-js 0.0.1 → 1.0.2
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 +93 -0
- package/Client.js +384 -0
- package/README.md +137 -0
- package/api/client/index.d.ts +1 -0
- package/api/client/index.js +17 -0
- package/api/client/requests/CheckRcsCapabilityRequest.d.ts +21 -0
- package/api/client/requests/CheckRcsCapabilityRequest.js +5 -0
- package/api/client/requests/UpdateSettingsRequest.d.ts +13 -0
- package/api/client/requests/UpdateSettingsRequest.js +5 -0
- package/api/client/requests/index.d.ts +2 -0
- package/api/client/requests/index.js +2 -0
- package/api/errors/BadRequestError.d.ts +8 -0
- package/api/errors/BadRequestError.js +41 -0
- package/api/errors/InternalServerError.d.ts +8 -0
- package/api/errors/InternalServerError.js +41 -0
- package/api/errors/UnauthorizedError.d.ts +8 -0
- package/api/errors/UnauthorizedError.js +41 -0
- package/api/errors/index.d.ts +3 -0
- package/api/errors/index.js +19 -0
- package/api/index.d.ts +3 -0
- package/api/index.js +19 -0
- package/api/types/Action.d.ts +5 -0
- package/api/types/Action.js +5 -0
- package/api/types/BadRequestErrorBody.d.ts +6 -0
- package/api/types/BadRequestErrorBody.js +5 -0
- package/api/types/BasicRcs.d.ts +13 -0
- package/api/types/BasicRcs.js +5 -0
- package/api/types/BasicRcsMessage.d.ts +10 -0
- package/api/types/BasicRcsMessage.js +5 -0
- package/api/types/Call.d.ts +9 -0
- package/api/types/Call.js +5 -0
- package/api/types/Card.d.ts +16 -0
- package/api/types/Card.js +5 -0
- package/api/types/CardRcs.d.ts +12 -0
- package/api/types/CardRcs.js +5 -0
- package/api/types/CardRcsMessage.d.ts +13 -0
- package/api/types/CardRcsMessage.js +5 -0
- package/api/types/CardStyle.d.ts +16 -0
- package/api/types/CardStyle.js +5 -0
- package/api/types/CardStyleImageAlignment.d.ts +11 -0
- package/api/types/CardStyleImageAlignment.js +10 -0
- package/api/types/CardStyleMediaHeight.d.ts +12 -0
- package/api/types/CardStyleMediaHeight.js +11 -0
- package/api/types/CardStyleOrientation.d.ts +11 -0
- package/api/types/CardStyleOrientation.js +10 -0
- package/api/types/CardStyleWidth.d.ts +11 -0
- package/api/types/CardStyleWidth.js +10 -0
- package/api/types/CarouselRcs.d.ts +12 -0
- package/api/types/CarouselRcs.js +5 -0
- package/api/types/CarouselRcsMessage.d.ts +13 -0
- package/api/types/CarouselRcsMessage.js +5 -0
- package/api/types/CheckRcsCapabilityResponse.d.ts +7 -0
- package/api/types/CheckRcsCapabilityResponse.js +5 -0
- package/api/types/Event.d.ts +15 -0
- package/api/types/Event.js +5 -0
- package/api/types/GetAccountNumberResponse.d.ts +7 -0
- package/api/types/GetAccountNumberResponse.js +5 -0
- package/api/types/InternalServerErrorBody.d.ts +6 -0
- package/api/types/InternalServerErrorBody.js +5 -0
- package/api/types/LatLng.d.ts +12 -0
- package/api/types/LatLng.js +5 -0
- package/api/types/MediaRcs.d.ts +12 -0
- package/api/types/MediaRcs.js +5 -0
- package/api/types/MediaRcsMessage.d.ts +14 -0
- package/api/types/MediaRcsMessage.js +5 -0
- package/api/types/MediaType.d.ts +14 -0
- package/api/types/MediaType.js +13 -0
- package/api/types/PhoneNumber.d.ts +7 -0
- package/api/types/PhoneNumber.js +5 -0
- package/api/types/Postback.d.ts +11 -0
- package/api/types/Postback.js +5 -0
- package/api/types/SendRequest.d.ts +5 -0
- package/api/types/SendRequest.js +5 -0
- package/api/types/SendResponse.d.ts +7 -0
- package/api/types/SendResponse.js +5 -0
- package/api/types/ShareLocation.d.ts +7 -0
- package/api/types/ShareLocation.js +5 -0
- package/api/types/Sms.d.ts +12 -0
- package/api/types/Sms.js +5 -0
- package/api/types/SmsMessage.d.ts +12 -0
- package/api/types/SmsMessage.js +5 -0
- package/api/types/UnauthorizedErrorBody.d.ts +6 -0
- package/api/types/UnauthorizedErrorBody.js +5 -0
- package/api/types/UpdateSettingsResponse.d.ts +6 -0
- package/api/types/UpdateSettingsResponse.js +5 -0
- package/api/types/Url.d.ts +9 -0
- package/api/types/Url.js +5 -0
- package/api/types/ViewLocation.d.ts +11 -0
- package/api/types/ViewLocation.js +5 -0
- package/api/types/index.d.ts +34 -0
- package/api/types/index.js +50 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/APIResponse.js +2 -0
- package/core/fetcher/Fetcher.d.ts +39 -0
- package/core/fetcher/Fetcher.js +99 -0
- package/core/fetcher/Supplier.d.ts +4 -0
- package/core/fetcher/Supplier.js +22 -0
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +13 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +59 -0
- package/core/fetcher/getHeader.d.ts +1 -0
- package/core/fetcher/getHeader.js +12 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +52 -0
- package/core/fetcher/index.d.ts +5 -0
- package/core/fetcher/index.js +9 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +32 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +37 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/core/index.d.ts +3 -0
- package/core/index.js +32 -0
- package/core/runtime/index.d.ts +1 -0
- package/core/runtime/index.js +5 -0
- package/core/runtime/runtime.d.ts +9 -0
- package/core/runtime/runtime.js +93 -0
- package/core/schemas/Schema.d.ts +85 -0
- package/core/schemas/Schema.js +22 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +50 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/date/date.d.ts +2 -0
- package/core/schemas/builders/date/date.js +63 -0
- package/core/schemas/builders/date/index.d.ts +1 -0
- package/core/schemas/builders/date/index.js +5 -0
- package/core/schemas/builders/enum/enum.d.ts +2 -0
- package/core/schemas/builders/enum/enum.js +39 -0
- package/core/schemas/builders/enum/index.d.ts +1 -0
- package/core/schemas/builders/enum/index.js +5 -0
- package/core/schemas/builders/index.d.ts +14 -0
- package/core/schemas/builders/index.js +30 -0
- package/core/schemas/builders/lazy/index.d.ts +3 -0
- package/core/schemas/builders/lazy/index.js +7 -0
- package/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/core/schemas/builders/lazy/lazy.js +25 -0
- package/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/core/schemas/builders/lazy/lazyObject.js +12 -0
- package/core/schemas/builders/list/index.d.ts +1 -0
- package/core/schemas/builders/list/index.js +5 -0
- package/core/schemas/builders/list/list.d.ts +2 -0
- package/core/schemas/builders/list/list.js +55 -0
- package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/core/schemas/builders/literals/index.d.ts +2 -0
- package/core/schemas/builders/literals/index.js +7 -0
- package/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/stringLiteral.js +29 -0
- package/core/schemas/builders/object/index.d.ts +6 -0
- package/core/schemas/builders/object/index.js +11 -0
- package/core/schemas/builders/object/object.d.ts +3 -0
- package/core/schemas/builders/object/object.js +233 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/core/schemas/builders/object/property.d.ts +8 -0
- package/core/schemas/builders/object/property.js +16 -0
- package/core/schemas/builders/object/types.d.ts +26 -0
- package/core/schemas/builders/object/types.js +2 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +54 -0
- package/core/schemas/builders/object-like/index.d.ts +2 -0
- package/core/schemas/builders/object-like/index.js +6 -0
- package/core/schemas/builders/object-like/types.d.ts +7 -0
- package/core/schemas/builders/object-like/types.js +2 -0
- package/core/schemas/builders/primitives/any.d.ts +1 -0
- package/core/schemas/builders/primitives/any.js +6 -0
- package/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/core/schemas/builders/primitives/boolean.js +25 -0
- package/core/schemas/builders/primitives/index.d.ts +5 -0
- package/core/schemas/builders/primitives/index.js +13 -0
- package/core/schemas/builders/primitives/number.d.ts +1 -0
- package/core/schemas/builders/primitives/number.js +25 -0
- package/core/schemas/builders/primitives/string.d.ts +1 -0
- package/core/schemas/builders/primitives/string.js +25 -0
- package/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/core/schemas/builders/primitives/unknown.js +6 -0
- package/core/schemas/builders/record/index.d.ts +2 -0
- package/core/schemas/builders/record/index.js +5 -0
- package/core/schemas/builders/record/record.d.ts +3 -0
- package/core/schemas/builders/record/record.js +95 -0
- package/core/schemas/builders/record/types.d.ts +4 -0
- package/core/schemas/builders/record/types.js +2 -0
- package/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +82 -0
- package/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/core/schemas/builders/schema-utils/index.js +11 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
- package/core/schemas/builders/set/index.d.ts +1 -0
- package/core/schemas/builders/set/index.js +5 -0
- package/core/schemas/builders/set/set.d.ts +2 -0
- package/core/schemas/builders/set/set.js +44 -0
- package/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +40 -0
- package/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/core/schemas/builders/union/discriminant.js +10 -0
- package/core/schemas/builders/union/index.d.ts +4 -0
- package/core/schemas/builders/union/index.js +7 -0
- package/core/schemas/builders/union/types.d.ts +13 -0
- package/core/schemas/builders/union/types.js +2 -0
- package/core/schemas/builders/union/union.d.ts +4 -0
- package/core/schemas/builders/union/union.js +130 -0
- package/core/schemas/index.d.ts +2 -0
- package/core/schemas/index.js +17 -0
- package/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/core/schemas/utils/MaybePromise.js +2 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
- package/core/schemas/utils/entries.d.ts +1 -0
- package/core/schemas/utils/entries.js +7 -0
- package/core/schemas/utils/filterObject.d.ts +1 -0
- package/core/schemas/utils/filterObject.js +14 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +28 -0
- package/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/core/schemas/utils/isPlainObject.js +18 -0
- package/core/schemas/utils/keys.d.ts +1 -0
- package/core/schemas/utils/keys.js +7 -0
- package/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/core/schemas/utils/maybeSkipValidation.js +28 -0
- package/core/schemas/utils/partition.d.ts +1 -0
- package/core/schemas/utils/partition.js +16 -0
- package/dist/Client.d.ts +93 -0
- package/dist/Client.js +384 -0
- package/dist/api/client/index.d.ts +1 -0
- package/dist/api/client/index.js +17 -0
- package/dist/api/client/requests/CheckRcsCapabilityRequest.d.ts +21 -0
- package/dist/api/client/requests/CheckRcsCapabilityRequest.js +5 -0
- package/dist/api/client/requests/UpdateSettingsRequest.d.ts +13 -0
- package/dist/api/client/requests/UpdateSettingsRequest.js +5 -0
- package/dist/api/client/requests/index.d.ts +2 -0
- package/dist/api/client/requests/index.js +2 -0
- package/dist/api/errors/BadRequestError.d.ts +8 -0
- package/dist/api/errors/BadRequestError.js +41 -0
- package/dist/api/errors/InternalServerError.d.ts +8 -0
- package/dist/api/errors/InternalServerError.js +41 -0
- package/dist/api/errors/UnauthorizedError.d.ts +8 -0
- package/dist/api/errors/UnauthorizedError.js +41 -0
- package/dist/api/errors/index.d.ts +3 -0
- package/dist/api/errors/index.js +19 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +19 -0
- package/dist/api/types/Action.d.ts +5 -0
- package/dist/api/types/Action.js +5 -0
- package/dist/api/types/BadRequestErrorBody.d.ts +6 -0
- package/dist/api/types/BadRequestErrorBody.js +5 -0
- package/dist/api/types/BasicRcs.d.ts +13 -0
- package/dist/api/types/BasicRcs.js +5 -0
- package/dist/api/types/BasicRcsMessage.d.ts +10 -0
- package/dist/api/types/BasicRcsMessage.js +5 -0
- package/dist/api/types/Call.d.ts +9 -0
- package/dist/api/types/Call.js +5 -0
- package/dist/api/types/Card.d.ts +16 -0
- package/dist/api/types/Card.js +5 -0
- package/dist/api/types/CardRcs.d.ts +12 -0
- package/dist/api/types/CardRcs.js +5 -0
- package/dist/api/types/CardRcsMessage.d.ts +13 -0
- package/dist/api/types/CardRcsMessage.js +5 -0
- package/dist/api/types/CardStyle.d.ts +16 -0
- package/dist/api/types/CardStyle.js +5 -0
- package/dist/api/types/CardStyleImageAlignment.d.ts +11 -0
- package/dist/api/types/CardStyleImageAlignment.js +10 -0
- package/dist/api/types/CardStyleMediaHeight.d.ts +12 -0
- package/dist/api/types/CardStyleMediaHeight.js +11 -0
- package/dist/api/types/CardStyleOrientation.d.ts +11 -0
- package/dist/api/types/CardStyleOrientation.js +10 -0
- package/dist/api/types/CardStyleWidth.d.ts +11 -0
- package/dist/api/types/CardStyleWidth.js +10 -0
- package/dist/api/types/CarouselRcs.d.ts +12 -0
- package/dist/api/types/CarouselRcs.js +5 -0
- package/dist/api/types/CarouselRcsMessage.d.ts +13 -0
- package/dist/api/types/CarouselRcsMessage.js +5 -0
- package/dist/api/types/CheckRcsCapabilityResponse.d.ts +7 -0
- package/dist/api/types/CheckRcsCapabilityResponse.js +5 -0
- package/dist/api/types/Event.d.ts +15 -0
- package/dist/api/types/Event.js +5 -0
- package/dist/api/types/GetAccountNumberResponse.d.ts +7 -0
- package/dist/api/types/GetAccountNumberResponse.js +5 -0
- package/dist/api/types/InternalServerErrorBody.d.ts +6 -0
- package/dist/api/types/InternalServerErrorBody.js +5 -0
- package/dist/api/types/LatLng.d.ts +12 -0
- package/dist/api/types/LatLng.js +5 -0
- package/dist/api/types/MediaRcs.d.ts +12 -0
- package/dist/api/types/MediaRcs.js +5 -0
- package/dist/api/types/MediaRcsMessage.d.ts +14 -0
- package/dist/api/types/MediaRcsMessage.js +5 -0
- package/dist/api/types/MediaType.d.ts +14 -0
- package/dist/api/types/MediaType.js +13 -0
- package/dist/api/types/PhoneNumber.d.ts +7 -0
- package/dist/api/types/PhoneNumber.js +5 -0
- package/dist/api/types/Postback.d.ts +11 -0
- package/dist/api/types/Postback.js +5 -0
- package/dist/api/types/SendRequest.d.ts +5 -0
- package/dist/api/types/SendRequest.js +5 -0
- package/dist/api/types/SendResponse.d.ts +7 -0
- package/dist/api/types/SendResponse.js +5 -0
- package/dist/api/types/ShareLocation.d.ts +7 -0
- package/dist/api/types/ShareLocation.js +5 -0
- package/dist/api/types/Sms.d.ts +12 -0
- package/dist/api/types/Sms.js +5 -0
- package/dist/api/types/SmsMessage.d.ts +12 -0
- package/dist/api/types/SmsMessage.js +5 -0
- package/dist/api/types/UnauthorizedErrorBody.d.ts +6 -0
- package/dist/api/types/UnauthorizedErrorBody.js +5 -0
- package/dist/api/types/UpdateSettingsResponse.d.ts +6 -0
- package/dist/api/types/UpdateSettingsResponse.js +5 -0
- package/dist/api/types/Url.d.ts +9 -0
- package/dist/api/types/Url.js +5 -0
- package/dist/api/types/ViewLocation.d.ts +11 -0
- package/dist/api/types/ViewLocation.js +5 -0
- package/dist/api/types/index.d.ts +34 -0
- package/dist/api/types/index.js +50 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/APIResponse.js +2 -0
- package/dist/core/fetcher/Fetcher.d.ts +39 -0
- package/dist/core/fetcher/Fetcher.js +99 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +22 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +13 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +59 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +12 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +52 -0
- package/dist/core/fetcher/index.d.ts +5 -0
- package/dist/core/fetcher/index.js +9 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +32 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +37 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.js +32 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +9 -0
- package/dist/core/runtime/runtime.js +93 -0
- package/dist/core/schemas/Schema.d.ts +85 -0
- package/dist/core/schemas/Schema.js +22 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +50 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/date/date.d.ts +2 -0
- package/dist/core/schemas/builders/date/date.js +63 -0
- package/dist/core/schemas/builders/date/index.d.ts +1 -0
- package/dist/core/schemas/builders/date/index.js +5 -0
- package/dist/core/schemas/builders/enum/enum.d.ts +2 -0
- package/dist/core/schemas/builders/enum/enum.js +39 -0
- package/dist/core/schemas/builders/enum/index.d.ts +1 -0
- package/dist/core/schemas/builders/enum/index.js +5 -0
- package/dist/core/schemas/builders/index.d.ts +14 -0
- package/dist/core/schemas/builders/index.js +30 -0
- package/dist/core/schemas/builders/lazy/index.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/index.js +7 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/dist/core/schemas/builders/lazy/lazy.js +25 -0
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/lazyObject.js +12 -0
- package/dist/core/schemas/builders/list/index.d.ts +1 -0
- package/dist/core/schemas/builders/list/index.js +5 -0
- package/dist/core/schemas/builders/list/list.d.ts +2 -0
- package/dist/core/schemas/builders/list/list.js +55 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/dist/core/schemas/builders/literals/index.d.ts +2 -0
- package/dist/core/schemas/builders/literals/index.js +7 -0
- package/dist/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/stringLiteral.js +29 -0
- package/dist/core/schemas/builders/object/index.d.ts +6 -0
- package/dist/core/schemas/builders/object/index.js +11 -0
- package/dist/core/schemas/builders/object/object.d.ts +3 -0
- package/dist/core/schemas/builders/object/object.js +233 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/dist/core/schemas/builders/object/property.d.ts +8 -0
- package/dist/core/schemas/builders/object/property.js +16 -0
- package/dist/core/schemas/builders/object/types.d.ts +26 -0
- package/dist/core/schemas/builders/object/types.js +2 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +54 -0
- package/dist/core/schemas/builders/object-like/index.d.ts +2 -0
- package/dist/core/schemas/builders/object-like/index.js +6 -0
- package/dist/core/schemas/builders/object-like/types.d.ts +7 -0
- package/dist/core/schemas/builders/object-like/types.js +2 -0
- package/dist/core/schemas/builders/primitives/any.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/any.js +6 -0
- package/dist/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/boolean.js +25 -0
- package/dist/core/schemas/builders/primitives/index.d.ts +5 -0
- package/dist/core/schemas/builders/primitives/index.js +13 -0
- package/dist/core/schemas/builders/primitives/number.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/number.js +25 -0
- package/dist/core/schemas/builders/primitives/string.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/string.js +25 -0
- package/dist/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/unknown.js +6 -0
- package/dist/core/schemas/builders/record/index.d.ts +2 -0
- package/dist/core/schemas/builders/record/index.js +5 -0
- package/dist/core/schemas/builders/record/record.d.ts +3 -0
- package/dist/core/schemas/builders/record/record.js +95 -0
- package/dist/core/schemas/builders/record/types.d.ts +4 -0
- package/dist/core/schemas/builders/record/types.js +2 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +82 -0
- package/dist/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/index.js +11 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
- package/dist/core/schemas/builders/set/index.d.ts +1 -0
- package/dist/core/schemas/builders/set/index.js +5 -0
- package/dist/core/schemas/builders/set/set.d.ts +2 -0
- package/dist/core/schemas/builders/set/set.js +44 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +40 -0
- package/dist/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/dist/core/schemas/builders/union/discriminant.js +10 -0
- package/dist/core/schemas/builders/union/index.d.ts +4 -0
- package/dist/core/schemas/builders/union/index.js +7 -0
- package/dist/core/schemas/builders/union/types.d.ts +13 -0
- package/dist/core/schemas/builders/union/types.js +2 -0
- package/dist/core/schemas/builders/union/union.d.ts +4 -0
- package/dist/core/schemas/builders/union/union.js +130 -0
- package/dist/core/schemas/index.d.ts +2 -0
- package/dist/core/schemas/index.js +17 -0
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/dist/core/schemas/utils/MaybePromise.js +2 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
- package/dist/core/schemas/utils/entries.d.ts +1 -0
- package/dist/core/schemas/utils/entries.js +7 -0
- package/dist/core/schemas/utils/filterObject.d.ts +1 -0
- package/dist/core/schemas/utils/filterObject.js +14 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +28 -0
- package/dist/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/dist/core/schemas/utils/isPlainObject.js +18 -0
- package/dist/core/schemas/utils/keys.d.ts +1 -0
- package/dist/core/schemas/utils/keys.js +7 -0
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +28 -0
- package/dist/core/schemas/utils/partition.d.ts +1 -0
- package/dist/core/schemas/utils/partition.js +16 -0
- package/dist/environments.d.ts +7 -0
- package/dist/environments.js +9 -0
- package/dist/errors/PinnacleError.d.ts +12 -0
- package/dist/errors/PinnacleError.js +32 -0
- package/dist/errors/PinnacleTimeoutError.d.ts +6 -0
- package/dist/errors/PinnacleTimeoutError.js +13 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +32 -5
- package/dist/serialization/client/index.d.ts +1 -0
- package/dist/serialization/client/index.js +17 -0
- package/dist/serialization/client/requests/UpdateSettingsRequest.d.ts +12 -0
- package/dist/serialization/client/requests/UpdateSettingsRequest.js +33 -0
- package/dist/serialization/client/requests/index.d.ts +1 -0
- package/dist/serialization/client/requests/index.js +5 -0
- package/dist/serialization/index.d.ts +2 -0
- package/dist/serialization/index.js +18 -0
- package/dist/serialization/types/Action.d.ts +15 -0
- package/dist/serialization/types/Action.js +36 -0
- package/dist/serialization/types/BadRequestErrorBody.d.ts +12 -0
- package/dist/serialization/types/BadRequestErrorBody.js +33 -0
- package/dist/serialization/types/BasicRcs.d.ts +18 -0
- package/dist/serialization/types/BasicRcs.js +39 -0
- package/dist/serialization/types/BasicRcsMessage.d.ts +12 -0
- package/dist/serialization/types/BasicRcsMessage.js +33 -0
- package/dist/serialization/types/Call.d.ts +13 -0
- package/dist/serialization/types/Call.js +34 -0
- package/dist/serialization/types/Card.d.ts +18 -0
- package/dist/serialization/types/Card.js +39 -0
- package/dist/serialization/types/CardRcs.d.ts +16 -0
- package/dist/serialization/types/CardRcs.js +37 -0
- package/dist/serialization/types/CardRcsMessage.d.ts +15 -0
- package/dist/serialization/types/CardRcsMessage.js +36 -0
- package/dist/serialization/types/CardStyle.d.ts +20 -0
- package/dist/serialization/types/CardStyle.js +41 -0
- package/dist/serialization/types/CardStyleImageAlignment.d.ts +10 -0
- package/dist/serialization/types/CardStyleImageAlignment.js +31 -0
- package/dist/serialization/types/CardStyleMediaHeight.d.ts +10 -0
- package/dist/serialization/types/CardStyleMediaHeight.js +31 -0
- package/dist/serialization/types/CardStyleOrientation.d.ts +10 -0
- package/dist/serialization/types/CardStyleOrientation.js +31 -0
- package/dist/serialization/types/CardStyleWidth.d.ts +10 -0
- package/dist/serialization/types/CardStyleWidth.js +31 -0
- package/dist/serialization/types/CarouselRcs.d.ts +16 -0
- package/dist/serialization/types/CarouselRcs.js +37 -0
- package/dist/serialization/types/CarouselRcsMessage.d.ts +15 -0
- package/dist/serialization/types/CarouselRcsMessage.js +36 -0
- package/dist/serialization/types/CheckRcsCapabilityResponse.d.ts +13 -0
- package/dist/serialization/types/CheckRcsCapabilityResponse.js +34 -0
- package/dist/serialization/types/Event.d.ts +16 -0
- package/dist/serialization/types/Event.js +37 -0
- package/dist/serialization/types/GetAccountNumberResponse.d.ts +12 -0
- package/dist/serialization/types/GetAccountNumberResponse.js +33 -0
- package/dist/serialization/types/InternalServerErrorBody.d.ts +12 -0
- package/dist/serialization/types/InternalServerErrorBody.js +33 -0
- package/dist/serialization/types/LatLng.d.ts +13 -0
- package/dist/serialization/types/LatLng.js +34 -0
- package/dist/serialization/types/MediaRcs.d.ts +16 -0
- package/dist/serialization/types/MediaRcs.js +37 -0
- package/dist/serialization/types/MediaRcsMessage.d.ts +16 -0
- package/dist/serialization/types/MediaRcsMessage.js +37 -0
- package/dist/serialization/types/MediaType.d.ts +10 -0
- package/dist/serialization/types/MediaType.js +31 -0
- package/dist/serialization/types/PhoneNumber.d.ts +10 -0
- package/dist/serialization/types/PhoneNumber.js +31 -0
- package/dist/serialization/types/Postback.d.ts +14 -0
- package/dist/serialization/types/Postback.js +35 -0
- package/dist/serialization/types/SendRequest.d.ts +15 -0
- package/dist/serialization/types/SendRequest.js +36 -0
- package/dist/serialization/types/SendResponse.d.ts +12 -0
- package/dist/serialization/types/SendResponse.js +33 -0
- package/dist/serialization/types/ShareLocation.d.ts +12 -0
- package/dist/serialization/types/ShareLocation.js +33 -0
- package/dist/serialization/types/Sms.d.ts +16 -0
- package/dist/serialization/types/Sms.js +37 -0
- package/dist/serialization/types/SmsMessage.d.ts +13 -0
- package/dist/serialization/types/SmsMessage.js +34 -0
- package/dist/serialization/types/UnauthorizedErrorBody.d.ts +12 -0
- package/dist/serialization/types/UnauthorizedErrorBody.js +33 -0
- package/dist/serialization/types/UpdateSettingsResponse.d.ts +12 -0
- package/dist/serialization/types/UpdateSettingsResponse.js +33 -0
- package/dist/serialization/types/Url.d.ts +13 -0
- package/dist/serialization/types/Url.js +34 -0
- package/dist/serialization/types/ViewLocation.d.ts +15 -0
- package/dist/serialization/types/ViewLocation.js +36 -0
- package/dist/serialization/types/index.d.ts +34 -0
- package/dist/serialization/types/index.js +50 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/environments.d.ts +7 -0
- package/environments.js +9 -0
- package/errors/PinnacleError.d.ts +12 -0
- package/errors/PinnacleError.js +32 -0
- package/errors/PinnacleTimeoutError.d.ts +6 -0
- package/errors/PinnacleTimeoutError.js +13 -0
- package/errors/index.d.ts +2 -0
- package/errors/index.js +7 -0
- package/index.d.ts +4 -0
- package/index.js +34 -0
- package/jest.config.js +5 -0
- package/package.json +42 -24
- package/reference.md +76 -0
- package/serialization/client/index.d.ts +1 -0
- package/serialization/client/index.js +17 -0
- package/serialization/client/requests/UpdateSettingsRequest.d.ts +12 -0
- package/serialization/client/requests/UpdateSettingsRequest.js +33 -0
- package/serialization/client/requests/index.d.ts +1 -0
- package/serialization/client/requests/index.js +5 -0
- package/serialization/index.d.ts +2 -0
- package/serialization/index.js +18 -0
- package/serialization/types/Action.d.ts +15 -0
- package/serialization/types/Action.js +36 -0
- package/serialization/types/BadRequestErrorBody.d.ts +12 -0
- package/serialization/types/BadRequestErrorBody.js +33 -0
- package/serialization/types/BasicRcs.d.ts +18 -0
- package/serialization/types/BasicRcs.js +39 -0
- package/serialization/types/BasicRcsMessage.d.ts +12 -0
- package/serialization/types/BasicRcsMessage.js +33 -0
- package/serialization/types/Call.d.ts +13 -0
- package/serialization/types/Call.js +34 -0
- package/serialization/types/Card.d.ts +18 -0
- package/serialization/types/Card.js +39 -0
- package/serialization/types/CardRcs.d.ts +16 -0
- package/serialization/types/CardRcs.js +37 -0
- package/serialization/types/CardRcsMessage.d.ts +15 -0
- package/serialization/types/CardRcsMessage.js +36 -0
- package/serialization/types/CardStyle.d.ts +20 -0
- package/serialization/types/CardStyle.js +41 -0
- package/serialization/types/CardStyleImageAlignment.d.ts +10 -0
- package/serialization/types/CardStyleImageAlignment.js +31 -0
- package/serialization/types/CardStyleMediaHeight.d.ts +10 -0
- package/serialization/types/CardStyleMediaHeight.js +31 -0
- package/serialization/types/CardStyleOrientation.d.ts +10 -0
- package/serialization/types/CardStyleOrientation.js +31 -0
- package/serialization/types/CardStyleWidth.d.ts +10 -0
- package/serialization/types/CardStyleWidth.js +31 -0
- package/serialization/types/CarouselRcs.d.ts +16 -0
- package/serialization/types/CarouselRcs.js +37 -0
- package/serialization/types/CarouselRcsMessage.d.ts +15 -0
- package/serialization/types/CarouselRcsMessage.js +36 -0
- package/serialization/types/CheckRcsCapabilityResponse.d.ts +13 -0
- package/serialization/types/CheckRcsCapabilityResponse.js +34 -0
- package/serialization/types/Event.d.ts +16 -0
- package/serialization/types/Event.js +37 -0
- package/serialization/types/GetAccountNumberResponse.d.ts +12 -0
- package/serialization/types/GetAccountNumberResponse.js +33 -0
- package/serialization/types/InternalServerErrorBody.d.ts +12 -0
- package/serialization/types/InternalServerErrorBody.js +33 -0
- package/serialization/types/LatLng.d.ts +13 -0
- package/serialization/types/LatLng.js +34 -0
- package/serialization/types/MediaRcs.d.ts +16 -0
- package/serialization/types/MediaRcs.js +37 -0
- package/serialization/types/MediaRcsMessage.d.ts +16 -0
- package/serialization/types/MediaRcsMessage.js +37 -0
- package/serialization/types/MediaType.d.ts +10 -0
- package/serialization/types/MediaType.js +31 -0
- package/serialization/types/PhoneNumber.d.ts +10 -0
- package/serialization/types/PhoneNumber.js +31 -0
- package/serialization/types/Postback.d.ts +14 -0
- package/serialization/types/Postback.js +35 -0
- package/serialization/types/SendRequest.d.ts +15 -0
- package/serialization/types/SendRequest.js +36 -0
- package/serialization/types/SendResponse.d.ts +12 -0
- package/serialization/types/SendResponse.js +33 -0
- package/serialization/types/ShareLocation.d.ts +12 -0
- package/serialization/types/ShareLocation.js +33 -0
- package/serialization/types/Sms.d.ts +16 -0
- package/serialization/types/Sms.js +37 -0
- package/serialization/types/SmsMessage.d.ts +13 -0
- package/serialization/types/SmsMessage.js +34 -0
- package/serialization/types/UnauthorizedErrorBody.d.ts +12 -0
- package/serialization/types/UnauthorizedErrorBody.js +33 -0
- package/serialization/types/UpdateSettingsResponse.d.ts +12 -0
- package/serialization/types/UpdateSettingsResponse.js +33 -0
- package/serialization/types/Url.d.ts +13 -0
- package/serialization/types/Url.js +34 -0
- package/serialization/types/ViewLocation.d.ts +15 -0
- package/serialization/types/ViewLocation.js +36 -0
- package/serialization/types/index.d.ts +34 -0
- package/serialization/types/index.js +50 -0
- package/version.d.ts +1 -0
- package/version.js +4 -0
package/dist/Client.js
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.PinnacleClient = void 0;
|
|
42
|
+
const environments = __importStar(require("./environments"));
|
|
43
|
+
const core = __importStar(require("./core"));
|
|
44
|
+
const Pinnacle = __importStar(require("./api/index"));
|
|
45
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
46
|
+
const serializers = __importStar(require("./serialization/index"));
|
|
47
|
+
const errors = __importStar(require("./errors/index"));
|
|
48
|
+
class PinnacleClient {
|
|
49
|
+
constructor(_options) {
|
|
50
|
+
this._options = _options;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Checks if a phone number is able to receive RCS
|
|
54
|
+
*
|
|
55
|
+
* @param {Pinnacle.CheckRcsCapabilityRequest} request
|
|
56
|
+
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
+
*
|
|
58
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
59
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
60
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* await client.checkRcsCapability({
|
|
64
|
+
* phoneNumber: "phone_number"
|
|
65
|
+
* })
|
|
66
|
+
*/
|
|
67
|
+
checkRcsCapability(request, requestOptions) {
|
|
68
|
+
var _a;
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const { phoneNumber } = request;
|
|
71
|
+
const _queryParams = {};
|
|
72
|
+
_queryParams["phone_number"] = phoneNumber;
|
|
73
|
+
const _response = yield core.fetcher({
|
|
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
|
+
method: "GET",
|
|
76
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.2", "User-Agent": "rcs-js/1.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
77
|
+
contentType: "application/json",
|
|
78
|
+
queryParameters: _queryParams,
|
|
79
|
+
requestType: "json",
|
|
80
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
81
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
82
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
83
|
+
});
|
|
84
|
+
if (_response.ok) {
|
|
85
|
+
return serializers.CheckRcsCapabilityResponse.parseOrThrow(_response.body, {
|
|
86
|
+
unrecognizedObjectKeys: "passthrough",
|
|
87
|
+
allowUnrecognizedUnionMembers: true,
|
|
88
|
+
allowUnrecognizedEnumValues: true,
|
|
89
|
+
breadcrumbsPrefix: ["response"],
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (_response.error.reason === "status-code") {
|
|
93
|
+
switch (_response.error.statusCode) {
|
|
94
|
+
case 400:
|
|
95
|
+
throw new Pinnacle.BadRequestError(serializers.BadRequestErrorBody.parseOrThrow(_response.error.body, {
|
|
96
|
+
unrecognizedObjectKeys: "passthrough",
|
|
97
|
+
allowUnrecognizedUnionMembers: true,
|
|
98
|
+
allowUnrecognizedEnumValues: true,
|
|
99
|
+
breadcrumbsPrefix: ["response"],
|
|
100
|
+
}));
|
|
101
|
+
case 401:
|
|
102
|
+
throw new Pinnacle.UnauthorizedError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
|
|
103
|
+
unrecognizedObjectKeys: "passthrough",
|
|
104
|
+
allowUnrecognizedUnionMembers: true,
|
|
105
|
+
allowUnrecognizedEnumValues: true,
|
|
106
|
+
breadcrumbsPrefix: ["response"],
|
|
107
|
+
}));
|
|
108
|
+
case 500:
|
|
109
|
+
throw new Pinnacle.InternalServerError(serializers.InternalServerErrorBody.parseOrThrow(_response.error.body, {
|
|
110
|
+
unrecognizedObjectKeys: "passthrough",
|
|
111
|
+
allowUnrecognizedUnionMembers: true,
|
|
112
|
+
allowUnrecognizedEnumValues: true,
|
|
113
|
+
breadcrumbsPrefix: ["response"],
|
|
114
|
+
}));
|
|
115
|
+
default:
|
|
116
|
+
throw new errors.PinnacleError({
|
|
117
|
+
statusCode: _response.error.statusCode,
|
|
118
|
+
body: _response.error.body,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
switch (_response.error.reason) {
|
|
123
|
+
case "non-json":
|
|
124
|
+
throw new errors.PinnacleError({
|
|
125
|
+
statusCode: _response.error.statusCode,
|
|
126
|
+
body: _response.error.rawBody,
|
|
127
|
+
});
|
|
128
|
+
case "timeout":
|
|
129
|
+
throw new errors.PinnacleTimeoutError();
|
|
130
|
+
case "unknown":
|
|
131
|
+
throw new errors.PinnacleError({
|
|
132
|
+
message: _response.error.errorMessage,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Initializes settings related to RCS messaging, including webhook registration.
|
|
139
|
+
*
|
|
140
|
+
* @param {Pinnacle.UpdateSettingsRequest} request
|
|
141
|
+
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
142
|
+
*
|
|
143
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
144
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
145
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* await client.updateSettings({
|
|
149
|
+
* webhookUrl: "webhook_url"
|
|
150
|
+
* })
|
|
151
|
+
*/
|
|
152
|
+
updateSettings(request, requestOptions) {
|
|
153
|
+
var _a;
|
|
154
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
const _response = yield core.fetcher({
|
|
156
|
+
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
|
+
method: "POST",
|
|
158
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.2", "User-Agent": "rcs-js/1.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
159
|
+
contentType: "application/json",
|
|
160
|
+
requestType: "json",
|
|
161
|
+
body: serializers.UpdateSettingsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
162
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
163
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
164
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
165
|
+
});
|
|
166
|
+
if (_response.ok) {
|
|
167
|
+
return serializers.UpdateSettingsResponse.parseOrThrow(_response.body, {
|
|
168
|
+
unrecognizedObjectKeys: "passthrough",
|
|
169
|
+
allowUnrecognizedUnionMembers: true,
|
|
170
|
+
allowUnrecognizedEnumValues: true,
|
|
171
|
+
breadcrumbsPrefix: ["response"],
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
if (_response.error.reason === "status-code") {
|
|
175
|
+
switch (_response.error.statusCode) {
|
|
176
|
+
case 400:
|
|
177
|
+
throw new Pinnacle.BadRequestError(serializers.BadRequestErrorBody.parseOrThrow(_response.error.body, {
|
|
178
|
+
unrecognizedObjectKeys: "passthrough",
|
|
179
|
+
allowUnrecognizedUnionMembers: true,
|
|
180
|
+
allowUnrecognizedEnumValues: true,
|
|
181
|
+
breadcrumbsPrefix: ["response"],
|
|
182
|
+
}));
|
|
183
|
+
case 401:
|
|
184
|
+
throw new Pinnacle.UnauthorizedError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
|
|
185
|
+
unrecognizedObjectKeys: "passthrough",
|
|
186
|
+
allowUnrecognizedUnionMembers: true,
|
|
187
|
+
allowUnrecognizedEnumValues: true,
|
|
188
|
+
breadcrumbsPrefix: ["response"],
|
|
189
|
+
}));
|
|
190
|
+
case 500:
|
|
191
|
+
throw new Pinnacle.InternalServerError(serializers.InternalServerErrorBody.parseOrThrow(_response.error.body, {
|
|
192
|
+
unrecognizedObjectKeys: "passthrough",
|
|
193
|
+
allowUnrecognizedUnionMembers: true,
|
|
194
|
+
allowUnrecognizedEnumValues: true,
|
|
195
|
+
breadcrumbsPrefix: ["response"],
|
|
196
|
+
}));
|
|
197
|
+
default:
|
|
198
|
+
throw new errors.PinnacleError({
|
|
199
|
+
statusCode: _response.error.statusCode,
|
|
200
|
+
body: _response.error.body,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
switch (_response.error.reason) {
|
|
205
|
+
case "non-json":
|
|
206
|
+
throw new errors.PinnacleError({
|
|
207
|
+
statusCode: _response.error.statusCode,
|
|
208
|
+
body: _response.error.rawBody,
|
|
209
|
+
});
|
|
210
|
+
case "timeout":
|
|
211
|
+
throw new errors.PinnacleTimeoutError();
|
|
212
|
+
case "unknown":
|
|
213
|
+
throw new errors.PinnacleError({
|
|
214
|
+
message: _response.error.errorMessage,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Retrieve the phone number associated with the account.
|
|
221
|
+
*
|
|
222
|
+
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
223
|
+
*
|
|
224
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
225
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* await client.getAccountNumber()
|
|
229
|
+
*/
|
|
230
|
+
getAccountNumber(requestOptions) {
|
|
231
|
+
var _a;
|
|
232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
233
|
+
const _response = yield core.fetcher({
|
|
234
|
+
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
|
+
method: "GET",
|
|
236
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.2", "User-Agent": "rcs-js/1.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
237
|
+
contentType: "application/json",
|
|
238
|
+
requestType: "json",
|
|
239
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
240
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
241
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
242
|
+
});
|
|
243
|
+
if (_response.ok) {
|
|
244
|
+
return serializers.GetAccountNumberResponse.parseOrThrow(_response.body, {
|
|
245
|
+
unrecognizedObjectKeys: "passthrough",
|
|
246
|
+
allowUnrecognizedUnionMembers: true,
|
|
247
|
+
allowUnrecognizedEnumValues: true,
|
|
248
|
+
breadcrumbsPrefix: ["response"],
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
if (_response.error.reason === "status-code") {
|
|
252
|
+
switch (_response.error.statusCode) {
|
|
253
|
+
case 401:
|
|
254
|
+
throw new Pinnacle.UnauthorizedError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
|
|
255
|
+
unrecognizedObjectKeys: "passthrough",
|
|
256
|
+
allowUnrecognizedUnionMembers: true,
|
|
257
|
+
allowUnrecognizedEnumValues: true,
|
|
258
|
+
breadcrumbsPrefix: ["response"],
|
|
259
|
+
}));
|
|
260
|
+
case 500:
|
|
261
|
+
throw new Pinnacle.InternalServerError(serializers.InternalServerErrorBody.parseOrThrow(_response.error.body, {
|
|
262
|
+
unrecognizedObjectKeys: "passthrough",
|
|
263
|
+
allowUnrecognizedUnionMembers: true,
|
|
264
|
+
allowUnrecognizedEnumValues: true,
|
|
265
|
+
breadcrumbsPrefix: ["response"],
|
|
266
|
+
}));
|
|
267
|
+
default:
|
|
268
|
+
throw new errors.PinnacleError({
|
|
269
|
+
statusCode: _response.error.statusCode,
|
|
270
|
+
body: _response.error.body,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
switch (_response.error.reason) {
|
|
275
|
+
case "non-json":
|
|
276
|
+
throw new errors.PinnacleError({
|
|
277
|
+
statusCode: _response.error.statusCode,
|
|
278
|
+
body: _response.error.rawBody,
|
|
279
|
+
});
|
|
280
|
+
case "timeout":
|
|
281
|
+
throw new errors.PinnacleTimeoutError();
|
|
282
|
+
case "unknown":
|
|
283
|
+
throw new errors.PinnacleError({
|
|
284
|
+
message: _response.error.errorMessage,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Send a SMS or RCS message to a phone number
|
|
291
|
+
*
|
|
292
|
+
* @param {Pinnacle.SendRequest} request
|
|
293
|
+
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
294
|
+
*
|
|
295
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
296
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
297
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* await client.send({
|
|
301
|
+
* messageType: "card",
|
|
302
|
+
* message: {
|
|
303
|
+
* cards: [{
|
|
304
|
+
* title: "title",
|
|
305
|
+
* imageUrl: "image_url"
|
|
306
|
+
* }]
|
|
307
|
+
* }
|
|
308
|
+
* })
|
|
309
|
+
*/
|
|
310
|
+
send(request, requestOptions) {
|
|
311
|
+
var _a;
|
|
312
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
313
|
+
const _response = yield core.fetcher({
|
|
314
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send"),
|
|
315
|
+
method: "POST",
|
|
316
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.2", "User-Agent": "rcs-js/1.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
317
|
+
contentType: "application/json",
|
|
318
|
+
requestType: "json",
|
|
319
|
+
body: serializers.SendRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
320
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
321
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
322
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
323
|
+
});
|
|
324
|
+
if (_response.ok) {
|
|
325
|
+
return serializers.SendResponse.parseOrThrow(_response.body, {
|
|
326
|
+
unrecognizedObjectKeys: "passthrough",
|
|
327
|
+
allowUnrecognizedUnionMembers: true,
|
|
328
|
+
allowUnrecognizedEnumValues: true,
|
|
329
|
+
breadcrumbsPrefix: ["response"],
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
if (_response.error.reason === "status-code") {
|
|
333
|
+
switch (_response.error.statusCode) {
|
|
334
|
+
case 400:
|
|
335
|
+
throw new Pinnacle.BadRequestError(serializers.BadRequestErrorBody.parseOrThrow(_response.error.body, {
|
|
336
|
+
unrecognizedObjectKeys: "passthrough",
|
|
337
|
+
allowUnrecognizedUnionMembers: true,
|
|
338
|
+
allowUnrecognizedEnumValues: true,
|
|
339
|
+
breadcrumbsPrefix: ["response"],
|
|
340
|
+
}));
|
|
341
|
+
case 401:
|
|
342
|
+
throw new Pinnacle.UnauthorizedError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
|
|
343
|
+
unrecognizedObjectKeys: "passthrough",
|
|
344
|
+
allowUnrecognizedUnionMembers: true,
|
|
345
|
+
allowUnrecognizedEnumValues: true,
|
|
346
|
+
breadcrumbsPrefix: ["response"],
|
|
347
|
+
}));
|
|
348
|
+
case 500:
|
|
349
|
+
throw new Pinnacle.InternalServerError(serializers.InternalServerErrorBody.parseOrThrow(_response.error.body, {
|
|
350
|
+
unrecognizedObjectKeys: "passthrough",
|
|
351
|
+
allowUnrecognizedUnionMembers: true,
|
|
352
|
+
allowUnrecognizedEnumValues: true,
|
|
353
|
+
breadcrumbsPrefix: ["response"],
|
|
354
|
+
}));
|
|
355
|
+
default:
|
|
356
|
+
throw new errors.PinnacleError({
|
|
357
|
+
statusCode: _response.error.statusCode,
|
|
358
|
+
body: _response.error.body,
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
switch (_response.error.reason) {
|
|
363
|
+
case "non-json":
|
|
364
|
+
throw new errors.PinnacleError({
|
|
365
|
+
statusCode: _response.error.statusCode,
|
|
366
|
+
body: _response.error.rawBody,
|
|
367
|
+
});
|
|
368
|
+
case "timeout":
|
|
369
|
+
throw new errors.PinnacleTimeoutError();
|
|
370
|
+
case "unknown":
|
|
371
|
+
throw new errors.PinnacleError({
|
|
372
|
+
message: _response.error.errorMessage,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
_getCustomAuthorizationHeaders() {
|
|
378
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
379
|
+
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
380
|
+
return { "PINNACLE-API-Key": apiKeyValue };
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
exports.PinnacleClient = PinnacleClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
* phoneNumber: "phone_number"
|
|
9
|
+
* }
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* {
|
|
13
|
+
* phoneNumber: "phone_number"
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
16
|
+
export interface CheckRcsCapabilityRequest {
|
|
17
|
+
/**
|
|
18
|
+
* Phone number (E.164 format: [+][country code][subscriber number including area code]) to check for RCS capability. Example: +1234567890
|
|
19
|
+
*/
|
|
20
|
+
phoneNumber: Pinnacle.PhoneNumber;
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* webhookUrl: "webhook_url"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface UpdateSettingsRequest {
|
|
11
|
+
/** Webhook URL to receive inbound messages */
|
|
12
|
+
webhookUrl: string;
|
|
13
|
+
}
|
|
@@ -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 BadRequestError extends errors.PinnacleError {
|
|
7
|
+
constructor(body: Pinnacle.BadRequestErrorBody);
|
|
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.BadRequestError = void 0;
|
|
30
|
+
const errors = __importStar(require("../../errors/index"));
|
|
31
|
+
class BadRequestError extends errors.PinnacleError {
|
|
32
|
+
constructor(body) {
|
|
33
|
+
super({
|
|
34
|
+
message: "BadRequestError",
|
|
35
|
+
statusCode: 400,
|
|
36
|
+
body: body,
|
|
37
|
+
});
|
|
38
|
+
Object.setPrototypeOf(this, BadRequestError.prototype);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.BadRequestError = BadRequestError;
|
|
@@ -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 InternalServerError extends errors.PinnacleError {
|
|
7
|
+
constructor(body: Pinnacle.InternalServerErrorBody);
|
|
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.InternalServerError = void 0;
|
|
30
|
+
const errors = __importStar(require("../../errors/index"));
|
|
31
|
+
class InternalServerError extends errors.PinnacleError {
|
|
32
|
+
constructor(body) {
|
|
33
|
+
super({
|
|
34
|
+
message: "InternalServerError",
|
|
35
|
+
statusCode: 500,
|
|
36
|
+
body: body,
|
|
37
|
+
});
|
|
38
|
+
Object.setPrototypeOf(this, InternalServerError.prototype);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.InternalServerError = InternalServerError;
|
|
@@ -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 UnauthorizedError extends errors.PinnacleError {
|
|
7
|
+
constructor(body: Pinnacle.UnauthorizedErrorBody);
|
|
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.UnauthorizedError = void 0;
|
|
30
|
+
const errors = __importStar(require("../../errors/index"));
|
|
31
|
+
class UnauthorizedError extends errors.PinnacleError {
|
|
32
|
+
constructor(body) {
|
|
33
|
+
super({
|
|
34
|
+
message: "UnauthorizedError",
|
|
35
|
+
statusCode: 401,
|
|
36
|
+
body: body,
|
|
37
|
+
});
|
|
38
|
+
Object.setPrototypeOf(this, UnauthorizedError.prototype);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.UnauthorizedError = UnauthorizedError;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./BadRequestError"), exports);
|
|
18
|
+
__exportStar(require("./UnauthorizedError"), exports);
|
|
19
|
+
__exportStar(require("./InternalServerError"), exports);
|