@azure/arm-cognitiveservices 7.2.1-alpha.20220930.1 → 7.3.0-alpha.20221102.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +17 -5
  2. package/dist/index.js +109 -16
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/accountsCreateSample.js +2 -2
  7. package/dist-esm/samples-dev/accountsDeleteSample.js +1 -1
  8. package/dist-esm/samples-dev/accountsGetSample.js +1 -1
  9. package/dist-esm/samples-dev/accountsListByResourceGroupSample.js +1 -1
  10. package/dist-esm/samples-dev/accountsListKeysSample.js +1 -1
  11. package/dist-esm/samples-dev/accountsListModelsSample.js +1 -1
  12. package/dist-esm/samples-dev/accountsListSample.js +1 -1
  13. package/dist-esm/samples-dev/accountsListSkusSample.js +1 -1
  14. package/dist-esm/samples-dev/accountsListUsagesSample.js +1 -1
  15. package/dist-esm/samples-dev/accountsRegenerateKeySample.js +1 -1
  16. package/dist-esm/samples-dev/accountsUpdateSample.js +1 -1
  17. package/dist-esm/samples-dev/checkDomainAvailabilitySample.js +1 -1
  18. package/dist-esm/samples-dev/checkSkuAvailabilitySample.js +1 -1
  19. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateSample.js +1 -1
  20. package/dist-esm/samples-dev/commitmentPlansDeleteSample.js +1 -1
  21. package/dist-esm/samples-dev/commitmentPlansGetSample.js +1 -1
  22. package/dist-esm/samples-dev/commitmentPlansListSample.js +1 -1
  23. package/dist-esm/samples-dev/commitmentTiersListSample.js +1 -1
  24. package/dist-esm/samples-dev/deletedAccountsGetSample.js +1 -1
  25. package/dist-esm/samples-dev/deletedAccountsListSample.js +1 -1
  26. package/dist-esm/samples-dev/deletedAccountsPurgeSample.js +1 -1
  27. package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js +1 -1
  28. package/dist-esm/samples-dev/deploymentsDeleteSample.js +1 -1
  29. package/dist-esm/samples-dev/deploymentsGetSample.js +1 -1
  30. package/dist-esm/samples-dev/deploymentsListSample.js +1 -1
  31. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  32. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +1 -1
  33. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +1 -1
  34. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +1 -1
  35. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +1 -1
  36. package/dist-esm/samples-dev/privateLinkResourcesListSample.js +1 -1
  37. package/dist-esm/samples-dev/resourceSkusListSample.js +1 -1
  38. package/dist-esm/src/cognitiveServicesManagementClient.d.ts.map +1 -1
  39. package/dist-esm/src/cognitiveServicesManagementClient.js +23 -15
  40. package/dist-esm/src/cognitiveServicesManagementClient.js.map +1 -1
  41. package/dist-esm/src/models/index.d.ts +92 -15
  42. package/dist-esm/src/models/index.d.ts.map +1 -1
  43. package/dist-esm/src/models/index.js +57 -0
  44. package/dist-esm/src/models/index.js.map +1 -1
  45. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  46. package/dist-esm/src/models/mappers.js +28 -0
  47. package/dist-esm/src/models/mappers.js.map +1 -1
  48. package/dist-esm/src/models/parameters.js +1 -1
  49. package/dist-esm/test/cognitiveservices_examples.js +1 -1
  50. package/dist-esm/test/cognitiveservices_examples.js.map +1 -1
  51. package/package.json +6 -6
  52. package/review/arm-cognitiveservices.api.md +29 -79
  53. package/src/cognitiveServicesManagementClient.ts +28 -18
  54. package/src/models/index.ts +89 -15
  55. package/src/models/mappers.ts +28 -0
  56. package/src/models/parameters.ts +1 -1
  57. package/types/arm-cognitiveservices.d.ts +92 -15
  58. package/types/tsdoc-metadata.json +1 -1
@@ -11,17 +11,17 @@ import { PollerLike } from '@azure/core-lro';
11
11
  import { PollOperationState } from '@azure/core-lro';
12
12
 
13
13
  // @public
14
- export type Account = AzureEntityResource & {
14
+ export interface Account extends AzureEntityResource {
15
+ identity?: Identity;
15
16
  kind?: string;
17
+ location?: string;
18
+ properties?: AccountProperties;
16
19
  sku?: Sku;
17
- identity?: Identity;
18
20
  readonly systemData?: SystemData;
19
21
  tags?: {
20
22
  [propertyName: string]: string;
21
23
  };
22
- location?: string;
23
- properties?: AccountProperties;
24
- };
24
+ }
25
25
 
26
26
  // @public
27
27
  export interface AccountListResult {
@@ -30,15 +30,15 @@ export interface AccountListResult {
30
30
  }
31
31
 
32
32
  // @public
33
- export type AccountModel = DeploymentModel & {
33
+ export interface AccountModel extends DeploymentModel {
34
34
  baseModel?: DeploymentModel;
35
- maxCapacity?: number;
36
35
  capabilities?: {
37
36
  [propertyName: string]: string;
38
37
  };
39
38
  deprecation?: ModelDeprecationInfo;
39
+ maxCapacity?: number;
40
40
  readonly systemData?: SystemData;
41
- };
41
+ }
42
42
 
43
43
  // @public
44
44
  export interface AccountModelListResult {
@@ -237,9 +237,9 @@ export interface ApiProperties {
237
237
  }
238
238
 
239
239
  // @public
240
- export type AzureEntityResource = Resource & {
240
+ export interface AzureEntityResource extends Resource {
241
241
  readonly etag?: string;
242
- };
242
+ }
243
243
 
244
244
  // @public
245
245
  export interface CallRateLimit {
@@ -332,11 +332,11 @@ export interface CommitmentPeriod {
332
332
  }
333
333
 
334
334
  // @public
335
- export type CommitmentPlan = ProxyResource & {
336
- readonly systemData?: SystemData;
335
+ export interface CommitmentPlan extends ProxyResource {
337
336
  readonly etag?: string;
338
337
  properties?: CommitmentPlanProperties;
339
- };
338
+ readonly systemData?: SystemData;
339
+ }
340
340
 
341
341
  // @public
342
342
  export interface CommitmentPlanListResult {
@@ -479,11 +479,11 @@ export interface DeletedAccountsPurgeOptionalParams extends coreClient.Operation
479
479
  }
480
480
 
481
481
  // @public
482
- export type Deployment = ProxyResource & {
483
- readonly systemData?: SystemData;
482
+ export interface Deployment extends ProxyResource {
484
483
  readonly etag?: string;
485
484
  properties?: DeploymentProperties;
486
- };
485
+ readonly systemData?: SystemData;
486
+ }
487
487
 
488
488
  // @public
489
489
  export interface DeploymentListResult {
@@ -493,6 +493,7 @@ export interface DeploymentListResult {
493
493
 
494
494
  // @public
495
495
  export interface DeploymentModel {
496
+ readonly callRateLimit?: CallRateLimit;
496
497
  format?: string;
497
498
  name?: string;
498
499
  version?: string;
@@ -500,8 +501,13 @@ export interface DeploymentModel {
500
501
 
501
502
  // @public
502
503
  export interface DeploymentProperties {
504
+ readonly callRateLimit?: CallRateLimit;
505
+ readonly capabilities?: {
506
+ [propertyName: string]: string;
507
+ };
503
508
  model?: DeploymentModel;
504
509
  readonly provisioningState?: DeploymentProvisioningState;
510
+ raiPolicyName?: string;
505
511
  scaleSettings?: DeploymentScaleSettings;
506
512
  }
507
513
 
@@ -634,179 +640,122 @@ export interface KeyVaultProperties {
634
640
 
635
641
  // @public
636
642
  export enum KnownActionType {
637
- // (undocumented)
638
643
  Internal = "Internal"
639
644
  }
640
645
 
641
646
  // @public
642
647
  export enum KnownCreatedByType {
643
- // (undocumented)
644
648
  Application = "Application",
645
- // (undocumented)
646
649
  Key = "Key",
647
- // (undocumented)
648
650
  ManagedIdentity = "ManagedIdentity",
649
- // (undocumented)
650
651
  User = "User"
651
652
  }
652
653
 
653
654
  // @public
654
655
  export enum KnownDeploymentProvisioningState {
655
- // (undocumented)
656
656
  Accepted = "Accepted",
657
- // (undocumented)
658
657
  Creating = "Creating",
659
- // (undocumented)
660
658
  Deleting = "Deleting",
661
- // (undocumented)
662
659
  Failed = "Failed",
663
- // (undocumented)
664
660
  Moving = "Moving",
665
- // (undocumented)
666
661
  Succeeded = "Succeeded"
667
662
  }
668
663
 
669
664
  // @public
670
665
  export enum KnownDeploymentScaleType {
671
- // (undocumented)
672
666
  Manual = "Manual",
673
- // (undocumented)
674
667
  Standard = "Standard"
675
668
  }
676
669
 
677
670
  // @public
678
671
  export enum KnownHostingModel {
679
- // (undocumented)
680
672
  ConnectedContainer = "ConnectedContainer",
681
- // (undocumented)
682
673
  DisconnectedContainer = "DisconnectedContainer",
683
- // (undocumented)
684
674
  Web = "Web"
685
675
  }
686
676
 
687
677
  // @public
688
678
  export enum KnownKeySource {
689
- // (undocumented)
690
679
  MicrosoftCognitiveServices = "Microsoft.CognitiveServices",
691
- // (undocumented)
692
680
  MicrosoftKeyVault = "Microsoft.KeyVault"
693
681
  }
694
682
 
695
683
  // @public
696
684
  export enum KnownNetworkRuleAction {
697
- // (undocumented)
698
685
  Allow = "Allow",
699
- // (undocumented)
700
686
  Deny = "Deny"
701
687
  }
702
688
 
703
689
  // @public
704
690
  export enum KnownOrigin {
705
- // (undocumented)
706
691
  System = "system",
707
- // (undocumented)
708
692
  User = "user",
709
- // (undocumented)
710
693
  UserSystem = "user,system"
711
694
  }
712
695
 
713
696
  // @public
714
697
  export enum KnownPrivateEndpointConnectionProvisioningState {
715
- // (undocumented)
716
698
  Creating = "Creating",
717
- // (undocumented)
718
699
  Deleting = "Deleting",
719
- // (undocumented)
720
700
  Failed = "Failed",
721
- // (undocumented)
722
701
  Succeeded = "Succeeded"
723
702
  }
724
703
 
725
704
  // @public
726
705
  export enum KnownPrivateEndpointServiceConnectionStatus {
727
- // (undocumented)
728
706
  Approved = "Approved",
729
- // (undocumented)
730
707
  Pending = "Pending",
731
- // (undocumented)
732
708
  Rejected = "Rejected"
733
709
  }
734
710
 
735
711
  // @public
736
712
  export enum KnownProvisioningState {
737
- // (undocumented)
738
713
  Accepted = "Accepted",
739
- // (undocumented)
740
714
  Creating = "Creating",
741
- // (undocumented)
742
715
  Deleting = "Deleting",
743
- // (undocumented)
744
716
  Failed = "Failed",
745
- // (undocumented)
746
717
  Moving = "Moving",
747
- // (undocumented)
748
718
  ResolvingDNS = "ResolvingDNS",
749
- // (undocumented)
750
719
  Succeeded = "Succeeded"
751
720
  }
752
721
 
753
722
  // @public
754
723
  export enum KnownPublicNetworkAccess {
755
- // (undocumented)
756
724
  Disabled = "Disabled",
757
- // (undocumented)
758
725
  Enabled = "Enabled"
759
726
  }
760
727
 
761
728
  // @public
762
729
  export enum KnownQuotaUsageStatus {
763
- // (undocumented)
764
730
  Blocked = "Blocked",
765
- // (undocumented)
766
731
  Included = "Included",
767
- // (undocumented)
768
732
  InOverage = "InOverage",
769
- // (undocumented)
770
733
  Unknown = "Unknown"
771
734
  }
772
735
 
773
736
  // @public
774
737
  export enum KnownResourceSkuRestrictionsReasonCode {
775
- // (undocumented)
776
738
  NotAvailableForSubscription = "NotAvailableForSubscription",
777
- // (undocumented)
778
739
  QuotaId = "QuotaId"
779
740
  }
780
741
 
781
742
  // @public
782
743
  export enum KnownSkuTier {
783
- // (undocumented)
784
744
  Basic = "Basic",
785
- // (undocumented)
786
745
  Enterprise = "Enterprise",
787
- // (undocumented)
788
746
  Free = "Free",
789
- // (undocumented)
790
747
  Premium = "Premium",
791
- // (undocumented)
792
748
  Standard = "Standard"
793
749
  }
794
750
 
795
751
  // @public
796
752
  export enum KnownUnitType {
797
- // (undocumented)
798
753
  Bytes = "Bytes",
799
- // (undocumented)
800
754
  BytesPerSecond = "BytesPerSecond",
801
- // (undocumented)
802
755
  Count = "Count",
803
- // (undocumented)
804
756
  CountPerSecond = "CountPerSecond",
805
- // (undocumented)
806
757
  Milliseconds = "Milliseconds",
807
- // (undocumented)
808
758
  Percent = "Percent",
809
- // (undocumented)
810
759
  Seconds = "Seconds"
811
760
  }
812
761
 
@@ -883,11 +832,11 @@ export interface PrivateEndpoint {
883
832
  }
884
833
 
885
834
  // @public
886
- export type PrivateEndpointConnection = AzureEntityResource & {
835
+ export interface PrivateEndpointConnection extends AzureEntityResource {
836
+ location?: string;
887
837
  properties?: PrivateEndpointConnectionProperties;
888
838
  readonly systemData?: SystemData;
889
- location?: string;
890
- };
839
+ }
891
840
 
892
841
  // @public
893
842
  export interface PrivateEndpointConnectionListResult {
@@ -948,9 +897,9 @@ export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionLi
948
897
  export type PrivateEndpointServiceConnectionStatus = string;
949
898
 
950
899
  // @public
951
- export type PrivateLinkResource = Resource & {
900
+ export interface PrivateLinkResource extends Resource {
952
901
  properties?: PrivateLinkResourceProperties;
953
- };
902
+ }
954
903
 
955
904
  // @public
956
905
  export interface PrivateLinkResourceListResult {
@@ -988,7 +937,8 @@ export interface PrivateLinkServiceConnectionState {
988
937
  export type ProvisioningState = string;
989
938
 
990
939
  // @public
991
- export type ProxyResource = Resource;
940
+ export interface ProxyResource extends Resource {
941
+ }
992
942
 
993
943
  // @public
994
944
  export type PublicNetworkAccess = string;
@@ -78,12 +78,15 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient
78
78
  credential: credentials
79
79
  };
80
80
 
81
- const packageDetails = `azsdk-js-arm-cognitiveservices/7.2.1`;
81
+ const packageDetails = `azsdk-js-arm-cognitiveservices/7.3.0`;
82
82
  const userAgentPrefix =
83
83
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
84
84
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
85
85
  : `${packageDetails}`;
86
86
 
87
+ if (!options.credentialScopes) {
88
+ options.credentialScopes = ["https://management.azure.com/.default"];
89
+ }
87
90
  const optionsWithDefaults = {
88
91
  ...defaults,
89
92
  ...options,
@@ -95,34 +98,41 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient
95
98
  };
96
99
  super(optionsWithDefaults);
97
100
 
101
+ let bearerTokenAuthenticationPolicyFound: boolean = false;
98
102
  if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
99
103
  const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
100
- const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
104
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
101
105
  (pipelinePolicy) =>
102
106
  pipelinePolicy.name ===
103
107
  coreRestPipeline.bearerTokenAuthenticationPolicyName
104
108
  );
105
- if (!bearerTokenAuthenticationPolicyFound) {
106
- this.pipeline.removePolicy({
107
- name: coreRestPipeline.bearerTokenAuthenticationPolicyName
108
- });
109
- this.pipeline.addPolicy(
110
- coreRestPipeline.bearerTokenAuthenticationPolicy({
111
- scopes: `${optionsWithDefaults.baseUri}/.default`,
112
- challengeCallbacks: {
113
- authorizeRequestOnChallenge:
114
- coreClient.authorizeRequestOnClaimChallenge
115
- }
116
- })
117
- );
118
- }
109
+ }
110
+ if (
111
+ !options ||
112
+ !options.pipeline ||
113
+ options.pipeline.getOrderedPolicies().length == 0 ||
114
+ !bearerTokenAuthenticationPolicyFound
115
+ ) {
116
+ this.pipeline.removePolicy({
117
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
118
+ });
119
+ this.pipeline.addPolicy(
120
+ coreRestPipeline.bearerTokenAuthenticationPolicy({
121
+ credential: credentials,
122
+ scopes: `${optionsWithDefaults.credentialScopes}`,
123
+ challengeCallbacks: {
124
+ authorizeRequestOnChallenge:
125
+ coreClient.authorizeRequestOnClaimChallenge
126
+ }
127
+ })
128
+ );
119
129
  }
120
130
  // Parameter assignments
121
131
  this.subscriptionId = subscriptionId;
122
132
 
123
133
  // Assigning values to Constant parameters
124
134
  this.$host = options.$host || "https://management.azure.com";
125
- this.apiVersion = options.apiVersion || "2022-03-01";
135
+ this.apiVersion = options.apiVersion || "2022-10-01";
126
136
  this.accounts = new AccountsImpl(this);
127
137
  this.deletedAccounts = new DeletedAccountsImpl(this);
128
138
  this.resourceSkus = new ResourceSkusImpl(this);
@@ -150,7 +160,7 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient
150
160
  if (param.length > 1) {
151
161
  const newParams = param[1].split("&").map((item) => {
152
162
  if (item.indexOf("api-version") > -1) {
153
- return item.replace(/(?<==).*$/, apiVersion);
163
+ return "api-version=" + apiVersion;
154
164
  } else {
155
165
  return item;
156
166
  }