Skip to content

Commit

Permalink
New spec, new code
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerlong committed Jun 10, 2021
1 parent 5ab1591 commit d7711c2
Show file tree
Hide file tree
Showing 50 changed files with 2,251 additions and 1,968 deletions.
8 changes: 4 additions & 4 deletions code-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"change-case": "^4.1.2",
"lower-case-first": "^2.0.2",
"ramda": "^0.27.1",
"ringcentral-open-api-parser": "^0.4.4"
"ringcentral-open-api-parser": "^0.4.6"
},
"devDependencies": {
"@types/node": "^15.0.2",
"@types/node": "^15.12.2",
"@types/ramda": "^0.27.40",
"gts": "^3.1.0",
"ts-node": "^9.1.1",
"typescript": "^4.2.4",
"ts-node": "^10.0.0",
"typescript": "^4.3.2",
"yarn-upgrade-all": "^0.5.4"
}
}
393 changes: 205 additions & 188 deletions code-generator/yarn.lock

Large diffs are not rendered by default.

3,535 changes: 1,780 additions & 1,755 deletions samples.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class AccountOperatorInfo {
public String uri;
/**
* Internal identifier of an operator extension
* Format: int64
*/
public Long id;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ public class AnsweringRuleInfo {
*
*/
public SharedLinesInfo sharedLines;
/**
*
*/
public MissedCallInfo missedCall;

public AnsweringRuleInfo uri(String uri) {
this.uri = uri;
Expand Down Expand Up @@ -158,4 +162,9 @@ public AnsweringRuleInfo sharedLines(SharedLinesInfo sharedLines) {
this.sharedLines = sharedLines;
return this;
}

public AnsweringRuleInfo missedCall(MissedCallInfo missedCall) {
this.missedCall = missedCall;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
public class AutomaticLocationUpdatesPhoneNumberInfo {
/**
* Internal identifier of a phone number
* Format: int64
*/
public Long id;
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.ringcentral.definitions;


public class AutomaticLocationUpdatesSiteInfoRequest {
/**
* Internal identifier of a site
*/
public String id;

public AutomaticLocationUpdatesSiteInfoRequest id(String id) {
this.id = id;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class CallQueueMemberInfo {
public String uri;
/**
* Internal identifier of a call queue member
* Format: int64
*/
public Long id;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class CompanyPhoneNumberInfo {
public String uri;
/**
* Internal identifier of a phone number
* Format: int64
*/
public Long id;
/**
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/ringcentral/definitions/ContactInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ public class ContactInfo {
* For User extension type only. Extension user last name
*/
public String lastName;
/**
* Extension user name (first name and last name)
*/
public String name;
/**
* Extension user company name
*/
Expand Down Expand Up @@ -58,6 +62,11 @@ public ContactInfo lastName(String lastName) {
return this;
}

public ContactInfo name(String name) {
this.name = name;
return this;
}

public ContactInfo company(String company) {
this.company = company;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,30 @@

public class CreateMessageStoreReportRequest {
/**
* Starting time for collecting messages. The default value equals to the current time minus 24 hours
* Only messages created before the date will be collected. The default value is current time
*/
public String dateTo;
/**
* Only messages created after (or including) the date will be collected. The default value is current time minus 24 hours
*/
public String dateFrom;
/**
* Ending time for collecting messages. The default value is the current time
* Enum: EMail, Fax, SMS, VoiceMail, Pager, Text
*/
public String dateTo;
public String[] messageTypes;

public CreateMessageStoreReportRequest dateTo(String dateTo) {
this.dateTo = dateTo;
return this;
}

public CreateMessageStoreReportRequest dateFrom(String dateFrom) {
this.dateFrom = dateFrom;
return this;
}

public CreateMessageStoreReportRequest dateTo(String dateTo) {
this.dateTo = dateTo;
public CreateMessageStoreReportRequest messageTypes(String[] messageTypes) {
this.messageTypes = messageTypes;
return this;
}
}
5 changes: 3 additions & 2 deletions src/main/java/com/ringcentral/definitions/CurrencyInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
public class CurrencyInfo {
/**
* Internal identifier of a currency
* Format: int64
*/
public String id;
public Long id;
/**
* Official code of a currency
*/
Expand All @@ -24,7 +25,7 @@ public class CurrencyInfo {
*/
public String minorSymbol;

public CurrencyInfo id(String id) {
public CurrencyInfo id(Long id) {
this.id = id;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class DeleteMessageParameters {
public Boolean purge;
/**
* Internal identifier of a message thread
* Format: int64
*/
public Long conversationId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class DeviceCountryResource {
*/
public String uri;
/**
*
* Format: int64
*/
public String id;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
public class DeviceExtensionInfo {
/**
* Internal identifier of an extension
* Format: int64
*/
public Long id;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

public class DevicePhoneLinesEmergencyAddressInfo {
/**
* 'True' if specifying of emergency address is required
* 'True' if specifying of emergency address is required
*/
public Boolean required;
/**
* 'True' if only local emergency address can be specified
* 'True' if only local emergency address can be specified
*/
public Boolean localOnly;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
public class DevicePhoneNumberInfo {
/**
* Internal identifier of a phone number
* Format: int64
*/
public Long id;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public class ExtensionDeviceResponse {
*/
public ShippingInfo shipping;
/**
* Box billing identifier of a device. Applicable only for HardPhones. It is an alternative way to identify the device to be ordered. EitherT? model structure, or boxBillingId must be specified forT?HardPhone
* Box billing identifier of a device. Applicable only for HardPhones. It is an alternative way to identify the device to be ordered. Either model structure, or boxBillingId must be specified for HardPhone
* Format: int64
*/
public Long boxBillingId;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
public class ExtensionInfoCallLog {
/**
* Internal identifier of an extension
* Format: int64
*/
public Long id;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class ExtensionUpdateRequest {
/**
*
*/
public AutomaticLocationUpdatesSiteInfo site;
public AutomaticLocationUpdatesSiteInfoRequest site;
/**
* Extension type. Please note that legacy 'Department' extension type corresponds to 'Call Queue' extensions in modern RingCentral product terminology
* Enum: User, Fax User, VirtualUser, DigitalUser, Department, Announcement, Voicemail, SharedLinesGroup, PagingOnly, IvrMenu, ApplicationExtension, ParkLocation, DelegatedLinesGroup, GroupCallPickup
Expand Down Expand Up @@ -151,7 +151,7 @@ public ExtensionUpdateRequest hidden(Boolean hidden) {
return this;
}

public ExtensionUpdateRequest site(AutomaticLocationUpdatesSiteInfo site) {
public ExtensionUpdateRequest site(AutomaticLocationUpdatesSiteInfoRequest site) {
this.site = site;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

public class FavoriteContactResource {
/**
*
* Format: int64
*/
public Long id;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
public class GetAccountInfoResponse {
/**
* Internal identifier of an account
* Format: int64
*/
public Long id;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public class GetDeviceInfoResponse {
*/
public ShippingInfo shipping;
/**
* Box billing identifier of a device. Applicable only for HardPhones. It is an alternative way to identify the device to be ordered. EitherT? model structure, or boxBillingId must be specified forT?HardPhone
* Box billing identifier of a device. Applicable only for HardPhones. It is an alternative way to identify the device to be ordered. Either model structure, or boxBillingId must be specified for HardPhone
* Format: int64
*/
public Long boxBillingId;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
public class GetInternalTextMessageInfoResponse {
/**
* Internal identifier of a message
* Format: int64
*/
public Long id;
/**
Expand All @@ -21,6 +22,7 @@ public class GetInternalTextMessageInfoResponse {
public String availability;
/**
* SMS and Pager only. Identifier of a conversation that the message belongs to
* Format: int64
*/
public Long conversationId;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
public class GetMessageInfoResponse {
/**
* Internal identifier of a message
* Format: int64
*/
public Long id;
/**
Expand All @@ -25,6 +26,7 @@ public class GetMessageInfoResponse {
public String availability;
/**
* SMS and Pager only. Identifier of a conversation the message belongs to
* Format: int64
*/
public Long conversationId;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
public class GetPresenceExtensionInfo {
/**
* Internal identifier of an extension
* Format: int64
*/
public Long id;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
public class GetSMSMessageInfoResponse {
/**
* Internal identifier of a message
* Format: int64
*/
public Long id;
/**
Expand All @@ -21,6 +22,7 @@ public class GetSMSMessageInfoResponse {
public String availability;
/**
* SMS and Pager only. Identifier of a conversation that the message belongs to
* Format: int64
*/
public Long conversationId;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class GetTokenRequest {
/**
* Grant type
* Default: password
* Enum: authorization_code, password, refresh_token, client_credentials, urn:ietf:params:oauth:grant-type:jwt-bearer
* Enum: authorization_code, password, refresh_token, client_credentials, urn:ietf:params:oauth:grant-type:jwt-bearer, partner_jwt
*/
public String grant_type;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class ListAutomaticLocationUpdatesUsersParameters {
*/
public Boolean featureEnabled;
/**
* Comma-separated list of fields to order results prefixed by plus sign '+' (ascending order) or minus sign '-' (descending order). Supported values: 'name', 'modelName', 'siteName', 'featureEnabled'
* Comma-separated list of fields to order results prefixed by plus sign '+' (ascending order) or minus sign '-' (descending order). Supported values: 'name', 'modelName', 'siteName', 'featureEnabled'
* Default: name
*/
public String orderBy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ListDevicesAutomaticLocationUpdatesParameters {
*/
public String searchString;
/**
* Comma-separated list of fields to order results prefixed by plus sign '+' (ascending order) or minus sign '-' (descending order). Supported values: 'name', 'modelName', 'siteName', 'featureEnabled'
* Comma-separated list of fields to order results prefixed by plus sign '+' (ascending order) or minus sign '-' (descending order). Supported values: 'name', 'modelName', 'siteName', 'featureEnabled'
* Default: name
*/
public String orderBy;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.ringcentral.definitions;


// Query parameters for operation listDomesticCountries
public class ListDomesticCountriesParameters {
/**
* Indicates the page number to retrieve. Only positive number values are accepted
* Default: 1
*/
public Long page;
/**
* Indicates the page size (number of items)
* Default: 100
*/
public Long perPage;

public ListDomesticCountriesParameters page(Long page) {
this.page = page;
return this;
}

public ListDomesticCountriesParameters perPage(Long perPage) {
this.perPage = perPage;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class ListStatesParameters {
public Boolean allCountries;
/**
* Internal identifier of a country
* Format: int64
*/
public Long countryId;
/**
Expand Down
Loading

0 comments on commit d7711c2

Please sign in to comment.