@azure/arm-azurestackhci 3.0.3-alpha.20221026.1 → 3.1.0-alpha.20221117.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +10 -10
  2. package/dist/index.js +233 -47
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/src/azureStackHCIClient.d.ts +2 -0
  7. package/dist-esm/src/azureStackHCIClient.d.ts.map +1 -1
  8. package/dist-esm/src/azureStackHCIClient.js +49 -18
  9. package/dist-esm/src/azureStackHCIClient.js.map +1 -1
  10. package/dist-esm/src/index.d.ts +1 -0
  11. package/dist-esm/src/index.d.ts.map +1 -1
  12. package/dist-esm/src/index.js +1 -0
  13. package/dist-esm/src/index.js.map +1 -1
  14. package/dist-esm/src/models/index.d.ts +89 -9
  15. package/dist-esm/src/models/index.d.ts.map +1 -1
  16. package/dist-esm/src/models/index.js +79 -0
  17. package/dist-esm/src/models/index.js.map +1 -1
  18. package/dist-esm/src/operations/arcSettings.d.ts.map +1 -1
  19. package/dist-esm/src/operations/arcSettings.js +19 -7
  20. package/dist-esm/src/operations/arcSettings.js.map +1 -1
  21. package/dist-esm/src/operations/clusters.d.ts.map +1 -1
  22. package/dist-esm/src/operations/clusters.js +37 -14
  23. package/dist-esm/src/operations/clusters.js.map +1 -1
  24. package/dist-esm/src/operations/extensions.d.ts.map +1 -1
  25. package/dist-esm/src/operations/extensions.js +19 -7
  26. package/dist-esm/src/operations/extensions.js.map +1 -1
  27. package/dist-esm/src/pagingHelper.d.ts +13 -0
  28. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  29. package/dist-esm/src/pagingHelper.js +32 -0
  30. package/dist-esm/src/pagingHelper.js.map +1 -0
  31. package/dist-esm/test/sampleTest.js +11 -13
  32. package/dist-esm/test/sampleTest.js.map +1 -1
  33. package/package.json +12 -8
  34. package/review/arm-azurestackhci.api.md +46 -121
  35. package/src/azureStackHCIClient.ts +60 -20
  36. package/src/index.ts +1 -0
  37. package/src/models/index.ts +88 -9
  38. package/src/operations/arcSettings.ts +26 -12
  39. package/src/operations/clusters.ts +45 -16
  40. package/src/operations/extensions.ts +27 -13
  41. package/src/pagingHelper.ts +39 -0
  42. package/types/arm-azurestackhci.d.ts +100 -9
  43. package/types/tsdoc-metadata.json +1 -1
@@ -375,18 +375,18 @@ export interface ArcConnectivityProperties {
375
375
  }
376
376
 
377
377
  /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */
378
- export type ProxyResource = Resource & {};
378
+ export interface ProxyResource extends Resource {}
379
379
 
380
380
  /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */
381
- export type TrackedResource = Resource & {
381
+ export interface TrackedResource extends Resource {
382
382
  /** Resource tags. */
383
383
  tags?: { [propertyName: string]: string };
384
384
  /** The geo-location where the resource lives */
385
385
  location: string;
386
- };
386
+ }
387
387
 
388
388
  /** ArcSetting details. */
389
- export type ArcSetting = ProxyResource & {
389
+ export interface ArcSetting extends ProxyResource {
390
390
  /**
391
391
  * Provisioning state of the ArcSetting proxy resource.
392
392
  * NOTE: This property will not be serialized. It can only be populated by the server.
@@ -426,10 +426,10 @@ export type ArcSetting = ProxyResource & {
426
426
  lastModifiedByType?: CreatedByType;
427
427
  /** The timestamp of resource last modification (UTC) */
428
428
  lastModifiedAt?: Date;
429
- };
429
+ }
430
430
 
431
431
  /** Details of a particular extension in HCI Cluster. */
432
- export type Extension = ProxyResource & {
432
+ export interface Extension extends ProxyResource {
433
433
  /**
434
434
  * Provisioning state of the Extension proxy resource.
435
435
  * NOTE: This property will not be serialized. It can only be populated by the server.
@@ -471,10 +471,10 @@ export type Extension = ProxyResource & {
471
471
  lastModifiedByType?: CreatedByType;
472
472
  /** The timestamp of resource last modification (UTC) */
473
473
  lastModifiedAt?: Date;
474
- };
474
+ }
475
475
 
476
476
  /** Cluster details. */
477
- export type Cluster = TrackedResource & {
477
+ export interface Cluster extends TrackedResource {
478
478
  /**
479
479
  * Provisioning state.
480
480
  * NOTE: This property will not be serialized. It can only be populated by the server.
@@ -549,13 +549,17 @@ export type Cluster = TrackedResource & {
549
549
  lastModifiedByType?: CreatedByType;
550
550
  /** The timestamp of resource last modification (UTC) */
551
551
  lastModifiedAt?: Date;
552
- };
552
+ }
553
553
 
554
554
  /** Known values of {@link CreatedByType} that the service accepts. */
555
555
  export enum KnownCreatedByType {
556
+ /** User */
556
557
  User = "User",
558
+ /** Application */
557
559
  Application = "Application",
560
+ /** ManagedIdentity */
558
561
  ManagedIdentity = "ManagedIdentity",
562
+ /** Key */
559
563
  Key = "Key"
560
564
  }
561
565
 
@@ -573,10 +577,15 @@ export type CreatedByType = string;
573
577
 
574
578
  /** Known values of {@link ProvisioningState} that the service accepts. */
575
579
  export enum KnownProvisioningState {
580
+ /** Succeeded */
576
581
  Succeeded = "Succeeded",
582
+ /** Failed */
577
583
  Failed = "Failed",
584
+ /** Canceled */
578
585
  Canceled = "Canceled",
586
+ /** Accepted */
579
587
  Accepted = "Accepted",
588
+ /** Provisioning */
580
589
  Provisioning = "Provisioning"
581
590
  }
582
591
 
@@ -595,20 +604,35 @@ export type ProvisioningState = string;
595
604
 
596
605
  /** Known values of {@link ArcSettingAggregateState} that the service accepts. */
597
606
  export enum KnownArcSettingAggregateState {
607
+ /** NotSpecified */
598
608
  NotSpecified = "NotSpecified",
609
+ /** Error */
599
610
  Error = "Error",
611
+ /** Succeeded */
600
612
  Succeeded = "Succeeded",
613
+ /** Canceled */
601
614
  Canceled = "Canceled",
615
+ /** Failed */
602
616
  Failed = "Failed",
617
+ /** Connected */
603
618
  Connected = "Connected",
619
+ /** Disconnected */
604
620
  Disconnected = "Disconnected",
621
+ /** Deleted */
605
622
  Deleted = "Deleted",
623
+ /** Creating */
606
624
  Creating = "Creating",
625
+ /** Updating */
607
626
  Updating = "Updating",
627
+ /** Deleting */
608
628
  Deleting = "Deleting",
629
+ /** Moving */
609
630
  Moving = "Moving",
631
+ /** PartiallySucceeded */
610
632
  PartiallySucceeded = "PartiallySucceeded",
633
+ /** PartiallyConnected */
611
634
  PartiallyConnected = "PartiallyConnected",
635
+ /** InProgress */
612
636
  InProgress = "InProgress"
613
637
  }
614
638
 
@@ -637,17 +661,29 @@ export type ArcSettingAggregateState = string;
637
661
 
638
662
  /** Known values of {@link NodeArcState} that the service accepts. */
639
663
  export enum KnownNodeArcState {
664
+ /** NotSpecified */
640
665
  NotSpecified = "NotSpecified",
666
+ /** Error */
641
667
  Error = "Error",
668
+ /** Succeeded */
642
669
  Succeeded = "Succeeded",
670
+ /** Canceled */
643
671
  Canceled = "Canceled",
672
+ /** Failed */
644
673
  Failed = "Failed",
674
+ /** Connected */
645
675
  Connected = "Connected",
676
+ /** Disconnected */
646
677
  Disconnected = "Disconnected",
678
+ /** Deleted */
647
679
  Deleted = "Deleted",
680
+ /** Creating */
648
681
  Creating = "Creating",
682
+ /** Updating */
649
683
  Updating = "Updating",
684
+ /** Deleting */
650
685
  Deleting = "Deleting",
686
+ /** Moving */
651
687
  Moving = "Moving"
652
688
  }
653
689
 
@@ -673,10 +709,15 @@ export type NodeArcState = string;
673
709
 
674
710
  /** Known values of {@link Status} that the service accepts. */
675
711
  export enum KnownStatus {
712
+ /** NotYetRegistered */
676
713
  NotYetRegistered = "NotYetRegistered",
714
+ /** ConnectedRecently */
677
715
  ConnectedRecently = "ConnectedRecently",
716
+ /** NotConnectedRecently */
678
717
  NotConnectedRecently = "NotConnectedRecently",
718
+ /** Disconnected */
679
719
  Disconnected = "Disconnected",
720
+ /** Error */
680
721
  Error = "Error"
681
722
  }
682
723
 
@@ -695,7 +736,9 @@ export type Status = string;
695
736
 
696
737
  /** Known values of {@link WindowsServerSubscription} that the service accepts. */
697
738
  export enum KnownWindowsServerSubscription {
739
+ /** Disabled */
698
740
  Disabled = "Disabled",
741
+ /** Enabled */
699
742
  Enabled = "Enabled"
700
743
  }
701
744
 
@@ -711,8 +754,11 @@ export type WindowsServerSubscription = string;
711
754
 
712
755
  /** Known values of {@link DiagnosticLevel} that the service accepts. */
713
756
  export enum KnownDiagnosticLevel {
757
+ /** Off */
714
758
  Off = "Off",
759
+ /** Basic */
715
760
  Basic = "Basic",
761
+ /** Enhanced */
716
762
  Enhanced = "Enhanced"
717
763
  }
718
764
 
@@ -729,7 +775,9 @@ export type DiagnosticLevel = string;
729
775
 
730
776
  /** Known values of {@link ImdsAttestation} that the service accepts. */
731
777
  export enum KnownImdsAttestation {
778
+ /** Disabled */
732
779
  Disabled = "Disabled",
780
+ /** Enabled */
733
781
  Enabled = "Enabled"
734
782
  }
735
783
 
@@ -745,20 +793,35 @@ export type ImdsAttestation = string;
745
793
 
746
794
  /** Known values of {@link ExtensionAggregateState} that the service accepts. */
747
795
  export enum KnownExtensionAggregateState {
796
+ /** NotSpecified */
748
797
  NotSpecified = "NotSpecified",
798
+ /** Error */
749
799
  Error = "Error",
800
+ /** Succeeded */
750
801
  Succeeded = "Succeeded",
802
+ /** Canceled */
751
803
  Canceled = "Canceled",
804
+ /** Failed */
752
805
  Failed = "Failed",
806
+ /** Connected */
753
807
  Connected = "Connected",
808
+ /** Disconnected */
754
809
  Disconnected = "Disconnected",
810
+ /** Deleted */
755
811
  Deleted = "Deleted",
812
+ /** Creating */
756
813
  Creating = "Creating",
814
+ /** Updating */
757
815
  Updating = "Updating",
816
+ /** Deleting */
758
817
  Deleting = "Deleting",
818
+ /** Moving */
759
819
  Moving = "Moving",
820
+ /** PartiallySucceeded */
760
821
  PartiallySucceeded = "PartiallySucceeded",
822
+ /** PartiallyConnected */
761
823
  PartiallyConnected = "PartiallyConnected",
824
+ /** InProgress */
762
825
  InProgress = "InProgress"
763
826
  }
764
827
 
@@ -787,17 +850,29 @@ export type ExtensionAggregateState = string;
787
850
 
788
851
  /** Known values of {@link NodeExtensionState} that the service accepts. */
789
852
  export enum KnownNodeExtensionState {
853
+ /** NotSpecified */
790
854
  NotSpecified = "NotSpecified",
855
+ /** Error */
791
856
  Error = "Error",
857
+ /** Succeeded */
792
858
  Succeeded = "Succeeded",
859
+ /** Canceled */
793
860
  Canceled = "Canceled",
861
+ /** Failed */
794
862
  Failed = "Failed",
863
+ /** Connected */
795
864
  Connected = "Connected",
865
+ /** Disconnected */
796
866
  Disconnected = "Disconnected",
867
+ /** Deleted */
797
868
  Deleted = "Deleted",
869
+ /** Creating */
798
870
  Creating = "Creating",
871
+ /** Updating */
799
872
  Updating = "Updating",
873
+ /** Deleting */
800
874
  Deleting = "Deleting",
875
+ /** Moving */
801
876
  Moving = "Moving"
802
877
  }
803
878
 
@@ -823,8 +898,11 @@ export type NodeExtensionState = string;
823
898
 
824
899
  /** Known values of {@link Origin} that the service accepts. */
825
900
  export enum KnownOrigin {
901
+ /** User */
826
902
  User = "user",
903
+ /** System */
827
904
  System = "system",
905
+ /** UserSystem */
828
906
  UserSystem = "user,system"
829
907
  }
830
908
 
@@ -841,6 +919,7 @@ export type Origin = string;
841
919
 
842
920
  /** Known values of {@link ActionType} that the service accepts. */
843
921
  export enum KnownActionType {
922
+ /** Internal */
844
923
  Internal = "Internal"
845
924
  }
846
925
 
@@ -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 { ArcSettings } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -70,11 +71,15 @@ export class ArcSettingsImpl implements ArcSettings {
70
71
  [Symbol.asyncIterator]() {
71
72
  return this;
72
73
  },
73
- byPage: () => {
74
+ byPage: (settings?: PageSettings) => {
75
+ if (settings?.maxPageSize) {
76
+ throw new Error("maxPageSize is not supported by this operation.");
77
+ }
74
78
  return this.listByClusterPagingPage(
75
79
  resourceGroupName,
76
80
  clusterName,
77
- options
81
+ options,
82
+ settings
78
83
  );
79
84
  }
80
85
  };
@@ -83,15 +88,22 @@ export class ArcSettingsImpl implements ArcSettings {
83
88
  private async *listByClusterPagingPage(
84
89
  resourceGroupName: string,
85
90
  clusterName: string,
86
- options?: ArcSettingsListByClusterOptionalParams
91
+ options?: ArcSettingsListByClusterOptionalParams,
92
+ settings?: PageSettings
87
93
  ): AsyncIterableIterator<ArcSetting[]> {
88
- let result = await this._listByCluster(
89
- resourceGroupName,
90
- clusterName,
91
- options
92
- );
93
- yield result.value || [];
94
- let continuationToken = result.nextLink;
94
+ let result: ArcSettingsListByClusterResponse;
95
+ let continuationToken = settings?.continuationToken;
96
+ if (!continuationToken) {
97
+ result = await this._listByCluster(
98
+ resourceGroupName,
99
+ clusterName,
100
+ options
101
+ );
102
+ let page = result.value || [];
103
+ continuationToken = result.nextLink;
104
+ setContinuationToken(page, continuationToken);
105
+ yield page;
106
+ }
95
107
  while (continuationToken) {
96
108
  result = await this._listByClusterNext(
97
109
  resourceGroupName,
@@ -100,7 +112,9 @@ export class ArcSettingsImpl implements ArcSettings {
100
112
  options
101
113
  );
102
114
  continuationToken = result.nextLink;
103
- yield result.value || [];
115
+ let page = result.value || [];
116
+ setContinuationToken(page, continuationToken);
117
+ yield page;
104
118
  }
105
119
  }
106
120
 
@@ -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 { Clusters } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -18,9 +19,9 @@ import {
18
19
  Cluster,
19
20
  ClustersListBySubscriptionNextOptionalParams,
20
21
  ClustersListBySubscriptionOptionalParams,
22
+ ClustersListBySubscriptionResponse,
21
23
  ClustersListByResourceGroupNextOptionalParams,
22
24
  ClustersListByResourceGroupOptionalParams,
23
- ClustersListBySubscriptionResponse,
24
25
  ClustersListByResourceGroupResponse,
25
26
  ClustersGetOptionalParams,
26
27
  ClustersGetResponse,
@@ -66,22 +67,34 @@ export class ClustersImpl implements Clusters {
66
67
  [Symbol.asyncIterator]() {
67
68
  return this;
68
69
  },
69
- byPage: () => {
70
- return this.listBySubscriptionPagingPage(options);
70
+ byPage: (settings?: PageSettings) => {
71
+ if (settings?.maxPageSize) {
72
+ throw new Error("maxPageSize is not supported by this operation.");
73
+ }
74
+ return this.listBySubscriptionPagingPage(options, settings);
71
75
  }
72
76
  };
73
77
  }
74
78
 
75
79
  private async *listBySubscriptionPagingPage(
76
- options?: ClustersListBySubscriptionOptionalParams
80
+ options?: ClustersListBySubscriptionOptionalParams,
81
+ settings?: PageSettings
77
82
  ): AsyncIterableIterator<Cluster[]> {
78
- let result = await this._listBySubscription(options);
79
- yield result.value || [];
80
- let continuationToken = result.nextLink;
83
+ let result: ClustersListBySubscriptionResponse;
84
+ let continuationToken = settings?.continuationToken;
85
+ if (!continuationToken) {
86
+ result = await this._listBySubscription(options);
87
+ let page = result.value || [];
88
+ continuationToken = result.nextLink;
89
+ setContinuationToken(page, continuationToken);
90
+ yield page;
91
+ }
81
92
  while (continuationToken) {
82
93
  result = await this._listBySubscriptionNext(continuationToken, options);
83
94
  continuationToken = result.nextLink;
84
- yield result.value || [];
95
+ let page = result.value || [];
96
+ setContinuationToken(page, continuationToken);
97
+ yield page;
85
98
  }
86
99
  }
87
100
 
@@ -110,19 +123,33 @@ export class ClustersImpl implements Clusters {
110
123
  [Symbol.asyncIterator]() {
111
124
  return this;
112
125
  },
113
- byPage: () => {
114
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
126
+ byPage: (settings?: PageSettings) => {
127
+ if (settings?.maxPageSize) {
128
+ throw new Error("maxPageSize is not supported by this operation.");
129
+ }
130
+ return this.listByResourceGroupPagingPage(
131
+ resourceGroupName,
132
+ options,
133
+ settings
134
+ );
115
135
  }
116
136
  };
117
137
  }
118
138
 
119
139
  private async *listByResourceGroupPagingPage(
120
140
  resourceGroupName: string,
121
- options?: ClustersListByResourceGroupOptionalParams
141
+ options?: ClustersListByResourceGroupOptionalParams,
142
+ settings?: PageSettings
122
143
  ): AsyncIterableIterator<Cluster[]> {
123
- let result = await this._listByResourceGroup(resourceGroupName, options);
124
- yield result.value || [];
125
- let continuationToken = result.nextLink;
144
+ let result: ClustersListByResourceGroupResponse;
145
+ let continuationToken = settings?.continuationToken;
146
+ if (!continuationToken) {
147
+ result = await this._listByResourceGroup(resourceGroupName, options);
148
+ let page = result.value || [];
149
+ continuationToken = result.nextLink;
150
+ setContinuationToken(page, continuationToken);
151
+ yield page;
152
+ }
126
153
  while (continuationToken) {
127
154
  result = await this._listByResourceGroupNext(
128
155
  resourceGroupName,
@@ -130,7 +157,9 @@ export class ClustersImpl implements Clusters {
130
157
  options
131
158
  );
132
159
  continuationToken = result.nextLink;
133
- yield result.value || [];
160
+ let page = result.value || [];
161
+ setContinuationToken(page, continuationToken);
162
+ yield page;
134
163
  }
135
164
  }
136
165
 
@@ -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 { Extensions } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -68,12 +69,16 @@ export class ExtensionsImpl implements Extensions {
68
69
  [Symbol.asyncIterator]() {
69
70
  return this;
70
71
  },
71
- byPage: () => {
72
+ byPage: (settings?: PageSettings) => {
73
+ if (settings?.maxPageSize) {
74
+ throw new Error("maxPageSize is not supported by this operation.");
75
+ }
72
76
  return this.listByArcSettingPagingPage(
73
77
  resourceGroupName,
74
78
  clusterName,
75
79
  arcSettingName,
76
- options
80
+ options,
81
+ settings
77
82
  );
78
83
  }
79
84
  };
@@ -83,16 +88,23 @@ export class ExtensionsImpl implements Extensions {
83
88
  resourceGroupName: string,
84
89
  clusterName: string,
85
90
  arcSettingName: string,
86
- options?: ExtensionsListByArcSettingOptionalParams
91
+ options?: ExtensionsListByArcSettingOptionalParams,
92
+ settings?: PageSettings
87
93
  ): AsyncIterableIterator<Extension[]> {
88
- let result = await this._listByArcSetting(
89
- resourceGroupName,
90
- clusterName,
91
- arcSettingName,
92
- options
93
- );
94
- yield result.value || [];
95
- let continuationToken = result.nextLink;
94
+ let result: ExtensionsListByArcSettingResponse;
95
+ let continuationToken = settings?.continuationToken;
96
+ if (!continuationToken) {
97
+ result = await this._listByArcSetting(
98
+ resourceGroupName,
99
+ clusterName,
100
+ arcSettingName,
101
+ options
102
+ );
103
+ let page = result.value || [];
104
+ continuationToken = result.nextLink;
105
+ setContinuationToken(page, continuationToken);
106
+ yield page;
107
+ }
96
108
  while (continuationToken) {
97
109
  result = await this._listByArcSettingNext(
98
110
  resourceGroupName,
@@ -102,7 +114,9 @@ export class ExtensionsImpl implements Extensions {
102
114
  options
103
115
  );
104
116
  continuationToken = result.nextLink;
105
- yield result.value || [];
117
+ let page = result.value || [];
118
+ setContinuationToken(page, continuationToken);
119
+ yield page;
106
120
  }
107
121
  }
108
122
 
@@ -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
+ }