@wix/auth-management 1.0.16 → 1.0.18
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/context.d.ts +1 -1
- package/build/cjs/context.js +1 -1
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -1
- package/build/cjs/meta.js +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +1 -1
- package/build/es/context.js +1 -1
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +1 -1
- package/build/es/index.js +1 -1
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +1 -1
- package/build/es/meta.js +1 -1
- package/build/es/meta.js.map +1 -1
- package/package.json +11 -9
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -28
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/headless-v1-o-auth-app.context.d.ts +0 -6
- package/build/cjs/src/headless-v1-o-auth-app.context.js +0 -73
- package/build/cjs/src/headless-v1-o-auth-app.context.js.map +0 -1
- package/build/cjs/src/headless-v1-o-auth-app.http.d.ts +0 -35
- package/build/cjs/src/headless-v1-o-auth-app.http.js +0 -179
- package/build/cjs/src/headless-v1-o-auth-app.http.js.map +0 -1
- package/build/cjs/src/headless-v1-o-auth-app.meta.d.ts +0 -20
- package/build/cjs/src/headless-v1-o-auth-app.meta.js +0 -104
- package/build/cjs/src/headless-v1-o-auth-app.meta.js.map +0 -1
- package/build/cjs/src/headless-v1-o-auth-app.public.d.ts +0 -21
- package/build/cjs/src/headless-v1-o-auth-app.public.js +0 -40
- package/build/cjs/src/headless-v1-o-auth-app.public.js.map +0 -1
- package/build/cjs/src/headless-v1-o-auth-app.types.d.ts +0 -532
- package/build/cjs/src/headless-v1-o-auth-app.types.js +0 -100
- package/build/cjs/src/headless-v1-o-auth-app.types.js.map +0 -1
- package/build/cjs/src/headless-v1-o-auth-app.universal.d.ts +0 -697
- package/build/cjs/src/headless-v1-o-auth-app.universal.js +0 -415
- package/build/cjs/src/headless-v1-o-auth-app.universal.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/headless-v1-o-auth-app.context.d.ts +0 -6
- package/build/es/src/headless-v1-o-auth-app.context.js +0 -66
- package/build/es/src/headless-v1-o-auth-app.context.js.map +0 -1
- package/build/es/src/headless-v1-o-auth-app.http.d.ts +0 -35
- package/build/es/src/headless-v1-o-auth-app.http.js +0 -172
- package/build/es/src/headless-v1-o-auth-app.http.js.map +0 -1
- package/build/es/src/headless-v1-o-auth-app.meta.d.ts +0 -20
- package/build/es/src/headless-v1-o-auth-app.meta.js +0 -74
- package/build/es/src/headless-v1-o-auth-app.meta.js.map +0 -1
- package/build/es/src/headless-v1-o-auth-app.public.d.ts +0 -21
- package/build/es/src/headless-v1-o-auth-app.public.js +0 -25
- package/build/es/src/headless-v1-o-auth-app.public.js.map +0 -1
- package/build/es/src/headless-v1-o-auth-app.types.d.ts +0 -532
- package/build/es/src/headless-v1-o-auth-app.types.js +0 -97
- package/build/es/src/headless-v1-o-auth-app.types.js.map +0 -1
- package/build/es/src/headless-v1-o-auth-app.universal.d.ts +0 -697
- package/build/es/src/headless-v1-o-auth-app.universal.js +0 -385
- package/build/es/src/headless-v1-o-auth-app.universal.js.map +0 -1
|
@@ -1,415 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.queryOAuthApps = exports.updateOAuthApp = exports.getOAuthApp = exports.createOAuthApp = exports.onOAuthAppDeleted = exports.onOAuthAppUpdated = exports.onOAuthAppCreated = exports.DeleteStatus = exports.Namespace = exports.SiteCreatedContext = exports.State = exports.SortOrder = void 0;
|
|
36
|
-
const velo_1 = require("@wix/metro-runtime/velo");
|
|
37
|
-
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
38
|
-
const sdk_types_1 = require("@wix/sdk-types");
|
|
39
|
-
const ambassadorWixHeadlessV1OAuthApp = __importStar(require("./headless-v1-o-auth-app.http"));
|
|
40
|
-
// @ts-ignore
|
|
41
|
-
const motion_edm_autogen_query_wrapper_1 = require("@wix/motion-edm-autogen-query-wrapper");
|
|
42
|
-
const _toVeloEntity = '$';
|
|
43
|
-
const _fromVeloEntity = '$';
|
|
44
|
-
var SortOrder;
|
|
45
|
-
(function (SortOrder) {
|
|
46
|
-
SortOrder["ASC"] = "ASC";
|
|
47
|
-
SortOrder["DESC"] = "DESC";
|
|
48
|
-
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
49
|
-
var State;
|
|
50
|
-
(function (State) {
|
|
51
|
-
State["UNKNOWN"] = "UNKNOWN";
|
|
52
|
-
State["ENABLED"] = "ENABLED";
|
|
53
|
-
State["DISABLED"] = "DISABLED";
|
|
54
|
-
State["PENDING"] = "PENDING";
|
|
55
|
-
State["DEMO"] = "DEMO";
|
|
56
|
-
})(State || (exports.State = State = {}));
|
|
57
|
-
var SiteCreatedContext;
|
|
58
|
-
(function (SiteCreatedContext) {
|
|
59
|
-
/** A valid option, we don't expose all reasons why site might be created. */
|
|
60
|
-
SiteCreatedContext["OTHER"] = "OTHER";
|
|
61
|
-
/** A meta site was created from template. */
|
|
62
|
-
SiteCreatedContext["FROM_TEMPLATE"] = "FROM_TEMPLATE";
|
|
63
|
-
/** A meta site was created by copying of the transfferred meta site. */
|
|
64
|
-
SiteCreatedContext["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
|
|
65
|
-
/** A copy of existing meta site. */
|
|
66
|
-
SiteCreatedContext["DUPLICATE"] = "DUPLICATE";
|
|
67
|
-
/** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
|
|
68
|
-
SiteCreatedContext["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
|
|
69
|
-
/** deprecated A meta site was created for Flash editor. */
|
|
70
|
-
SiteCreatedContext["FLASH"] = "FLASH";
|
|
71
|
-
})(SiteCreatedContext || (exports.SiteCreatedContext = SiteCreatedContext = {}));
|
|
72
|
-
var Namespace;
|
|
73
|
-
(function (Namespace) {
|
|
74
|
-
Namespace["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
|
|
75
|
-
/** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
|
|
76
|
-
Namespace["WIX"] = "WIX";
|
|
77
|
-
/** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
78
|
-
Namespace["SHOUT_OUT"] = "SHOUT_OUT";
|
|
79
|
-
/** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
80
|
-
Namespace["ALBUMS"] = "ALBUMS";
|
|
81
|
-
/** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
82
|
-
Namespace["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
|
|
83
|
-
/** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
84
|
-
Namespace["HOTELS"] = "HOTELS";
|
|
85
|
-
/** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
86
|
-
Namespace["CLUBS"] = "CLUBS";
|
|
87
|
-
/** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
88
|
-
Namespace["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
|
|
89
|
-
/** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
90
|
-
Namespace["DEV_SITE"] = "DEV_SITE";
|
|
91
|
-
/** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
92
|
-
Namespace["LOGOS"] = "LOGOS";
|
|
93
|
-
/** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
94
|
-
Namespace["VIDEO_MAKER"] = "VIDEO_MAKER";
|
|
95
|
-
/** MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
96
|
-
Namespace["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
|
|
97
|
-
/** MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
98
|
-
Namespace["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
|
|
99
|
-
/**
|
|
100
|
-
* A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
|
|
101
|
-
*
|
|
102
|
-
* Meta site with this namespace will *not* be shown in a user's site list by default.
|
|
103
|
-
*/
|
|
104
|
-
Namespace["HTML_DRAFT"] = "HTML_DRAFT";
|
|
105
|
-
/**
|
|
106
|
-
* the user-journey for Fitness users who want to start from managing their business instead of designing their website.
|
|
107
|
-
* Will be accessible from Site List and will not have a website app.
|
|
108
|
-
* Once the user attaches a site, the site will become a regular wixsite.
|
|
109
|
-
*/
|
|
110
|
-
Namespace["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
|
|
111
|
-
/** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
|
|
112
|
-
Namespace["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
|
|
113
|
-
/** It is to be used in the Business First efforts. */
|
|
114
|
-
Namespace["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
|
|
115
|
-
/** Bookings business flow with no site. */
|
|
116
|
-
Namespace["ANYWHERE"] = "ANYWHERE";
|
|
117
|
-
/** Namespace for Headless Backoffice with no editor */
|
|
118
|
-
Namespace["HEADLESS"] = "HEADLESS";
|
|
119
|
-
/**
|
|
120
|
-
* Namespace for master site that will exist in parent account that will be referenced by subaccounts
|
|
121
|
-
* The site will be used for account level CSM feature for enterprise
|
|
122
|
-
*/
|
|
123
|
-
Namespace["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
|
|
124
|
-
/** Rise.ai Siteless account management for Gift Cards and Store Credit. */
|
|
125
|
-
Namespace["RISE"] = "RISE";
|
|
126
|
-
/**
|
|
127
|
-
* As part of the branded app new funnel, users now can create a meta site that will be branded app first.
|
|
128
|
-
* There's a blank site behind the scene but it's blank).
|
|
129
|
-
* The Mobile company will be the owner of this namespace.
|
|
130
|
-
*/
|
|
131
|
-
Namespace["BRANDED_FIRST"] = "BRANDED_FIRST";
|
|
132
|
-
})(Namespace || (exports.Namespace = Namespace = {}));
|
|
133
|
-
var DeleteStatus;
|
|
134
|
-
(function (DeleteStatus) {
|
|
135
|
-
DeleteStatus["UNKNOWN"] = "UNKNOWN";
|
|
136
|
-
DeleteStatus["TRASH"] = "TRASH";
|
|
137
|
-
DeleteStatus["DELETED"] = "DELETED";
|
|
138
|
-
DeleteStatus["PENDING_PURGE"] = "PENDING_PURGE";
|
|
139
|
-
})(DeleteStatus || (exports.DeleteStatus = DeleteStatus = {}));
|
|
140
|
-
const _createOAuthAppRequest = {};
|
|
141
|
-
const _createOAuthAppResponse = {};
|
|
142
|
-
const _getOAuthAppRequest = {};
|
|
143
|
-
const _getOAuthAppResponse = {};
|
|
144
|
-
const _queryOAuthAppsRequest = {};
|
|
145
|
-
const _queryOAuthAppsResponse = {};
|
|
146
|
-
const _updateOAuthAppRequest = {};
|
|
147
|
-
const _updateOAuthAppResponse = {};
|
|
148
|
-
const _oAuthApp = { createdDate: 'google.protobuf.Timestamp' };
|
|
149
|
-
exports.onOAuthAppCreated = (0, sdk_types_1.EventDefinition)('wix.headless.v1.o_auth_app_created', true, {
|
|
150
|
-
rootSchema: _oAuthApp,
|
|
151
|
-
depSchemas: {},
|
|
152
|
-
})();
|
|
153
|
-
exports.onOAuthAppUpdated = (0, sdk_types_1.EventDefinition)('wix.headless.v1.o_auth_app_updated', true, {
|
|
154
|
-
rootSchema: _oAuthApp,
|
|
155
|
-
depSchemas: {},
|
|
156
|
-
})();
|
|
157
|
-
exports.onOAuthAppDeleted = (0, sdk_types_1.EventDefinition)('wix.headless.v1.o_auth_app_deleted', true, {
|
|
158
|
-
rootSchema: _oAuthApp,
|
|
159
|
-
depSchemas: {},
|
|
160
|
-
})();
|
|
161
|
-
/**
|
|
162
|
-
* Creates a new OAuth app for a Wix Headless client.
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
* 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.
|
|
166
|
-
*
|
|
167
|
-
* > **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.
|
|
168
|
-
* @param oAuthApp - OAuth app to create.
|
|
169
|
-
* @public
|
|
170
|
-
* @documentationMaturity preview
|
|
171
|
-
* @requiredField oAuthApp
|
|
172
|
-
* @requiredField oAuthApp.name
|
|
173
|
-
* @permissionScope Manage OAuth Apps
|
|
174
|
-
* @permissionScopeId SCOPE.OAUTH_APP.MANAGE
|
|
175
|
-
* @applicableIdentity APP
|
|
176
|
-
* @returns Created OAuth app info.
|
|
177
|
-
*/
|
|
178
|
-
function createOAuthApp(oAuthApp) {
|
|
179
|
-
var _a, _b, _c;
|
|
180
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
181
|
-
const requestTransformation = { oAuthApp: '$[0]' };
|
|
182
|
-
const responseTransformation = '$.oAuthApp';
|
|
183
|
-
// @ts-ignore
|
|
184
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
185
|
-
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
186
|
-
rootSchema: _createOAuthAppRequest,
|
|
187
|
-
depSchemas: {},
|
|
188
|
-
fqdnTransformation: {
|
|
189
|
-
paths: [...['oAuthApp']],
|
|
190
|
-
transformation: _fromVeloEntity,
|
|
191
|
-
},
|
|
192
|
-
customTransformation: requestTransformation,
|
|
193
|
-
});
|
|
194
|
-
const { fromJSON } = (0, velo_1.serializer)({
|
|
195
|
-
rootSchema: _createOAuthAppResponse,
|
|
196
|
-
depSchemas: {},
|
|
197
|
-
fqdnTransformation: {
|
|
198
|
-
paths: [...['oAuthApp']],
|
|
199
|
-
transformation: _toVeloEntity,
|
|
200
|
-
},
|
|
201
|
-
customTransformation: responseTransformation,
|
|
202
|
-
});
|
|
203
|
-
const payload = toAmbassadorRequest([oAuthApp]);
|
|
204
|
-
const reqOpts = ambassadorWixHeadlessV1OAuthApp.createOAuthApp(payload);
|
|
205
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
206
|
-
try {
|
|
207
|
-
const result = yield httpClient.request(reqOpts);
|
|
208
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
209
|
-
return fromJSON(result.data);
|
|
210
|
-
}
|
|
211
|
-
catch (err) {
|
|
212
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
213
|
-
spreadPathsToArguments: {},
|
|
214
|
-
explicitPathsToArguments: { oAuthApp: '$[0]' },
|
|
215
|
-
singleArgumentUnchanged: false,
|
|
216
|
-
}, ['oAuthApp']);
|
|
217
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
218
|
-
throw transformedError;
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
exports.createOAuthApp = createOAuthApp;
|
|
223
|
-
/**
|
|
224
|
-
* Retrieves an OAuth app by ID.
|
|
225
|
-
* @param oAuthAppId - ID of the OAuth app to retrieve.
|
|
226
|
-
* @public
|
|
227
|
-
* @documentationMaturity preview
|
|
228
|
-
* @requiredField oAuthAppId
|
|
229
|
-
* @permissionScope Manage OAuth Apps
|
|
230
|
-
* @permissionScopeId SCOPE.OAUTH_APP.MANAGE
|
|
231
|
-
* @permissionScope Read OAuth Apps
|
|
232
|
-
* @permissionScopeId SCOPE.OAUTH_APP.READ
|
|
233
|
-
* @applicableIdentity APP
|
|
234
|
-
* @returns Retrieved OAuth app info.
|
|
235
|
-
*/
|
|
236
|
-
function getOAuthApp(oAuthAppId) {
|
|
237
|
-
var _a, _b, _c;
|
|
238
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
239
|
-
const requestTransformation = { oAuthAppId: '$[0]' };
|
|
240
|
-
const responseTransformation = '$.oAuthApp';
|
|
241
|
-
// @ts-ignore
|
|
242
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
243
|
-
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
244
|
-
rootSchema: _getOAuthAppRequest,
|
|
245
|
-
depSchemas: {},
|
|
246
|
-
fqdnTransformation: {
|
|
247
|
-
paths: [],
|
|
248
|
-
transformation: _fromVeloEntity,
|
|
249
|
-
},
|
|
250
|
-
customTransformation: requestTransformation,
|
|
251
|
-
});
|
|
252
|
-
const { fromJSON } = (0, velo_1.serializer)({
|
|
253
|
-
rootSchema: _getOAuthAppResponse,
|
|
254
|
-
depSchemas: {},
|
|
255
|
-
fqdnTransformation: {
|
|
256
|
-
paths: [...['oAuthApp']],
|
|
257
|
-
transformation: _toVeloEntity,
|
|
258
|
-
},
|
|
259
|
-
customTransformation: responseTransformation,
|
|
260
|
-
});
|
|
261
|
-
const payload = toAmbassadorRequest([oAuthAppId]);
|
|
262
|
-
const reqOpts = ambassadorWixHeadlessV1OAuthApp.getOAuthApp(payload);
|
|
263
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
264
|
-
try {
|
|
265
|
-
const result = yield httpClient.request(reqOpts);
|
|
266
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
267
|
-
return fromJSON(result.data);
|
|
268
|
-
}
|
|
269
|
-
catch (err) {
|
|
270
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
271
|
-
spreadPathsToArguments: {},
|
|
272
|
-
explicitPathsToArguments: { oAuthAppId: '$[0]' },
|
|
273
|
-
singleArgumentUnchanged: false,
|
|
274
|
-
}, ['oAuthAppId']);
|
|
275
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
276
|
-
throw transformedError;
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
exports.getOAuthApp = getOAuthApp;
|
|
281
|
-
/**
|
|
282
|
-
* Updates an OAuth app.
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
* Only fields provided in `mask` are updated.
|
|
286
|
-
*
|
|
287
|
-
* You can update the following fields:
|
|
288
|
-
* + `name`
|
|
289
|
-
* + `description`
|
|
290
|
-
* + `allowedDomain`
|
|
291
|
-
* + `loginUrl`
|
|
292
|
-
* + `logoutUrl`
|
|
293
|
-
* @param _id - ID of the OAuth app.
|
|
294
|
-
* @public
|
|
295
|
-
* @documentationMaturity preview
|
|
296
|
-
* @requiredField _id
|
|
297
|
-
* @requiredField oAuthApp
|
|
298
|
-
* @permissionScope Manage OAuth Apps
|
|
299
|
-
* @permissionScopeId SCOPE.OAUTH_APP.MANAGE
|
|
300
|
-
* @applicableIdentity APP
|
|
301
|
-
* @returns Updated OAuth app info.
|
|
302
|
-
*/
|
|
303
|
-
function updateOAuthApp(_id, oAuthApp) {
|
|
304
|
-
var _a, _b, _c;
|
|
305
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
306
|
-
const requestTransformation = { oAuthApp: { '*': '$[1]', id: '$[0]' } };
|
|
307
|
-
const responseTransformation = '$.oAuthApp';
|
|
308
|
-
// @ts-ignore
|
|
309
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
310
|
-
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
311
|
-
rootSchema: _updateOAuthAppRequest,
|
|
312
|
-
depSchemas: {},
|
|
313
|
-
fqdnTransformation: {
|
|
314
|
-
paths: [...['oAuthApp']],
|
|
315
|
-
transformation: _fromVeloEntity,
|
|
316
|
-
},
|
|
317
|
-
customTransformation: requestTransformation,
|
|
318
|
-
});
|
|
319
|
-
const { fromJSON } = (0, velo_1.serializer)({
|
|
320
|
-
rootSchema: _updateOAuthAppResponse,
|
|
321
|
-
depSchemas: {},
|
|
322
|
-
fqdnTransformation: {
|
|
323
|
-
paths: [...['oAuthApp']],
|
|
324
|
-
transformation: _toVeloEntity,
|
|
325
|
-
},
|
|
326
|
-
customTransformation: responseTransformation,
|
|
327
|
-
});
|
|
328
|
-
const payload = toAmbassadorRequest([_id, oAuthApp]);
|
|
329
|
-
const reqOpts = ambassadorWixHeadlessV1OAuthApp.updateOAuthApp(payload);
|
|
330
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
331
|
-
try {
|
|
332
|
-
const result = yield httpClient.request(reqOpts);
|
|
333
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
334
|
-
return fromJSON(result.data);
|
|
335
|
-
}
|
|
336
|
-
catch (err) {
|
|
337
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
338
|
-
spreadPathsToArguments: { oAuthApp: '$[1]' },
|
|
339
|
-
explicitPathsToArguments: { 'oAuthApp.id': '$[0]' },
|
|
340
|
-
singleArgumentUnchanged: false,
|
|
341
|
-
}, ['_id', 'oAuthApp']);
|
|
342
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
343
|
-
throw transformedError;
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
exports.updateOAuthApp = updateOAuthApp;
|
|
348
|
-
/**
|
|
349
|
-
* Retrieves a list of OAuth apps, given the provided paging, filtering, and sorting.
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
* Query OAuth Apps runs with these defaults, which you can override:
|
|
353
|
-
* + Results are sorted by `id` in descending order.
|
|
354
|
-
* + `paging.offset` is `0`.
|
|
355
|
-
* @public
|
|
356
|
-
* @documentationMaturity preview
|
|
357
|
-
* @permissionScope Manage OAuth Apps
|
|
358
|
-
* @permissionScopeId SCOPE.OAUTH_APP.MANAGE
|
|
359
|
-
* @permissionScope Read OAuth Apps
|
|
360
|
-
* @permissionScopeId SCOPE.OAUTH_APP.READ
|
|
361
|
-
* @applicableIdentity APP
|
|
362
|
-
*/
|
|
363
|
-
function queryOAuthApps() {
|
|
364
|
-
const requestTransformation = { '*': '$[1]', query: '$[0]' };
|
|
365
|
-
const responseTransformation = {
|
|
366
|
-
items: '$.oAuthApps',
|
|
367
|
-
pagingMetadata: '$.pagingMetadata',
|
|
368
|
-
};
|
|
369
|
-
// @ts-ignore
|
|
370
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
371
|
-
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
372
|
-
rootSchema: _queryOAuthAppsRequest,
|
|
373
|
-
depSchemas: {},
|
|
374
|
-
fqdnTransformation: {
|
|
375
|
-
paths: [],
|
|
376
|
-
transformation: _fromVeloEntity,
|
|
377
|
-
},
|
|
378
|
-
customTransformation: requestTransformation,
|
|
379
|
-
});
|
|
380
|
-
const { fromJSON } = (0, velo_1.serializer)({
|
|
381
|
-
rootSchema: _queryOAuthAppsResponse,
|
|
382
|
-
depSchemas: {},
|
|
383
|
-
fqdnTransformation: {
|
|
384
|
-
paths: [...['Array#oAuthApps']],
|
|
385
|
-
transformation: _toVeloEntity,
|
|
386
|
-
},
|
|
387
|
-
customTransformation: responseTransformation,
|
|
388
|
-
});
|
|
389
|
-
return (0, motion_edm_autogen_query_wrapper_1.wrapWithQueryBuilder)({
|
|
390
|
-
func: (payload) => __awaiter(this, void 0, void 0, function* () {
|
|
391
|
-
var _a, _b, _c;
|
|
392
|
-
const reqOpts = ambassadorWixHeadlessV1OAuthApp.queryOAuthApps(payload);
|
|
393
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
394
|
-
try {
|
|
395
|
-
const result = yield httpClient.request(reqOpts);
|
|
396
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
397
|
-
return result;
|
|
398
|
-
}
|
|
399
|
-
catch (err) {
|
|
400
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
401
|
-
throw err;
|
|
402
|
-
}
|
|
403
|
-
}),
|
|
404
|
-
requestTransformer: (...args) => toAmbassadorRequest(args),
|
|
405
|
-
responseTransformer: ({ data }) => fromJSON(data),
|
|
406
|
-
errorTransformer: (err) => {
|
|
407
|
-
const transformedError = (0, velo_1.transformError)(err, requestTransformation);
|
|
408
|
-
throw transformedError;
|
|
409
|
-
},
|
|
410
|
-
pagingMethod: 'OFFSET',
|
|
411
|
-
transformationPaths: (0, velo_1.resolveQueryFieldsTransformationPaths)(_toVeloEntity),
|
|
412
|
-
})({ cursorWithEmptyFilterAndSort: true });
|
|
413
|
-
}
|
|
414
|
-
exports.queryOAuthApps = queryOAuthApps;
|
|
415
|
-
//# sourceMappingURL=headless-v1-o-auth-app.universal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headless-v1-o-auth-app.universal.js","sourceRoot":"","sources":["../../../src/headless-v1-o-auth-app.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AX,WAAW,CAAE,SAAS,4DAAG,MAAM,CAAC,CAAC;gBACjC,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,4DAAG,GAAG,CAAC,CAAC;gBAC5B,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC,CAAA;QACD,kBAAkB,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC;QACjE,mBAAmB,EAAE,CAAC,EAAE,IAAI,EAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtD,gBAAgB,EAAE,CAAC,GAAQ,EAAE,EAAE;YAC7B,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;YAEpE,MAAM,gBAAgB,CAAC;QACzB,CAAC;QACD,YAAY,EAAE,QAAQ;QACtB,mBAAmB,EAAE,IAAA,4CAAqC,EAAC,aAAa,CAAC;KAC1E,CAAC,CAAC,EAAE,4BAA4B,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC;AAzDD,wCAyDC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * as oAuthApps from './src/headless-v1-o-auth-app.universal';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,wCAAwC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { createOAuthApp as publicCreateOAuthApp, getOAuthApp as publicGetOAuthApp, updateOAuthApp as publicUpdateOAuthApp, queryOAuthApps as publicQueryOAuthApps } from './headless-v1-o-auth-app.public';
|
|
2
|
-
import { BuildRESTFunction } from '@wix/sdk-types';
|
|
3
|
-
export declare const createOAuthApp: BuildRESTFunction<typeof publicCreateOAuthApp>;
|
|
4
|
-
export declare const getOAuthApp: BuildRESTFunction<typeof publicGetOAuthApp>;
|
|
5
|
-
export declare const updateOAuthApp: BuildRESTFunction<typeof publicUpdateOAuthApp>;
|
|
6
|
-
export declare const queryOAuthApps: BuildRESTFunction<typeof publicQueryOAuthApps>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { createOAuthApp as publicCreateOAuthApp, getOAuthApp as publicGetOAuthApp, updateOAuthApp as publicUpdateOAuthApp, queryOAuthApps as publicQueryOAuthApps, } from './headless-v1-o-auth-app.public';
|
|
2
|
-
export const createOAuthApp = (...args) => {
|
|
3
|
-
var _a;
|
|
4
|
-
const context =
|
|
5
|
-
// @ts-expect-error
|
|
6
|
-
typeof $wixContext !== 'undefined'
|
|
7
|
-
? // @ts-expect-error
|
|
8
|
-
$wixContext
|
|
9
|
-
: // @ts-expect-error
|
|
10
|
-
globalThis.__wix_context__;
|
|
11
|
-
if (!context) {
|
|
12
|
-
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
13
|
-
}
|
|
14
|
-
return context
|
|
15
|
-
.initWixModules(publicCreateOAuthApp, ((_a = args[1]) === null || _a === void 0 ? void 0 : _a.supressAuth) ? true : false)
|
|
16
|
-
.apply(undefined, args);
|
|
17
|
-
};
|
|
18
|
-
export const getOAuthApp = (...args) => {
|
|
19
|
-
var _a;
|
|
20
|
-
const context =
|
|
21
|
-
// @ts-expect-error
|
|
22
|
-
typeof $wixContext !== 'undefined'
|
|
23
|
-
? // @ts-expect-error
|
|
24
|
-
$wixContext
|
|
25
|
-
: // @ts-expect-error
|
|
26
|
-
globalThis.__wix_context__;
|
|
27
|
-
if (!context) {
|
|
28
|
-
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
29
|
-
}
|
|
30
|
-
return context
|
|
31
|
-
.initWixModules(publicGetOAuthApp, ((_a = args[1]) === null || _a === void 0 ? void 0 : _a.supressAuth) ? true : false)
|
|
32
|
-
.apply(undefined, args);
|
|
33
|
-
};
|
|
34
|
-
export const updateOAuthApp = (...args) => {
|
|
35
|
-
var _a;
|
|
36
|
-
const context =
|
|
37
|
-
// @ts-expect-error
|
|
38
|
-
typeof $wixContext !== 'undefined'
|
|
39
|
-
? // @ts-expect-error
|
|
40
|
-
$wixContext
|
|
41
|
-
: // @ts-expect-error
|
|
42
|
-
globalThis.__wix_context__;
|
|
43
|
-
if (!context) {
|
|
44
|
-
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
45
|
-
}
|
|
46
|
-
return context
|
|
47
|
-
.initWixModules(publicUpdateOAuthApp, ((_a = args[1]) === null || _a === void 0 ? void 0 : _a.supressAuth) ? true : false)
|
|
48
|
-
.apply(undefined, args);
|
|
49
|
-
};
|
|
50
|
-
export const queryOAuthApps = (...args) => {
|
|
51
|
-
var _a;
|
|
52
|
-
const context =
|
|
53
|
-
// @ts-expect-error
|
|
54
|
-
typeof $wixContext !== 'undefined'
|
|
55
|
-
? // @ts-expect-error
|
|
56
|
-
$wixContext
|
|
57
|
-
: // @ts-expect-error
|
|
58
|
-
globalThis.__wix_context__;
|
|
59
|
-
if (!context) {
|
|
60
|
-
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
61
|
-
}
|
|
62
|
-
return context
|
|
63
|
-
.initWixModules(publicQueryOAuthApps, ((_a = args[1]) === null || _a === void 0 ? void 0 : _a.supressAuth) ? true : false)
|
|
64
|
-
.apply(undefined, args);
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=headless-v1-o-auth-app.context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headless-v1-o-auth-app.context.js","sourceRoot":"","sources":["../../../src/headless-v1-o-auth-app.context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,IAAI,oBAAoB,EACtC,WAAW,IAAI,iBAAiB,EAChC,cAAc,IAAI,oBAAoB,EACtC,cAAc,IAAI,oBAAoB,GACvC,MAA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C,CAAC,mBAAmB;YACnB,WAAW;QACb,CAAC,CAAC,mBAAmB;YACnB,UAAU,CAAC,eAAe,CAAC;IACjC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAC;IACJ,CAAC;IACD,OAAO,OAAO;SACX,cAAc,CAAC,oBAAoB,EAAE,CAAA,MAAA,IAAI,CAAC,CAAC,CAAC,0CAAE,WAAW,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;SACzE,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,cAAc,GAAmD,CAC5E,GAAG,IAAS,EACZ,EAAE;;IACF,MAAM,OAAO;IACX,mBAAmB;IACnB,OAAO,WAAW,KAAK,WAAW;QAChC,CAAC,CAAC,mBAAmB;YACnB,WAAW;QACb,CAAC,CAAC,mBAAmB;YACnB,UAAU,CAAC,eAAe,CAAC;IACjC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAC;IACJ,CAAC;IACD,OAAO,OAAO;SACX,cAAc,CAAC,oBAAoB,EAAE,CAAA,MAAA,IAAI,CAAC,CAAC,CAAC,0CAAE,WAAW,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;SACzE,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
/**
|
|
3
|
-
* Creates a new OAuth app for a Wix Headless client.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* 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.
|
|
7
|
-
*
|
|
8
|
-
* > **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.
|
|
9
|
-
*/
|
|
10
|
-
export declare function createOAuthApp(payload: object): RequestOptionsFactory<any>;
|
|
11
|
-
/** Retrieves an OAuth app by ID. */
|
|
12
|
-
export declare function getOAuthApp(payload: object): RequestOptionsFactory<any>;
|
|
13
|
-
/**
|
|
14
|
-
* Updates an OAuth app.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* Only fields provided in `mask` are updated.
|
|
18
|
-
*
|
|
19
|
-
* You can update the following fields:
|
|
20
|
-
* + `name`
|
|
21
|
-
* + `description`
|
|
22
|
-
* + `allowedDomain`
|
|
23
|
-
* + `loginUrl`
|
|
24
|
-
* + `logoutUrl`
|
|
25
|
-
*/
|
|
26
|
-
export declare function updateOAuthApp(payload: object): RequestOptionsFactory<any>;
|
|
27
|
-
/**
|
|
28
|
-
* Retrieves a list of OAuth apps, given the provided paging, filtering, and sorting.
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* Query OAuth Apps runs with these defaults, which you can override:
|
|
32
|
-
* + Results are sorted by `id` in descending order.
|
|
33
|
-
* + `paging.offset` is `0`.
|
|
34
|
-
*/
|
|
35
|
-
export declare function queryOAuthApps(payload: object): RequestOptionsFactory<any>;
|