-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[communication] update new phone numbers client #13560
Changes from 43 commits
101b8b9
edc2db0
771cf85
d9eb0d9
d12ea5f
c1a0262
b3b0fbc
c8dc1a0
87bbbae
160eebc
cfdd24e
b7aceab
d201cf9
fefc6e7
12e2567
70d7c38
884ab05
a54bbe6
177b6e5
4e806b0
7a011eb
263a76d
f8a8300
58a459b
358c3e8
9a0c714
66edf4c
75a8fb2
41e5212
66b94f3
7dc19d7
f5224cb
45abc50
1162146
b0d5d8e
f9715df
2f56a28
0e646f5
040471a
0ad1e2d
05ada55
cc15101
d134c20
0948ebd
9ae961a
f362fd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,29 +8,24 @@ import { HttpResponse } from '@azure/core-http'; | |
import { KeyCredential } from '@azure/core-auth'; | ||
import { OperationOptions } from '@azure/core-http'; | ||
import { PagedAsyncIterableIterator } from '@azure/core-paging'; | ||
import { PageSettings } from '@azure/core-paging'; | ||
import { PipelineOptions } from '@azure/core-http'; | ||
import { PollerLike } from '@azure/core-lro'; | ||
import { PollOperationState } from '@azure/core-lro'; | ||
import { TokenCredential } from '@azure/core-auth'; | ||
|
||
// @public | ||
export interface AcquiredPhoneNumber { | ||
applicationId: string; | ||
applicationId?: string; | ||
assignmentType: PhoneNumberAssignmentType; | ||
callbackUri: string; | ||
callbackUri?: string; | ||
capabilities: PhoneNumberCapabilities; | ||
cost: PhoneNumberCost; | ||
cost?: PhoneNumberCost; | ||
countryCode: string; | ||
id: string; | ||
phoneNumber: string; | ||
phoneNumberType: PhoneNumberType; | ||
purchaseDate: Date; | ||
} | ||
|
||
// @public | ||
export interface AcquiredPhoneNumberUpdate { | ||
applicationId?: string; | ||
callbackUri?: string; | ||
purchaseDate?: Date; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heads up: These will change again in a future swagger, |
||
} | ||
|
||
// @public (undocumented) | ||
|
@@ -49,17 +44,57 @@ export interface BeginSearchAvailablePhoneNumbersOptions extends PhoneNumberPoll | |
export interface BeginUpdatePhoneNumberOptions extends PhoneNumberPollerOptionsBase, OperationOptions { | ||
} | ||
|
||
// @public | ||
export type BillingFrequency = string; | ||
|
||
// @public (undocumented) | ||
export type GetPhoneNumberOptions = OperationOptions; | ||
|
||
// @public (undocumented) | ||
export type GetPhoneNumberResponse = WithResponse<AcquiredPhoneNumber>; | ||
|
||
// @public (undocumented) | ||
export type ListPhoneNumbersOptions = OperationOptions; | ||
// @public | ||
export const enum KnownBillingFrequency { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where does this |
||
// (undocumented) | ||
Monthly = "monthly" | ||
} | ||
|
||
// @public | ||
export type PhoneNumberAssignmentType = "person" | "application"; | ||
export const enum KnownPhoneNumberAssignmentType { | ||
// (undocumented) | ||
Application = "application", | ||
// (undocumented) | ||
User = "user" | ||
} | ||
|
||
// @public | ||
export const enum KnownPhoneNumberCapabilityValue { | ||
// (undocumented) | ||
Inbound = "inbound", | ||
// (undocumented) | ||
InboundOutbound = "inbound+outbound", | ||
// (undocumented) | ||
None = "none", | ||
// (undocumented) | ||
Outbound = "outbound" | ||
} | ||
|
||
// @public | ||
export const enum KnownPhoneNumberType { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did autorest change how it models extensible enums? I would have expected string unions (and prefer them from a TS language perspective :-( ) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea this changed with the version of autorest/ts I got to fix the LRO problem. |
||
// (undocumented) | ||
Geographic = "geographic", | ||
// (undocumented) | ||
TollFree = "tollFree" | ||
} | ||
|
||
// @public | ||
export interface ListPhoneNumbersOptions extends OperationOptions { | ||
skip?: number; | ||
top?: number; | ||
} | ||
|
||
// @public | ||
export type PhoneNumberAssignmentType = string; | ||
|
||
// @public | ||
export interface PhoneNumberCapabilities { | ||
|
@@ -74,12 +109,12 @@ export interface PhoneNumberCapabilitiesRequest { | |
} | ||
|
||
// @public | ||
export type PhoneNumberCapabilityValue = "inbound" | "outbound" | "inbound+outbound" | "none"; | ||
export type PhoneNumberCapabilityValue = string; | ||
|
||
// @public | ||
export interface PhoneNumberCost { | ||
amount: number; | ||
billingFrequency: "monthly"; | ||
billingFrequency: BillingFrequency; | ||
currencyCode: string; | ||
} | ||
|
||
|
@@ -101,8 +136,7 @@ export class PhoneNumbersClient { | |
beginSearchAvailablePhoneNumbers(countryCode: string, search: PhoneNumberSearchRequest, options?: BeginSearchAvailablePhoneNumbersOptions): Promise<PollerLike<PollOperationState<PhoneNumberSearchResult>, PhoneNumberSearchResult>>; | ||
beginUpdatePhoneNumberCapabilities(phoneNumber: string, request: PhoneNumberCapabilitiesRequest, options?: BeginUpdatePhoneNumberOptions): Promise<PollerLike<PollOperationState<AcquiredPhoneNumber>, AcquiredPhoneNumber>>; | ||
getPhoneNumber(phoneNumber: string, options?: GetPhoneNumberOptions): Promise<GetPhoneNumberResponse>; | ||
listPhoneNumbers(options?: ListPhoneNumbersOptions): PagedAsyncIterableIterator<AcquiredPhoneNumber>; | ||
updatePhoneNumber(phoneNumber: string, update: AcquiredPhoneNumberUpdate, options?: UpdatePhoneNumberOptions): Promise<UpdatePhoneNumberResponse>; | ||
listPhoneNumbers(options?: ListPhoneNumbersOptions): PagedAsyncIterableIterator<AcquiredPhoneNumber, AcquiredPhoneNumber[], PageSettings>; | ||
} | ||
|
||
// @public | ||
|
@@ -111,9 +145,9 @@ export interface PhoneNumbersClientOptions extends PipelineOptions { | |
|
||
// @public | ||
export interface PhoneNumberSearchRequest { | ||
areaCode?: string; | ||
areaCode: string; | ||
assignmentType: PhoneNumberAssignmentType; | ||
capabilities: PhoneNumberCapabilitiesRequest; | ||
capabilities: PhoneNumberCapabilities; | ||
phoneNumberType: PhoneNumberType; | ||
quantity?: number; | ||
} | ||
|
@@ -122,21 +156,15 @@ export interface PhoneNumberSearchRequest { | |
export interface PhoneNumberSearchResult { | ||
assignmentType: PhoneNumberAssignmentType; | ||
capabilities: PhoneNumberCapabilities; | ||
cost: PhoneNumberCost; | ||
id: string; | ||
cost?: PhoneNumberCost; | ||
phoneNumbers: string[]; | ||
phoneNumberType: PhoneNumberType; | ||
searchExpiresBy: Date; | ||
searchExpiresBy?: Date; | ||
searchId: string; | ||
} | ||
|
||
// @public | ||
export type PhoneNumberType = "tollFree" | "geographic"; | ||
|
||
// @public (undocumented) | ||
export type UpdatePhoneNumberOptions = OperationOptions; | ||
|
||
// @public (undocumented) | ||
export type UpdatePhoneNumberResponse = WithResponse<AcquiredPhoneNumber>; | ||
export type PhoneNumberType = string; | ||
|
||
// @public | ||
export type VoidResponse = WithResponse<{}>; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. | ||
* Licensed under the MIT License. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
*/ | ||
|
||
/// <reference lib="esnext.asynciterable" /> | ||
export * from "./models"; | ||
export { PhoneNumbersClient } from "./phoneNumbersClient"; | ||
export { PhoneNumbersClientContext } from "./phoneNumbersClientContext"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why we need to add rimraf here?