@azure/arm-billing 5.0.1 → 5.0.2-alpha.20250929.1
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.
- package/CHANGELOG.md +7 -1
- package/dist/browser/billingManagementClient.js +1 -1
- package/dist/browser/billingManagementClient.js.map +1 -1
- package/dist/commonjs/billingManagementClient.js +1 -1
- package/dist/commonjs/billingManagementClient.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/billingManagementClient.js +1 -1
- package/dist/esm/billingManagementClient.js.map +1 -1
- package/dist/react-native/billingManagementClient.js +1 -1
- package/dist/react-native/billingManagementClient.js.map +1 -1
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
-
## 5.0.
|
|
3
|
+
## 5.0.2 (Unreleased)
|
|
4
4
|
|
|
5
5
|
### Features Added
|
|
6
6
|
|
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### Other Changes
|
|
12
12
|
|
|
13
|
+
## 5.0.1 (2025-08-22)
|
|
14
|
+
|
|
15
|
+
### Other Changes
|
|
16
|
+
|
|
17
|
+
- Other fixes
|
|
18
|
+
|
|
13
19
|
## 5.0.0 (2024-09-04)
|
|
14
20
|
|
|
15
21
|
### Features Added
|
|
@@ -31,7 +31,7 @@ export class BillingManagementClient extends coreClient.ServiceClient {
|
|
|
31
31
|
requestContentType: "application/json; charset=utf-8",
|
|
32
32
|
credential: credentials,
|
|
33
33
|
};
|
|
34
|
-
const packageDetails = `azsdk-js-arm-billing/5.0.
|
|
34
|
+
const packageDetails = `azsdk-js-arm-billing/5.0.2`;
|
|
35
35
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
36
36
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
37
37
|
: `${packageDetails}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billingManagementClient.js","sourceRoot":"","sources":["../../src/billingManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EACX,sBAAsB,EACtB,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACnB,0BAA0B,EAC1B,mCAAmC,EACnC,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,+BAA+B,EAC/B,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAmC/B,MAAM,OAAO,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IACnE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAU;IAiBxB,YACE,WAAqC,EACrC,uBAAwE,EACxE,OAA+C;QAE/C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,cAAkC,CAAC;QAEvC,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YAChD,cAAc,GAAG,uBAAuB,CAAC;QAC3C,CAAC;aAAM,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YACvD,OAAO,GAAG,uBAAuB,CAAC;QACpC,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,G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kB;IACjC,sBAAsB,CAAyB;IAC/C,+BAA+B,CAAkC;IACjE,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,oBAAoB,CAAuB;IAC3C,2BAA2B,CAA8B;IACzD,SAAS,CAAY;IACrB,WAAW,CAAc;IACzB,kBAAkB,CAAqB;IACvC,QAAQ,CAAW;IACnB,eAAe,CAAkB;IACjC,UAAU,CAAa;IACvB,cAAc,CAAiB;IAC/B,QAAQ,CAAW;IACnB,QAAQ,CAAW;IACnB,YAAY,CAAe;IAC3B,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,SAAS,CAAY;IACrB,gBAAgB,CAAmB;IACnC,kBAAkB,CAAqB;CACxC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n AgreementsImpl,\n AssociatedTenantsImpl,\n AvailableBalancesImpl,\n BillingAccountsImpl,\n AddressImpl,\n BillingPermissionsImpl,\n BillingProfilesImpl,\n BillingPropertyOperationsImpl,\n BillingRequestsImpl,\n BillingRoleAssignmentsImpl,\n BillingRoleDefinitionOperationsImpl,\n SavingsPlanOrdersImpl,\n SavingsPlansImpl,\n BillingSubscriptionsImpl,\n BillingSubscriptionsAliasesImpl,\n CustomersImpl,\n DepartmentsImpl,\n EnrollmentAccountsImpl,\n InvoicesImpl,\n InvoiceSectionsImpl,\n OperationsImpl,\n PaymentMethodsImpl,\n PoliciesImpl,\n ProductsImpl,\n ReservationsImpl,\n ReservationOrdersImpl,\n TransactionsImpl,\n TransfersImpl,\n PartnerTransfersImpl,\n RecipientTransfersImpl,\n} from \"./operations/index.js\";\nimport {\n Agreements,\n AssociatedTenants,\n AvailableBalances,\n BillingAccounts,\n Address,\n BillingPermissions,\n BillingProfiles,\n BillingPropertyOperations,\n BillingRequests,\n BillingRoleAssignments,\n BillingRoleDefinitionOperations,\n SavingsPlanOrders,\n SavingsPlans,\n BillingSubscriptions,\n BillingSubscriptionsAliases,\n Customers,\n Departments,\n EnrollmentAccounts,\n Invoices,\n InvoiceSections,\n Operations,\n PaymentMethods,\n Policies,\n Products,\n Reservations,\n ReservationOrders,\n Transactions,\n Transfers,\n PartnerTransfers,\n RecipientTransfers,\n} from \"./operationsInterfaces/index.js\";\nimport { BillingManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class BillingManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the BillingManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID that uniquely identifies a billing subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: BillingManagementClientOptionalParams | string,\n options?: BillingManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: BillingManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-billing/5.0.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-04-01\";\n this.agreements = new AgreementsImpl(this);\n this.associatedTenants = new AssociatedTenantsImpl(this);\n this.availableBalances = new AvailableBalancesImpl(this);\n this.billingAccounts = new BillingAccountsImpl(this);\n this.address = new AddressImpl(this);\n this.billingPermissions = new BillingPermissionsImpl(this);\n this.billingProfiles = new BillingProfilesImpl(this);\n this.billingPropertyOperations = new BillingPropertyOperationsImpl(this);\n this.billingRequests = new BillingRequestsImpl(this);\n this.billingRoleAssignments = new BillingRoleAssignmentsImpl(this);\n this.billingRoleDefinitionOperations =\n new BillingRoleDefinitionOperationsImpl(this);\n this.savingsPlanOrders = new SavingsPlanOrdersImpl(this);\n this.savingsPlans = new SavingsPlansImpl(this);\n this.billingSubscriptions = new BillingSubscriptionsImpl(this);\n this.billingSubscriptionsAliases = new BillingSubscriptionsAliasesImpl(\n this,\n );\n this.customers = new CustomersImpl(this);\n this.departments = new DepartmentsImpl(this);\n this.enrollmentAccounts = new EnrollmentAccountsImpl(this);\n this.invoices = new InvoicesImpl(this);\n this.invoiceSections = new InvoiceSectionsImpl(this);\n this.operations = new OperationsImpl(this);\n this.paymentMethods = new PaymentMethodsImpl(this);\n this.policies = new PoliciesImpl(this);\n this.products = new ProductsImpl(this);\n this.reservations = new ReservationsImpl(this);\n this.reservationOrders = new ReservationOrdersImpl(this);\n this.transactions = new TransactionsImpl(this);\n this.transfers = new TransfersImpl(this);\n this.partnerTransfers = new PartnerTransfersImpl(this);\n this.recipientTransfers = new RecipientTransfersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n agreements: Agreements;\n associatedTenants: AssociatedTenants;\n availableBalances: AvailableBalances;\n billingAccounts: BillingAccounts;\n address: Address;\n billingPermissions: BillingPermissions;\n billingProfiles: BillingProfiles;\n billingPropertyOperations: BillingPropertyOperations;\n billingRequests: BillingRequests;\n billingRoleAssignments: BillingRoleAssignments;\n billingRoleDefinitionOperations: BillingRoleDefinitionOperations;\n savingsPlanOrders: SavingsPlanOrders;\n savingsPlans: SavingsPlans;\n billingSubscriptions: BillingSubscriptions;\n billingSubscriptionsAliases: BillingSubscriptionsAliases;\n customers: Customers;\n departments: Departments;\n enrollmentAccounts: EnrollmentAccounts;\n invoices: Invoices;\n invoiceSections: InvoiceSections;\n operations: Operations;\n paymentMethods: PaymentMethods;\n policies: Policies;\n products: Products;\n reservations: Reservations;\n reservationOrders: ReservationOrders;\n transactions: Transactions;\n transfers: Transfers;\n partnerTransfers: PartnerTransfers;\n recipientTransfers: RecipientTransfers;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"billingManagementClient.js","sourceRoot":"","sources":["../../src/billingManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EACX,sBAAsB,EACtB,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACnB,0BAA0B,EAC1B,mCAAmC,EACnC,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,+BAA+B,EAC/B,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAmC/B,MAAM,OAAO,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IACnE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAU;IAiBxB,YACE,WAAqC,EACrC,uBAAwE,EACxE,OAA+C;QAE/C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;Y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,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,UAAU,CAAa;IACvB,iBAAiB,CAAoB;IACrC,iBAAiB,CAAoB;IACrC,eAAe,CAAkB;IACjC,OAAO,CAAU;IACjB,kBAAkB,CAAqB;IACvC,eAAe,CAAkB;IACjC,yBAAyB,CAA4B;IACrD,eAAe,CAAkB;IACjC,sBAAsB,CAAyB;IAC/C,+BAA+B,CAAkC;IACjE,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,oBAAoB,CAAuB;IAC3C,2BAA2B,CAA8B;IACzD,SAAS,CAAY;IACrB,WAAW,CAAc;IACzB,kBAAkB,CAAqB;IACvC,QAAQ,CAAW;IACnB,eAAe,CAAkB;IACjC,UAAU,CAAa;IACvB,cAAc,CAAiB;IAC/B,QAAQ,CAAW;IACnB,QAAQ,CAAW;IACnB,YAAY,CAAe;IAC3B,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,SAAS,CAAY;IACrB,gBAAgB,CAAmB;IACnC,kBAAkB,CAAqB;CACxC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n AgreementsImpl,\n AssociatedTenantsImpl,\n AvailableBalancesImpl,\n BillingAccountsImpl,\n AddressImpl,\n BillingPermissionsImpl,\n BillingProfilesImpl,\n BillingPropertyOperationsImpl,\n BillingRequestsImpl,\n BillingRoleAssignmentsImpl,\n BillingRoleDefinitionOperationsImpl,\n SavingsPlanOrdersImpl,\n SavingsPlansImpl,\n BillingSubscriptionsImpl,\n BillingSubscriptionsAliasesImpl,\n CustomersImpl,\n DepartmentsImpl,\n EnrollmentAccountsImpl,\n InvoicesImpl,\n InvoiceSectionsImpl,\n OperationsImpl,\n PaymentMethodsImpl,\n PoliciesImpl,\n ProductsImpl,\n ReservationsImpl,\n ReservationOrdersImpl,\n TransactionsImpl,\n TransfersImpl,\n PartnerTransfersImpl,\n RecipientTransfersImpl,\n} from \"./operations/index.js\";\nimport {\n Agreements,\n AssociatedTenants,\n AvailableBalances,\n BillingAccounts,\n Address,\n BillingPermissions,\n BillingProfiles,\n BillingPropertyOperations,\n BillingRequests,\n BillingRoleAssignments,\n BillingRoleDefinitionOperations,\n SavingsPlanOrders,\n SavingsPlans,\n BillingSubscriptions,\n BillingSubscriptionsAliases,\n Customers,\n Departments,\n EnrollmentAccounts,\n Invoices,\n InvoiceSections,\n Operations,\n PaymentMethods,\n Policies,\n Products,\n Reservations,\n ReservationOrders,\n Transactions,\n Transfers,\n PartnerTransfers,\n RecipientTransfers,\n} from \"./operationsInterfaces/index.js\";\nimport { BillingManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class BillingManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the BillingManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID that uniquely identifies a billing subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: BillingManagementClientOptionalParams | string,\n options?: BillingManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: BillingManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-billing/5.0.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-04-01\";\n this.agreements = new AgreementsImpl(this);\n this.associatedTenants = new AssociatedTenantsImpl(this);\n this.availableBalances = new AvailableBalancesImpl(this);\n this.billingAccounts = new BillingAccountsImpl(this);\n this.address = new AddressImpl(this);\n this.billingPermissions = new BillingPermissionsImpl(this);\n this.billingProfiles = new BillingProfilesImpl(this);\n this.billingPropertyOperations = new BillingPropertyOperationsImpl(this);\n this.billingRequests = new BillingRequestsImpl(this);\n this.billingRoleAssignments = new BillingRoleAssignmentsImpl(this);\n this.billingRoleDefinitionOperations =\n new BillingRoleDefinitionOperationsImpl(this);\n this.savingsPlanOrders = new SavingsPlanOrdersImpl(this);\n this.savingsPlans = new SavingsPlansImpl(this);\n this.billingSubscriptions = new BillingSubscriptionsImpl(this);\n this.billingSubscriptionsAliases = new BillingSubscriptionsAliasesImpl(\n this,\n );\n this.customers = new CustomersImpl(this);\n this.departments = new DepartmentsImpl(this);\n this.enrollmentAccounts = new EnrollmentAccountsImpl(this);\n this.invoices = new InvoicesImpl(this);\n this.invoiceSections = new InvoiceSectionsImpl(this);\n this.operations = new OperationsImpl(this);\n this.paymentMethods = new PaymentMethodsImpl(this);\n this.policies = new PoliciesImpl(this);\n this.products = new ProductsImpl(this);\n this.reservations = new ReservationsImpl(this);\n this.reservationOrders = new ReservationOrdersImpl(this);\n this.transactions = new TransactionsImpl(this);\n this.transfers = new TransfersImpl(this);\n this.partnerTransfers = new PartnerTransfersImpl(this);\n this.recipientTransfers = new RecipientTransfersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n agreements: Agreements;\n associatedTenants: AssociatedTenants;\n availableBalances: AvailableBalances;\n billingAccounts: BillingAccounts;\n address: Address;\n billingPermissions: BillingPermissions;\n billingProfiles: BillingProfiles;\n billingPropertyOperations: BillingPropertyOperations;\n billingRequests: BillingRequests;\n billingRoleAssignments: BillingRoleAssignments;\n billingRoleDefinitionOperations: BillingRoleDefinitionOperations;\n savingsPlanOrders: SavingsPlanOrders;\n savingsPlans: SavingsPlans;\n billingSubscriptions: BillingSubscriptions;\n billingSubscriptionsAliases: BillingSubscriptionsAliases;\n customers: Customers;\n departments: Departments;\n enrollmentAccounts: EnrollmentAccounts;\n invoices: Invoices;\n invoiceSections: InvoiceSections;\n operations: Operations;\n paymentMethods: PaymentMethods;\n policies: Policies;\n products: Products;\n reservations: Reservations;\n reservationOrders: ReservationOrders;\n transactions: Transactions;\n transfers: Transfers;\n partnerTransfers: PartnerTransfers;\n recipientTransfers: RecipientTransfers;\n}\n"]}
|
|
@@ -35,7 +35,7 @@ class BillingManagementClient extends coreClient.ServiceClient {
|
|
|
35
35
|
requestContentType: "application/json; charset=utf-8",
|
|
36
36
|
credential: credentials,
|
|
37
37
|
};
|
|
38
|
-
const packageDetails = `azsdk-js-arm-billing/5.0.
|
|
38
|
+
const packageDetails = `azsdk-js-arm-billing/5.0.2`;
|
|
39
39
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
40
40
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
41
41
|
: `${packageDetails}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billingManagementClient.js","sourceRoot":"","sources":["../../src/billingManagementClient.ts"],"names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C,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,UAAU,CAAa;IACvB,iBAAiB,CAAoB;IACrC,iBAAiB,CAAoB;IACrC,eAAe,CAAkB;IACjC,OAAO,CAAU;IACjB,kBAAkB,CAAqB;IACvC,eAAe,CAAkB;IACjC,yBAAyB,CAA4B;IACrD,eAAe,CAAkB;IACjC,sBAAsB,CAAyB;IAC/C,+BAA+B,CAAkC;IACjE,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,oBAAoB,CAAuB;IAC3C,2BAA2B,CAA8B;IACzD,SAAS,CAAY;IACrB,WAAW,CAAc;IACzB,kBAAkB,CAAqB;IACvC,QAAQ,CAAW;IACnB,eAAe,CAAkB;IACjC,UAAU,CAAa;IACvB,cAAc,CAAiB;IAC/B,QAAQ,CAAW;IACnB,QAAQ,CAAW;IACnB,YAAY,CAAe;IAC3B,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,SAAS,CAAY;IACrB,gBAAgB,CAAmB;IACnC,kBAAkB,CAAqB;CACxC;AAnMD,0DAmMC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n AgreementsImpl,\n AssociatedTenantsImpl,\n AvailableBalancesImpl,\n BillingAccountsImpl,\n AddressImpl,\n BillingPermissionsImpl,\n BillingProfilesImpl,\n BillingPropertyOperationsImpl,\n BillingRequestsImpl,\n BillingRoleAssignmentsImpl,\n BillingRoleDefinitionOperationsImpl,\n SavingsPlanOrdersImpl,\n SavingsPlansImpl,\n BillingSubscriptionsImpl,\n BillingSubscriptionsAliasesImpl,\n CustomersImpl,\n DepartmentsImpl,\n EnrollmentAccountsImpl,\n InvoicesImpl,\n InvoiceSectionsImpl,\n OperationsImpl,\n PaymentMethodsImpl,\n PoliciesImpl,\n ProductsImpl,\n ReservationsImpl,\n ReservationOrdersImpl,\n TransactionsImpl,\n TransfersImpl,\n PartnerTransfersImpl,\n RecipientTransfersImpl,\n} from \"./operations/index.js\";\nimport {\n Agreements,\n AssociatedTenants,\n AvailableBalances,\n BillingAccounts,\n Address,\n BillingPermissions,\n BillingProfiles,\n BillingPropertyOperations,\n BillingRequests,\n BillingRoleAssignments,\n BillingRoleDefinitionOperations,\n SavingsPlanOrders,\n SavingsPlans,\n BillingSubscriptions,\n BillingSubscriptionsAliases,\n Customers,\n Departments,\n EnrollmentAccounts,\n Invoices,\n InvoiceSections,\n Operations,\n PaymentMethods,\n Policies,\n Products,\n Reservations,\n ReservationOrders,\n Transactions,\n Transfers,\n PartnerTransfers,\n RecipientTransfers,\n} from \"./operationsInterfaces/index.js\";\nimport { BillingManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class BillingManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the BillingManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID that uniquely identifies a billing subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: BillingManagementClientOptionalParams | string,\n options?: BillingManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: BillingManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-billing/5.0.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-04-01\";\n this.agreements = new AgreementsImpl(this);\n this.associatedTenants = new AssociatedTenantsImpl(this);\n this.availableBalances = new AvailableBalancesImpl(this);\n this.billingAccounts = new BillingAccountsImpl(this);\n this.address = new AddressImpl(this);\n this.billingPermissions = new BillingPermissionsImpl(this);\n this.billingProfiles = new BillingProfilesImpl(this);\n this.billingPropertyOperations = new BillingPropertyOperationsImpl(this);\n this.billingRequests = new BillingRequestsImpl(this);\n this.billingRoleAssignments = new BillingRoleAssignmentsImpl(this);\n this.billingRoleDefinitionOperations =\n new BillingRoleDefinitionOperationsImpl(this);\n this.savingsPlanOrders = new SavingsPlanOrdersImpl(this);\n this.savingsPlans = new SavingsPlansImpl(this);\n this.billingSubscriptions = new BillingSubscriptionsImpl(this);\n this.billingSubscriptionsAliases = new BillingSubscriptionsAliasesImpl(\n this,\n );\n this.customers = new CustomersImpl(this);\n this.departments = new DepartmentsImpl(this);\n this.enrollmentAccounts = new EnrollmentAccountsImpl(this);\n this.invoices = new InvoicesImpl(this);\n this.invoiceSections = new InvoiceSectionsImpl(this);\n this.operations = new OperationsImpl(this);\n this.paymentMethods = new PaymentMethodsImpl(this);\n this.policies = new PoliciesImpl(this);\n this.products = new ProductsImpl(this);\n this.reservations = new ReservationsImpl(this);\n this.reservationOrders = new ReservationOrdersImpl(this);\n this.transactions = new TransactionsImpl(this);\n this.transfers = new TransfersImpl(this);\n this.partnerTransfers = new PartnerTransfersImpl(this);\n this.recipientTransfers = new RecipientTransfersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n agreements: Agreements;\n associatedTenants: AssociatedTenants;\n availableBalances: AvailableBalances;\n billingAccounts: BillingAccounts;\n address: Address;\n billingPermissions: BillingPermissions;\n billingProfiles: BillingProfiles;\n billingPropertyOperations: BillingPropertyOperations;\n billingRequests: BillingRequests;\n billingRoleAssignments: BillingRoleAssignments;\n billingRoleDefinitionOperations: BillingRoleDefinitionOperations;\n savingsPlanOrders: SavingsPlanOrders;\n savingsPlans: SavingsPlans;\n billingSubscriptions: BillingSubscriptions;\n billingSubscriptionsAliases: BillingSubscriptionsAliases;\n customers: Customers;\n departments: Departments;\n enrollmentAccounts: EnrollmentAccounts;\n invoices: Invoices;\n invoiceSections: InvoiceSections;\n operations: Operations;\n paymentMethods: PaymentMethods;\n policies: Policies;\n products: Products;\n reservations: Reservations;\n reservationOrders: ReservationOrders;\n transactions: Transactions;\n transfers: Transfers;\n partnerTransfers: PartnerTransfers;\n recipientTransfers: RecipientTransfers;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"billingManagementClient.js","sourceRoot":"","sources":["../../src/billingManagementClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,oDA+B+B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AAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,UAAU,CAAa;IACvB,iBAAiB,CAAoB;IACrC,iBAAiB,CAAoB;IACrC,eAAe,CAAkB;IACjC,OAAO,CAAU;IACjB,kBAAkB,CAAqB;IACvC,eAAe,CAAkB;IACjC,yBAAyB,CAA4B;IACrD,eAAe,CAAkB;IACjC,sBAAsB,CAAyB;IAC/C,+BAA+B,CAAkC;IACjE,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,oBAAoB,CAAuB;IAC3C,2BAA2B,CAA8B;IACzD,SAAS,CAAY;IACrB,WAAW,CAAc;IACzB,kBAAkB,CAAqB;IACvC,QAAQ,CAAW;IACnB,eAAe,CAAkB;IACjC,UAAU,CAAa;IACvB,cAAc,CAAiB;IAC/B,QAAQ,CAAW;IACnB,QAAQ,CAAW;IACnB,YAAY,CAAe;IAC3B,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,SAAS,CAAY;IACrB,gBAAgB,CAAmB;IACnC,kBAAkB,CAAqB;CACxC;AAnMD,0DAmMC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n AgreementsImpl,\n AssociatedTenantsImpl,\n AvailableBalancesImpl,\n BillingAccountsImpl,\n AddressImpl,\n BillingPermissionsImpl,\n BillingProfilesImpl,\n BillingPropertyOperationsImpl,\n BillingRequestsImpl,\n BillingRoleAssignmentsImpl,\n BillingRoleDefinitionOperationsImpl,\n SavingsPlanOrdersImpl,\n SavingsPlansImpl,\n BillingSubscriptionsImpl,\n BillingSubscriptionsAliasesImpl,\n CustomersImpl,\n DepartmentsImpl,\n EnrollmentAccountsImpl,\n InvoicesImpl,\n InvoiceSectionsImpl,\n OperationsImpl,\n PaymentMethodsImpl,\n PoliciesImpl,\n ProductsImpl,\n ReservationsImpl,\n ReservationOrdersImpl,\n TransactionsImpl,\n TransfersImpl,\n PartnerTransfersImpl,\n RecipientTransfersImpl,\n} from \"./operations/index.js\";\nimport {\n Agreements,\n AssociatedTenants,\n AvailableBalances,\n BillingAccounts,\n Address,\n BillingPermissions,\n BillingProfiles,\n BillingPropertyOperations,\n BillingRequests,\n BillingRoleAssignments,\n BillingRoleDefinitionOperations,\n SavingsPlanOrders,\n SavingsPlans,\n BillingSubscriptions,\n BillingSubscriptionsAliases,\n Customers,\n Departments,\n EnrollmentAccounts,\n Invoices,\n InvoiceSections,\n Operations,\n PaymentMethods,\n Policies,\n Products,\n Reservations,\n ReservationOrders,\n Transactions,\n Transfers,\n PartnerTransfers,\n RecipientTransfers,\n} from \"./operationsInterfaces/index.js\";\nimport { BillingManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class BillingManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the BillingManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID that uniquely identifies a billing subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: BillingManagementClientOptionalParams | string,\n options?: BillingManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: BillingManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-billing/5.0.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-04-01\";\n this.agreements = new AgreementsImpl(this);\n this.associatedTenants = new AssociatedTenantsImpl(this);\n this.availableBalances = new AvailableBalancesImpl(this);\n this.billingAccounts = new BillingAccountsImpl(this);\n this.address = new AddressImpl(this);\n this.billingPermissions = new BillingPermissionsImpl(this);\n this.billingProfiles = new BillingProfilesImpl(this);\n this.billingPropertyOperations = new BillingPropertyOperationsImpl(this);\n this.billingRequests = new BillingRequestsImpl(this);\n this.billingRoleAssignments = new BillingRoleAssignmentsImpl(this);\n this.billingRoleDefinitionOperations =\n new BillingRoleDefinitionOperationsImpl(this);\n this.savingsPlanOrders = new SavingsPlanOrdersImpl(this);\n this.savingsPlans = new SavingsPlansImpl(this);\n this.billingSubscriptions = new BillingSubscriptionsImpl(this);\n this.billingSubscriptionsAliases = new BillingSubscriptionsAliasesImpl(\n this,\n );\n this.customers = new CustomersImpl(this);\n this.departments = new DepartmentsImpl(this);\n this.enrollmentAccounts = new EnrollmentAccountsImpl(this);\n this.invoices = new InvoicesImpl(this);\n this.invoiceSections = new InvoiceSectionsImpl(this);\n this.operations = new OperationsImpl(this);\n this.paymentMethods = new PaymentMethodsImpl(this);\n this.policies = new PoliciesImpl(this);\n this.products = new ProductsImpl(this);\n this.reservations = new ReservationsImpl(this);\n this.reservationOrders = new ReservationOrdersImpl(this);\n this.transactions = new TransactionsImpl(this);\n this.transfers = new TransfersImpl(this);\n this.partnerTransfers = new PartnerTransfersImpl(this);\n this.recipientTransfers = new RecipientTransfersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n agreements: Agreements;\n associatedTenants: AssociatedTenants;\n availableBalances: AvailableBalances;\n billingAccounts: BillingAccounts;\n address: Address;\n billingPermissions: BillingPermissions;\n billingProfiles: BillingProfiles;\n billingPropertyOperations: BillingPropertyOperations;\n billingRequests: BillingRequests;\n billingRoleAssignments: BillingRoleAssignments;\n billingRoleDefinitionOperations: BillingRoleDefinitionOperations;\n savingsPlanOrders: SavingsPlanOrders;\n savingsPlans: SavingsPlans;\n billingSubscriptions: BillingSubscriptions;\n billingSubscriptionsAliases: BillingSubscriptionsAliases;\n customers: Customers;\n departments: Departments;\n enrollmentAccounts: EnrollmentAccounts;\n invoices: Invoices;\n invoiceSections: InvoiceSections;\n operations: Operations;\n paymentMethods: PaymentMethods;\n policies: Policies;\n products: Products;\n reservations: Reservations;\n reservationOrders: ReservationOrders;\n transactions: Transactions;\n transfers: Transfers;\n partnerTransfers: PartnerTransfers;\n recipientTransfers: RecipientTransfers;\n}\n"]}
|
|
@@ -31,7 +31,7 @@ export class BillingManagementClient extends coreClient.ServiceClient {
|
|
|
31
31
|
requestContentType: "application/json; charset=utf-8",
|
|
32
32
|
credential: credentials,
|
|
33
33
|
};
|
|
34
|
-
const packageDetails = `azsdk-js-arm-billing/5.0.
|
|
34
|
+
const packageDetails = `azsdk-js-arm-billing/5.0.2`;
|
|
35
35
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
36
36
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
37
37
|
: `${packageDetails}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billingManagementClient.js","sourceRoot":"","sources":["../../src/billingManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EACX,sBAAsB,EACtB,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACnB,0BAA0B,EAC1B,mCAAmC,EACnC,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,+BAA+B,EAC/B,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAmC/B,MAAM,OAAO,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IACnE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAU;IAiBxB,YACE,WAAqC,EACrC,uBAAwE,EACxE,OAA+C;QAE/C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,cAAkC,CAAC;QAEvC,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YAChD,cAAc,GAAG,uBAAuB,CAAC;QAC3C,CAAC;aAAM,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YACvD,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iB,CAAoB;IACrC,iBAAiB,CAAoB;IACrC,eAAe,CAAkB;IACjC,OAAO,CAAU;IACjB,kBAAkB,CAAqB;IACvC,eAAe,CAAkB;IACjC,yBAAyB,CAA4B;IACrD,eAAe,CAAkB;IACjC,sBAAsB,CAAyB;IAC/C,+BAA+B,CAAkC;IACjE,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,oBAAoB,CAAuB;IAC3C,2BAA2B,CAA8B;IACzD,SAAS,CAAY;IACrB,WAAW,CAAc;IACzB,kBAAkB,CAAqB;IACvC,QAAQ,CAAW;IACnB,eAAe,CAAkB;IACjC,UAAU,CAAa;IACvB,cAAc,CAAiB;IAC/B,QAAQ,CAAW;IACnB,QAAQ,CAAW;IACnB,YAAY,CAAe;IAC3B,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,SAAS,CAAY;IACrB,gBAAgB,CAAmB;IACnC,kBAAkB,CAAqB;CACxC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n AgreementsImpl,\n AssociatedTenantsImpl,\n AvailableBalancesImpl,\n BillingAccountsImpl,\n AddressImpl,\n BillingPermissionsImpl,\n BillingProfilesImpl,\n BillingPropertyOperationsImpl,\n BillingRequestsImpl,\n BillingRoleAssignmentsImpl,\n BillingRoleDefinitionOperationsImpl,\n SavingsPlanOrdersImpl,\n SavingsPlansImpl,\n BillingSubscriptionsImpl,\n BillingSubscriptionsAliasesImpl,\n CustomersImpl,\n DepartmentsImpl,\n EnrollmentAccountsImpl,\n InvoicesImpl,\n InvoiceSectionsImpl,\n OperationsImpl,\n PaymentMethodsImpl,\n PoliciesImpl,\n ProductsImpl,\n ReservationsImpl,\n ReservationOrdersImpl,\n TransactionsImpl,\n TransfersImpl,\n PartnerTransfersImpl,\n RecipientTransfersImpl,\n} from \"./operations/index.js\";\nimport {\n Agreements,\n AssociatedTenants,\n AvailableBalances,\n BillingAccounts,\n Address,\n BillingPermissions,\n BillingProfiles,\n BillingPropertyOperations,\n BillingRequests,\n BillingRoleAssignments,\n BillingRoleDefinitionOperations,\n SavingsPlanOrders,\n SavingsPlans,\n BillingSubscriptions,\n BillingSubscriptionsAliases,\n Customers,\n Departments,\n EnrollmentAccounts,\n Invoices,\n InvoiceSections,\n Operations,\n PaymentMethods,\n Policies,\n Products,\n Reservations,\n ReservationOrders,\n Transactions,\n Transfers,\n PartnerTransfers,\n RecipientTransfers,\n} from \"./operationsInterfaces/index.js\";\nimport { BillingManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class BillingManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the BillingManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID that uniquely identifies a billing subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: BillingManagementClientOptionalParams | string,\n options?: BillingManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: BillingManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-billing/5.0.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-04-01\";\n this.agreements = new AgreementsImpl(this);\n this.associatedTenants = new AssociatedTenantsImpl(this);\n this.availableBalances = new AvailableBalancesImpl(this);\n this.billingAccounts = new BillingAccountsImpl(this);\n this.address = new AddressImpl(this);\n this.billingPermissions = new BillingPermissionsImpl(this);\n this.billingProfiles = new BillingProfilesImpl(this);\n this.billingPropertyOperations = new BillingPropertyOperationsImpl(this);\n this.billingRequests = new BillingRequestsImpl(this);\n this.billingRoleAssignments = new BillingRoleAssignmentsImpl(this);\n this.billingRoleDefinitionOperations =\n new BillingRoleDefinitionOperationsImpl(this);\n this.savingsPlanOrders = new SavingsPlanOrdersImpl(this);\n this.savingsPlans = new SavingsPlansImpl(this);\n this.billingSubscriptions = new BillingSubscriptionsImpl(this);\n this.billingSubscriptionsAliases = new BillingSubscriptionsAliasesImpl(\n this,\n );\n this.customers = new CustomersImpl(this);\n this.departments = new DepartmentsImpl(this);\n this.enrollmentAccounts = new EnrollmentAccountsImpl(this);\n this.invoices = new InvoicesImpl(this);\n this.invoiceSections = new InvoiceSectionsImpl(this);\n this.operations = new OperationsImpl(this);\n this.paymentMethods = new PaymentMethodsImpl(this);\n this.policies = new PoliciesImpl(this);\n this.products = new ProductsImpl(this);\n this.reservations = new ReservationsImpl(this);\n this.reservationOrders = new ReservationOrdersImpl(this);\n this.transactions = new TransactionsImpl(this);\n this.transfers = new TransfersImpl(this);\n this.partnerTransfers = new PartnerTransfersImpl(this);\n this.recipientTransfers = new RecipientTransfersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n agreements: Agreements;\n associatedTenants: AssociatedTenants;\n availableBalances: AvailableBalances;\n billingAccounts: BillingAccounts;\n address: Address;\n billingPermissions: BillingPermissions;\n billingProfiles: BillingProfiles;\n billingPropertyOperations: BillingPropertyOperations;\n billingRequests: BillingRequests;\n billingRoleAssignments: BillingRoleAssignments;\n billingRoleDefinitionOperations: BillingRoleDefinitionOperations;\n savingsPlanOrders: SavingsPlanOrders;\n savingsPlans: SavingsPlans;\n billingSubscriptions: BillingSubscriptions;\n billingSubscriptionsAliases: BillingSubscriptionsAliases;\n customers: Customers;\n departments: Departments;\n enrollmentAccounts: EnrollmentAccounts;\n invoices: Invoices;\n invoiceSections: InvoiceSections;\n operations: Operations;\n paymentMethods: PaymentMethods;\n policies: Policies;\n products: Products;\n reservations: Reservations;\n reservationOrders: ReservationOrders;\n transactions: Transactions;\n transfers: Transfers;\n partnerTransfers: PartnerTransfers;\n recipientTransfers: RecipientTransfers;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"billingManagementClient.js","sourceRoot":"","sources":["../../src/billingManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EACX,sBAAsB,EACtB,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACnB,0BAA0B,EAC1B,mCAAmC,EACnC,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,+BAA+B,EAC/B,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAmC/B,MAAM,OAAO,uBAAwB,SAAQ,UAAU,CAAC,aAA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U,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,UAAU,CAAa;IACvB,iBAAiB,CAAoB;IACrC,iBAAiB,CAAoB;IACrC,eAAe,CAAkB;IACjC,OAAO,CAAU;IACjB,kBAAkB,CAAqB;IACvC,eAAe,CAAkB;IACjC,yBAAyB,CAA4B;IACrD,eAAe,CAAkB;IACjC,sBAAsB,CAAyB;IAC/C,+BAA+B,CAAkC;IACjE,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,oBAAoB,CAAuB;IAC3C,2BAA2B,CAA8B;IACzD,SAAS,CAAY;IACrB,WAAW,CAAc;IACzB,kBAAkB,CAAqB;IACvC,QAAQ,CAAW;IACnB,eAAe,CAAkB;IACjC,UAAU,CAAa;IACvB,cAAc,CAAiB;IAC/B,QAAQ,CAAW;IACnB,QAAQ,CAAW;IACnB,YAAY,CAAe;IAC3B,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,SAAS,CAAY;IACrB,gBAAgB,CAAmB;IACnC,kBAAkB,CAAqB;CACxC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n AgreementsImpl,\n AssociatedTenantsImpl,\n AvailableBalancesImpl,\n BillingAccountsImpl,\n AddressImpl,\n BillingPermissionsImpl,\n BillingProfilesImpl,\n BillingPropertyOperationsImpl,\n BillingRequestsImpl,\n BillingRoleAssignmentsImpl,\n BillingRoleDefinitionOperationsImpl,\n SavingsPlanOrdersImpl,\n SavingsPlansImpl,\n BillingSubscriptionsImpl,\n BillingSubscriptionsAliasesImpl,\n CustomersImpl,\n DepartmentsImpl,\n EnrollmentAccountsImpl,\n InvoicesImpl,\n InvoiceSectionsImpl,\n OperationsImpl,\n PaymentMethodsImpl,\n PoliciesImpl,\n ProductsImpl,\n ReservationsImpl,\n ReservationOrdersImpl,\n TransactionsImpl,\n TransfersImpl,\n PartnerTransfersImpl,\n RecipientTransfersImpl,\n} from \"./operations/index.js\";\nimport {\n Agreements,\n AssociatedTenants,\n AvailableBalances,\n BillingAccounts,\n Address,\n BillingPermissions,\n BillingProfiles,\n BillingPropertyOperations,\n BillingRequests,\n BillingRoleAssignments,\n BillingRoleDefinitionOperations,\n SavingsPlanOrders,\n SavingsPlans,\n BillingSubscriptions,\n BillingSubscriptionsAliases,\n Customers,\n Departments,\n EnrollmentAccounts,\n Invoices,\n InvoiceSections,\n Operations,\n PaymentMethods,\n Policies,\n Products,\n Reservations,\n ReservationOrders,\n Transactions,\n Transfers,\n PartnerTransfers,\n RecipientTransfers,\n} from \"./operationsInterfaces/index.js\";\nimport { BillingManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class BillingManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the BillingManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID that uniquely identifies a billing subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: BillingManagementClientOptionalParams | string,\n options?: BillingManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: BillingManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-billing/5.0.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-04-01\";\n this.agreements = new AgreementsImpl(this);\n this.associatedTenants = new AssociatedTenantsImpl(this);\n this.availableBalances = new AvailableBalancesImpl(this);\n this.billingAccounts = new BillingAccountsImpl(this);\n this.address = new AddressImpl(this);\n this.billingPermissions = new BillingPermissionsImpl(this);\n this.billingProfiles = new BillingProfilesImpl(this);\n this.billingPropertyOperations = new BillingPropertyOperationsImpl(this);\n this.billingRequests = new BillingRequestsImpl(this);\n this.billingRoleAssignments = new BillingRoleAssignmentsImpl(this);\n this.billingRoleDefinitionOperations =\n new BillingRoleDefinitionOperationsImpl(this);\n this.savingsPlanOrders = new SavingsPlanOrdersImpl(this);\n this.savingsPlans = new SavingsPlansImpl(this);\n this.billingSubscriptions = new BillingSubscriptionsImpl(this);\n this.billingSubscriptionsAliases = new BillingSubscriptionsAliasesImpl(\n this,\n );\n this.customers = new CustomersImpl(this);\n this.departments = new DepartmentsImpl(this);\n this.enrollmentAccounts = new EnrollmentAccountsImpl(this);\n this.invoices = new InvoicesImpl(this);\n this.invoiceSections = new InvoiceSectionsImpl(this);\n this.operations = new OperationsImpl(this);\n this.paymentMethods = new PaymentMethodsImpl(this);\n this.policies = new PoliciesImpl(this);\n this.products = new ProductsImpl(this);\n this.reservations = new ReservationsImpl(this);\n this.reservationOrders = new ReservationOrdersImpl(this);\n this.transactions = new TransactionsImpl(this);\n this.transfers = new TransfersImpl(this);\n this.partnerTransfers = new PartnerTransfersImpl(this);\n this.recipientTransfers = new RecipientTransfersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n agreements: Agreements;\n associatedTenants: AssociatedTenants;\n availableBalances: AvailableBalances;\n billingAccounts: BillingAccounts;\n address: Address;\n billingPermissions: BillingPermissions;\n billingProfiles: BillingProfiles;\n billingPropertyOperations: BillingPropertyOperations;\n billingRequests: BillingRequests;\n billingRoleAssignments: BillingRoleAssignments;\n billingRoleDefinitionOperations: BillingRoleDefinitionOperations;\n savingsPlanOrders: SavingsPlanOrders;\n savingsPlans: SavingsPlans;\n billingSubscriptions: BillingSubscriptions;\n billingSubscriptionsAliases: BillingSubscriptionsAliases;\n customers: Customers;\n departments: Departments;\n enrollmentAccounts: EnrollmentAccounts;\n invoices: Invoices;\n invoiceSections: InvoiceSections;\n operations: Operations;\n paymentMethods: PaymentMethods;\n policies: Policies;\n products: Products;\n reservations: Reservations;\n reservationOrders: ReservationOrders;\n transactions: Transactions;\n transfers: Transfers;\n partnerTransfers: PartnerTransfers;\n recipientTransfers: RecipientTransfers;\n}\n"]}
|
|
@@ -31,7 +31,7 @@ export class BillingManagementClient extends coreClient.ServiceClient {
|
|
|
31
31
|
requestContentType: "application/json; charset=utf-8",
|
|
32
32
|
credential: credentials,
|
|
33
33
|
};
|
|
34
|
-
const packageDetails = `azsdk-js-arm-billing/5.0.
|
|
34
|
+
const packageDetails = `azsdk-js-arm-billing/5.0.2`;
|
|
35
35
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
36
36
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
37
37
|
: `${packageDetails}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billingManagementClient.js","sourceRoot":"","sources":["../../src/billingManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EACX,sBAAsB,EACtB,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACnB,0BAA0B,EAC1B,mCAAmC,EACnC,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,+BAA+B,EAC/B,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAmC/B,MAAM,OAAO,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IACnE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAU;IAiBxB,YACE,WAAqC,EACrC,uBAAwE,EACxE,OAA+C;QAE/C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,cAAkC,CAAC;QAEvC,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YAChD,cAAc,GAAG,uBAAuB,CAAC;QAC3C,CAAC;aAAM,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YACvD,OAAO,GAAG,uBAAuB,CAAC;QACpC,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OA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B,kBAAkB,CAAqB;IACvC,eAAe,CAAkB;IACjC,yBAAyB,CAA4B;IACrD,eAAe,CAAkB;IACjC,sBAAsB,CAAyB;IAC/C,+BAA+B,CAAkC;IACjE,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,oBAAoB,CAAuB;IAC3C,2BAA2B,CAA8B;IACzD,SAAS,CAAY;IACrB,WAAW,CAAc;IACzB,kBAAkB,CAAqB;IACvC,QAAQ,CAAW;IACnB,eAAe,CAAkB;IACjC,UAAU,CAAa;IACvB,cAAc,CAAiB;IAC/B,QAAQ,CAAW;IACnB,QAAQ,CAAW;IACnB,YAAY,CAAe;IAC3B,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,SAAS,CAAY;IACrB,gBAAgB,CAAmB;IACnC,kBAAkB,CAAqB;CACxC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n AgreementsImpl,\n AssociatedTenantsImpl,\n AvailableBalancesImpl,\n BillingAccountsImpl,\n AddressImpl,\n BillingPermissionsImpl,\n BillingProfilesImpl,\n BillingPropertyOperationsImpl,\n BillingRequestsImpl,\n BillingRoleAssignmentsImpl,\n BillingRoleDefinitionOperationsImpl,\n SavingsPlanOrdersImpl,\n SavingsPlansImpl,\n BillingSubscriptionsImpl,\n BillingSubscriptionsAliasesImpl,\n CustomersImpl,\n DepartmentsImpl,\n EnrollmentAccountsImpl,\n InvoicesImpl,\n InvoiceSectionsImpl,\n OperationsImpl,\n PaymentMethodsImpl,\n PoliciesImpl,\n ProductsImpl,\n ReservationsImpl,\n ReservationOrdersImpl,\n TransactionsImpl,\n TransfersImpl,\n PartnerTransfersImpl,\n RecipientTransfersImpl,\n} from \"./operations/index.js\";\nimport {\n Agreements,\n AssociatedTenants,\n AvailableBalances,\n BillingAccounts,\n Address,\n BillingPermissions,\n BillingProfiles,\n BillingPropertyOperations,\n BillingRequests,\n BillingRoleAssignments,\n BillingRoleDefinitionOperations,\n SavingsPlanOrders,\n SavingsPlans,\n BillingSubscriptions,\n BillingSubscriptionsAliases,\n Customers,\n Departments,\n EnrollmentAccounts,\n Invoices,\n InvoiceSections,\n Operations,\n PaymentMethods,\n Policies,\n Products,\n Reservations,\n ReservationOrders,\n Transactions,\n Transfers,\n PartnerTransfers,\n RecipientTransfers,\n} from \"./operationsInterfaces/index.js\";\nimport { BillingManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class BillingManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the BillingManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID that uniquely identifies a billing subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: BillingManagementClientOptionalParams | string,\n options?: BillingManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: BillingManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-billing/5.0.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-04-01\";\n this.agreements = new AgreementsImpl(this);\n this.associatedTenants = new AssociatedTenantsImpl(this);\n this.availableBalances = new AvailableBalancesImpl(this);\n this.billingAccounts = new BillingAccountsImpl(this);\n this.address = new AddressImpl(this);\n this.billingPermissions = new BillingPermissionsImpl(this);\n this.billingProfiles = new BillingProfilesImpl(this);\n this.billingPropertyOperations = new BillingPropertyOperationsImpl(this);\n this.billingRequests = new BillingRequestsImpl(this);\n this.billingRoleAssignments = new BillingRoleAssignmentsImpl(this);\n this.billingRoleDefinitionOperations =\n new BillingRoleDefinitionOperationsImpl(this);\n this.savingsPlanOrders = new SavingsPlanOrdersImpl(this);\n this.savingsPlans = new SavingsPlansImpl(this);\n this.billingSubscriptions = new BillingSubscriptionsImpl(this);\n this.billingSubscriptionsAliases = new BillingSubscriptionsAliasesImpl(\n this,\n );\n this.customers = new CustomersImpl(this);\n this.departments = new DepartmentsImpl(this);\n this.enrollmentAccounts = new EnrollmentAccountsImpl(this);\n this.invoices = new InvoicesImpl(this);\n this.invoiceSections = new InvoiceSectionsImpl(this);\n this.operations = new OperationsImpl(this);\n this.paymentMethods = new PaymentMethodsImpl(this);\n this.policies = new PoliciesImpl(this);\n this.products = new ProductsImpl(this);\n this.reservations = new ReservationsImpl(this);\n this.reservationOrders = new ReservationOrdersImpl(this);\n this.transactions = new TransactionsImpl(this);\n this.transfers = new TransfersImpl(this);\n this.partnerTransfers = new PartnerTransfersImpl(this);\n this.recipientTransfers = new RecipientTransfersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n agreements: Agreements;\n associatedTenants: AssociatedTenants;\n availableBalances: AvailableBalances;\n billingAccounts: BillingAccounts;\n address: Address;\n billingPermissions: BillingPermissions;\n billingProfiles: BillingProfiles;\n billingPropertyOperations: BillingPropertyOperations;\n billingRequests: BillingRequests;\n billingRoleAssignments: BillingRoleAssignments;\n billingRoleDefinitionOperations: BillingRoleDefinitionOperations;\n savingsPlanOrders: SavingsPlanOrders;\n savingsPlans: SavingsPlans;\n billingSubscriptions: BillingSubscriptions;\n billingSubscriptionsAliases: BillingSubscriptionsAliases;\n customers: Customers;\n departments: Departments;\n enrollmentAccounts: EnrollmentAccounts;\n invoices: Invoices;\n invoiceSections: InvoiceSections;\n operations: Operations;\n paymentMethods: PaymentMethods;\n policies: Policies;\n products: Products;\n reservations: Reservations;\n reservationOrders: ReservationOrders;\n transactions: Transactions;\n transfers: Transfers;\n partnerTransfers: PartnerTransfers;\n recipientTransfers: RecipientTransfers;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"billingManagementClient.js","sourceRoot":"","sources":["../../src/billingManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EACX,sBAAsB,EACtB,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACnB,0BAA0B,EAC1B,mCAAmC,EACnC,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,+BAA+B,EAC/B,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAmC/B,MAAM,OAAO,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IACnE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAU;IAiBxB,YACE,WAAq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ACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,UAAU,CAAa;IACvB,iBAAiB,CAAoB;IACrC,iBAAiB,CAAoB;IACrC,eAAe,CAAkB;IACjC,OAAO,CAAU;IACjB,kBAAkB,CAAqB;IACvC,eAAe,CAAkB;IACjC,yBAAyB,CAA4B;IACrD,eAAe,CAAkB;IACjC,sBAAsB,CAAyB;IAC/C,+BAA+B,CAAkC;IACjE,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,oBAAoB,CAAuB;IAC3C,2BAA2B,CAA8B;IACzD,SAAS,CAAY;IACrB,WAAW,CAAc;IACzB,kBAAkB,CAAqB;IACvC,QAAQ,CAAW;IACnB,eAAe,CAAkB;IACjC,UAAU,CAAa;IACvB,cAAc,CAAiB;IAC/B,QAAQ,CAAW;IACnB,QAAQ,CAAW;IACnB,YAAY,CAAe;IAC3B,iBAAiB,CAAoB;IACrC,YAAY,CAAe;IAC3B,SAAS,CAAY;IACrB,gBAAgB,CAAmB;IACnC,kBAAkB,CAAqB;CACxC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n AgreementsImpl,\n AssociatedTenantsImpl,\n AvailableBalancesImpl,\n BillingAccountsImpl,\n AddressImpl,\n BillingPermissionsImpl,\n BillingProfilesImpl,\n BillingPropertyOperationsImpl,\n BillingRequestsImpl,\n BillingRoleAssignmentsImpl,\n BillingRoleDefinitionOperationsImpl,\n SavingsPlanOrdersImpl,\n SavingsPlansImpl,\n BillingSubscriptionsImpl,\n BillingSubscriptionsAliasesImpl,\n CustomersImpl,\n DepartmentsImpl,\n EnrollmentAccountsImpl,\n InvoicesImpl,\n InvoiceSectionsImpl,\n OperationsImpl,\n PaymentMethodsImpl,\n PoliciesImpl,\n ProductsImpl,\n ReservationsImpl,\n ReservationOrdersImpl,\n TransactionsImpl,\n TransfersImpl,\n PartnerTransfersImpl,\n RecipientTransfersImpl,\n} from \"./operations/index.js\";\nimport {\n Agreements,\n AssociatedTenants,\n AvailableBalances,\n BillingAccounts,\n Address,\n BillingPermissions,\n BillingProfiles,\n BillingPropertyOperations,\n BillingRequests,\n BillingRoleAssignments,\n BillingRoleDefinitionOperations,\n SavingsPlanOrders,\n SavingsPlans,\n BillingSubscriptions,\n BillingSubscriptionsAliases,\n Customers,\n Departments,\n EnrollmentAccounts,\n Invoices,\n InvoiceSections,\n Operations,\n PaymentMethods,\n Policies,\n Products,\n Reservations,\n ReservationOrders,\n Transactions,\n Transfers,\n PartnerTransfers,\n RecipientTransfers,\n} from \"./operationsInterfaces/index.js\";\nimport { BillingManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class BillingManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the BillingManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID that uniquely identifies a billing subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: BillingManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: BillingManagementClientOptionalParams | string,\n options?: BillingManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: BillingManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-billing/5.0.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-04-01\";\n this.agreements = new AgreementsImpl(this);\n this.associatedTenants = new AssociatedTenantsImpl(this);\n this.availableBalances = new AvailableBalancesImpl(this);\n this.billingAccounts = new BillingAccountsImpl(this);\n this.address = new AddressImpl(this);\n this.billingPermissions = new BillingPermissionsImpl(this);\n this.billingProfiles = new BillingProfilesImpl(this);\n this.billingPropertyOperations = new BillingPropertyOperationsImpl(this);\n this.billingRequests = new BillingRequestsImpl(this);\n this.billingRoleAssignments = new BillingRoleAssignmentsImpl(this);\n this.billingRoleDefinitionOperations =\n new BillingRoleDefinitionOperationsImpl(this);\n this.savingsPlanOrders = new SavingsPlanOrdersImpl(this);\n this.savingsPlans = new SavingsPlansImpl(this);\n this.billingSubscriptions = new BillingSubscriptionsImpl(this);\n this.billingSubscriptionsAliases = new BillingSubscriptionsAliasesImpl(\n this,\n );\n this.customers = new CustomersImpl(this);\n this.departments = new DepartmentsImpl(this);\n this.enrollmentAccounts = new EnrollmentAccountsImpl(this);\n this.invoices = new InvoicesImpl(this);\n this.invoiceSections = new InvoiceSectionsImpl(this);\n this.operations = new OperationsImpl(this);\n this.paymentMethods = new PaymentMethodsImpl(this);\n this.policies = new PoliciesImpl(this);\n this.products = new ProductsImpl(this);\n this.reservations = new ReservationsImpl(this);\n this.reservationOrders = new ReservationOrdersImpl(this);\n this.transactions = new TransactionsImpl(this);\n this.transfers = new TransfersImpl(this);\n this.partnerTransfers = new PartnerTransfersImpl(this);\n this.recipientTransfers = new RecipientTransfersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n agreements: Agreements;\n associatedTenants: AssociatedTenants;\n availableBalances: AvailableBalances;\n billingAccounts: BillingAccounts;\n address: Address;\n billingPermissions: BillingPermissions;\n billingProfiles: BillingProfiles;\n billingPropertyOperations: BillingPropertyOperations;\n billingRequests: BillingRequests;\n billingRoleAssignments: BillingRoleAssignments;\n billingRoleDefinitionOperations: BillingRoleDefinitionOperations;\n savingsPlanOrders: SavingsPlanOrders;\n savingsPlans: SavingsPlans;\n billingSubscriptions: BillingSubscriptions;\n billingSubscriptionsAliases: BillingSubscriptionsAliases;\n customers: Customers;\n departments: Departments;\n enrollmentAccounts: EnrollmentAccounts;\n invoices: Invoices;\n invoiceSections: InvoiceSections;\n operations: Operations;\n paymentMethods: PaymentMethods;\n policies: Policies;\n products: Products;\n reservations: Reservations;\n reservationOrders: ReservationOrders;\n transactions: Transactions;\n transfers: Transfers;\n partnerTransfers: PartnerTransfers;\n recipientTransfers: RecipientTransfers;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sdk-type": "mgmt",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "A generated SDK for BillingManagementClient.",
|
|
6
|
-
"version": "5.0.1",
|
|
6
|
+
"version": "5.0.2-alpha.20250929.1",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=20.0.0"
|
|
9
9
|
},
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"playwright": "^1.50.1",
|
|
39
39
|
"typescript": "~5.8.3",
|
|
40
40
|
"vitest": "^3.2.3",
|
|
41
|
-
"@azure-tools/test-
|
|
42
|
-
"@azure-tools/test-utils-vitest": "^
|
|
43
|
-
"@azure/
|
|
44
|
-
"@azure
|
|
41
|
+
"@azure-tools/test-credential": "^2.1.2",
|
|
42
|
+
"@azure-tools/test-utils-vitest": "^2.0.1",
|
|
43
|
+
"@azure-tools/test-recorder": "^4.1.1",
|
|
44
|
+
"@azure/dev-tool": "^1.0.0"
|
|
45
45
|
},
|
|
46
46
|
"repository": "github:Azure/azure-sdk-for-js",
|
|
47
47
|
"bugs": {
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
},
|
|
116
116
|
"scripts": {
|
|
117
117
|
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
|
|
118
|
-
"build:samples": "
|
|
118
|
+
"build:samples": "tsc -p tsconfig.samples.json",
|
|
119
119
|
"check-format": "echo skipped",
|
|
120
120
|
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
121
121
|
"execute:samples": "echo skipped",
|
|
@@ -125,8 +125,7 @@
|
|
|
125
125
|
"pack": "pnpm pack 2>&1",
|
|
126
126
|
"test": "npm run test:node && npm run test:browser",
|
|
127
127
|
"test:browser": "echo skipped",
|
|
128
|
-
"test:node": "dev-tool run test:vitest",
|
|
129
|
-
"test:node:esm": "dev-tool run test:vitest --esm",
|
|
128
|
+
"test:node": "dev-tool run build-test --no-browser-test && dev-tool run test:vitest",
|
|
130
129
|
"update-snippets": "dev-tool run update-snippets"
|
|
131
130
|
}
|
|
132
131
|
}
|