@azure/arm-reservations 7.2.1-alpha.20230202.1 → 8.0.0-alpha.20230210.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.
- package/CHANGELOG.md +71 -8
- package/LICENSE +1 -1
- package/dist/index.js +942 -224
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/calculateExchangePostSample.js +22 -2
- package/dist-esm/samples-dev/calculateExchangePostSample.js.map +1 -1
- package/dist-esm/samples-dev/calculateRefundPostSample.js +10 -3
- package/dist-esm/samples-dev/calculateRefundPostSample.js.map +1 -1
- package/dist-esm/samples-dev/exchangePostSample.js +9 -2
- package/dist-esm/samples-dev/exchangePostSample.js.map +1 -1
- package/dist-esm/samples-dev/getAppliedReservationListSample.js +9 -2
- package/dist-esm/samples-dev/getAppliedReservationListSample.js.map +1 -1
- package/dist-esm/samples-dev/getCatalogSample.js +26 -5
- package/dist-esm/samples-dev/getCatalogSample.js.map +1 -1
- package/dist-esm/samples-dev/operationListSample.js +9 -2
- package/dist-esm/samples-dev/operationListSample.js.map +1 -1
- package/dist-esm/samples-dev/quotaCreateOrUpdateSample.js +10 -3
- package/dist-esm/samples-dev/quotaCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/quotaGetSample.js +8 -1
- package/dist-esm/samples-dev/quotaGetSample.js.map +1 -1
- package/dist-esm/samples-dev/quotaListSample.js +9 -2
- package/dist-esm/samples-dev/quotaListSample.js.map +1 -1
- package/dist-esm/samples-dev/quotaRequestStatusGetSample.js +10 -3
- package/dist-esm/samples-dev/quotaRequestStatusGetSample.js.map +1 -1
- package/dist-esm/samples-dev/quotaRequestStatusListSample.js +8 -1
- package/dist-esm/samples-dev/quotaRequestStatusListSample.js.map +1 -1
- package/dist-esm/samples-dev/quotaUpdateSample.js +8 -1
- package/dist-esm/samples-dev/quotaUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationArchiveSample.js +9 -2
- package/dist-esm/samples-dev/reservationArchiveSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationAvailableScopesSample.js +11 -4
- package/dist-esm/samples-dev/reservationAvailableScopesSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationGetSample.js +11 -4
- package/dist-esm/samples-dev/reservationGetSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationListAllSample.js +10 -3
- package/dist-esm/samples-dev/reservationListAllSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationListRevisionsSample.js +11 -4
- package/dist-esm/samples-dev/reservationListRevisionsSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationListSample.js +9 -2
- package/dist-esm/samples-dev/reservationListSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationMergeSample.js +9 -2
- package/dist-esm/samples-dev/reservationMergeSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationOrderCalculateSample.js +10 -3
- package/dist-esm/samples-dev/reservationOrderCalculateSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationOrderChangeDirectorySample.js +9 -2
- package/dist-esm/samples-dev/reservationOrderChangeDirectorySample.js.map +1 -1
- package/dist-esm/samples-dev/reservationOrderGetSample.js +12 -5
- package/dist-esm/samples-dev/reservationOrderGetSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationOrderListSample.js +9 -2
- package/dist-esm/samples-dev/reservationOrderListSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationOrderPurchaseSample.js +9 -2
- package/dist-esm/samples-dev/reservationOrderPurchaseSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationSplitSample.js +9 -2
- package/dist-esm/samples-dev/reservationSplitSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationUnarchiveSample.js +11 -4
- package/dist-esm/samples-dev/reservationUnarchiveSample.js.map +1 -1
- package/dist-esm/samples-dev/reservationUpdateSample.js +9 -2
- package/dist-esm/samples-dev/reservationUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/returnPostSample.js +14 -7
- package/dist-esm/samples-dev/returnPostSample.js.map +1 -1
- package/dist-esm/src/azureReservationAPI.d.ts +18 -2
- package/dist-esm/src/azureReservationAPI.d.ts.map +1 -1
- package/dist-esm/src/azureReservationAPI.js +101 -15
- package/dist-esm/src/azureReservationAPI.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +372 -101
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +26 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +14 -1
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +510 -70
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +2 -1
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +18 -9
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/operation.d.ts.map +1 -1
- package/dist-esm/src/operations/operation.js +19 -8
- package/dist-esm/src/operations/operation.js.map +1 -1
- package/dist-esm/src/operations/quota.d.ts.map +1 -1
- package/dist-esm/src/operations/quota.js +19 -8
- package/dist-esm/src/operations/quota.js.map +1 -1
- package/dist-esm/src/operations/quotaRequestStatus.d.ts.map +1 -1
- package/dist-esm/src/operations/quotaRequestStatus.js +19 -13
- package/dist-esm/src/operations/quotaRequestStatus.js.map +1 -1
- package/dist-esm/src/operations/reservation.d.ts +17 -17
- package/dist-esm/src/operations/reservation.d.ts.map +1 -1
- package/dist-esm/src/operations/reservation.js +83 -59
- package/dist-esm/src/operations/reservation.js.map +1 -1
- package/dist-esm/src/operations/reservationOrder.d.ts.map +1 -1
- package/dist-esm/src/operations/reservationOrder.js +20 -9
- package/dist-esm/src/operations/reservationOrder.js.map +1 -1
- package/dist-esm/src/operations/return.d.ts +10 -2
- package/dist-esm/src/operations/return.d.ts.map +1 -1
- package/dist-esm/src/operations/return.js +61 -3
- package/dist-esm/src/operations/return.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/reservation.d.ts +15 -15
- package/dist-esm/src/operationsInterfaces/reservation.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/return.d.ts +10 -2
- package/dist-esm/src/operationsInterfaces/return.d.ts.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/package.json +6 -4
- package/review/arm-reservations.api.md +194 -94
- package/src/azureReservationAPI.ts +119 -15
- package/src/index.ts +1 -0
- package/src/models/index.ts +397 -107
- package/src/models/mappers.ts +536 -71
- package/src/models/parameters.ts +19 -9
- package/src/operations/operation.ts +21 -9
- package/src/operations/quota.ts +23 -15
- package/src/operations/quotaRequestStatus.ts +23 -20
- package/src/operations/reservation.ts +97 -69
- package/src/operations/reservationOrder.ts +23 -11
- package/src/operations/return.ts +82 -4
- package/src/operationsInterfaces/reservation.ts +15 -15
- package/src/operationsInterfaces/return.ts +16 -2
- package/src/pagingHelper.ts +39 -0
- package/types/arm-reservations.d.ts +432 -109
- package/types/tsdoc-metadata.json +1 -1
|
@@ -45,13 +45,13 @@ export interface Reservation {
|
|
|
45
45
|
): PagedAsyncIterableIterator<ReservationResponse>;
|
|
46
46
|
/**
|
|
47
47
|
* List of all the revisions for the `Reservation`.
|
|
48
|
-
* @param reservationId Id of the Reservation Item
|
|
49
48
|
* @param reservationOrderId Order Id of the reservation
|
|
49
|
+
* @param reservationId Id of the reservation item
|
|
50
50
|
* @param options The options parameters.
|
|
51
51
|
*/
|
|
52
52
|
listRevisions(
|
|
53
|
-
reservationId: string,
|
|
54
53
|
reservationOrderId: string,
|
|
54
|
+
reservationId: string,
|
|
55
55
|
options?: ReservationListRevisionsOptionalParams
|
|
56
56
|
): PagedAsyncIterableIterator<ReservationResponse>;
|
|
57
57
|
/**
|
|
@@ -63,11 +63,11 @@ export interface Reservation {
|
|
|
63
63
|
options?: ReservationListAllOptionalParams
|
|
64
64
|
): PagedAsyncIterableIterator<ReservationResponse>;
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* Check whether the scopes from request is valid for `Reservation`.
|
|
67
67
|
*
|
|
68
68
|
* @param reservationOrderId Order Id of the reservation
|
|
69
|
-
* @param reservationId Id of the
|
|
70
|
-
* @param body
|
|
69
|
+
* @param reservationId Id of the reservation item
|
|
70
|
+
* @param body Scopes to be checked for eligibility.
|
|
71
71
|
* @param options The options parameters.
|
|
72
72
|
*/
|
|
73
73
|
beginAvailableScopes(
|
|
@@ -82,11 +82,11 @@ export interface Reservation {
|
|
|
82
82
|
>
|
|
83
83
|
>;
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* Check whether the scopes from request is valid for `Reservation`.
|
|
86
86
|
*
|
|
87
87
|
* @param reservationOrderId Order Id of the reservation
|
|
88
|
-
* @param reservationId Id of the
|
|
89
|
-
* @param body
|
|
88
|
+
* @param reservationId Id of the reservation item
|
|
89
|
+
* @param body Scopes to be checked for eligibility.
|
|
90
90
|
* @param options The options parameters.
|
|
91
91
|
*/
|
|
92
92
|
beginAvailableScopesAndWait(
|
|
@@ -153,19 +153,19 @@ export interface Reservation {
|
|
|
153
153
|
): Promise<ReservationMergeResponse>;
|
|
154
154
|
/**
|
|
155
155
|
* Get specific `Reservation` details.
|
|
156
|
-
* @param reservationId Id of the Reservation Item
|
|
157
156
|
* @param reservationOrderId Order Id of the reservation
|
|
157
|
+
* @param reservationId Id of the reservation item
|
|
158
158
|
* @param options The options parameters.
|
|
159
159
|
*/
|
|
160
160
|
get(
|
|
161
|
-
reservationId: string,
|
|
162
161
|
reservationOrderId: string,
|
|
162
|
+
reservationId: string,
|
|
163
163
|
options?: ReservationGetOptionalParams
|
|
164
164
|
): Promise<ReservationGetResponse>;
|
|
165
165
|
/**
|
|
166
166
|
* Updates the applied scopes of the `Reservation`.
|
|
167
167
|
* @param reservationOrderId Order Id of the reservation
|
|
168
|
-
* @param reservationId Id of the
|
|
168
|
+
* @param reservationId Id of the reservation item
|
|
169
169
|
* @param parameters Information needed to patch a reservation item
|
|
170
170
|
* @param options The options parameters.
|
|
171
171
|
*/
|
|
@@ -183,7 +183,7 @@ export interface Reservation {
|
|
|
183
183
|
/**
|
|
184
184
|
* Updates the applied scopes of the `Reservation`.
|
|
185
185
|
* @param reservationOrderId Order Id of the reservation
|
|
186
|
-
* @param reservationId Id of the
|
|
186
|
+
* @param reservationId Id of the reservation item
|
|
187
187
|
* @param parameters Information needed to patch a reservation item
|
|
188
188
|
* @param options The options parameters.
|
|
189
189
|
*/
|
|
@@ -196,7 +196,7 @@ export interface Reservation {
|
|
|
196
196
|
/**
|
|
197
197
|
* Archiving a `Reservation` moves it to `Archived` state.
|
|
198
198
|
* @param reservationOrderId Order Id of the reservation
|
|
199
|
-
* @param reservationId Id of the
|
|
199
|
+
* @param reservationId Id of the reservation item
|
|
200
200
|
* @param options The options parameters.
|
|
201
201
|
*/
|
|
202
202
|
archive(
|
|
@@ -205,10 +205,10 @@ export interface Reservation {
|
|
|
205
205
|
options?: ReservationArchiveOptionalParams
|
|
206
206
|
): Promise<void>;
|
|
207
207
|
/**
|
|
208
|
-
*
|
|
208
|
+
* Restores a `Reservation` to the state it was before archiving.
|
|
209
209
|
*
|
|
210
210
|
* @param reservationOrderId Order Id of the reservation
|
|
211
|
-
* @param reservationId Id of the
|
|
211
|
+
* @param reservationId Id of the reservation item
|
|
212
212
|
* @param options The options parameters.
|
|
213
213
|
*/
|
|
214
214
|
unarchive(
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { PollerLike, PollOperationState } from "@azure/core-lro";
|
|
9
10
|
import {
|
|
10
11
|
RefundRequest,
|
|
11
12
|
ReturnPostOptionalParams,
|
|
@@ -15,12 +16,25 @@ import {
|
|
|
15
16
|
/** Interface representing a Return. */
|
|
16
17
|
export interface Return {
|
|
17
18
|
/**
|
|
18
|
-
* Return a reservation.
|
|
19
|
+
* Return a reservation and get refund information.
|
|
19
20
|
* @param reservationOrderId Order Id of the reservation
|
|
20
21
|
* @param body Information needed for returning reservation.
|
|
21
22
|
* @param options The options parameters.
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
beginPost(
|
|
25
|
+
reservationOrderId: string,
|
|
26
|
+
body: RefundRequest,
|
|
27
|
+
options?: ReturnPostOptionalParams
|
|
28
|
+
): Promise<
|
|
29
|
+
PollerLike<PollOperationState<ReturnPostResponse>, ReturnPostResponse>
|
|
30
|
+
>;
|
|
31
|
+
/**
|
|
32
|
+
* Return a reservation and get refund information.
|
|
33
|
+
* @param reservationOrderId Order Id of the reservation
|
|
34
|
+
* @param body Information needed for returning reservation.
|
|
35
|
+
* @param options The options parameters.
|
|
36
|
+
*/
|
|
37
|
+
beginPostAndWait(
|
|
24
38
|
reservationOrderId: string,
|
|
25
39
|
body: RefundRequest,
|
|
26
40
|
options?: ReturnPostOptionalParams
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface PageInfo {
|
|
10
|
+
continuationToken?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const pageMap = new WeakMap<object, PageInfo>();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
17
|
+
* returns a continuation token that can be used to begin paging from
|
|
18
|
+
* that point later.
|
|
19
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
20
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
21
|
+
*/
|
|
22
|
+
export function getContinuationToken(page: unknown): string | undefined {
|
|
23
|
+
if (typeof page !== "object" || page === null) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
return pageMap.get(page)?.continuationToken;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function setContinuationToken(
|
|
30
|
+
page: unknown,
|
|
31
|
+
continuationToken: string | undefined
|
|
32
|
+
): void {
|
|
33
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
37
|
+
pageInfo.continuationToken = continuationToken;
|
|
38
|
+
pageMap.set(page, pageInfo);
|
|
39
|
+
}
|