@azure/arm-neonpostgres 1.0.0-beta.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 -0
- package/LICENSE +21 -0
- package/README.md +106 -0
- package/dist/browser/api/index.d.ts +5 -0
- package/dist/browser/api/index.d.ts.map +1 -0
- package/dist/browser/api/index.js +6 -0
- package/dist/browser/api/index.js.map +1 -0
- package/dist/browser/api/operations/index.d.ts +9 -0
- package/dist/browser/api/operations/index.d.ts.map +1 -0
- package/dist/browser/api/operations/index.js +22 -0
- package/dist/browser/api/operations/index.js.map +1 -0
- package/dist/browser/api/options.d.ts +29 -0
- package/dist/browser/api/options.d.ts.map +1 -0
- package/dist/browser/api/options.js +4 -0
- package/dist/browser/api/options.js.map +1 -0
- package/dist/browser/api/organizations/index.d.ts +30 -0
- package/dist/browser/api/organizations/index.d.ts.map +1 -0
- package/dist/browser/api/organizations/index.js +127 -0
- package/dist/browser/api/organizations/index.js.map +1 -0
- package/dist/browser/api/postgresContext.d.ts +12 -0
- package/dist/browser/api/postgresContext.d.ts.map +1 -0
- package/dist/browser/api/postgresContext.js +34 -0
- package/dist/browser/api/postgresContext.js.map +1 -0
- package/dist/browser/classic/index.d.ts +3 -0
- package/dist/browser/classic/index.d.ts.map +1 -0
- package/dist/browser/classic/index.js +4 -0
- package/dist/browser/classic/index.js.map +1 -0
- package/dist/browser/classic/operations/index.d.ts +14 -0
- package/dist/browser/classic/operations/index.d.ts.map +1 -0
- package/dist/browser/classic/operations/index.js +12 -0
- package/dist/browser/classic/operations/index.js.map +1 -0
- package/dist/browser/classic/organizations/index.d.ts +30 -0
- package/dist/browser/classic/organizations/index.d.ts.map +1 -0
- package/dist/browser/classic/organizations/index.js +17 -0
- package/dist/browser/classic/organizations/index.js.map +1 -0
- package/dist/browser/helpers/serializerHelpers.d.ts +3 -0
- package/dist/browser/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/browser/helpers/serializerHelpers.js +24 -0
- package/dist/browser/helpers/serializerHelpers.js.map +1 -0
- package/dist/browser/index.d.ts +8 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +6 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/logger.d.ts +2 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/dist/browser/logger.js +5 -0
- package/dist/browser/logger.js.map +1 -0
- package/dist/browser/models/index.d.ts +2 -0
- package/dist/browser/models/index.d.ts.map +1 -0
- package/dist/browser/models/index.js +4 -0
- package/dist/browser/models/index.js.map +1 -0
- package/dist/browser/models/models.d.ts +309 -0
- package/dist/browser/models/models.d.ts.map +1 -0
- package/dist/browser/models/models.js +312 -0
- package/dist/browser/models/models.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/postgresClient.d.ts +17 -0
- package/dist/browser/postgresClient.d.ts.map +1 -0
- package/dist/browser/postgresClient.js +19 -0
- package/dist/browser/postgresClient.js.map +1 -0
- package/dist/browser/restorePollerHelpers.d.ts +21 -0
- package/dist/browser/restorePollerHelpers.d.ts.map +1 -0
- package/dist/browser/restorePollerHelpers.js +101 -0
- package/dist/browser/restorePollerHelpers.js.map +1 -0
- package/dist/browser/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/browser/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/browser/static-helpers/pagingHelpers.js +137 -0
- package/dist/browser/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/browser/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/browser/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/browser/static-helpers/pollingHelpers.js +76 -0
- package/dist/browser/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/commonjs/api/index.d.ts +5 -0
- package/dist/commonjs/api/index.d.ts.map +1 -0
- package/dist/commonjs/api/index.js +17 -0
- package/dist/commonjs/api/index.js.map +1 -0
- package/dist/commonjs/api/operations/index.d.ts +9 -0
- package/dist/commonjs/api/operations/index.d.ts.map +1 -0
- package/dist/commonjs/api/operations/index.js +27 -0
- package/dist/commonjs/api/operations/index.js.map +1 -0
- package/dist/commonjs/api/options.d.ts +29 -0
- package/dist/commonjs/api/options.d.ts.map +1 -0
- package/dist/commonjs/api/options.js +5 -0
- package/dist/commonjs/api/options.js.map +1 -0
- package/dist/commonjs/api/organizations/index.d.ts +30 -0
- package/dist/commonjs/api/organizations/index.d.ts.map +1 -0
- package/dist/commonjs/api/organizations/index.js +147 -0
- package/dist/commonjs/api/organizations/index.js.map +1 -0
- package/dist/commonjs/api/postgresContext.d.ts +12 -0
- package/dist/commonjs/api/postgresContext.d.ts.map +1 -0
- package/dist/commonjs/api/postgresContext.js +37 -0
- package/dist/commonjs/api/postgresContext.js.map +1 -0
- package/dist/commonjs/classic/index.d.ts +3 -0
- package/dist/commonjs/classic/index.d.ts.map +1 -0
- package/dist/commonjs/classic/index.js +5 -0
- package/dist/commonjs/classic/index.js.map +1 -0
- package/dist/commonjs/classic/operations/index.d.ts +14 -0
- package/dist/commonjs/classic/operations/index.d.ts.map +1 -0
- package/dist/commonjs/classic/operations/index.js +16 -0
- package/dist/commonjs/classic/operations/index.js.map +1 -0
- package/dist/commonjs/classic/organizations/index.d.ts +30 -0
- package/dist/commonjs/classic/organizations/index.d.ts.map +1 -0
- package/dist/commonjs/classic/organizations/index.js +21 -0
- package/dist/commonjs/classic/organizations/index.js.map +1 -0
- package/dist/commonjs/helpers/serializerHelpers.d.ts +3 -0
- package/dist/commonjs/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/commonjs/helpers/serializerHelpers.js +27 -0
- package/dist/commonjs/helpers/serializerHelpers.js.map +1 -0
- package/dist/commonjs/index.d.ts +8 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +18 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/logger.d.ts +2 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +8 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +2 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +14 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/models.d.ts +309 -0
- package/dist/commonjs/models/models.d.ts.map +1 -0
- package/dist/commonjs/models/models.js +343 -0
- package/dist/commonjs/models/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/postgresClient.d.ts +17 -0
- package/dist/commonjs/postgresClient.d.ts.map +1 -0
- package/dist/commonjs/postgresClient.js +23 -0
- package/dist/commonjs/postgresClient.js.map +1 -0
- package/dist/commonjs/restorePollerHelpers.d.ts +21 -0
- package/dist/commonjs/restorePollerHelpers.d.ts.map +1 -0
- package/dist/commonjs/restorePollerHelpers.js +104 -0
- package/dist/commonjs/restorePollerHelpers.js.map +1 -0
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/pagingHelpers.js +140 -0
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js +79 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/api/index.d.ts +5 -0
- package/dist/esm/api/index.d.ts.map +1 -0
- package/dist/esm/api/index.js +6 -0
- package/dist/esm/api/index.js.map +1 -0
- package/dist/esm/api/operations/index.d.ts +9 -0
- package/dist/esm/api/operations/index.d.ts.map +1 -0
- package/dist/esm/api/operations/index.js +22 -0
- package/dist/esm/api/operations/index.js.map +1 -0
- package/dist/esm/api/options.d.ts +29 -0
- package/dist/esm/api/options.d.ts.map +1 -0
- package/dist/esm/api/options.js +4 -0
- package/dist/esm/api/options.js.map +1 -0
- package/dist/esm/api/organizations/index.d.ts +30 -0
- package/dist/esm/api/organizations/index.d.ts.map +1 -0
- package/dist/esm/api/organizations/index.js +127 -0
- package/dist/esm/api/organizations/index.js.map +1 -0
- package/dist/esm/api/postgresContext.d.ts +12 -0
- package/dist/esm/api/postgresContext.d.ts.map +1 -0
- package/dist/esm/api/postgresContext.js +34 -0
- package/dist/esm/api/postgresContext.js.map +1 -0
- package/dist/esm/classic/index.d.ts +3 -0
- package/dist/esm/classic/index.d.ts.map +1 -0
- package/dist/esm/classic/index.js +4 -0
- package/dist/esm/classic/index.js.map +1 -0
- package/dist/esm/classic/operations/index.d.ts +14 -0
- package/dist/esm/classic/operations/index.d.ts.map +1 -0
- package/dist/esm/classic/operations/index.js +12 -0
- package/dist/esm/classic/operations/index.js.map +1 -0
- package/dist/esm/classic/organizations/index.d.ts +30 -0
- package/dist/esm/classic/organizations/index.d.ts.map +1 -0
- package/dist/esm/classic/organizations/index.js +17 -0
- package/dist/esm/classic/organizations/index.js.map +1 -0
- package/dist/esm/helpers/serializerHelpers.d.ts +3 -0
- package/dist/esm/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/esm/helpers/serializerHelpers.js +24 -0
- package/dist/esm/helpers/serializerHelpers.js.map +1 -0
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/models.d.ts +309 -0
- package/dist/esm/models/models.d.ts.map +1 -0
- package/dist/esm/models/models.js +312 -0
- package/dist/esm/models/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/postgresClient.d.ts +17 -0
- package/dist/esm/postgresClient.d.ts.map +1 -0
- package/dist/esm/postgresClient.js +19 -0
- package/dist/esm/postgresClient.js.map +1 -0
- package/dist/esm/restorePollerHelpers.d.ts +21 -0
- package/dist/esm/restorePollerHelpers.d.ts.map +1 -0
- package/dist/esm/restorePollerHelpers.js +101 -0
- package/dist/esm/restorePollerHelpers.js.map +1 -0
- package/dist/esm/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/esm/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/esm/static-helpers/pagingHelpers.js +137 -0
- package/dist/esm/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/esm/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/esm/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/esm/static-helpers/pollingHelpers.js +76 -0
- package/dist/esm/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/react-native/api/index.d.ts +5 -0
- package/dist/react-native/api/index.d.ts.map +1 -0
- package/dist/react-native/api/index.js +6 -0
- package/dist/react-native/api/index.js.map +1 -0
- package/dist/react-native/api/operations/index.d.ts +9 -0
- package/dist/react-native/api/operations/index.d.ts.map +1 -0
- package/dist/react-native/api/operations/index.js +22 -0
- package/dist/react-native/api/operations/index.js.map +1 -0
- package/dist/react-native/api/options.d.ts +29 -0
- package/dist/react-native/api/options.d.ts.map +1 -0
- package/dist/react-native/api/options.js +4 -0
- package/dist/react-native/api/options.js.map +1 -0
- package/dist/react-native/api/organizations/index.d.ts +30 -0
- package/dist/react-native/api/organizations/index.d.ts.map +1 -0
- package/dist/react-native/api/organizations/index.js +127 -0
- package/dist/react-native/api/organizations/index.js.map +1 -0
- package/dist/react-native/api/postgresContext.d.ts +12 -0
- package/dist/react-native/api/postgresContext.d.ts.map +1 -0
- package/dist/react-native/api/postgresContext.js +34 -0
- package/dist/react-native/api/postgresContext.js.map +1 -0
- package/dist/react-native/classic/index.d.ts +3 -0
- package/dist/react-native/classic/index.d.ts.map +1 -0
- package/dist/react-native/classic/index.js +4 -0
- package/dist/react-native/classic/index.js.map +1 -0
- package/dist/react-native/classic/operations/index.d.ts +14 -0
- package/dist/react-native/classic/operations/index.d.ts.map +1 -0
- package/dist/react-native/classic/operations/index.js +12 -0
- package/dist/react-native/classic/operations/index.js.map +1 -0
- package/dist/react-native/classic/organizations/index.d.ts +30 -0
- package/dist/react-native/classic/organizations/index.d.ts.map +1 -0
- package/dist/react-native/classic/organizations/index.js +17 -0
- package/dist/react-native/classic/organizations/index.js.map +1 -0
- package/dist/react-native/helpers/serializerHelpers.d.ts +3 -0
- package/dist/react-native/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/react-native/helpers/serializerHelpers.js +24 -0
- package/dist/react-native/helpers/serializerHelpers.js.map +1 -0
- package/dist/react-native/index.d.ts +8 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +6 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/logger.d.ts +2 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +5 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/models/index.d.ts +2 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +4 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/models.d.ts +309 -0
- package/dist/react-native/models/models.d.ts.map +1 -0
- package/dist/react-native/models/models.js +312 -0
- package/dist/react-native/models/models.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/postgresClient.d.ts +17 -0
- package/dist/react-native/postgresClient.d.ts.map +1 -0
- package/dist/react-native/postgresClient.js +19 -0
- package/dist/react-native/postgresClient.js.map +1 -0
- package/dist/react-native/restorePollerHelpers.d.ts +21 -0
- package/dist/react-native/restorePollerHelpers.d.ts.map +1 -0
- package/dist/react-native/restorePollerHelpers.js +101 -0
- package/dist/react-native/restorePollerHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/react-native/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/react-native/static-helpers/pagingHelpers.js +137 -0
- package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/react-native/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/react-native/static-helpers/pollingHelpers.js +76 -0
- package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -0
- package/package.json +161 -0
- package/review/arm-neonpostgres-models.api.md +180 -0
- package/review/arm-neonpostgres.api.md +275 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
export function organizationResourceSerializer(item) {
|
|
4
|
+
return {
|
|
5
|
+
tags: item["tags"],
|
|
6
|
+
location: item["location"],
|
|
7
|
+
properties: !item["properties"]
|
|
8
|
+
? item["properties"]
|
|
9
|
+
: organizationPropertiesSerializer(item["properties"]),
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export function organizationResourceDeserializer(item) {
|
|
13
|
+
return {
|
|
14
|
+
tags: item["tags"],
|
|
15
|
+
location: item["location"],
|
|
16
|
+
id: item["id"],
|
|
17
|
+
name: item["name"],
|
|
18
|
+
type: item["type"],
|
|
19
|
+
systemData: !item["systemData"]
|
|
20
|
+
? item["systemData"]
|
|
21
|
+
: systemDataDeserializer(item["systemData"]),
|
|
22
|
+
properties: !item["properties"]
|
|
23
|
+
? item["properties"]
|
|
24
|
+
: organizationPropertiesDeserializer(item["properties"]),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export function organizationPropertiesSerializer(item) {
|
|
28
|
+
return {
|
|
29
|
+
marketplaceDetails: marketplaceDetailsSerializer(item["marketplaceDetails"]),
|
|
30
|
+
userDetails: userDetailsSerializer(item["userDetails"]),
|
|
31
|
+
companyDetails: companyDetailsSerializer(item["companyDetails"]),
|
|
32
|
+
partnerOrganizationProperties: !item["partnerOrganizationProperties"]
|
|
33
|
+
? item["partnerOrganizationProperties"]
|
|
34
|
+
: partnerOrganizationPropertiesSerializer(item["partnerOrganizationProperties"]),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function organizationPropertiesDeserializer(item) {
|
|
38
|
+
return {
|
|
39
|
+
marketplaceDetails: marketplaceDetailsDeserializer(item["marketplaceDetails"]),
|
|
40
|
+
userDetails: userDetailsDeserializer(item["userDetails"]),
|
|
41
|
+
companyDetails: companyDetailsDeserializer(item["companyDetails"]),
|
|
42
|
+
provisioningState: item["provisioningState"],
|
|
43
|
+
partnerOrganizationProperties: !item["partnerOrganizationProperties"]
|
|
44
|
+
? item["partnerOrganizationProperties"]
|
|
45
|
+
: partnerOrganizationPropertiesDeserializer(item["partnerOrganizationProperties"]),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export function marketplaceDetailsSerializer(item) {
|
|
49
|
+
return {
|
|
50
|
+
subscriptionId: item["subscriptionId"],
|
|
51
|
+
subscriptionStatus: item["subscriptionStatus"],
|
|
52
|
+
offerDetails: offerDetailsSerializer(item["offerDetails"]),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export function marketplaceDetailsDeserializer(item) {
|
|
56
|
+
return {
|
|
57
|
+
subscriptionId: item["subscriptionId"],
|
|
58
|
+
subscriptionStatus: item["subscriptionStatus"],
|
|
59
|
+
offerDetails: offerDetailsDeserializer(item["offerDetails"]),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** Marketplace subscription status of a resource. */
|
|
63
|
+
export var KnownMarketplaceSubscriptionStatus;
|
|
64
|
+
(function (KnownMarketplaceSubscriptionStatus) {
|
|
65
|
+
/** Purchased but not yet activated */
|
|
66
|
+
KnownMarketplaceSubscriptionStatus["PendingFulfillmentStart"] = "PendingFulfillmentStart";
|
|
67
|
+
/** Marketplace subscription is activated */
|
|
68
|
+
KnownMarketplaceSubscriptionStatus["Subscribed"] = "Subscribed";
|
|
69
|
+
/** This state indicates that a customer's payment for the Marketplace service was not received */
|
|
70
|
+
KnownMarketplaceSubscriptionStatus["Suspended"] = "Suspended";
|
|
71
|
+
/** Customer has cancelled the subscription */
|
|
72
|
+
KnownMarketplaceSubscriptionStatus["Unsubscribed"] = "Unsubscribed";
|
|
73
|
+
})(KnownMarketplaceSubscriptionStatus || (KnownMarketplaceSubscriptionStatus = {}));
|
|
74
|
+
export function offerDetailsSerializer(item) {
|
|
75
|
+
return {
|
|
76
|
+
publisherId: item["publisherId"],
|
|
77
|
+
offerId: item["offerId"],
|
|
78
|
+
planId: item["planId"],
|
|
79
|
+
planName: item["planName"],
|
|
80
|
+
termUnit: item["termUnit"],
|
|
81
|
+
termId: item["termId"],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export function offerDetailsDeserializer(item) {
|
|
85
|
+
return {
|
|
86
|
+
publisherId: item["publisherId"],
|
|
87
|
+
offerId: item["offerId"],
|
|
88
|
+
planId: item["planId"],
|
|
89
|
+
planName: item["planName"],
|
|
90
|
+
termUnit: item["termUnit"],
|
|
91
|
+
termId: item["termId"],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export function userDetailsSerializer(item) {
|
|
95
|
+
return {
|
|
96
|
+
firstName: item["firstName"],
|
|
97
|
+
lastName: item["lastName"],
|
|
98
|
+
emailAddress: item["emailAddress"],
|
|
99
|
+
upn: item["upn"],
|
|
100
|
+
phoneNumber: item["phoneNumber"],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export function userDetailsDeserializer(item) {
|
|
104
|
+
return {
|
|
105
|
+
firstName: item["firstName"],
|
|
106
|
+
lastName: item["lastName"],
|
|
107
|
+
emailAddress: item["emailAddress"],
|
|
108
|
+
upn: item["upn"],
|
|
109
|
+
phoneNumber: item["phoneNumber"],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
export function companyDetailsSerializer(item) {
|
|
113
|
+
return {
|
|
114
|
+
companyName: item["companyName"],
|
|
115
|
+
country: item["country"],
|
|
116
|
+
officeAddress: item["officeAddress"],
|
|
117
|
+
businessPhone: item["businessPhone"],
|
|
118
|
+
domain: item["domain"],
|
|
119
|
+
numberOfEmployees: item["numberOfEmployees"],
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
export function companyDetailsDeserializer(item) {
|
|
123
|
+
return {
|
|
124
|
+
companyName: item["companyName"],
|
|
125
|
+
country: item["country"],
|
|
126
|
+
officeAddress: item["officeAddress"],
|
|
127
|
+
businessPhone: item["businessPhone"],
|
|
128
|
+
domain: item["domain"],
|
|
129
|
+
numberOfEmployees: item["numberOfEmployees"],
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
/** The provisioning state of a resource type. */
|
|
133
|
+
export var KnownResourceProvisioningState;
|
|
134
|
+
(function (KnownResourceProvisioningState) {
|
|
135
|
+
/** Resource has been created. */
|
|
136
|
+
KnownResourceProvisioningState["Succeeded"] = "Succeeded";
|
|
137
|
+
/** Resource creation failed. */
|
|
138
|
+
KnownResourceProvisioningState["Failed"] = "Failed";
|
|
139
|
+
/** Resource creation was canceled. */
|
|
140
|
+
KnownResourceProvisioningState["Canceled"] = "Canceled";
|
|
141
|
+
})(KnownResourceProvisioningState || (KnownResourceProvisioningState = {}));
|
|
142
|
+
export function partnerOrganizationPropertiesSerializer(item) {
|
|
143
|
+
return {
|
|
144
|
+
organizationId: item["organizationId"],
|
|
145
|
+
organizationName: item["organizationName"],
|
|
146
|
+
singleSignOnProperties: !item["singleSignOnProperties"]
|
|
147
|
+
? item["singleSignOnProperties"]
|
|
148
|
+
: singleSignOnPropertiesSerializer(item["singleSignOnProperties"]),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
export function partnerOrganizationPropertiesDeserializer(item) {
|
|
152
|
+
return {
|
|
153
|
+
organizationId: item["organizationId"],
|
|
154
|
+
organizationName: item["organizationName"],
|
|
155
|
+
singleSignOnProperties: !item["singleSignOnProperties"]
|
|
156
|
+
? item["singleSignOnProperties"]
|
|
157
|
+
: singleSignOnPropertiesDeserializer(item["singleSignOnProperties"]),
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
export function singleSignOnPropertiesSerializer(item) {
|
|
161
|
+
return {
|
|
162
|
+
singleSignOnState: item["singleSignOnState"],
|
|
163
|
+
enterpriseAppId: item["enterpriseAppId"],
|
|
164
|
+
singleSignOnUrl: item["singleSignOnUrl"],
|
|
165
|
+
aadDomains: !item["aadDomains"]
|
|
166
|
+
? item["aadDomains"]
|
|
167
|
+
: item["aadDomains"].map((p) => {
|
|
168
|
+
return p;
|
|
169
|
+
}),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
export function singleSignOnPropertiesDeserializer(item) {
|
|
173
|
+
return {
|
|
174
|
+
singleSignOnState: item["singleSignOnState"],
|
|
175
|
+
enterpriseAppId: item["enterpriseAppId"],
|
|
176
|
+
singleSignOnUrl: item["singleSignOnUrl"],
|
|
177
|
+
aadDomains: !item["aadDomains"]
|
|
178
|
+
? item["aadDomains"]
|
|
179
|
+
: item["aadDomains"].map((p) => {
|
|
180
|
+
return p;
|
|
181
|
+
}),
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
/** Various states of the SSO resource */
|
|
185
|
+
export var KnownSingleSignOnStates;
|
|
186
|
+
(function (KnownSingleSignOnStates) {
|
|
187
|
+
/** Initial state of the SSO resource */
|
|
188
|
+
KnownSingleSignOnStates["Initial"] = "Initial";
|
|
189
|
+
/** SSO is enabled for the organization */
|
|
190
|
+
KnownSingleSignOnStates["Enable"] = "Enable";
|
|
191
|
+
/** SSO is disabled for the organization */
|
|
192
|
+
KnownSingleSignOnStates["Disable"] = "Disable";
|
|
193
|
+
})(KnownSingleSignOnStates || (KnownSingleSignOnStates = {}));
|
|
194
|
+
export function trackedResourceSerializer(item) {
|
|
195
|
+
return { tags: item["tags"], location: item["location"] };
|
|
196
|
+
}
|
|
197
|
+
export function trackedResourceDeserializer(item) {
|
|
198
|
+
return {
|
|
199
|
+
id: item["id"],
|
|
200
|
+
name: item["name"],
|
|
201
|
+
type: item["type"],
|
|
202
|
+
systemData: !item["systemData"]
|
|
203
|
+
? item["systemData"]
|
|
204
|
+
: systemDataDeserializer(item["systemData"]),
|
|
205
|
+
tags: item["tags"],
|
|
206
|
+
location: item["location"],
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
export function resourceSerializer(item) {
|
|
210
|
+
return item;
|
|
211
|
+
}
|
|
212
|
+
export function resourceDeserializer(item) {
|
|
213
|
+
return {
|
|
214
|
+
id: item["id"],
|
|
215
|
+
name: item["name"],
|
|
216
|
+
type: item["type"],
|
|
217
|
+
systemData: !item["systemData"]
|
|
218
|
+
? item["systemData"]
|
|
219
|
+
: systemDataDeserializer(item["systemData"]),
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
export function systemDataDeserializer(item) {
|
|
223
|
+
return {
|
|
224
|
+
createdBy: item["createdBy"],
|
|
225
|
+
createdByType: item["createdByType"],
|
|
226
|
+
createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]),
|
|
227
|
+
lastModifiedBy: item["lastModifiedBy"],
|
|
228
|
+
lastModifiedByType: item["lastModifiedByType"],
|
|
229
|
+
lastModifiedAt: !item["lastModifiedAt"]
|
|
230
|
+
? item["lastModifiedAt"]
|
|
231
|
+
: new Date(item["lastModifiedAt"]),
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
/** The kind of entity that created the resource. */
|
|
235
|
+
export var KnownCreatedByType;
|
|
236
|
+
(function (KnownCreatedByType) {
|
|
237
|
+
/** The entity was created by a user. */
|
|
238
|
+
KnownCreatedByType["User"] = "User";
|
|
239
|
+
/** The entity was created by an application. */
|
|
240
|
+
KnownCreatedByType["Application"] = "Application";
|
|
241
|
+
/** The entity was created by a managed identity. */
|
|
242
|
+
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
|
243
|
+
/** The entity was created by a key. */
|
|
244
|
+
KnownCreatedByType["Key"] = "Key";
|
|
245
|
+
})(KnownCreatedByType || (KnownCreatedByType = {}));
|
|
246
|
+
export function _organizationResourceListResultDeserializer(item) {
|
|
247
|
+
return {
|
|
248
|
+
value: organizationResourceArrayDeserializer(item["value"]),
|
|
249
|
+
nextLink: item["nextLink"],
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
export function organizationResourceArraySerializer(result) {
|
|
253
|
+
return result.map((item) => {
|
|
254
|
+
return organizationResourceSerializer(item);
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
export function organizationResourceArrayDeserializer(result) {
|
|
258
|
+
return result.map((item) => {
|
|
259
|
+
return organizationResourceDeserializer(item);
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
export function _operationListResultDeserializer(item) {
|
|
263
|
+
return {
|
|
264
|
+
value: operationArrayDeserializer(item["value"]),
|
|
265
|
+
nextLink: item["nextLink"],
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
export function operationArrayDeserializer(result) {
|
|
269
|
+
return result.map((item) => {
|
|
270
|
+
return operationDeserializer(item);
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
export function operationDeserializer(item) {
|
|
274
|
+
return {
|
|
275
|
+
name: item["name"],
|
|
276
|
+
isDataAction: item["isDataAction"],
|
|
277
|
+
display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]),
|
|
278
|
+
origin: item["origin"],
|
|
279
|
+
actionType: item["actionType"],
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
export function operationDisplayDeserializer(item) {
|
|
283
|
+
return {
|
|
284
|
+
provider: item["provider"],
|
|
285
|
+
resource: item["resource"],
|
|
286
|
+
operation: item["operation"],
|
|
287
|
+
description: item["description"],
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */
|
|
291
|
+
export var KnownOrigin;
|
|
292
|
+
(function (KnownOrigin) {
|
|
293
|
+
/** Indicates the operation is initiated by a user. */
|
|
294
|
+
KnownOrigin["User"] = "user";
|
|
295
|
+
/** Indicates the operation is initiated by a system. */
|
|
296
|
+
KnownOrigin["System"] = "system";
|
|
297
|
+
/** Indicates the operation is initiated by a user or system. */
|
|
298
|
+
KnownOrigin["UserSystem"] = "user,system";
|
|
299
|
+
})(KnownOrigin || (KnownOrigin = {}));
|
|
300
|
+
/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */
|
|
301
|
+
export var KnownActionType;
|
|
302
|
+
(function (KnownActionType) {
|
|
303
|
+
/** Actions are for internal-only APIs. */
|
|
304
|
+
KnownActionType["Internal"] = "Internal";
|
|
305
|
+
})(KnownActionType || (KnownActionType = {}));
|
|
306
|
+
/** Supported API versions for the Neon.Postgres resource provider. */
|
|
307
|
+
export var KnownVersions;
|
|
308
|
+
(function (KnownVersions) {
|
|
309
|
+
/** Dependent on Azure.ResourceManager.Versions.v1_0_Preview_1, LiftrBase.Versions.v1_preview, LiftrBase.Data.Versions.v1_preview */
|
|
310
|
+
KnownVersions["V1_Preview"] = "2024-08-01-preview";
|
|
311
|
+
})(KnownVersions || (KnownVersions = {}));
|
|
312
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,MAAM,UAAU,8BAA8B,CAAC,IAA0B;IACvE,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;QAC1B,UAAU,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;YAC7B,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;YACpB,CAAC,CAAC,gCAAgC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KACzD,CAAC;AACJ,C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sEAAsE;AACtE,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,oIAAoI;IACpI,kDAAiC,CAAA;AACnC,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** Organization Resource by Neon */\nexport interface OrganizationResource extends TrackedResource {\n /** The resource-specific properties for this resource. */\n properties?: OrganizationProperties;\n}\n\nexport function organizationResourceSerializer(item: OrganizationResource): any {\n return {\n tags: item[\"tags\"],\n location: item[\"location\"],\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : organizationPropertiesSerializer(item[\"properties\"]),\n };\n}\n\nexport function organizationResourceDeserializer(item: any): OrganizationResource {\n return {\n tags: item[\"tags\"],\n location: item[\"location\"],\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : organizationPropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Properties specific to Data Organization resource */\nexport interface OrganizationProperties {\n /** Marketplace details of the resource. */\n marketplaceDetails: MarketplaceDetails;\n /** Details of the user. */\n userDetails: UserDetails;\n /** Details of the company. */\n companyDetails: CompanyDetails;\n /** Provisioning state of the resource. */\n readonly provisioningState?: ResourceProvisioningState;\n /** Organization properties */\n partnerOrganizationProperties?: PartnerOrganizationProperties;\n}\n\nexport function organizationPropertiesSerializer(item: OrganizationProperties): any {\n return {\n marketplaceDetails: marketplaceDetailsSerializer(item[\"marketplaceDetails\"]),\n userDetails: userDetailsSerializer(item[\"userDetails\"]),\n companyDetails: companyDetailsSerializer(item[\"companyDetails\"]),\n partnerOrganizationProperties: !item[\"partnerOrganizationProperties\"]\n ? item[\"partnerOrganizationProperties\"]\n : partnerOrganizationPropertiesSerializer(item[\"partnerOrganizationProperties\"]),\n };\n}\n\nexport function organizationPropertiesDeserializer(item: any): OrganizationProperties {\n return {\n marketplaceDetails: marketplaceDetailsDeserializer(item[\"marketplaceDetails\"]),\n userDetails: userDetailsDeserializer(item[\"userDetails\"]),\n companyDetails: companyDetailsDeserializer(item[\"companyDetails\"]),\n provisioningState: item[\"provisioningState\"],\n partnerOrganizationProperties: !item[\"partnerOrganizationProperties\"]\n ? item[\"partnerOrganizationProperties\"]\n : partnerOrganizationPropertiesDeserializer(item[\"partnerOrganizationProperties\"]),\n };\n}\n\n/** Marketplace details for an organization */\nexport interface MarketplaceDetails {\n /** SaaS subscription id for the the marketplace offer */\n subscriptionId?: string;\n /** Marketplace subscription status */\n subscriptionStatus?: MarketplaceSubscriptionStatus;\n /** Offer details for the marketplace that is selected by the user */\n offerDetails: OfferDetails;\n}\n\nexport function marketplaceDetailsSerializer(item: MarketplaceDetails): any {\n return {\n subscriptionId: item[\"subscriptionId\"],\n subscriptionStatus: item[\"subscriptionStatus\"],\n offerDetails: offerDetailsSerializer(item[\"offerDetails\"]),\n };\n}\n\nexport function marketplaceDetailsDeserializer(item: any): MarketplaceDetails {\n return {\n subscriptionId: item[\"subscriptionId\"],\n subscriptionStatus: item[\"subscriptionStatus\"],\n offerDetails: offerDetailsDeserializer(item[\"offerDetails\"]),\n };\n}\n\n/** Marketplace subscription status of a resource. */\nexport enum KnownMarketplaceSubscriptionStatus {\n /** Purchased but not yet activated */\n PendingFulfillmentStart = \"PendingFulfillmentStart\",\n /** Marketplace subscription is activated */\n Subscribed = \"Subscribed\",\n /** This state indicates that a customer's payment for the Marketplace service was not received */\n Suspended = \"Suspended\",\n /** Customer has cancelled the subscription */\n Unsubscribed = \"Unsubscribed\",\n}\n\n/**\n * Marketplace subscription status of a resource. \\\n * {@link KnownMarketplaceSubscriptionStatus} can be used interchangeably with MarketplaceSubscriptionStatus,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **PendingFulfillmentStart**: Purchased but not yet activated \\\n * **Subscribed**: Marketplace subscription is activated \\\n * **Suspended**: This state indicates that a customer's payment for the Marketplace service was not received \\\n * **Unsubscribed**: Customer has cancelled the subscription\n */\nexport type MarketplaceSubscriptionStatus = string;\n\n/** Offer details for the marketplace that is selected by the user */\nexport interface OfferDetails {\n /** Publisher Id for the marketplace offer */\n publisherId: string;\n /** Offer Id for the marketplace offer */\n offerId: string;\n /** Plan Id for the marketplace offer */\n planId: string;\n /** Plan Name for the marketplace offer */\n planName?: string;\n /** Term Name for the marketplace offer */\n termUnit?: string;\n /** Term Id for the marketplace offer */\n termId?: string;\n}\n\nexport function offerDetailsSerializer(item: OfferDetails): any {\n return {\n publisherId: item[\"publisherId\"],\n offerId: item[\"offerId\"],\n planId: item[\"planId\"],\n planName: item[\"planName\"],\n termUnit: item[\"termUnit\"],\n termId: item[\"termId\"],\n };\n}\n\nexport function offerDetailsDeserializer(item: any): OfferDetails {\n return {\n publisherId: item[\"publisherId\"],\n offerId: item[\"offerId\"],\n planId: item[\"planId\"],\n planName: item[\"planName\"],\n termUnit: item[\"termUnit\"],\n termId: item[\"termId\"],\n };\n}\n\n/** User details for an organization */\nexport interface UserDetails {\n /** First name of the user */\n firstName?: string;\n /** Last name of the user */\n lastName?: string;\n /** Email address of the user */\n emailAddress?: string;\n /** User's principal name */\n upn?: string;\n /** User's phone number */\n phoneNumber?: string;\n}\n\nexport function userDetailsSerializer(item: UserDetails): any {\n return {\n firstName: item[\"firstName\"],\n lastName: item[\"lastName\"],\n emailAddress: item[\"emailAddress\"],\n upn: item[\"upn\"],\n phoneNumber: item[\"phoneNumber\"],\n };\n}\n\nexport function userDetailsDeserializer(item: any): UserDetails {\n return {\n firstName: item[\"firstName\"],\n lastName: item[\"lastName\"],\n emailAddress: item[\"emailAddress\"],\n upn: item[\"upn\"],\n phoneNumber: item[\"phoneNumber\"],\n };\n}\n\n/** Company details for an organization */\nexport interface CompanyDetails {\n /** Company name */\n companyName?: string;\n /** Country name of the company */\n country?: string;\n /** Office address of the company */\n officeAddress?: string;\n /** Business phone number of the company */\n businessPhone?: string;\n /** Domain of the user */\n domain?: string;\n /** Number of employees in the company */\n numberOfEmployees?: number;\n}\n\nexport function companyDetailsSerializer(item: CompanyDetails): any {\n return {\n companyName: item[\"companyName\"],\n country: item[\"country\"],\n officeAddress: item[\"officeAddress\"],\n businessPhone: item[\"businessPhone\"],\n domain: item[\"domain\"],\n numberOfEmployees: item[\"numberOfEmployees\"],\n };\n}\n\nexport function companyDetailsDeserializer(item: any): CompanyDetails {\n return {\n companyName: item[\"companyName\"],\n country: item[\"country\"],\n officeAddress: item[\"officeAddress\"],\n businessPhone: item[\"businessPhone\"],\n domain: item[\"domain\"],\n numberOfEmployees: item[\"numberOfEmployees\"],\n };\n}\n\n/** The provisioning state of a resource type. */\nexport enum KnownResourceProvisioningState {\n /** Resource has been created. */\n Succeeded = \"Succeeded\",\n /** Resource creation failed. */\n Failed = \"Failed\",\n /** Resource creation was canceled. */\n Canceled = \"Canceled\",\n}\n\n/**\n * The provisioning state of a resource type. \\\n * {@link KnownResourceProvisioningState} can be used interchangeably with ResourceProvisioningState,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Succeeded**: Resource has been created. \\\n * **Failed**: Resource creation failed. \\\n * **Canceled**: Resource creation was canceled.\n */\nexport type ResourceProvisioningState = string;\n\n/** Properties specific to Partner's organization */\nexport interface PartnerOrganizationProperties {\n /** Organization Id in partner's system */\n organizationId?: string;\n /** Organization name in partner's system */\n organizationName: string;\n /** Single Sign On properties for the organization */\n singleSignOnProperties?: SingleSignOnProperties;\n}\n\nexport function partnerOrganizationPropertiesSerializer(item: PartnerOrganizationProperties): any {\n return {\n organizationId: item[\"organizationId\"],\n organizationName: item[\"organizationName\"],\n singleSignOnProperties: !item[\"singleSignOnProperties\"]\n ? item[\"singleSignOnProperties\"]\n : singleSignOnPropertiesSerializer(item[\"singleSignOnProperties\"]),\n };\n}\n\nexport function partnerOrganizationPropertiesDeserializer(\n item: any,\n): PartnerOrganizationProperties {\n return {\n organizationId: item[\"organizationId\"],\n organizationName: item[\"organizationName\"],\n singleSignOnProperties: !item[\"singleSignOnProperties\"]\n ? item[\"singleSignOnProperties\"]\n : singleSignOnPropertiesDeserializer(item[\"singleSignOnProperties\"]),\n };\n}\n\n/** Properties specific to Single Sign On Resource */\nexport interface SingleSignOnProperties {\n /** State of the Single Sign On for the organization */\n singleSignOnState?: SingleSignOnStates;\n /** AAD enterprise application Id used to setup SSO */\n enterpriseAppId?: string;\n /** URL for SSO to be used by the partner to redirect the user to their system */\n singleSignOnUrl?: string;\n /** List of AAD domains fetched from Microsoft Graph for user. */\n aadDomains?: string[];\n}\n\nexport function singleSignOnPropertiesSerializer(item: SingleSignOnProperties): any {\n return {\n singleSignOnState: item[\"singleSignOnState\"],\n enterpriseAppId: item[\"enterpriseAppId\"],\n singleSignOnUrl: item[\"singleSignOnUrl\"],\n aadDomains: !item[\"aadDomains\"]\n ? item[\"aadDomains\"]\n : item[\"aadDomains\"].map((p: any) => {\n return p;\n }),\n };\n}\n\nexport function singleSignOnPropertiesDeserializer(item: any): SingleSignOnProperties {\n return {\n singleSignOnState: item[\"singleSignOnState\"],\n enterpriseAppId: item[\"enterpriseAppId\"],\n singleSignOnUrl: item[\"singleSignOnUrl\"],\n aadDomains: !item[\"aadDomains\"]\n ? item[\"aadDomains\"]\n : item[\"aadDomains\"].map((p: any) => {\n return p;\n }),\n };\n}\n\n/** Various states of the SSO resource */\nexport enum KnownSingleSignOnStates {\n /** Initial state of the SSO resource */\n Initial = \"Initial\",\n /** SSO is enabled for the organization */\n Enable = \"Enable\",\n /** SSO is disabled for the organization */\n Disable = \"Disable\",\n}\n\n/**\n * Various states of the SSO resource \\\n * {@link KnownSingleSignOnStates} can be used interchangeably with SingleSignOnStates,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Initial**: Initial state of the SSO resource \\\n * **Enable**: SSO is enabled for the organization \\\n * **Disable**: SSO is disabled for the organization\n */\nexport type SingleSignOnStates = string;\n\n/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */\nexport interface TrackedResource extends Resource {\n /** Resource tags. */\n tags?: Record<string, string>;\n /** The geo-location where the resource lives */\n location: string;\n}\n\nexport function trackedResourceSerializer(item: TrackedResource): any {\n return { tags: item[\"tags\"], location: item[\"location\"] };\n}\n\nexport function trackedResourceDeserializer(item: any): TrackedResource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n tags: item[\"tags\"],\n location: item[\"location\"],\n };\n}\n\n/** Common fields that are returned in the response for all Azure Resource Manager resources */\nexport interface Resource {\n /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */\n readonly id?: string;\n /** The name of the resource */\n readonly name?: string;\n /** The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\" */\n readonly type?: string;\n /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */\n readonly systemData?: SystemData;\n}\n\nexport function resourceSerializer(item: Resource): any {\n return item;\n}\n\nexport function resourceDeserializer(item: any): Resource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Metadata pertaining to creation and last modification of the resource. */\nexport interface SystemData {\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: CreatedByType;\n /** The timestamp of resource creation (UTC). */\n createdAt?: Date;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: CreatedByType;\n /** The timestamp of resource last modification (UTC) */\n lastModifiedAt?: Date;\n}\n\nexport function systemDataDeserializer(item: any): SystemData {\n return {\n createdBy: item[\"createdBy\"],\n createdByType: item[\"createdByType\"],\n createdAt: !item[\"createdAt\"] ? item[\"createdAt\"] : new Date(item[\"createdAt\"]),\n lastModifiedBy: item[\"lastModifiedBy\"],\n lastModifiedByType: item[\"lastModifiedByType\"],\n lastModifiedAt: !item[\"lastModifiedAt\"]\n ? item[\"lastModifiedAt\"]\n : new Date(item[\"lastModifiedAt\"]),\n };\n}\n\n/** The kind of entity that created the resource. */\nexport enum KnownCreatedByType {\n /** The entity was created by a user. */\n User = \"User\",\n /** The entity was created by an application. */\n Application = \"Application\",\n /** The entity was created by a managed identity. */\n ManagedIdentity = \"ManagedIdentity\",\n /** The entity was created by a key. */\n Key = \"Key\",\n}\n\n/**\n * The kind of entity that created the resource. \\\n * {@link KnowncreatedByType} can be used interchangeably with createdByType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **User**: The entity was created by a user. \\\n * **Application**: The entity was created by an application. \\\n * **ManagedIdentity**: The entity was created by a managed identity. \\\n * **Key**: The entity was created by a key.\n */\nexport type CreatedByType = string;\n\n/** The response of a OrganizationResource list operation. */\nexport interface _OrganizationResourceListResult {\n /** The OrganizationResource items on this page */\n value: OrganizationResource[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _organizationResourceListResultDeserializer(\n item: any,\n): _OrganizationResourceListResult {\n return {\n value: organizationResourceArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function organizationResourceArraySerializer(result: Array<OrganizationResource>): any[] {\n return result.map((item) => {\n return organizationResourceSerializer(item);\n });\n}\n\nexport function organizationResourceArrayDeserializer(result: Array<OrganizationResource>): any[] {\n return result.map((item) => {\n return organizationResourceDeserializer(item);\n });\n}\n\n/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */\nexport interface _OperationListResult {\n /** The Operation items on this page */\n value: Operation[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _operationListResultDeserializer(item: any): _OperationListResult {\n return {\n value: operationArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function operationArrayDeserializer(result: Array<Operation>): any[] {\n return result.map((item) => {\n return operationDeserializer(item);\n });\n}\n\n/** Details of a REST API operation, returned from the Resource Provider Operations API */\nexport interface Operation {\n /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\" */\n readonly name?: string;\n /** Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations. */\n readonly isDataAction?: boolean;\n /** Localized display information for this particular operation. */\n readonly display?: OperationDisplay;\n /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\n readonly origin?: Origin;\n /** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\n actionType?: ActionType;\n}\n\nexport function operationDeserializer(item: any): Operation {\n return {\n name: item[\"name\"],\n isDataAction: item[\"isDataAction\"],\n display: !item[\"display\"] ? item[\"display\"] : operationDisplayDeserializer(item[\"display\"]),\n origin: item[\"origin\"],\n actionType: item[\"actionType\"],\n };\n}\n\n/** Localized display information for and operation. */\nexport interface OperationDisplay {\n /** The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\". */\n readonly provider?: string;\n /** The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\". */\n readonly resource?: string;\n /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\". */\n readonly operation?: string;\n /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */\n readonly description?: string;\n}\n\nexport function operationDisplayDeserializer(item: any): OperationDisplay {\n return {\n provider: item[\"provider\"],\n resource: item[\"resource\"],\n operation: item[\"operation\"],\n description: item[\"description\"],\n };\n}\n\n/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\nexport enum KnownOrigin {\n /** Indicates the operation is initiated by a user. */\n User = \"user\",\n /** Indicates the operation is initiated by a system. */\n System = \"system\",\n /** Indicates the operation is initiated by a user or system. */\n UserSystem = \"user,system\",\n}\n\n/**\n * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" \\\n * {@link KnownOrigin} can be used interchangeably with Origin,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **user**: Indicates the operation is initiated by a user. \\\n * **system**: Indicates the operation is initiated by a system. \\\n * **user,system**: Indicates the operation is initiated by a user or system.\n */\nexport type Origin = string;\n\n/** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\nexport enum KnownActionType {\n /** Actions are for internal-only APIs. */\n Internal = \"Internal\",\n}\n\n/**\n * Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. \\\n * {@link KnownActionType} can be used interchangeably with ActionType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Internal**: Actions are for internal-only APIs.\n */\nexport type ActionType = string;\n\n/** Supported API versions for the Neon.Postgres resource provider. */\nexport enum KnownVersions {\n /** Dependent on Azure.ResourceManager.Versions.v1_0_Preview_1, LiftrBase.Versions.v1_preview, LiftrBase.Data.Versions.v1_preview */\n V1_Preview = \"2024-08-01-preview\",\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OperationsOperations } from "./classic/operations/index.js";
|
|
2
|
+
import { OrganizationsOperations } from "./classic/organizations/index.js";
|
|
3
|
+
import { PostgresClientOptionalParams } from "./api/index.js";
|
|
4
|
+
import { Pipeline } from "@azure/core-rest-pipeline";
|
|
5
|
+
import { TokenCredential } from "@azure/core-auth";
|
|
6
|
+
export { PostgresClientOptionalParams } from "./api/postgresContext.js";
|
|
7
|
+
export declare class PostgresClient {
|
|
8
|
+
private _client;
|
|
9
|
+
/** The pipeline used by this client to make requests */
|
|
10
|
+
readonly pipeline: Pipeline;
|
|
11
|
+
constructor(credential: TokenCredential, subscriptionId: string, options?: PostgresClientOptionalParams);
|
|
12
|
+
/** The operation groups for Operations */
|
|
13
|
+
readonly operations: OperationsOperations;
|
|
14
|
+
/** The operation groups for Organizations */
|
|
15
|
+
readonly organizations: OrganizationsOperations;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=postgresClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgresClient.d.ts","sourceRoot":"","sources":["../../src/postgresClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAA2B,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EAEL,uBAAuB,EACxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAmC,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAExE,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAAkB;IACjC,wDAAwD;IACxD,SAAgB,QAAQ,EAAE,QAAQ,CAAC;gBAGjC,UAAU,EAAE,eAAe,EAC3B,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,4BAAiC;IAe5C,0CAA0C;IAC1C,SAAgB,UAAU,EAAE,oBAAoB,CAAC;IACjD,6CAA6C;IAC7C,SAAgB,aAAa,EAAE,uBAAuB,CAAC;CACxD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { getOperationsOperations } from "./classic/operations/index.js";
|
|
4
|
+
import { getOrganizationsOperations, } from "./classic/organizations/index.js";
|
|
5
|
+
import { createPostgres } from "./api/index.js";
|
|
6
|
+
export class PostgresClient {
|
|
7
|
+
constructor(credential, subscriptionId, options = {}) {
|
|
8
|
+
var _a;
|
|
9
|
+
const prefixFromOptions = (_a = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _a === void 0 ? void 0 : _a.userAgentPrefix;
|
|
10
|
+
const userAgentPrefix = prefixFromOptions
|
|
11
|
+
? `${prefixFromOptions} azsdk-js-client`
|
|
12
|
+
: `azsdk-js-client`;
|
|
13
|
+
this._client = createPostgres(credential, Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix } }));
|
|
14
|
+
this.pipeline = this._client.pipeline;
|
|
15
|
+
this.operations = getOperationsOperations(this._client);
|
|
16
|
+
this.organizations = getOrganizationsOperations(this._client, subscriptionId);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=postgresClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgresClient.js","sourceRoot":"","sources":["../../src/postgresClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,uBAAuB,EAAwB,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EACL,0BAA0B,GAE3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAiD,MAAM,gBAAgB,CAAC;AAM/F,MAAM,OAAO,cAAc;IAKzB,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAAwC,EAAE;;QAE1C,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,0CAAE,eAAe,CAAC;QACrE,MAAM,eAAe,GAAG,iBAAiB;YACvC,CAAC,CAAC,GAAG,iBAAiB,kBAAkB;YACxC,CAAC,CAAC,iBAAiB,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,cAAc,CAAC,UAAU,kCACnC,OAAO,KACV,gBAAgB,EAAE,EAAE,eAAe,EAAE,IACrC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxD,IAAI,CAAC,aAAa,GAAG,0BAA0B,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAChF,CAAC;CAMF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getOperationsOperations, OperationsOperations } from \"./classic/operations/index.js\";\nimport {\n getOrganizationsOperations,\n OrganizationsOperations,\n} from \"./classic/organizations/index.js\";\nimport { createPostgres, PostgresContext, PostgresClientOptionalParams } from \"./api/index.js\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport { PostgresClientOptionalParams } from \"./api/postgresContext.js\";\n\nexport class PostgresClient {\n private _client: PostgresContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: PostgresClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createPostgres(credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.operations = getOperationsOperations(this._client);\n this.organizations = getOrganizationsOperations(this._client, subscriptionId);\n }\n\n /** The operation groups for Operations */\n public readonly operations: OperationsOperations;\n /** The operation groups for Organizations */\n public readonly organizations: OrganizationsOperations;\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PostgresClient } from "./postgresClient.js";
|
|
2
|
+
import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
3
|
+
import { AbortSignalLike } from "@azure/abort-controller";
|
|
4
|
+
import { PollerLike, OperationState } from "@azure/core-lro";
|
|
5
|
+
export interface RestorePollerOptions<TResult, TResponse extends PathUncheckedResponse = PathUncheckedResponse> extends OperationOptions {
|
|
6
|
+
/** Delay to wait until next poll, in milliseconds. */
|
|
7
|
+
updateIntervalInMs?: number;
|
|
8
|
+
/**
|
|
9
|
+
* The signal which can be used to abort requests.
|
|
10
|
+
*/
|
|
11
|
+
abortSignal?: AbortSignalLike;
|
|
12
|
+
/** Deserialization function for raw response body */
|
|
13
|
+
processResponseBody?: (result: TResponse) => Promise<TResult>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Creates a poller from the serialized state of another poller. This can be
|
|
17
|
+
* useful when you want to create pollers on a different host or a poller
|
|
18
|
+
* needs to be constructed after the original one is not in scope.
|
|
19
|
+
*/
|
|
20
|
+
export declare function restorePoller<TResponse extends PathUncheckedResponse, TResult>(client: PostgresClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>, options?: RestorePollerOptions<TResult>): PollerLike<OperationState<TResult>, TResult>;
|
|
21
|
+
//# sourceMappingURL=restorePollerHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restorePollerHelpers.d.ts","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOrD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,UAAU,EACV,cAAc,EAGf,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,oBAAoB,CACnC,OAAO,EACP,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,gBAAgB;IACxB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,qDAAqD;IACrD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,SAAS,qBAAqB,EAAE,OAAO,EAC5E,MAAM,EAAE,cAAc,EACtB,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EACjF,OAAO,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,GACtC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CA+B9C"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { _organizationsCreateOrUpdateDeserialize, _organizationsUpdateDeserialize, _organizationsDeleteDeserialize, } from "./api/organizations/index.js";
|
|
4
|
+
import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js";
|
|
5
|
+
import { deserializeState, } from "@azure/core-lro";
|
|
6
|
+
/**
|
|
7
|
+
* Creates a poller from the serialized state of another poller. This can be
|
|
8
|
+
* useful when you want to create pollers on a different host or a poller
|
|
9
|
+
* needs to be constructed after the original one is not in scope.
|
|
10
|
+
*/
|
|
11
|
+
export function restorePoller(client, serializedState, sourceOperation, options) {
|
|
12
|
+
var _a, _b, _c;
|
|
13
|
+
const pollerConfig = deserializeState(serializedState).config;
|
|
14
|
+
const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
|
|
15
|
+
if (!initialRequestUrl || !requestMethod) {
|
|
16
|
+
throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}`);
|
|
17
|
+
}
|
|
18
|
+
const resourceLocationConfig = metadata === null || metadata === void 0 ? void 0 : metadata["resourceLocationConfig"];
|
|
19
|
+
const { deserializer, expectedStatuses = [] } = (_a = getDeserializationHelper(initialRequestUrl, requestMethod)) !== null && _a !== void 0 ? _a : {};
|
|
20
|
+
const deserializeHelper = (_b = options === null || options === void 0 ? void 0 : options.processResponseBody) !== null && _b !== void 0 ? _b : deserializer;
|
|
21
|
+
if (!deserializeHelper) {
|
|
22
|
+
throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}.`);
|
|
23
|
+
}
|
|
24
|
+
return getLongRunningPoller((_c = client["_client"]) !== null && _c !== void 0 ? _c : client, deserializeHelper, expectedStatuses, {
|
|
25
|
+
updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
26
|
+
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
|
27
|
+
resourceLocationConfig,
|
|
28
|
+
restoreFrom: serializedState,
|
|
29
|
+
initialRequestUrl,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const deserializeMap = {
|
|
33
|
+
"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}": {
|
|
34
|
+
deserializer: _organizationsCreateOrUpdateDeserialize,
|
|
35
|
+
expectedStatuses: ["200", "201"],
|
|
36
|
+
},
|
|
37
|
+
"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}": {
|
|
38
|
+
deserializer: _organizationsUpdateDeserialize,
|
|
39
|
+
expectedStatuses: ["200", "202"],
|
|
40
|
+
},
|
|
41
|
+
"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}": {
|
|
42
|
+
deserializer: _organizationsDeleteDeserialize,
|
|
43
|
+
expectedStatuses: ["202", "204", "200"],
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
function getDeserializationHelper(urlStr, method) {
|
|
47
|
+
var _a, _b, _c, _d;
|
|
48
|
+
const path = new URL(urlStr).pathname;
|
|
49
|
+
const pathParts = path.split("/");
|
|
50
|
+
// Traverse list to match the longest candidate
|
|
51
|
+
// matchedLen: the length of candidate path
|
|
52
|
+
// matchedValue: the matched status code array
|
|
53
|
+
let matchedLen = -1, matchedValue;
|
|
54
|
+
// Iterate the responseMap to find a match
|
|
55
|
+
for (const [key, value] of Object.entries(deserializeMap)) {
|
|
56
|
+
// Extracting the path from the map key which is in format
|
|
57
|
+
// GET /path/foo
|
|
58
|
+
if (!key.startsWith(method)) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const candidatePath = getPathFromMapKey(key);
|
|
62
|
+
// Get each part of the url path
|
|
63
|
+
const candidateParts = candidatePath.split("/");
|
|
64
|
+
// track if we have found a match to return the values found.
|
|
65
|
+
let found = true;
|
|
66
|
+
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
67
|
+
if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
|
|
68
|
+
const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
|
|
69
|
+
// If the current part of the candidate is a "template" part
|
|
70
|
+
// Try to use the suffix of pattern to match the path
|
|
71
|
+
// {guid} ==> $
|
|
72
|
+
// {guid}:export ==> :export$
|
|
73
|
+
const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
|
|
74
|
+
if (!isMatched) {
|
|
75
|
+
found = false;
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
// If the candidate part is not a template and
|
|
81
|
+
// the parts don't match mark the candidate as not found
|
|
82
|
+
// to move on with the next candidate path.
|
|
83
|
+
if (candidateParts[i] !== pathParts[j]) {
|
|
84
|
+
found = false;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
// We finished evaluating the current candidate parts
|
|
89
|
+
// Update the matched value if and only if we found the longer pattern
|
|
90
|
+
if (found && candidatePath.length > matchedLen) {
|
|
91
|
+
matchedLen = candidatePath.length;
|
|
92
|
+
matchedValue = value;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return matchedValue;
|
|
96
|
+
}
|
|
97
|
+
function getPathFromMapKey(mapKey) {
|
|
98
|
+
const pathStart = mapKey.indexOf("/");
|
|
99
|
+
return mapKey.slice(pathStart);
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=restorePollerHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,uCAAuC,EACvC,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAG1E,OAAO,EAGL,gBAAgB,GAEjB,MAAM,iBAAiB,CAAC;AAgBzB;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAsB,EACtB,eAAuB,EACvB,eAAiF,EACjF,OAAuC;;IAEvC,MAAM,YAAY,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IACpE,IAAI,CAAC,iBAAiB,IAAI,CAAC,aAAa,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,6BAA6B,eAAe,wBAAwB,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,IAAI,EAAE,CAC5F,CAAC;IACJ,CAAC;IACD,MAAM,sBAAsB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,wBAAwB,CAErD,CAA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,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { PostgresClient } from \"./postgresClient.js\";\nimport {\n _organizationsCreateOrUpdateDeserialize,\n _organizationsUpdateDeserialize,\n _organizationsDeleteDeserialize,\n} from \"./api/organizations/index.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n PollerLike,\n OperationState,\n deserializeState,\n ResourceLocationConfig,\n} from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: PostgresClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: Function;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}\":\n {\n deserializer: _organizationsCreateOrUpdateDeserialize,\n expectedStatuses: [\"200\", \"201\"],\n },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}\":\n {\n deserializer: _organizationsUpdateDeserialize,\n expectedStatuses: [\"200\", \"202\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}\":\n {\n deserializer: _organizationsDeleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|