diff --git a/packages/core/src/definitions/AccountInfo.ts b/packages/core/src/definitions/AccountInfo.ts index b58f28ed1..cf6cb30fb 100644 --- a/packages/core/src/definitions/AccountInfo.ts +++ b/packages/core/src/definitions/AccountInfo.ts @@ -1,4 +1,3 @@ -import type AccountStatusInfo from './AccountStatusInfo'; import type PostalAddress from './PostalAddress'; import type ServiceInfoV2 from './ServiceInfoV2'; import type SystemUserContactInfo from './SystemUserContactInfo'; @@ -25,16 +24,11 @@ interface AccountInfo { mainNumber?: string; /** - * Account status + * Status of an account * Required - * Example: Confirmed */ status?: 'Initial' | 'Unconfirmed' | 'Confirmed' | 'Disabled'; - /** - */ - statusInfo?: AccountStatusInfo; - /** * Company name * Example: Acme Inc. diff --git a/packages/core/src/definitions/AccountPhoneNumberInfo.ts b/packages/core/src/definitions/AccountPhoneNumberInfo.ts index 11af1c240..b4afdf61d 100644 --- a/packages/core/src/definitions/AccountPhoneNumberInfo.ts +++ b/packages/core/src/definitions/AccountPhoneNumberInfo.ts @@ -17,7 +17,7 @@ interface AccountPhoneNumberInfo { phoneNumber?: string; /** - * Type of phone number + * Type of a phone number */ type?: 'VoiceFax' | 'VoiceOnly' | 'FaxOnly'; @@ -59,7 +59,9 @@ interface AccountPhoneNumberInfo { 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 + * 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 */ status?: 'Normal' | 'Pending' | 'PortedIn' | 'Temporary' | 'Unknown'; diff --git a/packages/core/src/definitions/AccountRegionalSettings.ts b/packages/core/src/definitions/AccountRegionalSettings.ts index 3c76b13aa..15764fa69 100644 --- a/packages/core/src/definitions/AccountRegionalSettings.ts +++ b/packages/core/src/definitions/AccountRegionalSettings.ts @@ -31,7 +31,8 @@ interface AccountRegionalSettings { formattingLocale?: FormattingLocaleInfo; /** - * Time format setting. The default value is '12h' = ['12h', '24h'] + * Time format (12-hours or 24-hours). + * Default: 12h */ timeFormat?: '12h' | '24h'; diff --git a/packages/core/src/definitions/AccountServiceInfo.ts b/packages/core/src/definitions/AccountServiceInfo.ts index c32e05d54..b912cabef 100644 --- a/packages/core/src/definitions/AccountServiceInfo.ts +++ b/packages/core/src/definitions/AccountServiceInfo.ts @@ -5,7 +5,7 @@ import type TargetServicePlanInfo from './TargetServicePlanInfo'; import type BillingPlanInfo from './BillingPlanInfo'; import type ServiceFeatureInfo from './ServiceFeatureInfo'; import type AccountLimits from './AccountLimits'; -import type PackageInfo from './PackageInfo'; +import type BillingPackageInfo from './BillingPackageInfo'; import type UBrandInfo from './UBrandInfo'; /** @@ -55,7 +55,7 @@ interface AccountServiceInfo { /** */ - package?: PackageInfo; + package?: BillingPackageInfo; /** */ diff --git a/packages/core/src/definitions/AccountServiceInfoRequest.ts b/packages/core/src/definitions/AccountServiceInfoRequest.ts index 46ee9e473..7cf05b53a 100644 --- a/packages/core/src/definitions/AccountServiceInfoRequest.ts +++ b/packages/core/src/definitions/AccountServiceInfoRequest.ts @@ -5,7 +5,7 @@ import type TargetServicePlanInfo from './TargetServicePlanInfo'; import type BillingPlanInfo from './BillingPlanInfo'; import type ServiceFeatureInfo from './ServiceFeatureInfo'; import type AccountLimits from './AccountLimits'; -import type PackageInfo from './PackageInfo'; +import type BillingPackageInfo from './BillingPackageInfo'; /** * Account service information, including brand, service plan and billing plan @@ -54,7 +54,7 @@ interface AccountServiceInfoRequest { /** */ - package?: PackageInfo; + package?: BillingPackageInfo; } export default AccountServiceInfoRequest; diff --git a/packages/core/src/definitions/AccountStatusInfo.ts b/packages/core/src/definitions/AccountStatusInfo.ts index b17733cae..6d59768b5 100644 --- a/packages/core/src/definitions/AccountStatusInfo.ts +++ b/packages/core/src/definitions/AccountStatusInfo.ts @@ -15,7 +15,9 @@ interface AccountStatusInfo { comment?: string; /** - * Date after which the account will get deleted. Parameter can be used to overwrite default retention period + * Date after which the disabled account will get deleted. + * Parameter can be used to overwrite default retention period + * (that is 30 days after disabling the account) * Format: date-time * Example: 2023-03-26T11:30:45.940Z */ diff --git a/packages/core/src/definitions/AddPhoneNumberRequestItem.ts b/packages/core/src/definitions/AddPhoneNumberRequestItem.ts index 0ed140666..96e6b6aaa 100644 --- a/packages/core/src/definitions/AddPhoneNumberRequestItem.ts +++ b/packages/core/src/definitions/AddPhoneNumberRequestItem.ts @@ -14,6 +14,11 @@ interface AddPhoneNumberRequestItem { * Default: Inventory */ usageType?: 'Inventory' | 'InventoryPartnerBusinessMobileNumber' | 'PartnerBusinessMobileNumber'; + + /** + * Phone number activation status. Determine whether phone number migration is completed on the partner side. + */ + activationStatus?: 'Active' | 'Inactive'; } export default AddPhoneNumberRequestItem; diff --git a/packages/core/src/definitions/AddPhoneNumbersResponseItem.ts b/packages/core/src/definitions/AddPhoneNumbersResponseItem.ts index 061ba9034..4f1807436 100644 --- a/packages/core/src/definitions/AddPhoneNumbersResponseItem.ts +++ b/packages/core/src/definitions/AddPhoneNumbersResponseItem.ts @@ -27,6 +27,11 @@ interface AddPhoneNumbersResponseItem { * Example: +16501234567 */ phoneNumber?: string; + + /** + * Phone number activation status. Determine whether phone number migration is completed on the partner side. + */ + activationStatus?: 'Active' | 'Inactive'; } export default AddPhoneNumbersResponseItem; diff --git a/packages/core/src/definitions/AssignPhoneNumberRequest.ts b/packages/core/src/definitions/AssignPhoneNumberRequest.ts index 3af10a70a..7e7f3a299 100644 --- a/packages/core/src/definitions/AssignPhoneNumberRequest.ts +++ b/packages/core/src/definitions/AssignPhoneNumberRequest.ts @@ -3,7 +3,7 @@ import type ContactCenterProvider from './ContactCenterProvider'; interface AssignPhoneNumberRequest { /** - * Type of phone number + * Type of a phone number */ type?: 'VoiceFax' | 'VoiceOnly' | 'FaxOnly'; @@ -11,7 +11,7 @@ interface AssignPhoneNumberRequest { * Target usage type of phone number (only listed values are supported) * Required */ - usageType?: 'MainCompanyNumber' | 'CompanyNumber' | 'DirectNumber' | 'PhoneLine' | 'ContactCenterNumber'; + usageType?: 'MainCompanyNumber' | 'CompanyNumber' | 'DirectNumber' | 'ContactCenterNumber'; /** */ diff --git a/packages/core/src/definitions/AssignedCountryInfo.ts b/packages/core/src/definitions/AssignedCountryInfo.ts index 7a3015b67..a9c6af0ee 100644 --- a/packages/core/src/definitions/AssignedCountryInfo.ts +++ b/packages/core/src/definitions/AssignedCountryInfo.ts @@ -9,11 +9,13 @@ interface AssignedCountryInfo { /** * Canonical URI of an assigned country resource + * Format: uri */ uri?: string; /** - * Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ isoCode?: string; diff --git a/packages/core/src/definitions/AuthCodeTokenRequest.ts b/packages/core/src/definitions/AuthCodeTokenRequest.ts index 81564d295..eac117067 100644 --- a/packages/core/src/definitions/AuthCodeTokenRequest.ts +++ b/packages/core/src/definitions/AuthCodeTokenRequest.ts @@ -6,6 +6,7 @@ interface AuthCodeTokenRequest { /** * Grant type + * Required */ grant_type?: 'authorization_code'; diff --git a/packages/core/src/definitions/BatchListResponse.ts b/packages/core/src/definitions/BatchListResponse.ts index 6e2264124..17102a61b 100644 --- a/packages/core/src/definitions/BatchListResponse.ts +++ b/packages/core/src/definitions/BatchListResponse.ts @@ -1,5 +1,5 @@ import type MessageBatchResponse from './MessageBatchResponse'; -import type PagingResource from './PagingResource'; +import type NonEnumeratedPagingModel from './NonEnumeratedPagingModel'; /** * The list of batches retrieved for an account and other filter criteria such as fromPhoneNumber, date specified in the request. @@ -12,7 +12,7 @@ interface BatchListResponse { /** */ - paging?: PagingResource; + paging?: NonEnumeratedPagingModel; } export default BatchListResponse; diff --git a/packages/core/src/definitions/PackageInfo.ts b/packages/core/src/definitions/BillingPackageInfo.ts similarity index 65% rename from packages/core/src/definitions/PackageInfo.ts rename to packages/core/src/definitions/BillingPackageInfo.ts index 8f315ee4d..7fee615e2 100644 --- a/packages/core/src/definitions/PackageInfo.ts +++ b/packages/core/src/definitions/BillingPackageInfo.ts @@ -1,4 +1,4 @@ -interface PackageInfo { +interface BillingPackageInfo { /** * Billing package version */ @@ -10,4 +10,4 @@ interface PackageInfo { id?: string; } -export default PackageInfo; +export default BillingPackageInfo; diff --git a/packages/core/src/definitions/CallFlipNumberListResource.ts b/packages/core/src/definitions/CallFlipNumberListResource.ts new file mode 100644 index 000000000..62a3735f3 --- /dev/null +++ b/packages/core/src/definitions/CallFlipNumberListResource.ts @@ -0,0 +1,10 @@ +import type CallFlipNumberResource from './CallFlipNumberResource'; + +interface CallFlipNumberListResource { + /** + * List of call flip numbers + */ + records?: CallFlipNumberResource[]; +} + +export default CallFlipNumberListResource; diff --git a/packages/core/src/definitions/CallFlipNumberResource.ts b/packages/core/src/definitions/CallFlipNumberResource.ts new file mode 100644 index 000000000..35f9c2e0d --- /dev/null +++ b/packages/core/src/definitions/CallFlipNumberResource.ts @@ -0,0 +1,33 @@ +interface CallFlipNumberResource { + /** + * Internal identifier of a call flip number + * Example: 409926525004 + */ + id?: string; + + /** + * Flip number in E.164 format with '+' + * Example: +16502096935 + */ + phoneNumber?: string; + + /** + * Flip number type + * Example: PhoneLine + */ + type?: 'PhoneLine' | 'External'; + + /** + * Flip number label, device name for Digital Line case + * Example: My Mobile Number + */ + label?: string; + + /** + * Speed dial/flip number, the range is 1-8 + * Example: 5 + */ + flipNumber?: string; +} + +export default CallFlipNumberResource; diff --git a/packages/core/src/definitions/AnsweringRuleInfo.ts b/packages/core/src/definitions/CallHandlingRuleInfo.ts similarity index 97% rename from packages/core/src/definitions/AnsweringRuleInfo.ts rename to packages/core/src/definitions/CallHandlingRuleInfo.ts index cc573531b..bc3ee2481 100644 --- a/packages/core/src/definitions/AnsweringRuleInfo.ts +++ b/packages/core/src/definitions/CallHandlingRuleInfo.ts @@ -10,7 +10,7 @@ import type GreetingInfo from './GreetingInfo'; import type SharedLinesInfo from './SharedLinesInfo'; import type MissedCallInfo from './MissedCallInfo'; -interface AnsweringRuleInfo { +interface CallHandlingRuleInfo { /** * Canonical URI to an answering rule resource * Format: uri @@ -103,4 +103,4 @@ interface AnsweringRuleInfo { missedCall?: MissedCallInfo; } -export default AnsweringRuleInfo; +export default CallHandlingRuleInfo; diff --git a/packages/core/src/definitions/CallParty.ts b/packages/core/src/definitions/CallParty.ts index 326816dce..e174b665a 100644 --- a/packages/core/src/definitions/CallParty.ts +++ b/packages/core/src/definitions/CallParty.ts @@ -3,6 +3,7 @@ import type ParkInfo from './ParkInfo'; import type PartyInfo from './PartyInfo'; import type OwnerInfo from './OwnerInfo'; import type RecordingInfo from './RecordingInfo'; +import type MetaData from './MetaData'; /** * Information on a party of a call session @@ -73,6 +74,11 @@ interface CallParty { * Active recordings list */ recordings?: RecordingInfo[]; + + /** + * Call metadata. + */ + metadata?: MetaData[]; } export default CallParty; diff --git a/packages/core/src/definitions/CallQueueDetails.ts b/packages/core/src/definitions/CallQueueDetails.ts index 287b9b324..5303ed1d7 100644 --- a/packages/core/src/definitions/CallQueueDetails.ts +++ b/packages/core/src/definitions/CallQueueDetails.ts @@ -1,3 +1,4 @@ +import type SiteBasicInfo from './SiteBasicInfo'; import type CallQueueServiceLevelSettings from './CallQueueServiceLevelSettings'; interface CallQueueDetails { @@ -23,7 +24,7 @@ interface CallQueueDetails { name?: string; /** - * Call queue status + * Group extension status */ status?: 'Enabled' | 'Disabled' | 'NotActivated'; @@ -32,6 +33,10 @@ interface CallQueueDetails { */ subType?: 'Emergency'; + /** + */ + site?: SiteBasicInfo; + /** */ serviceLevelSettings?: CallQueueServiceLevelSettings; diff --git a/packages/core/src/definitions/CallQueueDetailsForUpdate.ts b/packages/core/src/definitions/CallQueueDetailsForUpdate.ts new file mode 100644 index 000000000..7c5feed10 --- /dev/null +++ b/packages/core/src/definitions/CallQueueDetailsForUpdate.ts @@ -0,0 +1,45 @@ +import type SiteReference from './SiteReference'; +import type CallQueueServiceLevelSettings from './CallQueueServiceLevelSettings'; + +interface CallQueueDetailsForUpdate { + /** + * Extension number of a call queue + */ + extensionNumber?: string; + + /** + * Name of a call queue + */ + name?: string; + + /** + * Group extension status + */ + status?: 'Enabled' | 'Disabled' | 'NotActivated'; + + /** + * Indicates whether it is an emergency call queue extension or not + */ + subType?: 'Emergency'; + + /** + */ + site?: SiteReference; + + /** + */ + serviceLevelSettings?: CallQueueServiceLevelSettings; + + /** + * Allows members to change their queue status + */ + editableMemberStatus?: boolean; + + /** + * Alert timer or pickup setting. Delay time in seconds before call queue group members are notified when calls are queued + * Format: int32 + */ + alertTimer?: number; +} + +export default CallQueueDetailsForUpdate; diff --git a/packages/core/src/definitions/CallQueueInfo.ts b/packages/core/src/definitions/CallQueueInfo.ts index 121b9e8f4..1ebb92186 100644 --- a/packages/core/src/definitions/CallQueueInfo.ts +++ b/packages/core/src/definitions/CallQueueInfo.ts @@ -1,3 +1,5 @@ +import type SiteBasicInfo from './SiteBasicInfo'; + interface CallQueueInfo { /** * Link to a call queue @@ -21,7 +23,7 @@ interface CallQueueInfo { name?: string; /** - * Call queue status + * Group extension status */ status?: 'Enabled' | 'Disabled' | 'NotActivated'; @@ -29,6 +31,10 @@ interface CallQueueInfo { * Indicates whether it is an emergency call queue extension or not */ subType?: 'Emergency'; + + /** + */ + site?: SiteBasicInfo; } export default CallQueueInfo; diff --git a/packages/core/src/definitions/CallQueues.ts b/packages/core/src/definitions/CallQueueList.ts similarity index 89% rename from packages/core/src/definitions/CallQueues.ts rename to packages/core/src/definitions/CallQueueList.ts index efe6e94d6..ad36a1a79 100644 --- a/packages/core/src/definitions/CallQueues.ts +++ b/packages/core/src/definitions/CallQueueList.ts @@ -2,7 +2,7 @@ import type CallQueueInfo from './CallQueueInfo'; import type PageNavigationModel from './PageNavigationModel'; import type EnumeratedPagingModel from './EnumeratedPagingModel'; -interface CallQueues { +interface CallQueueList { /** * Link to a call queues resource * Required @@ -27,4 +27,4 @@ interface CallQueues { paging?: EnumeratedPagingModel; } -export default CallQueues; +export default CallQueueList; diff --git a/packages/core/src/definitions/CallQueueMember.ts b/packages/core/src/definitions/CallQueueMember.ts index 8be998e3d..88644ad44 100644 --- a/packages/core/src/definitions/CallQueueMember.ts +++ b/packages/core/src/definitions/CallQueueMember.ts @@ -1,4 +1,4 @@ -import type SiteResource from './SiteResource'; +import type SiteBasicInfo from './SiteBasicInfo'; /** * Call queue member information @@ -21,7 +21,7 @@ interface CallQueueMember { /** */ - site?: SiteResource; + site?: SiteBasicInfo; } export default CallQueueMember; diff --git a/packages/core/src/definitions/GreetingResource.ts b/packages/core/src/definitions/CallRecordingGreetingResource.ts similarity index 79% rename from packages/core/src/definitions/GreetingResource.ts rename to packages/core/src/definitions/CallRecordingGreetingResource.ts index c77ec61d2..78f7b1d6c 100644 --- a/packages/core/src/definitions/GreetingResource.ts +++ b/packages/core/src/definitions/CallRecordingGreetingResource.ts @@ -1,4 +1,4 @@ -interface GreetingResource { +interface CallRecordingGreetingResource { /** */ type?: 'StartRecording' | 'StopRecording' | 'AutomaticRecording'; @@ -11,4 +11,4 @@ interface GreetingResource { mode?: 'Default' | 'Custom'; } -export default GreetingResource; +export default CallRecordingGreetingResource; diff --git a/packages/core/src/definitions/CallRecordingSettingsResource.ts b/packages/core/src/definitions/CallRecordingSettingsResource.ts index 10510b54c..5e319a34c 100644 --- a/packages/core/src/definitions/CallRecordingSettingsResource.ts +++ b/packages/core/src/definitions/CallRecordingSettingsResource.ts @@ -1,6 +1,6 @@ import type OnDemandResource from './OnDemandResource'; import type AutomaticRecordingResource from './AutomaticRecordingResource'; -import type GreetingResource from './GreetingResource'; +import type CallRecordingGreetingResource from './CallRecordingGreetingResource'; interface CallRecordingSettingsResource { /** @@ -14,7 +14,7 @@ interface CallRecordingSettingsResource { /** * Collection of Greeting Info */ - greetings?: GreetingResource[]; + greetings?: CallRecordingGreetingResource[]; } export default CallRecordingSettingsResource; diff --git a/packages/core/src/definitions/ClientCredentialsBase.ts b/packages/core/src/definitions/ClientCredentialsBase.ts index c63563e81..8c153d8f0 100644 --- a/packages/core/src/definitions/ClientCredentialsBase.ts +++ b/packages/core/src/definitions/ClientCredentialsBase.ts @@ -1,9 +1,12 @@ /** - * Token endpoint request parameters used in the "Client Credentials" authorization flow with the `client_credentials` grant type + * Token endpoint request parameters used in the "Client Credentials" authorization flow + * with the `client_credentials` grant type + * */ interface ClientCredentialsBase { /** * Grant type + * Required */ grant_type?: 'client_credentials'; } diff --git a/packages/core/src/definitions/ClientCredentialsByAccount.ts b/packages/core/src/definitions/ClientCredentialsByAccount.ts index 889edc71a..707f5263f 100644 --- a/packages/core/src/definitions/ClientCredentialsByAccount.ts +++ b/packages/core/src/definitions/ClientCredentialsByAccount.ts @@ -1,9 +1,12 @@ /** - * Token endpoint request parameters used in the "Client Credentials" authorization flow with the `client_credentials` grant type + * Token endpoint request parameters used in the "Client Credentials" authorization flow + * with the `client_credentials` grant type + * */ interface ClientCredentialsByAccount { /** * Grant type + * Required */ grant_type?: 'client_credentials'; diff --git a/packages/core/src/definitions/ClientCredentialsByBrand.ts b/packages/core/src/definitions/ClientCredentialsByBrand.ts index ecd7dd60e..bd0603b93 100644 --- a/packages/core/src/definitions/ClientCredentialsByBrand.ts +++ b/packages/core/src/definitions/ClientCredentialsByBrand.ts @@ -1,9 +1,12 @@ /** - * Token endpoint request parameters used in the "Client Credentials" authorization flow with the `client_credentials` grant type + * Token endpoint request parameters used in the "Client Credentials" authorization flow + * with the `client_credentials` grant type + * */ interface ClientCredentialsByBrand { /** * Grant type + * Required */ grant_type?: 'client_credentials'; diff --git a/packages/core/src/definitions/ClientCredentialsByPartnerAccount.ts b/packages/core/src/definitions/ClientCredentialsByPartnerAccount.ts index a5d64072c..fd8a00037 100644 --- a/packages/core/src/definitions/ClientCredentialsByPartnerAccount.ts +++ b/packages/core/src/definitions/ClientCredentialsByPartnerAccount.ts @@ -1,9 +1,12 @@ /** - * Token endpoint request parameters used in the "Client Credentials" authorization flow with the `client_credentials` grant type + * Token endpoint request parameters used in the "Client Credentials" authorization flow + * with the `client_credentials` grant type + * */ interface ClientCredentialsByPartnerAccount { /** * Grant type + * Required */ grant_type?: 'client_credentials'; diff --git a/packages/core/src/definitions/ClientCredentialsTokenRequest.ts b/packages/core/src/definitions/ClientCredentialsTokenRequest.ts index 70be203d5..950f74181 100644 --- a/packages/core/src/definitions/ClientCredentialsTokenRequest.ts +++ b/packages/core/src/definitions/ClientCredentialsTokenRequest.ts @@ -1,9 +1,12 @@ /** - * Token endpoint request parameters used in the "Client Credentials" authorization flow with the `client_credentials` grant type + * Token endpoint request parameters used in the "Client Credentials" authorization flow + * with the `client_credentials` grant type + * */ interface ClientCredentialsTokenRequest { /** * Grant type + * Required */ grant_type?: 'client_credentials'; diff --git a/packages/core/src/definitions/CommonEmergencyLocationAddressInfo.ts b/packages/core/src/definitions/CommonEmergencyLocationAddressInfo.ts index 620a90ec3..1d444ea71 100644 --- a/packages/core/src/definitions/CommonEmergencyLocationAddressInfo.ts +++ b/packages/core/src/definitions/CommonEmergencyLocationAddressInfo.ts @@ -10,7 +10,8 @@ interface CommonEmergencyLocationAddressInfo { countryId?: string; /** - * ISO code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ countryIsoCode?: string; diff --git a/packages/core/src/definitions/CommonEmergencyLocationAddressInfoAu.ts b/packages/core/src/definitions/CommonEmergencyLocationAddressInfoAu.ts index 293349d25..a666223fc 100644 --- a/packages/core/src/definitions/CommonEmergencyLocationAddressInfoAu.ts +++ b/packages/core/src/definitions/CommonEmergencyLocationAddressInfoAu.ts @@ -10,7 +10,8 @@ interface CommonEmergencyLocationAddressInfoAu { countryId?: string; /** - * ISO code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ countryIsoCode?: string; diff --git a/packages/core/src/definitions/CommonEmergencyLocationAddressInfoDefault.ts b/packages/core/src/definitions/CommonEmergencyLocationAddressInfoDefault.ts index 4b302a7f9..ffa76b740 100644 --- a/packages/core/src/definitions/CommonEmergencyLocationAddressInfoDefault.ts +++ b/packages/core/src/definitions/CommonEmergencyLocationAddressInfoDefault.ts @@ -10,7 +10,8 @@ interface CommonEmergencyLocationAddressInfoDefault { countryId?: string; /** - * ISO code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ countryIsoCode?: string; diff --git a/packages/core/src/definitions/CommonEmergencyLocationAddressInfoFr.ts b/packages/core/src/definitions/CommonEmergencyLocationAddressInfoFr.ts index 71be2d8f1..849304426 100644 --- a/packages/core/src/definitions/CommonEmergencyLocationAddressInfoFr.ts +++ b/packages/core/src/definitions/CommonEmergencyLocationAddressInfoFr.ts @@ -10,7 +10,8 @@ interface CommonEmergencyLocationAddressInfoFr { countryId?: string; /** - * ISO code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ countryIsoCode?: string; diff --git a/packages/core/src/definitions/CompanyPhoneNumberInfo.ts b/packages/core/src/definitions/CompanyPhoneNumberInfo.ts index 72da13f8d..0dcfb49af 100644 --- a/packages/core/src/definitions/CompanyPhoneNumberInfo.ts +++ b/packages/core/src/definitions/CompanyPhoneNumberInfo.ts @@ -52,16 +52,16 @@ interface CompanyPhoneNumberInfo { phoneNumber?: string; /** - * Status of a phone number. If the value is 'Normal', the phone - * number is ready to be used. If the value is 'Pending' it is an - * external number not yet ported to RingCentral. + * 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 */ - status?: 'Normal' | 'Pending' | 'PortedIn' | 'Temporary'; + status?: 'Normal' | 'Pending' | 'PortedIn' | 'Temporary' | 'Unknown'; /** - * Phone number type + * Type of a phone number */ - type?: 'VoiceFax' | 'FaxOnly' | 'VoiceOnly'; + type?: 'VoiceFax' | 'VoiceOnly' | 'FaxOnly'; /** * Usage type of phone number. Usage type of phone number. @@ -101,6 +101,11 @@ interface CompanyPhoneNumberInfo { * Specifies if a phone number is primary, i.e. displayed as 'main number' and called by default */ primary?: boolean; + + /** + * Phone number activation status. Determine whether phone number migration is completed on the partner side. + */ + activationStatus?: 'Active' | 'Inactive'; } export default CompanyPhoneNumberInfo; diff --git a/packages/core/src/definitions/ContentAttachment.ts b/packages/core/src/definitions/ContentAttachment.ts deleted file mode 100644 index 45c1a4251..000000000 --- a/packages/core/src/definitions/ContentAttachment.ts +++ /dev/null @@ -1,85 +0,0 @@ -interface ContentAttachment { - /** - * Type of the attachment, which is generally a MIME attachment type like "image/jpeg", etc. - * - * Security level in ED determines what type of attachment is allowed. - * - * Based on the security level the following attachment types are supported. - * - * "Strict" level allows safe extensions below: - * Content name and supported types - * * audio (supports aac mp3 ogg m4a) - * * image (supports bmp gif jpg jpeg png svg webp) - * * pdf (supports pdf) - * * text (supports csv txt log) - * * video (supports avi flv m4v mkv mov mp4 mpg qt wmv) - * * other (supports amr dms vcard tif tiff mpeg) - * - * "Relaxed" level allows documents: - * Content name and supported types - * * excel (supports xls xlsm xlsx xlc xlt xltm xltx) - * * presentation (supports key odp otp) - * * powerpoint (supports pps ppt pptx pot) - * * spreadsheet (supports numbers ods ots) - * * word (supports doc docm docx dotm dotx) - * * word_processing (supports pages odt ott rtf) - * - * "Permissive" level allows all documents. - * - * However, there are no security level restrictions for content posted through the channel. - * Example: image/jpeg - */ - contentType?: string; - - /** - * Creation time of the attachment. - * Format: date-time - * Example: 2023-02-04T12:43:07Z - */ - creationTime?: string; - - /** - * Embedded in a content. - */ - embedded?: boolean; - - /** - * Filename of the attachment. - * Example: 0.jpeg - */ - filename?: string; - - /** - * Identifier of the attachment. - * Example: 54085e5b7aa58d8b5d00006c - */ - id?: string; - - /** - * Privacy setting of the attachment. - */ - public?: boolean; - - /** - * Size of the attachment. - * Format: int32 - * Example: 217571 - */ - size?: number; - - /** - * The time when the last modification was completed. - * Format: date-time - * Example: 2023-02-04T12:43:07Z - */ - lastModifiedTime?: string; - - /** - * Uri of the attachment. - * Format: uri - * Example: https://example.digital.ringcentral.com/files/attachments/54085e5b7aa58d8b5d00006c - */ - uri?: string; -} - -export default ContentAttachment; diff --git a/packages/core/src/definitions/ContentBodyFormatted.ts b/packages/core/src/definitions/ContentBodyFormatted.ts index 688fd2684..918d22494 100644 --- a/packages/core/src/definitions/ContentBodyFormatted.ts +++ b/packages/core/src/definitions/ContentBodyFormatted.ts @@ -1,5 +1,5 @@ /** - * Text and HTML formatted versions of the content body. + * Text and HTML formatted versions of the content body */ interface ContentBodyFormatted { /** diff --git a/packages/core/src/definitions/ContentContextData.ts b/packages/core/src/definitions/ContentContextData.ts index 3bf103139..7473d4c9f 100644 --- a/packages/core/src/definitions/ContentContextData.ts +++ b/packages/core/src/definitions/ContentContextData.ts @@ -1,7 +1,6 @@ /** * Additional data of the content. - * - * The contextData hash keys are the custom fields keys. + * The `contextData` hash keys are the custom fields keys * */ // eslint-disable-next-line @typescript-eslint/no-empty-interface diff --git a/packages/core/src/definitions/ContentModel.ts b/packages/core/src/definitions/ContentModel.ts index 03b061577..4ecf9cbca 100644 --- a/packages/core/src/definitions/ContentModel.ts +++ b/packages/core/src/definitions/ContentModel.ts @@ -1,20 +1,18 @@ -import type ContentAttachment from './ContentAttachment'; +import type SocMsgContentAttachment from './SocMsgContentAttachment'; import type ContentBodyFormatted from './ContentBodyFormatted'; import type ContentContextData from './ContentContextData'; interface ContentModel { /** - * An array containing the attachments that are attached to the content. + * Array of attachments to be added to the content * Required */ - attachments?: ContentAttachment[]; + attachments?: SocMsgContentAttachment[]; /** - * Identity identifier of the author of content. - * - * Not mandatory on creation, by default it uses the token's user first identity on channel. + * Identity identifier of the content author. Not mandatory on creation, + * by default it uses the token's user first identity on channel * Required - * Example: 541014e17aa58d8ccf000023 */ authorIdentityId?: string; @@ -28,26 +26,23 @@ interface ContentModel { autoSubmitted?: boolean; /** - * The content's body. - * - * On creation this field is mandatory except for WhatsApp content using templates. + * Content body. On creation this field is mandatory except for WhatsApp content + * using templates. The following are the channels supported and their **max length** + * restrictions (in brackets): * - * The following are the max length restrictions for the different channels supported. - * Channel and max length - * * Apple Messages For Business (max length 10000) - * * Email (max length 262144) - * * RingCX Digital Messaging (max length 1024) - * * Facebook (max length 8000) - * * GoogleBusinessMessages (max length 3000) - * * Google My Business (max length 4000) - * * Instagram (max length 950) - * * Instagram Messaging (max length 1000) - * * LinkedIn (max length 3000) - * * Messenger (max length 2000) - * * Twitter (max length 280) - * * Viber (max length 7000) - * * WhatsApp (max length 3800) - * * Youtube (max length 8000) + * - *Apple Messages For Business* (10000) + * - *Email* (262144) + * - *RingCX Digital Messaging* (1024) + * - *Facebook* (8000) + * - *Google My Business* (4000) + * - *Instagram* (950) + * - *Instagram Messaging* (1000) + * - *LinkedIn* (3000) + * - *Messenger* (2000) + * - *Twitter* (280) + * - *Viber* (7000) + * - *WhatsApp* (3800) + * - *Youtube* (8000) * Required * Example: Body of the content */ @@ -59,18 +54,27 @@ interface ContentModel { bodyFormatted?: ContentBodyFormatted; /** - * Values can be Text or Html. + * Content input format * Required */ bodyInputFormat?: 'Text' | 'Html'; /** - * List of the category identifiers of the content. + * List of the category identifiers of the content * Required * Example: 541014e17aa58d8ccf000023,541014e17aa58d8ccf002023 */ categoryIds?: string[]; + /** + * Direction of the content. + * + * * Incoming contents are received from a channel. + * * Outgoing contents are exported to a channel. + * Example: Incoming + */ + contentDirection?: 'Incoming' | 'Outgoing'; + /** */ contextData?: ContentContextData; @@ -84,83 +88,81 @@ interface ContentModel { creationTime?: string; /** - * Created from of the content. + * Source of content * Required */ createdFrom?: 'Synchronizer' | 'Interface' | 'Api' | 'AutoSurvey' | 'AutoResponseTrigger' | 'AutoRequestEmail'; /** - * RC user id of the creator + * RingCentral user identifier of the creator * Required * Example: 2683222036 */ creatorId?: string; + /** + * True if the content is the first in the thread. + */ + firstInThread?: boolean; + /** * External categories of the content. - * - * Present only if the content has foreignCategories. + * Returned only if the content has `foreignCategories` * Example: foreign_category_id */ foreignCategories?: string[]; /** - * Identifier of the content. + * Content identifier * Required - * Example: 541014e17aa58d8ccf000023 */ id?: string; /** - * The identity identifier of the content to which this content is a reply to. + * Identifier of the content identity to which this content is a reply to. + * If the channel does not support discussion initiation, this parameter is mandatory * Required - * Example: 541014e17asdd8ccf000023 */ inReplyToAuthorIdentityId?: string; /** - * The content identifier to which this content is a reply to. - * - * On creation, if omitted, a new discussion will be created. If the channel does not support to initiate discussion this parameter is mandatory. + * Content identifier to which this content is a reply to. On creation, if omitted, + * a new discussion will be created. If the channel does not support discussion initiation, + * this parameter is mandatory * Required - * Example: 123414e17asdd8ccf000023 */ inReplyToContentId?: string; /** - * The intervention identifier of the content. + * Intervention identifier of the content * Required - * Example: 123415437asdd8ccf000023 */ interventionId?: string; /** - * Language of the content. + * Language of the content * Required * Example: En */ language?: string; /** - * True if the content is publicly visible on the remote channel (default). - * - * Private content is NOT supported on every channel. + * If set to `true`, then the content is publicly visible on remote channel. + * Private content is NOT supported on every channel * Required * Default: true */ public?: boolean; /** - * True if the content is published on the remote channel. + * If set to `true`, then the content is published on remote channel * Required * Example: true */ published?: boolean; /** - * Rating of the content. - * - * Present only if the content supports rating and rating is filled. + * Rating of content. Present only if the content supports rating and rating is filled * Required * Format: int32 * Example: 4 @@ -168,30 +170,27 @@ interface ContentModel { rating?: number; /** - * True if the content has been deleted on the remote channel. + * Set to `true` if content has been deleted on remote channel * Required */ remotelyDeleted?: boolean; /** - * Identifier of the channel. - * - * On creation if `inReplyToContentId` is specified, the channel will be determined from it. Otherwise, this parameter is mandatory. + * Channel identifier. * Required - * Example: fff415437asdd8ccf000023 + * Example: 506d9e817aa58d1259000f12 */ - sourceId?: string; + channelId?: string; /** - * Type of the channel. + * Type of a channel * Required */ - sourceType?: + channelType?: | 'AppleMessagesForBusiness' | 'Email' | 'EngageMessaging' | 'Facebook' - | 'GoogleBusinessMessages' | 'GoogleMyBusiness' | 'Instagram' | 'InstagramMessaging' @@ -203,50 +202,47 @@ interface ContentModel { | 'Youtube'; /** - * External Uri of the content channel. + * External URI of a content channel * Required * Format: uri */ - sourceUri?: string; + channelUri?: string; /** - * Content status. + * Content status * Required */ status?: 'New' | 'Assigned' | 'Replied' | 'UserReply' | 'UserInitiated' | 'Ignored'; /** - * Synchronization status. + * Synchronization status * Required * Example: success */ synchronizationStatus?: string; /** - * Synchronization error details. + * Synchronization error details * Required */ synchronizationError?: string; /** - * Content thread identifier of the content. + * Content thread identifier * Required */ threadId?: string; /** - * Applicable to Email channels only. - * - * The subject of the email. - * - * This field is mandatory when initiating a discussion. + * Applicable to Email channels only. The subject of the email. + * This field is mandatory when initiating a discussion * Required * Example: An email title */ title?: string; /** - * Type of the content. + * Type of the content * Required * Example: Email */ @@ -294,7 +290,7 @@ interface ContentModel { lastModifiedTime?: string; /** - * Types of structured messages that can be used to reply to this type of message. + * Types of structured messages that can be used to reply to this type of message * Required */ capabilitiesSupported?: string[]; diff --git a/packages/core/src/definitions/CostCenterBase.ts b/packages/core/src/definitions/CostCenterBase.ts new file mode 100644 index 000000000..7544c8b7e --- /dev/null +++ b/packages/core/src/definitions/CostCenterBase.ts @@ -0,0 +1,22 @@ +interface CostCenterBase { + /** + * Internal identifier of a cost center + * Format: int64 + * Example: 981086004 + */ + id?: number; + + /** + * Cost Center name + * Example: My Cost Center + */ + name?: string; + + /** + * Billing code associated with a cost center + * Example: BC 101 + */ + billingCode?: string; +} + +export default CostCenterBase; diff --git a/packages/core/src/definitions/CostCenterItem.ts b/packages/core/src/definitions/CostCenterItem.ts new file mode 100644 index 000000000..e97fc3d49 --- /dev/null +++ b/packages/core/src/definitions/CostCenterItem.ts @@ -0,0 +1,36 @@ +import type TaxLocation from './TaxLocation'; + +interface CostCenterItem { + /** + * Internal identifier of a cost center + * Format: int64 + * Example: 981086004 + */ + id?: number; + + /** + * Cost Center name + * Example: My Cost Center + */ + name?: string; + + /** + * Billing code associated with a cost center + * Example: BC 101 + */ + billingCode?: string; + + /** + * Required + */ + taxLocation?: TaxLocation; + + /** + * Internal identifier of a parent cost center + * Format: int64 + * Example: 45878 + */ + parentId?: number; +} + +export default CostCenterItem; diff --git a/packages/core/src/definitions/CostCenterList.ts b/packages/core/src/definitions/CostCenterList.ts new file mode 100644 index 000000000..7427aa33d --- /dev/null +++ b/packages/core/src/definitions/CostCenterList.ts @@ -0,0 +1,10 @@ +import type CostCenterItem from './CostCenterItem'; + +interface CostCenterList { + /** + * Required + */ + records?: CostCenterItem[]; +} + +export default CostCenterList; diff --git a/packages/core/src/definitions/CountryInfoDictionaryModel.ts b/packages/core/src/definitions/CountryInfoDictionaryModel.ts index 15d65cc87..f45265931 100644 --- a/packages/core/src/definitions/CountryInfoDictionaryModel.ts +++ b/packages/core/src/definitions/CountryInfoDictionaryModel.ts @@ -16,16 +16,16 @@ interface CountryInfoDictionaryModel { name?: string; /** - * Country code according to the ISO standard, see - * [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ 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) + * recommendations, [E.123](http://en.wikipedia.org/wiki/E.123) and + * [E.164](http://en.wikipedia.org/wiki/E.164). + * See also [Calling Codes](http://en.wikipedia.org/wiki/List_of_country_calling_codes) */ callingCode?: string; diff --git a/packages/core/src/definitions/CountryInfoShortModel.ts b/packages/core/src/definitions/CountryInfoShortModel.ts index 215238158..e82d0ad80 100644 --- a/packages/core/src/definitions/CountryInfoShortModel.ts +++ b/packages/core/src/definitions/CountryInfoShortModel.ts @@ -16,17 +16,16 @@ interface CountryInfoShortModel { 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. + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ 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) + * recommendations, [E.123](http://en.wikipedia.org/wiki/E.123) and + * [E.164](http://en.wikipedia.org/wiki/E.164). + * See also [Calling Codes](http://en.wikipedia.org/wiki/List_of_country_calling_codes) */ callingCode?: string; } diff --git a/packages/core/src/definitions/CreateContentRequest.ts b/packages/core/src/definitions/CreateContentRequest.ts deleted file mode 100644 index 28fdc58e0..000000000 --- a/packages/core/src/definitions/CreateContentRequest.ts +++ /dev/null @@ -1,147 +0,0 @@ -import type ContentContextData from './ContentContextData'; - -interface CreateContentRequest { - /** - * Identity identifier of the author of content. - * - * Not mandatory on creation, by default it uses the token's user first identity on channel. - * Example: 541014e17aa58d8ccf000023 - */ - authorIdentityId?: string; - - /** - * The content's body. - * - * On creation this field is mandatory except for WhatsApp content using templates. - * - * The following are the max length restrictions for the different channels supported. - * Channel and max length - * * Apple Messages For Business (max length 10000) - * * Email (max length 262144) - * * RingCX Digital Messaging (max length 1024) - * * Facebook (max length 8000) - * * GoogleBusinessMessages (max length 3000) - * * Google My Business (max length 4000) - * * Instagram (max length 950) - * * Instagram Messaging (max length 1000) - * * LinkedIn (max length 3000) - * * Messenger (max length 2000) - * * Twitter (max length 280) - * * Viber (max length 7000) - * * WhatsApp (max length 3800) - * * Youtube (max length 8000) - * Example: Body of the content - */ - body?: string; - - /** - * The content identifier to which this content is a reply to. - * - * On creation, if omitted, a new discussion will be created. If the channel does not support to initiate discussion this parameter is mandatory. - * Example: 123414e17asdd8ccf000023 - */ - inReplyToContentId?: string; - - /** - * True if the content is publicly visible on the remote channel (default). - * - * Private content is NOT supported on every channel. - * Default: true - */ - public?: boolean; - - /** - * Identifier of the channel. - * - * On creation if `inReplyToContentId` is specified, the channel will be determined from it. Otherwise, this parameter is mandatory. - * Example: fff415437asdd8ccf000023 - */ - sourceId?: string; - - /** - * An array containing the attachment identifiers that need to be attached to the content. - * Example: 541014e17aa58d8ccf000023,541014e17aa58d8ccf000023 - */ - attachmentIds?: string[]; - - /** - * Applicable to Email channels only. - * - * The subject of the email. - * - * This field is mandatory when initiating a discussion. - * Example: An email title - */ - title?: string; - - /** - * Applicable on Email channels only. - * - * An array containing the email addresses used in sections of the email. - * - * This parameter is mandatory when initiating a discussion. - */ - to?: string[]; - - /** - * Applicable on Email channels only. - * - * An array containing the email addresses used in sections of the email. - * - * This parameter is mandatory when initiating a discussion. - */ - cc?: string[]; - - /** - * Applicable on Email channels only. - * - * An array containing the email addresses used in sections of the email. - * - * This parameter is mandatory when initiating a discussion. - */ - bcc?: string[]; - - /** - * Applicable to WhatsApp channels only. - * - * Name of the Whatsapp template to use for the content. - * - * All available template names are visible on the Whatsapp Business Manager interface. - * Example: customer_order_shipment_template - */ - templateName?: string; - - /** - * Applicable to WhatsApp channels only. - * - * Language of the Whatsapp template to use for the content. All available template languages are visible on the Whatsapp Business Manager interface. - * - * Language specified must conform to the ISO 639-1 alpha-2 codes for representing the names of languages. - * Example: fr - */ - templateLanguage?: string; - - /** - * Applicable to WhatsApp channels only. - * - * Component configuration of the Whatsapp template to use for the content. - * - * All available components are visible on the Whatsapp Business Manager interface. - * Example: [object Object],[object Object] - */ - components?: object[]; - - /** - */ - contextData?: ContentContextData; - - /** - * Auto submitted content: - * - won't reopen tasks or interventions - * - can be used to send automatic messages like asking an user to follow on twitter, sending a survey, etc, - * - doesn't get included in statistics - */ - autoSubmitted?: boolean; -} - -export default CreateContentRequest; diff --git a/packages/core/src/definitions/CreateFaxMessageRequest.ts b/packages/core/src/definitions/CreateFaxMessageRequest.ts index 088c67d03..8dc5e2dcc 100644 --- a/packages/core/src/definitions/CreateFaxMessageRequest.ts +++ b/packages/core/src/definitions/CreateFaxMessageRequest.ts @@ -26,7 +26,7 @@ interface CreateFaxMessageRequest { sendTime?: string; /** - * Alpha-2 ISO Code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format * Example: US */ isoCode?: string; diff --git a/packages/core/src/definitions/CreateSiteRequest.ts b/packages/core/src/definitions/CreateSiteRequest.ts index 7943b2c06..6e8e35446 100644 --- a/packages/core/src/definitions/CreateSiteRequest.ts +++ b/packages/core/src/definitions/CreateSiteRequest.ts @@ -37,6 +37,15 @@ interface CreateSiteRequest { */ operator?: SiteOperatorReference; + /** + * Site access status for cross-site limitation + */ + siteAccess?: 'Limited' | 'Unlimited'; + + /** + */ + accessibleSiteIds?: string[]; + /** * Site code value */ diff --git a/packages/core/src/definitions/CreateSocialMessagingContentRequest.ts b/packages/core/src/definitions/CreateSocialMessagingContentRequest.ts new file mode 100644 index 000000000..8c6aa7d66 --- /dev/null +++ b/packages/core/src/definitions/CreateSocialMessagingContentRequest.ts @@ -0,0 +1,126 @@ +import type ContentContextData from './ContentContextData'; + +/** + * Request body for operation createSocialMessagingContent + */ +interface CreateSocialMessagingContentRequest { + /** + * Identity identifier of the content author. Not mandatory on creation, + * by default it uses the token's user first identity on channel + */ + authorIdentityId?: string; + + /** + * Content body. On creation this field is mandatory except for WhatsApp content + * using templates. The following are the channels supported and their **max length** + * restrictions (in brackets): + * + * - *Apple Messages For Business* (10000) + * - *Email* (262144) + * - *RingCX Digital Messaging* (1024) + * - *Facebook* (8000) + * - *Google My Business* (4000) + * - *Instagram* (950) + * - *Instagram Messaging* (1000) + * - *LinkedIn* (3000) + * - *Messenger* (2000) + * - *Twitter* (280) + * - *Viber* (7000) + * - *WhatsApp* (3800) + * - *Youtube* (8000) + * Example: Body of the content + */ + body?: string; + + /** + * Content identifier to which this content is a reply to. On creation, if omitted, + * a new discussion will be created. If the channel does not support discussion initiation, + * this parameter is mandatory + */ + inReplyToContentId?: string; + + /** + * If set to `true`, then the content is publicly visible on remote channel. + * Private content is NOT supported on every channel + * Default: true + */ + public?: boolean; + + /** + * Channel identifier. + * Example: 506d9e817aa58d1259000f12 + */ + channelId?: string; + + /** + * List of attachment identifiers to be added to the content + * Example: 541014e17aa58d8ccf000023,541014e17aa58d8ccf000023 + */ + attachmentIds?: string[]; + + /** + * Applicable to Email channels only. The subject of the email. + * This field is mandatory when initiating a discussion + * Example: An email title + */ + title?: string; + + /** + * Applicable to Email channels only. + * An array containing the email addresses used in sections of the email. + * This parameter is mandatory when initiating a discussion + */ + to?: string[]; + + /** + * Applicable to Email channels only. + * An array containing the email addresses used in sections of the email. + * This parameter is mandatory when initiating a discussion + */ + cc?: string[]; + + /** + * Applicable to Email channels only. + * An array containing the email addresses used in sections of the email. + * This parameter is mandatory when initiating a discussion + */ + bcc?: string[]; + + /** + * Applicable to WhatsApp channels only. Name of the WhatsApp template to use for the content. + * All available template names are visible on the WhatsApp Business Manager interface + * Example: customer_order_shipment_template + */ + templateName?: string; + + /** + * Applicable to WhatsApp channels only. Language of the WhatsApp template + * to use for the content. All available template languages are visible on + * the WhatsApp Business Manager interface. Language specified must conform + * to the ISO 639-1 alpha-2 codes for representing the names of languages + * Example: fr + */ + templateLanguage?: string; + + /** + * Applicable to WhatsApp channels only. Component configuration of the WhatsApp + * template to use for the content. All available components are visible on + * the WhatsApp Business Manager interface + * Example: [object Object],[object Object] + */ + components?: object[]; + + /** + */ + contextData?: ContentContextData; + + /** + * Auto submitted content: + * - won't reopen tasks or interventions + * - can be used to send automatic messages like asking an user to follow on twitter, sending a survey, etc, + * - doesn't get included in statistics + */ + autoSubmitted?: boolean; +} + +export default CreateSocialMessagingContentRequest; diff --git a/packages/core/src/definitions/CreateUserEmergencyLocationRequest.ts b/packages/core/src/definitions/CreateUserEmergencyLocationRequest.ts index 15d60111a..baa0fe449 100644 --- a/packages/core/src/definitions/CreateUserEmergencyLocationRequest.ts +++ b/packages/core/src/definitions/CreateUserEmergencyLocationRequest.ts @@ -12,7 +12,8 @@ interface CreateUserEmergencyLocationRequest { addressFormatId?: string; /** - * If 'true' address validation for non-us addresses is skipped + * Specifies emergency address validation during the ERL creation/update. + * If set to 'true', then address validation for non-US addresses is skipped */ trusted?: boolean; diff --git a/packages/core/src/definitions/CustomCompanyGreetingInfo.ts b/packages/core/src/definitions/CustomCompanyGreetingInfo.ts index dc6cc8f22..2f73394c3 100644 --- a/packages/core/src/definitions/CustomCompanyGreetingInfo.ts +++ b/packages/core/src/definitions/CustomCompanyGreetingInfo.ts @@ -14,7 +14,7 @@ interface CustomCompanyGreetingInfo { id?: string; /** - * Type of company greeting + * Type of a company greeting */ type?: 'Company' | 'StartRecording' | 'StopRecording' | 'AutomaticRecording' | 'TemplateGreeting'; diff --git a/packages/core/src/definitions/DeletePhoneNumbersRequestItem.ts b/packages/core/src/definitions/DeletePhoneNumbersRequestItem.ts index 91f30034f..57316bb8d 100644 --- a/packages/core/src/definitions/DeletePhoneNumbersRequestItem.ts +++ b/packages/core/src/definitions/DeletePhoneNumbersRequestItem.ts @@ -1,5 +1,5 @@ /** - * The indication of a number to be deleted - either "id" or "phoneNumber" must be specified. + * The indication of a number to be deleted - either `id` or `phoneNumber` must be specified. */ interface DeletePhoneNumbersRequestItem { /** diff --git a/packages/core/src/definitions/DeviceCodeTokenRequest.ts b/packages/core/src/definitions/DeviceCodeTokenRequest.ts index 54d032536..df9ba10b3 100644 --- a/packages/core/src/definitions/DeviceCodeTokenRequest.ts +++ b/packages/core/src/definitions/DeviceCodeTokenRequest.ts @@ -6,6 +6,7 @@ interface DeviceCodeTokenRequest { /** * Grant type + * Required */ grant_type?: 'urn:ietf:params:oauth:grant-type:device_code'; diff --git a/packages/core/src/definitions/DeviceEmergencyServiceAddressResourceAu.ts b/packages/core/src/definitions/DeviceEmergencyServiceAddressResourceAu.ts index e1152c9b9..ad9f91dbf 100644 --- a/packages/core/src/definitions/DeviceEmergencyServiceAddressResourceAu.ts +++ b/packages/core/src/definitions/DeviceEmergencyServiceAddressResourceAu.ts @@ -48,7 +48,8 @@ interface DeviceEmergencyServiceAddressResourceAu { countryId?: string; /** - * ISO code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ countryIsoCode?: string; diff --git a/packages/core/src/definitions/DeviceEmergencyServiceAddressResourceDefault.ts b/packages/core/src/definitions/DeviceEmergencyServiceAddressResourceDefault.ts index 74da5d346..a77db1756 100644 --- a/packages/core/src/definitions/DeviceEmergencyServiceAddressResourceDefault.ts +++ b/packages/core/src/definitions/DeviceEmergencyServiceAddressResourceDefault.ts @@ -48,7 +48,8 @@ interface DeviceEmergencyServiceAddressResourceDefault { countryId?: string; /** - * ISO code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ countryIsoCode?: string; diff --git a/packages/core/src/definitions/DeviceEmergencyServiceAddressResourceFr.ts b/packages/core/src/definitions/DeviceEmergencyServiceAddressResourceFr.ts index c748b7bce..205ff9d29 100644 --- a/packages/core/src/definitions/DeviceEmergencyServiceAddressResourceFr.ts +++ b/packages/core/src/definitions/DeviceEmergencyServiceAddressResourceFr.ts @@ -48,7 +48,8 @@ interface DeviceEmergencyServiceAddressResourceFr { countryId?: string; /** - * ISO code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ countryIsoCode?: string; diff --git a/packages/core/src/definitions/DeviceResource.ts b/packages/core/src/definitions/DeviceResource.ts index 40f9e4ce6..dde7e4d8d 100644 --- a/packages/core/src/definitions/DeviceResource.ts +++ b/packages/core/src/definitions/DeviceResource.ts @@ -97,7 +97,8 @@ interface DeviceResource { useAsCommonPhone?: boolean; /** - * This flag indicates whether this device is used for hot desking or not + * Indicates whether this device is used for hot desking or not. + * Returned if `useAsCommonPhone` is set to false */ hotDeskDevice?: boolean; diff --git a/packages/core/src/definitions/EmailRecipientInfo.ts b/packages/core/src/definitions/EmailRecipientInfo.ts index 1118f2dea..9658c8a43 100644 --- a/packages/core/src/definitions/EmailRecipientInfo.ts +++ b/packages/core/src/definitions/EmailRecipientInfo.ts @@ -15,9 +15,9 @@ interface EmailRecipientInfo { extensionNumber?: string; /** - * Current state of an extension + * Extension status */ - status?: 'Enabled' | 'Disable' | 'NotActivated' | 'Unassigned'; + status?: 'Enabled' | 'Disabled' | 'Frozen' | 'NotActivated' | 'Unassigned'; /** * List of user email addresses from extension notification settings. diff --git a/packages/core/src/definitions/EmergencyAddressInfo.ts b/packages/core/src/definitions/EmergencyAddressInfo.ts index 3de85218b..0ea8c92b4 100644 --- a/packages/core/src/definitions/EmergencyAddressInfo.ts +++ b/packages/core/src/definitions/EmergencyAddressInfo.ts @@ -10,7 +10,8 @@ interface EmergencyAddressInfo { countryId?: string; /** - * ISO code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ countryIsoCode?: string; diff --git a/packages/core/src/definitions/EmergencyLocationInfoRequest.ts b/packages/core/src/definitions/EmergencyLocationInfoRequest.ts deleted file mode 100644 index 47ca75ae7..000000000 --- a/packages/core/src/definitions/EmergencyLocationInfoRequest.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type CommonEmergencyLocationAddressInfo from './CommonEmergencyLocationAddressInfo'; -import type ShortSiteInfo from './ShortSiteInfo'; - -interface EmergencyLocationInfoRequest { - /** - * Internal identifier of an emergency response location - */ - id?: string; - - /** - */ - address?: CommonEmergencyLocationAddressInfo; - - /** - * Emergency response location name - */ - name?: string; - - /** - */ - site?: ShortSiteInfo; - - /** - * Emergency address status - */ - addressStatus?: 'Valid' | 'Invalid'; - - /** - * Status of an emergency response location usage. - */ - usageStatus?: 'Active' | 'Inactive'; - - /** - * Address format ID - */ - addressFormatId?: string; - - /** - * Visibility of an emergency response location. If `Private` - * is set, then a location is visible only for restricted number of users, - * specified in `owners` array - * Default: Public - */ - visibility?: 'Public'; -} - -export default EmergencyLocationInfoRequest; diff --git a/packages/core/src/definitions/EmergencyLocationRequestResource.ts b/packages/core/src/definitions/EmergencyLocationRequestResource.ts index de55f6570..a86c5772b 100644 --- a/packages/core/src/definitions/EmergencyLocationRequestResource.ts +++ b/packages/core/src/definitions/EmergencyLocationRequestResource.ts @@ -44,7 +44,8 @@ interface EmergencyLocationRequestResource { visibility?: 'Public'; /** - * If 'true' address validation for non-us addresses is skipped + * Specifies emergency address validation during the ERL creation/update. + * If set to 'true', then address validation for non-US addresses is skipped */ trusted?: boolean; } diff --git a/packages/core/src/definitions/EmergencyLocationResponseResource.ts b/packages/core/src/definitions/EmergencyLocationResponseResource.ts index 5efa9eed9..565a55fc9 100644 --- a/packages/core/src/definitions/EmergencyLocationResponseResource.ts +++ b/packages/core/src/definitions/EmergencyLocationResponseResource.ts @@ -63,7 +63,8 @@ interface EmergencyLocationResponseResource { addressFormatId?: string; /** - * If 'true' address validation for non-us addresses is skipped + * Specifies emergency address validation during the ERL creation/update. + * If set to 'true', then address validation for non-US addresses is skipped */ trusted?: boolean; } diff --git a/packages/core/src/definitions/EmergencyServiceAddressResource.ts b/packages/core/src/definitions/EmergencyServiceAddressResource.ts index 8cd9185f3..e5f00ae39 100644 --- a/packages/core/src/definitions/EmergencyServiceAddressResource.ts +++ b/packages/core/src/definitions/EmergencyServiceAddressResource.ts @@ -50,7 +50,8 @@ interface EmergencyServiceAddressResource { countryId?: string; /** - * ISO code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ countryIsoCode?: string; diff --git a/packages/core/src/definitions/ExtensionBulkUpdateInfo.ts b/packages/core/src/definitions/ExtensionBulkUpdateInfo.ts index c45e748d3..e59f1b636 100644 --- a/packages/core/src/definitions/ExtensionBulkUpdateInfo.ts +++ b/packages/core/src/definitions/ExtensionBulkUpdateInfo.ts @@ -15,8 +15,9 @@ interface ExtensionBulkUpdateInfo { id?: string; /** + * Extension status */ - status?: 'Disabled' | 'Enabled' | 'NotActivated' | 'Frozen'; + status?: 'Enabled' | 'Disabled' | 'Frozen' | 'NotActivated'; /** */ diff --git a/packages/core/src/definitions/ExtensionBulkUpdateTaskResult.ts b/packages/core/src/definitions/ExtensionBulkUpdateTaskResult.ts index 38be27ed3..7e9f94c32 100644 --- a/packages/core/src/definitions/ExtensionBulkUpdateTaskResult.ts +++ b/packages/core/src/definitions/ExtensionBulkUpdateTaskResult.ts @@ -1,13 +1,13 @@ -import type ExtensionUpdateShortResult from './ExtensionUpdateShortResult'; +import type ExtensionBulkUpdateTaskResultAffectedItems from './ExtensionBulkUpdateTaskResultAffectedItems'; import type ErrorEntity from './ErrorEntity'; /** - * Result record on multiple extension update task + * Resulting record of a task on multiple extensions update */ interface ExtensionBulkUpdateTaskResult { /** */ - affectedItems?: ExtensionUpdateShortResult[]; + affectedItems?: ExtensionBulkUpdateTaskResultAffectedItems; /** */ diff --git a/packages/core/src/definitions/ExtensionBulkUpdateTaskResultAffectedItems.ts b/packages/core/src/definitions/ExtensionBulkUpdateTaskResultAffectedItems.ts new file mode 100644 index 000000000..f2ac9f5a2 --- /dev/null +++ b/packages/core/src/definitions/ExtensionBulkUpdateTaskResultAffectedItems.ts @@ -0,0 +1,9 @@ +import type ExtensionUpdateShortResult from './ExtensionUpdateShortResult'; + +interface ExtensionBulkUpdateTaskResultAffectedItems { + /** + */ + result?: ExtensionUpdateShortResult[]; +} + +export default ExtensionBulkUpdateTaskResultAffectedItems; diff --git a/packages/core/src/definitions/ExtensionCreationRequest.ts b/packages/core/src/definitions/ExtensionCreationRequest.ts index 8e9790622..7b628bb49 100644 --- a/packages/core/src/definitions/ExtensionCreationRequest.ts +++ b/packages/core/src/definitions/ExtensionCreationRequest.ts @@ -60,9 +60,9 @@ interface ExtensionCreationRequest { site?: SiteInfo; /** - * Extension current state + * Extension status */ - status?: 'Enabled' | 'Disabled' | 'NotActivated' | 'Unassigned' | 'Frozen'; + status?: 'Enabled' | 'Disabled' | 'Frozen' | 'NotActivated' | 'Unassigned'; /** */ diff --git a/packages/core/src/definitions/ExtensionCreationResponse.ts b/packages/core/src/definitions/ExtensionCreationResponse.ts index 4af204293..4ddab06bc 100644 --- a/packages/core/src/definitions/ExtensionCreationResponse.ts +++ b/packages/core/src/definitions/ExtensionCreationResponse.ts @@ -93,9 +93,7 @@ interface ExtensionCreationResponse { site?: ProvisioningSiteInfo; /** - * Extension current state. If 'Unassigned' is specified, then - * extensions without `extensionNumber` are returned. If not specified, then - * all extensions are returned + * Extension status */ status?: 'Enabled' | 'Disabled' | 'Frozen' | 'NotActivated' | 'Unassigned'; diff --git a/packages/core/src/definitions/ExtensionRegionalSettingRequest.ts b/packages/core/src/definitions/ExtensionRegionalSettingRequest.ts index c48dcfec8..68dbe9874 100644 --- a/packages/core/src/definitions/ExtensionRegionalSettingRequest.ts +++ b/packages/core/src/definitions/ExtensionRegionalSettingRequest.ts @@ -31,7 +31,7 @@ interface ExtensionRegionalSettingRequest { currency?: ExtensionCurrencyInfoRequest; /** - * Time format setting + * Time format (12-hours or 24-hours). * Default: 12h */ timeFormat?: '12h' | '24h'; diff --git a/packages/core/src/definitions/ExtensionStatusInfo.ts b/packages/core/src/definitions/ExtensionStatusInfo.ts index 9dc192db4..896ff32c8 100644 --- a/packages/core/src/definitions/ExtensionStatusInfo.ts +++ b/packages/core/src/definitions/ExtensionStatusInfo.ts @@ -1,6 +1,5 @@ /** - * Status information (reason, comment). Returned for 'Disabled' - * status only + * Status information (reason, comment). Returned for `Disabled` extensions only * */ interface ExtensionStatusInfo { @@ -12,14 +11,7 @@ interface ExtensionStatusInfo { /** * Type of suspension */ - reason?: 'SuspendedVoluntarily' | 'SuspendedInvoluntarily' | 'CancelledVoluntarily' | 'CancelledInvoluntarily'; - - /** - * Date until which an account will get deleted. The default - * value is 30 days since the current date - * Format: date-time - */ - till?: string; + reason?: 'Voluntarily' | 'Involuntarily'; } export default ExtensionStatusInfo; diff --git a/packages/core/src/definitions/ExtensionUpdateRequest.ts b/packages/core/src/definitions/ExtensionUpdateRequest.ts index 26288d80a..24df3de78 100644 --- a/packages/core/src/definitions/ExtensionUpdateRequest.ts +++ b/packages/core/src/definitions/ExtensionUpdateRequest.ts @@ -9,8 +9,9 @@ import type ReferenceInfo from './ReferenceInfo'; interface ExtensionUpdateRequest { /** + * Extension status */ - status?: 'Disabled' | 'Enabled' | 'NotActivated' | 'Frozen'; + status?: 'Enabled' | 'Disabled' | 'Frozen' | 'NotActivated'; /** */ diff --git a/packages/core/src/definitions/GetAccountInfoResponse.ts b/packages/core/src/definitions/GetAccountInfoResponse.ts index 7d622ef96..b4d923bbf 100644 --- a/packages/core/src/definitions/GetAccountInfoResponse.ts +++ b/packages/core/src/definitions/GetAccountInfoResponse.ts @@ -52,9 +52,9 @@ interface GetAccountInfoResponse { signupInfo?: SignupInfoResource; /** - * Status of the current account + * Status of an account */ - status?: 'Initial' | 'Confirmed' | 'Unconfirmed' | 'Disabled'; + status?: 'Initial' | 'Unconfirmed' | 'Confirmed' | 'Disabled'; /** */ diff --git a/packages/core/src/definitions/GetCountryInfoNumberParser.ts b/packages/core/src/definitions/GetCountryInfoNumberParser.ts index 1994a5026..caff4db26 100644 --- a/packages/core/src/definitions/GetCountryInfoNumberParser.ts +++ b/packages/core/src/definitions/GetCountryInfoNumberParser.ts @@ -11,14 +11,15 @@ interface GetCountryInfoNumberParser { uri?: string; /** - * Country calling code defined by ITU-T recommendations `E.123` - * and `E.164`, see Calling Codes - * Example: 1 + * 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 also [Calling Codes](http://en.wikipedia.org/wiki/List_of_country_calling_codes) */ callingCode?: string; /** - * Country code in `ISO 3166` alpha-2 format + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format * Example: US */ isoCode?: string; diff --git a/packages/core/src/definitions/GetExtensionInfoResponse.ts b/packages/core/src/definitions/GetExtensionInfoResponse.ts index 9875303c5..e0225f970 100644 --- a/packages/core/src/definitions/GetExtensionInfoResponse.ts +++ b/packages/core/src/definitions/GetExtensionInfoResponse.ts @@ -114,9 +114,7 @@ interface GetExtensionInfoResponse { setupWizardState?: 'NotStarted' | 'Incomplete' | 'Completed'; /** - * Extension current state. If 'Unassigned' is specified, then - * extensions without `extensionNumber` are returned. If not specified, - * then all extensions are returned + * Extension status */ status?: 'Enabled' | 'Disabled' | 'Frozen' | 'NotActivated' | 'Unassigned'; @@ -175,6 +173,18 @@ interface GetExtensionInfoResponse { /** */ assignedCountry?: AssignedCountryInfo; + + /** + * Extension creation date/time, in ISO 8601 format + * Format: date-time + * Example: 2024-06-06T07:01:14.123Z + */ + creationTime?: string; + + /** + * Site access status for cross-site limitation + */ + siteAccess?: 'Limited' | 'Unlimited'; } export default GetExtensionInfoResponse; diff --git a/packages/core/src/definitions/GetExtensionListInfoResponse.ts b/packages/core/src/definitions/GetExtensionListInfoResponse.ts index 2ee4d1506..86b8dfe68 100644 --- a/packages/core/src/definitions/GetExtensionListInfoResponse.ts +++ b/packages/core/src/definitions/GetExtensionListInfoResponse.ts @@ -43,14 +43,12 @@ interface GetExtensionListInfoResponse { profileImage?: ProfileImageInfo; /** - * Extension current state. If 'Unassigned' is specified, then - * extensions without `extensionNumber` are returned. If not specified, - * then all extensions are returned + * Extension status */ status?: 'Enabled' | 'Disabled' | 'Frozen' | 'NotActivated' | 'Unassigned'; /** - * Extension type. Please note that legacy 'Department' extension type + * Extension type. Please note that legacy `Department` extension type * corresponds to 'Call Queue' extensions in modern RingCentral product * terminology */ @@ -103,6 +101,13 @@ interface GetExtensionListInfoResponse { /** */ costCenter?: CostCenterInfo; + + /** + * Extension creation date/time, in ISO 8601 format + * Format: date-time + * Example: 2024-06-06T07:01:14.123Z + */ + creationTime?: string; } export default GetExtensionListInfoResponse; diff --git a/packages/core/src/definitions/GetMessageInfoResponse.ts b/packages/core/src/definitions/GetMessageInfoResponse.ts index 83996d2cd..0baa95835 100644 --- a/packages/core/src/definitions/GetMessageInfoResponse.ts +++ b/packages/core/src/definitions/GetMessageInfoResponse.ts @@ -53,11 +53,6 @@ interface GetMessageInfoResponse { */ creationTime?: string; - /** - * SMS only. Delivery error code returned by gateway - */ - deliveryErrorCode?: string; - /** * Text message direction. Note that for some message types not all * directions are allowed. For example voicemail messages can diff --git a/packages/core/src/definitions/GetSMSMessageInfoResponse.ts b/packages/core/src/definitions/GetSMSMessageInfoResponse.ts index 7a38f2f35..61eeec566 100644 --- a/packages/core/src/definitions/GetSMSMessageInfoResponse.ts +++ b/packages/core/src/definitions/GetSMSMessageInfoResponse.ts @@ -47,11 +47,6 @@ interface GetSMSMessageInfoResponse { */ creationTime?: string; - /** - * SMS only. Delivery error code returned by gateway - */ - deliveryErrorCode?: string; - /** * Text message direction. Note that for some message types not all * directions are allowed. For example voicemail messages can diff --git a/packages/core/src/definitions/GetTokenRequest.ts b/packages/core/src/definitions/GetTokenRequest.ts index e759c40d8..f2e1e961c 100644 --- a/packages/core/src/definitions/GetTokenRequest.ts +++ b/packages/core/src/definitions/GetTokenRequest.ts @@ -1,5 +1,7 @@ /** - * Token endpoint request parameters used in the "Guest" authorization flow with the `guest` grant type + * Token endpoint request parameters used in the "Guest" authorization flow + * with the `guest` grant type + * */ interface GetTokenRequest { /** @@ -170,11 +172,13 @@ interface GetTokenRequest { /** * Resource type for the guest access. + * Required */ resource_type?: string; /** * Resource URL for the guest access. + * Required */ resource?: string; } diff --git a/packages/core/src/definitions/GuestTokenRequest.ts b/packages/core/src/definitions/GuestTokenRequest.ts index 5224ea61a..8e922137e 100644 --- a/packages/core/src/definitions/GuestTokenRequest.ts +++ b/packages/core/src/definitions/GuestTokenRequest.ts @@ -1,9 +1,12 @@ /** - * Token endpoint request parameters used in the "Guest" authorization flow with the `guest` grant type + * Token endpoint request parameters used in the "Guest" authorization flow + * with the `guest` grant type + * */ interface GuestTokenRequest { /** * Grant type + * Required */ grant_type?: 'guest'; @@ -14,11 +17,13 @@ interface GuestTokenRequest { /** * Resource type for the guest access. + * Required */ resource_type?: string; /** * Resource URL for the guest access. + * Required */ resource?: string; } diff --git a/packages/core/src/definitions/IdentityModel.ts b/packages/core/src/definitions/IdentityModel.ts index b398af9c8..582a9274b 100644 --- a/packages/core/src/definitions/IdentityModel.ts +++ b/packages/core/src/definitions/IdentityModel.ts @@ -73,6 +73,11 @@ interface IdentityModel { */ identityGroupId?: string; + /** + * Either Agent or Customer + */ + identityType?: 'Agent' | 'Customer'; + /** * LastName. * Example: Doe @@ -100,7 +105,6 @@ interface IdentityModel { | 'Email' | 'EngageMessaging' | 'Facebook' - | 'GoogleBusinessMessages' | 'GoogleMyBusiness' | 'Instagram' | 'Linkedin' diff --git a/packages/core/src/definitions/IvrPinTokenRequest.ts b/packages/core/src/definitions/IvrPinTokenRequest.ts index 7bd64a932..26293ad00 100644 --- a/packages/core/src/definitions/IvrPinTokenRequest.ts +++ b/packages/core/src/definitions/IvrPinTokenRequest.ts @@ -5,6 +5,7 @@ interface IvrPinTokenRequest { /** * Grant type + * Required */ grant_type?: 'ivr_pin'; diff --git a/packages/core/src/definitions/JwtTokenRequest.ts b/packages/core/src/definitions/JwtTokenRequest.ts index 57824f701..71c2e664b 100644 --- a/packages/core/src/definitions/JwtTokenRequest.ts +++ b/packages/core/src/definitions/JwtTokenRequest.ts @@ -6,6 +6,7 @@ interface JwtTokenRequest { /** * Grant type + * Required */ grant_type?: 'urn:ietf:params:oauth:grant-type:jwt-bearer' | 'partner_jwt'; diff --git a/packages/core/src/definitions/LanguageInfo.ts b/packages/core/src/definitions/LanguageInfo.ts index e26699570..66c7e208e 100644 --- a/packages/core/src/definitions/LanguageInfo.ts +++ b/packages/core/src/definitions/LanguageInfo.ts @@ -31,7 +31,8 @@ interface LanguageInfo { localeCode?: string; /** - * Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ isoCode?: string; diff --git a/packages/core/src/definitions/ListAccountPhoneNumbersParameters.ts b/packages/core/src/definitions/ListAccountPhoneNumbersParameters.ts index ea2c63532..5405a1403 100644 --- a/packages/core/src/definitions/ListAccountPhoneNumbersParameters.ts +++ b/packages/core/src/definitions/ListAccountPhoneNumbersParameters.ts @@ -49,9 +49,11 @@ interface ListAccountPhoneNumbersParameters { | 'ExternalNumberProviderTollFree'; /** - * Status of a phone number + * 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 */ - status?: 'Normal' | 'Pending' | 'PortedIn' | 'Temporary'; + status?: 'Normal' | 'Pending' | 'PortedIn' | 'Temporary' | 'Unknown'; } export default ListAccountPhoneNumbersParameters; diff --git a/packages/core/src/definitions/ListAccountPhoneNumbersV2Parameters.ts b/packages/core/src/definitions/ListAccountPhoneNumbersV2Parameters.ts index fd3ff88d7..35e1ad1c4 100644 --- a/packages/core/src/definitions/ListAccountPhoneNumbersV2Parameters.ts +++ b/packages/core/src/definitions/ListAccountPhoneNumbersV2Parameters.ts @@ -51,7 +51,9 @@ interface ListAccountPhoneNumbersV2Parameters { )[]; /** - * 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 + * 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 */ status?: 'Normal' | 'Pending' | 'PortedIn' | 'Temporary' | 'Unknown'; diff --git a/packages/core/src/definitions/ListCallMonitoringGroupsParameters.ts b/packages/core/src/definitions/ListCallMonitoringGroupsParameters.ts index e463da978..433c13107 100644 --- a/packages/core/src/definitions/ListCallMonitoringGroupsParameters.ts +++ b/packages/core/src/definitions/ListCallMonitoringGroupsParameters.ts @@ -22,6 +22,11 @@ interface ListCallMonitoringGroupsParameters { * group within the result */ memberExtensionId?: string; + + /** + * Internal identifier of a site + */ + siteId?: string; } export default ListCallMonitoringGroupsParameters; diff --git a/packages/core/src/definitions/ListDirectoryEntriesParameters.ts b/packages/core/src/definitions/ListDirectoryEntriesParameters.ts index 5670eee61..3f88aceaf 100644 --- a/packages/core/src/definitions/ListDirectoryEntriesParameters.ts +++ b/packages/core/src/definitions/ListDirectoryEntriesParameters.ts @@ -2,6 +2,12 @@ * Query parameters for operation listDirectoryEntries */ interface ListDirectoryEntriesParameters { + /** + * Flag to enable cross-site limitation checking + * Example: true + */ + accessibleSitesOnly?: boolean; + /** * If `true` then contacts of all accounts in federation are returned. If `false` then only contacts of the current account are returned, and account section is eliminated in this case * Default: true diff --git a/packages/core/src/definitions/ListEmergencyLocationsParameters.ts b/packages/core/src/definitions/ListEmergencyLocationsParameters.ts index fb3ccc2d3..af6a4d228 100644 --- a/packages/core/src/definitions/ListEmergencyLocationsParameters.ts +++ b/packages/core/src/definitions/ListEmergencyLocationsParameters.ts @@ -17,6 +17,7 @@ interface ListEmergencyLocationsParameters { searchString?: string; /** + * Emergency address status */ addressStatus?: 'Valid' | 'Invalid' | 'Provisioning'; diff --git a/packages/core/src/definitions/ListExtensionPhoneNumbersParameters.ts b/packages/core/src/definitions/ListExtensionPhoneNumbersParameters.ts index ef3254508..958b400a8 100644 --- a/packages/core/src/definitions/ListExtensionPhoneNumbersParameters.ts +++ b/packages/core/src/definitions/ListExtensionPhoneNumbersParameters.ts @@ -3,9 +3,11 @@ */ interface ListExtensionPhoneNumbersParameters { /** - * Status of a phone number + * 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 */ - status?: 'Normal' | 'Pending' | 'PortedIn' | 'Temporary'; + status?: 'Normal' | 'Pending' | 'PortedIn' | 'Temporary' | 'Unknown'; /** * Usage type of phone number diff --git a/packages/core/src/definitions/ListExtensionsParameters.ts b/packages/core/src/definitions/ListExtensionsParameters.ts index 21af91ada..3ff45d04d 100644 --- a/packages/core/src/definitions/ListExtensionsParameters.ts +++ b/packages/core/src/definitions/ListExtensionsParameters.ts @@ -29,11 +29,11 @@ interface ListExtensionsParameters { perPage?: number; /** - * Extension current state. Multiple values are supported. If 'Unassigned' + * Extension status. Multiple values are supported. If `Unassigned` * is specified, then extensions without `extensionNumber` attribute are returned. * If not specified, then all extensions are returned */ - status?: ('Enabled' | 'Disabled' | 'NotActivated' | 'Unassigned')[]; + status?: ('Enabled' | 'Disabled' | 'Frozen' | 'NotActivated' | 'Unassigned')[]; /** * Extension type. Multiple values are supported. Please note diff --git a/packages/core/src/definitions/ListMeetingRecordingsResponse.ts b/packages/core/src/definitions/ListMeetingRecordingsResponse.ts index eedc036ce..5589ac06b 100644 --- a/packages/core/src/definitions/ListMeetingRecordingsResponse.ts +++ b/packages/core/src/definitions/ListMeetingRecordingsResponse.ts @@ -1,6 +1,6 @@ import type MeetingRecordings from './MeetingRecordings'; -import type MeetingRecordingsPagingInfo from './MeetingRecordingsPagingInfo'; -import type MeetingRecordingsNavigationInfo from './MeetingRecordingsNavigationInfo'; +import type EnumeratedPagingModel from './EnumeratedPagingModel'; +import type PageNavigationModel from './PageNavigationModel'; interface ListMeetingRecordingsResponse { /** @@ -9,11 +9,11 @@ interface ListMeetingRecordingsResponse { /** */ - paging?: MeetingRecordingsPagingInfo; + paging?: EnumeratedPagingModel; /** */ - navigation?: MeetingRecordingsNavigationInfo; + navigation?: PageNavigationModel; } export default ListMeetingRecordingsResponse; diff --git a/packages/core/src/definitions/ListSocialMessagingContentsParameters.ts b/packages/core/src/definitions/ListSocialMessagingContentsParameters.ts new file mode 100644 index 000000000..12cbfce4e --- /dev/null +++ b/packages/core/src/definitions/ListSocialMessagingContentsParameters.ts @@ -0,0 +1,85 @@ +/** + * Query parameters for operation listSocialMessagingContents + */ +interface ListSocialMessagingContentsParameters { + /** + * Filter based on the specified intervention identifiers + * Example: 7f946431b6eebffafae642cc,re946431b6eebffafae642cc + */ + interventionIds?: string[]; + + /** + * Filter based on the specified identity identifiers + * Example: 7f946431b6eebffafae642cc,re946431b6eebffafae642cc + */ + authorIdentityIds?: string[]; + + /** + * Filter based on the specified identity group identifiers + * Example: 7f946431b6eebffafae642cc,re946431b6eebffafae642cc + */ + authorIdentityGroupIds?: string[]; + + /** + * Filter based on the specified channel identifiers + * Example: 7f946431b6eebffafae642cc + */ + channelIds?: string[]; + + /** + * Direction of the content. + * + * * Incoming contents are received from a channel. + * * Outgoing contents are exported to a channel. + * Example: Incoming + */ + contentDirection?: 'Incoming' | 'Outgoing'; + + /** + * Filter based on the specified thread identifiers + * Example: 7f946431b6eebffafae642cc + */ + threadIds?: string[]; + + /** + * Filter based on the specified text(s). Provided multiple times, the values are ANDed + */ + text?: string[]; + + /** + * Filter for specified status + */ + status?: ('New' | 'Assigned' | 'Replied' | 'UserReply' | 'UserInitiated' | 'Ignored')[]; + + /** + * Ordering by creationTime and lastModifiedTime is descending by default. + * Example: +creationTime + * Default: -creationTime + */ + orderBy?: + | '-creationTime' + | '+creationTime' + | 'creationTime' + | '-lastModifiedTime' + | '+lastModifiedTime' + | 'lastModifiedTime'; + + /** + * The token indicating the particular page of the result set to be retrieved. + * If omitted the first page will be returned. + */ + pageToken?: string; + + /** + * The number of items per page. If provided value in the request + * is greater than a maximum, the maximum value is applied + * Maximum: 1000 + * Minimum: 1 + * Format: int32 + * Example: 100 + * Default: 100 + */ + perPage?: number; +} + +export default ListSocialMessagingContentsParameters; diff --git a/packages/core/src/definitions/ListSocialMessagingIdentitiesParameters.ts b/packages/core/src/definitions/ListSocialMessagingIdentitiesParameters.ts index 3444b03b0..5507a60fc 100644 --- a/packages/core/src/definitions/ListSocialMessagingIdentitiesParameters.ts +++ b/packages/core/src/definitions/ListSocialMessagingIdentitiesParameters.ts @@ -3,15 +3,20 @@ */ interface ListSocialMessagingIdentitiesParameters { /** - * Filter based on the specified `sourceId` + * Filter based on the specified channelId. */ - sourceId?: string; + channelId?: string; /** * Filter based on the specified `identityGroupIds` (separated by commas) */ identityGroupIds?: string[]; + /** + * Either Agent or Customer + */ + identityType?: 'Agent' | 'Customer'; + /** * Filter based on the specified `userId` */ @@ -23,11 +28,17 @@ interface ListSocialMessagingIdentitiesParameters { uuid?: string; /** - * Ordering by creationTime is descending by default. + * Ordering by creationTime and lastModifiedTime is descending by default. * Example: +creationTime * Default: -creationTime */ - orderBy?: '-creationTime' | '+creationTime' | 'creationTime'; + orderBy?: + | '-creationTime' + | '+creationTime' + | 'creationTime' + | '-lastModifiedTime' + | '+lastModifiedTime' + | 'lastModifiedTime'; /** * The token indicating the particular page of the result set to be retrieved. diff --git a/packages/core/src/definitions/LocationUpdatesEmergencyAddressInfoRequest.ts b/packages/core/src/definitions/LocationUpdatesEmergencyAddressInfoRequest.ts index bf738103a..b978bbabb 100644 --- a/packages/core/src/definitions/LocationUpdatesEmergencyAddressInfoRequest.ts +++ b/packages/core/src/definitions/LocationUpdatesEmergencyAddressInfoRequest.ts @@ -15,7 +15,8 @@ interface LocationUpdatesEmergencyAddressInfoRequest { countryId?: string; /** - * ISO code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ countryIsoCode?: string; diff --git a/packages/core/src/definitions/MeetingRecordingsNavigationInfo.ts b/packages/core/src/definitions/MeetingRecordingsNavigationInfo.ts deleted file mode 100644 index 277f620ba..000000000 --- a/packages/core/src/definitions/MeetingRecordingsNavigationInfo.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type MeetingRecordingsNavigationInfoUri from './MeetingRecordingsNavigationInfoUri'; - -interface MeetingRecordingsNavigationInfo { - /** - */ - firstPage?: MeetingRecordingsNavigationInfoUri; - - /** - */ - nextPage?: MeetingRecordingsNavigationInfoUri; - - /** - */ - previousPage?: MeetingRecordingsNavigationInfoUri; - - /** - */ - lastPage?: MeetingRecordingsNavigationInfoUri; -} - -export default MeetingRecordingsNavigationInfo; diff --git a/packages/core/src/definitions/MeetingRecordingsNavigationInfoUri.ts b/packages/core/src/definitions/MeetingRecordingsNavigationInfoUri.ts deleted file mode 100644 index 5e2cfc155..000000000 --- a/packages/core/src/definitions/MeetingRecordingsNavigationInfoUri.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Canonical URI for the corresponding page of the list - */ -interface MeetingRecordingsNavigationInfoUri { - /** - * Format: uri - */ - uri?: string; -} - -export default MeetingRecordingsNavigationInfoUri; diff --git a/packages/core/src/definitions/MeetingRecordingsPagingInfo.ts b/packages/core/src/definitions/MeetingRecordingsPagingInfo.ts deleted file mode 100644 index ccaf2e5b6..000000000 --- a/packages/core/src/definitions/MeetingRecordingsPagingInfo.ts +++ /dev/null @@ -1,39 +0,0 @@ -interface MeetingRecordingsPagingInfo { - /** - * The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) - * Format: int32 - */ - page?: number; - - /** - * Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied - * Format: int32 - */ - perPage?: number; - - /** - * The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty - * Format: int32 - */ - pageStart?: number; - - /** - * The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty - * Format: int32 - */ - pageEnd?: number; - - /** - * The total number of pages in a dataset. May be omitted for some resources due to performance reasons - * Format: int32 - */ - totalPages?: number; - - /** - * The total number of elements in a dataset. May be omitted for some resource due to performance reasons - * Format: int32 - */ - totalElements?: number; -} - -export default MeetingRecordingsPagingInfo; diff --git a/packages/core/src/definitions/MeetingsCountryResource.ts b/packages/core/src/definitions/MeetingsCountryResource.ts index fbd3e273b..6de32cc01 100644 --- a/packages/core/src/definitions/MeetingsCountryResource.ts +++ b/packages/core/src/definitions/MeetingsCountryResource.ts @@ -13,10 +13,16 @@ interface MeetingsCountryResource { name?: string; /** + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ 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 also [Calling Codes](http://en.wikipedia.org/wiki/List_of_country_calling_codes) */ callingCode?: string; diff --git a/packages/core/src/definitions/MeetingsNavigationInfo.ts b/packages/core/src/definitions/MeetingsNavigationInfo.ts deleted file mode 100644 index ed7dde5a2..000000000 --- a/packages/core/src/definitions/MeetingsNavigationInfo.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type MeetingsNavigationInfoUri from './MeetingsNavigationInfoUri'; - -interface MeetingsNavigationInfo { - /** - */ - nextPage?: MeetingsNavigationInfoUri; - - /** - */ - previousPage?: MeetingsNavigationInfoUri; - - /** - */ - firstPage?: MeetingsNavigationInfoUri; - - /** - */ - lastPage?: MeetingsNavigationInfoUri; -} - -export default MeetingsNavigationInfo; diff --git a/packages/core/src/definitions/MeetingsNavigationInfoUri.ts b/packages/core/src/definitions/MeetingsNavigationInfoUri.ts deleted file mode 100644 index 0f45f8599..000000000 --- a/packages/core/src/definitions/MeetingsNavigationInfoUri.ts +++ /dev/null @@ -1,8 +0,0 @@ -interface MeetingsNavigationInfoUri { - /** - * Format: uri - */ - uri?: string; -} - -export default MeetingsNavigationInfoUri; diff --git a/packages/core/src/definitions/MeetingsPagingInfo.ts b/packages/core/src/definitions/MeetingsPagingInfo.ts deleted file mode 100644 index cfe638605..000000000 --- a/packages/core/src/definitions/MeetingsPagingInfo.ts +++ /dev/null @@ -1,33 +0,0 @@ -interface MeetingsPagingInfo { - /** - * Format: int32 - */ - page?: number; - - /** - * Format: int32 - */ - totalPages?: number; - - /** - * Format: int32 - */ - perPage?: number; - - /** - * Format: int32 - */ - totalElements?: number; - - /** - * Format: int32 - */ - pageStart?: number; - - /** - * Format: int32 - */ - pageEnd?: number; -} - -export default MeetingsPagingInfo; diff --git a/packages/core/src/definitions/MeetingsResource.ts b/packages/core/src/definitions/MeetingsResource.ts index 63960042d..e1c408aed 100644 --- a/packages/core/src/definitions/MeetingsResource.ts +++ b/packages/core/src/definitions/MeetingsResource.ts @@ -1,6 +1,6 @@ import type MeetingResponseResource from './MeetingResponseResource'; -import type MeetingsPagingInfo from './MeetingsPagingInfo'; -import type MeetingsNavigationInfo from './MeetingsNavigationInfo'; +import type EnumeratedPagingModel from './EnumeratedPagingModel'; +import type PageNavigationModel from './PageNavigationModel'; interface MeetingsResource { /** @@ -14,11 +14,11 @@ interface MeetingsResource { /** */ - paging?: MeetingsPagingInfo; + paging?: EnumeratedPagingModel; /** */ - navigation?: MeetingsNavigationInfo; + navigation?: PageNavigationModel; } export default MeetingsResource; diff --git a/packages/core/src/definitions/MessageListResponse.ts b/packages/core/src/definitions/MessageListResponse.ts index b40af33a8..28395c583 100644 --- a/packages/core/src/definitions/MessageListResponse.ts +++ b/packages/core/src/definitions/MessageListResponse.ts @@ -1,5 +1,5 @@ import type MessageListMessageResponse from './MessageListMessageResponse'; -import type PagingResource from './PagingResource'; +import type NonEnumeratedPagingModel from './NonEnumeratedPagingModel'; /** * List of messages retrieved for an account and other filter criteria such as `batchId` and `fromPhoneNumber` specified in the request @@ -12,7 +12,7 @@ interface MessageListResponse { /** */ - paging?: PagingResource; + paging?: NonEnumeratedPagingModel; } export default MessageListResponse; diff --git a/packages/core/src/definitions/MessageTemplateInfo.ts b/packages/core/src/definitions/MessageTemplateInfo.ts new file mode 100644 index 000000000..d67480ffc --- /dev/null +++ b/packages/core/src/definitions/MessageTemplateInfo.ts @@ -0,0 +1,12 @@ +/** + * Text message template information + */ +interface MessageTemplateInfo { + /** + * Text of a message template. Maximum length is 1000 symbols (2-byte UTF-16 encoded) + * Required + */ + text?: string; +} + +export default MessageTemplateInfo; diff --git a/packages/core/src/definitions/MessageTemplateRequest.ts b/packages/core/src/definitions/MessageTemplateRequest.ts index 69b9d32b0..bfda2d967 100644 --- a/packages/core/src/definitions/MessageTemplateRequest.ts +++ b/packages/core/src/definitions/MessageTemplateRequest.ts @@ -1,4 +1,4 @@ -import type TemplateInfo from './TemplateInfo'; +import type MessageTemplateInfo from './MessageTemplateInfo'; import type Site from './Site'; interface MessageTemplateRequest { @@ -11,7 +11,7 @@ interface MessageTemplateRequest { /** * Required */ - body?: TemplateInfo; + body?: MessageTemplateInfo; /** */ diff --git a/packages/core/src/definitions/MessageTemplateResponse.ts b/packages/core/src/definitions/MessageTemplateResponse.ts index d03466ea8..fad1c4200 100644 --- a/packages/core/src/definitions/MessageTemplateResponse.ts +++ b/packages/core/src/definitions/MessageTemplateResponse.ts @@ -1,4 +1,4 @@ -import type TemplateInfo from './TemplateInfo'; +import type MessageTemplateInfo from './MessageTemplateInfo'; import type Site from './Site'; interface MessageTemplateResponse { @@ -14,7 +14,7 @@ interface MessageTemplateResponse { /** */ - body?: TemplateInfo; + body?: MessageTemplateInfo; /** * Specifies if a template is available on a user (Personal) or a company (Company) level diff --git a/packages/core/src/definitions/MessageTemplateUpdateRequest.ts b/packages/core/src/definitions/MessageTemplateUpdateRequest.ts index 3f64257d5..de1c30d08 100644 --- a/packages/core/src/definitions/MessageTemplateUpdateRequest.ts +++ b/packages/core/src/definitions/MessageTemplateUpdateRequest.ts @@ -1,4 +1,4 @@ -import type TemplateInfo from './TemplateInfo'; +import type MessageTemplateInfo from './MessageTemplateInfo'; import type Site from './Site'; interface MessageTemplateUpdateRequest { @@ -10,7 +10,7 @@ interface MessageTemplateUpdateRequest { /** * Required */ - body?: TemplateInfo; + body?: MessageTemplateInfo; /** */ diff --git a/packages/core/src/definitions/MetaData.ts b/packages/core/src/definitions/MetaData.ts new file mode 100644 index 000000000..cb3f324e7 --- /dev/null +++ b/packages/core/src/definitions/MetaData.ts @@ -0,0 +1,14 @@ +import type MetaDataValues from './MetaDataValues'; + +/** + * Call metadata. + */ +interface MetaData { + /** + * Identifier of metadata category + * Required + */ + values?: MetaDataValues[]; +} + +export default MetaData; diff --git a/packages/core/src/definitions/MetaDataValues.ts b/packages/core/src/definitions/MetaDataValues.ts new file mode 100644 index 000000000..a9bdab1b2 --- /dev/null +++ b/packages/core/src/definitions/MetaDataValues.ts @@ -0,0 +1,13 @@ +interface MetaDataValues { + /** + * Unique identifier + */ + id?: string; + + /** + * Value + */ + value?: string; +} + +export default MetaDataValues; diff --git a/packages/core/src/definitions/MissedCallExtensionInfoExternalNumber.ts b/packages/core/src/definitions/MissedCallExtensionInfoExternalNumber.ts index 27cc408d5..d961f1cfd 100644 --- a/packages/core/src/definitions/MissedCallExtensionInfoExternalNumber.ts +++ b/packages/core/src/definitions/MissedCallExtensionInfoExternalNumber.ts @@ -3,7 +3,7 @@ */ interface MissedCallExtensionInfoExternalNumber { /** - * Phone number to which the call is forwarded. In addition to common [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx, 1700yyyy; where `xxxxxxxxxxx` is a phone number in e.164 format (without '+' sign) and `yyyy` is an external short extension number. Maximum number of digits is 15 + * Phone number to which the call is forwarded. In addition to common [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx, 1700yyyy; where `xxxxxxxxxxx` is a phone number in E.164 format (without '+' sign) and `yyyy` is an external short extension number. Maximum number of digits is 15 */ phoneNumber?: string; } diff --git a/packages/core/src/definitions/OptOutListResponse.ts b/packages/core/src/definitions/OptOutListResponse.ts index 2dd77ed5e..ac4fb76db 100644 --- a/packages/core/src/definitions/OptOutListResponse.ts +++ b/packages/core/src/definitions/OptOutListResponse.ts @@ -1,5 +1,5 @@ import type OptOutResponse from './OptOutResponse'; -import type PagingResource from './PagingResource'; +import type NonEnumeratedPagingModel from './NonEnumeratedPagingModel'; /** * The list of opt outs @@ -12,7 +12,7 @@ interface OptOutListResponse { /** */ - paging?: PagingResource; + paging?: NonEnumeratedPagingModel; } export default OptOutListResponse; diff --git a/packages/core/src/definitions/OtpTokenRequest.ts b/packages/core/src/definitions/OtpTokenRequest.ts index ee7f554b1..176266440 100644 --- a/packages/core/src/definitions/OtpTokenRequest.ts +++ b/packages/core/src/definitions/OtpTokenRequest.ts @@ -1,9 +1,12 @@ /** - * Token endpoint request parameters used in the "One-time Password" (OTP) authorization flow with the `otp` grant type + * Token endpoint request parameters used in the "One-time Password" (OTP) authorization flow + * with the `otp` grant type + * */ interface OtpTokenRequest { /** * Grant type + * Required */ grant_type?: 'otp'; diff --git a/packages/core/src/definitions/PagingResource.ts b/packages/core/src/definitions/PagingResource.ts deleted file mode 100644 index 456502c7d..000000000 --- a/packages/core/src/definitions/PagingResource.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Pagination details - */ -interface PagingResource { - /** - * Page token of the current response list - * Example: pgt1 - */ - pageToken?: string; - - /** - * Number of records per page - * Format: int32 - * Example: 3 - */ - perPage?: number; - - /** - * First page token of the current filter criteria - * Example: fpgt1 - */ - firstPageToken?: string; - - /** - * Previous page token of the current filter criteria - * Example: lpgt1 - */ - previousPageToken?: string; - - /** - * Next page token of the current filter criteria - * Example: npgt1 - */ - nextPageToken?: string; -} - -export default PagingResource; diff --git a/packages/core/src/definitions/PhoneNumberInfoIntId.ts b/packages/core/src/definitions/PhoneNumberInfoIntId.ts index c99b0f453..5d088b6c7 100644 --- a/packages/core/src/definitions/PhoneNumberInfoIntId.ts +++ b/packages/core/src/definitions/PhoneNumberInfoIntId.ts @@ -48,9 +48,9 @@ interface PhoneNumberInfoIntId { status?: string; /** - * Phone number type + * Type of a phone number */ - type?: 'VoiceFax' | 'FaxOnly' | 'VoiceOnly'; + type?: 'VoiceFax' | 'VoiceOnly' | 'FaxOnly'; /** * Usage type of the phone number diff --git a/packages/core/src/definitions/ReadDirectoryEntryParameters.ts b/packages/core/src/definitions/ReadDirectoryEntryParameters.ts new file mode 100644 index 000000000..ed4ecad99 --- /dev/null +++ b/packages/core/src/definitions/ReadDirectoryEntryParameters.ts @@ -0,0 +1,12 @@ +/** + * Query parameters for operation readDirectoryEntry + */ +interface ReadDirectoryEntryParameters { + /** + * Flag to enable cross-site limitation checking + * Example: true + */ + accessibleSitesOnly?: boolean; +} + +export default ReadDirectoryEntryParameters; diff --git a/packages/core/src/definitions/RefreshTokenRequest.ts b/packages/core/src/definitions/RefreshTokenRequest.ts index 01125534b..39a43cea7 100644 --- a/packages/core/src/definitions/RefreshTokenRequest.ts +++ b/packages/core/src/definitions/RefreshTokenRequest.ts @@ -6,6 +6,7 @@ interface RefreshTokenRequest { /** * Grant type + * Required */ grant_type?: 'refresh_token'; diff --git a/packages/core/src/definitions/RegSessionModel.ts b/packages/core/src/definitions/RegSessionModel.ts index eb4c6da0f..4c2520e42 100644 --- a/packages/core/src/definitions/RegSessionModel.ts +++ b/packages/core/src/definitions/RegSessionModel.ts @@ -37,6 +37,13 @@ interface RegSessionModel { */ registrantCount?: number; + /** + * The current number of post webinar registrants + * Format: int32 + * Example: 10 + */ + postWebinarRegistrantCount?: number; + /** * Indicates that there are non-test registrants * Required diff --git a/packages/core/src/definitions/RegSessionModelSettings.ts b/packages/core/src/definitions/RegSessionModelSettings.ts index 8548edc05..c758bb17e 100644 --- a/packages/core/src/definitions/RegSessionModelSettings.ts +++ b/packages/core/src/definitions/RegSessionModelSettings.ts @@ -41,6 +41,17 @@ interface RegSessionModelSettings { * Indicates that recording exists for the session. */ recordingExist?: boolean; + + /** + * Indicates that post webinar registration will be opened automatically when webinar ends. + */ + autoOpenPostWebinarRegistration?: boolean; + + /** + * The time after which the post webinar will be closed automatically. + * Format: date-time + */ + postWebinarRegistrationClosingTime?: string; } export default RegSessionModelSettings; diff --git a/packages/core/src/definitions/RegionalSettings.ts b/packages/core/src/definitions/RegionalSettings.ts index 95fd3e24a..dae1ba455 100644 --- a/packages/core/src/definitions/RegionalSettings.ts +++ b/packages/core/src/definitions/RegionalSettings.ts @@ -31,7 +31,8 @@ interface RegionalSettings { formattingLocale?: FormattingLocaleInfo; /** - * Time format setting. The default value is '12h' = ['12h', '24h'] + * Time format (12-hours or 24-hours). + * Default: 12h */ timeFormat?: '12h' | '24h'; } diff --git a/packages/core/src/definitions/RolesCountryResource.ts b/packages/core/src/definitions/RolesCountryResource.ts index 05245a088..8bf8294df 100644 --- a/packages/core/src/definitions/RolesCountryResource.ts +++ b/packages/core/src/definitions/RolesCountryResource.ts @@ -13,10 +13,16 @@ interface RolesCountryResource { name?: string; /** + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ 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 also [Calling Codes](http://en.wikipedia.org/wiki/List_of_country_calling_codes) */ callingCode?: string; diff --git a/packages/core/src/definitions/RolesRegionalSettingsResource.ts b/packages/core/src/definitions/RolesRegionalSettingsResource.ts index 0cd2b3bae..1c0ef4011 100644 --- a/packages/core/src/definitions/RolesRegionalSettingsResource.ts +++ b/packages/core/src/definitions/RolesRegionalSettingsResource.ts @@ -25,6 +25,8 @@ interface RolesRegionalSettingsResource { formattingLocale?: RolesLanguageResource; /** + * Time format (12-hours or 24-hours). + * Default: 12h */ timeFormat?: '12h' | '24h'; diff --git a/packages/core/src/definitions/RopcTokenRequest.ts b/packages/core/src/definitions/RopcTokenRequest.ts index 205b72f7b..488a9eff9 100644 --- a/packages/core/src/definitions/RopcTokenRequest.ts +++ b/packages/core/src/definitions/RopcTokenRequest.ts @@ -6,6 +6,7 @@ interface RopcTokenRequest { /** * Grant type + * Required */ grant_type?: 'password'; diff --git a/packages/core/src/definitions/SearchDirectoryEntriesParameters.ts b/packages/core/src/definitions/SearchDirectoryEntriesParameters.ts index 4c4d9c2dc..4d2df20d9 100644 --- a/packages/core/src/definitions/SearchDirectoryEntriesParameters.ts +++ b/packages/core/src/definitions/SearchDirectoryEntriesParameters.ts @@ -2,6 +2,12 @@ * Query parameters for operation searchDirectoryEntries */ interface SearchDirectoryEntriesParameters { + /** + * Flag to enable cross-site limitation checking + * Example: true + */ + accessibleSitesOnly?: boolean; + /** * A list of Account IDs * Example: 400131426008 diff --git a/packages/core/src/definitions/ServiceInfoContractedCountryId.ts b/packages/core/src/definitions/ServiceInfoContractedCountryId.ts new file mode 100644 index 000000000..d1783314c --- /dev/null +++ b/packages/core/src/definitions/ServiceInfoContractedCountryId.ts @@ -0,0 +1,8 @@ +interface ServiceInfoContractedCountryId { + /** + * Internal identifier of a country + */ + id?: string; +} + +export default ServiceInfoContractedCountryId; diff --git a/packages/core/src/definitions/ServiceInfoCountryShortModel.ts b/packages/core/src/definitions/ServiceInfoCountryShortModel.ts deleted file mode 100644 index 2137e3395..000000000 --- a/packages/core/src/definitions/ServiceInfoCountryShortModel.ts +++ /dev/null @@ -1,34 +0,0 @@ -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 index 32d009950..fb28b0cc1 100644 --- a/packages/core/src/definitions/ServiceInfoPlan.ts +++ b/packages/core/src/definitions/ServiceInfoPlan.ts @@ -12,11 +12,6 @@ interface ServiceInfoPlan { */ name?: string; - /** - * Edition of a service plan - */ - edition?: string; - /** */ freemiumProductType?: 'Freyja' | 'Phoenix'; diff --git a/packages/core/src/definitions/ServiceInfoUBrand.ts b/packages/core/src/definitions/ServiceInfoUBrand.ts index e55f014e9..f6f735f26 100644 --- a/packages/core/src/definitions/ServiceInfoUBrand.ts +++ b/packages/core/src/definitions/ServiceInfoUBrand.ts @@ -7,12 +7,6 @@ interface ServiceInfoUBrand { * 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 2b2fd08e3..a55ae1384 100644 --- a/packages/core/src/definitions/ServiceInfoV2.ts +++ b/packages/core/src/definitions/ServiceInfoV2.ts @@ -1,6 +1,6 @@ import type ServiceInfoPackage from './ServiceInfoPackage'; import type ServiceInfoBrand from './ServiceInfoBrand'; -import type ServiceInfoCountryShortModel from './ServiceInfoCountryShortModel'; +import type ServiceInfoContractedCountryId from './ServiceInfoContractedCountryId'; import type ServiceInfoUBrand from './ServiceInfoUBrand'; import type ServiceInfoPlan from './ServiceInfoPlan'; @@ -13,13 +13,17 @@ interface ServiceInfoV2 { */ package?: ServiceInfoPackage; + /** + */ + partnerPackage?: ServiceInfoPackage; + /** */ brand?: ServiceInfoBrand; /** */ - contractedCountry?: ServiceInfoCountryShortModel; + contractedCountry?: ServiceInfoContractedCountryId; /** */ diff --git a/packages/core/src/definitions/SipRegistrationDeviceEmergencyInfoAddress.ts b/packages/core/src/definitions/SipRegistrationDeviceEmergencyInfoAddress.ts index 8910417ab..3678d0ca6 100644 --- a/packages/core/src/definitions/SipRegistrationDeviceEmergencyInfoAddress.ts +++ b/packages/core/src/definitions/SipRegistrationDeviceEmergencyInfoAddress.ts @@ -45,7 +45,8 @@ interface SipRegistrationDeviceEmergencyInfoAddress { countryId?: string; /** - * ISO code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ countryIsoCode?: string; diff --git a/packages/core/src/definitions/SiteInfo.ts b/packages/core/src/definitions/SiteInfo.ts index 1c025c280..35259ae85 100644 --- a/packages/core/src/definitions/SiteInfo.ts +++ b/packages/core/src/definitions/SiteInfo.ts @@ -44,6 +44,11 @@ interface SiteInfo { */ regionalSettings?: RegionalSettings; + /** + * Site access status for cross-site limitation + */ + siteAccess?: 'Limited' | 'Unlimited'; + /** */ operator?: OperatorInfo; diff --git a/packages/core/src/definitions/SiteResource.ts b/packages/core/src/definitions/SiteResource.ts deleted file mode 100644 index 7dcd28af4..000000000 --- a/packages/core/src/definitions/SiteResource.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Site extension information - */ -interface SiteResource { - /** - * Site extension identifier - */ - id?: string; - - /** - * Site extension name - */ - name?: string; -} - -export default SiteResource; diff --git a/packages/core/src/definitions/SiteUpdateRequest.ts b/packages/core/src/definitions/SiteUpdateRequest.ts index 0895e97a6..2fa647025 100644 --- a/packages/core/src/definitions/SiteUpdateRequest.ts +++ b/packages/core/src/definitions/SiteUpdateRequest.ts @@ -37,6 +37,15 @@ interface SiteUpdateRequest { /** */ operator?: OperatorInfo; + + /** + * Site access status for cross-site limitation + */ + siteAccess?: 'Limited' | 'Unlimited'; + + /** + */ + accessibleSiteIds?: string[]; } export default SiteUpdateRequest; diff --git a/packages/core/src/definitions/SmsRequestCountryInfo.ts b/packages/core/src/definitions/SmsRequestCountryInfo.ts index ef3da451b..f3c7cd043 100644 --- a/packages/core/src/definitions/SmsRequestCountryInfo.ts +++ b/packages/core/src/definitions/SmsRequestCountryInfo.ts @@ -8,7 +8,8 @@ interface SmsRequestCountryInfo { id?: string; /** - * ISO 3166-1 alpha-2 code of a country + * Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format + * Example: US */ isoCode?: string; } diff --git a/packages/core/src/definitions/SocMsgContentAttachment.ts b/packages/core/src/definitions/SocMsgContentAttachment.ts new file mode 100644 index 000000000..5f63e3450 --- /dev/null +++ b/packages/core/src/definitions/SocMsgContentAttachment.ts @@ -0,0 +1,86 @@ +interface SocMsgContentAttachment { + /** + * Type of attachment, which is generally a MIME attachment type like `image/jpeg`, etc. + * Security level in RingCX determines what type of attachment is allowed. + * Based on the security level the following attachment types are supported. + * + * *'Strict'* level allows safe extensions below: + * Content name and supported types: + * + * - audio (AAC, MP3, OGG, M4A) + * - image (BMP, GIF, JPG, JPEG, PNG, SVG, WEBP) + * - pdf (PDF) + * - text (CSV, TXT, LOG) + * - video (AVI, FLV, M4V, MKV, MOV, MP4, MPG, QT, WMV) + * - other (AMR, DMS, VCARD, TIF, TIFF, MPEG) + * + * *'Relaxed'* level allows documents: + * Content name and supported types: + * + * - excel (XLS, XLSM, XLSX, XLC, XLT, XLTM, XLTX) + * - presentation (KEY, ODP, OTP) + * - powerpoint (PPS, PPT, PPTX, POT) + * - spreadsheet (Numbers - ODS, OTS) + * - word (DOC, DOCM, DOCX, DOTM, DOTX) + * - word_processing (Pages - ODT, OTT, RTF) + * + * *'Permissive'* level allows all documents. + * + * However, there are no security level restrictions for content posted through the channel + * Example: image/jpeg + */ + contentType?: string; + + /** + * Creation time of the resource. + * Format: date-time + * Example: 2023-02-04T12:43:07Z + */ + creationTime?: string; + + /** + * Specifies if attachment is embedded in content + */ + embedded?: boolean; + + /** + * Filename of attachment + * Example: 0.jpeg + */ + filename?: string; + + /** + * Identifier of the attachment. + * Example: 54085e5b7aa58d8b5d00006c + */ + id?: string; + + /** + * Attachment privacy setting + * Default: true + */ + public?: boolean; + + /** + * Size of attachment + * Format: int32 + * Example: 217571 + */ + size?: number; + + /** + * The time when the last modification was completed. + * Format: date-time + * Example: 2023-02-04T12:43:07Z + */ + lastModifiedTime?: string; + + /** + * Attachment URI + * Format: uri + * Example: https://example.digital.ringcentral.com/files/attachments/54085e5b7aa58d8b5d00006c + */ + uri?: string; +} + +export default SocMsgContentAttachment; diff --git a/packages/core/src/definitions/SocMsgListContentsParameters.ts b/packages/core/src/definitions/SocMsgListContentsParameters.ts deleted file mode 100644 index a3dccace6..000000000 --- a/packages/core/src/definitions/SocMsgListContentsParameters.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Query parameters for operation socMsgListContents - */ -interface SocMsgListContentsParameters { - /** - * Filter based on the specified intervention identifiers. - * Example: 7f946431b6eebffafae642cc,re946431b6eebffafae642cc - */ - intervention?: string[]; - - /** - * Filter based on the specified identity identifiers. - * Example: 7f946431b6eebffafae642cc,re946431b6eebffafae642cc - */ - identity?: string[]; - - /** - * Filter based on the specified identity group identifiers. - * Example: 7f946431b6eebffafae642cc,re946431b6eebffafae642cc - */ - identityGroup?: string[]; - - /** - * Filter based on the specified channel identifiers. - * Example: 7f946431b6eebffafae642cc - */ - source?: string[]; - - /** - * Filter based on the specified thread identifiers. - * Example: 7f946431b6eebffafae642cc - */ - thread?: string[]; - - /** - * Filter based on the specified text(s). Provided multiple times, the values are ANDed. - */ - text?: string[]; - - /** - * Filter for specified status. - */ - status?: ('New' | 'Assigned' | 'Replied' | 'UserReply' | 'UserInitiated' | 'Ignored')[]; - - /** - * Ordering by creationTime is descending by default. - * Example: +creationTime - * Default: -creationTime - */ - orderBy?: '-creationTime' | '+creationTime' | 'creationTime'; - - /** - * The token indicating the particular page of the result set to be retrieved. - * If omitted the first page will be returned. - */ - pageToken?: string; - - /** - * The number of items per page. If provided value in the request - * is greater than a maximum, the maximum value is applied - * Maximum: 1000 - * Minimum: 1 - * Format: int32 - * Example: 100 - * Default: 100 - */ - perPage?: number; -} - -export default SocMsgListContentsParameters; diff --git a/packages/core/src/definitions/TMCreateTaskRequest.ts b/packages/core/src/definitions/TMCreateTaskRequest.ts index c08e18eac..a05b58b2b 100644 --- a/packages/core/src/definitions/TMCreateTaskRequest.ts +++ b/packages/core/src/definitions/TMCreateTaskRequest.ts @@ -1,6 +1,6 @@ import type TMCreateTaskRequestAssignees from './TMCreateTaskRequestAssignees'; import type TaskRecurrenceInfo from './TaskRecurrenceInfo'; -import type TMAttachmentInfo from './TMAttachmentInfo'; +import type TaskAttachment from './TaskAttachment'; interface TMCreateTaskRequest { /** @@ -52,7 +52,7 @@ interface TMCreateTaskRequest { /** */ - attachments?: TMAttachmentInfo[]; + attachments?: TaskAttachment[]; } export default TMCreateTaskRequest; diff --git a/packages/core/src/definitions/TaxLocation.ts b/packages/core/src/definitions/TaxLocation.ts new file mode 100644 index 000000000..5d2d2e875 --- /dev/null +++ b/packages/core/src/definitions/TaxLocation.ts @@ -0,0 +1,45 @@ +import type PostalAddress from './PostalAddress'; + +interface TaxLocation { + /** + * Internal identifier of a tax location + * Required + * Format: int64 + * Example: 981086004 + */ + id?: number; + + /** + * Tax location name + * Required + * Example: Tax_Location + */ + name?: string; + + /** + * Type of the location object. Only 'TaxLocation' is currently supported for POST method + * Required + * Example: TaxLocation + */ + type?: 'BillingAddress' | 'TaxLocation' | 'Site'; + + /** + * Unique identifier of a tax location in the partner's system + * Example: 4587834894962936 + */ + externalLocationId?: string; + + /** + * Effective date in the ISO 8601 (`YYYY-MM-DDThh:mm:ssTZD`) format, including date, time, and timezone + * Format: date-time + * Example: 2022-06-05T10:11:12Z + */ + effectiveDate?: string; + + /** + * Required + */ + address?: PostalAddress; +} + +export default TaxLocation; diff --git a/packages/core/src/definitions/TemplateInfo.ts b/packages/core/src/definitions/TemplateInfo.ts index 1250b666e..18d5f07df 100644 --- a/packages/core/src/definitions/TemplateInfo.ts +++ b/packages/core/src/definitions/TemplateInfo.ts @@ -1,12 +1,35 @@ -/** - * Text message template information - */ interface TemplateInfo { /** - * Text of a message template. Maximum length is 1000 symbols (2-byte UTF-16 encoded) - * Required + * Link to a template + * Format: uri */ - text?: string; + 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; } export default TemplateInfo; diff --git a/packages/core/src/definitions/UnconditionalForwardingInfo.ts b/packages/core/src/definitions/UnconditionalForwardingInfo.ts index db21da2a5..303c723f7 100644 --- a/packages/core/src/definitions/UnconditionalForwardingInfo.ts +++ b/packages/core/src/definitions/UnconditionalForwardingInfo.ts @@ -6,9 +6,9 @@ interface UnconditionalForwardingInfo { /** * Phone number to which the call is forwarded. In addition to - * common e.164 format, the following number patterns are supported: 11xxxxxxxxxxx, + * common E.164 format, the following number patterns are supported: 11xxxxxxxxxxx, * 444xxxxxxxxxxx, 616xxxxxxxxxxx, 1700yyyy; where xxxxxxxxxxx is a phone number in - * e.164 format (without '+' sign) and yyyy is an external short extension number. + * E.164 format (without '+' sign) and yyyy is an external short extension number. * Max number of digits is 15 */ phoneNumber?: string; diff --git a/packages/core/src/definitions/UserAnsweringRuleList.ts b/packages/core/src/definitions/UserAnsweringRuleList.ts index 150f03edb..17cd81b10 100644 --- a/packages/core/src/definitions/UserAnsweringRuleList.ts +++ b/packages/core/src/definitions/UserAnsweringRuleList.ts @@ -1,4 +1,4 @@ -import type AnsweringRuleInfo from './AnsweringRuleInfo'; +import type CallHandlingRuleInfo from './CallHandlingRuleInfo'; import type EnumeratedPagingModel from './EnumeratedPagingModel'; import type PageNavigationModel from './PageNavigationModel'; @@ -13,7 +13,7 @@ interface UserAnsweringRuleList { /** * List of answering rules */ - records?: AnsweringRuleInfo[]; + records?: CallHandlingRuleInfo[]; /** */ diff --git a/packages/core/src/definitions/UserPhoneNumberInfo.ts b/packages/core/src/definitions/UserPhoneNumberInfo.ts index 3a37c87d9..d95478851 100644 --- a/packages/core/src/definitions/UserPhoneNumberInfo.ts +++ b/packages/core/src/definitions/UserPhoneNumberInfo.ts @@ -60,16 +60,16 @@ interface UserPhoneNumberInfo { primary?: boolean; /** - * Status of a phone number. If the value is 'Normal', the phone + * 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 */ - status?: 'Normal' | 'Pending' | 'PortedIn' | 'Temporary'; + status?: 'Normal' | 'Pending' | 'PortedIn' | 'Temporary' | 'Unknown'; /** - * Phone number type + * Type of a phone number */ - type?: 'VoiceFax' | 'FaxOnly' | 'VoiceOnly'; + type?: 'VoiceFax' | 'VoiceOnly' | 'FaxOnly'; /** * Extension subtype, if applicable. For any unsupported subtypes the 'Unknown' value will be returned diff --git a/packages/core/src/definitions/UserTransitionInfo.ts b/packages/core/src/definitions/UserTransitionInfo.ts index 0ce5c5cc2..4e55dc73e 100644 --- a/packages/core/src/definitions/UserTransitionInfo.ts +++ b/packages/core/src/definitions/UserTransitionInfo.ts @@ -1,5 +1,5 @@ /** - * For NotActivated extensions only. Welcome email settings + * For `NotActivated` extensions only. Welcome email settings * */ interface UserTransitionInfo { @@ -11,7 +11,7 @@ interface UserTransitionInfo { /** * Specifies if a welcome/activation email is sent to the new users (within extension status changing from - * 'Unassigned' to 'NotActivated/Disabled') + * `Unassigned` to `NotActivated/Disabled`) */ sendWelcomeEmail?: boolean; } diff --git a/packages/core/src/paths/Cx/SocialMessaging/V1/Contents/index.ts b/packages/core/src/paths/Cx/SocialMessaging/V1/Contents/index.ts index c65316977..f43a987a2 100644 --- a/packages/core/src/paths/Cx/SocialMessaging/V1/Contents/index.ts +++ b/packages/core/src/paths/Cx/SocialMessaging/V1/Contents/index.ts @@ -1,5 +1,5 @@ -import type CreateContentRequest from '../../../../../definitions/CreateContentRequest'; -import type SocMsgListContentsParameters from '../../../../../definitions/SocMsgListContentsParameters'; +import type CreateSocialMessagingContentRequest from '../../../../../definitions/CreateSocialMessagingContentRequest'; +import type ListSocialMessagingContentsParameters from '../../../../../definitions/ListSocialMessagingContentsParameters'; import type { RingCentralInterface, ParentInterface, RestRequestConfig } from '../../../../../types'; class Index { @@ -19,15 +19,14 @@ class Index { return `${this._parent.path()}/contents`; } /** - * List contents by creation date. The default creation order is descending. + * Returns a list of social messaging contents ordered 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 in request 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/contents @@ -35,7 +34,7 @@ class Index { * App Permission: SocialMessaging */ public async list( - queryParams?: SocMsgListContentsParameters, + queryParams?: ListSocialMessagingContentsParameters, restRequestConfig?: RestRequestConfig, ): Promise { const r = await this.rc.get(this.path(false), queryParams, restRequestConfig); @@ -43,26 +42,26 @@ class Index { } /** - * Creates new content for use in discussions. + * Creates the new social messaging content for use in discussions. * - * This request is used to reply to already-posted content or to initiate a discussion. If authorized, the + * This request is used to reply to an already posted content or to initiate a discussion. If authorized, the * authenticated user will be used as the content author. * * Content will be created and pushed asynchronously to the channel. When the content is successfully pushed to - * the channel, the Content.Exported event will be reported. + * the channel, the `Content.Exported` event will be reported. * - * The account context of this request is determined by the RC Account Id associated with the access token provided + * The account context of this request is determined by the RC Account ID associated with the access token provided * in the Authorization header. * * Replying to customer content is usually possible unless the channel or conversation is read only. Composing * content, on the contrary, depends on the channel itself. * - * * The channel may not support it (and be purely reactive like Instagram, Messenger, etc.). + * - The channel may not support it and be purely reactive like Instagram, Messenger, etc. * - * * Some channels (usually public accounts like Twitter or Facebook pages) allow for the publishing of content + * - Some channels (usually public accounts, like Twitter or Facebook pages) allow content publishing * without targeting specific individuals. * - * * Some channels (usually non-public media) require specific targeting (phone number for SMS, email address + * - Some channels (usually non-public media) require specific targeting (phone number for SMS, email address * for email, customer_id, etc.) to be able to create content. This is channel-specific and detailed under the * generic parameters. * @@ -72,16 +71,20 @@ class Index { * App Permission: SocialMessaging */ public async post( - createContentRequest: CreateContentRequest, + createSocialMessagingContentRequest: CreateSocialMessagingContentRequest, restRequestConfig?: RestRequestConfig, ): Promise { - const r = await this.rc.post(this.path(false), createContentRequest, undefined, restRequestConfig); + const r = await this.rc.post( + this.path(false), + createSocialMessagingContentRequest, + undefined, + restRequestConfig, + ); return r.data; } /** - * Retrieves the content from the given id. - * + * Returns the social messaging content by ID specified in path. * HTTP Method: get * Endpoint: /cx/social-messaging/v1/contents/{contentId} * Rate Limit Group: Light 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 4498a8953..51dc21f5d 100644 --- a/packages/core/src/paths/Cx/SocialMessaging/V1/Identities/index.ts +++ b/packages/core/src/paths/Cx/SocialMessaging/V1/Identities/index.ts @@ -18,7 +18,7 @@ class Index { return `${this._parent.path()}/identities`; } /** - * Returns a list of identities filtered by creation date. The default order is descending. + * Returns a list of identities ordered 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. diff --git a/packages/core/src/paths/Restapi/Account/CallQueues/index.ts b/packages/core/src/paths/Restapi/Account/CallQueues/index.ts index 9e66bf82b..454f6b9de 100644 --- a/packages/core/src/paths/Restapi/Account/CallQueues/index.ts +++ b/packages/core/src/paths/Restapi/Account/CallQueues/index.ts @@ -1,8 +1,9 @@ import BulkAssign from './BulkAssign'; import Presence from './Presence'; import Members from './Members'; +import type CallQueueDetailsForUpdate from '../../../../definitions/CallQueueDetailsForUpdate'; import type CallQueueDetails from '../../../../definitions/CallQueueDetails'; -import type CallQueues from '../../../../definitions/CallQueues'; +import type CallQueueList from '../../../../definitions/CallQueueList'; import type ListCallQueuesParameters from '../../../../definitions/ListCallQueuesParameters'; import type { RingCentralInterface, ParentInterface, RestRequestConfig } from '../../../../types'; @@ -33,8 +34,8 @@ class Index { public async list( queryParams?: ListCallQueuesParameters, restRequestConfig?: RestRequestConfig, - ): Promise { - const r = await this.rc.get(this.path(false), queryParams, restRequestConfig); + ): Promise { + const r = await this.rc.get(this.path(false), queryParams, restRequestConfig); return r.data; } @@ -64,13 +65,13 @@ class Index { * User Permission: EditUserInfo */ public async put( - callQueueDetails: CallQueueDetails, + callQueueDetailsForUpdate: CallQueueDetailsForUpdate, restRequestConfig?: RestRequestConfig, ): Promise { if (this.groupId === null) { throw new Error('groupId must be specified.'); } - const r = await this.rc.put(this.path(), callQueueDetails, undefined, restRequestConfig); + const r = await this.rc.put(this.path(), callQueueDetailsForUpdate, undefined, restRequestConfig); return r.data; } diff --git a/packages/core/src/paths/Restapi/Account/Directory/Entries/index.ts b/packages/core/src/paths/Restapi/Account/Directory/Entries/index.ts index f80b2a5be..46c39768a 100644 --- a/packages/core/src/paths/Restapi/Account/Directory/Entries/index.ts +++ b/packages/core/src/paths/Restapi/Account/Directory/Entries/index.ts @@ -1,5 +1,6 @@ import Search from './Search'; import type ContactResource from '../../../../../definitions/ContactResource'; +import type ReadDirectoryEntryParameters from '../../../../../definitions/ReadDirectoryEntryParameters'; import type DirectoryResource from '../../../../../definitions/DirectoryResource'; import type ListDirectoryEntriesParameters from '../../../../../definitions/ListDirectoryEntriesParameters'; import type { RingCentralInterface, ParentInterface, RestRequestConfig } from '../../../../../types'; @@ -42,11 +43,14 @@ class Index { * Rate Limit Group: Medium * App Permission: ReadAccounts */ - public async get(restRequestConfig?: RestRequestConfig): Promise { + public async get( + queryParams?: ReadDirectoryEntryParameters, + restRequestConfig?: RestRequestConfig, + ): Promise { if (this.entryId === null) { throw new Error('entryId must be specified.'); } - const r = await this.rc.get(this.path(), undefined, restRequestConfig); + const r = await this.rc.get(this.path(), queryParams, restRequestConfig); return r.data; } diff --git a/packages/core/src/paths/Restapi/Account/Extension/AnsweringRule/index.ts b/packages/core/src/paths/Restapi/Account/Extension/AnsweringRule/index.ts index 0c07b3ac6..11aa7f3e7 100644 --- a/packages/core/src/paths/Restapi/Account/Extension/AnsweringRule/index.ts +++ b/packages/core/src/paths/Restapi/Account/Extension/AnsweringRule/index.ts @@ -1,5 +1,5 @@ import type UpdateAnsweringRuleRequest from '../../../../../definitions/UpdateAnsweringRuleRequest'; -import type AnsweringRuleInfo from '../../../../../definitions/AnsweringRuleInfo'; +import type CallHandlingRuleInfo from '../../../../../definitions/CallHandlingRuleInfo'; import type ReadAnsweringRuleParameters from '../../../../../definitions/ReadAnsweringRuleParameters'; import type CustomAnsweringRuleInfo from '../../../../../definitions/CustomAnsweringRuleInfo'; import type CreateAnsweringRuleRequest from '../../../../../definitions/CreateAnsweringRuleRequest'; @@ -71,11 +71,11 @@ class Index { public async get( queryParams?: ReadAnsweringRuleParameters, restRequestConfig?: RestRequestConfig, - ): Promise { + ): Promise { if (this.ruleId === null) { throw new Error('ruleId must be specified.'); } - const r = await this.rc.get(this.path(), queryParams, restRequestConfig); + const r = await this.rc.get(this.path(), queryParams, restRequestConfig); return r.data; } @@ -90,11 +90,11 @@ class Index { public async put( updateAnsweringRuleRequest: UpdateAnsweringRuleRequest, restRequestConfig?: RestRequestConfig, - ): Promise { + ): Promise { if (this.ruleId === null) { throw new Error('ruleId must be specified.'); } - const r = await this.rc.put( + const r = await this.rc.put( this.path(), updateAnsweringRuleRequest, undefined, diff --git a/packages/core/src/paths/Restapi/Account/IvrPrompts/Content/index.ts b/packages/core/src/paths/Restapi/Account/IvrPrompts/Content/index.ts index 6782eca91..62145fd99 100644 --- a/packages/core/src/paths/Restapi/Account/IvrPrompts/Content/index.ts +++ b/packages/core/src/paths/Restapi/Account/IvrPrompts/Content/index.ts @@ -14,6 +14,9 @@ class Index { } /** * Returns media content of an IVR prompt by ID. + * + * **This API must be called via media API entry point, e.g. https://media.ringcentral.com** + * * HTTP Method: get * Endpoint: /restapi/{apiVersion}/account/{accountId}/ivr-prompts/{promptId}/content * Rate Limit Group: Heavy diff --git a/packages/core/src/paths/Restapi/V2/Accounts/CostCenters/index.ts b/packages/core/src/paths/Restapi/V2/Accounts/CostCenters/index.ts new file mode 100644 index 000000000..6556cc7e8 --- /dev/null +++ b/packages/core/src/paths/Restapi/V2/Accounts/CostCenters/index.ts @@ -0,0 +1,28 @@ +import type CostCenterList from '../../../../../definitions/CostCenterList'; +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()}/cost-centers`; + } + /** + * Returns the list of cost centers of the account specified in path. + * HTTP Method: get + * Endpoint: /restapi/v2/accounts/{accountId}/cost-centers + * Rate Limit Group: Light + * App Permission: ReadAccounts + * User Permission: CostCenterManagement + */ + 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/V2/Accounts/Extensions/CallFlipNumbers/index.ts b/packages/core/src/paths/Restapi/V2/Accounts/Extensions/CallFlipNumbers/index.ts new file mode 100644 index 000000000..f328f949f --- /dev/null +++ b/packages/core/src/paths/Restapi/V2/Accounts/Extensions/CallFlipNumbers/index.ts @@ -0,0 +1,67 @@ +import type CallFlipNumberListResource from '../../../../../../definitions/CallFlipNumberListResource'; +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()}/call-flip-numbers`; + } + /** + * Returns call flip settings. Call flip destination is an extension level setting. + * The following numbers can be used for call flip: + * + * * User's DL numbers (added/removed automatically by the System) + * * PSTN numbers in E.164 format (added/removed manually by User) + * + * Call flip list is generally limited up to 10 numbers. + * + * **Please note:** This API is only working with the new Communication Handling flow. + * To ensure that please check if the 'NewCallHandlingAndForwarding' feature is supported. + * + * HTTP Method: get + * Endpoint: /restapi/v2/accounts/{accountId}/extensions/{extensionId}/call-flip-numbers + * Rate Limit Group: Light + * App Permission: ReadAccounts + */ + public async get(restRequestConfig?: RestRequestConfig): Promise { + const r = await this.rc.get(this.path(), undefined, restRequestConfig); + return r.data; + } + + /** + * Updates call flip settings. Call flip destination is an extension level setting. + * The following numbers can be used for call flip: + * + * * User's DL numbers (added/removed automatically by the System) + * * PSTN numbers in E.164 format (added/removed manually by User) + * + * Call flip list is generally limited up to 10 numbers. + * + * **Please note:** This API is only working with the new Communication Handling flow. + * To ensure that please check if the 'NewCallHandlingAndForwarding' feature is supported. + * + * HTTP Method: put + * Endpoint: /restapi/v2/accounts/{accountId}/extensions/{extensionId}/call-flip-numbers + * Rate Limit Group: Medium + * App Permission: EditExtensions + */ + public async put( + callFlipNumberListResource: CallFlipNumberListResource, + restRequestConfig?: RestRequestConfig, + ): Promise { + const r = await this.rc.put( + this.path(), + callFlipNumberListResource, + undefined, + restRequestConfig, + ); + return r.data; + } +} +export default Index; diff --git a/packages/core/src/paths/Restapi/V2/Accounts/Extensions/index.ts b/packages/core/src/paths/Restapi/V2/Accounts/Extensions/index.ts index 13143e9d1..039c9b91f 100644 --- a/packages/core/src/paths/Restapi/V2/Accounts/Extensions/index.ts +++ b/packages/core/src/paths/Restapi/V2/Accounts/Extensions/index.ts @@ -1,3 +1,4 @@ +import CallFlipNumbers from './CallFlipNumbers'; import Devices from './Devices'; import type BulkDeleteUsersResponse from '../../../../../definitions/BulkDeleteUsersResponse'; import type BulkDeleteUsersRequest from '../../../../../definitions/BulkDeleteUsersRequest'; @@ -42,5 +43,9 @@ class Index { public devices(deviceId: string | null = null): Devices { return new Devices(this, deviceId); } + + public callFlipNumbers(): CallFlipNumbers { + return new CallFlipNumbers(this); + } } export default Index; diff --git a/packages/core/src/paths/Restapi/V2/Accounts/PhoneNumbers/BulkAdd/index.ts b/packages/core/src/paths/Restapi/V2/Accounts/PhoneNumbers/BulkAdd/index.ts index f3b7cf3fe..3d99033dd 100644 --- a/packages/core/src/paths/Restapi/V2/Accounts/PhoneNumbers/BulkAdd/index.ts +++ b/packages/core/src/paths/Restapi/V2/Accounts/PhoneNumbers/BulkAdd/index.ts @@ -43,7 +43,7 @@ class Index { } /** - * Returns the result of asynchronous operation which adds phone numbers to the account Inventory. + * Returns the result of asynchronous operation which adds phone numbers to the account inventory. * * HTTP Method: get * Endpoint: /restapi/v2/accounts/{accountId}/phone-numbers/bulk-add/{taskId} diff --git a/packages/core/src/paths/Restapi/V2/Accounts/PhoneNumbers/Replace/index.ts b/packages/core/src/paths/Restapi/V2/Accounts/PhoneNumbers/Replace/index.ts index 65612dead..e407212c7 100644 --- a/packages/core/src/paths/Restapi/V2/Accounts/PhoneNumbers/Replace/index.ts +++ b/packages/core/src/paths/Restapi/V2/Accounts/PhoneNumbers/Replace/index.ts @@ -14,7 +14,7 @@ class Index { return `${this._parent.path()}/replace`; } /** - * Replaces (swaps) phone numbers from Inventory with the main, company, direct or company fax numbers. + * Replaces (swaps) phone numbers from inventory with the main, company, direct or company fax numbers. * This method is used to replace temporary numbers when the porting process is complete. * * HTTP Method: post diff --git a/packages/core/src/paths/Restapi/V2/Accounts/PhoneNumbers/index.ts b/packages/core/src/paths/Restapi/V2/Accounts/PhoneNumbers/index.ts index 8f5928cbe..7465b2ac8 100644 --- a/packages/core/src/paths/Restapi/V2/Accounts/PhoneNumbers/index.ts +++ b/packages/core/src/paths/Restapi/V2/Accounts/PhoneNumbers/index.ts @@ -44,10 +44,10 @@ class Index { } /** - * This method can only delete numbers that meet one of the following requirements: - * - numbers that have `"usageType": "Inventory"` - * - `"Forwarded"` numbers - * - `"Forwarded Company"` numbers + * This method can only delete numbers that of the following usage types: + * - `Inventory`, + * - `ForwardedNumber`, + * - `ForwardedCompanyNumber`. * * In other words, this method will not delete numbers which are in use on the account - extension direct numbers, * main number, etc. It is possible to indicate phone numbers to be deleted using their IDs or exact string values @@ -76,8 +76,8 @@ class Index { * Assigns or reassigns a phone number as a company or extension number. * * Assign scenarios supported: - * - from Inventory to a company number; - * - from Inventory to an extension number. + * - from inventory to a company number; + * - from inventory to an extension number. * * Reassign scenarios supported: * - from an extension to another extension; diff --git a/packages/core/src/paths/Restapi/V2/Accounts/index.ts b/packages/core/src/paths/Restapi/V2/Accounts/index.ts index c0719ae87..ca3a95122 100644 --- a/packages/core/src/paths/Restapi/V2/Accounts/index.ts +++ b/packages/core/src/paths/Restapi/V2/Accounts/index.ts @@ -3,6 +3,7 @@ import SendWelcomeEmail from './SendWelcomeEmail'; import BatchProvisioning from './BatchProvisioning'; import DeviceInventory from './DeviceInventory'; import PhoneNumbers from './PhoneNumbers'; +import CostCenters from './CostCenters'; import Extensions from './Extensions'; import Devices from './Devices'; import type AccountInfo from '../../../../definitions/AccountInfo'; @@ -48,6 +49,10 @@ class Index { return new Extensions(this); } + public costCenters(): CostCenters { + return new CostCenters(this); + } + public phoneNumbers(phoneNumberId: string | null = null): PhoneNumbers { return new PhoneNumbers(this, phoneNumberId); } diff --git a/packages/core/src/paths/TeamMessaging/V1/Chats/Posts/index.ts b/packages/core/src/paths/TeamMessaging/V1/Chats/Posts/index.ts index 0c678350e..016c79bb4 100644 --- a/packages/core/src/paths/TeamMessaging/V1/Chats/Posts/index.ts +++ b/packages/core/src/paths/TeamMessaging/V1/Chats/Posts/index.ts @@ -37,7 +37,11 @@ class Index { } /** - * Creates a post in the chat specified in path. Any mention can be added within the `text` attribute of the request body in .md format - `![:Type](id)`, where `type` is one of (Person, Team, File, Note, Task, Event, Link, Card) and `id` is a unique identifier of the mentioned object of the specified type. Attachments of the following types (File, Card, Event, Note) can also be added to a post by passing type and ID of attachment(s) in request body. + * Creates a post in the chat specified in path. Any mention can be added within the `text` attribute of + * the request body in .md format - `![:Type](id)`, where `type` is one of (Person, Team, File, Note, + * Task, Event, Link, Card) and `id` is a unique identifier of the mentioned object of the specified type. + * Attachments can also be added to a post by passing the type and ID of attachment(s) in request body. + * * HTTP Method: post * Endpoint: /team-messaging/v1/chats/{chatId}/posts * Rate Limit Group: Medium diff --git a/packages/core/src/samples.md b/packages/core/src/samples.md index c0a91f7f1..0fddee975 100644 --- a/packages/core/src/samples.md +++ b/packages/core/src/samples.md @@ -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-2.0-/-OpenID-Connect-getToken) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#OAuth-and-OpenID-Connect-getToken) in API Explorer. ## scimListResourceTypes2 @@ -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-2.0-/-OpenID-Connect-revokeToken) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#OAuth-and-OpenID-Connect-revokeToken) in API Explorer. ## readDevice @@ -930,7 +930,7 @@ 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-2.0-/-OpenID-Connect-authorize) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#OAuth-and-OpenID-Connect-authorize) in API Explorer. ## authorize2 @@ -954,7 +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-2.0-/-OpenID-Connect-authorize2) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#OAuth-and-OpenID-Connect-authorize2) in API Explorer. ## getAccountInfoV2 @@ -2215,7 +2215,7 @@ await rc.revoke(); ## removeLineJWSPublic -Remove phone line +Remove Phone Line | Name | Value | | ---------------- | ----------------------------------------------------- | @@ -2285,7 +2285,7 @@ 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 [CallQueueList](./definitions/CallQueueList.ts) [Try it out](https://developer.ringcentral.com/api-reference#Call-Queues-listCallQueues) in API Explorer. @@ -2329,13 +2329,13 @@ Update Call Queue ```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).callQueues(groupId).put(callQueueDetailsForUpdate); 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) +- `callQueueDetailsForUpdate` is of type [CallQueueDetailsForUpdate](./definitions/CallQueueDetailsForUpdate.ts) - `result` is of type [CallQueueDetails](./definitions/CallQueueDetails.ts) [Try it out](https://developer.ringcentral.com/api-reference#Call-Queues-updateCallQueueInfo) in API Explorer. @@ -3484,9 +3484,9 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Insights-caiAnalyzeInteraction) in API Explorer. -## socMsgListContents +## listSocialMessagingContents -List All Contents +List Contents | Name | Value | | ---------------- | ---------------------------------- | @@ -3499,16 +3499,16 @@ List All Contents ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.cx().socialMessaging().v1().contents().list(socMsgListContentsParameters); +var result = await rc.cx().socialMessaging().v1().contents().list(listSocialMessagingContentsParameters); await rc.revoke(); ``` -- `socMsgListContentsParameters` is of type [SocMsgListContentsParameters](./definitions/SocMsgListContentsParameters.ts) +- `listSocialMessagingContentsParameters` is of type [ListSocialMessagingContentsParameters](./definitions/ListSocialMessagingContentsParameters.ts) - `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#Contents-socMsgListContents) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Contents-listSocialMessagingContents) in API Explorer. -## socMsgCreateContent +## createSocialMessagingContent Create Content @@ -3523,16 +3523,16 @@ Create Content ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.cx().socialMessaging().v1().contents().post(createContentRequest); +var result = await rc.cx().socialMessaging().v1().contents().post(createSocialMessagingContentRequest); await rc.revoke(); ``` -- `createContentRequest` is of type [CreateContentRequest](./definitions/CreateContentRequest.ts) +- `createSocialMessagingContentRequest` is of type [CreateSocialMessagingContentRequest](./definitions/CreateSocialMessagingContentRequest.ts) - `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#Contents-socMsgCreateContent) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Contents-createSocialMessagingContent) in API Explorer. -## socMsgGetContent +## readSocialMessagingContent Get Content @@ -3553,7 +3553,7 @@ await rc.revoke(); - `result` is an empty string -[Try it out](https://developer.ringcentral.com/api-reference#Contents-socMsgGetContent) in API Explorer. +[Try it out](https://developer.ringcentral.com/api-reference#Contents-readSocialMessagingContent) in API Explorer. ## listSocialMessagingIdentities @@ -3708,6 +3708,29 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Bridge-Management-createBridge) in API Explorer. +## listCostCenters + +List Cost Centers + +| Name | Value | +| ---------------- | ----------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/v2/accounts/{accountId}/cost-centers` | +| Rate Limit Group | `Light` | +| App Permission | `ReadAccounts` | +| User Permission | `CostCenterManagement` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc.restapi().v2().accounts(accountId).costCenters().get(); +await rc.revoke(); +``` + +- `result` is of type [CostCenterList](./definitions/CostCenterList.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Cost-Centers-listCostCenters) in API Explorer. + ## addDeviceToInventory Add Phone to Inventory @@ -3906,29 +3929,6 @@ 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 @@ -4899,12 +4899,18 @@ Get Corporate Directory Entry ```ts const rc = new RingCentral({ clientId, clientSecret, server }); await rc.authorize({ jwt }); -var result = await rc.restapi(apiVersion).account(accountId).directory().entries(entryId).get(); +var result = await rc + .restapi(apiVersion) + .account(accountId) + .directory() + .entries(entryId) + .get(readDirectoryEntryParameters); await rc.revoke(); ``` - Parameter `apiVersion` is optional with default value `v1.0` - Parameter `accountId` is optional with default value `~` +- `readDirectoryEntryParameters` is of type [ReadDirectoryEntryParameters](./definitions/ReadDirectoryEntryParameters.ts) - `result` is of type [ContactResource](./definitions/ContactResource.ts) [Try it out](https://developer.ringcentral.com/api-reference#Internal-Contacts-readDirectoryEntry) in API Explorer. @@ -5273,7 +5279,7 @@ await rc.revoke(); - Parameter `accountId` is optional with default value `~` - Parameter `extensionId` is optional with default value `~` - `readAnsweringRuleParameters` is of type [ReadAnsweringRuleParameters](./definitions/ReadAnsweringRuleParameters.ts) -- `result` is of type [AnsweringRuleInfo](./definitions/AnsweringRuleInfo.ts) +- `result` is of type [CallHandlingRuleInfo](./definitions/CallHandlingRuleInfo.ts) [Try it out](https://developer.ringcentral.com/api-reference#Call-Handling-Rules-readAnsweringRule) in API Explorer. @@ -5305,7 +5311,7 @@ await rc.revoke(); - Parameter `accountId` is optional with default value `~` - Parameter `extensionId` is optional with default value `~` - `updateAnsweringRuleRequest` is of type [UpdateAnsweringRuleRequest](./definitions/UpdateAnsweringRuleRequest.ts) -- `result` is of type [AnsweringRuleInfo](./definitions/AnsweringRuleInfo.ts) +- `result` is of type [CallHandlingRuleInfo](./definitions/CallHandlingRuleInfo.ts) [Try it out](https://developer.ringcentral.com/api-reference#Call-Handling-Rules-updateAnsweringRule) in API Explorer. @@ -6251,38 +6257,6 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Message-Store-patchMessage) in API Explorer. -## syncMessages - -Sync Messages - -| Name | Value | -| ---------------- | -------------------------------------------------------------------------------- | -| HTTP Method | `GET` | -| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/message-sync` | -| Rate Limit Group | `Light` | -| App Permission | `ReadMessages` | -| User Permission | `ReadMessages` | - -```ts -const rc = new RingCentral({ clientId, clientSecret, server }); -await rc.authorize({ jwt }); -var result = await rc - .restapi(apiVersion) - .account(accountId) - .extension(extensionId) - .messageSync() - .get(syncMessagesParameters); -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 `~` -- `syncMessagesParameters` is of type [SyncMessagesParameters](./definitions/SyncMessagesParameters.ts) -- `result` is of type [GetMessageSyncResponse](./definitions/GetMessageSyncResponse.ts) - -[Try it out](https://developer.ringcentral.com/api-reference#Message-Store-syncMessages) in API Explorer. - ## readUserPresenceStatus Get User Presence Status @@ -8221,6 +8195,38 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Registration-Management-rcwRegUpdateSession) in API Explorer. +## syncMessages + +Sync Messages + +| Name | Value | +| ---------------- | -------------------------------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/message-sync` | +| Rate Limit Group | `Light` | +| App Permission | `ReadMessages` | +| User Permission | `ReadMessages` | + +```ts +const rc = new RingCentral({ clientId, clientSecret, server }); +await rc.authorize({ jwt }); +var result = await rc + .restapi(apiVersion) + .account(accountId) + .extension(extensionId) + .messageSync() + .get(syncMessagesParameters); +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 `~` +- `syncMessagesParameters` is of type [SyncMessagesParameters](./definitions/SyncMessagesParameters.ts) +- `result` is of type [GetMessageSyncResponse](./definitions/GetMessageSyncResponse.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Message-Store-syncMessages) in API Explorer. + ## listExtensionPhoneNumbers Get Extension Phone Number List @@ -8831,6 +8837,29 @@ 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 @@ -10221,39 +10250,6 @@ 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 @@ -10692,6 +10688,59 @@ await rc.revoke(); [Try it out](https://developer.ringcentral.com/api-reference#Registrants-rcwRegDeleteRegistrant) in API Explorer. +## readCallFlipSettings + +Get Call Flip Settings + +| Name | Value | +| ---------------- | ----------------------------------------------------------------------------- | +| HTTP Method | `GET` | +| Endpoint | `/restapi/v2/accounts/{accountId}/extensions/{extensionId}/call-flip-numbers` | +| 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().v2().accounts(accountId).extensions(extensionId).callFlipNumbers().get(); +await rc.revoke(); +``` + +- `result` is of type [CallFlipNumberListResource](./definitions/CallFlipNumberListResource.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Call-Flip-readCallFlipSettings) in API Explorer. + +## updateCallFlipSettings + +Update Call Flip Settings + +| Name | Value | +| ---------------- | ----------------------------------------------------------------------------- | +| HTTP Method | `PUT` | +| Endpoint | `/restapi/v2/accounts/{accountId}/extensions/{extensionId}/call-flip-numbers` | +| 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() + .v2() + .accounts(accountId) + .extensions(extensionId) + .callFlipNumbers() + .put(callFlipNumberListResource); +await rc.revoke(); +``` + +- `callFlipNumberListResource` is of type [CallFlipNumberListResource](./definitions/CallFlipNumberListResource.ts) +- `result` is of type [CallFlipNumberListResource](./definitions/CallFlipNumberListResource.ts) + +[Try it out](https://developer.ringcentral.com/api-reference#Call-Flip-updateCallFlipSettings) in API Explorer. + ## updateCallMonitoringGroupList Update Call Monitoring Group List @@ -12112,6 +12161,39 @@ 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 diff --git a/packages/extensions/rate-limit/src/index.ts b/packages/extensions/rate-limit/src/index.ts index c3a24504c..78dbc4b3b 100644 --- a/packages/extensions/rate-limit/src/index.ts +++ b/packages/extensions/rate-limit/src/index.ts @@ -13,7 +13,7 @@ class RateLimitExtension extends RetryExtension { retryInterval: (restException, retriesAttempted) => { const rateLimitWindow = restException.response.headers['x-rate-limit-window']; return ( - (rateLimitWindow ? parseInt(rateLimitWindow, 10) : options?.rateLimitWindow ?? 60) * + (rateLimitWindow ? parseInt(rateLimitWindow, 10) : (options?.rateLimitWindow ?? 60)) * 1000 * 2 ** retriesAttempted // exponential back off ); diff --git a/packages/extensions/ws/src/index.ts b/packages/extensions/ws/src/index.ts index 718037f7e..86fe204b6 100644 --- a/packages/extensions/ws/src/index.ts +++ b/packages/extensions/ws/src/index.ts @@ -253,6 +253,7 @@ class WebSocketExtension extends SdkExtension { }, ]), ); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (e) { this.ws.close(); // Explicitly mark WS as closed }