Skip to content

Commit

Permalink
breaking: Use specific TS list types and allow non-array TS params (#476
Browse files Browse the repository at this point in the history
)
  • Loading branch information
childish-sambino authored Sep 11, 2019
1 parent 7c948dc commit a8212d4
Show file tree
Hide file tree
Showing 76 changed files with 290 additions and 290 deletions.
4 changes: 2 additions & 2 deletions lib/rest/api/v2010/account/authorizedConnectApp.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ interface AuthorizedConnectAppResource {
connect_app_sid: string;
date_created: Date;
date_updated: Date;
permissions: string;
permissions: AuthorizedConnectAppPermission[];
uri: string;
}

Expand Down Expand Up @@ -215,7 +215,7 @@ declare class AuthorizedConnectAppInstance extends SerializableClass {
* @param callback - Callback to handle processed record
*/
fetch(callback?: (error: Error | null, items: AuthorizedConnectAppInstance) => any): void;
permissions: string;
permissions: AuthorizedConnectAppPermission[];
/**
* Provide a user-friendly representation
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/rest/api/v2010/account/call.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ interface CallListInstanceCreateOptions {
record?: boolean;
recordingChannels?: string;
recordingStatusCallback?: string;
recordingStatusCallbackEvent?: string[];
recordingStatusCallbackEvent?: string | string[];
recordingStatusCallbackMethod?: string;
sendDigits?: string;
sipAuthPassword?: string;
sipAuthUsername?: string;
statusCallback?: string;
statusCallbackEvent?: string[];
statusCallbackEvent?: string | string[];
statusCallbackMethod?: string;
timeout?: number;
to: string;
Expand Down
8 changes: 4 additions & 4 deletions lib/rest/api/v2010/account/call/feedback.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ declare function FeedbackList(version: V2010, accountSid: string, callSid: strin
* @property qualityScore - The call quality expressed as an integer from 1 to 5
*/
interface FeedbackInstanceCreateOptions {
issue?: string[];
issue?: FeedbackIssues | FeedbackIssues[];
qualityScore: number;
}

Expand All @@ -40,7 +40,7 @@ interface FeedbackInstanceCreateOptions {
* @property qualityScore - The call quality expressed as an integer from 1 to 5
*/
interface FeedbackInstanceUpdateOptions {
issue?: string[];
issue?: FeedbackIssues | FeedbackIssues[];
qualityScore: number;
}

Expand All @@ -66,7 +66,7 @@ interface FeedbackResource {
account_sid: string;
date_created: Date;
date_updated: Date;
issues: string;
issues: FeedbackIssues[];
quality_score: number;
sid: string;
}
Expand Down Expand Up @@ -142,7 +142,7 @@ declare class FeedbackInstance extends SerializableClass {
* @param callback - Callback to handle processed record
*/
fetch(callback?: (error: Error | null, items: FeedbackInstance) => any): void;
issues: string;
issues: FeedbackIssues[];
qualityScore: number;
sid: string;
/**
Expand Down
4 changes: 2 additions & 2 deletions lib/rest/api/v2010/account/call/feedbackSummary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ interface FeedbackSummaryResource {
date_updated: Date;
end_date: Date;
include_subaccounts: boolean;
issues: string;
issues: string[];
quality_score_average: number;
quality_score_median: number;
quality_score_standard_deviation: number;
Expand Down Expand Up @@ -141,7 +141,7 @@ declare class FeedbackSummaryInstance extends SerializableClass {
*/
fetch(callback?: (error: Error | null, items: FeedbackSummaryInstance) => any): void;
includeSubaccounts: boolean;
issues: string;
issues: string[];
qualityScoreAverage: number;
qualityScoreMedian: number;
qualityScoreStandardDeviation: number;
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/api/v2010/account/call/recording.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ interface RecordingListInstance {
interface RecordingListInstanceCreateOptions {
recordingChannels?: string;
recordingStatusCallback?: string;
recordingStatusCallbackEvent?: string[];
recordingStatusCallbackEvent?: string | string[];
recordingStatusCallbackMethod?: string;
trim?: string;
}
Expand Down
8 changes: 4 additions & 4 deletions lib/rest/api/v2010/account/conference/participant.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ interface ParticipantListInstanceCreateOptions {
coaching?: boolean;
conferenceRecord?: string;
conferenceRecordingStatusCallback?: string;
conferenceRecordingStatusCallbackEvent?: string[];
conferenceRecordingStatusCallbackEvent?: string | string[];
conferenceRecordingStatusCallbackMethod?: string;
conferenceStatusCallback?: string;
conferenceStatusCallbackEvent?: string[];
conferenceStatusCallbackEvent?: string | string[];
conferenceStatusCallbackMethod?: string;
conferenceTrim?: string;
earlyMedia?: boolean;
Expand All @@ -183,14 +183,14 @@ interface ParticipantListInstanceCreateOptions {
record?: boolean;
recordingChannels?: string;
recordingStatusCallback?: string;
recordingStatusCallbackEvent?: string[];
recordingStatusCallbackEvent?: string | string[];
recordingStatusCallbackMethod?: string;
region?: string;
sipAuthPassword?: string;
sipAuthUsername?: string;
startConferenceOnEnter?: boolean;
statusCallback?: string;
statusCallbackEvent?: string[];
statusCallbackEvent?: string | string[];
statusCallbackMethod?: string;
timeout?: number;
to: string;
Expand Down
6 changes: 3 additions & 3 deletions lib/rest/api/v2010/account/connectApp.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ interface ConnectAppInstanceUpdateOptions {
description?: string;
friendlyName?: string;
homepageUrl?: string;
permissions?: string[];
permissions?: ConnectAppPermission | ConnectAppPermission[];
}

interface ConnectAppListInstance {
Expand Down Expand Up @@ -180,7 +180,7 @@ interface ConnectAppResource {
description: string;
friendly_name: string;
homepage_url: string;
permissions: string;
permissions: ConnectAppPermission[];
sid: string;
uri: string;
}
Expand Down Expand Up @@ -252,7 +252,7 @@ declare class ConnectAppInstance extends SerializableClass {
fetch(callback?: (error: Error | null, items: ConnectAppInstance) => any): void;
friendlyName: string;
homepageUrl: string;
permissions: string;
permissions: ConnectAppPermission[];
/**
* remove a ConnectAppInstance
*
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/api/v2010/account/message.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ interface MessageListInstanceCreateOptions {
forceDelivery?: boolean;
from?: string;
maxPrice?: number;
mediaUrl?: string[];
mediaUrl?: string | string[];
messagingServiceSid?: string;
provideFeedback?: boolean;
smartEncoded?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions lib/rest/api/v2010/account/token.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ interface TokenResource {
account_sid: string;
date_created: Date;
date_updated: Date;
ice_servers: string;
ice_servers: string[];
password: string;
ttl: string;
username: string;
Expand All @@ -72,7 +72,7 @@ declare class TokenInstance extends SerializableClass {
accountSid: string;
dateCreated: Date;
dateUpdated: Date;
iceServers: string;
iceServers: string[];
password: string;
/**
* Provide a user-friendly representation
Expand Down
6 changes: 3 additions & 3 deletions lib/rest/chat/v1/service.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ interface ServiceInstanceUpdateOptions {
reachabilityEnabled?: boolean;
readStatusEnabled?: boolean;
typingIndicatorTimeout?: number;
webhookFilters?: string[];
webhookFilters?: string | string[];
webhookMethod?: string;
webhooks?: {
onMessageSend?: {
Expand Down Expand Up @@ -347,7 +347,7 @@ interface ServiceResource {
sid: string;
typing_indicator_timeout: number;
url: string;
webhook_filters: string;
webhook_filters: string[];
webhook_method: string;
webhooks: object;
}
Expand Down Expand Up @@ -458,7 +458,7 @@ declare class ServiceInstance extends SerializableClass {
* Access the users
*/
users(): UserListInstance;
webhookFilters: string;
webhookFilters: string[];
webhookMethod: string;
webhooks: object;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/rest/chat/v1/service/channel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ interface ChannelListInstanceEachOptions {
done?: Function;
limit?: number;
pageSize?: number;
type?: string[];
type?: ChannelChannelType | ChannelChannelType[];
}

/**
Expand All @@ -174,7 +174,7 @@ interface ChannelListInstanceEachOptions {
interface ChannelListInstanceOptions {
limit?: number;
pageSize?: number;
type?: string[];
type?: ChannelChannelType | ChannelChannelType[];
}

/**
Expand All @@ -189,7 +189,7 @@ interface ChannelListInstancePageOptions {
pageNumber?: number;
pageSize?: number;
pageToken?: string;
type?: string[];
type?: ChannelChannelType | ChannelChannelType[];
}

interface ChannelPayload extends ChannelResource, Page.TwilioResponsePayload {
Expand Down
6 changes: 3 additions & 3 deletions lib/rest/chat/v1/service/channel/invite.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ interface InviteListInstanceCreateOptions {
interface InviteListInstanceEachOptions {
callback?: (item: InviteInstance, done: (err?: Error) => void) => void;
done?: Function;
identity?: string[];
identity?: string | string[];
limit?: number;
pageSize?: number;
}
Expand All @@ -148,7 +148,7 @@ interface InviteListInstanceEachOptions {
* efficient page size, i.e. min(limit, 1000)
*/
interface InviteListInstanceOptions {
identity?: string[];
identity?: string | string[];
limit?: number;
pageSize?: number;
}
Expand All @@ -162,7 +162,7 @@ interface InviteListInstanceOptions {
* @property pageToken - PageToken provided by the API
*/
interface InviteListInstancePageOptions {
identity?: string[];
identity?: string | string[];
pageNumber?: number;
pageSize?: number;
pageToken?: string;
Expand Down
6 changes: 3 additions & 3 deletions lib/rest/chat/v1/service/channel/member.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ interface MemberListInstanceCreateOptions {
interface MemberListInstanceEachOptions {
callback?: (item: MemberInstance, done: (err?: Error) => void) => void;
done?: Function;
identity?: string[];
identity?: string | string[];
limit?: number;
pageSize?: number;
}
Expand All @@ -159,7 +159,7 @@ interface MemberListInstanceEachOptions {
* efficient page size, i.e. min(limit, 1000)
*/
interface MemberListInstanceOptions {
identity?: string[];
identity?: string | string[];
limit?: number;
pageSize?: number;
}
Expand All @@ -173,7 +173,7 @@ interface MemberListInstanceOptions {
* @property pageToken - PageToken provided by the API
*/
interface MemberListInstancePageOptions {
identity?: string[];
identity?: string | string[];
pageNumber?: number;
pageSize?: number;
pageToken?: string;
Expand Down
8 changes: 4 additions & 4 deletions lib/rest/chat/v1/service/role.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ declare function RoleList(version: V1, serviceSid: string): RoleListInstance;
* @property permission - A permission the role should have
*/
interface RoleInstanceUpdateOptions {
permission: string[];
permission: string | string[];
}

interface RoleListInstance {
Expand Down Expand Up @@ -113,7 +113,7 @@ interface RoleListInstance {
*/
interface RoleListInstanceCreateOptions {
friendlyName: string;
permission: string[];
permission: string | string[];
type: RoleRoleType;
}

Expand Down Expand Up @@ -182,7 +182,7 @@ interface RoleResource {
date_created: Date;
date_updated: Date;
friendly_name: string;
permissions: string;
permissions: string[];
service_sid: string;
sid: string;
type: RoleRoleType;
Expand Down Expand Up @@ -252,7 +252,7 @@ declare class RoleInstance extends SerializableClass {
*/
fetch(callback?: (error: Error | null, items: RoleInstance) => any): void;
friendlyName: string;
permissions: string;
permissions: string[];
/**
* remove a RoleInstance
*
Expand Down
6 changes: 3 additions & 3 deletions lib/rest/chat/v2/service.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ interface ServiceInstanceUpdateOptions {
reachabilityEnabled?: boolean;
readStatusEnabled?: boolean;
typingIndicatorTimeout?: number;
webhookFilters?: string[];
webhookFilters?: string | string[];
webhookMethod?: string;
}

Expand Down Expand Up @@ -274,7 +274,7 @@ interface ServiceResource {
sid: string;
typing_indicator_timeout: number;
url: string;
webhook_filters: string;
webhook_filters: string[];
webhook_method: string;
}

Expand Down Expand Up @@ -392,7 +392,7 @@ declare class ServiceInstance extends SerializableClass {
* Access the users
*/
users(): UserListInstance;
webhookFilters: string;
webhookFilters: string[];
webhookMethod: string;
}

Expand Down
Loading

0 comments on commit a8212d4

Please sign in to comment.