@wix/auto_sdk_app-management_app-instances 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.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.d.ts +33 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.js +40 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.js.map +1 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.d.ts +13 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.js +112 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.js.map +1 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.d.ts +13 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js +47 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js.map +1 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.d.ts +26 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.js +44 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.js.map +1 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.d.ts +367 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.js +40 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.js.map +1 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.d.ts +447 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js +107 -0
- package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.d.ts +33 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.js +33 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.js.map +1 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.d.ts +13 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.js +108 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.js.map +1 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.d.ts +13 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js +20 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js.map +1 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.d.ts +26 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.js +36 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.js.map +1 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.d.ts +367 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.js +37 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.js.map +1 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.d.ts +447 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js +80 -0
- package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.d.ts +33 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.js +40 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.js.map +1 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.d.ts +13 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.js +112 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.js.map +1 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.d.ts +13 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js +47 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js.map +1 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.d.ts +26 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.js +44 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.js.map +1 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.d.ts +367 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.js +40 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.js.map +1 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.d.ts +447 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js +107 -0
- package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.d.ts +33 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.js +33 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.js.map +1 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.d.ts +13 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.js +108 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.js.map +1 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.d.ts +13 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js +20 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js.map +1 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.d.ts +26 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.js +36 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.js.map +1 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.d.ts +367 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.js +37 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.js.map +1 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.d.ts +447 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js +80 -0
- package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves data about the instance of your app that's installed on a Wix
|
|
4
|
+
* site and data about the site itself. For example, to check whether the Wix user has installed a free or paid version of your app,
|
|
5
|
+
* or to check which apps made by Wix are installed on the site.
|
|
6
|
+
*
|
|
7
|
+
* You must authenticate this method as a Wix app ([REST](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#wix-app) | [SDK](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#wix-apps)).
|
|
8
|
+
*
|
|
9
|
+
* To retrieve `site.ownerInfo` in the response, you must
|
|
10
|
+
* have the __READ SITE OWNER EMAIL__ permission scope in addition to
|
|
11
|
+
* __MANAGE YOUR APP__.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getAppInstance(payload: object): RequestOptionsFactory<any>;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';
|
|
2
|
+
import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
|
|
3
|
+
import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
|
|
4
|
+
import { resolveUrl } from '@wix/sdk-runtime/rest-modules';
|
|
5
|
+
function resolveComWixpressMarketAimApiAppInstanceServiceUrl(opts) {
|
|
6
|
+
const domainToMappings = {
|
|
7
|
+
'api._api_base_domain_': [
|
|
8
|
+
{
|
|
9
|
+
srcPath: '/app-instance-manager-webapp',
|
|
10
|
+
destPath: '',
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
'www.wixapis.com': [
|
|
14
|
+
{
|
|
15
|
+
srcPath: '/apps',
|
|
16
|
+
destPath: '',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
'wixapis.com': [
|
|
20
|
+
{
|
|
21
|
+
srcPath: '/apps',
|
|
22
|
+
destPath: '',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
'dev._base_domain_': [
|
|
26
|
+
{
|
|
27
|
+
srcPath: '/_api/app-instance-manager',
|
|
28
|
+
destPath: '',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
srcPath: '/api/v1/instance',
|
|
32
|
+
destPath: '/v1/instance',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
srcPath: '/api/v1/scripts',
|
|
36
|
+
destPath: '/v1/scripts',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
'manage._base_domain_': [
|
|
40
|
+
{
|
|
41
|
+
srcPath: '/_api/app-instance-manager',
|
|
42
|
+
destPath: '',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
'www._base_domain_': [
|
|
46
|
+
{
|
|
47
|
+
srcPath: '/_api/app-instance-manager',
|
|
48
|
+
destPath: '',
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
'editor._base_domain_': [
|
|
52
|
+
{
|
|
53
|
+
srcPath: '/_api/app-instance-manager',
|
|
54
|
+
destPath: '',
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
'blocks._base_domain_': [
|
|
58
|
+
{
|
|
59
|
+
srcPath: '/_api/app-instance-manager',
|
|
60
|
+
destPath: '',
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
'create.editorx': [
|
|
64
|
+
{
|
|
65
|
+
srcPath: '/_api/app-instance-manager',
|
|
66
|
+
destPath: '',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
71
|
+
}
|
|
72
|
+
const PACKAGE_NAME = '@wix/auto_sdk_app-management_app-instances';
|
|
73
|
+
/**
|
|
74
|
+
* Retrieves data about the instance of your app that's installed on a Wix
|
|
75
|
+
* site and data about the site itself. For example, to check whether the Wix user has installed a free or paid version of your app,
|
|
76
|
+
* or to check which apps made by Wix are installed on the site.
|
|
77
|
+
*
|
|
78
|
+
* You must authenticate this method as a Wix app ([REST](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#wix-app) | [SDK](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#wix-apps)).
|
|
79
|
+
*
|
|
80
|
+
* To retrieve `site.ownerInfo` in the response, you must
|
|
81
|
+
* have the __READ SITE OWNER EMAIL__ permission scope in addition to
|
|
82
|
+
* __MANAGE YOUR APP__.
|
|
83
|
+
*/
|
|
84
|
+
export function getAppInstance(payload) {
|
|
85
|
+
function __getAppInstance({ host }) {
|
|
86
|
+
const metadata = {
|
|
87
|
+
entityFqdn: 'wix.devcenter.app_instance.v1.app_instance',
|
|
88
|
+
method: 'GET',
|
|
89
|
+
methodFqn: 'com.wixpress.market.aim.api.AppInstanceService.GetAppInstance',
|
|
90
|
+
packageName: PACKAGE_NAME,
|
|
91
|
+
url: resolveComWixpressMarketAimApiAppInstanceServiceUrl({
|
|
92
|
+
protoPath: '/v1/instance',
|
|
93
|
+
data: payload,
|
|
94
|
+
host,
|
|
95
|
+
}),
|
|
96
|
+
params: toURLSearchParams(payload),
|
|
97
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
98
|
+
{
|
|
99
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
100
|
+
paths: [{ path: 'instance.billing.freeTrialInfo.endDate' }],
|
|
101
|
+
},
|
|
102
|
+
]),
|
|
103
|
+
};
|
|
104
|
+
return metadata;
|
|
105
|
+
}
|
|
106
|
+
return __getAppInstance;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=devcenter-app-instance-v1-app-instance-app-instances.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devcenter-app-instance-v1-app-instance-app-instances.http.js","sourceRoot":"","sources":["../../../src/devcenter-app-instance-v1-app-instance-app-instances.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,SAAS,mDAAmD,CAC1D,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,8BAA8B;gBACvC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,OAAO;gBAChB,QAAQ,EAAE,EAAE;aACb;SACF;QACD,aAAa,EAAE;YACb;gBACE,OAAO,EAAE,OAAO;gBAChB,QAAQ,EAAE,EAAE;aACb;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,kBAAkB;gBAC3B,QAAQ,EAAE,cAAc;aACzB;YACD;gBACE,OAAO,EAAE,iBAAiB;gBAC1B,QAAQ,EAAE,aAAa;aACxB;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,gBAAgB,EAAE;YAChB;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;SACF;KACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,YAAY,GAAG,4CAA4C,CAAC;AAElE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,SAAS,gBAAgB,CAAC,EAAE,IAAI,EAAO;QACrC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,4CAA4C;YACxD,MAAM,EAAE,KAAY;YACpB,SAAS,EACP,+DAA+D;YACjE,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,mDAAmD,CAAC;gBACvD,SAAS,EAAE,cAAc;gBACzB,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC;YAClC,iBAAiB,EAAE,CAAC,OAAY,EAAE,EAAE,CAClC,cAAc,CAAC,OAAO,EAAE;gBACtB;oBACE,WAAW,EAAE,oCAAoC;oBACjD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,wCAAwC,EAAE,CAAC;iBAC5D;aACF,CAAC;SACL,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as ambassadorWixDevcenterAppInstanceV1AppInstanceTypes from './devcenter-app-instance-v1-app-instance-app-instances.types.js';
|
|
2
|
+
import * as ambassadorWixDevcenterAppInstanceV1AppInstanceUniversalTypes from './devcenter-app-instance-v1-app-instance-app-instances.universal.js';
|
|
3
|
+
export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4
|
+
getUrl: (context: any) => string;
|
|
5
|
+
httpMethod: K;
|
|
6
|
+
path: string;
|
|
7
|
+
pathParams: M;
|
|
8
|
+
__requestType: T;
|
|
9
|
+
__originalRequestType: S;
|
|
10
|
+
__responseType: Q;
|
|
11
|
+
__originalResponseType: R;
|
|
12
|
+
};
|
|
13
|
+
export declare function getAppInstance(): __PublicMethodMetaInfo<'GET', {}, ambassadorWixDevcenterAppInstanceV1AppInstanceUniversalTypes.GetAppInstanceRequest, ambassadorWixDevcenterAppInstanceV1AppInstanceTypes.GetAppInstanceRequest, ambassadorWixDevcenterAppInstanceV1AppInstanceUniversalTypes.GetAppInstanceResponse & ambassadorWixDevcenterAppInstanceV1AppInstanceUniversalTypes.GetAppInstanceResponseNonNullableFields, ambassadorWixDevcenterAppInstanceV1AppInstanceTypes.GetAppInstanceResponse & ambassadorWixDevcenterAppInstanceV1AppInstanceTypes.GetAppInstanceResponseNonNullableFields>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as ambassadorWixDevcenterAppInstanceV1AppInstance from './devcenter-app-instance-v1-app-instance-app-instances.http.js';
|
|
2
|
+
export function getAppInstance() {
|
|
3
|
+
const payload = {};
|
|
4
|
+
const getRequestOptions = ambassadorWixDevcenterAppInstanceV1AppInstance.getAppInstance(payload);
|
|
5
|
+
const getUrl = (context) => {
|
|
6
|
+
const { url } = getRequestOptions(context);
|
|
7
|
+
return url;
|
|
8
|
+
};
|
|
9
|
+
return {
|
|
10
|
+
getUrl,
|
|
11
|
+
httpMethod: 'GET',
|
|
12
|
+
path: '/v1/instance',
|
|
13
|
+
pathParams: {},
|
|
14
|
+
__requestType: null,
|
|
15
|
+
__originalRequestType: null,
|
|
16
|
+
__responseType: null,
|
|
17
|
+
__originalResponseType: null,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=devcenter-app-instance-v1-app-instance-app-instances.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devcenter-app-instance-v1-app-instance-app-instances.meta.js","sourceRoot":"","sources":["../../../src/devcenter-app-instance-v1-app-instance-app-instances.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,8CAA8C,MAAM,gEAAgE,CAAC;AAsBjI,MAAM,UAAU,cAAc;IAU5B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,8CAA8C,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAEzE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EventDefinition, HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { AppInstanceInstalledEnvelope, AppInstancePaidPlanAutoRenewalCancelledEnvelope, AppInstancePaidPlanChangedEnvelope, AppInstancePaidPlanPurchasedEnvelope, AppInstanceRemovedEnvelope, GetAppInstanceResponse, GetAppInstanceResponseNonNullableFields } from './devcenter-app-instance-v1-app-instance-app-instances.universal.js';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function getAppInstance(httpClient: HttpClient): GetAppInstanceSignature;
|
|
7
|
+
interface GetAppInstanceSignature {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves data about the instance of your app that's installed on a Wix
|
|
10
|
+
* site and data about the site itself. For example, to check whether the Wix user has installed a free or paid version of your app,
|
|
11
|
+
* or to check which apps made by Wix are installed on the site.
|
|
12
|
+
*
|
|
13
|
+
* You must authenticate this method as a Wix app ([REST](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#wix-app) | [SDK](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#wix-apps)).
|
|
14
|
+
*
|
|
15
|
+
* To retrieve `site.ownerInfo` in the response, you must
|
|
16
|
+
* have the __READ SITE OWNER EMAIL__ permission scope in addition to
|
|
17
|
+
* __MANAGE YOUR APP__.
|
|
18
|
+
*/
|
|
19
|
+
(): Promise<GetAppInstanceResponse & GetAppInstanceResponseNonNullableFields>;
|
|
20
|
+
}
|
|
21
|
+
export declare const onAppInstanceInstalled: EventDefinition<AppInstanceInstalledEnvelope, "AppInstalled">;
|
|
22
|
+
export declare const onAppInstanceRemoved: EventDefinition<AppInstanceRemovedEnvelope, "AppRemoved">;
|
|
23
|
+
export declare const onAppInstancePaidPlanAutoRenewalCancelled: EventDefinition<AppInstancePaidPlanAutoRenewalCancelledEnvelope, "PaidPlanAutoRenewalCancelled">;
|
|
24
|
+
export declare const onAppInstancePaidPlanChanged: EventDefinition<AppInstancePaidPlanChangedEnvelope, "PaidPlanChanged">;
|
|
25
|
+
export declare const onAppInstancePaidPlanPurchased: EventDefinition<AppInstancePaidPlanPurchasedEnvelope, "PaidPlanPurchased">;
|
|
26
|
+
export { AppInstalled, AppInstance, AppInstanceInstalledEnvelope, AppInstancePaidPlanAutoRenewalCancelledEnvelope, AppInstancePaidPlanChangedEnvelope, AppInstancePaidPlanPurchasedEnvelope, AppInstanceRemovedEnvelope, AppRemoved, AvailablePlan, BaseEventMetadata, BillingInfo, FreeTrialInfo, FreeTrialStatus, GetAppInstanceByInstanceIdRequest, GetAppInstanceRequest, GetAppInstanceResponse, GetAppInstanceResponseNonNullableFields, IdentificationData, IdentificationDataIdOneOf, Locale, MessageEnvelope, Multilingual, OwnerInfo, PaidPlanAutoRenewalCancelled, PaidPlanChanged, PaidPlanPurchased, PaymentCycle, ResolutionMethod, SiteInfo, SupportedLanguage, WebhookIdentityType, } from './devcenter-app-instance-v1-app-instance-app-instances.universal.js';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';
|
|
2
|
+
import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
|
|
3
|
+
import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
|
|
4
|
+
import { EventDefinition } from '@wix/sdk-types';
|
|
5
|
+
import { getAppInstance as universalGetAppInstance, } from './devcenter-app-instance-v1-app-instance-app-instances.universal.js';
|
|
6
|
+
export const __metadata = { PACKAGE_NAME: '@wix/app-management' };
|
|
7
|
+
export function getAppInstance(httpClient) {
|
|
8
|
+
return () => universalGetAppInstance(
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
{ httpClient });
|
|
11
|
+
}
|
|
12
|
+
export const onAppInstanceInstalled = EventDefinition('AppInstalled', false, (event) => renameKeysFromRESTResponseToSDKResponse(event))();
|
|
13
|
+
export const onAppInstanceRemoved = EventDefinition('AppRemoved', false, (event) => renameKeysFromRESTResponseToSDKResponse(event))();
|
|
14
|
+
export const onAppInstancePaidPlanAutoRenewalCancelled = EventDefinition('PaidPlanAutoRenewalCancelled', false, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
|
|
15
|
+
{
|
|
16
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
17
|
+
paths: [{ path: 'data.operationTimeStamp' }],
|
|
18
|
+
},
|
|
19
|
+
])))();
|
|
20
|
+
export const onAppInstancePaidPlanChanged = EventDefinition('PaidPlanChanged', false, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
|
|
21
|
+
{
|
|
22
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
23
|
+
paths: [{ path: 'data.operationTimeStamp' }],
|
|
24
|
+
},
|
|
25
|
+
])))();
|
|
26
|
+
export const onAppInstancePaidPlanPurchased = EventDefinition('PaidPlanPurchased', false, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
|
|
27
|
+
{
|
|
28
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
29
|
+
paths: [
|
|
30
|
+
{ path: 'data.operationTimeStamp' },
|
|
31
|
+
{ path: 'data.expiresOn' },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
])))();
|
|
35
|
+
export { FreeTrialStatus, PaymentCycle, ResolutionMethod, WebhookIdentityType, } from './devcenter-app-instance-v1-app-instance-app-instances.universal.js';
|
|
36
|
+
//# sourceMappingURL=devcenter-app-instance-v1-app-instance-app-instances.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devcenter-app-instance-v1-app-instance-app-instances.public.js","sourceRoot":"","sources":["../../../src/devcenter-app-instance-v1-app-instance-app-instances.public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,eAAe,EAAc,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAQL,cAAc,IAAI,uBAAuB,GAC1C,MAAM,qEAAqE,CAAC;AAE7E,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAElE,MAAM,UAAU,cAAc,CAC5B,UAAsB;IAEtB,OAAO,GAAG,EAAE,CACV,uBAAuB;IACrB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAiBD,MAAM,CAAC,MAAM,sBAAsB,GAAG,eAAe,CACnD,cAAc,EACd,KAAK,EACL,CAAC,KAAmC,EAAE,EAAE,CACtC,uCAAuC,CAAC,KAAK,CAAC,CACjD,EAAgC,CAAC;AAClC,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,CACjD,YAAY,EACZ,KAAK,EACL,CAAC,KAAiC,EAAE,EAAE,CACpC,uCAAuC,CAAC,KAAK,CAAC,CACjD,EAA8B,CAAC;AAChC,MAAM,CAAC,MAAM,yCAAyC,GAAG,eAAe,CACtE,8BAA8B,EAC9B,KAAK,EACL,CAAC,KAAsD,EAAE,EAAE,CACzD,uCAAuC,CACrC,cAAc,CAAC,KAAK,EAAE;IACpB;QACE,WAAW,EAAE,oCAAoC;QACjD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC;KAC7C;CACF,CAAC,CACH,CACJ,EAAmD,CAAC;AACrD,MAAM,CAAC,MAAM,4BAA4B,GAAG,eAAe,CACzD,iBAAiB,EACjB,KAAK,EACL,CAAC,KAAyC,EAAE,EAAE,CAC5C,uCAAuC,CACrC,cAAc,CAAC,KAAK,EAAE;IACpB;QACE,WAAW,EAAE,oCAAoC;QACjD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC;KAC7C;CACF,CAAC,CACH,CACJ,EAAsC,CAAC;AACxC,MAAM,CAAC,MAAM,8BAA8B,GAAG,eAAe,CAC3D,mBAAmB,EACnB,KAAK,EACL,CAAC,KAA2C,EAAE,EAAE,CAC9C,uCAAuC,CACrC,cAAc,CAAC,KAAK,EAAE;IACpB;QACE,WAAW,EAAE,oCAAoC;QACjD,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,yBAAyB,EAAE;YACnC,EAAE,IAAI,EAAE,gBAAgB,EAAE;SAC3B;KACF;CACF,CAAC,CACH,CACJ,EAAwC,CAAC;AAE1C,OAAO,EAaL,eAAe,EAcf,YAAY,EACZ,gBAAgB,EAGhB,mBAAmB,GACpB,MAAM,qEAAqE,CAAC"}
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An app instance is a specific occurrence of an app on a Wix site.
|
|
3
|
+
* When a Wix user installs an app, a unique instance is generated for that
|
|
4
|
+
* specific site. Use the `instanceId` to keep track of the individual data
|
|
5
|
+
* associated with each app instance.
|
|
6
|
+
*/
|
|
7
|
+
export interface AppInstance {
|
|
8
|
+
/**
|
|
9
|
+
* App instance ID. Useful to keep track of the
|
|
10
|
+
* data that's associated with the specific instance of your app
|
|
11
|
+
* installed on a Wix site.
|
|
12
|
+
*/
|
|
13
|
+
instanceId?: string;
|
|
14
|
+
/** App name, as you entered it in the App Dashboard. */
|
|
15
|
+
appName?: string;
|
|
16
|
+
/** Version of your app that's installed on the Wix site. */
|
|
17
|
+
appVersion?: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the Wix user has installed a free or paid version of your app
|
|
20
|
+
* on their site.
|
|
21
|
+
*/
|
|
22
|
+
isFree?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Billing information for the app instance. Available only in case
|
|
25
|
+
* `{"isFree": false}`.
|
|
26
|
+
*/
|
|
27
|
+
billing?: BillingInfo;
|
|
28
|
+
/**
|
|
29
|
+
* List of [permissions](https://dev.wix.com/docs/build-apps/developer-tools/developers-center/example-app-walkthrough/build-an-app#4-add-permissions)
|
|
30
|
+
* that the Wix user has granted your app. You set the list of permissions that
|
|
31
|
+
* your app requires from the Wix user in your app's Permissions page.
|
|
32
|
+
*/
|
|
33
|
+
permissions?: string[];
|
|
34
|
+
/** Plans available to this app instance. */
|
|
35
|
+
availablePlans?: AvailablePlan[];
|
|
36
|
+
/**
|
|
37
|
+
* ID of the Wix site from which the instance of your app has been cloned.
|
|
38
|
+
* Available only when `{"copiedFromTemplate": true}`.
|
|
39
|
+
* All visual settings of the Wix site and app data are duplicated during the
|
|
40
|
+
* cloning process. Wix also notifies you in case there is any additional
|
|
41
|
+
* external functionality for the original site.
|
|
42
|
+
*/
|
|
43
|
+
originInstanceId?: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* __Deprecated__. This parameter will be removed on March 30, 2023. Use
|
|
46
|
+
* `copiedFromTemplate` instead.
|
|
47
|
+
* @deprecated
|
|
48
|
+
*/
|
|
49
|
+
isOriginSiteTemplate?: boolean;
|
|
50
|
+
/** Whether this app instance was created when another Wix site was cloned. */
|
|
51
|
+
copiedFromTemplate?: boolean;
|
|
52
|
+
/** Whether this app instance includes a free trial that hasn't started yet. */
|
|
53
|
+
freeTrialAvailable?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface BillingInfo {
|
|
56
|
+
/** Name of the package that the site owner has paid for. */
|
|
57
|
+
packageName?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Interval of the billing cycle. `"ONE_TIME"` means that site owners have
|
|
60
|
+
* purchased unlimited access to the app with a single, upfront payment.
|
|
61
|
+
*/
|
|
62
|
+
billingCycle?: PaymentCycle;
|
|
63
|
+
/**
|
|
64
|
+
* Date and time the Wix user purchased the app's paid plan or began their free trial. In
|
|
65
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
66
|
+
*/
|
|
67
|
+
timeStamp?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Date and time the app's current billing cycle ends in
|
|
70
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format. Available only for yearly and
|
|
71
|
+
* multi-yearly plans.
|
|
72
|
+
*/
|
|
73
|
+
expirationDate?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Whether the app's subscription automatically renews at the end of the
|
|
76
|
+
* current billing cycle.
|
|
77
|
+
*/
|
|
78
|
+
autoRenewing?: boolean | null;
|
|
79
|
+
/** ID of the invoice for the current billing cycle. */
|
|
80
|
+
invoiceId?: string | null;
|
|
81
|
+
/**
|
|
82
|
+
* Information about any discounts applied to the app instance's current billing cycle.
|
|
83
|
+
* If the site owners applied a developer coupon or Wix Voucher
|
|
84
|
+
* when installing the paid version of your app, this field holds the coupon's
|
|
85
|
+
* name or `“Wix discount coupon”`. Site owners may receive a Wix Voucher when
|
|
86
|
+
* upgrading their Wix subscription. If there is no discount for the
|
|
87
|
+
* current billing cycle, the field is an empty string.
|
|
88
|
+
*/
|
|
89
|
+
source?: string | null;
|
|
90
|
+
/** Information about the free trial applied, if relevant. */
|
|
91
|
+
freeTrialInfo?: FreeTrialInfo;
|
|
92
|
+
}
|
|
93
|
+
export declare enum PaymentCycle {
|
|
94
|
+
NO_CYCLE = "NO_CYCLE",
|
|
95
|
+
MONTHLY = "MONTHLY",
|
|
96
|
+
YEARLY = "YEARLY",
|
|
97
|
+
ONE_TIME = "ONE_TIME",
|
|
98
|
+
TWO_YEARS = "TWO_YEARS",
|
|
99
|
+
THREE_YEARS = "THREE_YEARS",
|
|
100
|
+
FOUR_YEARS = "FOUR_YEARS",
|
|
101
|
+
FIVE_YEARS = "FIVE_YEARS"
|
|
102
|
+
}
|
|
103
|
+
export interface FreeTrialInfo {
|
|
104
|
+
/**
|
|
105
|
+
* Current free trial status.
|
|
106
|
+
* @readonly
|
|
107
|
+
*/
|
|
108
|
+
status?: FreeTrialStatus;
|
|
109
|
+
/**
|
|
110
|
+
* When the free trial has ended. Populated only once the free trial is over.
|
|
111
|
+
* @readonly
|
|
112
|
+
*/
|
|
113
|
+
endDate?: Date | null;
|
|
114
|
+
}
|
|
115
|
+
export declare enum FreeTrialStatus {
|
|
116
|
+
/** Unknown trial status. */
|
|
117
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
118
|
+
/** The free trial is currently in progress. */
|
|
119
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
120
|
+
/** The free trial has ended. */
|
|
121
|
+
ENDED = "ENDED",
|
|
122
|
+
/** No free trial was applied, as none was available. */
|
|
123
|
+
NOT_AVAILABLE = "NOT_AVAILABLE"
|
|
124
|
+
}
|
|
125
|
+
export interface AvailablePlan {
|
|
126
|
+
/** Package name of the available plan. */
|
|
127
|
+
packageName?: string;
|
|
128
|
+
/** Source of the available plan. Can be a bundle or 3rd-party app. */
|
|
129
|
+
source?: string;
|
|
130
|
+
}
|
|
131
|
+
export interface AppInstalled {
|
|
132
|
+
/** Unique identifier of the app within the website. */
|
|
133
|
+
appId?: string;
|
|
134
|
+
/** 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)). */
|
|
135
|
+
originInstanceId?: string | null;
|
|
136
|
+
}
|
|
137
|
+
export interface AppRemoved {
|
|
138
|
+
/** Unique identifier of the app within the website. */
|
|
139
|
+
appId?: string;
|
|
140
|
+
}
|
|
141
|
+
export interface PaidPlanPurchased {
|
|
142
|
+
/** Date and time of purchase. */
|
|
143
|
+
operationTimeStamp?: Date | null;
|
|
144
|
+
/** Purchased app plan. */
|
|
145
|
+
vendorProductId?: string;
|
|
146
|
+
/** Selected payment cycle. */
|
|
147
|
+
cycle?: PaymentCycle;
|
|
148
|
+
/** Plan expiration date. */
|
|
149
|
+
expiresOn?: Date | null;
|
|
150
|
+
/** Coupon applied to purchase (if relevant). */
|
|
151
|
+
couponName?: string | null;
|
|
152
|
+
/** Invoice ID. */
|
|
153
|
+
invoiceId?: string | null;
|
|
154
|
+
}
|
|
155
|
+
export interface PaidPlanChanged {
|
|
156
|
+
/** Date and time of change. */
|
|
157
|
+
operationTimeStamp?: Date | null;
|
|
158
|
+
/** Newly purchased app plan. */
|
|
159
|
+
vendorProductId?: string;
|
|
160
|
+
/** Newly selected payment cycle. */
|
|
161
|
+
cycle?: PaymentCycle;
|
|
162
|
+
/** Previous app plan. */
|
|
163
|
+
previousVendorProductId?: string | null;
|
|
164
|
+
/** Previous payment cycle. */
|
|
165
|
+
previousCycle?: PaymentCycle;
|
|
166
|
+
/** Coupon applied to purchase (if relevant). */
|
|
167
|
+
couponName?: string | null;
|
|
168
|
+
/** Invoice ID. */
|
|
169
|
+
invoiceId?: string | null;
|
|
170
|
+
}
|
|
171
|
+
export interface PaidPlanAutoRenewalCancelled {
|
|
172
|
+
/** Date and time of auto-renewal cancellation. */
|
|
173
|
+
operationTimeStamp?: Date | null;
|
|
174
|
+
/** Current app plan. */
|
|
175
|
+
vendorProductId?: string;
|
|
176
|
+
/** Current payment cycle. */
|
|
177
|
+
cycle?: PaymentCycle;
|
|
178
|
+
/** Supported values: `UNKNOWN_CANCELLATION_TYPE_ERROR_STATE`, `USER_CANCEL`, `FAILED_PAYMENT`, `TRANSFER_CANCELLATION_REASON`. Reason provided by app for cancellation (if relevant). */
|
|
179
|
+
cancelReason?: string | null;
|
|
180
|
+
/** Reason provided by site owner for cancellation (if relevant). */
|
|
181
|
+
userReason?: string | null;
|
|
182
|
+
/** Cancellation type. */
|
|
183
|
+
subscriptionCancellationType?: string | null;
|
|
184
|
+
}
|
|
185
|
+
export interface GetAppInstanceRequest {
|
|
186
|
+
}
|
|
187
|
+
export interface GetAppInstanceResponse {
|
|
188
|
+
/** Retrieved app instance. */
|
|
189
|
+
instance?: AppInstance;
|
|
190
|
+
/** Information about the site. */
|
|
191
|
+
site?: SiteInfo;
|
|
192
|
+
}
|
|
193
|
+
export interface SiteInfo {
|
|
194
|
+
/** Display name of the site. */
|
|
195
|
+
siteDisplayName?: string | null;
|
|
196
|
+
/**
|
|
197
|
+
* 2-letter language code of the site's locale in
|
|
198
|
+
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
199
|
+
*/
|
|
200
|
+
locale?: string;
|
|
201
|
+
/**
|
|
202
|
+
* 3-letter currency code for the site's billing in
|
|
203
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
204
|
+
*/
|
|
205
|
+
paymentCurrency?: string;
|
|
206
|
+
/** Information about the site's supported languages. */
|
|
207
|
+
multilingual?: Multilingual;
|
|
208
|
+
/** URL of the site. Available only when the site has been published. */
|
|
209
|
+
url?: string | null;
|
|
210
|
+
/** Description of the site. */
|
|
211
|
+
description?: string | null;
|
|
212
|
+
/** Apps made by Wix that are installed on the site. */
|
|
213
|
+
installedWixApps?: string[];
|
|
214
|
+
/**
|
|
215
|
+
* > **Deprecation Notice:** This parameter will be removed on June 30, 2022. Use `ownerInfo` instead.
|
|
216
|
+
* @deprecated
|
|
217
|
+
*/
|
|
218
|
+
ownerEmail?: string | null;
|
|
219
|
+
/**
|
|
220
|
+
* Information about the site's Wix user. Available only when calling
|
|
221
|
+
* _Get App Instance_ with the __Read Site Owner Email__ permission scope.
|
|
222
|
+
*/
|
|
223
|
+
ownerInfo?: OwnerInfo;
|
|
224
|
+
/** Site ID. */
|
|
225
|
+
siteId?: string;
|
|
226
|
+
}
|
|
227
|
+
export interface Multilingual {
|
|
228
|
+
/** Whether the site supports more than a single language. */
|
|
229
|
+
isMultiLingual?: boolean;
|
|
230
|
+
/** List of supported languages. Returned only when `{"isMultiLingual": true}`. */
|
|
231
|
+
supportedLanguages?: SupportedLanguage[];
|
|
232
|
+
}
|
|
233
|
+
export interface SupportedLanguage {
|
|
234
|
+
/** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
|
|
235
|
+
languageCode?: string;
|
|
236
|
+
/** Locale. */
|
|
237
|
+
locale?: Locale;
|
|
238
|
+
/** Whether the supported language is the primary language for the site. */
|
|
239
|
+
isPrimary?: boolean;
|
|
240
|
+
/** Language icon. */
|
|
241
|
+
countryCode?: string;
|
|
242
|
+
/** How the language will be resolved. For internal use. */
|
|
243
|
+
resolutionMethod?: ResolutionMethod;
|
|
244
|
+
}
|
|
245
|
+
export interface Locale {
|
|
246
|
+
/** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
|
|
247
|
+
languageCode?: string;
|
|
248
|
+
/** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */
|
|
249
|
+
country?: string;
|
|
250
|
+
}
|
|
251
|
+
export declare enum ResolutionMethod {
|
|
252
|
+
QUERY_PARAM = "QUERY_PARAM",
|
|
253
|
+
SUBDOMAIN = "SUBDOMAIN",
|
|
254
|
+
SUBDIRECTORY = "SUBDIRECTORY"
|
|
255
|
+
}
|
|
256
|
+
export interface OwnerInfo {
|
|
257
|
+
/** Wix user's email address. Identical to the their login email. */
|
|
258
|
+
email?: string;
|
|
259
|
+
/**
|
|
260
|
+
* Supported values: `VERIFIED_OPT_IN`, `VERIFIED_OPT_OUT`,
|
|
261
|
+
* `NOT_VERIFIED_OPT_IN`, `NOT_VERIFIED_OPT_OUT`.
|
|
262
|
+
*
|
|
263
|
+
* Whether the Wix user has verified their email and whether they have chosen
|
|
264
|
+
* to receive email notifications from Wix.
|
|
265
|
+
*/
|
|
266
|
+
emailStatus?: string;
|
|
267
|
+
}
|
|
268
|
+
export interface GetAppInstanceByInstanceIdRequest {
|
|
269
|
+
/** ID of the app instance to retrieve. */
|
|
270
|
+
instanceId?: string;
|
|
271
|
+
}
|
|
272
|
+
export interface MessageEnvelope {
|
|
273
|
+
/** App instance ID. */
|
|
274
|
+
instanceId?: string | null;
|
|
275
|
+
/** Event type. */
|
|
276
|
+
eventType?: string;
|
|
277
|
+
/** The identification type and identity data. */
|
|
278
|
+
identity?: IdentificationData;
|
|
279
|
+
/** Stringify payload. */
|
|
280
|
+
data?: string;
|
|
281
|
+
}
|
|
282
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
283
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
284
|
+
anonymousVisitorId?: string;
|
|
285
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
286
|
+
memberId?: string;
|
|
287
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
288
|
+
wixUserId?: string;
|
|
289
|
+
/** ID of an app. */
|
|
290
|
+
appId?: string;
|
|
291
|
+
/** @readonly */
|
|
292
|
+
identityType?: WebhookIdentityType;
|
|
293
|
+
}
|
|
294
|
+
/** @oneof */
|
|
295
|
+
export interface IdentificationDataIdOneOf {
|
|
296
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
297
|
+
anonymousVisitorId?: string;
|
|
298
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
299
|
+
memberId?: string;
|
|
300
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
301
|
+
wixUserId?: string;
|
|
302
|
+
/** ID of an app. */
|
|
303
|
+
appId?: string;
|
|
304
|
+
}
|
|
305
|
+
export declare enum WebhookIdentityType {
|
|
306
|
+
UNKNOWN = "UNKNOWN",
|
|
307
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
308
|
+
MEMBER = "MEMBER",
|
|
309
|
+
WIX_USER = "WIX_USER",
|
|
310
|
+
APP = "APP"
|
|
311
|
+
}
|
|
312
|
+
interface FreeTrialInfoNonNullableFields {
|
|
313
|
+
status: FreeTrialStatus;
|
|
314
|
+
}
|
|
315
|
+
interface BillingInfoNonNullableFields {
|
|
316
|
+
packageName: string;
|
|
317
|
+
billingCycle: PaymentCycle;
|
|
318
|
+
timeStamp: string;
|
|
319
|
+
freeTrialInfo?: FreeTrialInfoNonNullableFields;
|
|
320
|
+
}
|
|
321
|
+
interface AvailablePlanNonNullableFields {
|
|
322
|
+
packageName: string;
|
|
323
|
+
source: string;
|
|
324
|
+
}
|
|
325
|
+
interface AppInstanceNonNullableFields {
|
|
326
|
+
instanceId: string;
|
|
327
|
+
appName: string;
|
|
328
|
+
isFree: boolean;
|
|
329
|
+
billing?: BillingInfoNonNullableFields;
|
|
330
|
+
permissions: string[];
|
|
331
|
+
availablePlans: AvailablePlanNonNullableFields[];
|
|
332
|
+
isOriginSiteTemplate: boolean;
|
|
333
|
+
copiedFromTemplate: boolean;
|
|
334
|
+
freeTrialAvailable: boolean;
|
|
335
|
+
}
|
|
336
|
+
interface LocaleNonNullableFields {
|
|
337
|
+
languageCode: string;
|
|
338
|
+
country: string;
|
|
339
|
+
}
|
|
340
|
+
interface SupportedLanguageNonNullableFields {
|
|
341
|
+
languageCode: string;
|
|
342
|
+
locale?: LocaleNonNullableFields;
|
|
343
|
+
isPrimary: boolean;
|
|
344
|
+
countryCode: string;
|
|
345
|
+
resolutionMethod: ResolutionMethod;
|
|
346
|
+
}
|
|
347
|
+
interface MultilingualNonNullableFields {
|
|
348
|
+
isMultiLingual: boolean;
|
|
349
|
+
supportedLanguages: SupportedLanguageNonNullableFields[];
|
|
350
|
+
}
|
|
351
|
+
interface OwnerInfoNonNullableFields {
|
|
352
|
+
email: string;
|
|
353
|
+
emailStatus: string;
|
|
354
|
+
}
|
|
355
|
+
interface SiteInfoNonNullableFields {
|
|
356
|
+
locale: string;
|
|
357
|
+
paymentCurrency: string;
|
|
358
|
+
multilingual?: MultilingualNonNullableFields;
|
|
359
|
+
installedWixApps: string[];
|
|
360
|
+
ownerInfo?: OwnerInfoNonNullableFields;
|
|
361
|
+
siteId: string;
|
|
362
|
+
}
|
|
363
|
+
export interface GetAppInstanceResponseNonNullableFields {
|
|
364
|
+
instance?: AppInstanceNonNullableFields;
|
|
365
|
+
site?: SiteInfoNonNullableFields;
|
|
366
|
+
}
|
|
367
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export var PaymentCycle;
|
|
2
|
+
(function (PaymentCycle) {
|
|
3
|
+
PaymentCycle["NO_CYCLE"] = "NO_CYCLE";
|
|
4
|
+
PaymentCycle["MONTHLY"] = "MONTHLY";
|
|
5
|
+
PaymentCycle["YEARLY"] = "YEARLY";
|
|
6
|
+
PaymentCycle["ONE_TIME"] = "ONE_TIME";
|
|
7
|
+
PaymentCycle["TWO_YEARS"] = "TWO_YEARS";
|
|
8
|
+
PaymentCycle["THREE_YEARS"] = "THREE_YEARS";
|
|
9
|
+
PaymentCycle["FOUR_YEARS"] = "FOUR_YEARS";
|
|
10
|
+
PaymentCycle["FIVE_YEARS"] = "FIVE_YEARS";
|
|
11
|
+
})(PaymentCycle || (PaymentCycle = {}));
|
|
12
|
+
export var FreeTrialStatus;
|
|
13
|
+
(function (FreeTrialStatus) {
|
|
14
|
+
/** Unknown trial status. */
|
|
15
|
+
FreeTrialStatus["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
16
|
+
/** The free trial is currently in progress. */
|
|
17
|
+
FreeTrialStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
18
|
+
/** The free trial has ended. */
|
|
19
|
+
FreeTrialStatus["ENDED"] = "ENDED";
|
|
20
|
+
/** No free trial was applied, as none was available. */
|
|
21
|
+
FreeTrialStatus["NOT_AVAILABLE"] = "NOT_AVAILABLE";
|
|
22
|
+
})(FreeTrialStatus || (FreeTrialStatus = {}));
|
|
23
|
+
export var ResolutionMethod;
|
|
24
|
+
(function (ResolutionMethod) {
|
|
25
|
+
ResolutionMethod["QUERY_PARAM"] = "QUERY_PARAM";
|
|
26
|
+
ResolutionMethod["SUBDOMAIN"] = "SUBDOMAIN";
|
|
27
|
+
ResolutionMethod["SUBDIRECTORY"] = "SUBDIRECTORY";
|
|
28
|
+
})(ResolutionMethod || (ResolutionMethod = {}));
|
|
29
|
+
export var WebhookIdentityType;
|
|
30
|
+
(function (WebhookIdentityType) {
|
|
31
|
+
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
32
|
+
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
33
|
+
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
34
|
+
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
35
|
+
WebhookIdentityType["APP"] = "APP";
|
|
36
|
+
})(WebhookIdentityType || (WebhookIdentityType = {}));
|
|
37
|
+
//# sourceMappingURL=devcenter-app-instance-v1-app-instance-app-instances.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devcenter-app-instance-v1-app-instance-app-instances.types.js","sourceRoot":"","sources":["../../../src/devcenter-app-instance-v1-app-instance-app-instances.types.ts"],"names":[],"mappings":"AA8FA,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,qCAAqB,CAAA;IACrB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,uCAAuB,CAAA;IACvB,2CAA2B,CAAA;IAC3B,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;AAC3B,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AAeD,MAAM,CAAN,IAAY,eASX;AATD,WAAY,eAAe;IACzB,4BAA4B;IAC5B,oDAAiC,CAAA;IACjC,+CAA+C;IAC/C,8CAA2B,CAAA;IAC3B,gCAAgC;IAChC,kCAAe,CAAA;IACf,wDAAwD;IACxD,kDAA+B,CAAA;AACjC,CAAC,EATW,eAAe,KAAf,eAAe,QAS1B;AA2ID,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,+CAA2B,CAAA;IAC3B,2CAAuB,CAAA;IACvB,iDAA6B,CAAA;AAC/B,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAwDD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|