Skip to content
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] disable extensible when generating #13805

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
101b8b9
ctrl+s
0rland0Wats0n Jan 20, 2021
edc2db0
.
0rland0Wats0n Jan 20, 2021
771cf85
ctrl+s
0rland0Wats0n Jan 20, 2021
d9eb0d9
ctrl+s
0rland0Wats0n Jan 21, 2021
d12ea5f
.
0rland0Wats0n Jan 21, 2021
c1a0262
create new phone nnumbers package
0rland0Wats0n Jan 22, 2021
b3b0fbc
.
0rland0Wats0n Jan 22, 2021
c8dc1a0
.
0rland0Wats0n Jan 22, 2021
87bbbae
add managed identity changes
0rland0Wats0n Jan 25, 2021
160eebc
use PhoneNumbersClient in samples to fix build
0rland0Wats0n Jan 25, 2021
cfdd24e
add relevant env vars to tests.yml
0rland0Wats0n Jan 25, 2021
b7aceab
Update sdk/communication/communication-phone-numbers/test/README.md
0rland0Wats0n Jan 26, 2021
d201cf9
Update sdk/communication/communication-phone-numbers/src/utils/logger.ts
0rland0Wats0n Jan 26, 2021
fefc6e7
Update sdk/communication/communication-phone-numbers/src/phoneNumbers…
0rland0Wats0n Jan 26, 2021
12e2567
Update sdk/communication/communication-phone-numbers/src/phoneNumbers…
0rland0Wats0n Jan 26, 2021
70d7c38
Update sdk/communication/communication-phone-numbers/src/phoneNumbers…
0rland0Wats0n Jan 26, 2021
884ab05
Update sdk/communication/communication-phone-numbers/samples/typescri…
0rland0Wats0n Jan 26, 2021
a54bbe6
Update sdk/communication/communication-phone-numbers/samples/typescri…
0rland0Wats0n Jan 26, 2021
177b6e5
Update sdk/communication/communication-phone-numbers/samples/javascri…
0rland0Wats0n Jan 26, 2021
4e806b0
Update sdk/communication/communication-phone-numbers/samples/javascri…
0rland0Wats0n Jan 26, 2021
7a011eb
Update sdk/communication/communication-phone-numbers/src/phoneNumbers…
0rland0Wats0n Jan 26, 2021
263a76d
Update sdk/communication/communication-phone-numbers/README.md
0rland0Wats0n Jan 26, 2021
f8a8300
Update sdk/communication/communication-phone-numbers/src/phoneNumbers…
0rland0Wats0n Jan 26, 2021
58a459b
rebuild to update review
0rland0Wats0n Jan 26, 2021
358c3e8
comment out links reported as broken
0rland0Wats0n Jan 26, 2021
9a0c714
update test
0rland0Wats0n Jan 26, 2021
66edf4c
.
0rland0Wats0n Jan 27, 2021
75a8fb2
regenerate
0rland0Wats0n Jan 28, 2021
41e5212
add header tests
0rland0Wats0n Feb 3, 2021
66b94f3
formatted
0rland0Wats0n Feb 3, 2021
7dc19d7
add getPhoneNumber tests
0rland0Wats0n Feb 3, 2021
f5224cb
add update tests
0rland0Wats0n Feb 3, 2021
45abc50
Merge branch 'master' of github.com:Azure/azure-sdk-for-js into redes…
0rland0Wats0n Feb 3, 2021
1162146
Merge branch 'feature/communication/new-phone-numbers' of github.com:…
0rland0Wats0n Feb 3, 2021
b0d5d8e
Merge branch 'feature/communication/new-phone-numbers' of github.com:…
0rland0Wats0n Feb 3, 2021
f9715df
update autorest.typescript version and regen
0rland0Wats0n Feb 4, 2021
2f56a28
update list method
0rland0Wats0n Feb 5, 2021
0e646f5
ctrl+s
0rland0Wats0n Feb 5, 2021
040471a
.
0rland0Wats0n Feb 5, 2021
0ad1e2d
add remaining lro tests
0rland0Wats0n Feb 10, 2021
05ada55
.
0rland0Wats0n Feb 10, 2021
cc15101
Delete .gitKeep
0rland0Wats0n Feb 10, 2021
d134c20
.
0rland0Wats0n Feb 10, 2021
0948ebd
.
0rland0Wats0n Feb 16, 2021
9ae961a
.
0rland0Wats0n Feb 16, 2021
f362fd6
.
0rland0Wats0n Feb 16, 2021
63d020f
disable extensible enums
0rland0Wats0n Feb 16, 2021
8152e62
.
0rland0Wats0n Feb 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,57 +41,20 @@ 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
export const enum KnownBillingFrequency {
// (undocumented)
Monthly = "monthly"
}

// @public
export const enum KnownPhoneNumberAssignmentType {
// (undocumented)
Application = "application",
// (undocumented)
Person = "person"
}

// @public
export const enum KnownPhoneNumberCapabilityValue {
// (undocumented)
Inbound = "inbound",
// (undocumented)
InboundOutbound = "inbound+outbound",
// (undocumented)
None = "none",
// (undocumented)
Outbound = "outbound"
}

// @public
export const enum KnownPhoneNumberType {
// (undocumented)
Geographic = "geographic",
// (undocumented)
TollFree = "tollFree"
}

// @public
export interface ListPhoneNumbersOptions extends OperationOptions {
skip?: number;
top?: number;
}

// @public
export type PhoneNumberAssignmentType = string;
export type PhoneNumberAssignmentType = "person" | "application";

// @public
export interface PhoneNumberCapabilities {
Expand All @@ -106,12 +69,12 @@ export interface PhoneNumberCapabilitiesRequest {
}

// @public
export type PhoneNumberCapabilityValue = string;
export type PhoneNumberCapabilityValue = "none" | "inbound" | "outbound" | "inbound+outbound";

// @public
export interface PhoneNumberCost {
amount: number;
billingFrequency: BillingFrequency;
billingFrequency: "monthly";
currencyCode: string;
}

Expand Down Expand Up @@ -161,7 +124,7 @@ export interface PhoneNumberSearchResult {
}

// @public
export type PhoneNumberType = string;
export type PhoneNumberType = "geographic" | "tollFree";

// @public
export type VoidResponse = WithResponse<{}>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface PhoneNumberCost {
/** The ISO 4217 currency code for the cost amount, e.g. USD. */
currencyCode: string;
/** The frequency with which the cost gets billed. */
billingFrequency: BillingFrequency;
billingFrequency: "monthly";
}

/** The Communication Services error. */
Expand Down Expand Up @@ -203,111 +203,20 @@ export interface PhoneNumbersUpdateCapabilitiesHeaders {
capabilitiesId?: string;
}

/** Known values of {@link PhoneNumberType} that the service accepts. */
export const enum KnownPhoneNumberType {
Geographic = "geographic",
TollFree = "tollFree"
}

/**
* Defines values for PhoneNumberType. \
* {@link KnownPhoneNumberType} can be used interchangeably with PhoneNumberType,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **geographic** \
* **tollFree**
*/
export type PhoneNumberType = string;

/** Known values of {@link PhoneNumberAssignmentType} that the service accepts. */
export const enum KnownPhoneNumberAssignmentType {
Person = "person",
Application = "application"
}

/**
* Defines values for PhoneNumberAssignmentType. \
* {@link KnownPhoneNumberAssignmentType} can be used interchangeably with PhoneNumberAssignmentType,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **person** \
* **application**
*/
export type PhoneNumberAssignmentType = string;

/** Known values of {@link PhoneNumberCapabilityValue} that the service accepts. */
export const enum KnownPhoneNumberCapabilityValue {
None = "none",
Inbound = "inbound",
Outbound = "outbound",
InboundOutbound = "inbound+outbound"
}

/**
* Defines values for PhoneNumberCapabilityValue. \
* {@link KnownPhoneNumberCapabilityValue} can be used interchangeably with PhoneNumberCapabilityValue,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **none** \
* **inbound** \
* **outbound** \
* **inbound+outbound**
*/
export type PhoneNumberCapabilityValue = string;

/** Known values of {@link BillingFrequency} that the service accepts. */
export const enum KnownBillingFrequency {
Monthly = "monthly"
}

/**
* Defines values for BillingFrequency. \
* {@link KnownBillingFrequency} can be used interchangeably with BillingFrequency,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **monthly**
*/
export type BillingFrequency = string;

/** Known values of {@link PhoneNumberOperationStatus} that the service accepts. */
export const enum KnownPhoneNumberOperationStatus {
NotStarted = "notStarted",
Running = "running",
Succeeded = "succeeded",
Failed = "failed"
}

/**
* Defines values for PhoneNumberOperationStatus. \
* {@link KnownPhoneNumberOperationStatus} can be used interchangeably with PhoneNumberOperationStatus,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **notStarted** \
* **running** \
* **succeeded** \
* **failed**
*/
export type PhoneNumberOperationStatus = string;

/** Known values of {@link PhoneNumberOperationType} that the service accepts. */
export const enum KnownPhoneNumberOperationType {
Purchase = "purchase",
ReleasePhoneNumber = "releasePhoneNumber",
Search = "search",
UpdatePhoneNumberCapabilities = "updatePhoneNumberCapabilities"
}

/**
* Defines values for PhoneNumberOperationType. \
* {@link KnownPhoneNumberOperationType} can be used interchangeably with PhoneNumberOperationType,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **purchase** \
* **releasePhoneNumber** \
* **search** \
* **updatePhoneNumberCapabilities**
*/
export type PhoneNumberOperationType = string;
/** Defines values for PhoneNumberType. */
export type PhoneNumberType = "geographic" | "tollFree";
/** Defines values for PhoneNumberAssignmentType. */
export type PhoneNumberAssignmentType = "person" | "application";
/** Defines values for PhoneNumberCapabilityValue. */
export type PhoneNumberCapabilityValue = "none" | "inbound" | "outbound" | "inbound+outbound";
/** Defines values for PhoneNumberOperationStatus. */
export type PhoneNumberOperationStatus = "notStarted" | "running" | "succeeded" | "failed";
/** Defines values for PhoneNumberOperationType. */
export type PhoneNumberOperationType =
| "purchase"
| "releasePhoneNumber"
| "search"
| "updatePhoneNumberCapabilities";

/** Optional parameters. */
export interface PhoneNumbersSearchAvailablePhoneNumbersOptionalParams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ export const PhoneNumberSearchRequest: coreHttp.CompositeMapper = {
serializedName: "phoneNumberType",
required: true,
type: {
name: "String"
name: "Enum",
allowedValues: ["geographic", "tollFree"]
}
},
assignmentType: {
serializedName: "assignmentType",
required: true,
type: {
name: "String"
name: "Enum",
allowedValues: ["person", "application"]
}
},
capabilities: {
Expand Down Expand Up @@ -64,14 +66,16 @@ export const PhoneNumberCapabilities: coreHttp.CompositeMapper = {
serializedName: "calling",
required: true,
type: {
name: "String"
name: "Enum",
allowedValues: ["none", "inbound", "outbound", "inbound+outbound"]
}
},
sms: {
serializedName: "sms",
required: true,
type: {
name: "String"
name: "Enum",
allowedValues: ["none", "inbound", "outbound", "inbound+outbound"]
}
}
}
Expand Down Expand Up @@ -106,14 +110,16 @@ export const PhoneNumberSearchResult: coreHttp.CompositeMapper = {
serializedName: "phoneNumberType",
required: true,
type: {
name: "String"
name: "Enum",
allowedValues: ["geographic", "tollFree"]
}
},
assignmentType: {
serializedName: "assignmentType",
required: true,
type: {
name: "String"
name: "Enum",
allowedValues: ["person", "application"]
}
},
capabilities: {
Expand Down Expand Up @@ -161,8 +167,9 @@ export const PhoneNumberCost: coreHttp.CompositeMapper = {
}
},
billingFrequency: {
defaultValue: "monthly",
isConstant: true,
serializedName: "billingFrequency",
required: true,
type: {
name: "String"
}
Expand Down Expand Up @@ -261,7 +268,8 @@ export const PhoneNumberOperation: coreHttp.CompositeMapper = {
serializedName: "status",
required: true,
type: {
name: "String"
name: "Enum",
allowedValues: ["notStarted", "running", "succeeded", "failed"]
}
},
resourceLocation: {
Expand Down Expand Up @@ -295,7 +303,13 @@ export const PhoneNumberOperation: coreHttp.CompositeMapper = {
serializedName: "operationType",
required: true,
type: {
name: "String"
name: "Enum",
allowedValues: [
"purchase",
"releasePhoneNumber",
"search",
"updatePhoneNumberCapabilities"
]
}
},
lastActionDateTime: {
Expand Down Expand Up @@ -339,7 +353,8 @@ export const AcquiredPhoneNumber: coreHttp.CompositeMapper = {
serializedName: "phoneNumberType",
required: true,
type: {
name: "String"
name: "Enum",
allowedValues: ["geographic", "tollFree"]
}
},
capabilities: {
Expand All @@ -353,7 +368,8 @@ export const AcquiredPhoneNumber: coreHttp.CompositeMapper = {
serializedName: "assignmentType",
required: true,
type: {
name: "String"
name: "Enum",
allowedValues: ["person", "application"]
}
},
purchaseDate: {
Expand Down Expand Up @@ -409,13 +425,15 @@ export const PhoneNumberCapabilitiesRequest: coreHttp.CompositeMapper = {
calling: {
serializedName: "calling",
type: {
name: "String"
name: "Enum",
allowedValues: ["none", "inbound", "outbound", "inbound+outbound"]
}
},
sms: {
serializedName: "sms",
type: {
name: "String"
name: "Enum",
allowedValues: ["none", "inbound", "outbound", "inbound+outbound"]
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions sdk/communication/communication-phone-numbers/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ export interface ListPhoneNumbersOptions extends OperationOptions {

export {
AcquiredPhoneNumber,
BillingFrequency,
KnownBillingFrequency,
KnownPhoneNumberAssignmentType,
KnownPhoneNumberCapabilityValue,
KnownPhoneNumberType,
PhoneNumberAssignmentType,
PhoneNumberCapabilities,
PhoneNumberCapabilitiesRequest,
Expand Down
14 changes: 14 additions & 0 deletions sdk/communication/communication-phone-numbers/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,17 @@ use-extension:
add-credentials: false
azure-arm: false
```

## Customizations

### Disable extensible enums

```yaml
directive:
- from: swagger-document
where: $.definitions[*].properties[*]["x-ms-enum"]
transform: >
if ($.modelAsString) {
$.modelAsString = false
}
```
Loading