@wix/app-management 1.0.11 → 1.0.13
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/context/package.json +2 -1
- package/meta/package.json +2 -1
- package/package.json +15 -9
- package/type-bundles/context.bundle.d.ts +865 -0
- package/type-bundles/index.bundle.d.ts +1202 -0
- package/type-bundles/meta.bundle.d.ts +1453 -0
|
@@ -0,0 +1,865 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An `appPlans` object describes how you charge users for using your app.
|
|
3
|
+
* You can set up multiple plans for a single app, with different plans giving access to
|
|
4
|
+
* different tiers of functionality. For example, you can offer a free plan and
|
|
5
|
+
* 3 paid plans with an increasing number of benefits. Learn more about
|
|
6
|
+
* [setting up your app pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/set-up-your-app-pricing).
|
|
7
|
+
*/
|
|
8
|
+
interface AppPlans {
|
|
9
|
+
/** App ID, as defined in the [Wix Dev Center](https://dev.wix.com/). */
|
|
10
|
+
_id?: string;
|
|
11
|
+
/**
|
|
12
|
+
* List of the app's pricing plans.
|
|
13
|
+
*
|
|
14
|
+
* Min: `0` plans
|
|
15
|
+
* Max: `50` plans
|
|
16
|
+
*/
|
|
17
|
+
plans?: Plan[];
|
|
18
|
+
}
|
|
19
|
+
interface Cycle {
|
|
20
|
+
/**
|
|
21
|
+
* Type of the billing cycle.
|
|
22
|
+
*
|
|
23
|
+
* + `"UNKNOWN_UNIT"`: There is no information about the billing cycle.
|
|
24
|
+
* + `"ONE_TIME"`: The customer pays for unlimited usage of the app with a single payment.
|
|
25
|
+
* + `"RECURRING"`: The customer pays for a subscription to the app on a recurring schedule.
|
|
26
|
+
*/
|
|
27
|
+
cycleType?: CycleType;
|
|
28
|
+
/** Duration of the billing cycle. Available only for `{"cycleType": "RECURRING"}`. */
|
|
29
|
+
cycleDuration?: Duration;
|
|
30
|
+
}
|
|
31
|
+
declare enum DurationUnit {
|
|
32
|
+
/** unknown interval unit */
|
|
33
|
+
UNKNOWN_UNIT = "UNKNOWN_UNIT",
|
|
34
|
+
/** month */
|
|
35
|
+
MONTH = "MONTH",
|
|
36
|
+
/** year */
|
|
37
|
+
YEAR = "YEAR"
|
|
38
|
+
}
|
|
39
|
+
declare enum CycleType {
|
|
40
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
41
|
+
ONE_TIME = "ONE_TIME",
|
|
42
|
+
RECURRING = "RECURRING"
|
|
43
|
+
}
|
|
44
|
+
interface Duration {
|
|
45
|
+
/** Unit of the billing cycle. */
|
|
46
|
+
unit?: DurationUnit;
|
|
47
|
+
/** Count of units that make up the billing cycle. */
|
|
48
|
+
count?: number;
|
|
49
|
+
}
|
|
50
|
+
interface UsageBasedDetails {
|
|
51
|
+
/**
|
|
52
|
+
* Smallest possible amount that your app charges customers in usage-based
|
|
53
|
+
* pricing. For example, the price of a single SMS message if your
|
|
54
|
+
* app charges customers for sending text messages. Always in
|
|
55
|
+
* [USD](https://en.wikipedia.org/wiki/United_States_dollar).
|
|
56
|
+
*
|
|
57
|
+
* Min: `0.00`
|
|
58
|
+
* Max: 1024 characters
|
|
59
|
+
*/
|
|
60
|
+
minimumChargeIncrement?: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* Recurring, monthly base fee in usaged-based pricing that your app
|
|
63
|
+
* charges customers regardless of how much they use your app.
|
|
64
|
+
*
|
|
65
|
+
* Min: `0.00`
|
|
66
|
+
* Max: 1024 characters
|
|
67
|
+
*/
|
|
68
|
+
monthlyBaseFee?: string | null;
|
|
69
|
+
/**
|
|
70
|
+
* Description of the usaged-based pricing plan, as defined in the
|
|
71
|
+
* [Dev Center](https://dev.wix.com/).
|
|
72
|
+
*
|
|
73
|
+
* Max: 1024 characters
|
|
74
|
+
*/
|
|
75
|
+
customChargeDescription?: string | null;
|
|
76
|
+
}
|
|
77
|
+
interface Price {
|
|
78
|
+
/**
|
|
79
|
+
* Price without taxes. For yearly plans, Wix calculates and returns the
|
|
80
|
+
* average price per month. You can get thefull price by multiplying the
|
|
81
|
+
* returned price with 12.
|
|
82
|
+
*
|
|
83
|
+
* Min: `0.00`
|
|
84
|
+
* Max: 1024 characters
|
|
85
|
+
*/
|
|
86
|
+
priceBeforeTax?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Total price including taxes.
|
|
89
|
+
*
|
|
90
|
+
* Min: `0.00`
|
|
91
|
+
* Max: 1024 characters
|
|
92
|
+
*/
|
|
93
|
+
totalPrice?: string;
|
|
94
|
+
/** Information about the plan's recurring billing cycle or single payment. */
|
|
95
|
+
billingCycle?: Cycle;
|
|
96
|
+
/**
|
|
97
|
+
* Details about the plan's usage-based pricing.
|
|
98
|
+
* Available only for plans with
|
|
99
|
+
* [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).
|
|
100
|
+
*/
|
|
101
|
+
usageBaseOptions?: UsageBasedDetails;
|
|
102
|
+
}
|
|
103
|
+
interface Plan {
|
|
104
|
+
/**
|
|
105
|
+
* ID of the app plan.
|
|
106
|
+
* @readonly
|
|
107
|
+
*/
|
|
108
|
+
_id?: string;
|
|
109
|
+
/**
|
|
110
|
+
* ID of your app's pricing plan, as displayed in the [Dev Center](https://dev.wix.com/).
|
|
111
|
+
* Identical to `vendorProductId` in the
|
|
112
|
+
* [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
|
|
113
|
+
*/
|
|
114
|
+
vendorId?: string;
|
|
115
|
+
/** Name of your app's pricing plan, as defined by you in the [Dev Center](https://dev.wix.com/). */
|
|
116
|
+
name?: string;
|
|
117
|
+
/**
|
|
118
|
+
* List of your plan's benefits, as defined by you in the [Dev Center](https://dev.wix.com/).
|
|
119
|
+
* Currently, the benefits are available only in English.
|
|
120
|
+
*
|
|
121
|
+
* Min: `0` benefits
|
|
122
|
+
* Max: `4` benefits
|
|
123
|
+
* Max per benefit: 1024 characters
|
|
124
|
+
*/
|
|
125
|
+
benefits?: string[];
|
|
126
|
+
/**
|
|
127
|
+
* List of the plan's prices. Available only when the plan's prices are managed
|
|
128
|
+
* by Wix and not externally.
|
|
129
|
+
*
|
|
130
|
+
* Min: `0` prices
|
|
131
|
+
* Max: `10` prices
|
|
132
|
+
*/
|
|
133
|
+
prices?: Price[];
|
|
134
|
+
}
|
|
135
|
+
interface ListAppPlansByAppIdResponse {
|
|
136
|
+
/**
|
|
137
|
+
* Tax settings. Wix calculates the tax settings based on the country code that
|
|
138
|
+
* you pass in the call's header. If you don't pass a country code in the header,
|
|
139
|
+
* Wix calculates the tax settings based on the caller's IP address. Note that the
|
|
140
|
+
* tax settings may not resolve properly if you call through a VPN.
|
|
141
|
+
*/
|
|
142
|
+
taxSettings?: TaxSettings;
|
|
143
|
+
/**
|
|
144
|
+
* 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
145
|
+
* format. Wix calculates the currency based on the country code that
|
|
146
|
+
* you pass in the call's header. If you don't pass a country code in the header,
|
|
147
|
+
* Wix calculates the currency based on the caller's IP address. Note that the
|
|
148
|
+
* currency may not resolve properly if you call through a VPN.
|
|
149
|
+
*/
|
|
150
|
+
currency?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Currency symbol in decimal HTML entity format. For example, `$` for $
|
|
153
|
+
* (United States Dollar). Wix calculates the currency symbol based on the
|
|
154
|
+
* country code that you pass in the call's header. If you don't pass a country
|
|
155
|
+
* code in the header, Wix calculates the tax settings based on the caller's IP
|
|
156
|
+
* address. Note that the currency symbol may not resolve properly if you call
|
|
157
|
+
* through a VPN.
|
|
158
|
+
*/
|
|
159
|
+
currencySymbol?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Retrieved app plans.
|
|
162
|
+
*
|
|
163
|
+
* Min: 0 plans
|
|
164
|
+
* Max: 50 plans
|
|
165
|
+
*/
|
|
166
|
+
appPlans?: AppPlans[];
|
|
167
|
+
}
|
|
168
|
+
interface TaxSettings {
|
|
169
|
+
/**
|
|
170
|
+
* Whether you must display the total price including taxes in the given
|
|
171
|
+
* country.
|
|
172
|
+
*/
|
|
173
|
+
showPriceWithTax?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Tax rate for the given country as percentage. Returned as `0` when
|
|
176
|
+
* `{"showPriceWithTax": false}`.
|
|
177
|
+
*/
|
|
178
|
+
percentage?: string | null;
|
|
179
|
+
/**
|
|
180
|
+
* Type of tax required in the given country.
|
|
181
|
+
*
|
|
182
|
+
* + `"NOT_APPLICABLE"`: The country doesn't require that you display the total price including taxes, or Wix failed to calculate the country based on the call's IP address.
|
|
183
|
+
* + `"VAT"`: The given country requires that you display the total price including [value-added tax (VAT)](https://en.wikipedia.org/wiki/Value-added_tax).
|
|
184
|
+
* + `"GST"`: The given country requires that you display the total price including [generation-skipping transfer tax (GST)](https://en.wikipedia.org/wiki/Generation-skipping_transfer_tax).
|
|
185
|
+
*/
|
|
186
|
+
taxType?: TaxType;
|
|
187
|
+
}
|
|
188
|
+
declare enum TaxType {
|
|
189
|
+
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
190
|
+
VAT = "VAT",
|
|
191
|
+
GST = "GST"
|
|
192
|
+
}
|
|
193
|
+
interface ListAppPlansByAppIdResponseNonNullableFields {
|
|
194
|
+
taxSettings?: {
|
|
195
|
+
showPriceWithTax: boolean;
|
|
196
|
+
taxType: TaxType;
|
|
197
|
+
};
|
|
198
|
+
currency: string;
|
|
199
|
+
currencySymbol: string;
|
|
200
|
+
appPlans: {
|
|
201
|
+
_id: string;
|
|
202
|
+
plans: {
|
|
203
|
+
_id: string;
|
|
204
|
+
vendorId: string;
|
|
205
|
+
name: string;
|
|
206
|
+
benefits: string[];
|
|
207
|
+
prices: {
|
|
208
|
+
priceBeforeTax: string;
|
|
209
|
+
totalPrice: string;
|
|
210
|
+
billingCycle?: {
|
|
211
|
+
cycleType: CycleType;
|
|
212
|
+
cycleDuration?: {
|
|
213
|
+
unit: DurationUnit;
|
|
214
|
+
count: number;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
}[];
|
|
218
|
+
}[];
|
|
219
|
+
}[];
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
223
|
+
interface HttpClient {
|
|
224
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
225
|
+
}
|
|
226
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
227
|
+
type HttpResponse<T = any> = {
|
|
228
|
+
data: T;
|
|
229
|
+
status: number;
|
|
230
|
+
statusText: string;
|
|
231
|
+
headers: any;
|
|
232
|
+
request?: any;
|
|
233
|
+
};
|
|
234
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
235
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
236
|
+
url: string;
|
|
237
|
+
data?: Data;
|
|
238
|
+
params?: URLSearchParams;
|
|
239
|
+
} & APIMetadata;
|
|
240
|
+
type APIMetadata = {
|
|
241
|
+
methodFqn?: string;
|
|
242
|
+
entityFqdn?: string;
|
|
243
|
+
packageName?: string;
|
|
244
|
+
};
|
|
245
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
246
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
247
|
+
__type: 'event-definition';
|
|
248
|
+
type: Type;
|
|
249
|
+
isDomainEvent?: boolean;
|
|
250
|
+
transformations?: unknown;
|
|
251
|
+
__payload: Payload;
|
|
252
|
+
};
|
|
253
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
254
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
255
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
256
|
+
|
|
257
|
+
declare function listAppPlansByAppId$1(httpClient: HttpClient): (appIds: string[]) => Promise<ListAppPlansByAppIdResponse & ListAppPlansByAppIdResponseNonNullableFields>;
|
|
258
|
+
|
|
259
|
+
declare const listAppPlansByAppId: BuildRESTFunction<typeof listAppPlansByAppId$1>;
|
|
260
|
+
|
|
261
|
+
declare const context$4_listAppPlansByAppId: typeof listAppPlansByAppId;
|
|
262
|
+
declare namespace context$4 {
|
|
263
|
+
export { context$4_listAppPlansByAppId as listAppPlansByAppId };
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* An app instance is a specific occurrence of your app on a particular Wix site.
|
|
268
|
+
* When a site owner installs your app, a unique instance is generated for that
|
|
269
|
+
* specific site. Use the `instanceId` to keep track of the individual data
|
|
270
|
+
* associated with each app instance.
|
|
271
|
+
*/
|
|
272
|
+
interface AppInstance {
|
|
273
|
+
/**
|
|
274
|
+
* ID of the app instance. You can use it to keep track of the individual
|
|
275
|
+
* data that's associated with the specific occurence of your app that's
|
|
276
|
+
* installed on a Wix site.
|
|
277
|
+
*/
|
|
278
|
+
instanceId?: string;
|
|
279
|
+
/**
|
|
280
|
+
* App name, as set by you in the Wix Developers Center during the app creation
|
|
281
|
+
* process.
|
|
282
|
+
*/
|
|
283
|
+
appName?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Version of your app that's installed on the Wix site, as set by you in the
|
|
286
|
+
* Wix Developers Center during the app creation process.
|
|
287
|
+
*/
|
|
288
|
+
appVersion?: string | null;
|
|
289
|
+
/**
|
|
290
|
+
* Whether the site owners have installed a free or paid version of your app
|
|
291
|
+
* on their site.
|
|
292
|
+
*/
|
|
293
|
+
isFree?: boolean;
|
|
294
|
+
/**
|
|
295
|
+
* Billing information for the app instance. Available only in case
|
|
296
|
+
* `{"isFree": false}`.
|
|
297
|
+
*/
|
|
298
|
+
billing?: BillingInfo;
|
|
299
|
+
/**
|
|
300
|
+
* List of [permissions](https://dev.wix.com/docs/build-apps/developer-tools/developers-center/example-app-walkthrough/build-an-app#4-add-permissions)
|
|
301
|
+
* that the site owners have granted your app. You set the list of permissions that
|
|
302
|
+
* your app requires from the site owners in the Wix Developers Center during the
|
|
303
|
+
* app creation process.
|
|
304
|
+
*/
|
|
305
|
+
permissions?: string[];
|
|
306
|
+
/** Plans available to this app instance. */
|
|
307
|
+
availablePlans?: AvailablePlan[];
|
|
308
|
+
/**
|
|
309
|
+
* ID of the Wix site from which the instance of your app has been cloned.
|
|
310
|
+
* Available only in case `{"copiedFromTemplate": true}`.
|
|
311
|
+
* All visual settings of the Wix site and app data are duplicated during the
|
|
312
|
+
* cloning process. Wix also notifies you in case there is any additional
|
|
313
|
+
* external functionality for the original site.
|
|
314
|
+
*/
|
|
315
|
+
originInstanceId?: string | null;
|
|
316
|
+
/**
|
|
317
|
+
* __Deprecated__. This parameter will be removed on March 30, 2023. Use
|
|
318
|
+
* `copiedFromTemplate` instead.
|
|
319
|
+
* @deprecated
|
|
320
|
+
*/
|
|
321
|
+
isOriginSiteTemplate?: boolean;
|
|
322
|
+
/** Whether the app instance was created when another Wix site was cloned. */
|
|
323
|
+
copiedFromTemplate?: boolean;
|
|
324
|
+
/** Whether the app instance includes a free trial that hasn't started yet. */
|
|
325
|
+
freeTrialAvailable?: boolean;
|
|
326
|
+
}
|
|
327
|
+
interface BillingInfo {
|
|
328
|
+
/** Name of the package that the site owner has paid for. */
|
|
329
|
+
packageName?: string;
|
|
330
|
+
/**
|
|
331
|
+
* Interval of the billing cycle. `"ONE_TIME"` means that site owners have
|
|
332
|
+
* purchased unlimited access to the app with a single, upfront payment.
|
|
333
|
+
*/
|
|
334
|
+
billingCycle?: PaymentCycle$1;
|
|
335
|
+
/**
|
|
336
|
+
* Date and time the site owners have purchased the app's paid plan in
|
|
337
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
338
|
+
*/
|
|
339
|
+
timeStamp?: string;
|
|
340
|
+
/**
|
|
341
|
+
* Date and time the app's current billing cycle ends in
|
|
342
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format. Available only for yearly and
|
|
343
|
+
* multi-yearly plans.
|
|
344
|
+
*/
|
|
345
|
+
expirationDate?: string | null;
|
|
346
|
+
/**
|
|
347
|
+
* Whether the app's subscription automatically renews at the end of the
|
|
348
|
+
* current billing cycle.
|
|
349
|
+
*/
|
|
350
|
+
autoRenewing?: boolean | null;
|
|
351
|
+
/** ID of the invoice for the current billing cycle. */
|
|
352
|
+
invoiceId?: string | null;
|
|
353
|
+
/**
|
|
354
|
+
* Information about any discounts applied to the app instance's current billing cycle.
|
|
355
|
+
* If the site owners applied a developer coupon or Wix Voucher
|
|
356
|
+
* when installing the paid version of your app, this field holds the coupon's
|
|
357
|
+
* name or `“Wix discount coupon”`. Site owners may receive a Wix Voucher when
|
|
358
|
+
* upgrading their Wix subscription. If there is no discount for the
|
|
359
|
+
* current billing cycle, the field is an empty string.
|
|
360
|
+
*/
|
|
361
|
+
source?: string | null;
|
|
362
|
+
/** Information about the free trial applied, if relevant. */
|
|
363
|
+
freeTrialInfo?: FreeTrialInfo;
|
|
364
|
+
}
|
|
365
|
+
declare enum PaymentCycle$1 {
|
|
366
|
+
NO_CYCLE = "NO_CYCLE",
|
|
367
|
+
MONTHLY = "MONTHLY",
|
|
368
|
+
YEARLY = "YEARLY",
|
|
369
|
+
ONE_TIME = "ONE_TIME",
|
|
370
|
+
TWO_YEARS = "TWO_YEARS",
|
|
371
|
+
THREE_YEARS = "THREE_YEARS",
|
|
372
|
+
FOUR_YEARS = "FOUR_YEARS",
|
|
373
|
+
FIVE_YEARS = "FIVE_YEARS"
|
|
374
|
+
}
|
|
375
|
+
interface FreeTrialInfo {
|
|
376
|
+
/**
|
|
377
|
+
* Current free trial status.
|
|
378
|
+
*
|
|
379
|
+
* Supported values:
|
|
380
|
+
*
|
|
381
|
+
* - `IN_PROGRESS`: The free trial is currently in progress.
|
|
382
|
+
* - `ENDED`: The free trial has ended.
|
|
383
|
+
* - `NOT_AVAILABLE`: No free trial was applied, as none was available.
|
|
384
|
+
* @readonly
|
|
385
|
+
*/
|
|
386
|
+
status?: FreeTrialStatus;
|
|
387
|
+
/**
|
|
388
|
+
* When the free trial has ended. Populated only once the free trial is over.
|
|
389
|
+
* @readonly
|
|
390
|
+
*/
|
|
391
|
+
endDate?: Date;
|
|
392
|
+
}
|
|
393
|
+
declare enum FreeTrialStatus {
|
|
394
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
395
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
396
|
+
ENDED = "ENDED",
|
|
397
|
+
NOT_AVAILABLE = "NOT_AVAILABLE"
|
|
398
|
+
}
|
|
399
|
+
interface AvailablePlan {
|
|
400
|
+
/** Package name of the available plan. */
|
|
401
|
+
packageName?: string;
|
|
402
|
+
/** Source of the available plan. Can be a bundle or 3rd-party app. */
|
|
403
|
+
source?: string;
|
|
404
|
+
}
|
|
405
|
+
interface AppInstalled {
|
|
406
|
+
/** Unique identifier of the app within the website. */
|
|
407
|
+
appId?: string;
|
|
408
|
+
/** Instance ID of the app in the original website (relevant only when this site was [duplicated from another site](https://support.wix.com/en/article/duplicating-your-site-1472847)). */
|
|
409
|
+
originInstanceId?: string | null;
|
|
410
|
+
}
|
|
411
|
+
interface AppRemoved {
|
|
412
|
+
/** Unique identifier of the app within the website. */
|
|
413
|
+
appId?: string;
|
|
414
|
+
}
|
|
415
|
+
interface PaidPlanPurchased {
|
|
416
|
+
/** Date and time of purchase. */
|
|
417
|
+
operationTimeStamp?: Date;
|
|
418
|
+
/** Purchased app plan. */
|
|
419
|
+
vendorProductId?: string;
|
|
420
|
+
/** Selected payment cycle. */
|
|
421
|
+
cycle?: PaymentCycle$1;
|
|
422
|
+
/** Plan expiration date. */
|
|
423
|
+
expiresOn?: Date;
|
|
424
|
+
/** Coupon applied to purchase (if relevant). */
|
|
425
|
+
couponName?: string | null;
|
|
426
|
+
/** Invoice ID. */
|
|
427
|
+
invoiceId?: string | null;
|
|
428
|
+
}
|
|
429
|
+
interface PaidPlanChanged {
|
|
430
|
+
/** Date and time of change. */
|
|
431
|
+
operationTimeStamp?: Date;
|
|
432
|
+
/** Newly purchased app plan. */
|
|
433
|
+
vendorProductId?: string;
|
|
434
|
+
/** Newly selected payment cycle. */
|
|
435
|
+
cycle?: PaymentCycle$1;
|
|
436
|
+
/** Previous app plan. */
|
|
437
|
+
previousVendorProductId?: string | null;
|
|
438
|
+
/** Previous payment cycle. */
|
|
439
|
+
previousCycle?: PaymentCycle$1;
|
|
440
|
+
/** Coupon applied to purchase (if relevant). */
|
|
441
|
+
couponName?: string | null;
|
|
442
|
+
/** Invoice ID. */
|
|
443
|
+
invoiceId?: string | null;
|
|
444
|
+
}
|
|
445
|
+
interface PaidPlanAutoRenewalCancelled {
|
|
446
|
+
/** Date and time of auto-renewal cancellation. */
|
|
447
|
+
operationTimeStamp?: Date;
|
|
448
|
+
/** Current app plan. */
|
|
449
|
+
vendorProductId?: string;
|
|
450
|
+
/** Current payment cycle. */
|
|
451
|
+
cycle?: PaymentCycle$1;
|
|
452
|
+
/** Supported values: `UNKNOWN_CANCELLATION_TYPE_ERROR_STATE`, `USER_CANCEL`, `FAILED_PAYMENT`, `TRANSFER_CANCELLATION_REASON`. Reason provided by app for cancellation (if relevant). */
|
|
453
|
+
cancelReason?: string | null;
|
|
454
|
+
/** Reason provided by site owner for cancellation (if relevant). */
|
|
455
|
+
userReason?: string | null;
|
|
456
|
+
/** Cancellation type. */
|
|
457
|
+
subscriptionCancellationType?: string | null;
|
|
458
|
+
}
|
|
459
|
+
interface GetAppInstanceResponse {
|
|
460
|
+
/** Retrieved app instance. */
|
|
461
|
+
instance?: AppInstance;
|
|
462
|
+
/** Information about the corresponding Wix site. */
|
|
463
|
+
site?: SiteInfo;
|
|
464
|
+
}
|
|
465
|
+
interface SiteInfo {
|
|
466
|
+
/** Display name of the site. */
|
|
467
|
+
siteDisplayName?: string | null;
|
|
468
|
+
/**
|
|
469
|
+
* 2-letter language code of the site's locale in
|
|
470
|
+
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
471
|
+
*/
|
|
472
|
+
locale?: string;
|
|
473
|
+
/**
|
|
474
|
+
* 3-letter currency code for the site's billing in
|
|
475
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
476
|
+
*/
|
|
477
|
+
paymentCurrency?: string;
|
|
478
|
+
/** Information about the site's supported languages. */
|
|
479
|
+
multilingual?: Multilingual;
|
|
480
|
+
/** URL of the site. Available only in case the site has been published. */
|
|
481
|
+
url?: string | null;
|
|
482
|
+
/** Description of the site. */
|
|
483
|
+
description?: string | null;
|
|
484
|
+
/** Wix apps that are installed on the site. */
|
|
485
|
+
installedWixApps?: string[];
|
|
486
|
+
/**
|
|
487
|
+
* > **Deprecation Notice:** This parameter will be removed on June 30, 2022. Use `ownerInfo` instead.
|
|
488
|
+
* @deprecated
|
|
489
|
+
*/
|
|
490
|
+
ownerEmail?: string | null;
|
|
491
|
+
/**
|
|
492
|
+
* Information about the site owner. Available only when calling
|
|
493
|
+
* _Get App Instance_ with the __Read Site Owner Email__ permission scope.
|
|
494
|
+
*/
|
|
495
|
+
ownerInfo?: OwnerInfo;
|
|
496
|
+
/** Site ID. */
|
|
497
|
+
siteId?: string;
|
|
498
|
+
}
|
|
499
|
+
interface Multilingual {
|
|
500
|
+
/** Whether the site supports more than a single language. */
|
|
501
|
+
isMultiLingual?: boolean;
|
|
502
|
+
/** List of supported languages. Returned only when `{"isMultiLingual": true}`. */
|
|
503
|
+
supportedLanguages?: SupportedLanguage[];
|
|
504
|
+
}
|
|
505
|
+
interface SupportedLanguage {
|
|
506
|
+
/** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
|
|
507
|
+
languageCode?: string;
|
|
508
|
+
/** Locale. */
|
|
509
|
+
locale?: Locale;
|
|
510
|
+
/** Whether the supported language is the primary language for the site. */
|
|
511
|
+
isPrimary?: boolean;
|
|
512
|
+
/** Language icon. */
|
|
513
|
+
countryCode?: string;
|
|
514
|
+
/** How the language will be resolved. For internal use. */
|
|
515
|
+
resolutionMethod?: ResolutionMethod;
|
|
516
|
+
}
|
|
517
|
+
interface Locale {
|
|
518
|
+
/** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
|
|
519
|
+
languageCode?: string;
|
|
520
|
+
/** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */
|
|
521
|
+
country?: string;
|
|
522
|
+
}
|
|
523
|
+
declare enum ResolutionMethod {
|
|
524
|
+
QUERY_PARAM = "QUERY_PARAM",
|
|
525
|
+
SUBDOMAIN = "SUBDOMAIN",
|
|
526
|
+
SUBDIRECTORY = "SUBDIRECTORY"
|
|
527
|
+
}
|
|
528
|
+
interface OwnerInfo {
|
|
529
|
+
/** Site owner's email address. Identical to the site owner's login email. */
|
|
530
|
+
email?: string;
|
|
531
|
+
/**
|
|
532
|
+
* Supported values: `VERIFIED_OPT_IN`, `VERIFIED_OPT_OUT`,
|
|
533
|
+
* `NOT_VERIFIED_OPT_IN`, `NOT_VERIFIED_OPT_OUT`.
|
|
534
|
+
*
|
|
535
|
+
* Whether the site owner has verified their email and whether they have chosen
|
|
536
|
+
* to receive email notifications from Wix.
|
|
537
|
+
*/
|
|
538
|
+
emailStatus?: string;
|
|
539
|
+
}
|
|
540
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
541
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
542
|
+
anonymousVisitorId?: string;
|
|
543
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
544
|
+
memberId?: string;
|
|
545
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
546
|
+
wixUserId?: string;
|
|
547
|
+
/** ID of an app. */
|
|
548
|
+
appId?: string;
|
|
549
|
+
/** @readonly */
|
|
550
|
+
identityType?: WebhookIdentityType;
|
|
551
|
+
}
|
|
552
|
+
/** @oneof */
|
|
553
|
+
interface IdentificationDataIdOneOf {
|
|
554
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
555
|
+
anonymousVisitorId?: string;
|
|
556
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
557
|
+
memberId?: string;
|
|
558
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
559
|
+
wixUserId?: string;
|
|
560
|
+
/** ID of an app. */
|
|
561
|
+
appId?: string;
|
|
562
|
+
}
|
|
563
|
+
declare enum WebhookIdentityType {
|
|
564
|
+
UNKNOWN = "UNKNOWN",
|
|
565
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
566
|
+
MEMBER = "MEMBER",
|
|
567
|
+
WIX_USER = "WIX_USER",
|
|
568
|
+
APP = "APP"
|
|
569
|
+
}
|
|
570
|
+
interface GetAppInstanceResponseNonNullableFields {
|
|
571
|
+
instance?: {
|
|
572
|
+
instanceId: string;
|
|
573
|
+
appName: string;
|
|
574
|
+
isFree: boolean;
|
|
575
|
+
billing?: {
|
|
576
|
+
packageName: string;
|
|
577
|
+
billingCycle: PaymentCycle$1;
|
|
578
|
+
timeStamp: string;
|
|
579
|
+
freeTrialInfo?: {
|
|
580
|
+
status: FreeTrialStatus;
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
permissions: string[];
|
|
584
|
+
availablePlans: {
|
|
585
|
+
packageName: string;
|
|
586
|
+
source: string;
|
|
587
|
+
}[];
|
|
588
|
+
isOriginSiteTemplate: boolean;
|
|
589
|
+
copiedFromTemplate: boolean;
|
|
590
|
+
freeTrialAvailable: boolean;
|
|
591
|
+
};
|
|
592
|
+
site?: {
|
|
593
|
+
locale: string;
|
|
594
|
+
paymentCurrency: string;
|
|
595
|
+
multilingual?: {
|
|
596
|
+
isMultiLingual: boolean;
|
|
597
|
+
supportedLanguages: {
|
|
598
|
+
languageCode: string;
|
|
599
|
+
locale?: {
|
|
600
|
+
languageCode: string;
|
|
601
|
+
country: string;
|
|
602
|
+
};
|
|
603
|
+
isPrimary: boolean;
|
|
604
|
+
countryCode: string;
|
|
605
|
+
resolutionMethod: ResolutionMethod;
|
|
606
|
+
}[];
|
|
607
|
+
};
|
|
608
|
+
installedWixApps: string[];
|
|
609
|
+
ownerInfo?: {
|
|
610
|
+
email: string;
|
|
611
|
+
emailStatus: string;
|
|
612
|
+
};
|
|
613
|
+
siteId: string;
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
interface BaseEventMetadata {
|
|
617
|
+
/** App instance ID. */
|
|
618
|
+
instanceId?: string | null;
|
|
619
|
+
/** Event type. */
|
|
620
|
+
eventType?: string;
|
|
621
|
+
/** The identification type and identity data. */
|
|
622
|
+
identity?: IdentificationData;
|
|
623
|
+
}
|
|
624
|
+
interface AppInstanceInstalledEnvelope {
|
|
625
|
+
data: AppInstalled;
|
|
626
|
+
metadata: BaseEventMetadata;
|
|
627
|
+
}
|
|
628
|
+
interface AppInstanceRemovedEnvelope {
|
|
629
|
+
data: AppRemoved;
|
|
630
|
+
metadata: BaseEventMetadata;
|
|
631
|
+
}
|
|
632
|
+
interface AppInstancePaidPlanPurchasedEnvelope {
|
|
633
|
+
data: PaidPlanPurchased;
|
|
634
|
+
metadata: BaseEventMetadata;
|
|
635
|
+
}
|
|
636
|
+
interface AppInstancePaidPlanChangedEnvelope {
|
|
637
|
+
data: PaidPlanChanged;
|
|
638
|
+
metadata: BaseEventMetadata;
|
|
639
|
+
}
|
|
640
|
+
interface AppInstancePaidPlanAutoRenewalCancelledEnvelope {
|
|
641
|
+
data: PaidPlanAutoRenewalCancelled;
|
|
642
|
+
metadata: BaseEventMetadata;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
declare function getAppInstance$1(httpClient: HttpClient): () => Promise<GetAppInstanceResponse & GetAppInstanceResponseNonNullableFields>;
|
|
646
|
+
declare const onAppInstanceInstalled$1: EventDefinition<AppInstanceInstalledEnvelope, "AppInstalled">;
|
|
647
|
+
declare const onAppInstanceRemoved$1: EventDefinition<AppInstanceRemovedEnvelope, "AppRemoved">;
|
|
648
|
+
declare const onAppInstancePaidPlanPurchased$1: EventDefinition<AppInstancePaidPlanPurchasedEnvelope, "PaidPlanPurchased">;
|
|
649
|
+
declare const onAppInstancePaidPlanChanged$1: EventDefinition<AppInstancePaidPlanChangedEnvelope, "PaidPlanChanged">;
|
|
650
|
+
declare const onAppInstancePaidPlanAutoRenewalCancelled$1: EventDefinition<AppInstancePaidPlanAutoRenewalCancelledEnvelope, "PaidPlanAutoRenewalCancelled">;
|
|
651
|
+
|
|
652
|
+
declare const getAppInstance: BuildRESTFunction<typeof getAppInstance$1>;
|
|
653
|
+
declare const onAppInstanceInstalled: BuildEventDefinition<typeof onAppInstanceInstalled$1>;
|
|
654
|
+
declare const onAppInstanceRemoved: BuildEventDefinition<typeof onAppInstanceRemoved$1>;
|
|
655
|
+
declare const onAppInstancePaidPlanPurchased: BuildEventDefinition<typeof onAppInstancePaidPlanPurchased$1>;
|
|
656
|
+
declare const onAppInstancePaidPlanChanged: BuildEventDefinition<typeof onAppInstancePaidPlanChanged$1>;
|
|
657
|
+
declare const onAppInstancePaidPlanAutoRenewalCancelled: BuildEventDefinition<typeof onAppInstancePaidPlanAutoRenewalCancelled$1>;
|
|
658
|
+
|
|
659
|
+
declare const context$3_getAppInstance: typeof getAppInstance;
|
|
660
|
+
declare const context$3_onAppInstanceInstalled: typeof onAppInstanceInstalled;
|
|
661
|
+
declare const context$3_onAppInstancePaidPlanAutoRenewalCancelled: typeof onAppInstancePaidPlanAutoRenewalCancelled;
|
|
662
|
+
declare const context$3_onAppInstancePaidPlanChanged: typeof onAppInstancePaidPlanChanged;
|
|
663
|
+
declare const context$3_onAppInstancePaidPlanPurchased: typeof onAppInstancePaidPlanPurchased;
|
|
664
|
+
declare const context$3_onAppInstanceRemoved: typeof onAppInstanceRemoved;
|
|
665
|
+
declare namespace context$3 {
|
|
666
|
+
export { context$3_getAppInstance as getAppInstance, context$3_onAppInstanceInstalled as onAppInstanceInstalled, context$3_onAppInstancePaidPlanAutoRenewalCancelled as onAppInstancePaidPlanAutoRenewalCancelled, context$3_onAppInstancePaidPlanChanged as onAppInstancePaidPlanChanged, context$3_onAppInstancePaidPlanPurchased as onAppInstancePaidPlanPurchased, context$3_onAppInstanceRemoved as onAppInstanceRemoved };
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
declare enum EventName {
|
|
670
|
+
UNKNOWN = "UNKNOWN",
|
|
671
|
+
APP_DASHBOARD_LOADED = "APP_DASHBOARD_LOADED",
|
|
672
|
+
APP_FINISHED_CONFIGURATION = "APP_FINISHED_CONFIGURATION",
|
|
673
|
+
APP_UPGRADED = "APP_UPGRADED",
|
|
674
|
+
PRIMARY_ACTION_PERFORMED = "PRIMARY_ACTION_PERFORMED",
|
|
675
|
+
CUSTOM = "CUSTOM",
|
|
676
|
+
CHARGE = "CHARGE",
|
|
677
|
+
FUNDS_RETURNED = "FUNDS_RETURNED",
|
|
678
|
+
APP_FINISH_BUSINESS_SETUP = "APP_FINISH_BUSINESS_SETUP",
|
|
679
|
+
APP_DEPLOYED = "APP_DEPLOYED",
|
|
680
|
+
APP_SETUP_FINISHED = "APP_SETUP_FINISHED"
|
|
681
|
+
}
|
|
682
|
+
interface SendBiEventOptions {
|
|
683
|
+
/**
|
|
684
|
+
* Name of the event that's triggered in your app.
|
|
685
|
+
*
|
|
686
|
+
* + `"APP_DASHBOARD_LOADED"`: A site onwer or contributor loads your app's dashboard.
|
|
687
|
+
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in the Wix Developers Center.
|
|
688
|
+
* + `"APP_UPGRADED"`: The site owner upgrades your app's paid plan. An upgrade means that they have finished the checkout flow on the app's side but not necessarily on Wix's side.
|
|
689
|
+
* + `"PRIMARY_ACTION_PERFORMED"`: A site owner, contributor, or visitor triggers your app's primary action. For example, a site visitor writes a product review using your product review app.
|
|
690
|
+
* + `"CHARGE"`: You charge money from the site owner. For example, when the site owner purchases or renews a subscription for your app. Make sure to also send `eventData` and a key of `sum`.
|
|
691
|
+
* + `"FUNDS_RETURNED"`: Trigger this event when you send money back to a site owner (for example, refunds or chargebacks). Make sure to also send the charge amount inside `eventData`. For example, `{"eventData": {"sum": "5.99"}}`.
|
|
692
|
+
* + `"CUSTOM"`: Any event that's not listed here. Make sure to also send `customEventName`.
|
|
693
|
+
* + `"APP_DEPLOYED"`: Your app’s internal code implementation is changed and might affect user flows or cause a regression.
|
|
694
|
+
* + `"APP_FINISH_BUSINESS_SETUP"`: __Deprecation Notice:__ This enum value will be removed on March 30, 2023. Use `"APP_SETUP_FINISHED"` instead.
|
|
695
|
+
* + `"APP_SETUP_FINISHED"`: The site owner completes your app's required business setup.
|
|
696
|
+
*/
|
|
697
|
+
eventName?: EventName;
|
|
698
|
+
/**
|
|
699
|
+
* Name of your app's custom event that was triggered. Required when `{"eventName": "CUSTOM"}`.
|
|
700
|
+
*
|
|
701
|
+
* Min: 2 characters
|
|
702
|
+
*/
|
|
703
|
+
customEventName?: string | null;
|
|
704
|
+
/**
|
|
705
|
+
* Supported values include: `"cycle_name"`, `"currency"`, `"sum"`, `"reason"`, `"app_plan_id"`.
|
|
706
|
+
* You may also submit data with keys that aren't listed here.
|
|
707
|
+
*
|
|
708
|
+
* Additional data about your app's event.
|
|
709
|
+
*
|
|
710
|
+
* + `"cycle_name"`: Supported values: `"monthly"`, `"yearly"`, `"2 years"`, `"one time"`.
|
|
711
|
+
* + `"currency"`: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
712
|
+
* + `"sum"`: Amount of money. Required for `{"eventName": "CHARGE"}` and `{"eventName": "FUNDS_RETURNED"}`.
|
|
713
|
+
* + `"reason"`: Information about why the event was triggered in your app.
|
|
714
|
+
* + `"app_plan_id"`: ID of the your app's plan as displayed in the Developers Center. Note that it's the same value as `vendorProductId` in the [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
|
|
715
|
+
*/
|
|
716
|
+
eventData?: Record<string, string>;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
declare function sendBiEvent$1(httpClient: HttpClient): (options?: SendBiEventOptions) => Promise<void>;
|
|
720
|
+
|
|
721
|
+
declare const sendBiEvent: BuildRESTFunction<typeof sendBiEvent$1>;
|
|
722
|
+
|
|
723
|
+
declare const context$2_sendBiEvent: typeof sendBiEvent;
|
|
724
|
+
declare namespace context$2 {
|
|
725
|
+
export { context$2_sendBiEvent as sendBiEvent };
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
interface PurchasedItem {
|
|
729
|
+
/** ID of your app's paid plan. */
|
|
730
|
+
productId?: string;
|
|
731
|
+
/** Price of your app's paid plan. For example, `9.95`. */
|
|
732
|
+
price?: string;
|
|
733
|
+
/**
|
|
734
|
+
* 3-letter currency code in
|
|
735
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
736
|
+
*/
|
|
737
|
+
currency?: string;
|
|
738
|
+
/** Information about the billing cycle for your app's paid plan. */
|
|
739
|
+
billingCycle?: PaymentCycle;
|
|
740
|
+
/**
|
|
741
|
+
* Date and time the site onwers have purchased your app's paid plan in
|
|
742
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
743
|
+
*/
|
|
744
|
+
dateCreated?: Date;
|
|
745
|
+
}
|
|
746
|
+
declare enum PaymentCycle {
|
|
747
|
+
NO_CYCLE = "NO_CYCLE",
|
|
748
|
+
MONTHLY = "MONTHLY",
|
|
749
|
+
YEARLY = "YEARLY",
|
|
750
|
+
ONE_TIME = "ONE_TIME",
|
|
751
|
+
TWO_YEARS = "TWO_YEARS",
|
|
752
|
+
THREE_YEARS = "THREE_YEARS",
|
|
753
|
+
FOUR_YEARS = "FOUR_YEARS",
|
|
754
|
+
FIVE_YEARS = "FIVE_YEARS"
|
|
755
|
+
}
|
|
756
|
+
interface GetUrlResponse {
|
|
757
|
+
/** URL for the Wix checkout page. */
|
|
758
|
+
checkoutUrl?: string;
|
|
759
|
+
/**
|
|
760
|
+
* Token for the Wix checkout page. The token holds all data about the order
|
|
761
|
+
* you're creating a checkout for. It is [signed](),
|
|
762
|
+
* so you can verify that it comes from Wix.
|
|
763
|
+
*/
|
|
764
|
+
token?: string | null;
|
|
765
|
+
}
|
|
766
|
+
interface GetPurchaseHistoryResponse {
|
|
767
|
+
/** Retrieved purchases the site owners have completed for you app. */
|
|
768
|
+
purchases?: PurchasedItem[];
|
|
769
|
+
}
|
|
770
|
+
interface GetUrlResponseNonNullableFields {
|
|
771
|
+
checkoutUrl: string;
|
|
772
|
+
}
|
|
773
|
+
interface GetPurchaseHistoryResponseNonNullableFields {
|
|
774
|
+
purchases: {
|
|
775
|
+
productId: string;
|
|
776
|
+
price: string;
|
|
777
|
+
currency: string;
|
|
778
|
+
billingCycle: PaymentCycle;
|
|
779
|
+
}[];
|
|
780
|
+
}
|
|
781
|
+
interface GetUrlOptions {
|
|
782
|
+
/**
|
|
783
|
+
* URL for the Wix checkout page. Redirect site owners to this URL after
|
|
784
|
+
* they've successfully purchased a paid plan for your app.
|
|
785
|
+
*/
|
|
786
|
+
successUrl?: string | null;
|
|
787
|
+
/**
|
|
788
|
+
* Whether the checkout is for testing purposes only. Testing is mainly
|
|
789
|
+
* relevant for in-app purchase flows. When `true`, Wix charges the site
|
|
790
|
+
* owners an amount of `0.00`.
|
|
791
|
+
*/
|
|
792
|
+
testCheckout?: boolean;
|
|
793
|
+
/** Information about the paid plan's billing cycle. */
|
|
794
|
+
billingCycle?: PaymentCycle;
|
|
795
|
+
/**
|
|
796
|
+
* 2-letter country code in
|
|
797
|
+
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
|
|
798
|
+
* format.
|
|
799
|
+
*
|
|
800
|
+
* Default: `"US"`
|
|
801
|
+
*/
|
|
802
|
+
countryCode?: string | null;
|
|
803
|
+
/**
|
|
804
|
+
* 2-letter language code in
|
|
805
|
+
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
806
|
+
*
|
|
807
|
+
* Default: `"EN"`
|
|
808
|
+
*/
|
|
809
|
+
languageCode?: string | null;
|
|
810
|
+
/** Coupon code for the paid plan. Available only in case there is a discount. */
|
|
811
|
+
couponCode?: string | null;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
declare function getUrl$1(httpClient: HttpClient): (productId: string, options?: GetUrlOptions) => Promise<GetUrlResponse & GetUrlResponseNonNullableFields>;
|
|
815
|
+
declare function getPurchaseHistory$1(httpClient: HttpClient): () => Promise<GetPurchaseHistoryResponse & GetPurchaseHistoryResponseNonNullableFields>;
|
|
816
|
+
|
|
817
|
+
declare const getUrl: BuildRESTFunction<typeof getUrl$1>;
|
|
818
|
+
declare const getPurchaseHistory: BuildRESTFunction<typeof getPurchaseHistory$1>;
|
|
819
|
+
|
|
820
|
+
declare const context$1_getPurchaseHistory: typeof getPurchaseHistory;
|
|
821
|
+
declare const context$1_getUrl: typeof getUrl;
|
|
822
|
+
declare namespace context$1 {
|
|
823
|
+
export { context$1_getPurchaseHistory as getPurchaseHistory, context$1_getUrl as getUrl };
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
/** Embedded script data */
|
|
827
|
+
interface ScriptProperties {
|
|
828
|
+
/** Script parameters */
|
|
829
|
+
parameters?: Record<string, string>;
|
|
830
|
+
/** Whether script is disabled or not, defaults to false (not disabled) */
|
|
831
|
+
disabled?: boolean;
|
|
832
|
+
}
|
|
833
|
+
interface EmbedScriptResponse {
|
|
834
|
+
/** Details of the embedded script. */
|
|
835
|
+
properties?: ScriptProperties;
|
|
836
|
+
}
|
|
837
|
+
interface EmbedScriptResponseNonNullableFields {
|
|
838
|
+
properties?: {
|
|
839
|
+
disabled: boolean;
|
|
840
|
+
};
|
|
841
|
+
}
|
|
842
|
+
interface EmbedScriptOptions {
|
|
843
|
+
/** ID of the corresponding embedded script component. */
|
|
844
|
+
componentId?: string | null;
|
|
845
|
+
}
|
|
846
|
+
interface GetEmbeddedScriptOptions {
|
|
847
|
+
/** Component ID of the embedded script to retrieve. */
|
|
848
|
+
componentId?: string | null;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
declare function embedScript$1(httpClient: HttpClient): (properties: ScriptProperties, options?: EmbedScriptOptions) => Promise<EmbedScriptResponse & EmbedScriptResponseNonNullableFields>;
|
|
852
|
+
declare function getEmbeddedScript$1(httpClient: HttpClient): (options?: GetEmbeddedScriptOptions) => Promise<ScriptProperties & {
|
|
853
|
+
disabled: boolean;
|
|
854
|
+
}>;
|
|
855
|
+
|
|
856
|
+
declare const embedScript: BuildRESTFunction<typeof embedScript$1>;
|
|
857
|
+
declare const getEmbeddedScript: BuildRESTFunction<typeof getEmbeddedScript$1>;
|
|
858
|
+
|
|
859
|
+
declare const context_embedScript: typeof embedScript;
|
|
860
|
+
declare const context_getEmbeddedScript: typeof getEmbeddedScript;
|
|
861
|
+
declare namespace context {
|
|
862
|
+
export { context_embedScript as embedScript, context_getEmbeddedScript as getEmbeddedScript };
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
export { context$3 as appInstances, context$4 as appPlans, context$2 as biEvents, context$1 as billing, context as embeddedScripts };
|