@azure/arm-appcontainers 2.0.0-alpha.20221102.1 → 2.0.0-beta.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 +5 -11
- package/README.md +1 -1
- package/dist/index.js +360 -132
- 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/src/containerAppsAPIClient.d.ts.map +1 -1
- package/dist-esm/src/containerAppsAPIClient.js +3 -6
- package/dist-esm/src/containerAppsAPIClient.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/operations/availableWorkloadProfiles.d.ts.map +1 -1
- package/dist-esm/src/operations/availableWorkloadProfiles.js +19 -7
- package/dist-esm/src/operations/availableWorkloadProfiles.js.map +1 -1
- package/dist-esm/src/operations/certificates.d.ts.map +1 -1
- package/dist-esm/src/operations/certificates.js +19 -7
- package/dist-esm/src/operations/certificates.js.map +1 -1
- package/dist-esm/src/operations/connectedEnvironments.d.ts.map +1 -1
- package/dist-esm/src/operations/connectedEnvironments.js +37 -14
- package/dist-esm/src/operations/connectedEnvironments.js.map +1 -1
- package/dist-esm/src/operations/connectedEnvironmentsCertificates.d.ts.map +1 -1
- package/dist-esm/src/operations/connectedEnvironmentsCertificates.js +19 -7
- package/dist-esm/src/operations/connectedEnvironmentsCertificates.js.map +1 -1
- package/dist-esm/src/operations/connectedEnvironmentsDaprComponents.d.ts.map +1 -1
- package/dist-esm/src/operations/connectedEnvironmentsDaprComponents.js +19 -7
- package/dist-esm/src/operations/connectedEnvironmentsDaprComponents.js.map +1 -1
- package/dist-esm/src/operations/containerApps.d.ts.map +1 -1
- package/dist-esm/src/operations/containerApps.js +37 -14
- package/dist-esm/src/operations/containerApps.js.map +1 -1
- package/dist-esm/src/operations/containerAppsAuthConfigs.d.ts.map +1 -1
- package/dist-esm/src/operations/containerAppsAuthConfigs.js +19 -7
- package/dist-esm/src/operations/containerAppsAuthConfigs.js.map +1 -1
- package/dist-esm/src/operations/containerAppsDiagnostics.d.ts.map +1 -1
- package/dist-esm/src/operations/containerAppsDiagnostics.js +37 -14
- package/dist-esm/src/operations/containerAppsDiagnostics.js.map +1 -1
- package/dist-esm/src/operations/containerAppsRevisions.d.ts.map +1 -1
- package/dist-esm/src/operations/containerAppsRevisions.js +19 -7
- package/dist-esm/src/operations/containerAppsRevisions.js.map +1 -1
- package/dist-esm/src/operations/containerAppsSourceControls.d.ts.map +1 -1
- package/dist-esm/src/operations/containerAppsSourceControls.js +19 -7
- package/dist-esm/src/operations/containerAppsSourceControls.js.map +1 -1
- package/dist-esm/src/operations/daprComponents.d.ts.map +1 -1
- package/dist-esm/src/operations/daprComponents.js +19 -7
- package/dist-esm/src/operations/daprComponents.js.map +1 -1
- package/dist-esm/src/operations/managedEnvironments.d.ts.map +1 -1
- package/dist-esm/src/operations/managedEnvironments.js +55 -21
- package/dist-esm/src/operations/managedEnvironments.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +19 -7
- package/dist-esm/src/operations/operations.js.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 +7 -6
- package/review/arm-appcontainers.api.md +3 -0
- package/src/containerAppsAPIClient.ts +4 -5
- package/src/index.ts +1 -0
- package/src/operations/availableWorkloadProfiles.ts +21 -8
- package/src/operations/certificates.ts +26 -8
- package/src/operations/connectedEnvironments.ts +45 -16
- package/src/operations/connectedEnvironmentsCertificates.ts +26 -12
- package/src/operations/connectedEnvironmentsDaprComponents.ts +26 -12
- package/src/operations/containerApps.ts +45 -16
- package/src/operations/containerAppsAuthConfigs.ts +26 -12
- package/src/operations/containerAppsDiagnostics.ts +52 -25
- package/src/operations/containerAppsRevisions.ts +26 -12
- package/src/operations/containerAppsSourceControls.ts +26 -12
- package/src/operations/daprComponents.ts +26 -8
- package/src/operations/managedEnvironments.ts +71 -29
- package/src/operations/operations.ts +21 -8
- package/src/pagingHelper.ts +39 -0
- package/types/arm-appcontainers.d.ts +9 -0
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { ContainerAppsSourceControls } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -64,11 +65,15 @@ export class ContainerAppsSourceControlsImpl
|
|
|
64
65
|
[Symbol.asyncIterator]() {
|
|
65
66
|
return this;
|
|
66
67
|
},
|
|
67
|
-
byPage: () => {
|
|
68
|
+
byPage: (settings?: PageSettings) => {
|
|
69
|
+
if (settings?.maxPageSize) {
|
|
70
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
71
|
+
}
|
|
68
72
|
return this.listByContainerAppPagingPage(
|
|
69
73
|
resourceGroupName,
|
|
70
74
|
containerAppName,
|
|
71
|
-
options
|
|
75
|
+
options,
|
|
76
|
+
settings
|
|
72
77
|
);
|
|
73
78
|
}
|
|
74
79
|
};
|
|
@@ -77,15 +82,22 @@ export class ContainerAppsSourceControlsImpl
|
|
|
77
82
|
private async *listByContainerAppPagingPage(
|
|
78
83
|
resourceGroupName: string,
|
|
79
84
|
containerAppName: string,
|
|
80
|
-
options?: ContainerAppsSourceControlsListByContainerAppOptionalParams
|
|
85
|
+
options?: ContainerAppsSourceControlsListByContainerAppOptionalParams,
|
|
86
|
+
settings?: PageSettings
|
|
81
87
|
): AsyncIterableIterator<SourceControl[]> {
|
|
82
|
-
let result
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
let result: ContainerAppsSourceControlsListByContainerAppResponse;
|
|
89
|
+
let continuationToken = settings?.continuationToken;
|
|
90
|
+
if (!continuationToken) {
|
|
91
|
+
result = await this._listByContainerApp(
|
|
92
|
+
resourceGroupName,
|
|
93
|
+
containerAppName,
|
|
94
|
+
options
|
|
95
|
+
);
|
|
96
|
+
let page = result.value || [];
|
|
97
|
+
continuationToken = result.nextLink;
|
|
98
|
+
setContinuationToken(page, continuationToken);
|
|
99
|
+
yield page;
|
|
100
|
+
}
|
|
89
101
|
while (continuationToken) {
|
|
90
102
|
result = await this._listByContainerAppNext(
|
|
91
103
|
resourceGroupName,
|
|
@@ -94,7 +106,9 @@ export class ContainerAppsSourceControlsImpl
|
|
|
94
106
|
options
|
|
95
107
|
);
|
|
96
108
|
continuationToken = result.nextLink;
|
|
97
|
-
|
|
109
|
+
let page = result.value || [];
|
|
110
|
+
setContinuationToken(page, continuationToken);
|
|
111
|
+
yield page;
|
|
98
112
|
}
|
|
99
113
|
}
|
|
100
114
|
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { DaprComponents } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -63,8 +64,16 @@ export class DaprComponentsImpl implements DaprComponents {
|
|
|
63
64
|
[Symbol.asyncIterator]() {
|
|
64
65
|
return this;
|
|
65
66
|
},
|
|
66
|
-
byPage: () => {
|
|
67
|
-
|
|
67
|
+
byPage: (settings?: PageSettings) => {
|
|
68
|
+
if (settings?.maxPageSize) {
|
|
69
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
70
|
+
}
|
|
71
|
+
return this.listPagingPage(
|
|
72
|
+
resourceGroupName,
|
|
73
|
+
environmentName,
|
|
74
|
+
options,
|
|
75
|
+
settings
|
|
76
|
+
);
|
|
68
77
|
}
|
|
69
78
|
};
|
|
70
79
|
}
|
|
@@ -72,11 +81,18 @@ export class DaprComponentsImpl implements DaprComponents {
|
|
|
72
81
|
private async *listPagingPage(
|
|
73
82
|
resourceGroupName: string,
|
|
74
83
|
environmentName: string,
|
|
75
|
-
options?: DaprComponentsListOptionalParams
|
|
84
|
+
options?: DaprComponentsListOptionalParams,
|
|
85
|
+
settings?: PageSettings
|
|
76
86
|
): AsyncIterableIterator<DaprComponent[]> {
|
|
77
|
-
let result
|
|
78
|
-
|
|
79
|
-
|
|
87
|
+
let result: DaprComponentsListResponse;
|
|
88
|
+
let continuationToken = settings?.continuationToken;
|
|
89
|
+
if (!continuationToken) {
|
|
90
|
+
result = await this._list(resourceGroupName, environmentName, options);
|
|
91
|
+
let page = result.value || [];
|
|
92
|
+
continuationToken = result.nextLink;
|
|
93
|
+
setContinuationToken(page, continuationToken);
|
|
94
|
+
yield page;
|
|
95
|
+
}
|
|
80
96
|
while (continuationToken) {
|
|
81
97
|
result = await this._listNext(
|
|
82
98
|
resourceGroupName,
|
|
@@ -85,7 +101,9 @@ export class DaprComponentsImpl implements DaprComponents {
|
|
|
85
101
|
options
|
|
86
102
|
);
|
|
87
103
|
continuationToken = result.nextLink;
|
|
88
|
-
|
|
104
|
+
let page = result.value || [];
|
|
105
|
+
setContinuationToken(page, continuationToken);
|
|
106
|
+
yield page;
|
|
89
107
|
}
|
|
90
108
|
}
|
|
91
109
|
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { ManagedEnvironments } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -18,13 +19,14 @@ import {
|
|
|
18
19
|
ManagedEnvironment,
|
|
19
20
|
ManagedEnvironmentsListBySubscriptionNextOptionalParams,
|
|
20
21
|
ManagedEnvironmentsListBySubscriptionOptionalParams,
|
|
22
|
+
ManagedEnvironmentsListBySubscriptionResponse,
|
|
21
23
|
ManagedEnvironmentsListByResourceGroupNextOptionalParams,
|
|
22
24
|
ManagedEnvironmentsListByResourceGroupOptionalParams,
|
|
25
|
+
ManagedEnvironmentsListByResourceGroupResponse,
|
|
23
26
|
WorkloadProfileStates,
|
|
24
27
|
ManagedEnvironmentsListWorkloadProfileStatesNextOptionalParams,
|
|
25
28
|
ManagedEnvironmentsListWorkloadProfileStatesOptionalParams,
|
|
26
|
-
|
|
27
|
-
ManagedEnvironmentsListByResourceGroupResponse,
|
|
29
|
+
ManagedEnvironmentsListWorkloadProfileStatesResponse,
|
|
28
30
|
ManagedEnvironmentsGetOptionalParams,
|
|
29
31
|
ManagedEnvironmentsGetResponse,
|
|
30
32
|
ManagedEnvironmentsCreateOrUpdateOptionalParams,
|
|
@@ -33,7 +35,6 @@ import {
|
|
|
33
35
|
ManagedEnvironmentsUpdateOptionalParams,
|
|
34
36
|
ManagedEnvironmentsGetAuthTokenOptionalParams,
|
|
35
37
|
ManagedEnvironmentsGetAuthTokenResponse,
|
|
36
|
-
ManagedEnvironmentsListWorkloadProfileStatesResponse,
|
|
37
38
|
ManagedEnvironmentsListBySubscriptionNextResponse,
|
|
38
39
|
ManagedEnvironmentsListByResourceGroupNextResponse,
|
|
39
40
|
ManagedEnvironmentsListWorkloadProfileStatesNextResponse
|
|
@@ -67,22 +68,34 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments {
|
|
|
67
68
|
[Symbol.asyncIterator]() {
|
|
68
69
|
return this;
|
|
69
70
|
},
|
|
70
|
-
byPage: () => {
|
|
71
|
-
|
|
71
|
+
byPage: (settings?: PageSettings) => {
|
|
72
|
+
if (settings?.maxPageSize) {
|
|
73
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
74
|
+
}
|
|
75
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
72
76
|
}
|
|
73
77
|
};
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
private async *listBySubscriptionPagingPage(
|
|
77
|
-
options?: ManagedEnvironmentsListBySubscriptionOptionalParams
|
|
81
|
+
options?: ManagedEnvironmentsListBySubscriptionOptionalParams,
|
|
82
|
+
settings?: PageSettings
|
|
78
83
|
): AsyncIterableIterator<ManagedEnvironment[]> {
|
|
79
|
-
let result
|
|
80
|
-
|
|
81
|
-
|
|
84
|
+
let result: ManagedEnvironmentsListBySubscriptionResponse;
|
|
85
|
+
let continuationToken = settings?.continuationToken;
|
|
86
|
+
if (!continuationToken) {
|
|
87
|
+
result = await this._listBySubscription(options);
|
|
88
|
+
let page = result.value || [];
|
|
89
|
+
continuationToken = result.nextLink;
|
|
90
|
+
setContinuationToken(page, continuationToken);
|
|
91
|
+
yield page;
|
|
92
|
+
}
|
|
82
93
|
while (continuationToken) {
|
|
83
94
|
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
84
95
|
continuationToken = result.nextLink;
|
|
85
|
-
|
|
96
|
+
let page = result.value || [];
|
|
97
|
+
setContinuationToken(page, continuationToken);
|
|
98
|
+
yield page;
|
|
86
99
|
}
|
|
87
100
|
}
|
|
88
101
|
|
|
@@ -111,19 +124,33 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments {
|
|
|
111
124
|
[Symbol.asyncIterator]() {
|
|
112
125
|
return this;
|
|
113
126
|
},
|
|
114
|
-
byPage: () => {
|
|
115
|
-
|
|
127
|
+
byPage: (settings?: PageSettings) => {
|
|
128
|
+
if (settings?.maxPageSize) {
|
|
129
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
130
|
+
}
|
|
131
|
+
return this.listByResourceGroupPagingPage(
|
|
132
|
+
resourceGroupName,
|
|
133
|
+
options,
|
|
134
|
+
settings
|
|
135
|
+
);
|
|
116
136
|
}
|
|
117
137
|
};
|
|
118
138
|
}
|
|
119
139
|
|
|
120
140
|
private async *listByResourceGroupPagingPage(
|
|
121
141
|
resourceGroupName: string,
|
|
122
|
-
options?: ManagedEnvironmentsListByResourceGroupOptionalParams
|
|
142
|
+
options?: ManagedEnvironmentsListByResourceGroupOptionalParams,
|
|
143
|
+
settings?: PageSettings
|
|
123
144
|
): AsyncIterableIterator<ManagedEnvironment[]> {
|
|
124
|
-
let result
|
|
125
|
-
|
|
126
|
-
|
|
145
|
+
let result: ManagedEnvironmentsListByResourceGroupResponse;
|
|
146
|
+
let continuationToken = settings?.continuationToken;
|
|
147
|
+
if (!continuationToken) {
|
|
148
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
149
|
+
let page = result.value || [];
|
|
150
|
+
continuationToken = result.nextLink;
|
|
151
|
+
setContinuationToken(page, continuationToken);
|
|
152
|
+
yield page;
|
|
153
|
+
}
|
|
127
154
|
while (continuationToken) {
|
|
128
155
|
result = await this._listByResourceGroupNext(
|
|
129
156
|
resourceGroupName,
|
|
@@ -131,7 +158,9 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments {
|
|
|
131
158
|
options
|
|
132
159
|
);
|
|
133
160
|
continuationToken = result.nextLink;
|
|
134
|
-
|
|
161
|
+
let page = result.value || [];
|
|
162
|
+
setContinuationToken(page, continuationToken);
|
|
163
|
+
yield page;
|
|
135
164
|
}
|
|
136
165
|
}
|
|
137
166
|
|
|
@@ -170,11 +199,15 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments {
|
|
|
170
199
|
[Symbol.asyncIterator]() {
|
|
171
200
|
return this;
|
|
172
201
|
},
|
|
173
|
-
byPage: () => {
|
|
202
|
+
byPage: (settings?: PageSettings) => {
|
|
203
|
+
if (settings?.maxPageSize) {
|
|
204
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
205
|
+
}
|
|
174
206
|
return this.listWorkloadProfileStatesPagingPage(
|
|
175
207
|
resourceGroupName,
|
|
176
208
|
environmentName,
|
|
177
|
-
options
|
|
209
|
+
options,
|
|
210
|
+
settings
|
|
178
211
|
);
|
|
179
212
|
}
|
|
180
213
|
};
|
|
@@ -183,15 +216,22 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments {
|
|
|
183
216
|
private async *listWorkloadProfileStatesPagingPage(
|
|
184
217
|
resourceGroupName: string,
|
|
185
218
|
environmentName: string,
|
|
186
|
-
options?: ManagedEnvironmentsListWorkloadProfileStatesOptionalParams
|
|
219
|
+
options?: ManagedEnvironmentsListWorkloadProfileStatesOptionalParams,
|
|
220
|
+
settings?: PageSettings
|
|
187
221
|
): AsyncIterableIterator<WorkloadProfileStates[]> {
|
|
188
|
-
let result
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
222
|
+
let result: ManagedEnvironmentsListWorkloadProfileStatesResponse;
|
|
223
|
+
let continuationToken = settings?.continuationToken;
|
|
224
|
+
if (!continuationToken) {
|
|
225
|
+
result = await this._listWorkloadProfileStates(
|
|
226
|
+
resourceGroupName,
|
|
227
|
+
environmentName,
|
|
228
|
+
options
|
|
229
|
+
);
|
|
230
|
+
let page = result.value || [];
|
|
231
|
+
continuationToken = result.nextLink;
|
|
232
|
+
setContinuationToken(page, continuationToken);
|
|
233
|
+
yield page;
|
|
234
|
+
}
|
|
195
235
|
while (continuationToken) {
|
|
196
236
|
result = await this._listWorkloadProfileStatesNext(
|
|
197
237
|
resourceGroupName,
|
|
@@ -200,7 +240,9 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments {
|
|
|
200
240
|
options
|
|
201
241
|
);
|
|
202
242
|
continuationToken = result.nextLink;
|
|
203
|
-
|
|
243
|
+
let page = result.value || [];
|
|
244
|
+
setContinuationToken(page, continuationToken);
|
|
245
|
+
yield page;
|
|
204
246
|
}
|
|
205
247
|
}
|
|
206
248
|
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { Operations } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -48,22 +49,34 @@ export class OperationsImpl implements Operations {
|
|
|
48
49
|
[Symbol.asyncIterator]() {
|
|
49
50
|
return this;
|
|
50
51
|
},
|
|
51
|
-
byPage: () => {
|
|
52
|
-
|
|
52
|
+
byPage: (settings?: PageSettings) => {
|
|
53
|
+
if (settings?.maxPageSize) {
|
|
54
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
55
|
+
}
|
|
56
|
+
return this.listPagingPage(options, settings);
|
|
53
57
|
}
|
|
54
58
|
};
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
private async *listPagingPage(
|
|
58
|
-
options?: OperationsListOptionalParams
|
|
62
|
+
options?: OperationsListOptionalParams,
|
|
63
|
+
settings?: PageSettings
|
|
59
64
|
): AsyncIterableIterator<OperationDetail[]> {
|
|
60
|
-
let result
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
let result: OperationsListResponse;
|
|
66
|
+
let continuationToken = settings?.continuationToken;
|
|
67
|
+
if (!continuationToken) {
|
|
68
|
+
result = await this._list(options);
|
|
69
|
+
let page = result.value || [];
|
|
70
|
+
continuationToken = result.nextLink;
|
|
71
|
+
setContinuationToken(page, continuationToken);
|
|
72
|
+
yield page;
|
|
73
|
+
}
|
|
63
74
|
while (continuationToken) {
|
|
64
75
|
result = await this._listNext(continuationToken, options);
|
|
65
76
|
continuationToken = result.nextLink;
|
|
66
|
-
|
|
77
|
+
let page = result.value || [];
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
67
80
|
}
|
|
68
81
|
}
|
|
69
82
|
|
|
@@ -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 a result page from a pageable operation, returns a
|
|
17
|
+
* continuation token that can be used to begin paging from
|
|
18
|
+
* that point later.
|
|
19
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
20
|
+
* @returns The continuation token that can be passed into byPage().
|
|
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
|
+
}
|
|
@@ -2520,6 +2520,15 @@ export declare interface ForwardProxy {
|
|
|
2520
2520
|
/** Defines values for ForwardProxyConvention. */
|
|
2521
2521
|
export declare type ForwardProxyConvention = "NoProxy" | "Standard" | "Custom";
|
|
2522
2522
|
|
|
2523
|
+
/**
|
|
2524
|
+
* Given a result page from a pageable operation, returns a
|
|
2525
|
+
* continuation token that can be used to begin paging from
|
|
2526
|
+
* that point later.
|
|
2527
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
2528
|
+
* @returns The continuation token that can be passed into byPage().
|
|
2529
|
+
*/
|
|
2530
|
+
export declare function getContinuationToken(page: unknown): string | undefined;
|
|
2531
|
+
|
|
2523
2532
|
/** The configuration settings of the GitHub provider. */
|
|
2524
2533
|
export declare interface GitHub {
|
|
2525
2534
|
/** <code>false</code> if the GitHub provider should not be enabled despite the set registration; otherwise, <code>true</code>. */
|