@wix/auto_sdk_user-management_contributors 1.0.68 → 1.0.70
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.js +2 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +4 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +2 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +4 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +26 -0
- package/build/internal/cjs/meta.d.ts +64 -0
- package/build/internal/es/index.typings.d.mts +26 -0
- package/build/internal/es/meta.d.mts +64 -0
- package/package.json +5 -12
- package/build/cjs/schemas.d.ts +0 -49
- package/build/cjs/schemas.js +0 -127
- package/build/cjs/schemas.js.map +0 -1
- package/build/es/schemas.d.mts +0 -49
- package/build/es/schemas.mjs +0 -83
- package/build/es/schemas.mjs.map +0 -1
- package/build/internal/cjs/index.js +0 -738
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -653
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -593
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.d.ts +0 -49
- package/build/internal/cjs/schemas.js +0 -127
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -698
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -614
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -551
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.d.mts +0 -49
- package/build/internal/es/schemas.mjs +0 -83
- package/build/internal/es/schemas.mjs.map +0 -1
- package/schemas/package.json +0 -3
|
@@ -1,698 +0,0 @@
|
|
|
1
|
-
// src/identity-v1-contributor-contributors.public.ts
|
|
2
|
-
import { renameKeysFromRESTResponseToSDKResponse as renameKeysFromRESTResponseToSDKResponse2 } from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
3
|
-
import { transformRESTTimestampToSDKTimestamp as transformRESTTimestampToSDKTimestamp2 } from "@wix/sdk-runtime/transformations/timestamp";
|
|
4
|
-
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
5
|
-
import { EventDefinition } from "@wix/sdk-types";
|
|
6
|
-
|
|
7
|
-
// src/identity-v1-contributor-contributors.universal.ts
|
|
8
|
-
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
9
|
-
import {
|
|
10
|
-
renameKeysFromSDKRequestToRESTRequest,
|
|
11
|
-
renameKeysFromRESTResponseToSDKResponse
|
|
12
|
-
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
13
|
-
|
|
14
|
-
// src/identity-v1-contributor-contributors.http.ts
|
|
15
|
-
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
16
|
-
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
17
|
-
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
18
|
-
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
19
|
-
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
20
|
-
function resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl(opts) {
|
|
21
|
-
const domainToMappings = {
|
|
22
|
-
"manage._base_domain_": [
|
|
23
|
-
{
|
|
24
|
-
srcPath: "/contributors/accept",
|
|
25
|
-
destPath: "/contributors/accept"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
srcPath: "/roles-management-web",
|
|
29
|
-
destPath: ""
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
srcPath: "/team/accept",
|
|
33
|
-
destPath: "/team/accept"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
srcPath: "/_api/roles-management-web",
|
|
37
|
-
destPath: ""
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
srcPath: "/app/accept",
|
|
41
|
-
destPath: "/app/accept"
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
"api._api_base_domain_": [
|
|
45
|
-
{
|
|
46
|
-
srcPath: "/roles-management-web",
|
|
47
|
-
destPath: ""
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
"editor._base_domain_": [
|
|
51
|
-
{
|
|
52
|
-
srcPath: "/_api/roles-management-web",
|
|
53
|
-
destPath: ""
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
"blocks._base_domain_": [
|
|
57
|
-
{
|
|
58
|
-
srcPath: "/_api/roles-management-web",
|
|
59
|
-
destPath: ""
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
|
-
"create.editorx": [
|
|
63
|
-
{
|
|
64
|
-
srcPath: "/_api/roles-management-web",
|
|
65
|
-
destPath: ""
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
"www._base_domain_": [
|
|
69
|
-
{
|
|
70
|
-
srcPath: "/_api/roles-management-web",
|
|
71
|
-
destPath: ""
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
srcPath: "/roles-management-web",
|
|
75
|
-
destPath: ""
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
srcPath: "/contributors/accept",
|
|
79
|
-
destPath: "/contributors/accept"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
srcPath: "/team/accept",
|
|
83
|
-
destPath: "/team/accept"
|
|
84
|
-
}
|
|
85
|
-
],
|
|
86
|
-
"dev._base_domain_": [
|
|
87
|
-
{
|
|
88
|
-
srcPath: "/_api/roles-management-web",
|
|
89
|
-
destPath: ""
|
|
90
|
-
}
|
|
91
|
-
],
|
|
92
|
-
"platform.rise.ai": [
|
|
93
|
-
{
|
|
94
|
-
srcPath: "/v2/contributors",
|
|
95
|
-
destPath: "/v2/contributors"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
srcPath: "/contributor/change/role",
|
|
99
|
-
destPath: "/contributor/change/role"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
"www.wixapis.com": [
|
|
103
|
-
{
|
|
104
|
-
srcPath: "/roles-management",
|
|
105
|
-
destPath: ""
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
srcPath: "/roles-management-web",
|
|
109
|
-
destPath: ""
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
srcPath: "/roles-management/roles",
|
|
113
|
-
destPath: "/roles"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
srcPath: "/roles-management/team",
|
|
117
|
-
destPath: "/team"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
srcPath: "/roles-management/v3/team",
|
|
121
|
-
destPath: "/v3/team"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
srcPath: "/roles-management/v2/team",
|
|
125
|
-
destPath: "/v2/team"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
srcPath: "/roles-management/contributor/change",
|
|
129
|
-
destPath: "/contributor/change"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
srcPath: "/roles-management/v2/contributors",
|
|
133
|
-
destPath: "/v2/contributors"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
srcPath: "/roles-management/contributor/remove",
|
|
137
|
-
destPath: "/contributor/remove"
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
|
-
"*.dev.wix-code.com": [
|
|
141
|
-
{
|
|
142
|
-
srcPath: "/identity/contributor",
|
|
143
|
-
destPath: "/contributor"
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
"vibe._base_domain_": [
|
|
147
|
-
{
|
|
148
|
-
srcPath: "/roles-management-web/v2/contributors",
|
|
149
|
-
destPath: "/v2/contributors"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
srcPath: "/roles-management-web/myRoles",
|
|
153
|
-
destPath: "/roles-management-web/myRoles"
|
|
154
|
-
}
|
|
155
|
-
],
|
|
156
|
-
_: [
|
|
157
|
-
{
|
|
158
|
-
srcPath: "/identity/contributor",
|
|
159
|
-
destPath: "/contributor"
|
|
160
|
-
}
|
|
161
|
-
],
|
|
162
|
-
"bo._base_domain_": [
|
|
163
|
-
{
|
|
164
|
-
srcPath: "/_api/roles-management-web",
|
|
165
|
-
destPath: ""
|
|
166
|
-
}
|
|
167
|
-
],
|
|
168
|
-
"wixbo.ai": [
|
|
169
|
-
{
|
|
170
|
-
srcPath: "/_api/roles-management-web",
|
|
171
|
-
destPath: ""
|
|
172
|
-
}
|
|
173
|
-
],
|
|
174
|
-
"wix-bo.com": [
|
|
175
|
-
{
|
|
176
|
-
srcPath: "/_api/roles-management-web",
|
|
177
|
-
destPath: ""
|
|
178
|
-
}
|
|
179
|
-
]
|
|
180
|
-
};
|
|
181
|
-
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
182
|
-
}
|
|
183
|
-
var PACKAGE_NAME = "@wix/auto_sdk_user-management_contributors";
|
|
184
|
-
function getSiteContributorsV2(payload) {
|
|
185
|
-
function __getSiteContributorsV2({ host }) {
|
|
186
|
-
const serializedData = transformPaths(payload, [
|
|
187
|
-
{
|
|
188
|
-
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
189
|
-
paths: [{ path: "fields" }]
|
|
190
|
-
}
|
|
191
|
-
]);
|
|
192
|
-
const metadata = {
|
|
193
|
-
entityFqdn: "wix.identity.v1.contributor",
|
|
194
|
-
method: "GET",
|
|
195
|
-
methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2",
|
|
196
|
-
packageName: PACKAGE_NAME,
|
|
197
|
-
migrationOptions: {
|
|
198
|
-
optInTransformResponse: true
|
|
199
|
-
},
|
|
200
|
-
url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
|
|
201
|
-
protoPath: "/v2/contributors",
|
|
202
|
-
data: serializedData,
|
|
203
|
-
host
|
|
204
|
-
}),
|
|
205
|
-
params: toURLSearchParams(serializedData),
|
|
206
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
207
|
-
{
|
|
208
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
209
|
-
paths: [
|
|
210
|
-
{ path: "contributors.joinedAt" },
|
|
211
|
-
{ path: "invites.dateCreated" },
|
|
212
|
-
{ path: "invites.expirationDate" },
|
|
213
|
-
{ path: "pendingOwner.expirationDate" },
|
|
214
|
-
{ path: "enrichedInvites.dateCreated" },
|
|
215
|
-
{ path: "enrichedInvites.expirationDate" }
|
|
216
|
-
]
|
|
217
|
-
}
|
|
218
|
-
])
|
|
219
|
-
};
|
|
220
|
-
return metadata;
|
|
221
|
-
}
|
|
222
|
-
return __getSiteContributorsV2;
|
|
223
|
-
}
|
|
224
|
-
function getCurrentContributor(payload) {
|
|
225
|
-
function __getCurrentContributor({ host }) {
|
|
226
|
-
const metadata = {
|
|
227
|
-
entityFqdn: "wix.identity.v1.contributor",
|
|
228
|
-
method: "GET",
|
|
229
|
-
methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.GetCurrentContributor",
|
|
230
|
-
packageName: PACKAGE_NAME,
|
|
231
|
-
migrationOptions: {
|
|
232
|
-
optInTransformResponse: true
|
|
233
|
-
},
|
|
234
|
-
url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
|
|
235
|
-
protoPath: "/v2/contributors/current",
|
|
236
|
-
data: payload,
|
|
237
|
-
host
|
|
238
|
-
}),
|
|
239
|
-
params: toURLSearchParams(payload),
|
|
240
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
241
|
-
{
|
|
242
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
243
|
-
paths: [{ path: "contributor.joinedAt" }]
|
|
244
|
-
}
|
|
245
|
-
])
|
|
246
|
-
};
|
|
247
|
-
return metadata;
|
|
248
|
-
}
|
|
249
|
-
return __getCurrentContributor;
|
|
250
|
-
}
|
|
251
|
-
function changeRole(payload) {
|
|
252
|
-
function __changeRole({ host }) {
|
|
253
|
-
const metadata = {
|
|
254
|
-
entityFqdn: "wix.identity.v1.contributor",
|
|
255
|
-
method: "PUT",
|
|
256
|
-
methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole",
|
|
257
|
-
packageName: PACKAGE_NAME,
|
|
258
|
-
migrationOptions: {
|
|
259
|
-
optInTransformResponse: true
|
|
260
|
-
},
|
|
261
|
-
url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
|
|
262
|
-
protoPath: "/contributor/change/role",
|
|
263
|
-
data: payload,
|
|
264
|
-
host
|
|
265
|
-
}),
|
|
266
|
-
data: payload
|
|
267
|
-
};
|
|
268
|
-
return metadata;
|
|
269
|
-
}
|
|
270
|
-
return __changeRole;
|
|
271
|
-
}
|
|
272
|
-
function changeContributorLocation(payload) {
|
|
273
|
-
function __changeContributorLocation({ host }) {
|
|
274
|
-
const metadata = {
|
|
275
|
-
entityFqdn: "wix.identity.v1.contributor",
|
|
276
|
-
method: "PUT",
|
|
277
|
-
methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation",
|
|
278
|
-
packageName: PACKAGE_NAME,
|
|
279
|
-
migrationOptions: {
|
|
280
|
-
optInTransformResponse: true
|
|
281
|
-
},
|
|
282
|
-
url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
|
|
283
|
-
protoPath: "/contributor/change/locations",
|
|
284
|
-
data: payload,
|
|
285
|
-
host
|
|
286
|
-
}),
|
|
287
|
-
data: payload
|
|
288
|
-
};
|
|
289
|
-
return metadata;
|
|
290
|
-
}
|
|
291
|
-
return __changeContributorLocation;
|
|
292
|
-
}
|
|
293
|
-
function querySiteContributors(payload) {
|
|
294
|
-
function __querySiteContributors({ host }) {
|
|
295
|
-
const metadata = {
|
|
296
|
-
entityFqdn: "wix.identity.v1.contributor",
|
|
297
|
-
method: "GET",
|
|
298
|
-
methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors",
|
|
299
|
-
packageName: PACKAGE_NAME,
|
|
300
|
-
migrationOptions: {
|
|
301
|
-
optInTransformResponse: true
|
|
302
|
-
},
|
|
303
|
-
url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
|
|
304
|
-
protoPath: "/v2/contributors/query",
|
|
305
|
-
data: payload,
|
|
306
|
-
host
|
|
307
|
-
}),
|
|
308
|
-
params: toURLSearchParams(payload)
|
|
309
|
-
};
|
|
310
|
-
return metadata;
|
|
311
|
-
}
|
|
312
|
-
return __querySiteContributors;
|
|
313
|
-
}
|
|
314
|
-
function getContributorsQuota(payload) {
|
|
315
|
-
function __getContributorsQuota({ host }) {
|
|
316
|
-
const metadata = {
|
|
317
|
-
entityFqdn: "wix.identity.v1.contributor",
|
|
318
|
-
method: "GET",
|
|
319
|
-
methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota",
|
|
320
|
-
packageName: PACKAGE_NAME,
|
|
321
|
-
migrationOptions: {
|
|
322
|
-
optInTransformResponse: true
|
|
323
|
-
},
|
|
324
|
-
url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
|
|
325
|
-
protoPath: "/v2/contributors/quota",
|
|
326
|
-
data: payload,
|
|
327
|
-
host
|
|
328
|
-
}),
|
|
329
|
-
params: toURLSearchParams(payload)
|
|
330
|
-
};
|
|
331
|
-
return metadata;
|
|
332
|
-
}
|
|
333
|
-
return __getContributorsQuota;
|
|
334
|
-
}
|
|
335
|
-
function removeContributor(payload) {
|
|
336
|
-
function __removeContributor({ host }) {
|
|
337
|
-
const metadata = {
|
|
338
|
-
entityFqdn: "wix.identity.v1.contributor",
|
|
339
|
-
method: "POST",
|
|
340
|
-
methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.RemoveContributor",
|
|
341
|
-
packageName: PACKAGE_NAME,
|
|
342
|
-
migrationOptions: {
|
|
343
|
-
optInTransformResponse: true
|
|
344
|
-
},
|
|
345
|
-
url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
|
|
346
|
-
protoPath: "/contributor/remove",
|
|
347
|
-
data: payload,
|
|
348
|
-
host
|
|
349
|
-
}),
|
|
350
|
-
data: payload
|
|
351
|
-
};
|
|
352
|
-
return metadata;
|
|
353
|
-
}
|
|
354
|
-
return __removeContributor;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
// src/identity-v1-contributor-contributors.universal.ts
|
|
358
|
-
var ResourceType = /* @__PURE__ */ ((ResourceType2) => {
|
|
359
|
-
ResourceType2["UNKNOWN_RESOURCE_TYPE"] = "UNKNOWN_RESOURCE_TYPE";
|
|
360
|
-
ResourceType2["SITE"] = "SITE";
|
|
361
|
-
return ResourceType2;
|
|
362
|
-
})(ResourceType || {});
|
|
363
|
-
var ConditionAttributeType = /* @__PURE__ */ ((ConditionAttributeType2) => {
|
|
364
|
-
ConditionAttributeType2["UNKNOWN_CONDITION_TYPE"] = "UNKNOWN_CONDITION_TYPE";
|
|
365
|
-
ConditionAttributeType2["FOLDER"] = "FOLDER";
|
|
366
|
-
return ConditionAttributeType2;
|
|
367
|
-
})(ConditionAttributeType || {});
|
|
368
|
-
var SubjectType = /* @__PURE__ */ ((SubjectType2) => {
|
|
369
|
-
SubjectType2["UNKNOWN"] = "UNKNOWN";
|
|
370
|
-
SubjectType2["ACCOUNT"] = "ACCOUNT";
|
|
371
|
-
SubjectType2["USER"] = "USER";
|
|
372
|
-
SubjectType2["USER_GROUP"] = "USER_GROUP";
|
|
373
|
-
SubjectType2["MEMBER_GROUP"] = "MEMBER_GROUP";
|
|
374
|
-
SubjectType2["VISITOR_GROUP"] = "VISITOR_GROUP";
|
|
375
|
-
SubjectType2["EXTERNAL_APP"] = "EXTERNAL_APP";
|
|
376
|
-
SubjectType2["ACCOUNT_GROUP"] = "ACCOUNT_GROUP";
|
|
377
|
-
SubjectType2["WIX_APP"] = "WIX_APP";
|
|
378
|
-
return SubjectType2;
|
|
379
|
-
})(SubjectType || {});
|
|
380
|
-
var SubjectContextType = /* @__PURE__ */ ((SubjectContextType2) => {
|
|
381
|
-
SubjectContextType2["UNKNOWN_CTX"] = "UNKNOWN_CTX";
|
|
382
|
-
SubjectContextType2["ORG_CTX"] = "ORG_CTX";
|
|
383
|
-
SubjectContextType2["ACCOUNT_CTX"] = "ACCOUNT_CTX";
|
|
384
|
-
return SubjectContextType2;
|
|
385
|
-
})(SubjectContextType || {});
|
|
386
|
-
var AccountGroup = /* @__PURE__ */ ((AccountGroup2) => {
|
|
387
|
-
AccountGroup2["ENTERPRISE"] = "ENTERPRISE";
|
|
388
|
-
AccountGroup2["CHANNELS"] = "CHANNELS";
|
|
389
|
-
return AccountGroup2;
|
|
390
|
-
})(AccountGroup || {});
|
|
391
|
-
var InviteStatus = /* @__PURE__ */ ((InviteStatus2) => {
|
|
392
|
-
InviteStatus2["Pending"] = "Pending";
|
|
393
|
-
InviteStatus2["Used"] = "Used";
|
|
394
|
-
InviteStatus2["Deleted"] = "Deleted";
|
|
395
|
-
InviteStatus2["Declined"] = "Declined";
|
|
396
|
-
InviteStatus2["Expired"] = "Expired";
|
|
397
|
-
return InviteStatus2;
|
|
398
|
-
})(InviteStatus || {});
|
|
399
|
-
var Type = /* @__PURE__ */ ((Type2) => {
|
|
400
|
-
Type2["UNKNOWN"] = "UNKNOWN";
|
|
401
|
-
Type2["LIMITED"] = "LIMITED";
|
|
402
|
-
Type2["UNLIMITED"] = "UNLIMITED";
|
|
403
|
-
return Type2;
|
|
404
|
-
})(Type || {});
|
|
405
|
-
var FieldSet = /* @__PURE__ */ ((FieldSet2) => {
|
|
406
|
-
FieldSet2["UNKNOWN"] = "UNKNOWN";
|
|
407
|
-
FieldSet2["META_DATA"] = "META_DATA";
|
|
408
|
-
return FieldSet2;
|
|
409
|
-
})(FieldSet || {});
|
|
410
|
-
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
411
|
-
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
412
|
-
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
413
|
-
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
414
|
-
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
415
|
-
WebhookIdentityType2["APP"] = "APP";
|
|
416
|
-
return WebhookIdentityType2;
|
|
417
|
-
})(WebhookIdentityType || {});
|
|
418
|
-
async function getSiteContributorsV22(options) {
|
|
419
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
420
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
421
|
-
locale: options?.locale,
|
|
422
|
-
fields: options?.fields,
|
|
423
|
-
host: options?.host
|
|
424
|
-
});
|
|
425
|
-
const reqOpts = getSiteContributorsV2(payload);
|
|
426
|
-
sideEffects?.onSiteCall?.();
|
|
427
|
-
try {
|
|
428
|
-
const result = await httpClient.request(reqOpts);
|
|
429
|
-
sideEffects?.onSuccess?.(result);
|
|
430
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
431
|
-
} catch (err) {
|
|
432
|
-
const transformedError = sdkTransformError(
|
|
433
|
-
err,
|
|
434
|
-
{
|
|
435
|
-
spreadPathsToArguments: {},
|
|
436
|
-
explicitPathsToArguments: {
|
|
437
|
-
locale: "$[0].locale",
|
|
438
|
-
fields: "$[0].fields",
|
|
439
|
-
host: "$[0].host"
|
|
440
|
-
},
|
|
441
|
-
singleArgumentUnchanged: false
|
|
442
|
-
},
|
|
443
|
-
["options"]
|
|
444
|
-
);
|
|
445
|
-
sideEffects?.onError?.(err);
|
|
446
|
-
throw transformedError;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
async function getCurrentContributor2() {
|
|
450
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
451
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({});
|
|
452
|
-
const reqOpts = getCurrentContributor(payload);
|
|
453
|
-
sideEffects?.onSiteCall?.();
|
|
454
|
-
try {
|
|
455
|
-
const result = await httpClient.request(reqOpts);
|
|
456
|
-
sideEffects?.onSuccess?.(result);
|
|
457
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
458
|
-
} catch (err) {
|
|
459
|
-
const transformedError = sdkTransformError(
|
|
460
|
-
err,
|
|
461
|
-
{
|
|
462
|
-
spreadPathsToArguments: {},
|
|
463
|
-
explicitPathsToArguments: {},
|
|
464
|
-
singleArgumentUnchanged: false
|
|
465
|
-
},
|
|
466
|
-
[]
|
|
467
|
-
);
|
|
468
|
-
sideEffects?.onError?.(err);
|
|
469
|
-
throw transformedError;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
async function changeRole2(accountId, options) {
|
|
473
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
474
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
475
|
-
accountId,
|
|
476
|
-
newRoles: options?.newRoles
|
|
477
|
-
});
|
|
478
|
-
const reqOpts = changeRole(payload);
|
|
479
|
-
sideEffects?.onSiteCall?.();
|
|
480
|
-
try {
|
|
481
|
-
const result = await httpClient.request(reqOpts);
|
|
482
|
-
sideEffects?.onSuccess?.(result);
|
|
483
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
484
|
-
} catch (err) {
|
|
485
|
-
const transformedError = sdkTransformError(
|
|
486
|
-
err,
|
|
487
|
-
{
|
|
488
|
-
spreadPathsToArguments: {},
|
|
489
|
-
explicitPathsToArguments: {
|
|
490
|
-
accountId: "$[0]",
|
|
491
|
-
newRoles: "$[1].newRoles"
|
|
492
|
-
},
|
|
493
|
-
singleArgumentUnchanged: false
|
|
494
|
-
},
|
|
495
|
-
["accountId", "options"]
|
|
496
|
-
);
|
|
497
|
-
sideEffects?.onError?.(err);
|
|
498
|
-
throw transformedError;
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
async function changeContributorLocation2(accountId, options) {
|
|
502
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
503
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
504
|
-
accountId,
|
|
505
|
-
newLocations: options?.newLocations
|
|
506
|
-
});
|
|
507
|
-
const reqOpts = changeContributorLocation(payload);
|
|
508
|
-
sideEffects?.onSiteCall?.();
|
|
509
|
-
try {
|
|
510
|
-
const result = await httpClient.request(reqOpts);
|
|
511
|
-
sideEffects?.onSuccess?.(result);
|
|
512
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
513
|
-
} catch (err) {
|
|
514
|
-
const transformedError = sdkTransformError(
|
|
515
|
-
err,
|
|
516
|
-
{
|
|
517
|
-
spreadPathsToArguments: {},
|
|
518
|
-
explicitPathsToArguments: {
|
|
519
|
-
accountId: "$[0]",
|
|
520
|
-
newLocations: "$[1].newLocations"
|
|
521
|
-
},
|
|
522
|
-
singleArgumentUnchanged: false
|
|
523
|
-
},
|
|
524
|
-
["accountId", "options"]
|
|
525
|
-
);
|
|
526
|
-
sideEffects?.onError?.(err);
|
|
527
|
-
throw transformedError;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
async function querySiteContributors2(options) {
|
|
531
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
532
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
533
|
-
filter: options?.filter
|
|
534
|
-
});
|
|
535
|
-
const reqOpts = querySiteContributors(payload);
|
|
536
|
-
sideEffects?.onSiteCall?.();
|
|
537
|
-
try {
|
|
538
|
-
const result = await httpClient.request(reqOpts);
|
|
539
|
-
sideEffects?.onSuccess?.(result);
|
|
540
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
541
|
-
} catch (err) {
|
|
542
|
-
const transformedError = sdkTransformError(
|
|
543
|
-
err,
|
|
544
|
-
{
|
|
545
|
-
spreadPathsToArguments: {},
|
|
546
|
-
explicitPathsToArguments: { filter: "$[0].filter" },
|
|
547
|
-
singleArgumentUnchanged: false
|
|
548
|
-
},
|
|
549
|
-
["options"]
|
|
550
|
-
);
|
|
551
|
-
sideEffects?.onError?.(err);
|
|
552
|
-
throw transformedError;
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
async function getContributorsQuota2() {
|
|
556
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
557
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({});
|
|
558
|
-
const reqOpts = getContributorsQuota(payload);
|
|
559
|
-
sideEffects?.onSiteCall?.();
|
|
560
|
-
try {
|
|
561
|
-
const result = await httpClient.request(reqOpts);
|
|
562
|
-
sideEffects?.onSuccess?.(result);
|
|
563
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
564
|
-
} catch (err) {
|
|
565
|
-
const transformedError = sdkTransformError(
|
|
566
|
-
err,
|
|
567
|
-
{
|
|
568
|
-
spreadPathsToArguments: {},
|
|
569
|
-
explicitPathsToArguments: {},
|
|
570
|
-
singleArgumentUnchanged: false
|
|
571
|
-
},
|
|
572
|
-
[]
|
|
573
|
-
);
|
|
574
|
-
sideEffects?.onError?.(err);
|
|
575
|
-
throw transformedError;
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
async function removeContributor2(accountId) {
|
|
579
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
580
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
581
|
-
accountId
|
|
582
|
-
});
|
|
583
|
-
const reqOpts = removeContributor(payload);
|
|
584
|
-
sideEffects?.onSiteCall?.();
|
|
585
|
-
try {
|
|
586
|
-
const result = await httpClient.request(reqOpts);
|
|
587
|
-
sideEffects?.onSuccess?.(result);
|
|
588
|
-
} catch (err) {
|
|
589
|
-
const transformedError = sdkTransformError(
|
|
590
|
-
err,
|
|
591
|
-
{
|
|
592
|
-
spreadPathsToArguments: {},
|
|
593
|
-
explicitPathsToArguments: { accountId: "$[0]" },
|
|
594
|
-
singleArgumentUnchanged: false
|
|
595
|
-
},
|
|
596
|
-
["accountId"]
|
|
597
|
-
);
|
|
598
|
-
sideEffects?.onError?.(err);
|
|
599
|
-
throw transformedError;
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
// src/identity-v1-contributor-contributors.public.ts
|
|
604
|
-
function getSiteContributorsV23(httpClient) {
|
|
605
|
-
return (options) => getSiteContributorsV22(
|
|
606
|
-
options,
|
|
607
|
-
// @ts-ignore
|
|
608
|
-
{ httpClient }
|
|
609
|
-
);
|
|
610
|
-
}
|
|
611
|
-
function getCurrentContributor3(httpClient) {
|
|
612
|
-
return () => getCurrentContributor2(
|
|
613
|
-
// @ts-ignore
|
|
614
|
-
{ httpClient }
|
|
615
|
-
);
|
|
616
|
-
}
|
|
617
|
-
function changeRole3(httpClient) {
|
|
618
|
-
return (accountId, options) => changeRole2(
|
|
619
|
-
accountId,
|
|
620
|
-
options,
|
|
621
|
-
// @ts-ignore
|
|
622
|
-
{ httpClient }
|
|
623
|
-
);
|
|
624
|
-
}
|
|
625
|
-
function changeContributorLocation3(httpClient) {
|
|
626
|
-
return (accountId, options) => changeContributorLocation2(
|
|
627
|
-
accountId,
|
|
628
|
-
options,
|
|
629
|
-
// @ts-ignore
|
|
630
|
-
{ httpClient }
|
|
631
|
-
);
|
|
632
|
-
}
|
|
633
|
-
function querySiteContributors3(httpClient) {
|
|
634
|
-
return (options) => querySiteContributors2(
|
|
635
|
-
options,
|
|
636
|
-
// @ts-ignore
|
|
637
|
-
{ httpClient }
|
|
638
|
-
);
|
|
639
|
-
}
|
|
640
|
-
function getContributorsQuota3(httpClient) {
|
|
641
|
-
return () => getContributorsQuota2(
|
|
642
|
-
// @ts-ignore
|
|
643
|
-
{ httpClient }
|
|
644
|
-
);
|
|
645
|
-
}
|
|
646
|
-
function removeContributor3(httpClient) {
|
|
647
|
-
return (accountId) => removeContributor2(
|
|
648
|
-
accountId,
|
|
649
|
-
// @ts-ignore
|
|
650
|
-
{ httpClient }
|
|
651
|
-
);
|
|
652
|
-
}
|
|
653
|
-
var onContributorCreated = EventDefinition(
|
|
654
|
-
"wix.identity.v1.contributor_created",
|
|
655
|
-
true,
|
|
656
|
-
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
657
|
-
transformPaths2(event, [
|
|
658
|
-
{
|
|
659
|
-
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
660
|
-
paths: [{ path: "entity.joinedAt" }, { path: "metadata.eventTime" }]
|
|
661
|
-
}
|
|
662
|
-
])
|
|
663
|
-
)
|
|
664
|
-
)();
|
|
665
|
-
|
|
666
|
-
// src/identity-v1-contributor-contributors.context.ts
|
|
667
|
-
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
668
|
-
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
669
|
-
var getSiteContributorsV24 = /* @__PURE__ */ createRESTModule(getSiteContributorsV23);
|
|
670
|
-
var getCurrentContributor4 = /* @__PURE__ */ createRESTModule(getCurrentContributor3);
|
|
671
|
-
var changeRole4 = /* @__PURE__ */ createRESTModule(changeRole3);
|
|
672
|
-
var changeContributorLocation4 = /* @__PURE__ */ createRESTModule(changeContributorLocation3);
|
|
673
|
-
var querySiteContributors4 = /* @__PURE__ */ createRESTModule(querySiteContributors3);
|
|
674
|
-
var getContributorsQuota4 = /* @__PURE__ */ createRESTModule(getContributorsQuota3);
|
|
675
|
-
var removeContributor4 = /* @__PURE__ */ createRESTModule(removeContributor3);
|
|
676
|
-
var onContributorCreated2 = createEventModule(
|
|
677
|
-
onContributorCreated
|
|
678
|
-
);
|
|
679
|
-
export {
|
|
680
|
-
AccountGroup,
|
|
681
|
-
ConditionAttributeType,
|
|
682
|
-
FieldSet,
|
|
683
|
-
InviteStatus,
|
|
684
|
-
ResourceType,
|
|
685
|
-
SubjectContextType,
|
|
686
|
-
SubjectType,
|
|
687
|
-
Type,
|
|
688
|
-
WebhookIdentityType,
|
|
689
|
-
changeContributorLocation4 as changeContributorLocation,
|
|
690
|
-
changeRole4 as changeRole,
|
|
691
|
-
getContributorsQuota4 as getContributorsQuota,
|
|
692
|
-
getCurrentContributor4 as getCurrentContributor,
|
|
693
|
-
getSiteContributorsV24 as getSiteContributorsV2,
|
|
694
|
-
onContributorCreated2 as onContributorCreated,
|
|
695
|
-
querySiteContributors4 as querySiteContributors,
|
|
696
|
-
removeContributor4 as removeContributor
|
|
697
|
-
};
|
|
698
|
-
//# sourceMappingURL=index.mjs.map
|