@wix/auth-management 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 +24 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/src/headless-v1-o-auth-app.http.d.ts +35 -0
- package/build/cjs/src/headless-v1-o-auth-app.http.js +167 -0
- package/build/cjs/src/headless-v1-o-auth-app.http.js.map +1 -0
- package/build/cjs/src/headless-v1-o-auth-app.public.d.ts +11 -0
- package/build/cjs/src/headless-v1-o-auth-app.public.js +32 -0
- package/build/cjs/src/headless-v1-o-auth-app.public.js.map +1 -0
- package/build/cjs/src/headless-v1-o-auth-app.types.d.ts +153 -0
- package/build/cjs/src/headless-v1-o-auth-app.types.js +9 -0
- package/build/cjs/src/headless-v1-o-auth-app.types.js.map +1 -0
- package/build/cjs/src/headless-v1-o-auth-app.universal.d.ts +293 -0
- package/build/cjs/src/headless-v1-o-auth-app.universal.js +305 -0
- package/build/cjs/src/headless-v1-o-auth-app.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/src/headless-v1-o-auth-app.http.d.ts +35 -0
- package/build/es/src/headless-v1-o-auth-app.http.js +160 -0
- package/build/es/src/headless-v1-o-auth-app.http.js.map +1 -0
- package/build/es/src/headless-v1-o-auth-app.public.d.ts +11 -0
- package/build/es/src/headless-v1-o-auth-app.public.js +24 -0
- package/build/es/src/headless-v1-o-auth-app.public.js.map +1 -0
- package/build/es/src/headless-v1-o-auth-app.types.d.ts +153 -0
- package/build/es/src/headless-v1-o-auth-app.types.js +6 -0
- package/build/es/src/headless-v1-o-auth-app.types.js.map +1 -0
- package/build/es/src/headless-v1-o-auth-app.universal.d.ts +293 -0
- package/build/es/src/headless-v1-o-auth-app.universal.js +279 -0
- package/build/es/src/headless-v1-o-auth-app.universal.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { toURLSearchParams } from '@wix/metro-runtime';
|
|
2
|
+
import { serializer } from '@wix/metro-runtime/ambassador';
|
|
3
|
+
import { resolveUrl } from '@wix/metro-runtime';
|
|
4
|
+
const _createOAuthAppRequest = { oAuthApp: '_oAuthApp' };
|
|
5
|
+
const _createOAuthAppResponse = { oAuthApp: '_oAuthApp' };
|
|
6
|
+
const _getOAuthAppRequest = {};
|
|
7
|
+
const _getOAuthAppResponse = { oAuthApp: '_oAuthApp' };
|
|
8
|
+
const _oAuthApp = { createdDate: 'google.protobuf.Timestamp' };
|
|
9
|
+
const _queryOAuthAppsRequest = {};
|
|
10
|
+
const _queryOAuthAppsResponse = { oAuthApps: '_oAuthApp' };
|
|
11
|
+
const _updateOAuthAppRequest = {
|
|
12
|
+
mask: 'google.protobuf.FieldMask',
|
|
13
|
+
oAuthApp: '_oAuthApp',
|
|
14
|
+
};
|
|
15
|
+
const _updateOAuthAppResponse = { oAuthApp: '_oAuthApp' };
|
|
16
|
+
function resolveWixHeadlessV1OAuthAppServiceUrl(opts) {
|
|
17
|
+
const domainToMappings = {
|
|
18
|
+
'manage._base_domain_': [
|
|
19
|
+
{
|
|
20
|
+
srcPath: '/oauth-app-service',
|
|
21
|
+
destPath: '',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
srcPath: '/oauth-app',
|
|
25
|
+
destPath: '',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
'www.wixapis.com': [
|
|
29
|
+
{
|
|
30
|
+
srcPath: '/oauth-app',
|
|
31
|
+
destPath: '',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new OAuth app for a Wix Headless client.
|
|
39
|
+
*
|
|
40
|
+
*
|
|
41
|
+
* An OAuth app authorizes an external client app or site, on any platform, to authenticate with a Wix site or project and manage its data.
|
|
42
|
+
*
|
|
43
|
+
* > **Note:** The OAuth app secret is returned only when creating the OAuth app, and can't be retrieved later. Store the secret in a secure location.
|
|
44
|
+
*/
|
|
45
|
+
export function createOAuthApp(payload) {
|
|
46
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_createOAuthAppRequest, { _oAuthApp });
|
|
47
|
+
const { fromJSON: fromRes } = serializer(_createOAuthAppResponse, {
|
|
48
|
+
_oAuthApp,
|
|
49
|
+
});
|
|
50
|
+
function __createOAuthApp({ host }) {
|
|
51
|
+
const serializedData = toReq(payload);
|
|
52
|
+
const metadata = {
|
|
53
|
+
entityFqdn: 'wix.headless.v1.o_auth_app',
|
|
54
|
+
method: 'POST',
|
|
55
|
+
methodFqn: 'wix.headless.v1.OAuthAppService.CreateOAuthApp',
|
|
56
|
+
url: resolveWixHeadlessV1OAuthAppServiceUrl({
|
|
57
|
+
protoPath: '/v1/oauth-apps',
|
|
58
|
+
data: serializedData,
|
|
59
|
+
host,
|
|
60
|
+
}),
|
|
61
|
+
data: serializedData,
|
|
62
|
+
transformResponse: fromRes,
|
|
63
|
+
};
|
|
64
|
+
return metadata;
|
|
65
|
+
}
|
|
66
|
+
__createOAuthApp.fromReq = fromReq;
|
|
67
|
+
return __createOAuthApp;
|
|
68
|
+
}
|
|
69
|
+
/** Retrieves an OAuth app by ID. */
|
|
70
|
+
export function getOAuthApp(payload) {
|
|
71
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_getOAuthAppRequest, {});
|
|
72
|
+
const { fromJSON: fromRes } = serializer(_getOAuthAppResponse, { _oAuthApp });
|
|
73
|
+
function __getOAuthApp({ host }) {
|
|
74
|
+
const serializedData = toReq(payload);
|
|
75
|
+
const metadata = {
|
|
76
|
+
entityFqdn: 'wix.headless.v1.o_auth_app',
|
|
77
|
+
method: 'GET',
|
|
78
|
+
methodFqn: 'wix.headless.v1.OAuthAppService.GetOAuthApp',
|
|
79
|
+
url: resolveWixHeadlessV1OAuthAppServiceUrl({
|
|
80
|
+
protoPath: '/v1/oauth-apps/{oAuthAppId}',
|
|
81
|
+
data: serializedData,
|
|
82
|
+
host,
|
|
83
|
+
}),
|
|
84
|
+
params: toURLSearchParams(serializedData),
|
|
85
|
+
transformResponse: fromRes,
|
|
86
|
+
};
|
|
87
|
+
return metadata;
|
|
88
|
+
}
|
|
89
|
+
__getOAuthApp.fromReq = fromReq;
|
|
90
|
+
return __getOAuthApp;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Updates an OAuth app.
|
|
94
|
+
*
|
|
95
|
+
*
|
|
96
|
+
* Only fields provided in `mask` are updated.
|
|
97
|
+
*
|
|
98
|
+
* You can update the following fields:
|
|
99
|
+
* + `name`
|
|
100
|
+
* + `description`
|
|
101
|
+
* + `allowedDomain`
|
|
102
|
+
* + `loginUrl`
|
|
103
|
+
*/
|
|
104
|
+
export function updateOAuthApp(payload) {
|
|
105
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateOAuthAppRequest, { _oAuthApp });
|
|
106
|
+
const { fromJSON: fromRes } = serializer(_updateOAuthAppResponse, {
|
|
107
|
+
_oAuthApp,
|
|
108
|
+
});
|
|
109
|
+
function __updateOAuthApp({ host }) {
|
|
110
|
+
const serializedData = toReq(payload);
|
|
111
|
+
const metadata = {
|
|
112
|
+
entityFqdn: 'wix.headless.v1.o_auth_app',
|
|
113
|
+
method: 'PATCH',
|
|
114
|
+
methodFqn: 'wix.headless.v1.OAuthAppService.UpdateOAuthApp',
|
|
115
|
+
url: resolveWixHeadlessV1OAuthAppServiceUrl({
|
|
116
|
+
protoPath: '/v1/oauth-apps/{oAuthApp.id}',
|
|
117
|
+
data: serializedData,
|
|
118
|
+
host,
|
|
119
|
+
}),
|
|
120
|
+
data: serializedData,
|
|
121
|
+
transformResponse: fromRes,
|
|
122
|
+
};
|
|
123
|
+
return metadata;
|
|
124
|
+
}
|
|
125
|
+
__updateOAuthApp.fromReq = fromReq;
|
|
126
|
+
return __updateOAuthApp;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Retrieves a list of OAuth apps, given the provided paging, filtering, and sorting.
|
|
130
|
+
*
|
|
131
|
+
*
|
|
132
|
+
* Query OAuth Apps runs with these defaults, which you can override:
|
|
133
|
+
* + Results are sorted by `id` in descending order.
|
|
134
|
+
* + `paging.offset` is `0`.
|
|
135
|
+
*/
|
|
136
|
+
export function queryOAuthApps(payload) {
|
|
137
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_queryOAuthAppsRequest, {});
|
|
138
|
+
const { fromJSON: fromRes } = serializer(_queryOAuthAppsResponse, {
|
|
139
|
+
_oAuthApp,
|
|
140
|
+
});
|
|
141
|
+
function __queryOAuthApps({ host }) {
|
|
142
|
+
const serializedData = toReq(payload);
|
|
143
|
+
const metadata = {
|
|
144
|
+
entityFqdn: 'wix.headless.v1.o_auth_app',
|
|
145
|
+
method: 'POST',
|
|
146
|
+
methodFqn: 'wix.headless.v1.OAuthAppService.QueryOAuthApps',
|
|
147
|
+
url: resolveWixHeadlessV1OAuthAppServiceUrl({
|
|
148
|
+
protoPath: '/v1/oauth-apps/query',
|
|
149
|
+
data: serializedData,
|
|
150
|
+
host,
|
|
151
|
+
}),
|
|
152
|
+
data: serializedData,
|
|
153
|
+
transformResponse: fromRes,
|
|
154
|
+
};
|
|
155
|
+
return metadata;
|
|
156
|
+
}
|
|
157
|
+
__queryOAuthApps.fromReq = fromReq;
|
|
158
|
+
return __queryOAuthApps;
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=headless-v1-o-auth-app.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-v1-o-auth-app.http.js","sourceRoot":"","sources":["../../../src/headless-v1-o-auth-app.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAA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M,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,4BAA4B;YACxC,MAAM,EAAE,MAAa;YACrB,SAAS,EAAE,gDAAgD;YAC3D,GAAG,EAAE,sCAAsC,CAAC;gBAC1C,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gBAAgB,CAAC,OAAO,GAAG,OAAO,CAAC;IAEnC,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { OAuthApp, UpdateOAuthApp } from './headless-v1-o-auth-app.universal';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function createOAuthApp(httpClient: HttpClient): (oAuthApp: OAuthApp) => Promise<OAuthApp>;
|
|
7
|
+
export declare function getOAuthApp(httpClient: HttpClient): (oAuthAppId: string) => Promise<OAuthApp>;
|
|
8
|
+
export declare function updateOAuthApp(httpClient: HttpClient): (_id: string | null, oAuthApp: UpdateOAuthApp, mask: string[]) => Promise<OAuthApp>;
|
|
9
|
+
export declare function queryOAuthApps(httpClient: HttpClient): () => import("./headless-v1-o-auth-app.universal").OAuthAppsQueryBuilder;
|
|
10
|
+
export { SortOrder } from './headless-v1-o-auth-app.universal';
|
|
11
|
+
export { OAuthApp, CreateOAuthAppRequest, CreateOAuthAppResponse, GetOAuthAppRequest, GetOAuthAppResponse, UpdateOAuthAppRequest, UpdateOAuthAppResponse, DeleteOAuthAppRequest, DeleteOAuthAppResponse, QueryOAuthAppsRequest, PlatformQuery, PlatformQueryPagingMethodOneOf, Sorting, Paging, CursorPaging, QueryOAuthAppsResponse, PagingMetadataV2, Cursors, UpdateOAuthApp, OAuthAppsQueryResult, OAuthAppsQueryBuilder, } from './headless-v1-o-auth-app.universal';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createOAuthApp as universalCreateOAuthApp, getOAuthApp as universalGetOAuthApp, updateOAuthApp as universalUpdateOAuthApp, queryOAuthApps as universalQueryOAuthApps, } from './headless-v1-o-auth-app.universal';
|
|
2
|
+
export const __metadata = { PACKAGE_NAME: '@wix/auth-management' };
|
|
3
|
+
export function createOAuthApp(httpClient) {
|
|
4
|
+
return (oAuthApp) => universalCreateOAuthApp(oAuthApp,
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
{ httpClient });
|
|
7
|
+
}
|
|
8
|
+
export function getOAuthApp(httpClient) {
|
|
9
|
+
return (oAuthAppId) => universalGetOAuthApp(oAuthAppId,
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
{ httpClient });
|
|
12
|
+
}
|
|
13
|
+
export function updateOAuthApp(httpClient) {
|
|
14
|
+
return (_id, oAuthApp, mask) => universalUpdateOAuthApp(_id, oAuthApp, mask,
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
{ httpClient });
|
|
17
|
+
}
|
|
18
|
+
export function queryOAuthApps(httpClient) {
|
|
19
|
+
return () => universalQueryOAuthApps(
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
{ httpClient });
|
|
22
|
+
}
|
|
23
|
+
export { SortOrder } from './headless-v1-o-auth-app.universal';
|
|
24
|
+
//# sourceMappingURL=headless-v1-o-auth-app.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-v1-o-auth-app.public.js","sourceRoot":"","sources":["../../../src/headless-v1-o-auth-app.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,IAAI,uBAAuB,EACzC,WAAW,IAAI,oBAAoB,EACnC,cAAc,IAAI,uBAAuB,EACzC,cAAc,IAAI,uBAAuB,GAG1C,MAAM,oCAAoC,CAAC;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,sBAAsB,EAAE,CAAC;AAEnE,MAAM,UAAU,cAAc,CAAC,UAAsB;IACnD,OAAO,CAAC,QAAkB,EAAE,EAAE,CAC5B,uBAAuB,CACrB,QAAQ;IACR,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,UAAkB,EAAE,EAAE,CAC5B,oBAAoB,CAClB,UAAU;IACV,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,UAAsB;IACnD,OAAO,CAAC,GAAkB,EAAE,QAAwB,EAAE,IAAc,EAAE,EAAE,CACtE,uBAAuB,CACrB,GAAG,EACH,QAAQ,EACR,IAAI;IACJ,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,UAAsB;IACnD,OAAO,GAAG,EAAE,CACV,uBAAuB;IACrB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/** An intermediary application that authorizes and authenticates an external client to access data on a Wix project or site. */
|
|
2
|
+
export interface OAuthApp {
|
|
3
|
+
/**
|
|
4
|
+
* ID of the OAuth app.
|
|
5
|
+
* @readonly
|
|
6
|
+
*/
|
|
7
|
+
id?: string | null;
|
|
8
|
+
/**
|
|
9
|
+
* Date and time the OAuth app was created, in ISO 8601 format.
|
|
10
|
+
* @readonly
|
|
11
|
+
*/
|
|
12
|
+
createdDate?: Date;
|
|
13
|
+
/** Display name of the OAuth app, as it appears in the dashboard. */
|
|
14
|
+
name?: string | null;
|
|
15
|
+
/** Description of the OAuth app, as it appears in the dashboard. */
|
|
16
|
+
description?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Client secret for the OAuth app. **Note:** This is returned only when the OAuth app is created. It can't be retrieved later.
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
secret?: string | null;
|
|
22
|
+
/** External login URL to which users are redirected automatically to authenticate. If no login URL is specified, the user is redirected to Wix to authenticate. */
|
|
23
|
+
loginUrl?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
* List of URIs to which redirection from Wix is allowed after authentication.
|
|
26
|
+
*
|
|
27
|
+
* When a client redirects a user to Wix for authentication, the client provides a URI to redirect the user back to after the user has been authenticated.
|
|
28
|
+
* Wix only redirects the user if the exact URI is contained in this array.
|
|
29
|
+
*/
|
|
30
|
+
allowedRedirectUris?: string[];
|
|
31
|
+
/**
|
|
32
|
+
* List of domains to which redirection from Wix is allowed after processes other than authentication.
|
|
33
|
+
*
|
|
34
|
+
* When a client redirects a user to a Wix page (for example, for checkout), the client provides a URL to redirect the user back to.
|
|
35
|
+
* Wix only redirects the user if the URL is in one of the specified domains.
|
|
36
|
+
*/
|
|
37
|
+
allowedRedirectDomains?: string[];
|
|
38
|
+
}
|
|
39
|
+
export interface CreateOAuthAppRequest {
|
|
40
|
+
/** OAuth app to create. */
|
|
41
|
+
oAuthApp: OAuthApp;
|
|
42
|
+
}
|
|
43
|
+
export interface CreateOAuthAppResponse {
|
|
44
|
+
/** Created OAuth app info. */
|
|
45
|
+
oAuthApp?: OAuthApp;
|
|
46
|
+
}
|
|
47
|
+
export interface GetOAuthAppRequest {
|
|
48
|
+
/** ID of the OAuth app to retrieve. */
|
|
49
|
+
oAuthAppId: string;
|
|
50
|
+
}
|
|
51
|
+
export interface GetOAuthAppResponse {
|
|
52
|
+
/** Retrieved OAuth app info. */
|
|
53
|
+
oAuthApp?: OAuthApp;
|
|
54
|
+
}
|
|
55
|
+
export interface UpdateOAuthAppRequest {
|
|
56
|
+
/** Updated OAuth app details. May include some or all fields. */
|
|
57
|
+
oAuthApp: OAuthApp;
|
|
58
|
+
/** Explicit list of fields to update. Only fields listed are updated. */
|
|
59
|
+
mask: string[];
|
|
60
|
+
}
|
|
61
|
+
export interface UpdateOAuthAppResponse {
|
|
62
|
+
/** Updated OAuth app info. */
|
|
63
|
+
oAuthApp?: OAuthApp;
|
|
64
|
+
}
|
|
65
|
+
export interface DeleteOAuthAppRequest {
|
|
66
|
+
/** ID of the OAuth app to delete. */
|
|
67
|
+
oAuthAppId?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface DeleteOAuthAppResponse {
|
|
70
|
+
}
|
|
71
|
+
export interface QueryOAuthAppsRequest {
|
|
72
|
+
/** Query options. */
|
|
73
|
+
query?: PlatformQuery;
|
|
74
|
+
}
|
|
75
|
+
export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
76
|
+
/** Paging options to limit and skip the number of items. */
|
|
77
|
+
paging?: Paging;
|
|
78
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
79
|
+
cursorPaging?: CursorPaging;
|
|
80
|
+
/**
|
|
81
|
+
* Filter object in the following format:
|
|
82
|
+
* `"filter" : {
|
|
83
|
+
* "fieldName1": "value1",
|
|
84
|
+
* "fieldName2":{"$operator":"value2"}
|
|
85
|
+
* }`
|
|
86
|
+
* Example of operators: `$eq`
|
|
87
|
+
*/
|
|
88
|
+
filter?: Record<string, any> | null;
|
|
89
|
+
/**
|
|
90
|
+
* Sort object in the following format:
|
|
91
|
+
* `[{"fieldName":"name","order":"ASC"},{"fieldName":"created_date","order":"DESC"}]`
|
|
92
|
+
*/
|
|
93
|
+
sort?: Sorting[];
|
|
94
|
+
}
|
|
95
|
+
/** @oneof */
|
|
96
|
+
export interface PlatformQueryPagingMethodOneOf {
|
|
97
|
+
/** Paging options to limit and skip the number of items. */
|
|
98
|
+
paging?: Paging;
|
|
99
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
100
|
+
cursorPaging?: CursorPaging;
|
|
101
|
+
}
|
|
102
|
+
export interface Sorting {
|
|
103
|
+
/** Name of the field to sort by. */
|
|
104
|
+
fieldName?: string;
|
|
105
|
+
/** Sort order. */
|
|
106
|
+
order?: SortOrder;
|
|
107
|
+
}
|
|
108
|
+
export declare enum SortOrder {
|
|
109
|
+
ASC = "ASC",
|
|
110
|
+
DESC = "DESC"
|
|
111
|
+
}
|
|
112
|
+
export interface Paging {
|
|
113
|
+
/** Number of items to load. */
|
|
114
|
+
limit?: number | null;
|
|
115
|
+
/** Number of items to skip in the current sort order. */
|
|
116
|
+
offset?: number | null;
|
|
117
|
+
}
|
|
118
|
+
export interface CursorPaging {
|
|
119
|
+
/** Number of items to load. */
|
|
120
|
+
limit?: number | null;
|
|
121
|
+
/**
|
|
122
|
+
* Pointer to the next or previous page in the list of results.
|
|
123
|
+
*
|
|
124
|
+
* You can get the relevant cursor token
|
|
125
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
126
|
+
* Not relevant for the first request.
|
|
127
|
+
*/
|
|
128
|
+
cursor?: string | null;
|
|
129
|
+
}
|
|
130
|
+
export interface QueryOAuthAppsResponse {
|
|
131
|
+
/** List of OAuth apps matching the query. */
|
|
132
|
+
oAuthApps?: OAuthApp[];
|
|
133
|
+
/** Paging metadata. */
|
|
134
|
+
pagingMetadata?: PagingMetadataV2;
|
|
135
|
+
}
|
|
136
|
+
export interface PagingMetadataV2 {
|
|
137
|
+
/** Number of items returned in the response. */
|
|
138
|
+
count?: number | null;
|
|
139
|
+
/** Offset that was requested. */
|
|
140
|
+
offset?: number | null;
|
|
141
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
142
|
+
total?: number | null;
|
|
143
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
144
|
+
tooManyToCount?: boolean | null;
|
|
145
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
146
|
+
cursors?: Cursors;
|
|
147
|
+
}
|
|
148
|
+
export interface Cursors {
|
|
149
|
+
/** Cursor pointing to next page in the list of results. */
|
|
150
|
+
next?: string | null;
|
|
151
|
+
/** Cursor pointing to previous page in the list of results. */
|
|
152
|
+
prev?: string | null;
|
|
153
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-v1-o-auth-app.types.js","sourceRoot":"","sources":["../../../src/headless-v1-o-auth-app.types.ts"],"names":[],"mappings":"AAuHA,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB"}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
export declare const __debug: {
|
|
2
|
+
verboseLogging: {
|
|
3
|
+
on: () => boolean;
|
|
4
|
+
off: () => boolean;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
/** An intermediary application that authorizes and authenticates an external client to access data on a Wix project or site. */
|
|
8
|
+
export interface OAuthApp {
|
|
9
|
+
/**
|
|
10
|
+
* ID of the OAuth app.
|
|
11
|
+
* @readonly
|
|
12
|
+
*/
|
|
13
|
+
_id?: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Date and time the OAuth app was created, in ISO 8601 format.
|
|
16
|
+
* @readonly
|
|
17
|
+
*/
|
|
18
|
+
_createdDate?: Date;
|
|
19
|
+
/** Display name of the OAuth app, as it appears in the dashboard. */
|
|
20
|
+
name?: string | null;
|
|
21
|
+
/** Description of the OAuth app, as it appears in the dashboard. */
|
|
22
|
+
description?: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Client secret for the OAuth app. **Note:** This is returned only when the OAuth app is created. It can't be retrieved later.
|
|
25
|
+
* @readonly
|
|
26
|
+
*/
|
|
27
|
+
secret?: string | null;
|
|
28
|
+
/** External login URL to which users are redirected automatically to authenticate. If no login URL is specified, the user is redirected to Wix to authenticate. */
|
|
29
|
+
loginUrl?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* List of URIs to which redirection from Wix is allowed after authentication.
|
|
32
|
+
*
|
|
33
|
+
* When a client redirects a user to Wix for authentication, the client provides a URI to redirect the user back to after the user has been authenticated.
|
|
34
|
+
* Wix only redirects the user if the exact URI is contained in this array.
|
|
35
|
+
*/
|
|
36
|
+
allowedRedirectUris?: string[];
|
|
37
|
+
/**
|
|
38
|
+
* List of domains to which redirection from Wix is allowed after processes other than authentication.
|
|
39
|
+
*
|
|
40
|
+
* When a client redirects a user to a Wix page (for example, for checkout), the client provides a URL to redirect the user back to.
|
|
41
|
+
* Wix only redirects the user if the URL is in one of the specified domains.
|
|
42
|
+
*/
|
|
43
|
+
allowedRedirectDomains?: string[];
|
|
44
|
+
}
|
|
45
|
+
export interface CreateOAuthAppRequest {
|
|
46
|
+
/** OAuth app to create. */
|
|
47
|
+
oAuthApp: OAuthApp;
|
|
48
|
+
}
|
|
49
|
+
export interface CreateOAuthAppResponse {
|
|
50
|
+
/** Created OAuth app info. */
|
|
51
|
+
oAuthApp?: OAuthApp;
|
|
52
|
+
}
|
|
53
|
+
export interface GetOAuthAppRequest {
|
|
54
|
+
/** ID of the OAuth app to retrieve. */
|
|
55
|
+
oAuthAppId: string;
|
|
56
|
+
}
|
|
57
|
+
export interface GetOAuthAppResponse {
|
|
58
|
+
/** Retrieved OAuth app info. */
|
|
59
|
+
oAuthApp?: OAuthApp;
|
|
60
|
+
}
|
|
61
|
+
export interface UpdateOAuthAppRequest {
|
|
62
|
+
/** Updated OAuth app details. May include some or all fields. */
|
|
63
|
+
oAuthApp: OAuthApp;
|
|
64
|
+
/** Explicit list of fields to update. Only fields listed are updated. */
|
|
65
|
+
mask: string[];
|
|
66
|
+
}
|
|
67
|
+
export interface UpdateOAuthAppResponse {
|
|
68
|
+
/** Updated OAuth app info. */
|
|
69
|
+
oAuthApp?: OAuthApp;
|
|
70
|
+
}
|
|
71
|
+
export interface DeleteOAuthAppRequest {
|
|
72
|
+
/** ID of the OAuth app to delete. */
|
|
73
|
+
oAuthAppId?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface DeleteOAuthAppResponse {
|
|
76
|
+
}
|
|
77
|
+
export interface QueryOAuthAppsRequest {
|
|
78
|
+
/** Query options. */
|
|
79
|
+
query?: PlatformQuery;
|
|
80
|
+
}
|
|
81
|
+
export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
82
|
+
/** Paging options to limit and skip the number of items. */
|
|
83
|
+
paging?: Paging;
|
|
84
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
85
|
+
cursorPaging?: CursorPaging;
|
|
86
|
+
/**
|
|
87
|
+
* Filter object in the following format:
|
|
88
|
+
* `"filter" : {
|
|
89
|
+
* "fieldName1": "value1",
|
|
90
|
+
* "fieldName2":{"$operator":"value2"}
|
|
91
|
+
* }`
|
|
92
|
+
* Example of operators: `$eq`
|
|
93
|
+
*/
|
|
94
|
+
filter?: Record<string, any> | null;
|
|
95
|
+
/**
|
|
96
|
+
* Sort object in the following format:
|
|
97
|
+
* `[{"fieldName":"name","order":"ASC"},{"fieldName":"created_date","order":"DESC"}]`
|
|
98
|
+
*/
|
|
99
|
+
sort?: Sorting[];
|
|
100
|
+
}
|
|
101
|
+
/** @oneof */
|
|
102
|
+
export interface PlatformQueryPagingMethodOneOf {
|
|
103
|
+
/** Paging options to limit and skip the number of items. */
|
|
104
|
+
paging?: Paging;
|
|
105
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
106
|
+
cursorPaging?: CursorPaging;
|
|
107
|
+
}
|
|
108
|
+
export interface Sorting {
|
|
109
|
+
/** Name of the field to sort by. */
|
|
110
|
+
fieldName?: string;
|
|
111
|
+
/** Sort order. */
|
|
112
|
+
order?: SortOrder;
|
|
113
|
+
}
|
|
114
|
+
export declare enum SortOrder {
|
|
115
|
+
ASC = "ASC",
|
|
116
|
+
DESC = "DESC"
|
|
117
|
+
}
|
|
118
|
+
export interface Paging {
|
|
119
|
+
/** Number of items to load. */
|
|
120
|
+
limit?: number | null;
|
|
121
|
+
/** Number of items to skip in the current sort order. */
|
|
122
|
+
offset?: number | null;
|
|
123
|
+
}
|
|
124
|
+
export interface CursorPaging {
|
|
125
|
+
/** Number of items to load. */
|
|
126
|
+
limit?: number | null;
|
|
127
|
+
/**
|
|
128
|
+
* Pointer to the next or previous page in the list of results.
|
|
129
|
+
*
|
|
130
|
+
* You can get the relevant cursor token
|
|
131
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
132
|
+
* Not relevant for the first request.
|
|
133
|
+
*/
|
|
134
|
+
cursor?: string | null;
|
|
135
|
+
}
|
|
136
|
+
export interface QueryOAuthAppsResponse {
|
|
137
|
+
/** List of OAuth apps matching the query. */
|
|
138
|
+
oAuthApps?: OAuthApp[];
|
|
139
|
+
/** Paging metadata. */
|
|
140
|
+
pagingMetadata?: PagingMetadataV2;
|
|
141
|
+
}
|
|
142
|
+
export interface PagingMetadataV2 {
|
|
143
|
+
/** Number of items returned in the response. */
|
|
144
|
+
count?: number | null;
|
|
145
|
+
/** Offset that was requested. */
|
|
146
|
+
offset?: number | null;
|
|
147
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
148
|
+
total?: number | null;
|
|
149
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
150
|
+
tooManyToCount?: boolean | null;
|
|
151
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
152
|
+
cursors?: Cursors;
|
|
153
|
+
}
|
|
154
|
+
export interface Cursors {
|
|
155
|
+
/** Cursor pointing to next page in the list of results. */
|
|
156
|
+
next?: string | null;
|
|
157
|
+
/** Cursor pointing to previous page in the list of results. */
|
|
158
|
+
prev?: string | null;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Creates a new OAuth app for a Wix Headless client.
|
|
162
|
+
*
|
|
163
|
+
*
|
|
164
|
+
* An OAuth app authorizes an external client app or site, on any platform, to authenticate with a Wix site or project and manage its data.
|
|
165
|
+
*
|
|
166
|
+
* > **Note:** The OAuth app secret is returned only when creating the OAuth app, and can't be retrieved later. Store the secret in a secure location.
|
|
167
|
+
* @param oAuthApp - OAuth app to create.
|
|
168
|
+
* @public
|
|
169
|
+
* @documentationMaturity preview
|
|
170
|
+
* @requiredField oAuthApp
|
|
171
|
+
* @requiredField oAuthApp.name
|
|
172
|
+
* @returns Created OAuth app info.
|
|
173
|
+
*/
|
|
174
|
+
export declare function createOAuthApp(oAuthApp: OAuthApp): Promise<OAuthApp>;
|
|
175
|
+
/**
|
|
176
|
+
* Retrieves an OAuth app by ID.
|
|
177
|
+
* @param oAuthAppId - ID of the OAuth app to retrieve.
|
|
178
|
+
* @public
|
|
179
|
+
* @documentationMaturity preview
|
|
180
|
+
* @requiredField oAuthAppId
|
|
181
|
+
* @returns Retrieved OAuth app info.
|
|
182
|
+
*/
|
|
183
|
+
export declare function getOAuthApp(oAuthAppId: string): Promise<OAuthApp>;
|
|
184
|
+
/**
|
|
185
|
+
* Updates an OAuth app.
|
|
186
|
+
*
|
|
187
|
+
*
|
|
188
|
+
* Only fields provided in `mask` are updated.
|
|
189
|
+
*
|
|
190
|
+
* You can update the following fields:
|
|
191
|
+
* + `name`
|
|
192
|
+
* + `description`
|
|
193
|
+
* + `allowedDomain`
|
|
194
|
+
* + `loginUrl`
|
|
195
|
+
* @param _id - ID of the OAuth app.
|
|
196
|
+
* @param mask - Explicit list of fields to update. Only fields listed are updated.
|
|
197
|
+
* @public
|
|
198
|
+
* @documentationMaturity preview
|
|
199
|
+
* @requiredField _id
|
|
200
|
+
* @requiredField mask
|
|
201
|
+
* @requiredField oAuthApp
|
|
202
|
+
* @returns Updated OAuth app info.
|
|
203
|
+
*/
|
|
204
|
+
export declare function updateOAuthApp(_id: string | null, oAuthApp: UpdateOAuthApp, mask: string[]): Promise<OAuthApp>;
|
|
205
|
+
export interface UpdateOAuthApp {
|
|
206
|
+
/**
|
|
207
|
+
* ID of the OAuth app.
|
|
208
|
+
* @readonly
|
|
209
|
+
*/
|
|
210
|
+
_id?: string | null;
|
|
211
|
+
/**
|
|
212
|
+
* Date and time the OAuth app was created, in ISO 8601 format.
|
|
213
|
+
* @readonly
|
|
214
|
+
*/
|
|
215
|
+
_createdDate?: Date;
|
|
216
|
+
/** Display name of the OAuth app, as it appears in the dashboard. */
|
|
217
|
+
name?: string | null;
|
|
218
|
+
/** Description of the OAuth app, as it appears in the dashboard. */
|
|
219
|
+
description?: string | null;
|
|
220
|
+
/**
|
|
221
|
+
* Client secret for the OAuth app. **Note:** This is returned only when the OAuth app is created. It can't be retrieved later.
|
|
222
|
+
* @readonly
|
|
223
|
+
*/
|
|
224
|
+
secret?: string | null;
|
|
225
|
+
/** External login URL to which users are redirected automatically to authenticate. If no login URL is specified, the user is redirected to Wix to authenticate. */
|
|
226
|
+
loginUrl?: string | null;
|
|
227
|
+
/**
|
|
228
|
+
* List of URIs to which redirection from Wix is allowed after authentication.
|
|
229
|
+
*
|
|
230
|
+
* When a client redirects a user to Wix for authentication, the client provides a URI to redirect the user back to after the user has been authenticated.
|
|
231
|
+
* Wix only redirects the user if the exact URI is contained in this array.
|
|
232
|
+
*/
|
|
233
|
+
allowedRedirectUris?: string[];
|
|
234
|
+
/**
|
|
235
|
+
* List of domains to which redirection from Wix is allowed after processes other than authentication.
|
|
236
|
+
*
|
|
237
|
+
* When a client redirects a user to a Wix page (for example, for checkout), the client provides a URL to redirect the user back to.
|
|
238
|
+
* Wix only redirects the user if the URL is in one of the specified domains.
|
|
239
|
+
*/
|
|
240
|
+
allowedRedirectDomains?: string[];
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Retrieves a list of OAuth apps, given the provided paging, filtering, and sorting.
|
|
244
|
+
*
|
|
245
|
+
*
|
|
246
|
+
* Query OAuth Apps runs with these defaults, which you can override:
|
|
247
|
+
* + Results are sorted by `id` in descending order.
|
|
248
|
+
* + `paging.offset` is `0`.
|
|
249
|
+
* @public
|
|
250
|
+
* @documentationMaturity preview
|
|
251
|
+
*/
|
|
252
|
+
export declare function queryOAuthApps(): OAuthAppsQueryBuilder;
|
|
253
|
+
interface QueryOffsetResult {
|
|
254
|
+
currentPage: number;
|
|
255
|
+
totalPages: number;
|
|
256
|
+
totalCount: number;
|
|
257
|
+
hasNext: () => boolean;
|
|
258
|
+
hasPrev: () => boolean;
|
|
259
|
+
length: number;
|
|
260
|
+
pageSize: number;
|
|
261
|
+
}
|
|
262
|
+
export interface OAuthAppsQueryResult extends QueryOffsetResult {
|
|
263
|
+
items: OAuthApp[];
|
|
264
|
+
query: OAuthAppsQueryBuilder;
|
|
265
|
+
next: () => Promise<OAuthAppsQueryResult>;
|
|
266
|
+
prev: () => Promise<OAuthAppsQueryResult>;
|
|
267
|
+
}
|
|
268
|
+
export interface OAuthAppsQueryBuilder {
|
|
269
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
270
|
+
* @param value - Value to compare against.
|
|
271
|
+
* @documentationMaturity preview
|
|
272
|
+
*/
|
|
273
|
+
eq: (propertyName: '_id', value: any) => OAuthAppsQueryBuilder;
|
|
274
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
275
|
+
* @documentationMaturity preview
|
|
276
|
+
*/
|
|
277
|
+
ascending: (...propertyNames: Array<'_createdDate' | 'name'>) => OAuthAppsQueryBuilder;
|
|
278
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
279
|
+
* @documentationMaturity preview
|
|
280
|
+
*/
|
|
281
|
+
descending: (...propertyNames: Array<'_createdDate' | 'name'>) => OAuthAppsQueryBuilder;
|
|
282
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
283
|
+
* @documentationMaturity preview
|
|
284
|
+
*/
|
|
285
|
+
limit: (limit: number) => OAuthAppsQueryBuilder;
|
|
286
|
+
/** @param skip - Number of items to skip in the query results before returning the results.
|
|
287
|
+
* @documentationMaturity preview
|
|
288
|
+
*/
|
|
289
|
+
skip: (skip: number) => OAuthAppsQueryBuilder;
|
|
290
|
+
/** @documentationMaturity preview */
|
|
291
|
+
find: () => Promise<OAuthAppsQueryResult>;
|
|
292
|
+
}
|
|
293
|
+
export {};
|