From ffbd951c5fd330fb7cdac07add57eb3e97d20f81 Mon Sep 17 00:00:00 2001 From: Tyler Liu Date: Mon, 1 Jul 2024 13:35:49 -0700 Subject: [PATCH] New spec, new code --- .../src/definitions/AccountPhoneNumberInfo.ts | 5 + .../definitions/ActivePermissionResource.ts | 2 +- .../definitions/AssignPhoneNumberRequest.ts | 7 +- .../src/definitions/AuthCodeTokenRequest.ts | 34 + .../src/definitions/AuthorizeParameters.ts | 107 + .../core/src/definitions/AuthorizeRequest.ts | 83 +- .../core/src/definitions/BaseCallLogRecord.ts | 1 - .../core/src/definitions/BaseTokenRequest.ts | 59 + .../core/src/definitions/CallLogRecord.ts | 1 - .../src/definitions/CallLogRecordLegInfo.ts | 1 - .../src/definitions/ClientAuthJwtModel.ts | 17 + .../src/definitions/ClientCredentialsBase.ts | 11 + .../definitions/ClientCredentialsByAccount.ts | 17 + .../definitions/ClientCredentialsByBrand.ts | 17 + .../ClientCredentialsByPartnerAccount.ts | 23 + .../ClientCredentialsTokenRequest.ts | 29 + .../CompanyAnsweringRuleRequest.ts | 3 +- .../src/definitions/DeviceCodeTokenRequest.ts | 20 + .../src/definitions/DeviceEmergencyInfo.ts | 4 +- .../src/definitions/EventRecurrenceInfo.ts | 29 + .../definitions/ExtensionCreationResponse.ts | 1 + .../core/src/definitions/FaxResponseTo.ts | 13 + .../GetConferencingInfoResponse.ts | 6 + .../core/src/definitions/GetTokenRequest.ts | 135 +- .../core/src/definitions/GuestTokenRequest.ts | 26 + .../src/definitions/IdentityExtraValues.ts | 2 +- .../core/src/definitions/IdentityModel.ts | 92 +- .../src/definitions/IntrospectTokenRequest.ts | 15 - .../src/definitions/IvrPinTokenRequest.ts | 18 + .../core/src/definitions/JobStatusResponse.ts | 10 + .../definitions/JobStatusResponseResponse.ts | 48 + .../core/src/definitions/JwtTokenRequest.ts | 21 + .../ListCompanyMessageTemplatesParameters.ts | 12 + ...istSocialMessagingIdentitiesParameters.ts} | 14 +- .../ListUserMessageTemplatesParameters.ts | 17 + .../src/definitions/MessageStatusCounts.ts | 3 +- .../MessageStoreCallerInfoResponseTo.ts | 5 + .../src/definitions/MessageTemplateRequest.ts | 21 + .../definitions/MessageTemplateResponse.ts | 29 + .../MessageTemplateUpdateRequest.ts | 20 + .../MessageTemplatesListResponse.ts | 10 + .../core/src/definitions/OtpTokenRequest.ts | 18 + .../definitions/ReadGlipPostsNewParameters.ts | 2 +- .../src/definitions/RefreshTokenRequest.ts | 19 + .../definitions/RegSessionModelSettings.ts | 12 +- .../src/definitions/RegistrantBaseModel.ts | 5 + .../RegistrantBaseModelWithQuestionnaire.ts | 5 + .../src/definitions/RegistrantMinimalModel.ts | 5 + ...trantModelResponsePostWithQuestionnaire.ts | 5 + .../RegistrantModelWithQuestionnaire.ts | 5 + .../src/definitions/RevokeTokenRequest.ts | 10 +- packages/core/src/definitions/RoleResource.ts | 10 +- .../core/src/definitions/RopcTokenRequest.ts | 42 + packages/core/src/definitions/ServiceInfo.ts | 2 +- .../ServiceInfoCountryShortModel.ts | 34 + .../core/src/definitions/ServiceInfoPlan.ts | 25 + .../core/src/definitions/ServiceInfoUBrand.ts | 18 + .../core/src/definitions/ServiceInfoV2.ts | 15 + .../src/definitions/SessionInfoResponse.ts | 50 - packages/core/src/definitions/Site.ts | 18 + .../src/definitions/TMCreateEventRequest.ts | 25 +- .../src/definitions/TMCreateTaskRequest.ts | 4 +- .../TMCreateTaskRequestRecurrence.ts | 29 - packages/core/src/definitions/TMEventInfo.ts | 23 +- .../definitions/TMMessageAttachmentInfo.ts | 22 +- packages/core/src/definitions/TMTaskInfo.ts | 5 +- .../src/definitions/TMUpdateTaskRequest.ts | 4 +- .../TMUpdateTaskRequestRecurrence.ts | 28 - ...nfoRecurrence.ts => TaskRecurrenceInfo.ts} | 16 +- packages/core/src/definitions/TemplateInfo.ts | 35 +- packages/core/src/definitions/TokenInfo.ts | 38 +- .../definitions/TokenIntrospectionResponse.ts | 56 - .../Cx/SocialMessaging/V1/Identities/index.ts | 18 +- .../Extension/MessageStoreTemplates/index.ts | 115 ++ .../paths/Restapi/Account/Extension/index.ts | 5 + .../Account/MessageStoreTemplates/index.ts | 112 + .../Restapi/Account/ServiceInfo/index.ts | 2 +- .../core/src/paths/Restapi/Account/index.ts | 5 + .../paths/Restapi/Oauth/Authorize/index.ts | 23 +- .../paths/Restapi/Oauth/Introspect/index.ts | 42 - .../src/paths/Restapi/Oauth/Revoke/index.ts | 10 +- .../paths/Restapi/Oauth/SessionInfo/index.ts | 27 - .../src/paths/Restapi/Oauth/Token/index.ts | 9 +- .../core/src/paths/Restapi/Oauth/index.ts | 10 - packages/core/src/samples.md | 1804 ++++++++++------- 85 files changed, 2401 insertions(+), 1354 deletions(-) create mode 100644 packages/core/src/definitions/AuthCodeTokenRequest.ts create mode 100644 packages/core/src/definitions/AuthorizeParameters.ts create mode 100644 packages/core/src/definitions/BaseTokenRequest.ts create mode 100644 packages/core/src/definitions/ClientAuthJwtModel.ts create mode 100644 packages/core/src/definitions/ClientCredentialsBase.ts create mode 100644 packages/core/src/definitions/ClientCredentialsByAccount.ts create mode 100644 packages/core/src/definitions/ClientCredentialsByBrand.ts create mode 100644 packages/core/src/definitions/ClientCredentialsByPartnerAccount.ts create mode 100644 packages/core/src/definitions/ClientCredentialsTokenRequest.ts create mode 100644 packages/core/src/definitions/DeviceCodeTokenRequest.ts create mode 100644 packages/core/src/definitions/EventRecurrenceInfo.ts create mode 100644 packages/core/src/definitions/GuestTokenRequest.ts delete mode 100644 packages/core/src/definitions/IntrospectTokenRequest.ts create mode 100644 packages/core/src/definitions/IvrPinTokenRequest.ts create mode 100644 packages/core/src/definitions/JobStatusResponseResponse.ts create mode 100644 packages/core/src/definitions/JwtTokenRequest.ts create mode 100644 packages/core/src/definitions/ListCompanyMessageTemplatesParameters.ts rename packages/core/src/definitions/{SocMsgListIdentitiesParameters.ts => ListSocialMessagingIdentitiesParameters.ts} (66%) create mode 100644 packages/core/src/definitions/ListUserMessageTemplatesParameters.ts create mode 100644 packages/core/src/definitions/MessageTemplateRequest.ts create mode 100644 packages/core/src/definitions/MessageTemplateResponse.ts create mode 100644 packages/core/src/definitions/MessageTemplateUpdateRequest.ts create mode 100644 packages/core/src/definitions/MessageTemplatesListResponse.ts create mode 100644 packages/core/src/definitions/OtpTokenRequest.ts create mode 100644 packages/core/src/definitions/RefreshTokenRequest.ts create mode 100644 packages/core/src/definitions/RopcTokenRequest.ts create mode 100644 packages/core/src/definitions/ServiceInfoCountryShortModel.ts create mode 100644 packages/core/src/definitions/ServiceInfoPlan.ts create mode 100644 packages/core/src/definitions/ServiceInfoUBrand.ts delete mode 100644 packages/core/src/definitions/SessionInfoResponse.ts create mode 100644 packages/core/src/definitions/Site.ts delete mode 100644 packages/core/src/definitions/TMCreateTaskRequestRecurrence.ts delete mode 100644 packages/core/src/definitions/TMUpdateTaskRequestRecurrence.ts rename packages/core/src/definitions/{TMTaskInfoRecurrence.ts => TaskRecurrenceInfo.ts} (59%) delete mode 100644 packages/core/src/definitions/TokenIntrospectionResponse.ts create mode 100644 packages/core/src/paths/Restapi/Account/Extension/MessageStoreTemplates/index.ts create mode 100644 packages/core/src/paths/Restapi/Account/MessageStoreTemplates/index.ts delete mode 100644 packages/core/src/paths/Restapi/Oauth/Introspect/index.ts delete mode 100644 packages/core/src/paths/Restapi/Oauth/SessionInfo/index.ts diff --git a/packages/core/src/definitions/AccountPhoneNumberInfo.ts b/packages/core/src/definitions/AccountPhoneNumberInfo.ts index 67a90ef2..11af1c24 100644 --- a/packages/core/src/definitions/AccountPhoneNumberInfo.ts +++ b/packages/core/src/definitions/AccountPhoneNumberInfo.ts @@ -1,3 +1,4 @@ +import type ContactCenterProvider from './ContactCenterProvider'; import type AccountPhoneNumberInfoExtension from './AccountPhoneNumberInfoExtension'; interface AccountPhoneNumberInfo { @@ -53,6 +54,10 @@ interface AccountPhoneNumberInfo { */ byocNumber?: boolean; + /** + */ + contactCenterProvider?: ContactCenterProvider; + /** * Status of a phone number. If the value is 'Normal', the phone number is ready to be used. Otherwise, it is an external number not yet ported to RingCentral * Required diff --git a/packages/core/src/definitions/ActivePermissionResource.ts b/packages/core/src/definitions/ActivePermissionResource.ts index 706ab4de..2ca3d880 100644 --- a/packages/core/src/definitions/ActivePermissionResource.ts +++ b/packages/core/src/definitions/ActivePermissionResource.ts @@ -12,7 +12,7 @@ interface ActivePermissionResource { /** */ - scope?: ( + scopes?: ( | 'Account' | 'AllExtensions' | 'Federation' diff --git a/packages/core/src/definitions/AssignPhoneNumberRequest.ts b/packages/core/src/definitions/AssignPhoneNumberRequest.ts index 7e814123..3af10a70 100644 --- a/packages/core/src/definitions/AssignPhoneNumberRequest.ts +++ b/packages/core/src/definitions/AssignPhoneNumberRequest.ts @@ -1,4 +1,5 @@ import type AssignPhoneNumberRequestExtension from './AssignPhoneNumberRequestExtension'; +import type ContactCenterProvider from './ContactCenterProvider'; interface AssignPhoneNumberRequest { /** @@ -10,7 +11,7 @@ interface AssignPhoneNumberRequest { * Target usage type of phone number (only listed values are supported) * Required */ - usageType?: 'MainCompanyNumber' | 'CompanyNumber' | 'DirectNumber' | 'PhoneLine'; + usageType?: 'MainCompanyNumber' | 'CompanyNumber' | 'DirectNumber' | 'PhoneLine' | 'ContactCenterNumber'; /** */ @@ -19,6 +20,10 @@ interface AssignPhoneNumberRequest { /** */ costCenterId?: string; + + /** + */ + contactCenterProvider?: ContactCenterProvider; } export default AssignPhoneNumberRequest; diff --git a/packages/core/src/definitions/AuthCodeTokenRequest.ts b/packages/core/src/definitions/AuthCodeTokenRequest.ts new file mode 100644 index 00000000..81564d29 --- /dev/null +++ b/packages/core/src/definitions/AuthCodeTokenRequest.ts @@ -0,0 +1,34 @@ +/** + * Token endpoint request parameters used in the "Authorization Code" and "Authorization code with PKCE" flows + * with the `authorization_code` grant type + * + */ +interface AuthCodeTokenRequest { + /** + * Grant type + */ + grant_type?: 'authorization_code'; + + /** + * For `authorization_code` grant type only. User's authorization code + * Required + */ + code?: string; + + /** + * For `authorization_code` grant type only. This is a callback URI which determines where the response + * is sent. The value of this parameter must exactly match one of + * the URIs you have provided for your app upon registration + * Format: uri + */ + redirect_uri?: string; + + /** + * For `authorization_code` grant type only. + * The code verifier as defined by the PKCE specification - + * [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636) + */ + code_verifier?: string; +} + +export default AuthCodeTokenRequest; diff --git a/packages/core/src/definitions/AuthorizeParameters.ts b/packages/core/src/definitions/AuthorizeParameters.ts new file mode 100644 index 00000000..a78ebcd6 --- /dev/null +++ b/packages/core/src/definitions/AuthorizeParameters.ts @@ -0,0 +1,107 @@ +/** + * Query parameters for operation authorize + */ +interface AuthorizeParameters { + /** + * The registered identifier of a client application + * Example: AZwEVwGEcfGet2PCouA7K6 + */ + client_id?: string; + + /** + * Determines authorization flow type. The only supported value is `code` which corresponds to OAuth 2.0 "Authorization Code Flow" + */ + response_type?: 'code'; + + /** + * This is the URI where the Authorization Server redirects the User Agent to at the end of the authorization flow. + * The value of this parameter must exactly match one of the URIs registered for this client application. + * This parameter is required if there are more than one redirect URIs registered for the app. + * Format: uri + */ + redirect_uri?: string; + + /** + * An opaque value used by the client to maintain state between the request and callback. + * The authorization server includes this value when redirecting the User Agent back + * to the client. The parameter SHOULD be used for preventing cross-site request forgery attacks. + */ + state?: string; + + /** + * The list of space separated application permissions (OAuth scopes) + */ + scope?: string; + + /** + * Specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. + * Default: page + */ + display?: 'page' | 'popup' | 'touch' | 'mobile'; + + /** + * Space-delimited, case-sensitive list of ASCII string values that specifies whether the Authorization Server prompts the End-User for + * re-authentication and consent. The defined values are: + * + * - `login` - RingCentral native login form, + * - `sso` - Single Sign-On login form, + * - `consent` - form to show the requested scope and prompt user for consent. + * + * Either `login` or `sso` (or both) must be specified. The default + * value is `login sso` + * Default: login sso + */ + prompt?: string; + + /** + * End-User's preferred languages and scripts for the user interface, represented as a space-separated list of + * [RFC-5646](https://datatracker.ietf.org/doc/html/rfc5646) language tag values, ordered by preference. + * + * If this parameter is provided, its value overrides 'Accept-Language' header value and 'localeId' parameter value (if any) + * Example: en-US + */ + ui_locales?: string; + + /** + * DEPRECATED: `ui_locales` parameter should be used instead + * Example: en-US + */ + localeId?: string; + + /** + * The code challenge value as defined by the PKCE specification - + * [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636) + */ + code_challenge?: string; + + /** + * The code challenge method as defined by the PKCE specification - + * [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636) + * Default: plain + */ + code_challenge_method?: 'plain' | 'S256'; + + /** + * String value used to associate a Client session with an ID Token, and to mitigate replay attacks. The value is passed through unmodified from the Authentication Request to the ID Token. + */ + nonce?: string; + + /** + * Login form user interface options (space-separated). By default, the UI options that are registered for this client application will be used + */ + ui_options?: string; + + /** + * Hint to the Authorization Server about the login identifier the End-User might use to log in. + */ + login_hint?: string; + + /** + * RingCentral Brand identifier. If it is not provided in the request, + * server will try to determine brand from the client application profile. + * Example: 1210 + */ + brand_id?: string; +} + +export default AuthorizeParameters; diff --git a/packages/core/src/definitions/AuthorizeRequest.ts b/packages/core/src/definitions/AuthorizeRequest.ts index 22410afc..43a44ad0 100644 --- a/packages/core/src/definitions/AuthorizeRequest.ts +++ b/packages/core/src/definitions/AuthorizeRequest.ts @@ -1,54 +1,50 @@ interface AuthorizeRequest { /** - * Determines authorization flow: - * - **code** - Authorization Code, - * - **token** - Implicit + * Determines authorization flow type. The only supported value is `code` which corresponds to OAuth 2.0 "Authorization Code Flow" * Required */ - response_type?: 'code' | 'token'; + response_type?: 'code'; /** - * This is a callback URI which determines where the response - * is sent. The value of this parameter must exactly match one of - * the URIs you have provided for your app upon registration - * Required + * This is the URI where the Authorization Server redirects the User Agent to at the end of the authorization flow. + * The value of this parameter must exactly match one of the URIs registered for this client application. + * This parameter is required if there are more than one redirect URIs registered for the app. * Format: uri */ redirect_uri?: string; /** - * Identifier (key) of a client application + * The registered identifier of a client application * Required + * Example: AZwEVwGEcfGet2PCouA7K6 */ client_id?: string; /** - * Client state. Returned to the client at the end of the flow + * An opaque value used by the client to maintain state between the request and callback. + * The authorization server includes this value when redirecting the User Agent back + * to the client. The parameter SHOULD be used for preventing cross-site request forgery attacks. */ state?: string; /** - * Brand identifier. If it is not provided in request, - * server will try to determine brand from client app profile. The - * default value is `1210` - RingCentral US brand ID - * Default: 1210 + * The list of requested OAuth scopes (space separated) */ - brand_id?: string; + scope?: string; /** - * Style of login form. The default value is 'page'. The - * 'popup' and 'touch' values are featured for mobile applications + * Specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. * Default: page */ display?: 'page' | 'popup' | 'touch' | 'mobile'; /** - * Specifies which login form will be displayed. Space-separated - * set of the following values: + * Space-delimited, case-sensitive list of ASCII string values that specifies whether the Authorization Server prompts the End-User for + * re-authentication and consent. The defined values are: * - * - **login** - RingCentral native login form, - * - **sso** - Single Sign-On login form, - * - **consent** - form to show the requested scope and prompt user for consent. + * - `login` - RingCentral native login form, + * - `sso` - Single Sign-On login form, + * - `consent` - form to show the requested scope and prompt user for consent. * * Either `login` or `sso` (or both) must be specified. The default * value is `login sso` @@ -57,53 +53,52 @@ interface AuthorizeRequest { prompt?: string; /** - * Locale code of a language. Overwrites 'Accept-Language' header value. + * End-User's preferred languages and scripts for the user interface, represented as a space-separated list of + * [RFC-5646](https://datatracker.ietf.org/doc/html/rfc5646) language tag values, ordered by preference. * - * DEPRECATED: `ui_locales` parameter should be used instead - * Example: en-US - */ - localeId?: string; - - /** - * Locale code of a language. Overwrites 'Accept-Language' header value and 'localeId' parameter value + * If this parameter is provided, its value overrides 'Accept-Language' header value and 'localeId' parameter value (if any) * Example: en-US */ ui_locales?: string; /** - * User interface options (space-separated) - */ - ui_options?: string; - - /** - * OAuth scope + * The code challenge value as defined by the PKCE specification - + * [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636) */ - scope?: string; + code_challenge?: string; /** + * The code challenge method as defined by the PKCE specification - + * [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636) + * Default: plain */ - accept_language?: string; + code_challenge_method?: 'plain' | 'S256'; /** + * String value used to associate a Client session with an ID Token, and to mitigate replay attacks. The value is passed through unmodified from the Authentication Request to the ID Token. */ - request?: string; + nonce?: string; /** - * Format: uri + * Login form user interface options (space-separated). By default, the UI options that are registered for this client application will be used */ - request_uri?: string; + ui_options?: string; /** + * Hint to the Authorization Server about the login identifier the End-User might use to log in. */ - nonce?: string; + login_hint?: string; /** + * RingCentral Brand identifier. If it is not provided in the request, + * server will try to determine brand from the client application profile. + * Example: 1210 */ - code_challenge?: string; + brand_id?: string; /** */ - code_challenge_method?: 'plain' | 'S256'; + accept_language?: string; } export default AuthorizeRequest; diff --git a/packages/core/src/definitions/BaseCallLogRecord.ts b/packages/core/src/definitions/BaseCallLogRecord.ts index 2b9dcba3..d916c3c7 100644 --- a/packages/core/src/definitions/BaseCallLogRecord.ts +++ b/packages/core/src/definitions/BaseCallLogRecord.ts @@ -42,7 +42,6 @@ interface BaseCallLogRecord { /** * The type of call transport. 'PSTN' indicates that a call leg was initiated * from the PSTN network provider; 'VoIP' - from an RC phone. - * Required */ transport?: 'PSTN' | 'VoIP'; diff --git a/packages/core/src/definitions/BaseTokenRequest.ts b/packages/core/src/definitions/BaseTokenRequest.ts new file mode 100644 index 00000000..1535ebce --- /dev/null +++ b/packages/core/src/definitions/BaseTokenRequest.ts @@ -0,0 +1,59 @@ +interface BaseTokenRequest { + /** + * Grant type + * Required + */ + grant_type?: + | 'authorization_code' + | 'password' + | 'refresh_token' + | 'client_credentials' + | 'urn:ietf:params:oauth:grant-type:jwt-bearer' + | 'urn:ietf:params:oauth:grant-type:device_code' + | 'device_certificate' + | 'partner_jwt' + | 'guest' + | 'personal_jwt' + | 'otp' + | 'ivr_pin'; + + /** + * The list of application permissions (OAuth scopes) requested. + * By default, it includes all permissions configured on + * the client application registration + */ + scope?: string; + + /** + * The registered identifier of a client application. + * Used to identify a client ONLY if the client authentication is not required and + * corresponding credentials are not provided with this request + * Example: AZwEVwGEcfGet2PCouA7K6 + */ + client_id?: string; + + /** + * The unique identifier of a client application instance. If not + * specified, the derived or auto-generated value will be used + */ + endpoint_id?: string; + + /** + * Access token lifetime in seconds + * Maximum: 3600 + * Minimum: 600 + * Format: int32 + * Default: 3600 + */ + access_token_ttl?: number; + + /** + * Refresh token lifetime in seconds + * Maximum: 604800 + * Format: int32 + * Default: 604800 + */ + refresh_token_ttl?: number; +} + +export default BaseTokenRequest; diff --git a/packages/core/src/definitions/CallLogRecord.ts b/packages/core/src/definitions/CallLogRecord.ts index 2d007d07..5631b432 100644 --- a/packages/core/src/definitions/CallLogRecord.ts +++ b/packages/core/src/definitions/CallLogRecord.ts @@ -43,7 +43,6 @@ interface CallLogRecord { /** * The type of call transport. 'PSTN' indicates that a call leg was initiated * from the PSTN network provider; 'VoIP' - from an RC phone. - * Required */ transport?: 'PSTN' | 'VoIP'; diff --git a/packages/core/src/definitions/CallLogRecordLegInfo.ts b/packages/core/src/definitions/CallLogRecordLegInfo.ts index 96eae738..22162032 100644 --- a/packages/core/src/definitions/CallLogRecordLegInfo.ts +++ b/packages/core/src/definitions/CallLogRecordLegInfo.ts @@ -42,7 +42,6 @@ interface CallLogRecordLegInfo { /** * The type of call transport. 'PSTN' indicates that a call leg was initiated * from the PSTN network provider; 'VoIP' - from an RC phone. - * Required */ transport?: 'PSTN' | 'VoIP'; diff --git a/packages/core/src/definitions/ClientAuthJwtModel.ts b/packages/core/src/definitions/ClientAuthJwtModel.ts new file mode 100644 index 00000000..07c9378c --- /dev/null +++ b/packages/core/src/definitions/ClientAuthJwtModel.ts @@ -0,0 +1,17 @@ +interface ClientAuthJwtModel { + /** + * Client assertion type for the `client_secret_jwt` or `private_key_jwt` client authentication types, + * as defined by [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.2). + * This parameter is mandatory if the client authentication is required and a client decided to use one of these authentication types + */ + client_assertion_type?: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'; + + /** + * Client assertion (JWT) for the `client_secret_jwt` or `private_key_jwt` client authentication types, + * as defined by [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.2). + * This parameter is mandatory if the client authentication is required and a client decided to use one of these authentication types + */ + client_assertion?: string; +} + +export default ClientAuthJwtModel; diff --git a/packages/core/src/definitions/ClientCredentialsBase.ts b/packages/core/src/definitions/ClientCredentialsBase.ts new file mode 100644 index 00000000..c63563e8 --- /dev/null +++ b/packages/core/src/definitions/ClientCredentialsBase.ts @@ -0,0 +1,11 @@ +/** + * Token endpoint request parameters used in the "Client Credentials" authorization flow with the `client_credentials` grant type + */ +interface ClientCredentialsBase { + /** + * Grant type + */ + grant_type?: 'client_credentials'; +} + +export default ClientCredentialsBase; diff --git a/packages/core/src/definitions/ClientCredentialsByAccount.ts b/packages/core/src/definitions/ClientCredentialsByAccount.ts new file mode 100644 index 00000000..889edc71 --- /dev/null +++ b/packages/core/src/definitions/ClientCredentialsByAccount.ts @@ -0,0 +1,17 @@ +/** + * Token endpoint request parameters used in the "Client Credentials" authorization flow with the `client_credentials` grant type + */ +interface ClientCredentialsByAccount { + /** + * Grant type + */ + grant_type?: 'client_credentials'; + + /** + * RingCentral internal account ID + * Required + */ + account_id?: string; +} + +export default ClientCredentialsByAccount; diff --git a/packages/core/src/definitions/ClientCredentialsByBrand.ts b/packages/core/src/definitions/ClientCredentialsByBrand.ts new file mode 100644 index 00000000..ecd7dd60 --- /dev/null +++ b/packages/core/src/definitions/ClientCredentialsByBrand.ts @@ -0,0 +1,17 @@ +/** + * Token endpoint request parameters used in the "Client Credentials" authorization flow with the `client_credentials` grant type + */ +interface ClientCredentialsByBrand { + /** + * Grant type + */ + grant_type?: 'client_credentials'; + + /** + * RingCentral Brand identifier + * Required + */ + brand_id?: string; +} + +export default ClientCredentialsByBrand; diff --git a/packages/core/src/definitions/ClientCredentialsByPartnerAccount.ts b/packages/core/src/definitions/ClientCredentialsByPartnerAccount.ts new file mode 100644 index 00000000..a5d64072 --- /dev/null +++ b/packages/core/src/definitions/ClientCredentialsByPartnerAccount.ts @@ -0,0 +1,23 @@ +/** + * Token endpoint request parameters used in the "Client Credentials" authorization flow with the `client_credentials` grant type + */ +interface ClientCredentialsByPartnerAccount { + /** + * Grant type + */ + grant_type?: 'client_credentials'; + + /** + * RingCentral Brand identifier + * Required + */ + brand_id?: string; + + /** + * The ID of the account on RingCentral partner's side + * Required + */ + partner_account_id?: string; +} + +export default ClientCredentialsByPartnerAccount; diff --git a/packages/core/src/definitions/ClientCredentialsTokenRequest.ts b/packages/core/src/definitions/ClientCredentialsTokenRequest.ts new file mode 100644 index 00000000..70be203d --- /dev/null +++ b/packages/core/src/definitions/ClientCredentialsTokenRequest.ts @@ -0,0 +1,29 @@ +/** + * Token endpoint request parameters used in the "Client Credentials" authorization flow with the `client_credentials` grant type + */ +interface ClientCredentialsTokenRequest { + /** + * Grant type + */ + grant_type?: 'client_credentials'; + + /** + * RingCentral Brand identifier + * Required + */ + brand_id?: string; + + /** + * RingCentral internal account ID + * Required + */ + account_id?: string; + + /** + * The ID of the account on RingCentral partner's side + * Required + */ + partner_account_id?: string; +} + +export default ClientCredentialsTokenRequest; diff --git a/packages/core/src/definitions/CompanyAnsweringRuleRequest.ts b/packages/core/src/definitions/CompanyAnsweringRuleRequest.ts index cca92f8a..a4b94f4e 100644 --- a/packages/core/src/definitions/CompanyAnsweringRuleRequest.ts +++ b/packages/core/src/definitions/CompanyAnsweringRuleRequest.ts @@ -1,6 +1,7 @@ import type CompanyAnsweringRuleCallersInfoRequest from './CompanyAnsweringRuleCallersInfoRequest'; import type CompanyAnsweringRuleCalledNumberInfo from './CompanyAnsweringRuleCalledNumberInfo'; import type CompanyAnsweringRuleScheduleInfoRequest from './CompanyAnsweringRuleScheduleInfoRequest'; +import type CompanyAnsweringRuleExtensionInfoRequest from './CompanyAnsweringRuleExtensionInfoRequest'; import type GreetingInfo from './GreetingInfo'; interface CompanyAnsweringRuleRequest { @@ -41,7 +42,7 @@ interface CompanyAnsweringRuleRequest { /** */ - extension?: CompanyAnsweringRuleCallersInfoRequest; + extension?: CompanyAnsweringRuleExtensionInfoRequest; /** * Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List diff --git a/packages/core/src/definitions/DeviceCodeTokenRequest.ts b/packages/core/src/definitions/DeviceCodeTokenRequest.ts new file mode 100644 index 00000000..54d03253 --- /dev/null +++ b/packages/core/src/definitions/DeviceCodeTokenRequest.ts @@ -0,0 +1,20 @@ +/** + * Token endpoint request parameters used in the "Device Authorization" flow + * with the `urn:ietf:params:oauth:grant-type:device_code` grant type + * + */ +interface DeviceCodeTokenRequest { + /** + * Grant type + */ + grant_type?: 'urn:ietf:params:oauth:grant-type:device_code'; + + /** + * For `urn:ietf:params:oauth:grant-type:device_code` grant type only. + * The device verification code as defined by [RFC-8628](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) + * Required + */ + device_code?: string; +} + +export default DeviceCodeTokenRequest; diff --git a/packages/core/src/definitions/DeviceEmergencyInfo.ts b/packages/core/src/definitions/DeviceEmergencyInfo.ts index a8284f09..c95640d3 100644 --- a/packages/core/src/definitions/DeviceEmergencyInfo.ts +++ b/packages/core/src/definitions/DeviceEmergencyInfo.ts @@ -1,4 +1,4 @@ -import type EmergencyAddressInfo from './EmergencyAddressInfo'; +import type CommonEmergencyLocationAddressInfoDefault from './CommonEmergencyLocationAddressInfoDefault'; import type DeviceEmergencyLocationInfo from './DeviceEmergencyLocationInfo'; /** @@ -7,7 +7,7 @@ import type DeviceEmergencyLocationInfo from './DeviceEmergencyLocationInfo'; interface DeviceEmergencyInfo { /** */ - address?: EmergencyAddressInfo; + address?: CommonEmergencyLocationAddressInfoDefault; /** */ diff --git a/packages/core/src/definitions/EventRecurrenceInfo.ts b/packages/core/src/definitions/EventRecurrenceInfo.ts new file mode 100644 index 00000000..331bd116 --- /dev/null +++ b/packages/core/src/definitions/EventRecurrenceInfo.ts @@ -0,0 +1,29 @@ +interface EventRecurrenceInfo { + /** + * Event recurrence settings. For non-periodic events the value + * is `None`. Must be greater or equal to event duration: 1- Day/Weekday; + * 7 - Week; 28 - Month; 365 - Year + */ + schedule?: 'None' | 'Day' | 'Weekday' | 'Week' | 'Month' | 'Year'; + + /** + * Condition of ending an event + */ + endingCondition?: 'None' | 'Count' | 'Date'; + + /** + * Count of event iterations. For periodic events only. Value range is 1 - 10. + * Must be specified if `endingCondition` is `Count` + * Format: int32 + */ + endingAfter?: number; + + /** + * Iterations ending datetime for periodic events in + * [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format + * Format: date-time + */ + endingOn?: string; +} + +export default EventRecurrenceInfo; diff --git a/packages/core/src/definitions/ExtensionCreationResponse.ts b/packages/core/src/definitions/ExtensionCreationResponse.ts index e3edf69f..4af20429 100644 --- a/packages/core/src/definitions/ExtensionCreationResponse.ts +++ b/packages/core/src/definitions/ExtensionCreationResponse.ts @@ -111,6 +111,7 @@ interface ExtensionCreationResponse { | 'User' | 'VirtualUser' | 'DigitalUser' + | 'FlexibleUser' | 'Department' | 'Announcement' | 'Voicemail' diff --git a/packages/core/src/definitions/FaxResponseTo.ts b/packages/core/src/definitions/FaxResponseTo.ts index 2de772dd..3f4f11e6 100644 --- a/packages/core/src/definitions/FaxResponseTo.ts +++ b/packages/core/src/definitions/FaxResponseTo.ts @@ -1,4 +1,9 @@ interface FaxResponseTo { + /** + * Internal identifier of a fax recipient + */ + recipientId?: string; + /** * Phone number in E.164 (with '+' sign) format * Example: +18661234567 @@ -19,6 +24,14 @@ interface FaxResponseTo { * the 'Sent' status is returned */ messageStatus?: 'Queued' | 'Sent' | 'Delivered' | 'DeliveryFailed' | 'SendingFailed' | 'Received'; + + /** + * Contains party location (city, state) if one can be determined + * from phoneNumber. This property is filled only when phoneNumber is not + * empty and server can calculate location information from it (for example, + * this information is unavailable for US toll-free numbers) + */ + location?: string; } export default FaxResponseTo; diff --git a/packages/core/src/definitions/GetConferencingInfoResponse.ts b/packages/core/src/definitions/GetConferencingInfoResponse.ts index 81f53920..1c449a74 100644 --- a/packages/core/src/definitions/GetConferencingInfoResponse.ts +++ b/packages/core/src/definitions/GetConferencingInfoResponse.ts @@ -34,6 +34,12 @@ interface GetConferencingInfoResponse { */ phoneNumber?: string; + /** + * Link to a branded support page + * Example: http://success.ringcentral.com + */ + supportUri?: string; + /** * Short URL leading to the service web page Tap to Join for audio * conference bridge diff --git a/packages/core/src/definitions/GetTokenRequest.ts b/packages/core/src/definitions/GetTokenRequest.ts index 97c14de0..e759c40d 100644 --- a/packages/core/src/definitions/GetTokenRequest.ts +++ b/packages/core/src/definitions/GetTokenRequest.ts @@ -1,23 +1,20 @@ +/** + * Token endpoint request parameters used in the "Guest" authorization flow with the `guest` grant type + */ interface GetTokenRequest { /** - * For `password` grant type only. User login name: email or phone number in E.164 format + * Client assertion type for the `client_secret_jwt` or `private_key_jwt` client authentication types, + * as defined by [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.2). + * This parameter is mandatory if the client authentication is required and a client decided to use one of these authentication types */ - username?: string; + client_assertion_type?: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'; /** - * For `password` grant type only. User's password - * Format: password + * Client assertion (JWT) for the `client_secret_jwt` or `private_key_jwt` client authentication types, + * as defined by [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.2). + * This parameter is mandatory if the client authentication is required and a client decided to use one of these authentication types */ - password?: string; - - /** - * For `password` grant type only. Optional. Extension short number. If company number - * is specified as a username, and extension is not specified, the - * server will attempt to authenticate client as main company administrator - * - * DEPRECATED: use extension number embedded into username string like `+16501234567*101` - */ - extension?: string; + client_assertion?: string; /** * Grant type @@ -38,17 +35,25 @@ interface GetTokenRequest { | 'ivr_pin'; /** - * For `authorization_code` grant type only. User's authorization code + * The list of application permissions (OAuth scopes) requested. + * By default, it includes all permissions configured on + * the client application registration */ - code?: string; + scope?: string; /** - * For `authorization_code` grant type only. This is a callback URI which determines where the response - * is sent. The value of this parameter must exactly match one of - * the URIs you have provided for your app upon registration - * Format: uri + * The registered identifier of a client application. + * Used to identify a client ONLY if the client authentication is not required and + * corresponding credentials are not provided with this request + * Example: AZwEVwGEcfGet2PCouA7K6 */ - redirect_uri?: string; + client_id?: string; + + /** + * The unique identifier of a client application instance. If not + * specified, the derived or auto-generated value will be used + */ + endpoint_id?: string; /** * Access token lifetime in seconds @@ -68,72 +73,110 @@ interface GetTokenRequest { refresh_token_ttl?: number; /** - * List of application permissions to be used with access token. - * By default, the scope includes all permissions configured during - * the application registration phase + * For `otp` grant type only. + * One-time password code + * Required */ - scope?: string; + code?: string; /** - * For `refresh_token` grant type only. Previously issued refresh token. + * For `authorization_code` grant type only. This is a callback URI which determines where the response + * is sent. The value of this parameter must exactly match one of + * the URIs you have provided for your app upon registration + * Format: uri */ - refresh_token?: string; + redirect_uri?: string; /** - * The unique identifier of a client application instance. If not - * specified, the derived or auto generated value will be used + * For `authorization_code` grant type only. + * The code verifier as defined by the PKCE specification - + * [RFC-7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://datatracker.ietf.org/doc/html/rfc7636) */ - endpoint_id?: string; + code_verifier?: string; /** + * For `password` grant type only. User login name: email or phone number in E.164 format + * Required */ - pin?: string; + username?: string; /** - * OAuth client identifier (if not specified via `Authorization` header) + * For `password` grant type only. User's password + * Required + * Format: password */ - client_id?: string; + password?: string; /** + * For `password` grant type only. Optional. Extension short number. If a company number + * is specified as a username, and extension is not specified, the + * server will attempt to authenticate client as main company administrator + * + * DEPRECATED: use extension number embedded into username string like `+16501234567*101` */ - account_id?: string; + extension?: string; /** + * IVR pin for pin-based authentication. + * + * DEPRECATED: use a dedicated `ivr_pin` grant type instead */ - partner_account_id?: string; + pin?: string; /** - * Client assertion type + * For `urn:ietf:params:oauth:grant-type:jwt-bearer` or `partner_jwt` grant types only. + * Authorization grant assertion (JWT) + * as defined by [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.1). + * Required */ - client_assertion_type?: string; + assertion?: string; /** - * Client assertion + * For `refresh_token` grant type only. Previously issued refresh token. + * Required */ - client_assertion?: string; + refresh_token?: string; /** - * For `jwt_bearer` grant type only. Assertion + * For `ivr_pin` grant type only. User's IVR pin. + * Required */ - assertion?: string; + ivr_pin?: string; + + /** + * For `urn:ietf:params:oauth:grant-type:device_code` grant type only. + * The device verification code as defined by [RFC-8628](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) + * Required + */ + device_code?: string; /** + * RingCentral Brand identifier. + * Required */ brand_id?: string; /** - * PKCE code verifier + * RingCentral internal account ID + * Required */ - code_verifier?: string; + account_id?: string; /** + * The ID of the account on RingCentral partner's side + * Required */ - device_code?: string; + partner_account_id?: string; /** - * For `ivr_pin` grant type only. IVR pin. + * Resource type for the guest access. */ - ivr_pin?: string; + resource_type?: string; + + /** + * Resource URL for the guest access. + */ + resource?: string; } export default GetTokenRequest; diff --git a/packages/core/src/definitions/GuestTokenRequest.ts b/packages/core/src/definitions/GuestTokenRequest.ts new file mode 100644 index 00000000..5224ea61 --- /dev/null +++ b/packages/core/src/definitions/GuestTokenRequest.ts @@ -0,0 +1,26 @@ +/** + * Token endpoint request parameters used in the "Guest" authorization flow with the `guest` grant type + */ +interface GuestTokenRequest { + /** + * Grant type + */ + grant_type?: 'guest'; + + /** + * RingCentral Brand identifier. + */ + brand_id?: string; + + /** + * Resource type for the guest access. + */ + resource_type?: string; + + /** + * Resource URL for the guest access. + */ + resource?: string; +} + +export default GuestTokenRequest; diff --git a/packages/core/src/definitions/IdentityExtraValues.ts b/packages/core/src/definitions/IdentityExtraValues.ts index a24fe363..6f351ba5 100644 --- a/packages/core/src/definitions/IdentityExtraValues.ts +++ b/packages/core/src/definitions/IdentityExtraValues.ts @@ -1,5 +1,5 @@ /** - * Additional data to store along the identity. + * Additional data to store along with identity */ // eslint-disable-next-line @typescript-eslint/no-empty-interface interface IdentityExtraValues {} diff --git a/packages/core/src/definitions/IdentityModel.ts b/packages/core/src/definitions/IdentityModel.ts index abe8102a..b398af9c 100644 --- a/packages/core/src/definitions/IdentityModel.ts +++ b/packages/core/src/definitions/IdentityModel.ts @@ -9,7 +9,7 @@ interface IdentityModel { id?: string; /** - * Identity's avatar Uri. + * Identity's avatar URI * Format: uri * Example: https://example.com/assets/avatar/default-79fd530c58c2a6b83a11fcc0e842ed7023ceb69292cfeb857bc2af2c624b90fd.png */ @@ -30,7 +30,7 @@ interface IdentityModel { creationTime?: string; /** - * Display name of the identity. + * Display name of identity * Example: John Doe */ displayName?: string; @@ -65,10 +65,10 @@ interface IdentityModel { homePhone?: string; /** - * The identity group id references the identity group that contains - * all information (phone, notes, etc.). Many identities may belong to - * this group. If the identity group id is null, it means that identity - * does not have a group and any extra information. + * Identity group identifier which references the identity group that contains + * all information (phone, notes, etc). Multiple identities may belong to + * a single group. If the parameter value is null, it means that identity + * does not belong to a group or have extra information * Example: 54085e5b7aa58d8b5d00006c */ identityGroupId?: string; @@ -86,13 +86,13 @@ interface IdentityModel { mobilePhone?: string; /** - * Screen name of the identity. + * Screen name of identity * Example: John D. */ screenName?: string; /** - * Type of the identity. + * Type of identity * Required */ type?: @@ -118,160 +118,124 @@ interface IdentityModel { lastModifiedTime?: string; /** - * List of the associated user identifiers who can use the identity. + * List of the associated user identifiers who can use the identity */ userIds?: string[]; /** - * UUID of the identity. + * UUID of identity * Example: 9680ab94-3b78-495c-bb2c-a969954d8260 */ uuid?: string; /** - * Device info of the identity. - * - * Applicable to RingCX Digital Messaging channels only. + * Device info of the identity. Applicable to RingCX Digital Messaging channels only * Example: iPhone (iPhone); iOS 15.0.2 */ mobileDeviceInfo?: string; /** - * Facebook biography of the identity. - * - * Applicable to Facebook and Messenger channels only. + * Facebook biography of the identity. Applicable to Facebook and Messenger channels only * Example: Painter living in Paris */ fbBio?: string; /** - * Facebook category of the identity. - * - * Applicable to Facebook and Messenger channels only. + * Facebook category of the identity. Applicable to Facebook and Messenger channels only * Example: Computers/Internet */ fbCategory?: string; /** - * Facebook locale of the identity. - * - * Applicable to Facebook and Messenger channels only. + * Facebook locale of the identity. Applicable to Facebook and Messenger channels only * Example: fr_FR */ fbLocale?: string; /** - * Instagram followers count of the identity. - * - * Applicable to Instagram and InstagramMessaging channels only. + * Instagram followers count of the identity. Applicable to Instagram and InstagramMessaging channels only * Format: int32 * Example: 10 */ igFollowersCount?: number; /** - * Twitter description of the identity. - * - * Applicable to Twitter channels only. + * Twitter description of the identity. Applicable to Twitter channels only * Example: Software Engineer */ twDescription?: string; /** - * Twitter followers count of the identity. - * - * Applicable to Twitter channels only. + * Twitter followers count of the identity. Applicable to Twitter channels only * Format: int32 * Example: 10 */ twFollowersCount?: number; /** - * Count of Twitter accounts followed by the identity. - * - * Applicable to Twitter channels only. + * Count of Twitter accounts followed by the identity. Applicable to Twitter channels only * Format: int32 * Example: 500 */ twFollowingCount?: number; /** - * Count of tweets of the identity. - * - * Applicable to Twitter channels only. + * Count of tweets of the identity. Applicable to Twitter channels only * Format: int32 * Example: 42 */ twStatusesCount?: number; /** - * Twitter location of the identity. - * - * Applicable to Twitter channels only. + * Twitter location of the identity. Applicable to Twitter channels only * Example: Paris */ twLocation?: string; /** - * Viber API version of the identity. - * - * Applicable to Viber channels only. + * Viber API version of the identity. Applicable to Viber channels only * Example: 10 */ apiVersion?: string; /** - * Viber country of the identity. - * - * Applicable to Viber channels only. + * Viber country of the identity. Applicable to Viber channels only * Example: FR */ country?: string; /** - * Viber device type of the identity. - * - * Applicable to Viber channels only. + * Viber device type of the identity. Applicable to Viber channels only * Example: SM-G970U1 */ deviceType?: string; /** - * Viber language of the identity. - * - * Applicable to Viber channels only. + * Viber language of the identity. Applicable to Viber channels only * Example: fr-FR */ language?: string; /** - * Viber mobile country code of the identity. - * - * Applicable to Viber channels only. + * Viber mobile country code of the identity. Applicable to Viber channels only * Example: 1 */ mcc?: string; /** - * Viber mobile network code of the identity. - * - * Applicable to Viber channels only. + * Viber mobile network code of the identity. Applicable to Viber channels only * Example: 220 */ mnc?: string; /** - * Viber primary device OS of the identity. - * - * Applicable to Viber channels only. + * Viber primary device OS of the identity. Applicable to Viber channels only * Example: Android 11 */ primaryDeviceOs?: string; /** - * Viber application version of the identity. - * - * Applicable to Viber channels only. + * Viber application version of the identity. Applicable to Viber channels only * Example: 19.5.0 */ viberVersion?: string; diff --git a/packages/core/src/definitions/IntrospectTokenRequest.ts b/packages/core/src/definitions/IntrospectTokenRequest.ts deleted file mode 100644 index 3c08e3ab..00000000 --- a/packages/core/src/definitions/IntrospectTokenRequest.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Request body for operation introspectToken - */ -interface IntrospectTokenRequest { - /** - * OAuth token - */ - token?: string; - - /** - */ - scope?: string; -} - -export default IntrospectTokenRequest; diff --git a/packages/core/src/definitions/IvrPinTokenRequest.ts b/packages/core/src/definitions/IvrPinTokenRequest.ts new file mode 100644 index 00000000..7bd64a93 --- /dev/null +++ b/packages/core/src/definitions/IvrPinTokenRequest.ts @@ -0,0 +1,18 @@ +/** + * Token endpoint request parameters used in the "IVR Pin" authorization flow with the `ivr_pin` grant type + * + */ +interface IvrPinTokenRequest { + /** + * Grant type + */ + grant_type?: 'ivr_pin'; + + /** + * For `ivr_pin` grant type only. User's IVR pin. + * Required + */ + ivr_pin?: string; +} + +export default IvrPinTokenRequest; diff --git a/packages/core/src/definitions/JobStatusResponse.ts b/packages/core/src/definitions/JobStatusResponse.ts index f3dc6f00..e1225d8d 100644 --- a/packages/core/src/definitions/JobStatusResponse.ts +++ b/packages/core/src/definitions/JobStatusResponse.ts @@ -1,3 +1,5 @@ +import type JobStatusResponseResponse from './JobStatusResponseResponse'; + interface JobStatusResponse { /** */ @@ -17,6 +19,14 @@ interface JobStatusResponse { * Format: date-time */ expirationTime?: string; + + /** + */ + status?: 'Success' | 'Fail'; + + /** + */ + response?: JobStatusResponseResponse; } export default JobStatusResponse; diff --git a/packages/core/src/definitions/JobStatusResponseResponse.ts b/packages/core/src/definitions/JobStatusResponseResponse.ts new file mode 100644 index 00000000..9e8e3ab2 --- /dev/null +++ b/packages/core/src/definitions/JobStatusResponseResponse.ts @@ -0,0 +1,48 @@ +import type UtteranceObject from './UtteranceObject'; +import type WordSegment from './WordSegment'; +import type UtteranceInsightsObject from './UtteranceInsightsObject'; +import type SpeakerInsightsObject from './SpeakerInsightsObject'; +import type ConversationalInsightsUnit from './ConversationalInsightsUnit'; + +interface JobStatusResponseResponse { + /** + * The number of speakers detected. Field is set only when enableSpeakerDiarization is true. + * Format: int32 + * Example: 2 + */ + speakerCount?: number; + + /** + * Speaker wise utterances. Field is set only when enableSpeakerDiarization is true. + */ + utterances?: UtteranceObject[]; + + /** + */ + words?: WordSegment[]; + + /** + * Overall transcription confidence. + * Format: float + */ + confidence?: number; + + /** + * The entire transcript with/without punctuations according to the input. + */ + transcript?: string; + + /** + */ + utteranceInsights?: UtteranceInsightsObject[]; + + /** + */ + speakerInsights?: SpeakerInsightsObject; + + /** + */ + conversationalInsights?: ConversationalInsightsUnit[]; +} + +export default JobStatusResponseResponse; diff --git a/packages/core/src/definitions/JwtTokenRequest.ts b/packages/core/src/definitions/JwtTokenRequest.ts new file mode 100644 index 00000000..57824f70 --- /dev/null +++ b/packages/core/src/definitions/JwtTokenRequest.ts @@ -0,0 +1,21 @@ +/** + * Token endpoint request parameters used in the "Personal JWT", "JWT Bearer" and "Partner JWT" authorization flows + * with the `urn:ietf:params:oauth:grant-type:jwt-bearer` and `partner_jwt` grant types + * + */ +interface JwtTokenRequest { + /** + * Grant type + */ + grant_type?: 'urn:ietf:params:oauth:grant-type:jwt-bearer' | 'partner_jwt'; + + /** + * For `urn:ietf:params:oauth:grant-type:jwt-bearer` or `partner_jwt` grant types only. + * Authorization grant assertion (JWT) + * as defined by [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.1). + * Required + */ + assertion?: string; +} + +export default JwtTokenRequest; diff --git a/packages/core/src/definitions/ListCompanyMessageTemplatesParameters.ts b/packages/core/src/definitions/ListCompanyMessageTemplatesParameters.ts new file mode 100644 index 00000000..84e3869f --- /dev/null +++ b/packages/core/src/definitions/ListCompanyMessageTemplatesParameters.ts @@ -0,0 +1,12 @@ +/** + * Query parameters for operation listCompanyMessageTemplates + */ +interface ListCompanyMessageTemplatesParameters { + /** + * Site ID(s) to filter company message templates, associated with particular sites + * By default the value is all - templates with all sites will be returned + */ + siteIds?: string[]; +} + +export default ListCompanyMessageTemplatesParameters; diff --git a/packages/core/src/definitions/SocMsgListIdentitiesParameters.ts b/packages/core/src/definitions/ListSocialMessagingIdentitiesParameters.ts similarity index 66% rename from packages/core/src/definitions/SocMsgListIdentitiesParameters.ts rename to packages/core/src/definitions/ListSocialMessagingIdentitiesParameters.ts index 44fefe30..3444b03b 100644 --- a/packages/core/src/definitions/SocMsgListIdentitiesParameters.ts +++ b/packages/core/src/definitions/ListSocialMessagingIdentitiesParameters.ts @@ -1,24 +1,24 @@ /** - * Query parameters for operation socMsgListIdentities + * Query parameters for operation listSocialMessagingIdentities */ -interface SocMsgListIdentitiesParameters { +interface ListSocialMessagingIdentitiesParameters { /** - * Filter based on the specified sourceId. + * Filter based on the specified `sourceId` */ sourceId?: string; /** - * Filter based on the specified identityGroupIds (separated by commas). + * Filter based on the specified `identityGroupIds` (separated by commas) */ identityGroupIds?: string[]; /** - * Filter based on the specified userId. + * Filter based on the specified `userId` */ userId?: string; /** - * Filter based on the specified uuid. + * Filter based on the specified `uuid` */ uuid?: string; @@ -47,4 +47,4 @@ interface SocMsgListIdentitiesParameters { perPage?: number; } -export default SocMsgListIdentitiesParameters; +export default ListSocialMessagingIdentitiesParameters; diff --git a/packages/core/src/definitions/ListUserMessageTemplatesParameters.ts b/packages/core/src/definitions/ListUserMessageTemplatesParameters.ts new file mode 100644 index 00000000..f0504241 --- /dev/null +++ b/packages/core/src/definitions/ListUserMessageTemplatesParameters.ts @@ -0,0 +1,17 @@ +/** + * Query parameters for operation listUserMessageTemplates + */ +interface ListUserMessageTemplatesParameters { + /** + * Site ID(s) to filter user message templates, associated with particular sites. + * By default the value is all - templates with all sites will be returned + */ + siteIds?: string[]; + + /** + * Specifies if a template is available on a user (Personal) or a company (Company) level + */ + scope?: 'Company' | 'Personal'; +} + +export default ListUserMessageTemplatesParameters; diff --git a/packages/core/src/definitions/MessageStatusCounts.ts b/packages/core/src/definitions/MessageStatusCounts.ts index d2a099b5..191f669a 100644 --- a/packages/core/src/definitions/MessageStatusCounts.ts +++ b/packages/core/src/definitions/MessageStatusCounts.ts @@ -10,12 +10,13 @@ interface MessageStatusCounts { /** * Count of messages with this status code - * Format: int64 + * Format: int32 * Example: 7 */ count?: number; /** + * Message sending/delivery errors. Returned in `deliveryFailed` and `sendingFailed` resources */ errorCodeCounts?: object; } diff --git a/packages/core/src/definitions/MessageStoreCallerInfoResponseTo.ts b/packages/core/src/definitions/MessageStoreCallerInfoResponseTo.ts index 2df3ab29..42a67c74 100644 --- a/packages/core/src/definitions/MessageStoreCallerInfoResponseTo.ts +++ b/packages/core/src/definitions/MessageStoreCallerInfoResponseTo.ts @@ -90,6 +90,11 @@ interface MessageStoreCallerInfoResponseTo { * sending/receiving SMS */ phoneNumber?: string; + + /** + * Internal identifier of a message recipient + */ + recipientId?: string; } export default MessageStoreCallerInfoResponseTo; diff --git a/packages/core/src/definitions/MessageTemplateRequest.ts b/packages/core/src/definitions/MessageTemplateRequest.ts new file mode 100644 index 00000000..69b9d32b --- /dev/null +++ b/packages/core/src/definitions/MessageTemplateRequest.ts @@ -0,0 +1,21 @@ +import type TemplateInfo from './TemplateInfo'; +import type Site from './Site'; + +interface MessageTemplateRequest { + /** + * Name of a template + * Required + */ + displayName?: string; + + /** + * Required + */ + body?: TemplateInfo; + + /** + */ + site?: Site; +} + +export default MessageTemplateRequest; diff --git a/packages/core/src/definitions/MessageTemplateResponse.ts b/packages/core/src/definitions/MessageTemplateResponse.ts new file mode 100644 index 00000000..d03466ea --- /dev/null +++ b/packages/core/src/definitions/MessageTemplateResponse.ts @@ -0,0 +1,29 @@ +import type TemplateInfo from './TemplateInfo'; +import type Site from './Site'; + +interface MessageTemplateResponse { + /** + * Internal identifier of a template + */ + id?: string; + + /** + * Name of a template + */ + displayName?: string; + + /** + */ + body?: TemplateInfo; + + /** + * Specifies if a template is available on a user (Personal) or a company (Company) level + */ + scope?: 'Company' | 'Personal'; + + /** + */ + site?: Site; +} + +export default MessageTemplateResponse; diff --git a/packages/core/src/definitions/MessageTemplateUpdateRequest.ts b/packages/core/src/definitions/MessageTemplateUpdateRequest.ts new file mode 100644 index 00000000..3f64257d --- /dev/null +++ b/packages/core/src/definitions/MessageTemplateUpdateRequest.ts @@ -0,0 +1,20 @@ +import type TemplateInfo from './TemplateInfo'; +import type Site from './Site'; + +interface MessageTemplateUpdateRequest { + /** + * Name of a template + */ + displayName?: string; + + /** + * Required + */ + body?: TemplateInfo; + + /** + */ + site?: Site; +} + +export default MessageTemplateUpdateRequest; diff --git a/packages/core/src/definitions/MessageTemplatesListResponse.ts b/packages/core/src/definitions/MessageTemplatesListResponse.ts new file mode 100644 index 00000000..01788b15 --- /dev/null +++ b/packages/core/src/definitions/MessageTemplatesListResponse.ts @@ -0,0 +1,10 @@ +import type MessageTemplateResponse from './MessageTemplateResponse'; + +interface MessageTemplatesListResponse { + /** + * List of text message templates + */ + records?: MessageTemplateResponse[]; +} + +export default MessageTemplatesListResponse; diff --git a/packages/core/src/definitions/OtpTokenRequest.ts b/packages/core/src/definitions/OtpTokenRequest.ts new file mode 100644 index 00000000..ee7f554b --- /dev/null +++ b/packages/core/src/definitions/OtpTokenRequest.ts @@ -0,0 +1,18 @@ +/** + * Token endpoint request parameters used in the "One-time Password" (OTP) authorization flow with the `otp` grant type + */ +interface OtpTokenRequest { + /** + * Grant type + */ + grant_type?: 'otp'; + + /** + * For `otp` grant type only. + * One-time password code + * Required + */ + code?: string; +} + +export default OtpTokenRequest; diff --git a/packages/core/src/definitions/ReadGlipPostsNewParameters.ts b/packages/core/src/definitions/ReadGlipPostsNewParameters.ts index f3c26ab7..9fe650e8 100644 --- a/packages/core/src/definitions/ReadGlipPostsNewParameters.ts +++ b/packages/core/src/definitions/ReadGlipPostsNewParameters.ts @@ -3,7 +3,7 @@ */ interface ReadGlipPostsNewParameters { /** - * Max number of posts to be fetched by one request (not more than 250). + * Max number of posts to be fetched by one request (not more than 250) * Maximum: 250 * Format: int32 * Default: 30 diff --git a/packages/core/src/definitions/RefreshTokenRequest.ts b/packages/core/src/definitions/RefreshTokenRequest.ts new file mode 100644 index 00000000..01125534 --- /dev/null +++ b/packages/core/src/definitions/RefreshTokenRequest.ts @@ -0,0 +1,19 @@ +/** + * Token endpoint request parameters used in the "Refresh Token" flow + * with the `refresh_token` grant type + * + */ +interface RefreshTokenRequest { + /** + * Grant type + */ + grant_type?: 'refresh_token'; + + /** + * For `refresh_token` grant type only. Previously issued refresh token. + * Required + */ + refresh_token?: string; +} + +export default RefreshTokenRequest; diff --git a/packages/core/src/definitions/RegSessionModelSettings.ts b/packages/core/src/definitions/RegSessionModelSettings.ts index aaf74028..8548edc0 100644 --- a/packages/core/src/definitions/RegSessionModelSettings.ts +++ b/packages/core/src/definitions/RegSessionModelSettings.ts @@ -28,9 +28,19 @@ interface RegSessionModelSettings { /** * Indicates that recording will be shown after the webinar and in emails. - * Default: true */ viewRecording?: boolean; + + /** + * Duration of on-demand webinar. The default value can only be used if the session is on demand. + * Default: SixMonths + */ + onDemandDuration?: 'OneMonth' | 'TwoMonths' | 'ThreeMonths' | 'SixMonths' | 'OneYear'; + + /** + * Indicates that recording exists for the session. + */ + recordingExist?: boolean; } export default RegSessionModelSettings; diff --git a/packages/core/src/definitions/RegistrantBaseModel.ts b/packages/core/src/definitions/RegistrantBaseModel.ts index abc7063d..f37f257a 100644 --- a/packages/core/src/definitions/RegistrantBaseModel.ts +++ b/packages/core/src/definitions/RegistrantBaseModel.ts @@ -35,6 +35,11 @@ interface RegistrantBaseModel { */ cancellationUri?: string; + /** + * Indicates if the registrant was registered to on-demand webinar + */ + registeredPostWebinar?: boolean; + /** * Visitor ID passed from registration page */ diff --git a/packages/core/src/definitions/RegistrantBaseModelWithQuestionnaire.ts b/packages/core/src/definitions/RegistrantBaseModelWithQuestionnaire.ts index 65f07ade..e0dfce20 100644 --- a/packages/core/src/definitions/RegistrantBaseModelWithQuestionnaire.ts +++ b/packages/core/src/definitions/RegistrantBaseModelWithQuestionnaire.ts @@ -37,6 +37,11 @@ interface RegistrantBaseModelWithQuestionnaire { */ cancellationUri?: string; + /** + * Indicates if the registrant was registered to on-demand webinar + */ + registeredPostWebinar?: boolean; + /** * Visitor ID passed from registration page */ diff --git a/packages/core/src/definitions/RegistrantMinimalModel.ts b/packages/core/src/definitions/RegistrantMinimalModel.ts index c654eb03..d6cdba9e 100644 --- a/packages/core/src/definitions/RegistrantMinimalModel.ts +++ b/packages/core/src/definitions/RegistrantMinimalModel.ts @@ -34,6 +34,11 @@ interface RegistrantMinimalModel { * Example: https://abcde12345.webinar.ringcentral.com/register?jlt=iuyef77fsj473wn10ashjfk34&action=cancel */ cancellationUri?: string; + + /** + * Indicates if the registrant was registered to on-demand webinar + */ + registeredPostWebinar?: boolean; } export default RegistrantMinimalModel; diff --git a/packages/core/src/definitions/RegistrantModelResponsePostWithQuestionnaire.ts b/packages/core/src/definitions/RegistrantModelResponsePostWithQuestionnaire.ts index 2d4f2f9d..32c60040 100644 --- a/packages/core/src/definitions/RegistrantModelResponsePostWithQuestionnaire.ts +++ b/packages/core/src/definitions/RegistrantModelResponsePostWithQuestionnaire.ts @@ -57,6 +57,11 @@ interface RegistrantModelResponsePostWithQuestionnaire { */ cancellationUri?: string; + /** + * Indicates if the registrant was registered to on-demand webinar + */ + registeredPostWebinar?: boolean; + /** * Visitor ID passed from registration page */ diff --git a/packages/core/src/definitions/RegistrantModelWithQuestionnaire.ts b/packages/core/src/definitions/RegistrantModelWithQuestionnaire.ts index 64cf33af..ca7827d0 100644 --- a/packages/core/src/definitions/RegistrantModelWithQuestionnaire.ts +++ b/packages/core/src/definitions/RegistrantModelWithQuestionnaire.ts @@ -57,6 +57,11 @@ interface RegistrantModelWithQuestionnaire { */ cancellationUri?: string; + /** + * Indicates if the registrant was registered to on-demand webinar + */ + registeredPostWebinar?: boolean; + /** * Visitor ID passed from registration page */ diff --git a/packages/core/src/definitions/RevokeTokenRequest.ts b/packages/core/src/definitions/RevokeTokenRequest.ts index a2e14e13..08c2476b 100644 --- a/packages/core/src/definitions/RevokeTokenRequest.ts +++ b/packages/core/src/definitions/RevokeTokenRequest.ts @@ -6,12 +6,16 @@ interface RevokeTokenRequest { token?: string; /** - * Client assertion type + * Client assertion type for the `client_secret_jwt` or `private_key_jwt` client authentication types, + * as defined by [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.2). + * This parameter is mandatory if the client authentication is required and a client decided to use one of these authentication types */ - client_assertion_type?: string; + client_assertion_type?: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'; /** - * Client assertion + * Client assertion (JWT) for the `client_secret_jwt` or `private_key_jwt` client authentication types, + * as defined by [RFC-7523](https://datatracker.ietf.org/doc/html/rfc7523#section-2.2). + * This parameter is mandatory if the client authentication is required and a client decided to use one of these authentication types */ client_assertion?: string; } diff --git a/packages/core/src/definitions/RoleResource.ts b/packages/core/src/definitions/RoleResource.ts index d8ff3f44..70a88a9c 100644 --- a/packages/core/src/definitions/RoleResource.ts +++ b/packages/core/src/definitions/RoleResource.ts @@ -37,7 +37,15 @@ interface RoleResource { /** * Specifies resource for permission */ - scope?: 'Account' | 'AllExtensions' | 'Federation' | 'NonUserExtensions' | 'RoleBased' | 'Self' | 'UserExtensions'; + scope?: + | 'Account' + | 'AllExtensions' + | 'Federation' + | 'Group' + | 'NonUserExtensions' + | 'RoleBased' + | 'Self' + | 'UserExtensions'; /** */ diff --git a/packages/core/src/definitions/RopcTokenRequest.ts b/packages/core/src/definitions/RopcTokenRequest.ts new file mode 100644 index 00000000..205b72f7 --- /dev/null +++ b/packages/core/src/definitions/RopcTokenRequest.ts @@ -0,0 +1,42 @@ +/** + * Token endpoint request parameters used in the "Password" (also known as "Resource Owner Password Credentials" - ROPC) + * authorization flow with the `password` grant type + * + */ +interface RopcTokenRequest { + /** + * Grant type + */ + grant_type?: 'password'; + + /** + * For `password` grant type only. User login name: email or phone number in E.164 format + * Required + */ + username?: string; + + /** + * For `password` grant type only. User's password + * Required + * Format: password + */ + password?: string; + + /** + * For `password` grant type only. Optional. Extension short number. If a company number + * is specified as a username, and extension is not specified, the + * server will attempt to authenticate client as main company administrator + * + * DEPRECATED: use extension number embedded into username string like `+16501234567*101` + */ + extension?: string; + + /** + * IVR pin for pin-based authentication. + * + * DEPRECATED: use a dedicated `ivr_pin` grant type instead + */ + pin?: string; +} + +export default RopcTokenRequest; diff --git a/packages/core/src/definitions/ServiceInfo.ts b/packages/core/src/definitions/ServiceInfo.ts index 84721751..c32a57d8 100644 --- a/packages/core/src/definitions/ServiceInfo.ts +++ b/packages/core/src/definitions/ServiceInfo.ts @@ -39,7 +39,7 @@ interface ServiceInfo { /** */ - ubrand?: UBrandInfo; + uBrand?: UBrandInfo; } export default ServiceInfo; diff --git a/packages/core/src/definitions/ServiceInfoCountryShortModel.ts b/packages/core/src/definitions/ServiceInfoCountryShortModel.ts new file mode 100644 index 00000000..2137e339 --- /dev/null +++ b/packages/core/src/definitions/ServiceInfoCountryShortModel.ts @@ -0,0 +1,34 @@ +interface ServiceInfoCountryShortModel { + /** + * Internal identifier of a country + */ + id?: string; + + /** + * Canonical URI of a country resource + * Format: uri + */ + uri?: string; + + /** + * The official name of a country + */ + name?: string; + + /** + * A ISO country code value complying with the + * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + * format. + */ + isoCode?: string; + + /** + * Country calling code defined by [ITU-T](http://en.wikipedia.org/wiki/ITU-T) + * recommendations [E.123](http://en.wikipedia.org/wiki/E.123) and + * [E.164](http://en.wikipedia.org/wiki/E.164), + * see [Calling Codes](http://en.wikipedia.org/wiki/List_of_country_calling_codes) + */ + callingCode?: string; +} + +export default ServiceInfoCountryShortModel; diff --git a/packages/core/src/definitions/ServiceInfoPlan.ts b/packages/core/src/definitions/ServiceInfoPlan.ts new file mode 100644 index 00000000..32d00995 --- /dev/null +++ b/packages/core/src/definitions/ServiceInfoPlan.ts @@ -0,0 +1,25 @@ +/** + * Information on account service plan + */ +interface ServiceInfoPlan { + /** + * Internal identifier of a service plan + */ + id?: string; + + /** + * Name of a service plan + */ + name?: string; + + /** + * Edition of a service plan + */ + edition?: string; + + /** + */ + freemiumProductType?: 'Freyja' | 'Phoenix'; +} + +export default ServiceInfoPlan; diff --git a/packages/core/src/definitions/ServiceInfoUBrand.ts b/packages/core/src/definitions/ServiceInfoUBrand.ts new file mode 100644 index 00000000..e55f014e --- /dev/null +++ b/packages/core/src/definitions/ServiceInfoUBrand.ts @@ -0,0 +1,18 @@ +/** + * Account sub-brand information + */ +interface ServiceInfoUBrand { + /** + * Sub-brand unique ID + * Example: 111.222 + */ + id?: string; + + /** + * Sub-brand name + * Example: Sub-brand name + */ + name?: string; +} + +export default ServiceInfoUBrand; diff --git a/packages/core/src/definitions/ServiceInfoV2.ts b/packages/core/src/definitions/ServiceInfoV2.ts index 06df1bd0..2b2fd08e 100644 --- a/packages/core/src/definitions/ServiceInfoV2.ts +++ b/packages/core/src/definitions/ServiceInfoV2.ts @@ -1,5 +1,8 @@ import type ServiceInfoPackage from './ServiceInfoPackage'; import type ServiceInfoBrand from './ServiceInfoBrand'; +import type ServiceInfoCountryShortModel from './ServiceInfoCountryShortModel'; +import type ServiceInfoUBrand from './ServiceInfoUBrand'; +import type ServiceInfoPlan from './ServiceInfoPlan'; /** * Service Plan information (billing package, brand, etc.) @@ -13,6 +16,18 @@ interface ServiceInfoV2 { /** */ brand?: ServiceInfoBrand; + + /** + */ + contractedCountry?: ServiceInfoCountryShortModel; + + /** + */ + uBrand?: ServiceInfoUBrand; + + /** + */ + servicePlan?: ServiceInfoPlan; } export default ServiceInfoV2; diff --git a/packages/core/src/definitions/SessionInfoResponse.ts b/packages/core/src/definitions/SessionInfoResponse.ts deleted file mode 100644 index 89692d10..00000000 --- a/packages/core/src/definitions/SessionInfoResponse.ts +++ /dev/null @@ -1,50 +0,0 @@ -interface SessionInfoResponse { - /** - * Identifier (key) of a client application - * Required - */ - client_id?: string; - - /** - * List of permissions (space separated) granted to the application with this token - * Example: AccountInfo CallLog ExtensionInfo Messages SMS - */ - scope?: string; - - /** - * Subject of the token (extension ID or the owner) - */ - sub?: string; - - /** - * RC account ID associated with the token - */ - account_id?: string; - - /** - * Remaining time in seconds until session expiration due to absolute timeout - * Format: int32 - */ - session_expires_in?: number; - - /** - * Absolute value of session expiration time in ISO date formatted string - * Format: date-time - * Example: 2023-04-01T12:00:01Z - */ - session_expiration_time?: string; - - /** - * OAuth session ID - * Required - */ - session_id?: string; - - /** - * Nominal value of session idle timeout in seconds - * Format: int32 - */ - session_idle_timeout?: number; -} - -export default SessionInfoResponse; diff --git a/packages/core/src/definitions/Site.ts b/packages/core/src/definitions/Site.ts new file mode 100644 index 00000000..d239e163 --- /dev/null +++ b/packages/core/src/definitions/Site.ts @@ -0,0 +1,18 @@ +/** + * Specifies a site that message template is associated with. Supported only if the Sites feature is enabled. + * The default is `main-site` value. + * + */ +interface Site { + /** + * Internal identifier of a site + */ + id?: string; + + /** + * Custom name of a site + */ + name?: string; +} + +export default Site; diff --git a/packages/core/src/definitions/TMCreateEventRequest.ts b/packages/core/src/definitions/TMCreateEventRequest.ts index e249376b..c6616118 100644 --- a/packages/core/src/definitions/TMCreateEventRequest.ts +++ b/packages/core/src/definitions/TMCreateEventRequest.ts @@ -1,3 +1,5 @@ +import type EventRecurrenceInfo from './EventRecurrenceInfo'; + interface TMCreateEventRequest { /** * Internal identifier of an event @@ -35,29 +37,8 @@ interface TMCreateEventRequest { allDay?: boolean; /** - * Event recurrence settings. For non-periodic events the value - * is `None`. Must be greater or equal to event duration: 1- Day/Weekday; - * 7 - Week; 28 - Month; 365 - Year - */ - recurrence?: 'None' | 'Day' | 'Weekday' | 'Week' | 'Month' | 'Year'; - - /** - * Condition of ending an event - */ - endingCondition?: 'None' | 'Count' | 'Date'; - - /** - * Count of event iterations. For periodic events only. Value range is 1 - 10. - * Must be specified if `endingCondition` is `Count` - * Format: int32 - */ - endingAfter?: number; - - /** - * Iterations ending datetime for periodic events in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format - * Format: date-time */ - endingOn?: string; + recurrence?: EventRecurrenceInfo; /** * Color of Event title (including its presentation in Calendar) diff --git a/packages/core/src/definitions/TMCreateTaskRequest.ts b/packages/core/src/definitions/TMCreateTaskRequest.ts index 10fef308..c08e18ea 100644 --- a/packages/core/src/definitions/TMCreateTaskRequest.ts +++ b/packages/core/src/definitions/TMCreateTaskRequest.ts @@ -1,5 +1,5 @@ import type TMCreateTaskRequestAssignees from './TMCreateTaskRequestAssignees'; -import type TMCreateTaskRequestRecurrence from './TMCreateTaskRequestRecurrence'; +import type TaskRecurrenceInfo from './TaskRecurrenceInfo'; import type TMAttachmentInfo from './TMAttachmentInfo'; interface TMCreateTaskRequest { @@ -48,7 +48,7 @@ interface TMCreateTaskRequest { /** */ - recurrence?: TMCreateTaskRequestRecurrence; + recurrence?: TaskRecurrenceInfo; /** */ diff --git a/packages/core/src/definitions/TMCreateTaskRequestRecurrence.ts b/packages/core/src/definitions/TMCreateTaskRequestRecurrence.ts deleted file mode 100644 index 32376b4a..00000000 --- a/packages/core/src/definitions/TMCreateTaskRequestRecurrence.ts +++ /dev/null @@ -1,29 +0,0 @@ -interface TMCreateTaskRequestRecurrence { - /** - * Task recurrence settings. - * Default: None - */ - schedule?: 'None' | 'Daily' | 'Weekdays' | 'Weekly' | 'Monthly' | 'Yearly'; - - /** - * Task ending condition. - * Default: None - */ - endingCondition?: 'None' | 'Count' | 'Date'; - - /** - * Count of iterations of periodic tasks - * Maximum: 10 - * Minimum: 1 - * Format: int32 - */ - endingAfter?: number; - - /** - * End date of a periodic task in UTC time zone - * Format: date-time - */ - endingOn?: string; -} - -export default TMCreateTaskRequestRecurrence; diff --git a/packages/core/src/definitions/TMEventInfo.ts b/packages/core/src/definitions/TMEventInfo.ts index 3d5d1946..253ffd72 100644 --- a/packages/core/src/definitions/TMEventInfo.ts +++ b/packages/core/src/definitions/TMEventInfo.ts @@ -1,3 +1,5 @@ +import type EventRecurrenceInfo from './EventRecurrenceInfo'; + interface TMEventInfo { /** * Internal identifier of an event @@ -32,27 +34,8 @@ interface TMEventInfo { allDay?: boolean; /** - * Event recurrence settings - */ - recurrence?: 'None' | 'Day' | 'Weekday' | 'Week' | 'Month' | 'Year'; - - /** - * Condition of ending an event - */ - endingCondition?: 'None' | 'Count' | 'Date'; - - /** - * Count of event iterations. For periodic events only. Value range is 1 - 10. - * Must be specified if `endingCondition` is `Count` - * Format: int32 - */ - endingAfter?: number; - - /** - * Iterations ending datetime for periodic events in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format - * Format: date-time */ - endingOn?: string; + recurrence?: EventRecurrenceInfo; /** * Color of Event title (including its presentation in Calendar) diff --git a/packages/core/src/definitions/TMMessageAttachmentInfo.ts b/packages/core/src/definitions/TMMessageAttachmentInfo.ts index e3d20668..740a1ca2 100644 --- a/packages/core/src/definitions/TMMessageAttachmentInfo.ts +++ b/packages/core/src/definitions/TMMessageAttachmentInfo.ts @@ -1,6 +1,7 @@ import type TMAttachmentAuthorInfo from './TMAttachmentAuthorInfo'; import type TMAttachmentFieldsInfo from './TMAttachmentFieldsInfo'; import type TMAttachmentFootnoteInfo from './TMAttachmentFootnoteInfo'; +import type EventRecurrenceInfo from './EventRecurrenceInfo'; interface TMMessageAttachmentInfo { /** @@ -82,27 +83,8 @@ interface TMMessageAttachmentInfo { allDay?: boolean; /** - * Event recurrence settings. */ - recurrence?: 'None' | 'Day' | 'Weekday' | 'Week' | 'Month' | 'Year'; - - /** - * Condition of ending an event - */ - endingCondition?: 'None' | 'Count' | 'Date'; - - /** - * Count of event iterations. For periodic events only. Value range is 1 - 10. - * Must be specified if `endingCondition` is `Count` - * Format: int32 - */ - endingAfter?: number; - - /** - * Iterations ending datetime for periodic events in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format - * Format: date-time - */ - endingOn?: string; + recurrence?: EventRecurrenceInfo; /** * Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card diff --git a/packages/core/src/definitions/TMTaskInfo.ts b/packages/core/src/definitions/TMTaskInfo.ts index e7fbc35a..53d347b4 100644 --- a/packages/core/src/definitions/TMTaskInfo.ts +++ b/packages/core/src/definitions/TMTaskInfo.ts @@ -1,6 +1,6 @@ import type TMTaskInfoCreator from './TMTaskInfoCreator'; import type TMTaskInfoAssignees from './TMTaskInfoAssignees'; -import type TMTaskInfoRecurrence from './TMTaskInfoRecurrence'; +import type TaskRecurrenceInfo from './TaskRecurrenceInfo'; import type TaskAttachment from './TaskAttachment'; interface TMTaskInfo { @@ -90,9 +90,8 @@ interface TMTaskInfo { description?: string; /** - * Task details */ - recurrence?: TMTaskInfoRecurrence; + recurrence?: TaskRecurrenceInfo; /** */ diff --git a/packages/core/src/definitions/TMUpdateTaskRequest.ts b/packages/core/src/definitions/TMUpdateTaskRequest.ts index b18ae71b..7d129426 100644 --- a/packages/core/src/definitions/TMUpdateTaskRequest.ts +++ b/packages/core/src/definitions/TMUpdateTaskRequest.ts @@ -1,5 +1,5 @@ import type TMUpdateTaskRequestAssignees from './TMUpdateTaskRequestAssignees'; -import type TMUpdateTaskRequestRecurrence from './TMUpdateTaskRequestRecurrence'; +import type TaskRecurrenceInfo from './TaskRecurrenceInfo'; import type TMAttachmentInfo from './TMAttachmentInfo'; interface TMUpdateTaskRequest { @@ -44,7 +44,7 @@ interface TMUpdateTaskRequest { /** */ - recurrence?: TMUpdateTaskRequestRecurrence; + recurrence?: TaskRecurrenceInfo; /** */ diff --git a/packages/core/src/definitions/TMUpdateTaskRequestRecurrence.ts b/packages/core/src/definitions/TMUpdateTaskRequestRecurrence.ts deleted file mode 100644 index 0e69b599..00000000 --- a/packages/core/src/definitions/TMUpdateTaskRequestRecurrence.ts +++ /dev/null @@ -1,28 +0,0 @@ -interface TMUpdateTaskRequestRecurrence { - /** - * Task recurrence settings. - * Default: None - */ - schedule?: 'None' | 'Daily' | 'Weekdays' | 'Weekly' | 'Monthly' | 'Yearly'; - - /** - * Task ending condition - */ - endingCondition?: 'None' | 'Count' | 'Date'; - - /** - * Count of iterations of periodic tasks - * Maximum: 10 - * Minimum: 1 - * Format: int32 - */ - endingAfter?: number; - - /** - * End date of a periodic task in UTC time zone - * Format: date-time - */ - endingOn?: string; -} - -export default TMUpdateTaskRequestRecurrence; diff --git a/packages/core/src/definitions/TMTaskInfoRecurrence.ts b/packages/core/src/definitions/TaskRecurrenceInfo.ts similarity index 59% rename from packages/core/src/definitions/TMTaskInfoRecurrence.ts rename to packages/core/src/definitions/TaskRecurrenceInfo.ts index 7abb3572..2d455762 100644 --- a/packages/core/src/definitions/TMTaskInfoRecurrence.ts +++ b/packages/core/src/definitions/TaskRecurrenceInfo.ts @@ -1,11 +1,16 @@ -interface TMTaskInfoRecurrence { +/** + * Task information + */ +interface TaskRecurrenceInfo { /** - * Task recurrence settings. None for non-periodic tasks + * Recurrence settings of a task. None for non-periodic tasks + * Default: None */ schedule?: 'None' | 'Daily' | 'Weekdays' | 'Weekly' | 'Monthly' | 'Yearly'; /** - * Task ending condition + * Ending condition of a task + * Default: None */ endingCondition?: 'None' | 'Count' | 'Date'; @@ -18,10 +23,11 @@ interface TMTaskInfoRecurrence { endingAfter?: number; /** - * End date of a periodic task in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format + * End date of a periodic task in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + * format, UTC time zone * Format: date-time */ endingOn?: string; } -export default TMTaskInfoRecurrence; +export default TaskRecurrenceInfo; diff --git a/packages/core/src/definitions/TemplateInfo.ts b/packages/core/src/definitions/TemplateInfo.ts index 18d5f07d..1250b666 100644 --- a/packages/core/src/definitions/TemplateInfo.ts +++ b/packages/core/src/definitions/TemplateInfo.ts @@ -1,35 +1,12 @@ +/** + * Text message template information + */ interface TemplateInfo { /** - * Link to a template - * Format: uri + * Text of a message template. Maximum length is 1000 symbols (2-byte UTF-16 encoded) + * Required */ - uri?: string; - - /** - * Internal identifier of a template - */ - id?: string; - - /** - */ - type?: 'UserSettings' | 'CallHandling'; - - /** - * Name of a template - */ - name?: string; - - /** - * Time of a template creation - * Format: date-time - */ - creationTime?: string; - - /** - * Time of the last template modification - * Format: date-time - */ - lastModifiedTime?: string; + text?: string; } export default TemplateInfo; diff --git a/packages/core/src/definitions/TokenInfo.ts b/packages/core/src/definitions/TokenInfo.ts index bfbe98e0..4739e30e 100644 --- a/packages/core/src/definitions/TokenInfo.ts +++ b/packages/core/src/definitions/TokenInfo.ts @@ -7,7 +7,7 @@ interface TokenInfo { access_token?: string; /** - * Issued access token TTL (time-to-live) in seconds + * Access token TTL (time-to-live) in seconds * Required * Format: int32 * Example: 7199 @@ -15,68 +15,74 @@ interface TokenInfo { expires_in?: number; /** - * OAuth refresh token (in case the one was issued) + * OAuth refresh token (if issued) * Example: U1BCMDFUMDRKV1MwMXxzLFL4ec6A0XMsUv9wLriecyxS_w */ refresh_token?: string; /** - * Issued refresh token TTL (time-to-live) in seconds + * Refresh token TTL (time-to-live) in seconds * Format: int32 * Example: 604799 */ refresh_token_expires_in?: number; /** - * List of permissions (space separated) granted to the application with this access token + * The list of space separated application permissions (OAuth scopes) * Required * Example: AccountInfo CallLog ExtensionInfo Messages SMS */ scope?: string; /** - * Type of token. The only supported value is `bearer`. This value should be used when specifying access token in `Authorization` header of subsequent API requests + * Type of the token. The only supported value is `bearer`. This value should be used when specifying access token in `Authorization` header of subsequent API requests * Required * Example: bearer */ - token_type?: string; + token_type?: 'bearer'; /** - * Token owner (extension/user) identifier + * Token owner's identifier. Contains RingCentral user (extension) ID * Example: 256440016 */ owner_id?: string; /** - * Application instance identifier + * Client application instance identifier that matches the value provided by the client, + * or generated by the server if a client has not provided this value * Example: 8zXq6oaLT7WvwWITlGiA1A */ endpoint_id?: string; /** - * OIDC ID token (if OpenID Connect flow was activated during authorization) + * OpenID Connect ID token (if OpenID Connect flow was activated during authorization) */ id_token?: string; /** - * OAuth session ID + * Remaining time in seconds until session expiration due to absolute timeout. + * Returned only if absolute session timeout is enforced + * Format: int32 */ - session_id?: string; + session_expires_in?: number; /** - * Absolute value of session expiration time as an ISO timestamp + * Absolute value of session expiration time in ISO date formatted string. + * Returned only if absolute session timeout is enforced * Format: date-time + * Example: 2023-04-01T12:00:01Z */ session_expiration_time?: string; /** - * Remaining time (in seconds) until session expiration due to the absolute timeout - * Format: int32 + * OAuth session ID + * Required */ - session_expires_in?: number; + session_id?: string; /** - * Nominal session idle timeout in seconds + * Nominal value of session idle timeout in seconds. + * Returned only if idle session timeout is enforced * Format: int32 */ session_idle_timeout?: number; diff --git a/packages/core/src/definitions/TokenIntrospectionResponse.ts b/packages/core/src/definitions/TokenIntrospectionResponse.ts deleted file mode 100644 index 3b50a28c..00000000 --- a/packages/core/src/definitions/TokenIntrospectionResponse.ts +++ /dev/null @@ -1,56 +0,0 @@ -interface TokenIntrospectionResponse { - /** - * Is presented token valid and active - * Required - * Example: true - */ - active?: boolean; - - /** - * List of permissions (space separated) granted to the application with this token - * Example: AccountInfo CallLog ExtensionInfo Messages SMS - */ - scope?: string; - - /** - * Identifier (key) of a client application - */ - client_id?: string; - - /** - * Type of token. The only supported value is `bearer` - * Example: bearer - */ - token_type?: string; - - /** - * Timestamp indicating when this token will expire in seconds since January 1 1970 UTC - * Format: int64 - * Example: 1706715293 - */ - exp?: number; - - /** - * Timestamp indicating when this token was originally issued in seconds since January 1 1970 UTC - * Format: int64 - * Example: 1706711693 - */ - iat?: number; - - /** - * Subject of the token (extension ID or the owner) - */ - sub?: string; - - /** - * RC account ID associated with the token - */ - account_id?: string; - - /** - * OAuth session ID associated with the token - */ - session_id?: string; -} - -export default TokenIntrospectionResponse; diff --git a/packages/core/src/paths/Cx/SocialMessaging/V1/Identities/index.ts b/packages/core/src/paths/Cx/SocialMessaging/V1/Identities/index.ts index c5a9f9ac..4498a895 100644 --- a/packages/core/src/paths/Cx/SocialMessaging/V1/Identities/index.ts +++ b/packages/core/src/paths/Cx/SocialMessaging/V1/Identities/index.ts @@ -1,4 +1,4 @@ -import type SocMsgListIdentitiesParameters from '../../../../../definitions/SocMsgListIdentitiesParameters'; +import type ListSocialMessagingIdentitiesParameters from '../../../../../definitions/ListSocialMessagingIdentitiesParameters'; import type { RingCentralInterface, ParentInterface, RestRequestConfig } from '../../../../../types'; class Index { @@ -18,15 +18,14 @@ class Index { return `${this._parent.path()}/identities`; } /** - * List identities by creation date. The default order is descending. + * Returns a list of identities filtered by creation date. The default order is descending. * - * The account context of this request is determined by the RC Account Id associated with the access token provided - * in the Authorization header. + * The account context of this request is determined by the RC Account ID associated with + * the access token provided in the Authorization header. * - * The query parameters provided shall be considered an AND operation to filter the list. + * The query parameters provided will be considered an AND operation to filter the list. * - * A query parameter not specified or a query parameter provided with no value is treated as not required for - * filtering the list. + * A query parameter which is not specified or provided with the null value will be ignored. * * HTTP Method: get * Endpoint: /cx/social-messaging/v1/identities @@ -34,7 +33,7 @@ class Index { * App Permission: SocialMessaging */ public async list( - queryParams?: SocMsgListIdentitiesParameters, + queryParams?: ListSocialMessagingIdentitiesParameters, restRequestConfig?: RestRequestConfig, ): Promise { const r = await this.rc.get(this.path(false), queryParams, restRequestConfig); @@ -42,8 +41,7 @@ class Index { } /** - * Renders an identity from given id. - * + * Returns an identity by ID specified in path. * HTTP Method: get * Endpoint: /cx/social-messaging/v1/identities/{identityId} * Rate Limit Group: Light diff --git a/packages/core/src/paths/Restapi/Account/Extension/MessageStoreTemplates/index.ts b/packages/core/src/paths/Restapi/Account/Extension/MessageStoreTemplates/index.ts new file mode 100644 index 00000000..c175c209 --- /dev/null +++ b/packages/core/src/paths/Restapi/Account/Extension/MessageStoreTemplates/index.ts @@ -0,0 +1,115 @@ +import type MessageTemplateUpdateRequest from '../../../../../definitions/MessageTemplateUpdateRequest'; +import type MessageTemplateResponse from '../../../../../definitions/MessageTemplateResponse'; +import type MessageTemplateRequest from '../../../../../definitions/MessageTemplateRequest'; +import type MessageTemplatesListResponse from '../../../../../definitions/MessageTemplatesListResponse'; +import type ListUserMessageTemplatesParameters from '../../../../../definitions/ListUserMessageTemplatesParameters'; +import type { RingCentralInterface, ParentInterface, RestRequestConfig } from '../../../../../types'; + +class Index { + public rc: RingCentralInterface; + public _parent: ParentInterface; + public templateId: string | null; + + public constructor(_parent: ParentInterface, templateId: string | null = null) { + this._parent = _parent; + this.rc = _parent.rc; + this.templateId = templateId; + } + public path(withParameter = true): string { + if (withParameter && this.templateId !== null) { + return `${this._parent.path()}/message-store-templates/${this.templateId}`; + } + return `${this._parent.path()}/message-store-templates`; + } + /** + * Returns a list of user's personal text message templates. + * HTTP Method: get + * Endpoint: /restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/message-store-templates + * Rate Limit Group: Light + * App Permission: ReadAccounts + */ + public async list( + queryParams?: ListUserMessageTemplatesParameters, + restRequestConfig?: RestRequestConfig, + ): Promise { + const r = await this.rc.get(this.path(false), queryParams, restRequestConfig); + return r.data; + } + + /** + * Creates a user personal text message template. + * Maximum number of personal templates is 25 per user. + * Max length of the `body` property is 1000 symbols (2-byte UTF-16 encoded). + * + * HTTP Method: post + * Endpoint: /restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/message-store-templates + * Rate Limit Group: Medium + * App Permission: EditExtensions + */ + public async post( + messageTemplateRequest: MessageTemplateRequest, + restRequestConfig?: RestRequestConfig, + ): Promise { + const r = await this.rc.post( + this.path(false), + messageTemplateRequest, + undefined, + restRequestConfig, + ); + return r.data; + } + + /** + * Returns a user personal text message template by ID. + * HTTP Method: get + * Endpoint: /restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/message-store-templates/{templateId} + * Rate Limit Group: Light + * App Permission: ReadAccounts + */ + public async get(restRequestConfig?: RestRequestConfig): Promise { + if (this.templateId === null) { + throw new Error('templateId must be specified.'); + } + const r = await this.rc.get(this.path(), undefined, restRequestConfig); + return r.data; + } + + /** + * Updates a user personal text message template. + * HTTP Method: put + * Endpoint: /restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/message-store-templates/{templateId} + * Rate Limit Group: Medium + * App Permission: EditExtensions + */ + public async put( + messageTemplateUpdateRequest: MessageTemplateUpdateRequest, + restRequestConfig?: RestRequestConfig, + ): Promise { + if (this.templateId === null) { + throw new Error('templateId must be specified.'); + } + const r = await this.rc.put( + this.path(), + messageTemplateUpdateRequest, + undefined, + restRequestConfig, + ); + return r.data; + } + + /** + * Deletes a user personal text message template. + * HTTP Method: delete + * Endpoint: /restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/message-store-templates/{templateId} + * Rate Limit Group: Medium + * App Permission: EditExtensions + */ + public async delete(restRequestConfig?: RestRequestConfig): Promise { + if (this.templateId === null) { + throw new Error('templateId must be specified.'); + } + const r = await this.rc.delete(this.path(), {}, undefined, restRequestConfig); + return r.data; + } +} +export default Index; diff --git a/packages/core/src/paths/Restapi/Account/Extension/index.ts b/packages/core/src/paths/Restapi/Account/Extension/index.ts index fdb1686a..a266e7c8 100644 --- a/packages/core/src/paths/Restapi/Account/Extension/index.ts +++ b/packages/core/src/paths/Restapi/Account/Extension/index.ts @@ -1,3 +1,4 @@ +import MessageStoreTemplates from './MessageStoreTemplates'; import NotificationSettings from './NotificationSettings'; import CallQueuePresence from './CallQueuePresence'; import VideoConfiguration from './VideoConfiguration'; @@ -287,5 +288,9 @@ class Index { public notificationSettings(): NotificationSettings { return new NotificationSettings(this); } + + public messageStoreTemplates(templateId: string | null = null): MessageStoreTemplates { + return new MessageStoreTemplates(this, templateId); + } } export default Index; diff --git a/packages/core/src/paths/Restapi/Account/MessageStoreTemplates/index.ts b/packages/core/src/paths/Restapi/Account/MessageStoreTemplates/index.ts new file mode 100644 index 00000000..e8478c05 --- /dev/null +++ b/packages/core/src/paths/Restapi/Account/MessageStoreTemplates/index.ts @@ -0,0 +1,112 @@ +import type MessageTemplateUpdateRequest from '../../../../definitions/MessageTemplateUpdateRequest'; +import type MessageTemplateResponse from '../../../../definitions/MessageTemplateResponse'; +import type MessageTemplateRequest from '../../../../definitions/MessageTemplateRequest'; +import type MessageTemplatesListResponse from '../../../../definitions/MessageTemplatesListResponse'; +import type ListCompanyMessageTemplatesParameters from '../../../../definitions/ListCompanyMessageTemplatesParameters'; +import type { RingCentralInterface, ParentInterface, RestRequestConfig } from '../../../../types'; + +class Index { + public rc: RingCentralInterface; + public _parent: ParentInterface; + public templateId: string | null; + + public constructor(_parent: ParentInterface, templateId: string | null = null) { + this._parent = _parent; + this.rc = _parent.rc; + this.templateId = templateId; + } + public path(withParameter = true): string { + if (withParameter && this.templateId !== null) { + return `${this._parent.path()}/message-store-templates/${this.templateId}`; + } + return `${this._parent.path()}/message-store-templates`; + } + /** + * Returns a list of company text message templates. + * HTTP Method: get + * Endpoint: /restapi/{apiVersion}/account/{accountId}/message-store-templates + * Rate Limit Group: Light + * App Permission: ReadAccounts + */ + public async list( + queryParams?: ListCompanyMessageTemplatesParameters, + restRequestConfig?: RestRequestConfig, + ): Promise { + const r = await this.rc.get(this.path(false), queryParams, restRequestConfig); + return r.data; + } + + /** + * Creates a new text message template on a company level. Maximum number of company templates is 50. + * HTTP Method: post + * Endpoint: /restapi/{apiVersion}/account/{accountId}/message-store-templates + * Rate Limit Group: Medium + * App Permission: EditAccounts + */ + public async post( + messageTemplateRequest: MessageTemplateRequest, + restRequestConfig?: RestRequestConfig, + ): Promise { + const r = await this.rc.post( + this.path(false), + messageTemplateRequest, + undefined, + restRequestConfig, + ); + return r.data; + } + + /** + * Returns a company text message template by ID. + * HTTP Method: get + * Endpoint: /restapi/{apiVersion}/account/{accountId}/message-store-templates/{templateId} + * Rate Limit Group: Light + * App Permission: ReadAccounts + */ + public async get(restRequestConfig?: RestRequestConfig): Promise { + if (this.templateId === null) { + throw new Error('templateId must be specified.'); + } + const r = await this.rc.get(this.path(), undefined, restRequestConfig); + return r.data; + } + + /** + * Updates a company text message template. + * HTTP Method: put + * Endpoint: /restapi/{apiVersion}/account/{accountId}/message-store-templates/{templateId} + * Rate Limit Group: Medium + * App Permission: EditAccounts + */ + public async put( + messageTemplateUpdateRequest: MessageTemplateUpdateRequest, + restRequestConfig?: RestRequestConfig, + ): Promise { + if (this.templateId === null) { + throw new Error('templateId must be specified.'); + } + const r = await this.rc.put( + this.path(), + messageTemplateUpdateRequest, + undefined, + restRequestConfig, + ); + return r.data; + } + + /** + * Deletes a company text message template. + * HTTP Method: delete + * Endpoint: /restapi/{apiVersion}/account/{accountId}/message-store-templates/{templateId} + * Rate Limit Group: Medium + * App Permission: EditAccounts + */ + public async delete(restRequestConfig?: RestRequestConfig): Promise { + if (this.templateId === null) { + throw new Error('templateId must be specified.'); + } + const r = await this.rc.delete(this.path(), {}, undefined, restRequestConfig); + return r.data; + } +} +export default Index; diff --git a/packages/core/src/paths/Restapi/Account/ServiceInfo/index.ts b/packages/core/src/paths/Restapi/Account/ServiceInfo/index.ts index bd5bde51..d59ecc20 100644 --- a/packages/core/src/paths/Restapi/Account/ServiceInfo/index.ts +++ b/packages/core/src/paths/Restapi/Account/ServiceInfo/index.ts @@ -20,7 +20,7 @@ class Index { * Endpoint: /restapi/{apiVersion}/account/{accountId}/service-info * Rate Limit Group: Light * App Permission: ReadAccounts - * User Permission: ReadServicePlanInfo + * User Permission: ReadCompanyInfo */ public async get(restRequestConfig?: RestRequestConfig): Promise { const r = await this.rc.get(this.path(), undefined, restRequestConfig); diff --git a/packages/core/src/paths/Restapi/Account/index.ts b/packages/core/src/paths/Restapi/Account/index.ts index 964dde35..bf808d4d 100644 --- a/packages/core/src/paths/Restapi/Account/index.ts +++ b/packages/core/src/paths/Restapi/Account/index.ts @@ -1,6 +1,7 @@ import EmergencyAddressAutoUpdate from './EmergencyAddressAutoUpdate'; import MessageStoreConfiguration from './MessageStoreConfiguration'; import AddressBookBulkUpload from './AddressBookBulkUpload'; +import MessageStoreTemplates from './MessageStoreTemplates'; import CallMonitoringGroups from './CallMonitoringGroups'; import ExtensionBulkUpdate from './ExtensionBulkUpdate'; import MessageStoreReport from './MessageStoreReport'; @@ -202,6 +203,10 @@ class Index { return new CallMonitoringGroups(this, groupId); } + public messageStoreTemplates(templateId: string | null = null): MessageStoreTemplates { + return new MessageStoreTemplates(this, templateId); + } + public addressBookBulkUpload(): AddressBookBulkUpload { return new AddressBookBulkUpload(this); } diff --git a/packages/core/src/paths/Restapi/Oauth/Authorize/index.ts b/packages/core/src/paths/Restapi/Oauth/Authorize/index.ts index aa9a96d7..b71e2ae0 100644 --- a/packages/core/src/paths/Restapi/Oauth/Authorize/index.ts +++ b/packages/core/src/paths/Restapi/Oauth/Authorize/index.ts @@ -1,4 +1,5 @@ import type AuthorizeRequest from '../../../../definitions/AuthorizeRequest'; +import type AuthorizeParameters from '../../../../definitions/AuthorizeParameters'; import type { RingCentralInterface, ParentInterface, RestRequestConfig } from '../../../../types'; class Index { @@ -13,18 +14,32 @@ class Index { return `${this._parent.path()}/authorize`; } /** - * Performs OAuth 2.0 authorization (GET version) + * Performs Authentication of the End-User by sending the User Agent to the Authorization Server's + * Authorization Endpoint for Authentication and Authorization, + * using request parameters defined by OAuth 2.0 [RFC-6749](https://datatracker.ietf.org/doc/html/rfc6749#section-3.1) + * and additional parameters and parameter values defined by + * [OpenID Connect Core 1.0](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint). + * + * This is the version that uses HTTP `GET` method. + * * HTTP Method: get * Endpoint: /restapi/oauth/authorize * Rate Limit Group: Auth */ - public async get(restRequestConfig?: RestRequestConfig): Promise { - const r = await this.rc.get(this.path(), undefined, restRequestConfig); + public async get(queryParams?: AuthorizeParameters, restRequestConfig?: RestRequestConfig): Promise { + const r = await this.rc.get(this.path(), queryParams, restRequestConfig); return r.data; } /** - * Performs OAuth 2.0 authorization (POST version) + * Performs Authentication of the End-User by sending the User Agent to the Authorization Server's + * Authorization Endpoint for Authentication and Authorization, + * using request parameters defined by OAuth 2.0 [RFC-6749](https://datatracker.ietf.org/doc/html/rfc6749#section-3.1) + * and additional parameters and parameter values defined by + * [OpenID Connect Core 1.0](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint). + * + * This is the version that uses HTTP `POST` method. + * * HTTP Method: post * Endpoint: /restapi/oauth/authorize * Rate Limit Group: Auth diff --git a/packages/core/src/paths/Restapi/Oauth/Introspect/index.ts b/packages/core/src/paths/Restapi/Oauth/Introspect/index.ts deleted file mode 100644 index bb3d4753..00000000 --- a/packages/core/src/paths/Restapi/Oauth/Introspect/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type TokenIntrospectionResponse from '../../../../definitions/TokenIntrospectionResponse'; -import type IntrospectTokenRequest from '../../../../definitions/IntrospectTokenRequest'; -import type { RingCentralInterface, ParentInterface, RestRequestConfig } from '../../../../types'; - -class Index { - public rc: RingCentralInterface; - public _parent: ParentInterface; - - public constructor(_parent: ParentInterface) { - this._parent = _parent; - this.rc = _parent.rc; - } - public path(): string { - return `${this._parent.path()}/introspect`; - } - /** - * Determines state and metadata for a given token (access token, refresh token - * or authorization code) - * - * Depending on client application type - * requests to this endpoint may require authentication with HTTP Basic scheme - * using registered client ID and client secret as login and password, correspondingly. - * - * HTTP Method: post - * Endpoint: /restapi/oauth/introspect - * Rate Limit Group: Auth - * App Permission: Interoperability - */ - public async post( - introspectTokenRequest: IntrospectTokenRequest, - restRequestConfig?: RestRequestConfig, - ): Promise { - const r = await this.rc.post( - this.path(), - introspectTokenRequest, - undefined, - restRequestConfig, - ); - return r.data; - } -} -export default Index; diff --git a/packages/core/src/paths/Restapi/Oauth/Revoke/index.ts b/packages/core/src/paths/Restapi/Oauth/Revoke/index.ts index 5437535a..60b56e6a 100644 --- a/packages/core/src/paths/Restapi/Oauth/Revoke/index.ts +++ b/packages/core/src/paths/Restapi/Oauth/Revoke/index.ts @@ -15,11 +15,13 @@ class Index { } /** * Revokes all active access/refresh tokens and invalidates the OAuth session basing on token provided. - * `token` parameter may be passed in query string or body and may represent access or refresh token. + * The `token` parameter may be passed in query string or body and may represent access or refresh token. * - * Depending on client application type - * requests to this endpoint may require authentication with HTTP Basic scheme - * using registered client ID and client secret as login and password, correspondingly. + * This endpoint is defined by [RFC-7009 "OAuth 2.0 Token Revocation"](https://datatracker.ietf.org/doc/html/rfc7009) + * + * For confidential client application types + * this endpoint requires client authentication using one of the supported + * methods (`client_secret_basic`, `client_secret_jwt` or `private_key_jwt`) * * HTTP Method: post * Endpoint: /restapi/oauth/revoke diff --git a/packages/core/src/paths/Restapi/Oauth/SessionInfo/index.ts b/packages/core/src/paths/Restapi/Oauth/SessionInfo/index.ts deleted file mode 100644 index 1387a1b9..00000000 --- a/packages/core/src/paths/Restapi/Oauth/SessionInfo/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type SessionInfoResponse from '../../../../definitions/SessionInfoResponse'; -import type { RingCentralInterface, ParentInterface, RestRequestConfig } from '../../../../types'; - -class Index { - public rc: RingCentralInterface; - public _parent: ParentInterface; - - public constructor(_parent: ParentInterface) { - this._parent = _parent; - this.rc = _parent.rc; - } - public path(): string { - return `${this._parent.path()}/session-info`; - } - /** - * Returns information about current OAuth session - * - * HTTP Method: get - * Endpoint: /restapi/oauth/session-info - * Rate Limit Group: Auth - */ - public async get(restRequestConfig?: RestRequestConfig): Promise { - const r = await this.rc.get(this.path(), undefined, restRequestConfig); - return r.data; - } -} -export default Index; diff --git a/packages/core/src/paths/Restapi/Oauth/Token/index.ts b/packages/core/src/paths/Restapi/Oauth/Token/index.ts index 7c01fc1e..d163dc7b 100644 --- a/packages/core/src/paths/Restapi/Oauth/Token/index.ts +++ b/packages/core/src/paths/Restapi/Oauth/Token/index.ts @@ -16,9 +16,12 @@ class Index { /** * Returns access (and potentially refresh) tokens for making API requests. * - * Depending on client application type - * requests to this endpoint may require authentication with HTTP Basic scheme - * using registered client ID and client secret as login and password, correspondingly. + * For confidential client application types + * this endpoint requires client authentication using one of the supported + * methods (`client_secret_basic`, `client_secret_jwt` or `private_key_jwt`) + * + * For non-confidential client application types + * the client identifier must be provided via `client_id` request attribute. * * HTTP Method: post * Endpoint: /restapi/oauth/token diff --git a/packages/core/src/paths/Restapi/Oauth/index.ts b/packages/core/src/paths/Restapi/Oauth/index.ts index 927c5fa2..98f2eccd 100644 --- a/packages/core/src/paths/Restapi/Oauth/index.ts +++ b/packages/core/src/paths/Restapi/Oauth/index.ts @@ -1,5 +1,3 @@ -import SessionInfo from './SessionInfo'; -import Introspect from './Introspect'; import Authorize from './Authorize'; import Revoke from './Revoke'; import Token from './Token'; @@ -28,13 +26,5 @@ class Index { public authorize(): Authorize { return new Authorize(this); } - - public introspect(): Introspect { - return new Introspect(this); - } - - public sessionInfo(): SessionInfo { - return new SessionInfo(this); - } } export default Index; diff --git a/packages/core/src/samples.md b/packages/core/src/samples.md index c1c6e444..c0a91f7f 100644 --- a/packages/core/src/samples.md +++ b/packages/core/src/samples.md @@ -364,7 +364,7 @@ await rc.revoke(); ## getToken -Get OAuth Token +OAuth 2.0 Token Endpoint | Name | Value | | ---------------- | ---------------------- | @@ -384,7 +384,7 @@ await rc.revoke(); - `getTokenRequest` is of type [GetTokenRequest](./definitions/GetTokenRequest.ts) - `result` is of type [TokenInfo](./definitions/TokenInfo.ts) -[Try it out](https://developer.ringcentral.com/api-reference#OAuth/OIDC-getToken) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#OAuth-2.0-/-OpenID-Connect-getToken) in API Explorer. ## scimListResourceTypes2 @@ -554,7 +554,7 @@ await rc.revoke(); ## revokeToken -Revoke Token +OAuth 2.0 Token Revocation Endpoint | Name | Value | | ---------------- | ----------------------- | @@ -575,7 +575,7 @@ await rc.revoke(); - `revokeTokenParameters` is of type [RevokeTokenParameters](./definitions/RevokeTokenParameters.ts) - `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#OAuth/OIDC-revokeToken) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#OAuth-2.0-/-OpenID-Connect-revokeToken) in API Explorer. ## readDevice @@ -910,7 +910,7 @@ await rc.revoke(); ## authorize -OAuth 2.0 Authorization +OAuth 2.0 Authorization Endpoint | Name | Value | | ---------------- | -------------------------- | @@ -923,17 +923,18 @@ OAuth 2.0 Authorization ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi().oauth().authorize().get(); +var result = await rc.restapi().oauth().authorize().get(authorizeParameters); await rc.revoke(); ``` +- `authorizeParameters` is of type [AuthorizeParameters](./definitions/AuthorizeParameters.ts) - `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#OAuth/OIDC-authorize) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#OAuth-2.0-/-OpenID-Connect-authorize) in API Explorer. ## authorize2 -OAuth 2.0 Authorization (POST) +OAuth 2.0 Authorization Endpoint (POST) | Name | Value | | ---------------- | -------------------------- | @@ -953,31 +954,7 @@ await rc.revoke(); - `authorizeRequest` is of type [AuthorizeRequest](./definitions/AuthorizeRequest.ts) - `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#OAuth/OIDC-authorize2) in API Explorer. - -## introspectToken - -Token Introspection - -| Name | Value | -| ---------------- | --------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/restapi/oauth/introspect` | -| Rate Limit Group | `Auth` | -| App Permission | `Interoperability` | -| User Permission | `N/A` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.restapi().oauth().introspect().post(introspectTokenRequest); -await rc.revoke(); -``` - -- `introspectTokenRequest` is of type [IntrospectTokenRequest](./definitions/IntrospectTokenRequest.ts) -- `result` is of type [TokenIntrospectionResponse](./definitions/TokenIntrospectionResponse.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#OAuth/OIDC-introspectToken) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#OAuth-2.0-/-OpenID-Connect-authorize2) in API Explorer. ## getAccountInfoV2 @@ -1440,6 +1417,136 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Extensions-readUserTemplate) in API Explorer. +## listUserRoles + +List Company User Roles + +| Name | Value | +| ---------------- | ----------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/user-role` | +| Rate Limit Group | `Medium` | +| App Permission | `ReadAccounts` | +| User Permission | `ReadUserRoles` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.restapi(apiVersion).account(accountId).userRole().list(listUserRolesParameters); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- `listUserRolesParameters` is of type [ListUserRolesParameters](./definitions/ListUserRolesParameters.ts) +- `result` is of type [RolesCollectionResource](./definitions/RolesCollectionResource.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-listUserRoles) in API Explorer. + +## createCustomRole + +Create Custom Role + +| Name | Value | +| ---------------- | ----------------------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/user-role` | +| Rate Limit Group | `Medium` | +| App Permission | `RoleManagement` | +| User Permission | `EditUserRoles` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.restapi(apiVersion).account(accountId).userRole().post(roleResource); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- `roleResource` is of type [RoleResource](./definitions/RoleResource.ts) +- `result` is an empty string + +[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-createCustomRole) in API Explorer. + +## readUserRole + +Get User Role + +| Name | Value | +| ---------------- | -------------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/user-role/{roleId}` | +| Rate Limit Group | `Light` | +| App Permission | `ReadAccounts` | +| User Permission | `ReadUserRoles` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.restapi(apiVersion).account(accountId).userRole(roleId).get(readUserRoleParameters); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- `readUserRoleParameters` is of type [ReadUserRoleParameters](./definitions/ReadUserRoleParameters.ts) +- `result` is of type [RoleResource](./definitions/RoleResource.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-readUserRole) in API Explorer. + +## updateUserRole + +Update User Role + +| Name | Value | +| ---------------- | -------------------------------------------------------------- | +| HTTP Method | `PUT` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/user-role/{roleId}` | +| Rate Limit Group | `Medium` | +| App Permission | `RoleManagement` | +| User Permission | `EditUserRoles` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.restapi(apiVersion).account(accountId).userRole(roleId).put(roleResource); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- `roleResource` is of type [RoleResource](./definitions/RoleResource.ts) +- `result` is of type [RoleResource](./definitions/RoleResource.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-updateUserRole) in API Explorer. + +## deleteCustomRole + +Delete Custom Role + +| Name | Value | +| ---------------- | -------------------------------------------------------------- | +| HTTP Method | `DELETE` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/user-role/{roleId}` | +| Rate Limit Group | `Medium` | +| App Permission | `RoleManagement` | +| User Permission | `EditUserRoles` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.restapi(apiVersion).account(accountId).userRole(roleId).delete(deleteCustomRoleParameters); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- `deleteCustomRoleParameters` is of type [DeleteCustomRoleParameters](./definitions/DeleteCustomRoleParameters.ts) +- `result` is an empty string + +[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-deleteCustomRole) in API Explorer. + ## listStates List States @@ -1938,6 +2045,29 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Teams-patchGlipTeamNew) in API Explorer. +## readGlipPersonNew + +Get Person + +| Name | Value | +| ---------------- | --------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/team-messaging/v1/persons/{personId}` | +| Rate Limit Group | `Light` | +| App Permission | `TeamMessaging` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.teamMessaging().v1().persons(personId).get(); +await rc.revoke(); +``` + +- `result` is of type [TMPersonInfo](./definitions/TMPersonInfo.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Profile-readGlipPersonNew) in API Explorer. + ## caiPunctuate Smart Punctuation @@ -1963,6 +2093,31 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Text-caiPunctuate) in API Explorer. +## caiSummarize + +Conversational Summarization + +| Name | Value | +| ---------------- | ----------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/ai/text/v1/async/summarize` | +| Rate Limit Group | `Heavy` | +| App Permission | `AI` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.ai().text().v1().async().summarize().post(summaryInput, caiSummarizeParameters); +await rc.revoke(); +``` + +- `summaryInput` is of type [SummaryInput](./definitions/SummaryInput.ts) +- `caiSummarizeParameters` is of type [CaiSummarizeParameters](./definitions/CaiSummarizeParameters.ts) +- `result` is of type [CaiAsyncApiResponse](./definitions/CaiAsyncApiResponse.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Text-caiSummarize) in API Explorer. + ## listVideoMeetings List Video Meetings @@ -2058,29 +2213,6 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Bridge-Management-getBridgeByWebPin) in API Explorer. -## getOAuthSessionInfo - -Session info - -| Name | Value | -| ---------------- | ----------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/restapi/oauth/session-info` | -| Rate Limit Group | `Auth` | -| App Permission | `N/A` | -| User Permission | `N/A` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.restapi().oauth().sessionInfo().get(); -await rc.revoke(); -``` - -- `result` is of type [SessionInfoResponse](./definitions/SessionInfoResponse.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#OAuth/OIDC-getOAuthSessionInfo) in API Explorer. - ## removeLineJWSPublic Remove phone line @@ -2131,205 +2263,176 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Call-Log-listCompanyActiveCalls) in API Explorer. -## createFaxMessage +## listCallQueues -Create Fax Message +List Call Queues -| Name | Value | -| ---------------- | ----------------------------------------------------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/fax` | -| Rate Limit Group | `Heavy` | -| App Permission | `Faxes` | -| User Permission | `OutboundFaxes` | +| Name | Value | +| ---------------- | ------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/call-queues` | +| Rate Limit Group | `Medium` | +| App Permission | `ReadAccounts` | +| User Permission | `ReadExtensions` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).extension(extensionId).fax().post(createFaxMessageRequest); +var result = await rc.restapi(apiVersion).account(accountId).callQueues().list(listCallQueuesParameters); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- Parameter `extensionId` is optional with default value `~` -- `createFaxMessageRequest` is of type [CreateFaxMessageRequest](./definitions/CreateFaxMessageRequest.ts) -- `result` is of type [FaxResponse](./definitions/FaxResponse.ts) +- `listCallQueuesParameters` is of type [ListCallQueuesParameters](./definitions/ListCallQueuesParameters.ts) +- `result` is of type [CallQueues](./definitions/CallQueues.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Fax-createFaxMessage) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Call-Queues-listCallQueues) in API Explorer. -## createMMS +## readCallQueueInfo -Send MMS +Get Call Queue -| Name | Value | -| ---------------- | ----------------------------------------------------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/mms` | -| Rate Limit Group | `Medium` | -| App Permission | `SMS` | -| User Permission | `OutboundSMS` | +| Name | Value | +| ---------------- | ----------------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/call-queues/{groupId}` | +| Rate Limit Group | `Light` | +| App Permission | `ReadAccounts` | +| User Permission | `ReadExtensions` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).extension(extensionId).mms().post(createMMSMessage); +var result = await rc.restapi(apiVersion).account(accountId).callQueues(groupId).get(); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- Parameter `extensionId` is optional with default value `~` -- `createMMSMessage` is of type [CreateMMSMessage](./definitions/CreateMMSMessage.ts) -- `result` is of type [GetSMSMessageInfoResponse](./definitions/GetSMSMessageInfoResponse.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#SMS-createMMS) in API Explorer. - -## createSMSMessage - -Send SMS - -| Name | Value | -| ---------------- | ----------------------------------------------------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/sms` | -| Rate Limit Group | `Medium` | -| App Permission | `SMS` | -| User Permission | `OutboundSMS` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).extension(extensionId).sms().post(createSMSMessage); -await rc.revoke(); -``` - -- Parameter `apiVersion` is optional with default value `v1.0` -- Parameter `accountId` is optional with default value `~` -- Parameter `extensionId` is optional with default value `~` -- `createSMSMessage` is of type [CreateSMSMessage](./definitions/CreateSMSMessage.ts) -- `result` is of type [GetSMSMessageInfoResponse](./definitions/GetSMSMessageInfoResponse.ts) +- `result` is of type [CallQueueDetails](./definitions/CallQueueDetails.ts) -[Try it out](https://developer.ringcentral.com/api-reference#SMS-createSMSMessage) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Call-Queues-readCallQueueInfo) in API Explorer. -## listIvrPrompts +## updateCallQueueInfo -List IVR Prompts +Update Call Queue -| Name | Value | -| ---------------- | ------------------------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/ivr-prompts` | -| Rate Limit Group | `Medium` | -| App Permission | `ReadAccounts` | -| User Permission | `ReadCompanyGreetings` | +| Name | Value | +| ---------------- | ----------------------------------------------------------------- | +| HTTP Method | `PUT` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/call-queues/{groupId}` | +| Rate Limit Group | `Light` | +| App Permission | `EditExtensions` | +| User Permission | `EditUserInfo` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).ivrPrompts().list(); +var result = await rc.restapi(apiVersion).account(accountId).callQueues(groupId).put(callQueueDetails); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `result` is of type [IvrPrompts](./definitions/IvrPrompts.ts) +- `callQueueDetails` is of type [CallQueueDetails](./definitions/CallQueueDetails.ts) +- `result` is of type [CallQueueDetails](./definitions/CallQueueDetails.ts) -[Try it out](https://developer.ringcentral.com/api-reference#IVR-listIvrPrompts) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Call-Queues-updateCallQueueInfo) in API Explorer. -## createIVRPrompt +## listCustomFields -Create IVR Prompts +Get Custom Field List -| Name | Value | -| ---------------- | ------------------------------------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/ivr-prompts` | -| Rate Limit Group | `Heavy` | -| App Permission | `EditAccounts` | -| User Permission | `EditCompanyGreetings` | +| Name | Value | +| ---------------- | --------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/custom-fields` | +| Rate Limit Group | `Light` | +| App Permission | `ReadAccounts` | +| User Permission | `ReadUserInfo` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).ivrPrompts().post(createIVRPromptRequest); +var result = await rc.restapi(apiVersion).account(accountId).customFields().get(); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `createIVRPromptRequest` is of type [CreateIVRPromptRequest](./definitions/CreateIVRPromptRequest.ts) -- `result` is of type [PromptInfo](./definitions/PromptInfo.ts) +- `result` is of type [CustomFieldList](./definitions/CustomFieldList.ts) -[Try it out](https://developer.ringcentral.com/api-reference#IVR-createIVRPrompt) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Custom-Fields-listCustomFields) in API Explorer. -## readIVRPrompt +## createCustomField -Get IVR Prompt +Create Custom Field -| Name | Value | -| ---------------- | ------------------------------------------------------------------ | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/ivr-prompts/{promptId}` | -| Rate Limit Group | `Medium` | -| App Permission | `ReadAccounts` | -| User Permission | `ReadCompanyGreetings` | +| Name | Value | +| ---------------- | --------------------------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/custom-fields` | +| Rate Limit Group | `Medium` | +| App Permission | `EditAccounts` | +| User Permission | `Users` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).ivrPrompts(promptId).get(); +var result = await rc.restapi(apiVersion).account(accountId).customFields().post(customFieldCreateRequest); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `result` is of type [PromptInfo](./definitions/PromptInfo.ts) +- `customFieldCreateRequest` is of type [CustomFieldCreateRequest](./definitions/CustomFieldCreateRequest.ts) +- `result` is of type [CustomFieldModel](./definitions/CustomFieldModel.ts) -[Try it out](https://developer.ringcentral.com/api-reference#IVR-readIVRPrompt) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Custom-Fields-createCustomField) in API Explorer. -## updateIVRPrompt +## updateCustomField -Update IVR Prompt +Update Custom Field -| Name | Value | -| ---------------- | ------------------------------------------------------------------ | -| HTTP Method | `PUT` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/ivr-prompts/{promptId}` | -| Rate Limit Group | `Medium` | -| App Permission | `EditAccounts` | -| User Permission | `EditCompanyGreetings` | +| Name | Value | +| ---------------- | ------------------------------------------------------------------- | +| HTTP Method | `PUT` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/custom-fields/{fieldId}` | +| Rate Limit Group | `Medium` | +| App Permission | `EditAccounts` | +| User Permission | `Users` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).ivrPrompts(promptId).put(updateIVRPromptRequest); +var result = await rc.restapi(apiVersion).account(accountId).customFields(fieldId).put(customFieldUpdateRequest); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `updateIVRPromptRequest` is of type [UpdateIVRPromptRequest](./definitions/UpdateIVRPromptRequest.ts) -- `result` is of type [PromptInfo](./definitions/PromptInfo.ts) +- `customFieldUpdateRequest` is of type [CustomFieldUpdateRequest](./definitions/CustomFieldUpdateRequest.ts) +- `result` is of type [CustomFieldModel](./definitions/CustomFieldModel.ts) -[Try it out](https://developer.ringcentral.com/api-reference#IVR-updateIVRPrompt) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Custom-Fields-updateCustomField) in API Explorer. -## deleteIVRPrompt +## deleteCustomField -Delete IVR Prompt +Delete Custom Field -| Name | Value | -| ---------------- | ------------------------------------------------------------------ | -| HTTP Method | `DELETE` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/ivr-prompts/{promptId}` | -| Rate Limit Group | `Heavy` | -| App Permission | `EditAccounts` | -| User Permission | `EditCompanyGreetings` | +| Name | Value | +| ---------------- | ------------------------------------------------------------------- | +| HTTP Method | `DELETE` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/custom-fields/{fieldId}` | +| Rate Limit Group | `Medium` | +| App Permission | `EditAccounts` | +| User Permission | `Users` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).ivrPrompts(promptId).delete(); +var result = await rc.restapi(apiVersion).account(accountId).customFields(fieldId).delete(); await rc.revoke(); ``` @@ -2337,338 +2440,316 @@ await rc.revoke(); - Parameter `accountId` is optional with default value `~` - `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#IVR-deleteIVRPrompt) in API Explorer. - -## listAccountPhoneNumbers - -List Company Phone Numbers - -| Name | Value | -| ---------------- | -------------------------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/phone-number` | -| Rate Limit Group | `Heavy` | -| App Permission | `ReadAccounts` | -| User Permission | `ReadCompanyPhoneNumbers` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).phoneNumber().list(listAccountPhoneNumbersParameters); -await rc.revoke(); -``` - -- Parameter `apiVersion` is optional with default value `v1.0` -- Parameter `accountId` is optional with default value `~` -- `listAccountPhoneNumbersParameters` is of type [ListAccountPhoneNumbersParameters](./definitions/ListAccountPhoneNumbersParameters.ts) -- `result` is of type [AccountPhoneNumbers](./definitions/AccountPhoneNumbers.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#Phone-Numbers-listAccountPhoneNumbers) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Custom-Fields-deleteCustomField) in API Explorer. -## readAccountPhoneNumber +## createFaxMessage -Get Phone Number +Create Fax Message -| Name | Value | -| ---------------- | ------------------------------------------------------------------------ | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/phone-number/{phoneNumberId}` | -| Rate Limit Group | `Light` | -| App Permission | `ReadAccounts` | -| User Permission | `ReadCompanyPhoneNumbers` | +| Name | Value | +| ---------------- | ----------------------------------------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/fax` | +| Rate Limit Group | `Heavy` | +| App Permission | `Faxes` | +| User Permission | `OutboundFaxes` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).phoneNumber(phoneNumberId).get(); +var result = await rc.restapi(apiVersion).account(accountId).extension(extensionId).fax().post(createFaxMessageRequest); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `result` is of type [CompanyPhoneNumberInfo](./definitions/CompanyPhoneNumberInfo.ts) +- Parameter `extensionId` is optional with default value `~` +- `createFaxMessageRequest` is of type [CreateFaxMessageRequest](./definitions/CreateFaxMessageRequest.ts) +- `result` is of type [FaxResponse](./definitions/FaxResponse.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Phone-Numbers-readAccountPhoneNumber) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Fax-createFaxMessage) in API Explorer. -## readAccountServiceInfo +## createMMS -Get Account Service Info +Send MMS -| Name | Value | -| ---------------- | -------------------------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/service-info` | -| Rate Limit Group | `Light` | -| App Permission | `ReadAccounts` | -| User Permission | `ReadServicePlanInfo` | +| Name | Value | +| ---------------- | ----------------------------------------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/mms` | +| Rate Limit Group | `Medium` | +| App Permission | `SMS` | +| User Permission | `OutboundSMS` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).serviceInfo().get(); +var result = await rc.restapi(apiVersion).account(accountId).extension(extensionId).mms().post(createMMSMessage); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `result` is of type [AccountServiceInfo](./definitions/AccountServiceInfo.ts) +- Parameter `extensionId` is optional with default value `~` +- `createMMSMessage` is of type [CreateMMSMessage](./definitions/CreateMMSMessage.ts) +- `result` is of type [GetSMSMessageInfoResponse](./definitions/GetSMSMessageInfoResponse.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Company-readAccountServiceInfo) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#SMS-createMMS) in API Explorer. -## listUserRoles +## createSMSMessage -List Company User Roles +Send SMS -| Name | Value | -| ---------------- | ----------------------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/user-role` | -| Rate Limit Group | `Medium` | -| App Permission | `ReadAccounts` | -| User Permission | `ReadUserRoles` | +| Name | Value | +| ---------------- | ----------------------------------------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/sms` | +| Rate Limit Group | `Medium` | +| App Permission | `SMS` | +| User Permission | `OutboundSMS` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).userRole().list(listUserRolesParameters); +var result = await rc.restapi(apiVersion).account(accountId).extension(extensionId).sms().post(createSMSMessage); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `listUserRolesParameters` is of type [ListUserRolesParameters](./definitions/ListUserRolesParameters.ts) -- `result` is of type [RolesCollectionResource](./definitions/RolesCollectionResource.ts) +- Parameter `extensionId` is optional with default value `~` +- `createSMSMessage` is of type [CreateSMSMessage](./definitions/CreateSMSMessage.ts) +- `result` is of type [GetSMSMessageInfoResponse](./definitions/GetSMSMessageInfoResponse.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-listUserRoles) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#SMS-createSMSMessage) in API Explorer. -## createCustomRole +## listIvrPrompts -Create Custom Role +List IVR Prompts -| Name | Value | -| ---------------- | ----------------------------------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/user-role` | -| Rate Limit Group | `Medium` | -| App Permission | `RoleManagement` | -| User Permission | `EditUserRoles` | +| Name | Value | +| ---------------- | ------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/ivr-prompts` | +| Rate Limit Group | `Medium` | +| App Permission | `ReadAccounts` | +| User Permission | `ReadCompanyGreetings` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).userRole().post(roleResource); +var result = await rc.restapi(apiVersion).account(accountId).ivrPrompts().list(); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `roleResource` is of type [RoleResource](./definitions/RoleResource.ts) -- `result` is an empty string +- `result` is of type [IvrPrompts](./definitions/IvrPrompts.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-createCustomRole) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#IVR-listIvrPrompts) in API Explorer. -## readUserRole +## createIVRPrompt -Get User Role +Create IVR Prompts -| Name | Value | -| ---------------- | -------------------------------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/user-role/{roleId}` | -| Rate Limit Group | `Light` | -| App Permission | `ReadAccounts` | -| User Permission | `ReadUserRoles` | +| Name | Value | +| ---------------- | ------------------------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/ivr-prompts` | +| Rate Limit Group | `Heavy` | +| App Permission | `EditAccounts` | +| User Permission | `EditCompanyGreetings` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).userRole(roleId).get(readUserRoleParameters); +var result = await rc.restapi(apiVersion).account(accountId).ivrPrompts().post(createIVRPromptRequest); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `readUserRoleParameters` is of type [ReadUserRoleParameters](./definitions/ReadUserRoleParameters.ts) -- `result` is of type [RoleResource](./definitions/RoleResource.ts) +- `createIVRPromptRequest` is of type [CreateIVRPromptRequest](./definitions/CreateIVRPromptRequest.ts) +- `result` is of type [PromptInfo](./definitions/PromptInfo.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-readUserRole) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#IVR-createIVRPrompt) in API Explorer. -## updateUserRole +## readIVRPrompt -Update User Role +Get IVR Prompt -| Name | Value | -| ---------------- | -------------------------------------------------------------- | -| HTTP Method | `PUT` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/user-role/{roleId}` | -| Rate Limit Group | `Medium` | -| App Permission | `RoleManagement` | -| User Permission | `EditUserRoles` | +| Name | Value | +| ---------------- | ------------------------------------------------------------------ | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/ivr-prompts/{promptId}` | +| Rate Limit Group | `Medium` | +| App Permission | `ReadAccounts` | +| User Permission | `ReadCompanyGreetings` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).userRole(roleId).put(roleResource); +var result = await rc.restapi(apiVersion).account(accountId).ivrPrompts(promptId).get(); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `roleResource` is of type [RoleResource](./definitions/RoleResource.ts) -- `result` is of type [RoleResource](./definitions/RoleResource.ts) +- `result` is of type [PromptInfo](./definitions/PromptInfo.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-updateUserRole) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#IVR-readIVRPrompt) in API Explorer. -## deleteCustomRole +## updateIVRPrompt -Delete Custom Role +Update IVR Prompt -| Name | Value | -| ---------------- | -------------------------------------------------------------- | -| HTTP Method | `DELETE` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/user-role/{roleId}` | -| Rate Limit Group | `Medium` | -| App Permission | `RoleManagement` | -| User Permission | `EditUserRoles` | +| Name | Value | +| ---------------- | ------------------------------------------------------------------ | +| HTTP Method | `PUT` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/ivr-prompts/{promptId}` | +| Rate Limit Group | `Medium` | +| App Permission | `EditAccounts` | +| User Permission | `EditCompanyGreetings` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).userRole(roleId).delete(deleteCustomRoleParameters); +var result = await rc.restapi(apiVersion).account(accountId).ivrPrompts(promptId).put(updateIVRPromptRequest); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `deleteCustomRoleParameters` is of type [DeleteCustomRoleParameters](./definitions/DeleteCustomRoleParameters.ts) -- `result` is an empty string +- `updateIVRPromptRequest` is of type [UpdateIVRPromptRequest](./definitions/UpdateIVRPromptRequest.ts) +- `result` is of type [PromptInfo](./definitions/PromptInfo.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-deleteCustomRole) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#IVR-updateIVRPrompt) in API Explorer. -## readGlipPersonNew +## deleteIVRPrompt -Get Person +Delete IVR Prompt -| Name | Value | -| ---------------- | --------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/team-messaging/v1/persons/{personId}` | -| Rate Limit Group | `Light` | -| App Permission | `TeamMessaging` | -| User Permission | `N/A` | +| Name | Value | +| ---------------- | ------------------------------------------------------------------ | +| HTTP Method | `DELETE` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/ivr-prompts/{promptId}` | +| Rate Limit Group | `Heavy` | +| App Permission | `EditAccounts` | +| User Permission | `EditCompanyGreetings` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.teamMessaging().v1().persons(personId).get(); +var result = await rc.restapi(apiVersion).account(accountId).ivrPrompts(promptId).delete(); await rc.revoke(); ``` -- `result` is of type [TMPersonInfo](./definitions/TMPersonInfo.ts) +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#Profile-readGlipPersonNew) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#IVR-deleteIVRPrompt) in API Explorer. -## caiSummarize +## listAccountPhoneNumbers -Conversational Summarization +List Company Phone Numbers -| Name | Value | -| ---------------- | ----------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/ai/text/v1/async/summarize` | -| Rate Limit Group | `Heavy` | -| App Permission | `AI` | -| User Permission | `N/A` | +| Name | Value | +| ---------------- | -------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/phone-number` | +| Rate Limit Group | `Heavy` | +| App Permission | `ReadAccounts` | +| User Permission | `ReadCompanyPhoneNumbers` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.ai().text().v1().async().summarize().post(summaryInput, caiSummarizeParameters); +var result = await rc.restapi(apiVersion).account(accountId).phoneNumber().list(listAccountPhoneNumbersParameters); await rc.revoke(); ``` -- `summaryInput` is of type [SummaryInput](./definitions/SummaryInput.ts) -- `caiSummarizeParameters` is of type [CaiSummarizeParameters](./definitions/CaiSummarizeParameters.ts) -- `result` is of type [CaiAsyncApiResponse](./definitions/CaiAsyncApiResponse.ts) +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- `listAccountPhoneNumbersParameters` is of type [ListAccountPhoneNumbersParameters](./definitions/ListAccountPhoneNumbersParameters.ts) +- `result` is of type [AccountPhoneNumbers](./definitions/AccountPhoneNumbers.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Text-caiSummarize) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Phone-Numbers-listAccountPhoneNumbers) in API Explorer. -## listCallQueues +## readAccountPhoneNumber -List Call Queues +Get Phone Number -| Name | Value | -| ---------------- | ------------------------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/call-queues` | -| Rate Limit Group | `Medium` | -| App Permission | `ReadAccounts` | -| User Permission | `ReadExtensions` | +| Name | Value | +| ---------------- | ------------------------------------------------------------------------ | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/phone-number/{phoneNumberId}` | +| Rate Limit Group | `Light` | +| App Permission | `ReadAccounts` | +| User Permission | `ReadCompanyPhoneNumbers` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).callQueues().list(listCallQueuesParameters); +var result = await rc.restapi(apiVersion).account(accountId).phoneNumber(phoneNumberId).get(); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `listCallQueuesParameters` is of type [ListCallQueuesParameters](./definitions/ListCallQueuesParameters.ts) -- `result` is of type [CallQueues](./definitions/CallQueues.ts) +- `result` is of type [CompanyPhoneNumberInfo](./definitions/CompanyPhoneNumberInfo.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Call-Queues-listCallQueues) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Phone-Numbers-readAccountPhoneNumber) in API Explorer. -## readCallQueueInfo +## readAccountServiceInfo -Get Call Queue +Get Account Service Info -| Name | Value | -| ---------------- | ----------------------------------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/call-queues/{groupId}` | -| Rate Limit Group | `Light` | -| App Permission | `ReadAccounts` | -| User Permission | `ReadExtensions` | +| Name | Value | +| ---------------- | -------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/service-info` | +| Rate Limit Group | `Light` | +| App Permission | `ReadAccounts` | +| User Permission | `ReadCompanyInfo` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).callQueues(groupId).get(); +var result = await rc.restapi(apiVersion).account(accountId).serviceInfo().get(); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `result` is of type [CallQueueDetails](./definitions/CallQueueDetails.ts) +- `result` is of type [AccountServiceInfo](./definitions/AccountServiceInfo.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Call-Queues-readCallQueueInfo) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Company-readAccountServiceInfo) in API Explorer. -## updateCallQueueInfo +## listSiteMembers -Update Call Queue +List Site Members -| Name | Value | -| ---------------- | ----------------------------------------------------------------- | -| HTTP Method | `PUT` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/call-queues/{groupId}` | -| Rate Limit Group | `Light` | -| App Permission | `EditExtensions` | -| User Permission | `EditUserInfo` | +| Name | Value | +| ---------------- | ------------------------------------------------------------------ | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/sites/{siteId}/members` | +| Rate Limit Group | `Medium` | +| App Permission | `ReadAccounts` | +| User Permission | `ReadExtensions` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).callQueues(groupId).put(callQueueDetails); +var result = await rc.restapi(apiVersion).account(accountId).sites(siteId).members().get(); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `callQueueDetails` is of type [CallQueueDetails](./definitions/CallQueueDetails.ts) -- `result` is of type [CallQueueDetails](./definitions/CallQueueDetails.ts) +- `result` is of type [SiteMembersList](./definitions/SiteMembersList.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Call-Queues-updateCallQueueInfo) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Multi-Site-listSiteMembers) in API Explorer. ## listCountries @@ -2890,6 +2971,55 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Regional-Settings-readTimezone) in API Explorer. +## listStandardUserRole + +List Standard User Roles + +| Name | Value | +| ---------------- | -------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/dictionary/user-role` | +| Rate Limit Group | `Light` | +| App Permission | `N/A` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.restapi(apiVersion).dictionary().userRole().list(listStandardUserRoleParameters); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- `listStandardUserRoleParameters` is of type [ListStandardUserRoleParameters](./definitions/ListStandardUserRoleParameters.ts) +- `result` is of type [RolesCollectionResource](./definitions/RolesCollectionResource.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-listStandardUserRole) in API Explorer. + +## readStandardUserRole + +Get Standard User Role + +| Name | Value | +| ---------------- | ----------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/dictionary/user-role/{roleId}` | +| Rate Limit Group | `Light` | +| App Permission | `N/A` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.restapi(apiVersion).dictionary().userRole(roleId).get(); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- `result` is of type [RoleResource](./definitions/RoleResource.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-readStandardUserRole) in API Explorer. + ## parsePhoneNumber Parse Phone Number(s) @@ -3038,170 +3168,144 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Teams-patchGlipEveryoneNew) in API Explorer. -## listGlipWebhooksNew - -List Webhooks - -| Name | Value | -| ---------------- | ----------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/team-messaging/v1/webhooks` | -| Rate Limit Group | `Medium` | -| App Permission | `TeamMessaging` | -| User Permission | `N/A` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.teamMessaging().v1().webhooks().list(); -await rc.revoke(); -``` - -- `result` is of type [TMWebhookList](./definitions/TMWebhookList.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#Incoming-Webhooks-listGlipWebhooksNew) in API Explorer. - -## readGlipWebhookNew +## listFavoriteChatsNew -Get Webhook +List Favorite Chats -| Name | Value | -| ---------------- | ----------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/team-messaging/v1/webhooks/{webhookId}` | -| Rate Limit Group | `Medium` | -| App Permission | `TeamMessaging` | -| User Permission | `N/A` | +| Name | Value | +| ---------------- | ------------------------------ | +| HTTP Method | `GET` | +| Endpoint | `/team-messaging/v1/favorites` | +| Rate Limit Group | `Light` | +| App Permission | `TeamMessaging` | +| User Permission | `N/A` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.teamMessaging().v1().webhooks(webhookId).get(); +var result = await rc.teamMessaging().v1().favorites().get(listFavoriteChatsNewParameters); await rc.revoke(); ``` -- `result` is of type [TMWebhookList](./definitions/TMWebhookList.ts) +- `listFavoriteChatsNewParameters` is of type [ListFavoriteChatsNewParameters](./definitions/ListFavoriteChatsNewParameters.ts) +- `result` is of type [TMChatListWithoutNavigation](./definitions/TMChatListWithoutNavigation.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Incoming-Webhooks-readGlipWebhookNew) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Chats-listFavoriteChatsNew) in API Explorer. -## deleteGlipWebhookNew +## lockNoteNew -Delete Webhook +Lock Note -| Name | Value | -| ---------------- | ----------------------------------------- | -| HTTP Method | `DELETE` | -| Endpoint | `/team-messaging/v1/webhooks/{webhookId}` | -| Rate Limit Group | `Medium` | -| App Permission | `TeamMessaging` | -| User Permission | `N/A` | +| Name | Value | +| ---------------- | ---------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/team-messaging/v1/notes/{noteId}/lock` | +| Rate Limit Group | `Light` | +| App Permission | `TeamMessaging` | +| User Permission | `N/A` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.teamMessaging().v1().webhooks(webhookId).delete(); +var result = await rc.teamMessaging().v1().notes(noteId).lock().post(); await rc.revoke(); ``` - `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#Incoming-Webhooks-deleteGlipWebhookNew) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Notes-lockNoteNew) in API Explorer. -## listStandardUserRole +## joinGlipTeamNew -List Standard User Roles +Join Team -| Name | Value | -| ---------------- | -------------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/dictionary/user-role` | -| Rate Limit Group | `Light` | -| App Permission | `N/A` | -| User Permission | `N/A` | +| Name | Value | +| ---------------- | ---------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/team-messaging/v1/teams/{chatId}/join` | +| Rate Limit Group | `Medium` | +| App Permission | `TeamMessaging` | +| User Permission | `N/A` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).dictionary().userRole().list(listStandardUserRoleParameters); +var result = await rc.teamMessaging().v1().teams(chatId).join().post(); await rc.revoke(); ``` -- Parameter `apiVersion` is optional with default value `v1.0` -- `listStandardUserRoleParameters` is of type [ListStandardUserRoleParameters](./definitions/ListStandardUserRoleParameters.ts) -- `result` is of type [RolesCollectionResource](./definitions/RolesCollectionResource.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-listStandardUserRole) in API Explorer. +- `result` is an empty string -## readStandardUserRole +[Try it out](https://developer.ringcentral.com/api-reference#Teams-joinGlipTeamNew) in API Explorer. -Get Standard User Role +## listGlipWebhooksNew -| Name | Value | -| ---------------- | ----------------------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/dictionary/user-role/{roleId}` | -| Rate Limit Group | `Light` | -| App Permission | `N/A` | -| User Permission | `N/A` | +List Webhooks + +| Name | Value | +| ---------------- | ----------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/team-messaging/v1/webhooks` | +| Rate Limit Group | `Medium` | +| App Permission | `TeamMessaging` | +| User Permission | `N/A` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).dictionary().userRole(roleId).get(); +var result = await rc.teamMessaging().v1().webhooks().list(); await rc.revoke(); ``` -- Parameter `apiVersion` is optional with default value `v1.0` -- `result` is of type [RoleResource](./definitions/RoleResource.ts) +- `result` is of type [TMWebhookList](./definitions/TMWebhookList.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Role-Management-readStandardUserRole) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Incoming-Webhooks-listGlipWebhooksNew) in API Explorer. -## listFavoriteChatsNew +## readGlipWebhookNew -List Favorite Chats +Get Webhook -| Name | Value | -| ---------------- | ------------------------------ | -| HTTP Method | `GET` | -| Endpoint | `/team-messaging/v1/favorites` | -| Rate Limit Group | `Light` | -| App Permission | `TeamMessaging` | -| User Permission | `N/A` | +| Name | Value | +| ---------------- | ----------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/team-messaging/v1/webhooks/{webhookId}` | +| Rate Limit Group | `Medium` | +| App Permission | `TeamMessaging` | +| User Permission | `N/A` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.teamMessaging().v1().favorites().get(listFavoriteChatsNewParameters); +var result = await rc.teamMessaging().v1().webhooks(webhookId).get(); await rc.revoke(); ``` -- `listFavoriteChatsNewParameters` is of type [ListFavoriteChatsNewParameters](./definitions/ListFavoriteChatsNewParameters.ts) -- `result` is of type [TMChatListWithoutNavigation](./definitions/TMChatListWithoutNavigation.ts) +- `result` is of type [TMWebhookList](./definitions/TMWebhookList.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Chats-listFavoriteChatsNew) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Incoming-Webhooks-readGlipWebhookNew) in API Explorer. -## lockNoteNew +## deleteGlipWebhookNew -Lock Note +Delete Webhook -| Name | Value | -| ---------------- | ---------------------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/team-messaging/v1/notes/{noteId}/lock` | -| Rate Limit Group | `Light` | -| App Permission | `TeamMessaging` | -| User Permission | `N/A` | +| Name | Value | +| ---------------- | ----------------------------------------- | +| HTTP Method | `DELETE` | +| Endpoint | `/team-messaging/v1/webhooks/{webhookId}` | +| Rate Limit Group | `Medium` | +| App Permission | `TeamMessaging` | +| User Permission | `N/A` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.teamMessaging().v1().notes(noteId).lock().post(); +var result = await rc.teamMessaging().v1().webhooks(webhookId).delete(); await rc.revoke(); ``` - `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#Notes-lockNoteNew) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Incoming-Webhooks-deleteGlipWebhookNew) in API Explorer. ## addGlipTeamMembersNew @@ -3227,29 +3331,6 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Teams-addGlipTeamMembersNew) in API Explorer. -## joinGlipTeamNew - -Join Team - -| Name | Value | -| ---------------- | ---------------------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/team-messaging/v1/teams/{chatId}/join` | -| Rate Limit Group | `Medium` | -| App Permission | `TeamMessaging` | -| User Permission | `N/A` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.teamMessaging().v1().teams(chatId).join().post(); -await rc.revoke(); -``` - -- `result` is an empty string - -[Try it out](https://developer.ringcentral.com/api-reference#Teams-joinGlipTeamNew) in API Explorer. - ## rcwHistoryListAllSessions List Historical Webinar Sessions across Multiple Webinars @@ -3474,9 +3555,9 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Contents-socMsgGetContent) in API Explorer. -## socMsgListIdentities +## listSocialMessagingIdentities -List All Identities +List Identities | Name | Value | | ---------------- | ------------------------------------ | @@ -3489,16 +3570,16 @@ List All Identities ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.cx().socialMessaging().v1().identities().list(socMsgListIdentitiesParameters); +var result = await rc.cx().socialMessaging().v1().identities().list(listSocialMessagingIdentitiesParameters); await rc.revoke(); ``` -- `socMsgListIdentitiesParameters` is of type [SocMsgListIdentitiesParameters](./definitions/SocMsgListIdentitiesParameters.ts) +- `listSocialMessagingIdentitiesParameters` is of type [ListSocialMessagingIdentitiesParameters](./definitions/ListSocialMessagingIdentitiesParameters.ts) - `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#Identities-socMsgListIdentities) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Identities-listSocialMessagingIdentities) in API Explorer. -## socMsgGetIdentity +## readSocialMessagingIdentity Get Identity @@ -3519,7 +3600,7 @@ await rc.revoke(); - `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#Identities-socMsgGetIdentity) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Identities-readSocialMessagingIdentity) in API Explorer. ## getExtensionRecordings @@ -3825,6 +3906,29 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Phone-Numbers-replacePhoneNumberV2) in API Explorer. +## sendActivationEmailV2 + +Send/Resend Activation Email + +| Name | Value | +| ---------------- | -------------------------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/restapi/v2/accounts/{accountId}/send-activation-email` | +| Rate Limit Group | `Medium` | +| App Permission | `EditAccounts` | +| User Permission | `AccountAdministration` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.restapi().v2().accounts(accountId).sendActivationEmail().post(); +await rc.revoke(); +``` + +- `result` is an empty string + +[Try it out](https://developer.ringcentral.com/api-reference#Company-sendActivationEmailV2) in API Explorer. + ## sendWelcomeEmailV2 Send/Resend Welcome Email @@ -4703,108 +4807,6 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Call-Recordings-deleteCompanyCallRecordings) in API Explorer. -## listCustomFields - -Get Custom Field List - -| Name | Value | -| ---------------- | --------------------------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/custom-fields` | -| Rate Limit Group | `Light` | -| App Permission | `ReadAccounts` | -| User Permission | `ReadUserInfo` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).customFields().get(); -await rc.revoke(); -``` - -- Parameter `apiVersion` is optional with default value `v1.0` -- Parameter `accountId` is optional with default value `~` -- `result` is of type [CustomFieldList](./definitions/CustomFieldList.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#Custom-Fields-listCustomFields) in API Explorer. - -## createCustomField - -Create Custom Field - -| Name | Value | -| ---------------- | --------------------------------------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/custom-fields` | -| Rate Limit Group | `Medium` | -| App Permission | `EditAccounts` | -| User Permission | `Users` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).customFields().post(customFieldCreateRequest); -await rc.revoke(); -``` - -- Parameter `apiVersion` is optional with default value `v1.0` -- Parameter `accountId` is optional with default value `~` -- `customFieldCreateRequest` is of type [CustomFieldCreateRequest](./definitions/CustomFieldCreateRequest.ts) -- `result` is of type [CustomFieldModel](./definitions/CustomFieldModel.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#Custom-Fields-createCustomField) in API Explorer. - -## updateCustomField - -Update Custom Field - -| Name | Value | -| ---------------- | ------------------------------------------------------------------- | -| HTTP Method | `PUT` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/custom-fields/{fieldId}` | -| Rate Limit Group | `Medium` | -| App Permission | `EditAccounts` | -| User Permission | `Users` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).customFields(fieldId).put(customFieldUpdateRequest); -await rc.revoke(); -``` - -- Parameter `apiVersion` is optional with default value `v1.0` -- Parameter `accountId` is optional with default value `~` -- `customFieldUpdateRequest` is of type [CustomFieldUpdateRequest](./definitions/CustomFieldUpdateRequest.ts) -- `result` is of type [CustomFieldModel](./definitions/CustomFieldModel.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#Custom-Fields-updateCustomField) in API Explorer. - -## deleteCustomField - -Delete Custom Field - -| Name | Value | -| ---------------- | ------------------------------------------------------------------- | -| HTTP Method | `DELETE` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/custom-fields/{fieldId}` | -| Rate Limit Group | `Medium` | -| App Permission | `EditAccounts` | -| User Permission | `Users` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).customFields(fieldId).delete(); -await rc.revoke(); -``` - -- Parameter `apiVersion` is optional with default value `v1.0` -- Parameter `accountId` is optional with default value `~` -- `result` is an empty string - -[Try it out](https://developer.ringcentral.com/api-reference#Custom-Fields-deleteCustomField) in API Explorer. - ## updateDeviceEmergency Update Device Emergency Info @@ -6787,51 +6789,26 @@ Please refer to [Binary content downloading](/README.md#Binary-content-downloadi Edit Sites | Name | Value | -| ---------------- | ---------------------------------------------------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/sites/{siteId}/bulk-assign` | -| Rate Limit Group | `Medium` | -| App Permission | `EditExtensions` | -| User Permission | `Sites` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).sites(siteId).bulkAssign().post(siteMembersBulkUpdate); -await rc.revoke(); -``` - -- Parameter `apiVersion` is optional with default value `v1.0` -- Parameter `accountId` is optional with default value `~` -- `siteMembersBulkUpdate` is of type [SiteMembersBulkUpdate](./definitions/SiteMembersBulkUpdate.ts) -- `result` is an empty string - -[Try it out](https://developer.ringcentral.com/api-reference#Multi-Site-assignMultipleSites) in API Explorer. - -## listSiteMembers - -List Site Members - -| Name | Value | -| ---------------- | ------------------------------------------------------------------ | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/sites/{siteId}/members` | -| Rate Limit Group | `Medium` | -| App Permission | `ReadAccounts` | -| User Permission | `ReadExtensions` | +| ---------------- | ---------------------------------------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/sites/{siteId}/bulk-assign` | +| Rate Limit Group | `Medium` | +| App Permission | `EditExtensions` | +| User Permission | `Sites` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).sites(siteId).members().get(); +var result = await rc.restapi(apiVersion).account(accountId).sites(siteId).bulkAssign().post(siteMembersBulkUpdate); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- `result` is of type [SiteMembersList](./definitions/SiteMembersList.ts) +- `siteMembersBulkUpdate` is of type [SiteMembersBulkUpdate](./definitions/SiteMembersBulkUpdate.ts) +- `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#Multi-Site-listSiteMembers) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Multi-Site-assignMultipleSites) in API Explorer. ## createCallOutCallSession @@ -8056,29 +8033,52 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Webinars-and-Sessions-rcwConfigUpdateWebinar) in API Explorer. -## rcwHistoryListAllCompanySessions +## rcwHistoryAdminListRecordings -List Historical Webinar Sessions across Multiple Webinars / Hosts +List Webinar Recordings (Admin) -| Name | Value | -| ---------------- | -------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/webinar/history/v1/company/sessions` | -| Rate Limit Group | `Heavy` | -| App Permission | `ReadWebinars` | -| User Permission | `N/A` | +| Name | Value | +| ---------------- | ---------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/webinar/history/v1/company/recordings` | +| Rate Limit Group | `Heavy` | +| App Permission | `ReadWebinars` | +| User Permission | `N/A` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.webinar().history().v1().company().sessions().get(rcwHistoryListAllCompanySessionsParameters); +var result = await rc.webinar().history().v1().company().recordings().list(rcwHistoryAdminListRecordingsParameters); await rc.revoke(); ``` -- `rcwHistoryListAllCompanySessionsParameters` is of type [RcwHistoryListAllCompanySessionsParameters](./definitions/RcwHistoryListAllCompanySessionsParameters.ts) -- `result` is of type [SessionGlobalListResource](./definitions/SessionGlobalListResource.ts) +- `rcwHistoryAdminListRecordingsParameters` is of type [RcwHistoryAdminListRecordingsParameters](./definitions/RcwHistoryAdminListRecordingsParameters.ts) +- `result` is of type [RecordingAdminListResource](./definitions/RecordingAdminListResource.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Historical-Webinars-rcwHistoryListAllCompanySessions) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Historical-Recordings-rcwHistoryAdminListRecordings) in API Explorer. + +## rcwHistoryAdminGetRecording + +Get Webinar Recording (Admin) + +| Name | Value | +| ---------------- | ------------------------------------------------------ | +| HTTP Method | `GET` | +| Endpoint | `/webinar/history/v1/company/recordings/{recordingId}` | +| Rate Limit Group | `Heavy` | +| App Permission | `ReadWebinars` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.webinar().history().v1().company().recordings(recordingId).get(); +await rc.revoke(); +``` + +- `result` is of type [RecordingAdminExtendedItemModel](./definitions/RecordingAdminExtendedItemModel.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Historical-Recordings-rcwHistoryAdminGetRecording) in API Explorer. ## rcwHistoryListRecordings @@ -8127,52 +8127,29 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Historical-Recordings-rcwHistoryGetRecording) in API Explorer. -## rcwHistoryAdminListRecordings - -List Webinar Recordings (Admin) - -| Name | Value | -| ---------------- | ---------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/webinar/history/v1/company/recordings` | -| Rate Limit Group | `Heavy` | -| App Permission | `ReadWebinars` | -| User Permission | `N/A` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.webinar().history().v1().company().recordings().list(rcwHistoryAdminListRecordingsParameters); -await rc.revoke(); -``` - -- `rcwHistoryAdminListRecordingsParameters` is of type [RcwHistoryAdminListRecordingsParameters](./definitions/RcwHistoryAdminListRecordingsParameters.ts) -- `result` is of type [RecordingAdminListResource](./definitions/RecordingAdminListResource.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#Historical-Recordings-rcwHistoryAdminListRecordings) in API Explorer. - -## rcwHistoryAdminGetRecording +## rcwHistoryListAllCompanySessions -Get Webinar Recording (Admin) +List Historical Webinar Sessions across Multiple Webinars / Hosts -| Name | Value | -| ---------------- | ------------------------------------------------------ | -| HTTP Method | `GET` | -| Endpoint | `/webinar/history/v1/company/recordings/{recordingId}` | -| Rate Limit Group | `Heavy` | -| App Permission | `ReadWebinars` | -| User Permission | `N/A` | +| Name | Value | +| ---------------- | -------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/webinar/history/v1/company/sessions` | +| Rate Limit Group | `Heavy` | +| App Permission | `ReadWebinars` | +| User Permission | `N/A` | ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.webinar().history().v1().company().recordings(recordingId).get(); +var result = await rc.webinar().history().v1().company().sessions().get(rcwHistoryListAllCompanySessionsParameters); await rc.revoke(); ``` -- `result` is of type [RecordingAdminExtendedItemModel](./definitions/RecordingAdminExtendedItemModel.ts) +- `rcwHistoryListAllCompanySessionsParameters` is of type [RcwHistoryListAllCompanySessionsParameters](./definitions/RcwHistoryListAllCompanySessionsParameters.ts) +- `result` is of type [SessionGlobalListResource](./definitions/SessionGlobalListResource.ts) -[Try it out](https://developer.ringcentral.com/api-reference#Historical-Recordings-rcwHistoryAdminGetRecording) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Historical-Webinars-rcwHistoryListAllCompanySessions) in API Explorer. ## rcwHistoryGetSession @@ -8197,6 +8174,53 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Historical-Webinars-rcwHistoryGetSession) in API Explorer. +## rcwRegGetSession + +Get Registration Session Info + +| Name | Value | +| ---------------- | ----------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/webinar/registration/v1/sessions/{sessionId}` | +| Rate Limit Group | `Heavy` | +| App Permission | `ReadWebinars` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.webinar().registration().v1().sessions(sessionId).get(); +await rc.revoke(); +``` + +- `result` is of type [RegSessionModel](./definitions/RegSessionModel.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Registration-Management-rcwRegGetSession) in API Explorer. + +## rcwRegUpdateSession + +Update Registration Session + +| Name | Value | +| ---------------- | ----------------------------------------------- | +| HTTP Method | `PATCH` | +| Endpoint | `/webinar/registration/v1/sessions/{sessionId}` | +| Rate Limit Group | `Heavy` | +| App Permission | `EditWebinars` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.webinar().registration().v1().sessions(sessionId).patch(regSessionModel); +await rc.revoke(); +``` + +- `regSessionModel` is of type [RegSessionModel](./definitions/RegSessionModel.ts) +- `result` is of type [RegSessionModel](./definitions/RegSessionModel.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Registration-Management-rcwRegUpdateSession) in API Explorer. + ## listExtensionPhoneNumbers Get Extension Phone Number List @@ -8212,22 +8236,158 @@ Get Extension Phone Number List ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc - .restapi(apiVersion) - .account(accountId) - .extension(extensionId) - .phoneNumber() - .get(listExtensionPhoneNumbersParameters); +var result = await rc + .restapi(apiVersion) + .account(accountId) + .extension(extensionId) + .phoneNumber() + .get(listExtensionPhoneNumbersParameters); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- Parameter `extensionId` is optional with default value `~` +- `listExtensionPhoneNumbersParameters` is of type [ListExtensionPhoneNumbersParameters](./definitions/ListExtensionPhoneNumbersParameters.ts) +- `result` is of type [GetExtensionPhoneNumbersResponse](./definitions/GetExtensionPhoneNumbersResponse.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Phone-Numbers-listExtensionPhoneNumbers) in API Explorer. + +## listCompanyMessageTemplates + +List Company Message Templates + +| Name | Value | +| ---------------- | ------------------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/message-store-templates` | +| Rate Limit Group | `Light` | +| App Permission | `ReadAccounts` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc + .restapi(apiVersion) + .account(accountId) + .messageStoreTemplates() + .list(listCompanyMessageTemplatesParameters); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- `listCompanyMessageTemplatesParameters` is of type [ListCompanyMessageTemplatesParameters](./definitions/ListCompanyMessageTemplatesParameters.ts) +- `result` is of type [MessageTemplatesListResponse](./definitions/MessageTemplatesListResponse.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#SMS-Templates-listCompanyMessageTemplates) in API Explorer. + +## createCompanyMessageTemplate + +Create Company Message Template + +| Name | Value | +| ---------------- | ------------------------------------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/message-store-templates` | +| Rate Limit Group | `Medium` | +| App Permission | `EditAccounts` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.restapi(apiVersion).account(accountId).messageStoreTemplates().post(messageTemplateRequest); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- `messageTemplateRequest` is of type [MessageTemplateRequest](./definitions/MessageTemplateRequest.ts) +- `result` is of type [MessageTemplateResponse](./definitions/MessageTemplateResponse.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#SMS-Templates-createCompanyMessageTemplate) in API Explorer. + +## readCompanyMessageTemplate + +Get Company Message Template + +| Name | Value | +| ---------------- | -------------------------------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/message-store-templates/{templateId}` | +| Rate Limit Group | `Light` | +| App Permission | `ReadAccounts` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.restapi(apiVersion).account(accountId).messageStoreTemplates(templateId).get(); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- `result` is of type [MessageTemplateResponse](./definitions/MessageTemplateResponse.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#SMS-Templates-readCompanyMessageTemplate) in API Explorer. + +## updateCompanyMessageTemplate + +Update Company Message Template + +| Name | Value | +| ---------------- | -------------------------------------------------------------------------------- | +| HTTP Method | `PUT` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/message-store-templates/{templateId}` | +| Rate Limit Group | `Medium` | +| App Permission | `EditAccounts` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc + .restapi(apiVersion) + .account(accountId) + .messageStoreTemplates(templateId) + .put(messageTemplateUpdateRequest); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- `messageTemplateUpdateRequest` is of type [MessageTemplateUpdateRequest](./definitions/MessageTemplateUpdateRequest.ts) +- `result` is of type [MessageTemplateResponse](./definitions/MessageTemplateResponse.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#SMS-Templates-updateCompanyMessageTemplate) in API Explorer. + +## deleteCompanyMessageTemplate + +Delete Company Message Template + +| Name | Value | +| ---------------- | -------------------------------------------------------------------------------- | +| HTTP Method | `DELETE` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/message-store-templates/{templateId}` | +| Rate Limit Group | `Medium` | +| App Permission | `EditAccounts` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.restapi(apiVersion).account(accountId).messageStoreTemplates(templateId).delete(); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` -- Parameter `extensionId` is optional with default value `~` -- `listExtensionPhoneNumbersParameters` is of type [ListExtensionPhoneNumbersParameters](./definitions/ListExtensionPhoneNumbersParameters.ts) -- `result` is of type [GetExtensionPhoneNumbersResponse](./definitions/GetExtensionPhoneNumbersResponse.ts) +- `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#Phone-Numbers-listExtensionPhoneNumbers) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#SMS-Templates-deleteCompanyMessageTemplate) in API Explorer. ## listPagingGroupUsers @@ -8671,29 +8831,6 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Phone-Numbers-getBulkAddTaskResultsV2) in API Explorer. -## sendActivationEmailV2 - -Send/Resend Activation Email - -| Name | Value | -| ---------------- | -------------------------------------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/restapi/v2/accounts/{accountId}/send-activation-email` | -| Rate Limit Group | `Medium` | -| App Permission | `EditAccounts` | -| User Permission | `AccountAdministration` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.restapi().v2().accounts(accountId).sendActivationEmail().post(); -await rc.revoke(); -``` - -- `result` is an empty string - -[Try it out](https://developer.ringcentral.com/api-reference#Company-sendActivationEmailV2) in API Explorer. - ## addA2PSMSOptOuts Add Opt-In/Out Numbers @@ -10084,6 +10221,39 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Call-Control-callFlipParty) in API Explorer. +## holdCallParty + +Hold Call Party + +| Name | Value | +| ---------------- | ---------------------------------------------------------------------------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/hold` | +| Rate Limit Group | `Light` | +| App Permission | `CallControl` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc + .restapi(apiVersion) + .account(accountId) + .telephony() + .sessions(telephonySessionId) + .parties(partyId) + .hold() + .post(holdCallPartyRequest); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- `holdCallPartyRequest` is of type [HoldCallPartyRequest](./definitions/HoldCallPartyRequest.ts) +- `result` is of type [CallParty](./definitions/CallParty.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Call-Control-holdCallParty) in API Explorer. + ## callParkParty Call Park @@ -10409,53 +10579,6 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Webinar-Subscriptions-rcwN11sRenewSubscription) in API Explorer. -## rcwRegGetSession - -Get Registration Session Info - -| Name | Value | -| ---------------- | ----------------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/webinar/registration/v1/sessions/{sessionId}` | -| Rate Limit Group | `Heavy` | -| App Permission | `ReadWebinars` | -| User Permission | `N/A` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.webinar().registration().v1().sessions(sessionId).get(); -await rc.revoke(); -``` - -- `result` is of type [RegSessionModel](./definitions/RegSessionModel.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#Registration-Management-rcwRegGetSession) in API Explorer. - -## rcwRegUpdateSession - -Update Registration Session - -| Name | Value | -| ---------------- | ----------------------------------------------- | -| HTTP Method | `PATCH` | -| Endpoint | `/webinar/registration/v1/sessions/{sessionId}` | -| Rate Limit Group | `Heavy` | -| App Permission | `EditWebinars` | -| User Permission | `N/A` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc.webinar().registration().v1().sessions(sessionId).patch(regSessionModel); -await rc.revoke(); -``` - -- `regSessionModel` is of type [RegSessionModel](./definitions/RegSessionModel.ts) -- `result` is of type [RegSessionModel](./definitions/RegSessionModel.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#Registration-Management-rcwRegUpdateSession) in API Explorer. - ## rcwRegListRegistrants List Session Registrants @@ -11641,6 +11764,164 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Call-Blocking-deleteBlockedAllowedNumber) in API Explorer. +## listUserMessageTemplates + +List User Message Templates + +| Name | Value | +| ---------------- | ------------------------------------------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/message-store-templates` | +| Rate Limit Group | `Light` | +| App Permission | `ReadAccounts` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc + .restapi(apiVersion) + .account(accountId) + .extension(extensionId) + .messageStoreTemplates() + .list(listUserMessageTemplatesParameters); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- Parameter `extensionId` is optional with default value `~` +- `listUserMessageTemplatesParameters` is of type [ListUserMessageTemplatesParameters](./definitions/ListUserMessageTemplatesParameters.ts) +- `result` is of type [MessageTemplatesListResponse](./definitions/MessageTemplatesListResponse.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#SMS-Templates-listUserMessageTemplates) in API Explorer. + +## createUserMessageTemplate + +Create User Message Template + +| Name | Value | +| ---------------- | ------------------------------------------------------------------------------------------- | +| HTTP Method | `POST` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/message-store-templates` | +| Rate Limit Group | `Medium` | +| App Permission | `EditExtensions` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc + .restapi(apiVersion) + .account(accountId) + .extension(extensionId) + .messageStoreTemplates() + .post(messageTemplateRequest); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- Parameter `extensionId` is optional with default value `~` +- `messageTemplateRequest` is of type [MessageTemplateRequest](./definitions/MessageTemplateRequest.ts) +- `result` is of type [MessageTemplateResponse](./definitions/MessageTemplateResponse.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#SMS-Templates-createUserMessageTemplate) in API Explorer. + +## readUserMessageTemplate + +Get User Message Template + +| Name | Value | +| ---------------- | -------------------------------------------------------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/message-store-templates/{templateId}` | +| Rate Limit Group | `Light` | +| App Permission | `ReadAccounts` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc + .restapi(apiVersion) + .account(accountId) + .extension(extensionId) + .messageStoreTemplates(templateId) + .get(); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- Parameter `extensionId` is optional with default value `~` +- `result` is of type [MessageTemplateResponse](./definitions/MessageTemplateResponse.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#SMS-Templates-readUserMessageTemplate) in API Explorer. + +## updateUserMessageTemplate + +Update User Message Template + +| Name | Value | +| ---------------- | -------------------------------------------------------------------------------------------------------- | +| HTTP Method | `PUT` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/message-store-templates/{templateId}` | +| Rate Limit Group | `Medium` | +| App Permission | `EditExtensions` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc + .restapi(apiVersion) + .account(accountId) + .extension(extensionId) + .messageStoreTemplates(templateId) + .put(messageTemplateUpdateRequest); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- Parameter `extensionId` is optional with default value `~` +- `messageTemplateUpdateRequest` is of type [MessageTemplateUpdateRequest](./definitions/MessageTemplateUpdateRequest.ts) +- `result` is of type [MessageTemplateResponse](./definitions/MessageTemplateResponse.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#SMS-Templates-updateUserMessageTemplate) in API Explorer. + +## deleteUserMessageTemplate + +Delete User Message Template + +| Name | Value | +| ---------------- | -------------------------------------------------------------------------------------------------------- | +| HTTP Method | `DELETE` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/message-store-templates/{templateId}` | +| Rate Limit Group | `Medium` | +| App Permission | `EditExtensions` | +| User Permission | `N/A` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc + .restapi(apiVersion) + .account(accountId) + .extension(extensionId) + .messageStoreTemplates(templateId) + .delete(); +await rc.revoke(); +``` + +- Parameter `apiVersion` is optional with default value `v1.0` +- Parameter `accountId` is optional with default value `~` +- Parameter `extensionId` is optional with default value `~` +- `result` is an empty string + +[Try it out](https://developer.ringcentral.com/api-reference#SMS-Templates-deleteUserMessageTemplate) in API Explorer. + ## readNotificationSettings Get Notification Settings @@ -11831,39 +12112,6 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Call-Control-forwardCallParty) in API Explorer. -## holdCallParty - -Hold Call Party - -| Name | Value | -| ---------------- | ---------------------------------------------------------------------------------------------------------- | -| HTTP Method | `POST` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/hold` | -| Rate Limit Group | `Light` | -| App Permission | `CallControl` | -| User Permission | `N/A` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc - .restapi(apiVersion) - .account(accountId) - .telephony() - .sessions(telephonySessionId) - .parties(partyId) - .hold() - .post(holdCallPartyRequest); -await rc.revoke(); -``` - -- Parameter `apiVersion` is optional with default value `v1.0` -- Parameter `accountId` is optional with default value `~` -- `holdCallPartyRequest` is of type [HoldCallPartyRequest](./definitions/HoldCallPartyRequest.ts) -- `result` is of type [CallParty](./definitions/CallParty.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#Call-Control-holdCallParty) in API Explorer. - ## ignoreCallInQueue Ignore Call in Queue