@wix/auto_sdk_ai-credits_ai-credits 1.0.0

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 (52) hide show
  1. package/build/cjs/index.d.ts +21 -0
  2. package/build/cjs/index.js +211 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1209 -0
  5. package/build/cjs/index.typings.js +199 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1209 -0
  8. package/build/cjs/meta.js +192 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +34 -0
  11. package/build/cjs/schemas.js +100 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +21 -0
  14. package/build/es/index.mjs +182 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +1209 -0
  17. package/build/es/index.typings.mjs +170 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +1209 -0
  20. package/build/es/meta.mjs +160 -0
  21. package/build/es/meta.mjs.map +1 -0
  22. package/build/es/package.json +3 -0
  23. package/build/es/schemas.d.mts +34 -0
  24. package/build/es/schemas.mjs +62 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +21 -0
  27. package/build/internal/cjs/index.js +211 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +1209 -0
  30. package/build/internal/cjs/index.typings.js +199 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +1209 -0
  33. package/build/internal/cjs/meta.js +192 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +34 -0
  36. package/build/internal/cjs/schemas.js +100 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +21 -0
  39. package/build/internal/es/index.mjs +182 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +1209 -0
  42. package/build/internal/es/index.typings.mjs +170 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +1209 -0
  45. package/build/internal/es/meta.mjs +160 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +34 -0
  48. package/build/internal/es/schemas.mjs +62 -0
  49. package/build/internal/es/schemas.mjs.map +1 -0
  50. package/meta/package.json +3 -0
  51. package/package.json +61 -0
  52. package/schemas/package.json +3 -0
@@ -0,0 +1,21 @@
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { GetBalanceResponse } from './index.typings.js';
3
+ export { AccountInfo, ActionEvent, Amount, AssignedFromFloatingReason, BooleanFeature, CancelRequestedReason, ChargeRequest, ChargeResponse, ContractSwitchClassification, ContractSwitchClassificationWithLiterals, ContractSwitchedReason, CreditBalance, CreditTransaction, CreditsCharged, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DomainEvent, DomainEventBodyOneOf, EligibilityChecked, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EstimateChargeRequest, EstimateChargeResponse, Feature, FeatureCancelled, FeatureCancelledReasonOneOf, FeatureContext, FeatureDisabled, FeatureDisabledReasonOneOf, FeatureEnabled, FeatureEnabledReasonOneOf, FeatureEvent, FeatureEventEventOneOf, FeaturePeriod, FeaturePeriodEnumFeaturePeriod, FeaturePeriodEnumFeaturePeriodWithLiterals, FeaturePeriodWithLiterals, FeatureQuantityInfoOneOf, FeatureQuotaUsageChanged, FeatureUpdated, FeatureUpdatedPreviousQuantityInfoOneOf, FeatureUpdatedReasonOneOf, GetAccountCreditBalanceRequest, GetAccountCreditBalanceResponse, GetBalanceRequest, GetCostInCreditsRequest, GetCostInCreditsResponse, GetCreditBalanceRequest, GetCreditBalanceResponse, GetCreditTransactionRequest, GetCreditTransactionResponse, IdentificationData, IdentificationDataIdOneOf, IsEligibleRequest, IsEligibleResponse, ManualFeatureCreationReason, ManualSyncReason, MessageEnvelope, MigratedFromLegacyReason, Money, NewFeatureReason, Periodic, QueryCreditTransactionsRequest, QueryCreditTransactionsResponse, QuotaExhaustedReason, QuotaFeature, QuotaInfo, QuotaInfoEntry, ReassignedFromSiteReason, ReassignedToAnotherSiteReason, ReplacedByAnotherSubscriptionReason, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, Subscription, TopUp, TransferredFromAnotherAccountReason, TransferredToAnotherAccountReason, UnAssingedToFloatingReason, UsageRule, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
+
5
+ declare function getBalance$1(httpClient: HttpClient): GetBalanceSignature;
6
+ interface GetBalanceSignature {
7
+ /**
8
+ * Retrieves the account's current credit balance, including recurring (periodic) credits,
9
+ * one-time top-up credits, and a per-subscription breakdown of credit allocations.
10
+ *
11
+ * Shares GetAccountCreditBalance's permission and implementation: GetBalance delegates to it for the
12
+ * authorization/wallet check and balance computation, so callers are authorized against the same
13
+ * get_account_credit_balance / get_site_credit_balance permissions and existing legacy callers keep
14
+ * working unchanged.
15
+ */
16
+ (): Promise<NonNullablePaths<GetBalanceResponse, `periodicCredits.balance` | `periodicCredits.cap` | `topUpCredits.balance` | `topUpCredits.cap` | `creditBalanceBreakdown`, 3>>;
17
+ }
18
+
19
+ declare const getBalance: MaybeContext<BuildRESTFunction<typeof getBalance$1> & typeof getBalance$1>;
20
+
21
+ export { GetBalanceResponse, getBalance };
@@ -0,0 +1,211 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ ContractSwitchClassification: () => ContractSwitchClassification,
24
+ FeaturePeriod: () => FeaturePeriod,
25
+ FeaturePeriodEnumFeaturePeriod: () => FeaturePeriodEnumFeaturePeriod,
26
+ SortOrder: () => SortOrder,
27
+ WebhookIdentityType: () => WebhookIdentityType,
28
+ getBalance: () => getBalance4
29
+ });
30
+ module.exports = __toCommonJS(index_exports);
31
+
32
+ // src/appmarket-credittransactions-v1-credit-transaction-ai-credits.universal.ts
33
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
34
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
35
+
36
+ // src/appmarket-credittransactions-v1-credit-transaction-ai-credits.http.ts
37
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
38
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
39
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
40
+ function resolveWixAppmarketCredittransactionsV1CreditTransactionsServiceUrl(opts) {
41
+ const domainToMappings = {
42
+ "manage._base_domain_": [
43
+ {
44
+ srcPath: "/credit-transactions",
45
+ destPath: ""
46
+ },
47
+ {
48
+ srcPath: "/_api/credit-transactions",
49
+ destPath: ""
50
+ }
51
+ ],
52
+ "editor._base_domain_": [
53
+ {
54
+ srcPath: "/_api/credit-transactions",
55
+ destPath: ""
56
+ }
57
+ ],
58
+ "blocks._base_domain_": [
59
+ {
60
+ srcPath: "/_api/credit-transactions",
61
+ destPath: ""
62
+ }
63
+ ],
64
+ "create.editorx": [
65
+ {
66
+ srcPath: "/_api/credit-transactions",
67
+ destPath: ""
68
+ }
69
+ ],
70
+ "www.wixapis.com": [
71
+ {
72
+ srcPath: "/appmarket/credittransactions/v1/credit-transactions",
73
+ destPath: "/v1/credit-transactions"
74
+ }
75
+ ],
76
+ "*.dev.wix-code.com": [
77
+ {
78
+ srcPath: "/appmarket/credittransactions/v1/credit-transactions",
79
+ destPath: "/v1/credit-transactions"
80
+ }
81
+ ],
82
+ _: [
83
+ {
84
+ srcPath: "/appmarket/credittransactions/v1/credit-transactions",
85
+ destPath: "/v1/credit-transactions"
86
+ }
87
+ ]
88
+ };
89
+ return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
90
+ }
91
+ var PACKAGE_NAME = "@wix/auto_sdk_ai-credits_ai-credits";
92
+ function getBalance(payload) {
93
+ function __getBalance({ host }) {
94
+ const metadata = {
95
+ entityFqdn: "wix.appmarket.credittransactions.v1.credit_transaction",
96
+ method: "POST",
97
+ methodFqn: "wix.appmarket.credittransactions.v1.CreditTransactionsService.GetBalance",
98
+ packageName: PACKAGE_NAME,
99
+ migrationOptions: {
100
+ optInTransformResponse: true
101
+ },
102
+ url: resolveWixAppmarketCredittransactionsV1CreditTransactionsServiceUrl({
103
+ protoPath: "/v1/credit-transactions/balance",
104
+ data: payload,
105
+ host
106
+ }),
107
+ data: payload,
108
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
109
+ {
110
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
111
+ paths: [{ path: "creditBalanceBreakdown.usageRules.resetDate" }]
112
+ }
113
+ ])
114
+ };
115
+ return metadata;
116
+ }
117
+ return __getBalance;
118
+ }
119
+
120
+ // src/appmarket-credittransactions-v1-credit-transaction-ai-credits.universal.ts
121
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
122
+ SortOrder2["ASC"] = "ASC";
123
+ SortOrder2["DESC"] = "DESC";
124
+ return SortOrder2;
125
+ })(SortOrder || {});
126
+ var FeaturePeriodEnumFeaturePeriod = /* @__PURE__ */ ((FeaturePeriodEnumFeaturePeriod2) => {
127
+ FeaturePeriodEnumFeaturePeriod2["NO_PERIOD"] = "NO_PERIOD";
128
+ FeaturePeriodEnumFeaturePeriod2["MILLISECOND"] = "MILLISECOND";
129
+ FeaturePeriodEnumFeaturePeriod2["SECOND"] = "SECOND";
130
+ FeaturePeriodEnumFeaturePeriod2["MINUTE"] = "MINUTE";
131
+ FeaturePeriodEnumFeaturePeriod2["HOUR"] = "HOUR";
132
+ FeaturePeriodEnumFeaturePeriod2["DAY"] = "DAY";
133
+ FeaturePeriodEnumFeaturePeriod2["WEEK"] = "WEEK";
134
+ FeaturePeriodEnumFeaturePeriod2["MONTH"] = "MONTH";
135
+ FeaturePeriodEnumFeaturePeriod2["YEAR"] = "YEAR";
136
+ return FeaturePeriodEnumFeaturePeriod2;
137
+ })(FeaturePeriodEnumFeaturePeriod || {});
138
+ var FeaturePeriod = /* @__PURE__ */ ((FeaturePeriod2) => {
139
+ FeaturePeriod2["NO_PERIOD"] = "NO_PERIOD";
140
+ FeaturePeriod2["MILLISECOND"] = "MILLISECOND";
141
+ FeaturePeriod2["SECOND"] = "SECOND";
142
+ FeaturePeriod2["MINUTE"] = "MINUTE";
143
+ FeaturePeriod2["HOUR"] = "HOUR";
144
+ FeaturePeriod2["DAY"] = "DAY";
145
+ FeaturePeriod2["WEEK"] = "WEEK";
146
+ FeaturePeriod2["MONTH"] = "MONTH";
147
+ FeaturePeriod2["YEAR"] = "YEAR";
148
+ return FeaturePeriod2;
149
+ })(FeaturePeriod || {});
150
+ var ContractSwitchClassification = /* @__PURE__ */ ((ContractSwitchClassification2) => {
151
+ ContractSwitchClassification2["UNKNOWN"] = "UNKNOWN";
152
+ ContractSwitchClassification2["UPGRADE"] = "UPGRADE";
153
+ ContractSwitchClassification2["DOWNGRADE"] = "DOWNGRADE";
154
+ ContractSwitchClassification2["PRICE_INCREASE"] = "PRICE_INCREASE";
155
+ return ContractSwitchClassification2;
156
+ })(ContractSwitchClassification || {});
157
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
158
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
159
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
160
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
161
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
162
+ WebhookIdentityType2["APP"] = "APP";
163
+ return WebhookIdentityType2;
164
+ })(WebhookIdentityType || {});
165
+ async function getBalance2() {
166
+ const { httpClient, sideEffects } = arguments[0];
167
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
168
+ const reqOpts = getBalance(
169
+ payload
170
+ );
171
+ sideEffects?.onSiteCall?.();
172
+ try {
173
+ const result = await httpClient.request(reqOpts);
174
+ sideEffects?.onSuccess?.(result);
175
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
176
+ } catch (err) {
177
+ const transformedError = (0, import_transform_error.transformError)(
178
+ err,
179
+ {
180
+ spreadPathsToArguments: {},
181
+ explicitPathsToArguments: {},
182
+ singleArgumentUnchanged: false
183
+ },
184
+ []
185
+ );
186
+ sideEffects?.onError?.(err);
187
+ throw transformedError;
188
+ }
189
+ }
190
+
191
+ // src/appmarket-credittransactions-v1-credit-transaction-ai-credits.public.ts
192
+ function getBalance3(httpClient) {
193
+ return () => getBalance2(
194
+ // @ts-ignore
195
+ { httpClient }
196
+ );
197
+ }
198
+
199
+ // src/appmarket-credittransactions-v1-credit-transaction-ai-credits.context.ts
200
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
201
+ var getBalance4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(getBalance3);
202
+ // Annotate the CommonJS export names for ESM import in node:
203
+ 0 && (module.exports = {
204
+ ContractSwitchClassification,
205
+ FeaturePeriod,
206
+ FeaturePeriodEnumFeaturePeriod,
207
+ SortOrder,
208
+ WebhookIdentityType,
209
+ getBalance
210
+ });
211
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../index.ts","../../src/appmarket-credittransactions-v1-credit-transaction-ai-credits.universal.ts","../../src/appmarket-credittransactions-v1-credit-transaction-ai-credits.http.ts","../../src/appmarket-credittransactions-v1-credit-transaction-ai-credits.public.ts","../../src/appmarket-credittransactions-v1-credit-transaction-ai-credits.context.ts"],"sourcesContent":["export * from './src/appmarket-credittransactions-v1-credit-transaction-ai-credits.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAppmarketCredittransactionsV1CreditTransaction from './appmarket-credittransactions-v1-credit-transaction-ai-credits.http.js';\n// @ts-ignore\n\n/**\n * A CreditTransaction represents a credit charge deducted from a user's balance for performing an AI action or other credit-consuming operation.\n *\n * Each transaction records the monetary cost of the operation, the equivalent number of credits charged and metadata about the operation that triggered the charge.\n * CreditTransactions are immutable records created through the Charge method and serve as an audit trail for credit usage and billing purposes.\n */\nexport interface CreditTransaction {\n /**\n * CreditTransaction ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the CreditTransaction is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the CreditTransaction.\n *\n * Ignored when creating a CreditTransaction.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the CreditTransaction was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the CreditTransaction was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Transaction value in credits and actual price. */\n amount?: Amount;\n /**\n * Description of the transaction\n * @maxLength 100\n */\n description?: string;\n /**\n * App ID of app that initiated the action\n * @format GUID\n * @readonly\n */\n callerAppId?: string;\n /**\n * External reference ID that links this credit transaction to the specific operation or action that triggered it.\n * This ID is provided by the calling application when creating the transaction and can be used to correlate\n * credit charges with specific AI actions, API calls, or other operations for tracking and reconciliation purposes.\n * @format GUID\n */\n externalRefId?: string | null;\n /**\n * Additional context about the operation that triggered this credit transaction.\n * May include details such as the AI feature type, operation parameters, usage metrics,\n * or other relevant information that helps track and understand credit consumption patterns.\n */\n metadata?: Record<string, any> | null;\n /** @format GUID */\n idempotencyKey?: string | null;\n}\n\nexport interface Amount {\n /**\n * Amount of credits charged\n * @readonly\n */\n credits?: number;\n /** Monetary value of the transaction. */\n cost?: Money;\n}\n\n/**\n * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.\n * For special cases, one may use just a value without currency to represent money. But:\n * - money MUST be a decimal string, as described below\n * - currency MUST be provided somewhere at the top level of your object\n */\nexport interface Money {\n /**\n * Monetary amount in main currency units, formatted as a decimal string with a period as a decimal separator. For example, `3456.99` or `-789`.\n * @decimalValue options { maxScale:8 }\n */\n amount?: string;\n /**\n * Currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, `USD`.\n * @format CURRENCY\n */\n currencyCode?: string;\n /**\n * Localized monetary amount including the currency symbol. For example `1.000,30 €` or `-$12,345.67`.\n * @readonly\n * @maxLength 100\n */\n formattedValue?: string | null;\n}\n\nexport interface CreditsCharged {\n /**\n * The created transaction ID\n * @format GUID\n */\n transactionId?: string;\n /**\n * What was charged for\n * @maxLength 100\n */\n description?: string;\n /**\n * Input cost value (e.g., \"0.50\")\n * @decimalValue options { gte:0, maxScale:6 }\n */\n monetaryAmount?: string;\n /**\n * Currency code (e.g., \"USD\")\n * @format CURRENCY\n */\n currency?: string;\n /** Cost converted to credits */\n costInCredits?: number;\n /** Actual credits deducted */\n creditsCharged?: number;\n /** Credits per dollar rate */\n conversionRate?: number;\n /** Daily limit was hit */\n dailyQuotaExceeded?: number;\n /** Monthly limit was hit */\n monthlyQuotaExceeded?: number;\n /**\n * App that initiated the charge\n * @format GUID\n */\n appDefId?: string;\n}\n\nexport interface EligibilityChecked {\n /** The eligibility result */\n eligible?: boolean;\n /**\n * Context for the check\n * @maxLength 100\n */\n description?: string | null;\n /**\n * Input cost value\n * @decimalValue options { gte:0, maxScale:6 }\n */\n monetaryAmount?: string;\n /**\n * Currency code\n * @format CURRENCY\n */\n currency?: string;\n /** Cost converted to credits */\n costInCredits?: number;\n /** Credits per dollar rate */\n conversionRate?: number;\n /**\n * App that initiated the check\n * @format GUID\n */\n appDefId?: string;\n}\n\nexport interface GetCreditTransactionRequest {\n /**\n * ID of the CreditTransaction to retrieve.\n * @format GUID\n */\n creditTransactionId?: string;\n}\n\nexport interface GetCreditTransactionResponse {\n /** The requested CreditTransaction. */\n creditTransaction?: CreditTransaction;\n}\n\nexport interface QueryCreditTransactionsRequest {\n /** WQL expression. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryCreditTransactionsResponse {\n /** List of CreditTransactions. */\n creditTransactions?: CreditTransaction[];\n /** Paging metadata */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface ChargeRequest {\n /**\n * The cost of the action in its original monetary value (e.g., USD).\n * The service will handle the conversion of this price to credits.\n */\n cost?: Money;\n /**\n * Description of the charge.\n * @maxLength 100\n */\n description?: string;\n /**\n * External reference ID that links this credit transaction to the specific operation or action that triggered it.\n * This ID is provided by the calling application and will be stored in the created CreditTransaction.\n * Can be used to correlate credit charges with specific AI actions, API calls, or other operations for tracking and reconciliation purposes.\n * @format GUID\n */\n externalRefId?: string | null;\n /** @format GUID */\n idempotencyKey?: string | null;\n /**\n * Additional context about the operation that triggered this credit transaction.\n * May include details such as the AI feature type, operation parameters, usage metrics,\n * or other relevant information that helps track and understand credit consumption patterns.\n */\n metadata?: Record<string, any> | null;\n}\n\nexport interface ChargeResponse {\n /** Created credit transaction. */\n creditTransaction?: CreditTransaction;\n}\n\nexport interface IsEligibleRequest {\n /**\n * Estimated cost of the operation in monetary terms (e.g., USD).\n * The service will check if the user has sufficient credits to cover this cost.\n */\n cost?: Money;\n /**\n * Description of the action triggering the eligibility check.\n * @maxLength 100\n */\n description?: string | null;\n}\n\nexport interface IsEligibleResponse {\n /** Indicates whether the user has sufficient credits to perform the requested operation. */\n eligible?: boolean;\n}\n\nexport interface EstimateChargeRequest {\n /** Monetary cost of the operation (e.g., USD) to convert into credits. */\n cost?: Money;\n}\n\nexport interface EstimateChargeResponse {\n /** Cost of the requested operation in credits, computed from the monetary cost and the effective rate. */\n creditCost?: number;\n /** Effective credits-per-dollar rate used to compute `credit_cost`. */\n effectiveRate?: number;\n}\n\nexport interface GetCostInCreditsRequest {\n /** Monetary cost of the operation (e.g., USD) to convert into credits. */\n cost?: Money;\n}\n\nexport interface GetCostInCreditsResponse {\n /** Cost of the requested operation in credits, computed from the monetary cost and the effective rate. */\n credits?: number;\n}\n\nexport interface GetCreditBalanceRequest {}\n\nexport interface GetCreditBalanceResponse {\n /** Credit subscription details */\n subscription?: Subscription;\n /** Credit top-ups details, if top-ups exist */\n topUp?: TopUp;\n /** credit subscriptions details, includes all subscriptions of the user */\n subscriptions?: Subscription[];\n}\n\nexport interface Subscription {\n /**\n * Current remaining credits from the user's periodic subscription allowance.\n * This balance resets according to the subscription period (e.g., monthly).\n */\n balance?: number;\n /**\n * Maximum credits available through the user's periodic subscription.\n * This represents the subscription quota limit for the current period.\n */\n cap?: number;\n /** The reset cycle of the subscription. */\n period?: FeaturePeriodEnumFeaturePeriodWithLiterals;\n /**\n * The next timestamp when the user's recurring (subscription) credit balance will be reset to its full amount.\n * This field is only populated for users with an active, recurring credit plan.\n */\n resetDate?: Date | null;\n}\n\n/** Determines the reset cycle of the feature usage. */\nexport enum FeaturePeriodEnumFeaturePeriod {\n NO_PERIOD = 'NO_PERIOD',\n MILLISECOND = 'MILLISECOND',\n SECOND = 'SECOND',\n MINUTE = 'MINUTE',\n HOUR = 'HOUR',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type FeaturePeriodEnumFeaturePeriodWithLiterals =\n | FeaturePeriodEnumFeaturePeriod\n | 'NO_PERIOD'\n | 'MILLISECOND'\n | 'SECOND'\n | 'MINUTE'\n | 'HOUR'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface TopUp {\n /**\n * Current remaining credits from additional top-up purchases.\n * Top-up credits are one-time purchases that supplement the subscription balance.\n * This field is optional and will be None if the user has no top-up credits.\n */\n balance?: number;\n /**\n * Maximum additional credits that can be purchased as top-ups.\n * This represents the total top-up quota limit.\n * This field is optional and will be None if top-up purchases are not available.\n */\n cap?: number;\n}\n\nexport interface GetAccountCreditBalanceRequest {}\n\nexport interface GetAccountCreditBalanceResponse {\n /**\n * Aggregated periodic credit details across all active subscriptions.\n * Combines balances and caps from all subscription-based credit allocations.\n * For free accounts (no subscription ID), `balance` reflects `min(monthly, daily)` and `cap` reflects the daily limit.\n */\n periodicCredits?: Periodic;\n /**\n * Aggregated one-time top-up credit details.\n * Represents the total remaining and maximum top-up credits across all purchases.\n * This field is only populated if the account has purchased top-up credits.\n */\n topUpCredits?: TopUp;\n /**\n * Detailed breakdown of credit balances by subscription.\n * Each entry represents a distinct credit allocation with its own usage rules,\n * enabling granular tracking of credits from different sources (e.g., different plans or promotions).\n * @maxSize 1000\n */\n creditBalanceBreakdown?: CreditBalance[];\n}\n\n/**\n * Represents aggregated periodic (recurring) credit information across all subscriptions.\n * For free accounts (no subscription ID), `balance` is the effective balance computed as\n * `min(monthly_balance, daily_balance)`, and `cap` is the daily periodic cap.\n * For premium accounts, values are raw monthly aggregates.\n */\nexport interface Periodic {\n /**\n * Total remaining credits from all active periodic subscriptions.\n * This value decreases as credits are consumed and resets according to each subscription's period.\n * For free accounts, this is `min(monthly_balance, daily_balance)`.\n */\n balance?: number;\n /**\n * Total maximum credits available across all periodic subscriptions.\n * Represents the combined quota limit from all active subscription plans.\n * For free accounts, this is the daily periodic cap.\n */\n cap?: number;\n}\n\n/** Represents a credit allocation from a specific subscription source. */\nexport interface CreditBalance {\n /**\n * Unique identifier of the subscription associated with this credit allocation.\n * May be empty for credits not tied to a specific subscription.\n * @format GUID\n */\n subscriptionId?: string | null;\n /**\n * Usage rules that define how credits in this allocation can be consumed.\n * Multiple rules may apply simultaneously (combined with AND logic), such as daily limits within a monthly allocation.\n * @maxSize 10\n */\n usageRules?: UsageRule[];\n}\n\nexport interface UsageRule {\n /**\n * The reset period for this usage rule — how often the credits under this rule replenish to `cap`.\n * `NO_PERIOD` indicates one-time top-up credits that do not reset.\n * `DAY` indicates credits that reset daily, and `MONTH` indicates credits that reset monthly.\n */\n period?: FeaturePeriodEnumFeaturePeriodWithLiterals;\n /** Current remaining credits under this rule. */\n balance?: number;\n /** Maximum credits allowed under this rule per period. */\n cap?: number;\n /** Timestamp when this rule's balance will reset to the cap value. */\n resetDate?: Date | null;\n}\n\nexport interface GetBalanceRequest {}\n\nexport interface GetBalanceResponse {\n /**\n * Aggregated periodic credit details across all active subscriptions.\n * Combines balances and caps from all subscription-based credit allocations.\n * For free accounts (no subscription ID), `balance` reflects `min(monthly, daily)` and `cap` reflects the daily limit.\n */\n periodicCredits?: Periodic;\n /**\n * Aggregated one-time top-up credit details.\n * Represents the total remaining and maximum top-up credits across all purchases.\n * This field is only populated if the account has purchased top-up credits.\n */\n topUpCredits?: TopUp;\n /**\n * Detailed breakdown of credit balances by subscription.\n * Each entry represents a distinct credit allocation with its own usage rules,\n * enabling granular tracking of credits from different sources (e.g., different plans or promotions).\n * This is a detailed view of the same credits aggregated in `periodicCredits` and `topUpCredits`,\n * not additional credits — summing the breakdown will not exceed those aggregates.\n * @maxSize 1000\n */\n creditBalanceBreakdown?: CreditBalance[];\n}\n\nexport interface FeatureEvent extends FeatureEventEventOneOf {\n /**\n * Information about an event that makes a feature eligible to the user.\n * Triggered for example, for new features or when a feature is reassigned\n * to an account or a site.\n */\n enabled?: FeatureEnabled;\n /**\n * Information about an event that disables a feature for the user.\n * Triggered for example, when a feature is unassigned from a site,\n * reassigned to a different site, or the user switched to a different contract.\n */\n disabled?: FeatureDisabled;\n /**\n * Information about an event that updates a feature. An `updated` event\n * is triggered for example by the\n * [Report Quota Usage](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/report-quota-usage)\n * and [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter)\n * endpoints.\n */\n updated?: FeatureUpdated;\n /**\n * Information about an event that cancels a feature for the user.\n * Triggered for example, when a feature is canceled, transferred to\n * another account, or the user switched to a different contract.\n */\n cancelled?: FeatureCancelled;\n /**\n * Information about a quota usage change for a feature. Triggered when\n * quota usage is reported via Report Quota Usage endpoint. Includes\n * before/after usage and remaining values.\n */\n quotaUsageChanged?: FeatureQuotaUsageChanged;\n /**\n * Timestamp of the event in\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n */\n timestamp?: Date | null;\n}\n\n/** @oneof */\nexport interface FeatureEventEventOneOf {\n /**\n * Information about an event that makes a feature eligible to the user.\n * Triggered for example, for new features or when a feature is reassigned\n * to an account or a site.\n */\n enabled?: FeatureEnabled;\n /**\n * Information about an event that disables a feature for the user.\n * Triggered for example, when a feature is unassigned from a site,\n * reassigned to a different site, or the user switched to a different contract.\n */\n disabled?: FeatureDisabled;\n /**\n * Information about an event that updates a feature. An `updated` event\n * is triggered for example by the\n * [Report Quota Usage](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/report-quota-usage)\n * and [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter)\n * endpoints.\n */\n updated?: FeatureUpdated;\n /**\n * Information about an event that cancels a feature for the user.\n * Triggered for example, when a feature is canceled, transferred to\n * another account, or the user switched to a different contract.\n */\n cancelled?: FeatureCancelled;\n /**\n * Information about a quota usage change for a feature. Triggered when\n * quota usage is reported via Report Quota Usage endpoint. Includes\n * before/after usage and remaining values.\n */\n quotaUsageChanged?: FeatureQuotaUsageChanged;\n}\n\n/** Feature created or enabled after disabled state */\nexport interface FeatureEnabled extends FeatureEnabledReasonOneOf {\n /** Information about a transfer from another account. */\n transferredFromAnotherAccount?: TransferredFromAnotherAccountReason;\n /** Information about a transfer from another site. */\n reassignedFromSite?: ReassignedFromSiteReason;\n /** Information about a feature that hadn't been assigned to site. */\n assignedFromFloating?: AssignedFromFloatingReason;\n /** Information about the new feature. */\n newFeature?: NewFeatureReason;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about the manually created features. */\n manualFeatureCreation?: ManualFeatureCreationReason;\n /** Information about a feature that was migrated from legacy. */\n migratedFromLegacy?: MigratedFromLegacyReason;\n /** Information about manual sync (e.g. immigrator task). */\n manualSync?: ManualSyncReason;\n /** Enabled feature. */\n feature?: Feature;\n /**\n * Information about a transfer from another account.\n * __Deprecated__. Use `reason.transferred_from_another_account` instead.\n * @format GUID\n */\n transferredFromAccount?: string | null;\n /**\n * Information about a transfer from another site.\n * __Deprecated__. Use `reason.reassigned_from_site` instead.\n * @format GUID\n */\n reassignedFromMetasite?: string | null;\n}\n\n/** @oneof */\nexport interface FeatureEnabledReasonOneOf {\n /** Information about a transfer from another account. */\n transferredFromAnotherAccount?: TransferredFromAnotherAccountReason;\n /** Information about a transfer from another site. */\n reassignedFromSite?: ReassignedFromSiteReason;\n /** Information about a feature that hadn't been assigned to site. */\n assignedFromFloating?: AssignedFromFloatingReason;\n /** Information about the new feature. */\n newFeature?: NewFeatureReason;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about the manually created features. */\n manualFeatureCreation?: ManualFeatureCreationReason;\n /** Information about a feature that was migrated from legacy. */\n migratedFromLegacy?: MigratedFromLegacyReason;\n /** Information about manual sync (e.g. immigrator task). */\n manualSync?: ManualSyncReason;\n}\n\nexport interface Feature extends FeatureQuantityInfoOneOf {\n /**\n * Deprecated. Use `enabled` instead.\n * @deprecated\n */\n booleanFeature?: BooleanFeature;\n /**\n * Deprecated. Use `quotaInfo` instead.\n * @deprecated\n */\n quotaFeature?: QuotaFeature;\n /**\n * ID of the feature. __Note:__ Isn't unique. For example, all features that\n * are available to free Wix accounts or site in some capacity have\n * `{\"id\": \"DEFAULT\"}`. Use `uniqueName` as unique identifier for a feature.\n * @readonly\n */\n _id?: string;\n /**\n * Unique name of the feature. Only lower case letters, numbers, and dashes\n * `-` are supported. Used in the endpoints of the\n * [Features Manager API](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/introduction)\n * to specify the feature. Not visible to customers. We recommend to start\n * the unique name with a prefix describing your organization or Wix company.\n * For example, `bookings` or `crm`.\n *\n * Min: 2 characters\n * Max: 50 characters\n * @minLength 2\n * @maxLength 50\n */\n uniqueName?: string;\n /**\n * Information about whether the feature belongs to a Wix account or site.\n * Account features have `context.userId`. Site features have `context.metaSiteId` in case\n * they're assigned to a specific site. Site features that aren't assigned to\n * a specific site have neither ID.\n */\n context?: FeatureContext;\n /**\n * Deprecated.\n * @readonly\n * @deprecated\n */\n createdAt?: Date | null;\n /**\n * Deprecated.\n * @readonly\n * @deprecated\n */\n updatedAt?: Date | null;\n /**\n * Aggregated information about how often customers can use the feature.\n * Available only for quota features.\n */\n quotaInfo?: QuotaInfo;\n /**\n * Whether the customer is currently allowed to use the feature.\n * `true` means that the customer can use the feature. This means a boolean\n * feature is active or a quota feature has remaining usage.\n * `false` means that the customer can't use the feature.\n * This means a boolean feature isn't active or a quota feature doesn't\n * have remaining usage.\n */\n enabled?: boolean;\n /**\n * ID of the [subscription](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/subscription-object)\n * to which the feature instance belongs.\n * @format GUID\n */\n subscriptionId?: string | null;\n /**\n * Metadata of the feature. Wix Premium uses the metadata object to indicate\n * that customers who purchase a product with the feature also get\n * access to an additional product. For these bundled products `metadata`\n * looks like this: `{\"tpa\": \"{\"appDefId\": \"sample-app-def-id-1234567890\", \"vendorProductId\": \"sample-productId\"}}\"`.\n * But you can use the `metadata` property for other purposes, too.\n */\n metadata?: Record<string, string>;\n}\n\n/** @oneof */\nexport interface FeatureQuantityInfoOneOf {\n /**\n * Deprecated. Use `enabled` instead.\n * @deprecated\n */\n booleanFeature?: BooleanFeature;\n /**\n * Deprecated. Use `quotaInfo` instead.\n * @deprecated\n */\n quotaFeature?: QuotaFeature;\n}\n\n/**\n * Context this feature is currently connected to.\n * Note: Do not confuse with feature scope which is configured in the product catalog\n * and defines in which context the product can be used\n */\nexport interface FeatureContext {\n /**\n * ID of the Wix account that the feature instance belongs to.\n * Available for both site and account level feature instances.\n * @format GUID\n */\n userId?: string;\n /**\n * ID of the meta site that the feature instance is assigned to.\n * Only available for site level feature instances that are assigned to a Wix\n * site. Not available for account level and unassigned site level feature\n * instances.\n * @format GUID\n */\n metaSiteId?: string | null;\n}\n\n/**\n * A feature that can be either \"enabled\" or \"disabled\". The default/freemium setting is always OFF, and the premium setting is always ON (meaning, unlimited usage without tracking).\n * A boolean feature is similar to a quantitive feature with a default limit of 0 and UNLIMITED premium limit (although a bit simplified).\n */\nexport interface BooleanFeature {}\n\n/** A feature with a periodic usage limitation. The default limit is defined in the Feature Spec, the Premium limits are defined in the respective ProductFeature. */\nexport interface QuotaFeature {\n /** Default (or Freemium) quota limitation. if left undefined the free feature has unlimited amount. */\n limit?: string | null;\n /** Periodic time-frame to reset the usage counter. You may use NO_PERIOD if counter shouldn't be reset. */\n period?: FeaturePeriodWithLiterals;\n /** Usage measurement units (seconds? MBs? unitless?). Usage reported will be counted in multiples of this basic unit. */\n units?: string | null;\n}\n\n/** Determines the reset cycle of the feature usage. */\nexport enum FeaturePeriod {\n NO_PERIOD = 'NO_PERIOD',\n MILLISECOND = 'MILLISECOND',\n SECOND = 'SECOND',\n MINUTE = 'MINUTE',\n HOUR = 'HOUR',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type FeaturePeriodWithLiterals =\n | FeaturePeriod\n | 'NO_PERIOD'\n | 'MILLISECOND'\n | 'SECOND'\n | 'MINUTE'\n | 'HOUR'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface QuotaInfo {\n /**\n * Aggregation of how often the customer is allowed to use the feature at the time of the request.\n * `null` means that the customer has unlimited access to the feature.\n */\n limit?: string | null;\n /**\n * Deprecated because a feature can have multiple periods defined. Use `period` in `breakdown` entries instead.\n * Time frame for the usage limitation. `NO_PERIOD` means that `remainingUsage`\n * isn't automatically reset to the feature's `limit` after a specific period.\n * You may still manually call\n * [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter).\n * @deprecated\n * @replacedBy breakdown.period\n * @targetRemovalDate 2026-03-31\n */\n period?: FeaturePeriodWithLiterals;\n /**\n * Aggregation of how often the customer has used the feature.\n * This value is retrieved from the Quota Manager/Rate Limiter system. If the\n * `exclude_quota_usage` field in the `ListFeaturesRequest` was set to `true`,\n * this field will contain the value `-1`.\n */\n currentUsage?: string;\n /**\n * Aggregation of how often the customer can still use the feature.\n * `null` means that the customer has unlimited access to the feature.\n * This value is retrieved from the Quota Manager/Rate Limiter system. If the\n * `exclude_quota_usage` field in the `ListFeaturesRequest` was set to `true`,\n * this field will not be populated.\n */\n remainingUsage?: string | null;\n /**\n * Breakdown of quota information entries, entry per feature instance.\n * @maxSize 1000\n */\n breakdown?: QuotaInfoEntry[];\n}\n\nexport interface QuotaInfoEntry {\n /**\n * If quota is of free feature, the id would be empty (None).\n * If quota is of premium feature, this is the ID of the feature instance.\n * @format GUID\n */\n featureInstanceId?: string | null;\n /**\n * How often the customer is allowed to use the feature during the specified\n * period. `null` means that the customer has unlimited access to the feature.\n */\n limit?: string | null;\n /**\n * Time frame for the usage limitation. `NO_PERIOD` means that `remainingUsage`\n * isn't automatically reset to the feature's `limit` after a specific period.\n * You may still manually call\n * [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter).\n */\n period?: FeaturePeriodWithLiterals;\n /**\n * How often the customer has used the feature during the current\n * period.\n * This value is retrieved from the Quota Manager/Rate Limiter system. If the\n * `exclude_quota_usage` field in the `ListFeaturesRequest` was set to `true`,\n * this field will contain the value `-1`.\n */\n currentUsage?: string;\n /**\n * How often the customer can still use the feature during the current\n * period. `null` means that the customer has unlimited access to the feature.\n * This value is retrieved from the Quota Manager/Rate Limiter system. If the\n * `exclude_quota_usage` field in the `ListFeaturesRequest` was set to `true`,\n * this field will not be populated.\n */\n remainingUsage?: string | null;\n /**\n * ID of the subscription to which the feature instance belongs.\n * @format GUID\n */\n subscriptionId?: string | null;\n /**\n * Reset date of the quota.\n * Relevant only for features with a period that is not `NO_PERIOD`, and only for features that are managed by the Quota Manager system.\n */\n resetDate?: Date | null;\n}\n\n/** Subscription transferred from another account, features on the current account were enabled. */\nexport interface TransferredFromAnotherAccountReason {\n /**\n * Information about a transfer from another account.\n * @format GUID\n */\n transferredFromAccount?: string;\n}\n\n/** Subscription moved from one site to another in the same account, features enabled on the target site */\nexport interface ReassignedFromSiteReason {\n /**\n * Information about a transfer from another site.\n * @format GUID\n */\n reassignedFromMetasite?: string;\n}\n\n/** Subscription was floating and assigned to site, features enabled on the target site */\nexport interface AssignedFromFloatingReason {}\n\n/** New subscription created and features created as enabled */\nexport interface NewFeatureReason {}\n\n/** Subscription was upgraded or downgraded, as a result new features enabled, missing features disabled , quantities are updated */\nexport interface ContractSwitchedReason {\n /** Classification of the contract switch (upgrade, downgrade, or price increase) */\n classification?: ContractSwitchClassificationWithLiterals;\n}\n\n/**\n * Classification of contract switch events for quota reset behavior\n * Needed to determine whether to reset usage and/or reset date for features affected by the contract switch.\n * For example, for an upgrade we want to reset both usage and date.\n * For a downgrade we want to keep the usage and date but update the limit, and for a price increase we want to reset the usage but keep the date.\n */\nexport enum ContractSwitchClassification {\n /** Unknown or unclassified contract switch */\n UNKNOWN = 'UNKNOWN',\n /** Upgrade - reset usage, reset date, and update limit */\n UPGRADE = 'UPGRADE',\n /** Downgrade - only update limit (no reset) */\n DOWNGRADE = 'DOWNGRADE',\n /** Price increase - reset usage only (not reset date), update limit */\n PRICE_INCREASE = 'PRICE_INCREASE',\n}\n\n/** @enumType */\nexport type ContractSwitchClassificationWithLiterals =\n | ContractSwitchClassification\n | 'UNKNOWN'\n | 'UPGRADE'\n | 'DOWNGRADE'\n | 'PRICE_INCREASE';\n\n/** a call to CreateFeature in features-writer, creates feature that is not attached to subscription */\nexport interface ManualFeatureCreationReason {}\n\n/** Subscription created due to migration from old premium model */\nexport interface MigratedFromLegacyReason {}\n\n/** Feature was synced manually, for example by immigrator task */\nexport interface ManualSyncReason {\n /**\n * Optional description of the manual sync source (e.g. \"immigrator\", \"quota-sync\").\n * @maxLength 100\n */\n source?: string | null;\n}\n\n/** Feature disabled and can be enabled in the future */\nexport interface FeatureDisabled extends FeatureDisabledReasonOneOf {\n /** Information about a feature that's no longer assigned to a site. */\n unassingedToFloating?: UnAssingedToFloatingReason;\n /**\n * Information about a feature that's been replaced by a feature from a\n * different subscription.\n */\n replacedByAnotherSubscription?: ReplacedByAnotherSubscriptionReason;\n /**\n * Information about a feature that's been reassigned to a different\n * site.\n */\n reassignedToAnotherSite?: ReassignedToAnotherSiteReason;\n /**\n * Disabled feature. Includes information about the feature's new state,\n * possibly its new context.\n */\n feature?: Feature;\n /**\n * ID of the meta site for which the feature has been disabled.\n * @format GUID\n */\n metaSiteId?: string | null;\n}\n\n/** @oneof */\nexport interface FeatureDisabledReasonOneOf {\n /** Information about a feature that's no longer assigned to a site. */\n unassingedToFloating?: UnAssingedToFloatingReason;\n /**\n * Information about a feature that's been replaced by a feature from a\n * different subscription.\n */\n replacedByAnotherSubscription?: ReplacedByAnotherSubscriptionReason;\n /**\n * Information about a feature that's been reassigned to a different\n * site.\n */\n reassignedToAnotherSite?: ReassignedToAnotherSiteReason;\n}\n\n/** Subscription was unassigned from the site and moved into floating state */\nexport interface UnAssingedToFloatingReason {}\n\n/** Another subscription was assigned to the site, causing existing features on this site to be disabled */\nexport interface ReplacedByAnotherSubscriptionReason {}\n\n/** Subscription was assigned to another site, causing features on the origin site to be disabled. */\nexport interface ReassignedToAnotherSiteReason {\n /**\n * Information about a transfer to the site.\n * @format GUID\n */\n reassignedToMetasite?: string;\n}\n\n/** Feature updated, for example Quota was increased due to upgrade */\nexport interface FeatureUpdated\n extends FeatureUpdatedPreviousQuantityInfoOneOf,\n FeatureUpdatedReasonOneOf {\n /** Information about a feature that doesn't have a usage quota. */\n booleanFeature?: BooleanFeature;\n /** Information about a feature that has a usage quota. */\n quotaFeature?: QuotaFeature;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about manual sync (e.g. immigrator task). */\n manualSync?: ManualSyncReason;\n /**\n * Updated feature. Includes information about the feature's new state and\n * possibly its new context.\n */\n feature?: Feature;\n}\n\n/** @oneof */\nexport interface FeatureUpdatedPreviousQuantityInfoOneOf {\n /** Information about a feature that doesn't have a usage quota. */\n booleanFeature?: BooleanFeature;\n /** Information about a feature that has a usage quota. */\n quotaFeature?: QuotaFeature;\n}\n\n/** @oneof */\nexport interface FeatureUpdatedReasonOneOf {\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about manual sync (e.g. immigrator task). */\n manualSync?: ManualSyncReason;\n}\n\n/** Feature was permanently cancelled */\nexport interface FeatureCancelled extends FeatureCancelledReasonOneOf {\n /** Information about a transfer to the account. */\n transferredToAnotherAccount?: TransferredToAnotherAccountReason;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about the feature cancellation. */\n cancelRequest?: CancelRequestedReason;\n /** Information about manual sync (e.g. immigrator task). */\n manualSync?: ManualSyncReason;\n /** Feature was automatically cancelled because its quota was fully consumed. */\n quotaExhausted?: QuotaExhaustedReason;\n /** Canceled feature. */\n feature?: Feature;\n /**\n * Information about a transfer to the account.\n * __Deprecated__. Use `reason.transferred_to_account` instead.\n * @format GUID\n */\n transferredToAccount?: string | null;\n}\n\n/** @oneof */\nexport interface FeatureCancelledReasonOneOf {\n /** Information about a transfer to the account. */\n transferredToAnotherAccount?: TransferredToAnotherAccountReason;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about the feature cancellation. */\n cancelRequest?: CancelRequestedReason;\n /** Information about manual sync (e.g. immigrator task). */\n manualSync?: ManualSyncReason;\n /** Feature was automatically cancelled because its quota was fully consumed. */\n quotaExhausted?: QuotaExhaustedReason;\n}\n\n/** Subscription was transferred to another account, features in the origin account were cancelled */\nexport interface TransferredToAnotherAccountReason {\n /**\n * Information about a transfer to the account.\n * @format GUID\n */\n transferredToAccount?: string;\n}\n\n/** Cancellation was requested from the subscription manager api, might be a result of billing event, or direct call */\nexport interface CancelRequestedReason {}\n\n/** Feature was automatically cancelled because its quota was fully consumed (e.g. topup feature) */\nexport interface QuotaExhaustedReason {}\n\n/** Quota usage changed for a feature. */\nexport interface FeatureQuotaUsageChanged {\n /** Full feature state before this quota usage report. */\n featureBefore?: Feature;\n /** Full feature state after this quota usage report. */\n featureAfter?: Feature;\n}\n\nexport interface Empty {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Retrieves the account's current credit balance, including recurring (periodic) credits,\n * one-time top-up credits, and a per-subscription breakdown of credit allocations.\n *\n * Shares GetAccountCreditBalance's permission and implementation: GetBalance delegates to it for the\n * authorization/wallet check and balance computation, so callers are authorized against the same\n * get_account_credit_balance / get_site_credit_balance permissions and existing legacy callers keep\n * working unchanged.\n * @public\n * @documentationMaturity preview\n * @permissionId appmarket:credittransactions:v1:credit_transaction:get_account_credit_balance\n * @permissionId appmarket:credittransactions:v1:credit_transaction:get_site_credit_balance\n * @fqn wix.appmarket.credittransactions.v1.CreditTransactionsService.GetBalance\n */\nexport async function getBalance(): Promise<\n NonNullablePaths<\n GetBalanceResponse,\n | `periodicCredits.balance`\n | `periodicCredits.cap`\n | `topUpCredits.balance`\n | `topUpCredits.cap`\n | `creditBalanceBreakdown`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixAppmarketCredittransactionsV1CreditTransaction.getBalance(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixAppmarketCredittransactionsV1CreditTransactionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/credit-transactions',\n destPath: '',\n },\n {\n srcPath: '/_api/credit-transactions',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/credit-transactions',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/credit-transactions',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/credit-transactions',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/appmarket/credittransactions/v1/credit-transactions',\n destPath: '/v1/credit-transactions',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/appmarket/credittransactions/v1/credit-transactions',\n destPath: '/v1/credit-transactions',\n },\n ],\n _: [\n {\n srcPath: '/appmarket/credittransactions/v1/credit-transactions',\n destPath: '/v1/credit-transactions',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ai-credits_ai-credits';\n\n/**\n * Retrieves the account's current credit balance, including recurring (periodic) credits,\n * one-time top-up credits, and a per-subscription breakdown of credit allocations.\n *\n * Shares GetAccountCreditBalance's permission and implementation: GetBalance delegates to it for the\n * authorization/wallet check and balance computation, so callers are authorized against the same\n * get_account_credit_balance / get_site_credit_balance permissions and existing legacy callers keep\n * working unchanged.\n */\nexport function getBalance(payload: object): RequestOptionsFactory<any> {\n function __getBalance({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.appmarket.credittransactions.v1.credit_transaction',\n method: 'POST' as any,\n methodFqn:\n 'wix.appmarket.credittransactions.v1.CreditTransactionsService.GetBalance',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAppmarketCredittransactionsV1CreditTransactionsServiceUrl({\n protoPath: '/v1/credit-transactions/balance',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'creditBalanceBreakdown.usageRules.resetDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getBalance;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetBalanceResponse,\n getBalance as universalGetBalance,\n} from './appmarket-credittransactions-v1-credit-transaction-ai-credits.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ai-credits' };\n\nexport function getBalance(httpClient: HttpClient): GetBalanceSignature {\n return () =>\n universalGetBalance(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetBalanceSignature {\n /**\n * Retrieves the account's current credit balance, including recurring (periodic) credits,\n * one-time top-up credits, and a per-subscription breakdown of credit allocations.\n *\n * Shares GetAccountCreditBalance's permission and implementation: GetBalance delegates to it for the\n * authorization/wallet check and balance computation, so callers are authorized against the same\n * get_account_credit_balance / get_site_credit_balance permissions and existing legacy callers keep\n * working unchanged.\n */\n (): Promise<\n NonNullablePaths<\n GetBalanceResponse,\n | `periodicCredits.balance`\n | `periodicCredits.cap`\n | `topUpCredits.balance`\n | `topUpCredits.cap`\n | `creditBalanceBreakdown`,\n 3\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n Amount,\n AssignedFromFloatingReason,\n BooleanFeature,\n CancelRequestedReason,\n ChargeRequest,\n ChargeResponse,\n ContractSwitchClassification,\n ContractSwitchedReason,\n CreditBalance,\n CreditTransaction,\n CreditsCharged,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EligibilityChecked,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EstimateChargeRequest,\n EstimateChargeResponse,\n Feature,\n FeatureCancelled,\n FeatureCancelledReasonOneOf,\n FeatureContext,\n FeatureDisabled,\n FeatureDisabledReasonOneOf,\n FeatureEnabled,\n FeatureEnabledReasonOneOf,\n FeatureEvent,\n FeatureEventEventOneOf,\n FeaturePeriod,\n FeaturePeriodEnumFeaturePeriod,\n FeatureQuantityInfoOneOf,\n FeatureQuotaUsageChanged,\n FeatureUpdated,\n FeatureUpdatedPreviousQuantityInfoOneOf,\n FeatureUpdatedReasonOneOf,\n GetAccountCreditBalanceRequest,\n GetAccountCreditBalanceResponse,\n GetBalanceRequest,\n GetBalanceResponse,\n GetCostInCreditsRequest,\n GetCostInCreditsResponse,\n GetCreditBalanceRequest,\n GetCreditBalanceResponse,\n GetCreditTransactionRequest,\n GetCreditTransactionResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n IsEligibleRequest,\n IsEligibleResponse,\n ManualFeatureCreationReason,\n ManualSyncReason,\n MessageEnvelope,\n MigratedFromLegacyReason,\n Money,\n NewFeatureReason,\n Periodic,\n QueryCreditTransactionsRequest,\n QueryCreditTransactionsResponse,\n QuotaExhaustedReason,\n QuotaFeature,\n QuotaInfo,\n QuotaInfoEntry,\n ReassignedFromSiteReason,\n ReassignedToAnotherSiteReason,\n ReplacedByAnotherSubscriptionReason,\n RestoreInfo,\n SortOrder,\n Sorting,\n Subscription,\n TopUp,\n TransferredFromAnotherAccountReason,\n TransferredToAnotherAccountReason,\n UnAssingedToFloatingReason,\n UsageRule,\n WebhookIdentityType,\n} from './appmarket-credittransactions-v1-credit-transaction-ai-credits.universal.js';\n","import { getBalance as publicGetBalance } from './appmarket-credittransactions-v1-credit-transaction-ai-credits.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getBalance: MaybeContext<\n BuildRESTFunction<typeof publicGetBalance> & typeof publicGetBalance\n> = /*#__PURE__*/ createRESTModule(publicGetBalance);\n\nexport {\n SortOrder,\n FeaturePeriodEnumFeaturePeriod,\n FeaturePeriod,\n ContractSwitchClassification,\n WebhookIdentityType,\n} from './appmarket-credittransactions-v1-credit-transaction-ai-credits.universal.js';\nexport {\n CreditTransaction,\n Amount,\n Money,\n CreditsCharged,\n EligibilityChecked,\n GetCreditTransactionRequest,\n GetCreditTransactionResponse,\n QueryCreditTransactionsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryCreditTransactionsResponse,\n CursorPagingMetadata,\n Cursors,\n ChargeRequest,\n ChargeResponse,\n IsEligibleRequest,\n IsEligibleResponse,\n EstimateChargeRequest,\n EstimateChargeResponse,\n GetCostInCreditsRequest,\n GetCostInCreditsResponse,\n GetCreditBalanceRequest,\n GetCreditBalanceResponse,\n Subscription,\n TopUp,\n GetAccountCreditBalanceRequest,\n GetAccountCreditBalanceResponse,\n Periodic,\n CreditBalance,\n UsageRule,\n GetBalanceRequest,\n GetBalanceResponse,\n FeatureEvent,\n FeatureEventEventOneOf,\n FeatureEnabled,\n FeatureEnabledReasonOneOf,\n Feature,\n FeatureQuantityInfoOneOf,\n FeatureContext,\n BooleanFeature,\n QuotaFeature,\n QuotaInfo,\n QuotaInfoEntry,\n TransferredFromAnotherAccountReason,\n ReassignedFromSiteReason,\n AssignedFromFloatingReason,\n NewFeatureReason,\n ContractSwitchedReason,\n ManualFeatureCreationReason,\n MigratedFromLegacyReason,\n ManualSyncReason,\n FeatureDisabled,\n FeatureDisabledReasonOneOf,\n UnAssingedToFloatingReason,\n ReplacedByAnotherSubscriptionReason,\n ReassignedToAnotherSiteReason,\n FeatureUpdated,\n FeatureUpdatedPreviousQuantityInfoOneOf,\n FeatureUpdatedReasonOneOf,\n FeatureCancelled,\n FeatureCancelledReasonOneOf,\n TransferredToAnotherAccountReason,\n CancelRequestedReason,\n QuotaExhaustedReason,\n FeatureQuotaUsageChanged,\n Empty,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n} from './appmarket-credittransactions-v1-credit-transaction-ai-credits.universal.js';\nexport {\n SortOrderWithLiterals,\n FeaturePeriodEnumFeaturePeriodWithLiterals,\n FeaturePeriodWithLiterals,\n ContractSwitchClassificationWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './appmarket-credittransactions-v1-credit-transaction-ai-credits.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,oEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAWd,SAAS,WAAW,SAA6C;AACtE,WAAS,aAAa,EAAE,KAAK,GAAQ;AACnC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,oEAAoE;AAAA,QACvE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,MACN,mBAAmB,CAACC,iBAClB,uCAAeA,UAAS;AAAA,QACtB;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,8CAA8C,CAAC;AAAA,QACjE;AAAA,MACF,CAAC;AAAA,IACL;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADmIO,IAAK,YAAL,kBAAKC,eAAL;AACL,EAAAA,WAAA,SAAM;AACN,EAAAA,WAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;AAmKL,IAAK,iCAAL,kBAAKC,oCAAL;AACL,EAAAA,gCAAA,eAAY;AACZ,EAAAA,gCAAA,iBAAc;AACd,EAAAA,gCAAA,YAAS;AACT,EAAAA,gCAAA,YAAS;AACT,EAAAA,gCAAA,UAAO;AACP,EAAAA,gCAAA,SAAM;AACN,EAAAA,gCAAA,UAAO;AACP,EAAAA,gCAAA,WAAQ;AACR,EAAAA,gCAAA,UAAO;AATG,SAAAA;AAAA,GAAA;AAsZL,IAAK,gBAAL,kBAAKC,mBAAL;AACL,EAAAA,eAAA,eAAY;AACZ,EAAAA,eAAA,iBAAc;AACd,EAAAA,eAAA,YAAS;AACT,EAAAA,eAAA,YAAS;AACT,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,SAAM;AACN,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,WAAQ;AACR,EAAAA,eAAA,UAAO;AATG,SAAAA;AAAA,GAAA;AAmJL,IAAK,+BAAL,kBAAKC,kCAAL;AAEL,EAAAA,8BAAA,aAAU;AAEV,EAAAA,8BAAA,aAAU;AAEV,EAAAA,8BAAA,eAAY;AAEZ,EAAAA,8BAAA,oBAAiB;AARP,SAAAA;AAAA,GAAA;AAoUL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,uBAAoB;AACpB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,SAAM;AALI,SAAAA;AAAA,GAAA;AAiDZ,eAAsBC,cAUpB;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,CAAC,CAAC;AAExD,QAAM,UACwD;AAAA,IAC1D;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE90CO,SAASC,YAAW,YAA6C;AACtE,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;;;ACbA,IAAAC,uBAAiC;AAG1B,IAAMC,cAEK,2DAAiBA,WAAgB;","names":["getBalance","payload","SortOrder","FeaturePeriodEnumFeaturePeriod","FeaturePeriod","ContractSwitchClassification","WebhookIdentityType","getBalance","sdkTransformError","getBalance","import_rest_modules","getBalance"]}