rcs-js 1.0.8 → 1.0.10
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 +10 -126
- package/Client.js +15 -443
- package/README.md +30 -7
- package/api/client/requests/GetRcsFunctionalityRequest.d.ts +13 -0
- package/api/client/requests/index.d.ts +1 -5
- package/api/errors/ForbiddenError.d.ts +7 -0
- package/api/errors/{NotFoundError.js → ForbiddenError.js} +6 -6
- package/api/errors/index.d.ts +1 -1
- package/api/errors/index.js +1 -1
- package/api/index.d.ts +1 -0
- package/api/index.js +1 -0
- package/api/resources/company/client/Client.d.ts +96 -0
- package/api/resources/company/client/Client.js +289 -0
- package/api/resources/company/client/index.d.ts +1 -0
- package/api/resources/company/client/index.js +17 -0
- package/{dist/api/client/requests/GetCompanyRequest.d.ts → api/resources/company/client/requests/CompanyGetRequest.d.ts} +1 -1
- package/api/{client/requests/RegisterCompanyRequest.d.ts → resources/company/client/requests/CompanyRegisterRequest.d.ts} +2 -2
- package/{dist/api/client/requests/UpdateCompanyRequest.d.ts → api/resources/company/client/requests/CompanyUpdateRequest.d.ts} +2 -2
- package/api/resources/company/client/requests/index.d.ts +3 -0
- package/api/resources/company/client/requests/index.js +2 -0
- package/api/resources/company/index.d.ts +2 -0
- package/api/resources/company/index.js +18 -0
- package/api/resources/company/types/CompanyRegisterResponse.d.ts +7 -0
- package/api/resources/company/types/CompanyRegisterResponseBrand.d.ts +7 -0
- package/api/resources/company/types/CompanyUpdateResponse.d.ts +7 -0
- package/api/resources/company/types/CompanyUpdateResponseBrand.d.ts +7 -0
- package/api/resources/company/types/index.d.ts +4 -0
- package/api/resources/company/types/index.js +20 -0
- package/api/resources/index.d.ts +6 -0
- package/api/resources/index.js +35 -0
- package/api/resources/send/client/Client.d.ts +86 -0
- package/api/resources/send/client/Client.js +277 -0
- package/api/resources/send/client/index.d.ts +1 -0
- package/api/resources/send/client/index.js +17 -0
- package/api/resources/send/client/requests/Rcs.d.ts +43 -0
- package/api/resources/send/client/requests/SendMmsRequest.d.ts +22 -0
- package/api/resources/send/client/requests/SendSmsRequest.d.ts +19 -0
- package/api/resources/send/client/requests/index.d.ts +3 -0
- package/api/resources/send/client/requests/index.js +2 -0
- package/api/resources/send/index.d.ts +2 -0
- package/api/resources/send/index.js +18 -0
- package/api/resources/send/types/SendMmsResponse.d.ts +9 -0
- package/api/resources/send/types/SendRcsResponse.d.ts +9 -0
- package/api/resources/send/types/SendSmsResponse.d.ts +9 -0
- package/api/resources/send/types/index.d.ts +3 -0
- package/api/resources/send/types/index.js +19 -0
- package/api/types/Action.d.ts +20 -1
- package/api/types/ActionLatLong.d.ts +12 -0
- package/api/types/ActionType.d.ts +15 -0
- package/api/types/ActionType.js +14 -0
- package/api/types/BadRequestErrorBody.d.ts +1 -3
- package/api/types/Card.d.ts +5 -7
- package/api/types/{NotFoundErrorBody.d.ts → ForbiddenErrorBody.d.ts} +2 -2
- package/api/types/InternalServerErrorBody.d.ts +1 -2
- package/api/types/RcsFunctionalities.d.ts +21 -0
- package/api/types/UnauthorizedErrorBody.d.ts +1 -1
- package/api/types/index.d.ts +6 -37
- package/api/types/index.js +6 -37
- package/dist/Client.d.ts +10 -126
- package/dist/Client.js +15 -443
- package/dist/api/client/requests/GetRcsFunctionalityRequest.d.ts +13 -0
- package/dist/api/client/requests/index.d.ts +1 -5
- package/dist/api/errors/ForbiddenError.d.ts +7 -0
- package/dist/api/errors/{NotFoundError.js → ForbiddenError.js} +6 -6
- package/dist/api/errors/index.d.ts +1 -1
- package/dist/api/errors/index.js +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/resources/company/client/Client.d.ts +96 -0
- package/dist/api/resources/company/client/Client.js +289 -0
- package/dist/api/resources/company/client/index.d.ts +1 -0
- package/dist/api/resources/company/client/index.js +17 -0
- package/{api/client/requests/GetCompanyRequest.d.ts → dist/api/resources/company/client/requests/CompanyGetRequest.d.ts} +1 -1
- package/dist/api/{client/requests/RegisterCompanyRequest.d.ts → resources/company/client/requests/CompanyRegisterRequest.d.ts} +2 -2
- package/{api/client/requests/UpdateCompanyRequest.d.ts → dist/api/resources/company/client/requests/CompanyUpdateRequest.d.ts} +2 -2
- package/dist/api/resources/company/client/requests/index.d.ts +3 -0
- package/dist/api/resources/company/client/requests/index.js +2 -0
- package/dist/api/resources/company/index.d.ts +2 -0
- package/dist/api/resources/company/index.js +18 -0
- package/dist/api/resources/company/types/CompanyRegisterResponse.d.ts +7 -0
- package/dist/api/resources/company/types/CompanyRegisterResponseBrand.d.ts +7 -0
- package/dist/api/resources/company/types/CompanyUpdateResponse.d.ts +7 -0
- package/dist/api/resources/company/types/CompanyUpdateResponseBrand.d.ts +7 -0
- package/dist/api/resources/company/types/index.d.ts +4 -0
- package/dist/api/resources/company/types/index.js +20 -0
- package/dist/api/resources/index.d.ts +6 -0
- package/dist/api/resources/index.js +35 -0
- package/dist/api/resources/send/client/Client.d.ts +86 -0
- package/dist/api/resources/send/client/Client.js +277 -0
- package/dist/api/resources/send/client/index.d.ts +1 -0
- package/dist/api/resources/send/client/index.js +17 -0
- package/dist/api/resources/send/client/requests/Rcs.d.ts +43 -0
- package/dist/api/resources/send/client/requests/SendMmsRequest.d.ts +22 -0
- package/dist/api/resources/send/client/requests/SendSmsRequest.d.ts +19 -0
- package/dist/api/resources/send/client/requests/index.d.ts +3 -0
- package/dist/api/resources/send/client/requests/index.js +2 -0
- package/dist/api/resources/send/index.d.ts +2 -0
- package/dist/api/resources/send/index.js +18 -0
- package/dist/api/resources/send/types/SendMmsResponse.d.ts +9 -0
- package/dist/api/resources/send/types/SendRcsResponse.d.ts +9 -0
- package/dist/api/resources/send/types/SendSmsResponse.d.ts +9 -0
- package/dist/api/resources/send/types/index.d.ts +3 -0
- package/dist/api/resources/send/types/index.js +19 -0
- package/dist/api/types/Action.d.ts +20 -1
- package/dist/api/types/ActionLatLong.d.ts +12 -0
- package/dist/api/types/ActionType.d.ts +15 -0
- package/dist/api/types/ActionType.js +14 -0
- package/dist/api/types/BadRequestErrorBody.d.ts +1 -3
- package/dist/api/types/Card.d.ts +5 -7
- package/dist/api/types/{NotFoundErrorBody.d.ts → ForbiddenErrorBody.d.ts} +2 -2
- package/dist/api/types/InternalServerErrorBody.d.ts +1 -2
- package/dist/api/types/RcsFunctionalities.d.ts +21 -0
- package/dist/api/types/UnauthorizedErrorBody.d.ts +1 -1
- package/dist/api/types/index.d.ts +6 -37
- package/dist/api/types/index.js +6 -37
- package/dist/serialization/index.d.ts +1 -1
- package/dist/serialization/index.js +1 -1
- package/dist/serialization/resources/company/client/get.d.ts +11 -0
- package/dist/serialization/{client/getCompany.js → resources/company/client/get.js} +2 -2
- package/dist/serialization/resources/company/client/index.d.ts +2 -0
- package/{serialization → dist/serialization/resources/company}/client/index.js +2 -2
- package/dist/serialization/resources/company/client/requests/CompanyRegisterRequest.d.ts +19 -0
- package/{serialization/client/requests/RegisterCompanyRequest.js → dist/serialization/resources/company/client/requests/CompanyRegisterRequest.js} +7 -7
- package/dist/serialization/resources/company/client/requests/CompanyUpdateRequest.d.ts +20 -0
- package/dist/serialization/{client/requests/UpdateCompanyRequest.js → resources/company/client/requests/CompanyUpdateRequest.js} +7 -7
- package/dist/serialization/resources/company/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/company/client/requests/index.js +7 -0
- package/dist/serialization/resources/company/index.d.ts +2 -0
- package/dist/serialization/resources/company/index.js +18 -0
- package/dist/serialization/resources/company/types/CompanyRegisterResponse.d.ts +13 -0
- package/dist/serialization/resources/company/types/CompanyRegisterResponse.js +34 -0
- package/dist/serialization/resources/company/types/CompanyRegisterResponseBrand.d.ts +13 -0
- package/dist/serialization/resources/company/types/CompanyRegisterResponseBrand.js +34 -0
- package/dist/serialization/resources/company/types/CompanyUpdateResponse.d.ts +13 -0
- package/dist/serialization/{types/CheckRcsCapabilityResponse.js → resources/company/types/CompanyUpdateResponse.js} +5 -5
- package/dist/serialization/resources/company/types/CompanyUpdateResponseBrand.d.ts +13 -0
- package/dist/serialization/{client/requests/UpdateSettingsRequest.js → resources/company/types/CompanyUpdateResponseBrand.js} +5 -4
- package/dist/serialization/resources/company/types/index.d.ts +4 -0
- package/dist/serialization/resources/company/types/index.js +20 -0
- package/dist/serialization/resources/index.d.ts +6 -0
- package/dist/serialization/resources/index.js +35 -0
- package/dist/serialization/resources/send/client/index.d.ts +1 -0
- package/dist/serialization/resources/send/client/index.js +17 -0
- package/dist/serialization/resources/send/client/requests/Rcs.d.ts +19 -0
- package/dist/serialization/{types/SmsMessage.js → resources/send/client/requests/Rcs.js} +10 -4
- package/dist/serialization/resources/send/client/requests/SendMmsRequest.d.ts +15 -0
- package/dist/serialization/resources/send/client/requests/SendMmsRequest.js +36 -0
- package/dist/serialization/resources/send/client/requests/SendSmsRequest.d.ts +14 -0
- package/{serialization/types/BasicRcsMessage.js → dist/serialization/resources/send/client/requests/SendSmsRequest.js} +5 -3
- package/dist/serialization/resources/send/client/requests/index.d.ts +3 -0
- package/dist/serialization/resources/send/client/requests/index.js +9 -0
- package/dist/serialization/resources/send/index.d.ts +2 -0
- package/dist/serialization/resources/send/index.js +18 -0
- package/dist/serialization/resources/send/types/SendMmsResponse.d.ts +13 -0
- package/dist/serialization/resources/send/types/SendMmsResponse.js +34 -0
- package/dist/serialization/resources/send/types/SendRcsResponse.d.ts +13 -0
- package/dist/serialization/resources/send/types/SendRcsResponse.js +34 -0
- package/dist/serialization/resources/send/types/SendSmsResponse.d.ts +13 -0
- package/dist/serialization/resources/send/types/SendSmsResponse.js +34 -0
- package/dist/serialization/resources/send/types/index.d.ts +3 -0
- package/dist/serialization/resources/send/types/index.js +19 -0
- package/dist/serialization/types/Action.d.ts +14 -7
- package/dist/serialization/types/Action.js +13 -6
- package/dist/serialization/types/{LatLng.d.ts → ActionLatLong.d.ts} +4 -4
- package/dist/serialization/types/{NotFoundErrorBody.js → ActionLatLong.js} +4 -3
- package/dist/serialization/types/ActionType.d.ts +10 -0
- package/dist/serialization/types/{CardStyleImageAlignment.js → ActionType.js} +2 -2
- package/dist/serialization/types/BadRequestErrorBody.d.ts +1 -3
- package/dist/serialization/types/BadRequestErrorBody.js +1 -3
- package/dist/serialization/types/Card.d.ts +1 -3
- package/dist/serialization/types/Card.js +1 -3
- package/dist/serialization/types/{NotFoundErrorBody.d.ts → ForbiddenErrorBody.d.ts} +3 -3
- package/dist/serialization/types/{GetAccountNumberResponse.js → ForbiddenErrorBody.js} +3 -3
- package/dist/serialization/types/InternalServerErrorBody.d.ts +1 -2
- package/dist/serialization/types/InternalServerErrorBody.js +1 -2
- package/dist/serialization/types/RcsFunctionalities.d.ts +19 -0
- package/dist/serialization/types/{BadRequestErrorBodyError.js → RcsFunctionalities.js} +10 -7
- package/dist/serialization/types/UnauthorizedErrorBody.d.ts +1 -1
- package/dist/serialization/types/UnauthorizedErrorBody.js +1 -1
- package/dist/serialization/types/index.d.ts +6 -37
- package/dist/serialization/types/index.js +6 -37
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +426 -5
- package/serialization/index.d.ts +1 -1
- package/serialization/index.js +1 -1
- package/serialization/resources/company/client/get.d.ts +11 -0
- package/serialization/{client/getCompany.js → resources/company/client/get.js} +2 -2
- package/serialization/resources/company/client/index.d.ts +2 -0
- package/{dist/serialization → serialization/resources/company}/client/index.js +2 -2
- package/serialization/resources/company/client/requests/CompanyRegisterRequest.d.ts +19 -0
- package/{dist/serialization/client/requests/RegisterCompanyRequest.js → serialization/resources/company/client/requests/CompanyRegisterRequest.js} +7 -7
- package/serialization/resources/company/client/requests/CompanyUpdateRequest.d.ts +20 -0
- package/serialization/{client/requests/UpdateCompanyRequest.js → resources/company/client/requests/CompanyUpdateRequest.js} +7 -7
- package/serialization/resources/company/client/requests/index.d.ts +2 -0
- package/serialization/resources/company/client/requests/index.js +7 -0
- package/serialization/resources/company/index.d.ts +2 -0
- package/serialization/resources/company/index.js +18 -0
- package/serialization/resources/company/types/CompanyRegisterResponse.d.ts +13 -0
- package/serialization/resources/company/types/CompanyRegisterResponse.js +34 -0
- package/serialization/resources/company/types/CompanyRegisterResponseBrand.d.ts +13 -0
- package/serialization/resources/company/types/CompanyRegisterResponseBrand.js +34 -0
- package/serialization/resources/company/types/CompanyUpdateResponse.d.ts +13 -0
- package/{dist/serialization/types/Call.js → serialization/resources/company/types/CompanyUpdateResponse.js} +5 -6
- package/serialization/resources/company/types/CompanyUpdateResponseBrand.d.ts +13 -0
- package/serialization/resources/company/types/CompanyUpdateResponseBrand.js +34 -0
- package/serialization/resources/company/types/index.d.ts +4 -0
- package/serialization/resources/company/types/index.js +20 -0
- package/serialization/resources/index.d.ts +6 -0
- package/serialization/resources/index.js +35 -0
- package/serialization/resources/send/client/index.d.ts +1 -0
- package/serialization/resources/send/client/index.js +17 -0
- package/serialization/resources/send/client/requests/Rcs.d.ts +19 -0
- package/serialization/{types/SmsMessage.js → resources/send/client/requests/Rcs.js} +10 -4
- package/serialization/resources/send/client/requests/SendMmsRequest.d.ts +15 -0
- package/serialization/resources/send/client/requests/SendMmsRequest.js +36 -0
- package/serialization/resources/send/client/requests/SendSmsRequest.d.ts +14 -0
- package/serialization/resources/send/client/requests/SendSmsRequest.js +35 -0
- package/serialization/resources/send/client/requests/index.d.ts +3 -0
- package/serialization/resources/send/client/requests/index.js +9 -0
- package/serialization/resources/send/index.d.ts +2 -0
- package/serialization/resources/send/index.js +18 -0
- package/serialization/resources/send/types/SendMmsResponse.d.ts +13 -0
- package/serialization/resources/send/types/SendMmsResponse.js +34 -0
- package/serialization/resources/send/types/SendRcsResponse.d.ts +13 -0
- package/serialization/resources/send/types/SendRcsResponse.js +34 -0
- package/serialization/resources/send/types/SendSmsResponse.d.ts +13 -0
- package/serialization/resources/send/types/SendSmsResponse.js +34 -0
- package/serialization/resources/send/types/index.d.ts +3 -0
- package/serialization/resources/send/types/index.js +19 -0
- package/serialization/types/Action.d.ts +14 -7
- package/serialization/types/Action.js +13 -6
- package/{dist/serialization/types/Call.d.ts → serialization/types/ActionLatLong.d.ts} +4 -5
- package/{dist/serialization/types/BasicRcsMessage.js → serialization/types/ActionLatLong.js} +4 -3
- package/serialization/types/ActionType.d.ts +10 -0
- package/{dist/serialization/types/CardStyleMediaHeight.js → serialization/types/ActionType.js} +2 -2
- package/serialization/types/BadRequestErrorBody.d.ts +1 -3
- package/serialization/types/BadRequestErrorBody.js +1 -3
- package/serialization/types/Card.d.ts +1 -3
- package/serialization/types/Card.js +1 -3
- package/{dist/serialization/types/BasicRcsMessage.d.ts → serialization/types/ForbiddenErrorBody.d.ts} +3 -3
- package/{dist/serialization/types/LatLng.js → serialization/types/ForbiddenErrorBody.js} +3 -4
- package/serialization/types/InternalServerErrorBody.d.ts +1 -2
- package/serialization/types/InternalServerErrorBody.js +1 -2
- package/serialization/types/RcsFunctionalities.d.ts +19 -0
- package/{dist/serialization/types/BasicRcs.js → serialization/types/RcsFunctionalities.js} +10 -9
- package/serialization/types/UnauthorizedErrorBody.d.ts +1 -1
- package/serialization/types/UnauthorizedErrorBody.js +1 -1
- package/serialization/types/index.d.ts +6 -37
- package/serialization/types/index.js +6 -37
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/client/requests/CheckRcsCapabilityRequest.d.ts +0 -21
- package/api/client/requests/UpdateSettingsRequest.d.ts +0 -13
- package/api/errors/NotFoundError.d.ts +0 -8
- package/api/types/BadRequestErrorBodyError.d.ts +0 -10
- package/api/types/BasicRcs.d.ts +0 -13
- package/api/types/BasicRcsMessage.d.ts +0 -10
- package/api/types/Call.d.ts +0 -11
- package/api/types/CardRcs.d.ts +0 -12
- package/api/types/CardRcsMessage.d.ts +0 -13
- package/api/types/CardStyle.d.ts +0 -16
- package/api/types/CardStyleImageAlignment.d.ts +0 -11
- package/api/types/CardStyleImageAlignment.js +0 -10
- package/api/types/CardStyleMediaHeight.d.ts +0 -12
- package/api/types/CardStyleMediaHeight.js +0 -11
- package/api/types/CardStyleOrientation.d.ts +0 -11
- package/api/types/CardStyleOrientation.js +0 -10
- package/api/types/CardStyleWidth.d.ts +0 -11
- package/api/types/CardStyleWidth.js +0 -10
- package/api/types/CarouselRcs.d.ts +0 -12
- package/api/types/CarouselRcsMessage.d.ts +0 -13
- package/api/types/CheckRcsCapabilityResponse.d.ts +0 -7
- package/api/types/Event.d.ts +0 -17
- package/api/types/GetAccountNumberResponse.d.ts +0 -7
- package/api/types/LatLng.d.ts +0 -12
- package/api/types/MediaRcs.d.ts +0 -12
- package/api/types/MediaRcsMessage.d.ts +0 -14
- package/api/types/MediaType.d.ts +0 -14
- package/api/types/MediaType.js +0 -13
- package/api/types/PhoneNumber.d.ts +0 -7
- package/api/types/Postback.d.ts +0 -13
- package/api/types/RegisterCompanyResponse.d.ts +0 -8
- package/api/types/RegisterCompanyResponseBrand.d.ts +0 -7
- package/api/types/SendMessageRequest.d.ts +0 -5
- package/api/types/SendMessageResponse.d.ts +0 -7
- package/api/types/ShareLocation.d.ts +0 -9
- package/api/types/Sms.d.ts +0 -12
- package/api/types/SmsMessage.d.ts +0 -12
- package/api/types/UpdateCompanyResponse.d.ts +0 -8
- package/api/types/UpdateCompanyResponseBrand.d.ts +0 -7
- package/api/types/UpdateSettingsResponse.d.ts +0 -6
- package/api/types/Url.d.ts +0 -11
- package/api/types/ViewLocation.d.ts +0 -13
- package/api/types/ViewLocation.js +0 -5
- package/dist/api/client/requests/CheckRcsCapabilityRequest.d.ts +0 -21
- package/dist/api/client/requests/CheckRcsCapabilityRequest.js +0 -5
- package/dist/api/client/requests/GetCompanyRequest.js +0 -5
- package/dist/api/client/requests/RegisterCompanyRequest.js +0 -5
- package/dist/api/client/requests/UpdateCompanyRequest.js +0 -5
- package/dist/api/client/requests/UpdateSettingsRequest.d.ts +0 -13
- package/dist/api/client/requests/UpdateSettingsRequest.js +0 -5
- package/dist/api/errors/NotFoundError.d.ts +0 -8
- package/dist/api/types/BadRequestErrorBodyError.d.ts +0 -10
- package/dist/api/types/BadRequestErrorBodyError.js +0 -5
- package/dist/api/types/BasicRcs.d.ts +0 -13
- package/dist/api/types/BasicRcs.js +0 -5
- package/dist/api/types/BasicRcsMessage.d.ts +0 -10
- package/dist/api/types/BasicRcsMessage.js +0 -5
- package/dist/api/types/Call.d.ts +0 -11
- package/dist/api/types/Call.js +0 -5
- package/dist/api/types/CardRcs.d.ts +0 -12
- package/dist/api/types/CardRcs.js +0 -5
- package/dist/api/types/CardRcsMessage.d.ts +0 -13
- package/dist/api/types/CardRcsMessage.js +0 -5
- package/dist/api/types/CardStyle.d.ts +0 -16
- package/dist/api/types/CardStyle.js +0 -5
- package/dist/api/types/CardStyleImageAlignment.d.ts +0 -11
- package/dist/api/types/CardStyleImageAlignment.js +0 -10
- package/dist/api/types/CardStyleMediaHeight.d.ts +0 -12
- package/dist/api/types/CardStyleMediaHeight.js +0 -11
- package/dist/api/types/CardStyleOrientation.d.ts +0 -11
- package/dist/api/types/CardStyleOrientation.js +0 -10
- package/dist/api/types/CardStyleWidth.d.ts +0 -11
- package/dist/api/types/CardStyleWidth.js +0 -10
- package/dist/api/types/CarouselRcs.d.ts +0 -12
- package/dist/api/types/CarouselRcs.js +0 -5
- package/dist/api/types/CarouselRcsMessage.d.ts +0 -13
- package/dist/api/types/CarouselRcsMessage.js +0 -5
- package/dist/api/types/CheckRcsCapabilityResponse.d.ts +0 -7
- package/dist/api/types/CheckRcsCapabilityResponse.js +0 -5
- package/dist/api/types/Event.d.ts +0 -17
- package/dist/api/types/Event.js +0 -5
- package/dist/api/types/GetAccountNumberResponse.d.ts +0 -7
- package/dist/api/types/GetAccountNumberResponse.js +0 -5
- package/dist/api/types/LatLng.d.ts +0 -12
- package/dist/api/types/LatLng.js +0 -5
- package/dist/api/types/MediaRcs.d.ts +0 -12
- package/dist/api/types/MediaRcs.js +0 -5
- package/dist/api/types/MediaRcsMessage.d.ts +0 -14
- package/dist/api/types/MediaRcsMessage.js +0 -5
- package/dist/api/types/MediaType.d.ts +0 -14
- package/dist/api/types/MediaType.js +0 -13
- package/dist/api/types/NotFoundErrorBody.js +0 -5
- package/dist/api/types/PhoneNumber.d.ts +0 -7
- package/dist/api/types/PhoneNumber.js +0 -5
- package/dist/api/types/Postback.d.ts +0 -13
- package/dist/api/types/Postback.js +0 -5
- package/dist/api/types/RegisterCompanyResponse.d.ts +0 -8
- package/dist/api/types/RegisterCompanyResponse.js +0 -5
- package/dist/api/types/RegisterCompanyResponseBrand.d.ts +0 -7
- package/dist/api/types/RegisterCompanyResponseBrand.js +0 -5
- package/dist/api/types/SendMessageRequest.d.ts +0 -5
- package/dist/api/types/SendMessageRequest.js +0 -5
- package/dist/api/types/SendMessageResponse.d.ts +0 -7
- package/dist/api/types/SendMessageResponse.js +0 -5
- package/dist/api/types/ShareLocation.d.ts +0 -9
- package/dist/api/types/ShareLocation.js +0 -5
- package/dist/api/types/Sms.d.ts +0 -12
- package/dist/api/types/Sms.js +0 -5
- package/dist/api/types/SmsMessage.d.ts +0 -12
- package/dist/api/types/SmsMessage.js +0 -5
- package/dist/api/types/UpdateCompanyResponse.d.ts +0 -8
- package/dist/api/types/UpdateCompanyResponse.js +0 -5
- package/dist/api/types/UpdateCompanyResponseBrand.d.ts +0 -7
- package/dist/api/types/UpdateCompanyResponseBrand.js +0 -5
- package/dist/api/types/UpdateSettingsResponse.d.ts +0 -6
- package/dist/api/types/UpdateSettingsResponse.js +0 -5
- package/dist/api/types/Url.d.ts +0 -11
- package/dist/api/types/Url.js +0 -5
- package/dist/api/types/ViewLocation.d.ts +0 -13
- package/dist/api/types/ViewLocation.js +0 -5
- package/dist/serialization/client/getCompany.d.ts +0 -11
- package/dist/serialization/client/index.d.ts +0 -2
- package/dist/serialization/client/requests/RegisterCompanyRequest.d.ts +0 -19
- package/dist/serialization/client/requests/UpdateCompanyRequest.d.ts +0 -20
- package/dist/serialization/client/requests/UpdateSettingsRequest.d.ts +0 -12
- package/dist/serialization/client/requests/index.d.ts +0 -3
- package/dist/serialization/client/requests/index.js +0 -9
- package/dist/serialization/types/BadRequestErrorBodyError.d.ts +0 -16
- package/dist/serialization/types/BasicRcs.d.ts +0 -18
- package/dist/serialization/types/CardRcs.d.ts +0 -16
- package/dist/serialization/types/CardRcs.js +0 -37
- package/dist/serialization/types/CardRcsMessage.d.ts +0 -15
- package/dist/serialization/types/CardRcsMessage.js +0 -36
- package/dist/serialization/types/CardStyle.d.ts +0 -20
- package/dist/serialization/types/CardStyle.js +0 -41
- package/dist/serialization/types/CardStyleImageAlignment.d.ts +0 -10
- package/dist/serialization/types/CardStyleMediaHeight.d.ts +0 -10
- package/dist/serialization/types/CardStyleOrientation.d.ts +0 -10
- package/dist/serialization/types/CardStyleOrientation.js +0 -31
- package/dist/serialization/types/CardStyleWidth.d.ts +0 -10
- package/dist/serialization/types/CardStyleWidth.js +0 -31
- package/dist/serialization/types/CarouselRcs.d.ts +0 -16
- package/dist/serialization/types/CarouselRcs.js +0 -37
- package/dist/serialization/types/CarouselRcsMessage.d.ts +0 -15
- package/dist/serialization/types/CarouselRcsMessage.js +0 -36
- package/dist/serialization/types/CheckRcsCapabilityResponse.d.ts +0 -13
- package/dist/serialization/types/Event.d.ts +0 -17
- package/dist/serialization/types/Event.js +0 -38
- package/dist/serialization/types/GetAccountNumberResponse.d.ts +0 -12
- package/dist/serialization/types/MediaRcs.d.ts +0 -16
- package/dist/serialization/types/MediaRcs.js +0 -37
- package/dist/serialization/types/MediaRcsMessage.d.ts +0 -16
- package/dist/serialization/types/MediaRcsMessage.js +0 -37
- package/dist/serialization/types/MediaType.d.ts +0 -10
- package/dist/serialization/types/MediaType.js +0 -31
- package/dist/serialization/types/PhoneNumber.d.ts +0 -10
- package/dist/serialization/types/PhoneNumber.js +0 -31
- package/dist/serialization/types/Postback.d.ts +0 -15
- package/dist/serialization/types/Postback.js +0 -36
- package/dist/serialization/types/RegisterCompanyResponse.d.ts +0 -14
- package/dist/serialization/types/RegisterCompanyResponse.js +0 -35
- package/dist/serialization/types/RegisterCompanyResponseBrand.d.ts +0 -13
- package/dist/serialization/types/RegisterCompanyResponseBrand.js +0 -34
- package/dist/serialization/types/SendMessageRequest.d.ts +0 -15
- package/dist/serialization/types/SendMessageRequest.js +0 -36
- package/dist/serialization/types/SendMessageResponse.d.ts +0 -12
- package/dist/serialization/types/SendMessageResponse.js +0 -33
- package/dist/serialization/types/ShareLocation.d.ts +0 -13
- package/dist/serialization/types/ShareLocation.js +0 -34
- package/dist/serialization/types/Sms.d.ts +0 -16
- package/dist/serialization/types/Sms.js +0 -37
- package/dist/serialization/types/SmsMessage.d.ts +0 -13
- package/dist/serialization/types/UpdateCompanyResponse.d.ts +0 -14
- package/dist/serialization/types/UpdateCompanyResponse.js +0 -35
- package/dist/serialization/types/UpdateCompanyResponseBrand.d.ts +0 -13
- package/dist/serialization/types/UpdateCompanyResponseBrand.js +0 -34
- package/dist/serialization/types/UpdateSettingsResponse.d.ts +0 -12
- package/dist/serialization/types/UpdateSettingsResponse.js +0 -33
- package/dist/serialization/types/Url.d.ts +0 -14
- package/dist/serialization/types/Url.js +0 -35
- package/dist/serialization/types/ViewLocation.d.ts +0 -16
- package/dist/serialization/types/ViewLocation.js +0 -37
- package/serialization/client/getCompany.d.ts +0 -11
- package/serialization/client/index.d.ts +0 -2
- package/serialization/client/requests/RegisterCompanyRequest.d.ts +0 -19
- package/serialization/client/requests/UpdateCompanyRequest.d.ts +0 -20
- package/serialization/client/requests/UpdateSettingsRequest.d.ts +0 -12
- package/serialization/client/requests/UpdateSettingsRequest.js +0 -33
- package/serialization/client/requests/index.d.ts +0 -3
- package/serialization/client/requests/index.js +0 -9
- package/serialization/types/BadRequestErrorBodyError.d.ts +0 -16
- package/serialization/types/BadRequestErrorBodyError.js +0 -37
- package/serialization/types/BasicRcs.d.ts +0 -18
- package/serialization/types/BasicRcs.js +0 -39
- package/serialization/types/BasicRcsMessage.d.ts +0 -12
- package/serialization/types/Call.d.ts +0 -14
- package/serialization/types/Call.js +0 -35
- package/serialization/types/CardRcs.d.ts +0 -16
- package/serialization/types/CardRcs.js +0 -37
- package/serialization/types/CardRcsMessage.d.ts +0 -15
- package/serialization/types/CardRcsMessage.js +0 -36
- package/serialization/types/CardStyle.d.ts +0 -20
- package/serialization/types/CardStyle.js +0 -41
- package/serialization/types/CardStyleImageAlignment.d.ts +0 -10
- package/serialization/types/CardStyleImageAlignment.js +0 -31
- package/serialization/types/CardStyleMediaHeight.d.ts +0 -10
- package/serialization/types/CardStyleMediaHeight.js +0 -31
- package/serialization/types/CardStyleOrientation.d.ts +0 -10
- package/serialization/types/CardStyleOrientation.js +0 -31
- package/serialization/types/CardStyleWidth.d.ts +0 -10
- package/serialization/types/CardStyleWidth.js +0 -31
- package/serialization/types/CarouselRcs.d.ts +0 -16
- package/serialization/types/CarouselRcs.js +0 -37
- package/serialization/types/CarouselRcsMessage.d.ts +0 -15
- package/serialization/types/CarouselRcsMessage.js +0 -36
- package/serialization/types/CheckRcsCapabilityResponse.d.ts +0 -13
- package/serialization/types/CheckRcsCapabilityResponse.js +0 -34
- package/serialization/types/Event.d.ts +0 -17
- package/serialization/types/Event.js +0 -38
- package/serialization/types/GetAccountNumberResponse.d.ts +0 -12
- package/serialization/types/GetAccountNumberResponse.js +0 -33
- package/serialization/types/LatLng.d.ts +0 -13
- package/serialization/types/LatLng.js +0 -34
- package/serialization/types/MediaRcs.d.ts +0 -16
- package/serialization/types/MediaRcs.js +0 -37
- package/serialization/types/MediaRcsMessage.d.ts +0 -16
- package/serialization/types/MediaRcsMessage.js +0 -37
- package/serialization/types/MediaType.d.ts +0 -10
- package/serialization/types/MediaType.js +0 -31
- package/serialization/types/NotFoundErrorBody.d.ts +0 -12
- package/serialization/types/NotFoundErrorBody.js +0 -33
- package/serialization/types/PhoneNumber.d.ts +0 -10
- package/serialization/types/PhoneNumber.js +0 -31
- package/serialization/types/Postback.d.ts +0 -15
- package/serialization/types/Postback.js +0 -36
- package/serialization/types/RegisterCompanyResponse.d.ts +0 -14
- package/serialization/types/RegisterCompanyResponse.js +0 -35
- package/serialization/types/RegisterCompanyResponseBrand.d.ts +0 -13
- package/serialization/types/RegisterCompanyResponseBrand.js +0 -34
- package/serialization/types/SendMessageRequest.d.ts +0 -15
- package/serialization/types/SendMessageRequest.js +0 -36
- package/serialization/types/SendMessageResponse.d.ts +0 -12
- package/serialization/types/SendMessageResponse.js +0 -33
- package/serialization/types/ShareLocation.d.ts +0 -13
- package/serialization/types/ShareLocation.js +0 -34
- package/serialization/types/Sms.d.ts +0 -16
- package/serialization/types/Sms.js +0 -37
- package/serialization/types/SmsMessage.d.ts +0 -13
- package/serialization/types/UpdateCompanyResponse.d.ts +0 -14
- package/serialization/types/UpdateCompanyResponse.js +0 -35
- package/serialization/types/UpdateCompanyResponseBrand.d.ts +0 -13
- package/serialization/types/UpdateCompanyResponseBrand.js +0 -34
- package/serialization/types/UpdateSettingsResponse.d.ts +0 -12
- package/serialization/types/UpdateSettingsResponse.js +0 -33
- package/serialization/types/Url.d.ts +0 -14
- package/serialization/types/Url.js +0 -35
- package/serialization/types/ViewLocation.d.ts +0 -16
- package/serialization/types/ViewLocation.js +0 -37
- /package/api/client/requests/{CheckRcsCapabilityRequest.js → GetRcsFunctionalityRequest.js} +0 -0
- /package/api/{client/requests/GetCompanyRequest.js → resources/company/client/requests/CompanyGetRequest.js} +0 -0
- /package/api/{client/requests/RegisterCompanyRequest.js → resources/company/client/requests/CompanyRegisterRequest.js} +0 -0
- /package/api/{client/requests/UpdateCompanyRequest.js → resources/company/client/requests/CompanyUpdateRequest.js} +0 -0
- /package/api/{client/requests/UpdateSettingsRequest.js → resources/company/types/CompanyRegisterResponse.js} +0 -0
- /package/api/{types/BadRequestErrorBodyError.js → resources/company/types/CompanyRegisterResponseBrand.js} +0 -0
- /package/api/{types/BasicRcs.js → resources/company/types/CompanyUpdateResponse.js} +0 -0
- /package/api/{types/BasicRcsMessage.js → resources/company/types/CompanyUpdateResponseBrand.js} +0 -0
- /package/api/{types/Call.js → resources/send/client/requests/Rcs.js} +0 -0
- /package/api/{types/CardRcs.js → resources/send/client/requests/SendMmsRequest.js} +0 -0
- /package/api/{types/CardRcsMessage.js → resources/send/client/requests/SendSmsRequest.js} +0 -0
- /package/api/{types/CardStyle.js → resources/send/types/SendMmsResponse.js} +0 -0
- /package/api/{types/CarouselRcs.js → resources/send/types/SendRcsResponse.js} +0 -0
- /package/api/{types/CarouselRcsMessage.js → resources/send/types/SendSmsResponse.js} +0 -0
- /package/api/types/{CheckRcsCapabilityResponse.js → ActionLatLong.js} +0 -0
- /package/api/types/{Event.js → ForbiddenErrorBody.js} +0 -0
- /package/api/types/{GetAccountNumberResponse.js → RcsFunctionalities.js} +0 -0
- /package/{api/types/LatLng.js → dist/api/client/requests/GetRcsFunctionalityRequest.js} +0 -0
- /package/{api/types/MediaRcs.js → dist/api/resources/company/client/requests/CompanyGetRequest.js} +0 -0
- /package/{api/types/MediaRcsMessage.js → dist/api/resources/company/client/requests/CompanyRegisterRequest.js} +0 -0
- /package/{api/types/NotFoundErrorBody.js → dist/api/resources/company/client/requests/CompanyUpdateRequest.js} +0 -0
- /package/{api/types/PhoneNumber.js → dist/api/resources/company/types/CompanyRegisterResponse.js} +0 -0
- /package/{api/types/Postback.js → dist/api/resources/company/types/CompanyRegisterResponseBrand.js} +0 -0
- /package/{api/types/RegisterCompanyResponse.js → dist/api/resources/company/types/CompanyUpdateResponse.js} +0 -0
- /package/{api/types/RegisterCompanyResponseBrand.js → dist/api/resources/company/types/CompanyUpdateResponseBrand.js} +0 -0
- /package/{api/types/SendMessageRequest.js → dist/api/resources/send/client/requests/Rcs.js} +0 -0
- /package/{api/types/SendMessageResponse.js → dist/api/resources/send/client/requests/SendMmsRequest.js} +0 -0
- /package/{api/types/ShareLocation.js → dist/api/resources/send/client/requests/SendSmsRequest.js} +0 -0
- /package/{api/types/Sms.js → dist/api/resources/send/types/SendMmsResponse.js} +0 -0
- /package/{api/types/SmsMessage.js → dist/api/resources/send/types/SendRcsResponse.js} +0 -0
- /package/{api/types/UpdateCompanyResponse.js → dist/api/resources/send/types/SendSmsResponse.js} +0 -0
- /package/{api/types/UpdateCompanyResponseBrand.js → dist/api/types/ActionLatLong.js} +0 -0
- /package/{api/types/UpdateSettingsResponse.js → dist/api/types/ForbiddenErrorBody.js} +0 -0
- /package/{api/types/Url.js → dist/api/types/RcsFunctionalities.js} +0 -0
package/Client.d.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
import * as environments from "./environments";
|
|
5
5
|
import * as core from "./core";
|
|
6
6
|
import * as Pinnacle from "./api/index";
|
|
7
|
+
import { Company } from "./api/resources/company/client/Client";
|
|
8
|
+
import { Send } from "./api/resources/send/client/Client";
|
|
7
9
|
export declare namespace PinnacleClient {
|
|
8
10
|
interface Options {
|
|
9
11
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
@@ -22,9 +24,9 @@ export declare class PinnacleClient {
|
|
|
22
24
|
protected readonly _options: PinnacleClient.Options;
|
|
23
25
|
constructor(_options: PinnacleClient.Options);
|
|
24
26
|
/**
|
|
25
|
-
*
|
|
27
|
+
* Retrieve the RCS functionality of a phone number. For example checks if a phone number can receive RCS message and if it can receive RCS carousels.
|
|
26
28
|
*
|
|
27
|
-
* @param {Pinnacle.
|
|
29
|
+
* @param {Pinnacle.GetRcsFunctionalityRequest} request
|
|
28
30
|
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
31
|
*
|
|
30
32
|
* @throws {@link Pinnacle.BadRequestError}
|
|
@@ -32,131 +34,13 @@ export declare class PinnacleClient {
|
|
|
32
34
|
* @throws {@link Pinnacle.InternalServerError}
|
|
33
35
|
*
|
|
34
36
|
* @example
|
|
35
|
-
* await client.
|
|
36
|
-
* phoneNumber: "phone_number"
|
|
37
|
-
* })
|
|
37
|
+
* await client.getRcsFunctionality()
|
|
38
38
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
|
-
*
|
|
46
|
-
* @throws {@link Pinnacle.BadRequestError}
|
|
47
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
48
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* await client.updateSettings({
|
|
52
|
-
* webhookUrl: "webhook_url"
|
|
53
|
-
* })
|
|
54
|
-
*/
|
|
55
|
-
updateSettings(request: Pinnacle.UpdateSettingsRequest, requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.UpdateSettingsResponse>;
|
|
56
|
-
/**
|
|
57
|
-
* Retrieve the phone number associated with the account.
|
|
58
|
-
*
|
|
59
|
-
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
|
-
*
|
|
61
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
62
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* await client.getAccountNumber()
|
|
66
|
-
*/
|
|
67
|
-
getAccountNumber(requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.GetAccountNumberResponse>;
|
|
68
|
-
/**
|
|
69
|
-
* Send a SMS or RCS message to a phone number
|
|
70
|
-
*
|
|
71
|
-
* @param {Pinnacle.SendMessageRequest} request
|
|
72
|
-
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
73
|
-
*
|
|
74
|
-
* @throws {@link Pinnacle.BadRequestError}
|
|
75
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
76
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* await client.sendMessage({
|
|
80
|
-
* phoneNumber: "phone_number",
|
|
81
|
-
* messageType: "card",
|
|
82
|
-
* message: {
|
|
83
|
-
* cards: [{
|
|
84
|
-
* title: "title"
|
|
85
|
-
* }]
|
|
86
|
-
* }
|
|
87
|
-
* })
|
|
88
|
-
*/
|
|
89
|
-
sendMessage(request: Pinnacle.SendMessageRequest, requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.SendMessageResponse>;
|
|
90
|
-
/**
|
|
91
|
-
* Retrieve the company's information (i.e. approval status, company name, etc.). Search by company ID or company name.
|
|
92
|
-
*
|
|
93
|
-
* @param {Pinnacle.GetCompanyRequest} request
|
|
94
|
-
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
95
|
-
*
|
|
96
|
-
* @throws {@link Pinnacle.BadRequestError}
|
|
97
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
98
|
-
* @throws {@link Pinnacle.NotFoundError}
|
|
99
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* await client.getCompany()
|
|
103
|
-
*/
|
|
104
|
-
getCompany(request?: Pinnacle.GetCompanyRequest, requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.Company[]>;
|
|
105
|
-
/**
|
|
106
|
-
* Register a company for RCS with the Pinnacle platform
|
|
107
|
-
*
|
|
108
|
-
* @param {Pinnacle.RegisterCompanyRequest} request
|
|
109
|
-
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
110
|
-
*
|
|
111
|
-
* @throws {@link Pinnacle.BadRequestError}
|
|
112
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
113
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* await client.registerCompany({
|
|
117
|
-
* company: {
|
|
118
|
-
* name: "name",
|
|
119
|
-
* address: "address",
|
|
120
|
-
* ein: "ein",
|
|
121
|
-
* description: "description",
|
|
122
|
-
* brandColor: "brandColor",
|
|
123
|
-
* logoUrl: "logoUrl",
|
|
124
|
-
* heroUrl: "heroUrl"
|
|
125
|
-
* },
|
|
126
|
-
* companyContact: {
|
|
127
|
-
* primaryWebsiteUrl: "primaryWebsiteUrl",
|
|
128
|
-
* primaryWebsiteLabel: "primaryWebsiteLabel",
|
|
129
|
-
* primaryPhone: "primaryPhone",
|
|
130
|
-
* primaryPhoneLabel: "primaryPhoneLabel",
|
|
131
|
-
* primaryEmail: "primaryEmail",
|
|
132
|
-
* primaryEmailLabel: "primaryEmailLabel",
|
|
133
|
-
* privacyPolicyUrl: "privacyPolicyUrl",
|
|
134
|
-
* tosUrl: "tosUrl"
|
|
135
|
-
* },
|
|
136
|
-
* pointOfContact: {
|
|
137
|
-
* pocName: "pocName",
|
|
138
|
-
* pocTitle: "pocTitle",
|
|
139
|
-
* pocEmail: "pocEmail"
|
|
140
|
-
* }
|
|
141
|
-
* })
|
|
142
|
-
*/
|
|
143
|
-
registerCompany(request: Pinnacle.RegisterCompanyRequest, requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.RegisterCompanyResponse>;
|
|
144
|
-
/**
|
|
145
|
-
* Update a company on the Pinnacle platform
|
|
146
|
-
*
|
|
147
|
-
* @param {Pinnacle.UpdateCompanyRequest} request
|
|
148
|
-
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
149
|
-
*
|
|
150
|
-
* @throws {@link Pinnacle.BadRequestError}
|
|
151
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
152
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
153
|
-
*
|
|
154
|
-
* @example
|
|
155
|
-
* await client.updateCompany({
|
|
156
|
-
* companyId: "companyId"
|
|
157
|
-
* })
|
|
158
|
-
*/
|
|
159
|
-
updateCompany(request: Pinnacle.UpdateCompanyRequest, requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.UpdateCompanyResponse>;
|
|
39
|
+
getRcsFunctionality(request?: Pinnacle.GetRcsFunctionalityRequest, requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.RcsFunctionalities>;
|
|
40
|
+
protected _company: Company | undefined;
|
|
41
|
+
get company(): Company;
|
|
42
|
+
protected _send: Send | undefined;
|
|
43
|
+
get send(): Send;
|
|
160
44
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
161
45
|
"PINNACLE-API-Key": string;
|
|
162
46
|
}>;
|
package/Client.js
CHANGED
|
@@ -45,14 +45,16 @@ const Pinnacle = __importStar(require("./api/index"));
|
|
|
45
45
|
const url_join_1 = __importDefault(require("url-join"));
|
|
46
46
|
const serializers = __importStar(require("./serialization/index"));
|
|
47
47
|
const errors = __importStar(require("./errors/index"));
|
|
48
|
+
const Client_1 = require("./api/resources/company/client/Client");
|
|
49
|
+
const Client_2 = require("./api/resources/send/client/Client");
|
|
48
50
|
class PinnacleClient {
|
|
49
51
|
constructor(_options) {
|
|
50
52
|
this._options = _options;
|
|
51
53
|
}
|
|
52
54
|
/**
|
|
53
|
-
*
|
|
55
|
+
* Retrieve the RCS functionality of a phone number. For example checks if a phone number can receive RCS message and if it can receive RCS carousels.
|
|
54
56
|
*
|
|
55
|
-
* @param {Pinnacle.
|
|
57
|
+
* @param {Pinnacle.GetRcsFunctionalityRequest} request
|
|
56
58
|
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
59
|
*
|
|
58
60
|
* @throws {@link Pinnacle.BadRequestError}
|
|
@@ -60,294 +62,20 @@ class PinnacleClient {
|
|
|
60
62
|
* @throws {@link Pinnacle.InternalServerError}
|
|
61
63
|
*
|
|
62
64
|
* @example
|
|
63
|
-
* await client.
|
|
64
|
-
* phoneNumber: "phone_number"
|
|
65
|
-
* })
|
|
65
|
+
* await client.getRcsFunctionality()
|
|
66
66
|
*/
|
|
67
|
-
|
|
67
|
+
getRcsFunctionality(request = {}, requestOptions) {
|
|
68
68
|
var _a;
|
|
69
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
70
|
const { phoneNumber } = request;
|
|
71
71
|
const _queryParams = {};
|
|
72
|
-
|
|
73
|
-
|
|
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.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
|
-
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(_response.error.body);
|
|
96
|
-
case 401:
|
|
97
|
-
throw new Pinnacle.UnauthorizedError(_response.error.body);
|
|
98
|
-
case 500:
|
|
99
|
-
throw new Pinnacle.InternalServerError(_response.error.body);
|
|
100
|
-
default:
|
|
101
|
-
throw new errors.PinnacleError({
|
|
102
|
-
statusCode: _response.error.statusCode,
|
|
103
|
-
body: _response.error.body,
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
switch (_response.error.reason) {
|
|
108
|
-
case "non-json":
|
|
109
|
-
throw new errors.PinnacleError({
|
|
110
|
-
statusCode: _response.error.statusCode,
|
|
111
|
-
body: _response.error.rawBody,
|
|
112
|
-
});
|
|
113
|
-
case "timeout":
|
|
114
|
-
throw new errors.PinnacleTimeoutError();
|
|
115
|
-
case "unknown":
|
|
116
|
-
throw new errors.PinnacleError({
|
|
117
|
-
message: _response.error.errorMessage,
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Initializes settings related to RCS messaging, including webhook registration.
|
|
124
|
-
*
|
|
125
|
-
* @param {Pinnacle.UpdateSettingsRequest} request
|
|
126
|
-
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
127
|
-
*
|
|
128
|
-
* @throws {@link Pinnacle.BadRequestError}
|
|
129
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
130
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
131
|
-
*
|
|
132
|
-
* @example
|
|
133
|
-
* await client.updateSettings({
|
|
134
|
-
* webhookUrl: "webhook_url"
|
|
135
|
-
* })
|
|
136
|
-
*/
|
|
137
|
-
updateSettings(request, requestOptions) {
|
|
138
|
-
var _a;
|
|
139
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
-
const _response = yield core.fetcher({
|
|
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"),
|
|
142
|
-
method: "POST",
|
|
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())),
|
|
144
|
-
contentType: "application/json",
|
|
145
|
-
requestType: "json",
|
|
146
|
-
body: serializers.UpdateSettingsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
147
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
148
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
149
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
150
|
-
});
|
|
151
|
-
if (_response.ok) {
|
|
152
|
-
return serializers.UpdateSettingsResponse.parseOrThrow(_response.body, {
|
|
153
|
-
unrecognizedObjectKeys: "passthrough",
|
|
154
|
-
allowUnrecognizedUnionMembers: true,
|
|
155
|
-
allowUnrecognizedEnumValues: true,
|
|
156
|
-
breadcrumbsPrefix: ["response"],
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
if (_response.error.reason === "status-code") {
|
|
160
|
-
switch (_response.error.statusCode) {
|
|
161
|
-
case 400:
|
|
162
|
-
throw new Pinnacle.BadRequestError(_response.error.body);
|
|
163
|
-
case 401:
|
|
164
|
-
throw new Pinnacle.UnauthorizedError(_response.error.body);
|
|
165
|
-
case 500:
|
|
166
|
-
throw new Pinnacle.InternalServerError(_response.error.body);
|
|
167
|
-
default:
|
|
168
|
-
throw new errors.PinnacleError({
|
|
169
|
-
statusCode: _response.error.statusCode,
|
|
170
|
-
body: _response.error.body,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
switch (_response.error.reason) {
|
|
175
|
-
case "non-json":
|
|
176
|
-
throw new errors.PinnacleError({
|
|
177
|
-
statusCode: _response.error.statusCode,
|
|
178
|
-
body: _response.error.rawBody,
|
|
179
|
-
});
|
|
180
|
-
case "timeout":
|
|
181
|
-
throw new errors.PinnacleTimeoutError();
|
|
182
|
-
case "unknown":
|
|
183
|
-
throw new errors.PinnacleError({
|
|
184
|
-
message: _response.error.errorMessage,
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Retrieve the phone number associated with the account.
|
|
191
|
-
*
|
|
192
|
-
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
193
|
-
*
|
|
194
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
195
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
196
|
-
*
|
|
197
|
-
* @example
|
|
198
|
-
* await client.getAccountNumber()
|
|
199
|
-
*/
|
|
200
|
-
getAccountNumber(requestOptions) {
|
|
201
|
-
var _a;
|
|
202
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
203
|
-
const _response = yield core.fetcher({
|
|
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"),
|
|
205
|
-
method: "GET",
|
|
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())),
|
|
207
|
-
contentType: "application/json",
|
|
208
|
-
requestType: "json",
|
|
209
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
210
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
211
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
212
|
-
});
|
|
213
|
-
if (_response.ok) {
|
|
214
|
-
return serializers.GetAccountNumberResponse.parseOrThrow(_response.body, {
|
|
215
|
-
unrecognizedObjectKeys: "passthrough",
|
|
216
|
-
allowUnrecognizedUnionMembers: true,
|
|
217
|
-
allowUnrecognizedEnumValues: true,
|
|
218
|
-
breadcrumbsPrefix: ["response"],
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
if (_response.error.reason === "status-code") {
|
|
222
|
-
switch (_response.error.statusCode) {
|
|
223
|
-
case 401:
|
|
224
|
-
throw new Pinnacle.UnauthorizedError(_response.error.body);
|
|
225
|
-
case 500:
|
|
226
|
-
throw new Pinnacle.InternalServerError(_response.error.body);
|
|
227
|
-
default:
|
|
228
|
-
throw new errors.PinnacleError({
|
|
229
|
-
statusCode: _response.error.statusCode,
|
|
230
|
-
body: _response.error.body,
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
switch (_response.error.reason) {
|
|
235
|
-
case "non-json":
|
|
236
|
-
throw new errors.PinnacleError({
|
|
237
|
-
statusCode: _response.error.statusCode,
|
|
238
|
-
body: _response.error.rawBody,
|
|
239
|
-
});
|
|
240
|
-
case "timeout":
|
|
241
|
-
throw new errors.PinnacleTimeoutError();
|
|
242
|
-
case "unknown":
|
|
243
|
-
throw new errors.PinnacleError({
|
|
244
|
-
message: _response.error.errorMessage,
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* Send a SMS or RCS message to a phone number
|
|
251
|
-
*
|
|
252
|
-
* @param {Pinnacle.SendMessageRequest} request
|
|
253
|
-
* @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
254
|
-
*
|
|
255
|
-
* @throws {@link Pinnacle.BadRequestError}
|
|
256
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
257
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
258
|
-
*
|
|
259
|
-
* @example
|
|
260
|
-
* await client.sendMessage({
|
|
261
|
-
* phoneNumber: "phone_number",
|
|
262
|
-
* messageType: "card",
|
|
263
|
-
* message: {
|
|
264
|
-
* cards: [{
|
|
265
|
-
* title: "title"
|
|
266
|
-
* }]
|
|
267
|
-
* }
|
|
268
|
-
* })
|
|
269
|
-
*/
|
|
270
|
-
sendMessage(request, requestOptions) {
|
|
271
|
-
var _a;
|
|
272
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
273
|
-
const _response = yield core.fetcher({
|
|
274
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send"),
|
|
275
|
-
method: "POST",
|
|
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())),
|
|
277
|
-
contentType: "application/json",
|
|
278
|
-
requestType: "json",
|
|
279
|
-
body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
280
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
281
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
282
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
283
|
-
});
|
|
284
|
-
if (_response.ok) {
|
|
285
|
-
return serializers.SendMessageResponse.parseOrThrow(_response.body, {
|
|
286
|
-
unrecognizedObjectKeys: "passthrough",
|
|
287
|
-
allowUnrecognizedUnionMembers: true,
|
|
288
|
-
allowUnrecognizedEnumValues: true,
|
|
289
|
-
breadcrumbsPrefix: ["response"],
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
if (_response.error.reason === "status-code") {
|
|
293
|
-
switch (_response.error.statusCode) {
|
|
294
|
-
case 400:
|
|
295
|
-
throw new Pinnacle.BadRequestError(_response.error.body);
|
|
296
|
-
case 401:
|
|
297
|
-
throw new Pinnacle.UnauthorizedError(_response.error.body);
|
|
298
|
-
case 500:
|
|
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;
|
|
72
|
+
if (phoneNumber != null) {
|
|
73
|
+
_queryParams["phoneNumber"] = phoneNumber;
|
|
346
74
|
}
|
|
347
75
|
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, "
|
|
76
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "rcs_functionality"),
|
|
349
77
|
method: "GET",
|
|
350
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.
|
|
78
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
351
79
|
contentType: "application/json",
|
|
352
80
|
queryParameters: _queryParams,
|
|
353
81
|
requestType: "json",
|
|
@@ -356,7 +84,7 @@ class PinnacleClient {
|
|
|
356
84
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
357
85
|
});
|
|
358
86
|
if (_response.ok) {
|
|
359
|
-
return serializers.
|
|
87
|
+
return serializers.RcsFunctionalities.parseOrThrow(_response.body, {
|
|
360
88
|
unrecognizedObjectKeys: "passthrough",
|
|
361
89
|
allowUnrecognizedUnionMembers: true,
|
|
362
90
|
allowUnrecognizedEnumValues: true,
|
|
@@ -369,13 +97,6 @@ class PinnacleClient {
|
|
|
369
97
|
throw new Pinnacle.BadRequestError(_response.error.body);
|
|
370
98
|
case 401:
|
|
371
99
|
throw new Pinnacle.UnauthorizedError(_response.error.body);
|
|
372
|
-
case 404:
|
|
373
|
-
throw new Pinnacle.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
|
|
374
|
-
unrecognizedObjectKeys: "passthrough",
|
|
375
|
-
allowUnrecognizedUnionMembers: true,
|
|
376
|
-
allowUnrecognizedEnumValues: true,
|
|
377
|
-
breadcrumbsPrefix: ["response"],
|
|
378
|
-
}));
|
|
379
100
|
case 500:
|
|
380
101
|
throw new Pinnacle.InternalServerError(_response.error.body);
|
|
381
102
|
default:
|
|
@@ -400,162 +121,13 @@ class PinnacleClient {
|
|
|
400
121
|
}
|
|
401
122
|
});
|
|
402
123
|
}
|
|
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) {
|
|
124
|
+
get company() {
|
|
442
125
|
var _a;
|
|
443
|
-
return
|
|
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
|
-
});
|
|
126
|
+
return ((_a = this._company) !== null && _a !== void 0 ? _a : (this._company = new Client_1.Company(this._options)));
|
|
492
127
|
}
|
|
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) {
|
|
128
|
+
get send() {
|
|
509
129
|
var _a;
|
|
510
|
-
return
|
|
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);
|
|
538
|
-
default:
|
|
539
|
-
throw new errors.PinnacleError({
|
|
540
|
-
statusCode: _response.error.statusCode,
|
|
541
|
-
body: _response.error.body,
|
|
542
|
-
});
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
switch (_response.error.reason) {
|
|
546
|
-
case "non-json":
|
|
547
|
-
throw new errors.PinnacleError({
|
|
548
|
-
statusCode: _response.error.statusCode,
|
|
549
|
-
body: _response.error.rawBody,
|
|
550
|
-
});
|
|
551
|
-
case "timeout":
|
|
552
|
-
throw new errors.PinnacleTimeoutError();
|
|
553
|
-
case "unknown":
|
|
554
|
-
throw new errors.PinnacleError({
|
|
555
|
-
message: _response.error.errorMessage,
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
});
|
|
130
|
+
return ((_a = this._send) !== null && _a !== void 0 ? _a : (this._send = new Client_2.Send(this._options)));
|
|
559
131
|
}
|
|
560
132
|
_getCustomAuthorizationHeaders() {
|
|
561
133
|
return __awaiter(this, void 0, void 0, function* () {
|