@wix/auth-management 1.0.31 → 1.0.33

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.
@@ -1 +1,2 @@
1
- export * as oAuthApps from '@wix/auth-management_o-auth-apps';
1
+ import * as oAuthApps from '@wix/auth-management_o-auth-apps';
2
+ export { oAuthApps };
@@ -24,5 +24,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.oAuthApps = void 0;
27
- exports.oAuthApps = __importStar(require("@wix/auth-management_o-auth-apps"));
27
+ const oAuthApps = __importStar(require("@wix/auth-management_o-auth-apps"));
28
+ exports.oAuthApps = oAuthApps;
28
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAA8D"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4EAA8D;AAErD,8BAAS"}
@@ -1 +1,2 @@
1
- export * as oAuthApps from '@wix/auth-management_o-auth-apps';
1
+ import * as oAuthApps from '@wix/auth-management_o-auth-apps';
2
+ export { oAuthApps };
package/build/es/index.js CHANGED
@@ -1,2 +1,3 @@
1
- export * as oAuthApps from '@wix/auth-management_o-auth-apps';
1
+ import * as oAuthApps from '@wix/auth-management_o-auth-apps';
2
+ export { oAuthApps };
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auth-management",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,18 +18,18 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/auth-management_o-auth-apps": "1.0.17"
21
+ "@wix/auth-management_o-auth-apps": "1.0.19"
22
22
  },
23
23
  "devDependencies": {
24
- "@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
25
24
  "glob": "^10.4.1",
26
25
  "rollup": "^4.18.0",
27
26
  "rollup-plugin-dts": "^6.1.1",
28
27
  "typescript": "^5.3.2"
29
28
  },
30
29
  "scripts": {
31
- "build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles",
32
- "build:dts-bundles": "test -f config/rollup-config.js && rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
30
+ "build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles && npm run build:validate-dts",
31
+ "build:dts-bundles": "test -f config/rollup-config.js && NODE_OPTIONS=--max-old-space-size=8192 rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
32
+ "build:validate-dts": "tsc type-bundles/*.d.ts --noEmit",
33
33
  "test": ":"
34
34
  },
35
35
  "wix": {
@@ -43,5 +43,5 @@
43
43
  "fqdn": ""
44
44
  }
45
45
  },
46
- "falconPackageHash": "24894db7bc94ad15cc1aad9aa78610f2a819be0b75cd253e1ac35a71"
46
+ "falconPackageHash": "9047ab7fb86ec6ca743edd9d096d4a80dc904df697f65c2d4525cbaa"
47
47
  }
@@ -1,3 +1,47 @@
1
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
+ interface HttpClient {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
4
+ fetchWithAuth: typeof fetch;
5
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
+ }
7
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
+ type HttpResponse<T = any> = {
9
+ data: T;
10
+ status: number;
11
+ statusText: string;
12
+ headers: any;
13
+ request?: any;
14
+ };
15
+ type RequestOptions<_TResponse = any, Data = any> = {
16
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
+ url: string;
18
+ data?: Data;
19
+ params?: URLSearchParams;
20
+ } & APIMetadata;
21
+ type APIMetadata = {
22
+ methodFqn?: string;
23
+ entityFqdn?: string;
24
+ packageName?: string;
25
+ };
26
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
28
+ __type: 'event-definition';
29
+ type: Type;
30
+ isDomainEvent?: boolean;
31
+ transformations?: (envelope: unknown) => Payload;
32
+ __payload: Payload;
33
+ };
34
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
35
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
36
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
37
+
38
+ declare global {
39
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
40
+ interface SymbolConstructor {
41
+ readonly observable: symbol;
42
+ }
43
+ }
44
+
1
45
  /** An intermediary application that authorizes and authenticates an external client to access data on a Wix project or site. */
2
46
  interface OAuthApp {
3
47
  /**
@@ -81,6 +125,474 @@ declare enum OAuthTechnologies {
81
125
  /** OAuth technology using some other kind of technology. */
82
126
  OTHER_TECHNOLOGY = "OTHER_TECHNOLOGY"
83
127
  }
128
+ interface CreateOAuthAppRequest {
129
+ /** OAuth app to create. */
130
+ oAuthApp: OAuthApp;
131
+ }
132
+ interface CreateOAuthAppResponse {
133
+ /** Created OAuth app info. */
134
+ oAuthApp?: OAuthApp;
135
+ }
136
+ interface GetOAuthAppRequest {
137
+ /** ID of the OAuth app to retrieve. */
138
+ oAuthAppId: string;
139
+ }
140
+ interface GetOAuthAppResponse {
141
+ /** Retrieved OAuth app info. */
142
+ oAuthApp?: OAuthApp;
143
+ }
144
+ interface UpdateOAuthAppRequest {
145
+ /** Updated OAuth app details. May include some or all fields. */
146
+ oAuthApp: OAuthApp;
147
+ }
148
+ interface UpdateOAuthAppResponse {
149
+ /** Updated OAuth app info. */
150
+ oAuthApp?: OAuthApp;
151
+ }
152
+ interface DeleteOAuthAppRequest {
153
+ /** ID of the OAuth app to delete. */
154
+ oAuthAppId?: string;
155
+ }
156
+ interface DeleteOAuthAppResponse {
157
+ }
158
+ interface QueryOAuthAppsRequest {
159
+ /** Query options. */
160
+ query?: PlatformQuery;
161
+ }
162
+ interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
163
+ /** Paging options to limit and skip the number of items. */
164
+ paging?: Paging;
165
+ /** 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`. */
166
+ cursorPaging?: CursorPaging;
167
+ /**
168
+ * Filter object in the following format:
169
+ * `"filter" : {
170
+ * "fieldName1": "value1",
171
+ * "fieldName2":{"$operator":"value2"}
172
+ * }`
173
+ * Example of operators: `$eq`
174
+ */
175
+ filter?: Record<string, any> | null;
176
+ /**
177
+ * Sort object in the following format:
178
+ * `[{"fieldName":"name","order":"ASC"},{"fieldName":"created_date","order":"DESC"}]`
179
+ */
180
+ sort?: Sorting[];
181
+ }
182
+ /** @oneof */
183
+ interface PlatformQueryPagingMethodOneOf {
184
+ /** Paging options to limit and skip the number of items. */
185
+ paging?: Paging;
186
+ /** 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`. */
187
+ cursorPaging?: CursorPaging;
188
+ }
189
+ interface Sorting {
190
+ /** Name of the field to sort by. */
191
+ fieldName?: string;
192
+ /** Sort order. */
193
+ order?: SortOrder;
194
+ }
195
+ declare enum SortOrder {
196
+ ASC = "ASC",
197
+ DESC = "DESC"
198
+ }
199
+ interface Paging {
200
+ /** Number of items to load. */
201
+ limit?: number | null;
202
+ /** Number of items to skip in the current sort order. */
203
+ offset?: number | null;
204
+ }
205
+ interface CursorPaging {
206
+ /** Maximum number of items to return in the results. */
207
+ limit?: number | null;
208
+ /**
209
+ * Pointer to the next or previous page in the list of results.
210
+ *
211
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
212
+ * Not relevant for the first request.
213
+ */
214
+ cursor?: string | null;
215
+ }
216
+ interface QueryOAuthAppsResponse {
217
+ /** List of OAuth apps matching the query. */
218
+ oAuthApps?: OAuthApp[];
219
+ /** Paging metadata. */
220
+ pagingMetadata?: PagingMetadataV2;
221
+ }
222
+ interface PagingMetadataV2 {
223
+ /** Number of items returned in the response. */
224
+ count?: number | null;
225
+ /** Offset that was requested. */
226
+ offset?: number | null;
227
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
228
+ total?: number | null;
229
+ /** Flag that indicates the server failed to calculate the `total` field. */
230
+ tooManyToCount?: boolean | null;
231
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
232
+ cursors?: Cursors;
233
+ }
234
+ interface Cursors {
235
+ /** Cursor string pointing to the next page in the list of results. */
236
+ next?: string | null;
237
+ /** Cursor pointing to the previous page in the list of results. */
238
+ prev?: string | null;
239
+ }
240
+ interface GenerateOAuthAppSecretRequest {
241
+ /** ID of the OAuth app to generate a secret for. */
242
+ oAuthAppId?: string;
243
+ }
244
+ interface GenerateOAuthAppSecretResponse {
245
+ /** Secret generated. */
246
+ oAuthAppSecret?: string;
247
+ }
248
+ interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
249
+ /** Emitted on a meta site creation. */
250
+ siteCreated?: SiteCreated;
251
+ /** Emitted on a meta site transfer completion. */
252
+ siteTransferred?: SiteTransferred;
253
+ /** Emitted on a meta site deletion. */
254
+ siteDeleted?: SiteDeleted;
255
+ /** Emitted on a meta site restoration. */
256
+ siteUndeleted?: SiteUndeleted;
257
+ /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
258
+ sitePublished?: SitePublished;
259
+ /** Emitted on a meta site unpublish. */
260
+ siteUnpublished?: SiteUnpublished;
261
+ /** Emitted when meta site is marked as template. */
262
+ siteMarkedAsTemplate?: SiteMarkedAsTemplate;
263
+ /** Emitted when meta site is marked as a WixSite. */
264
+ siteMarkedAsWixSite?: SiteMarkedAsWixSite;
265
+ /** Emitted when an application is provisioned (installed). */
266
+ serviceProvisioned?: ServiceProvisioned;
267
+ /** Emitted when an application is removed (uninstalled). */
268
+ serviceRemoved?: ServiceRemoved;
269
+ /** Emitted when meta site name (URL slug) is changed. */
270
+ siteRenamedPayload?: SiteRenamed;
271
+ /** Emitted when meta site was permanently deleted. */
272
+ hardDeleted?: SiteHardDeleted;
273
+ /** Emitted on a namespace change. */
274
+ namespaceChanged?: NamespaceChanged;
275
+ /** Emitted when Studio is attached. */
276
+ studioAssigned?: StudioAssigned;
277
+ /** Emitted when Studio is detached. */
278
+ studioUnassigned?: StudioUnassigned;
279
+ /** A meta site id. */
280
+ metaSiteId?: string;
281
+ /** A meta site version. Monotonically increasing. */
282
+ version?: string;
283
+ /** A timestamp of the event. */
284
+ timestamp?: string;
285
+ /** A list of "assets" (applications). The same as MetaSiteContext. */
286
+ assets?: Asset[];
287
+ }
288
+ /** @oneof */
289
+ interface MetaSiteSpecialEventPayloadOneOf {
290
+ /** Emitted on a meta site creation. */
291
+ siteCreated?: SiteCreated;
292
+ /** Emitted on a meta site transfer completion. */
293
+ siteTransferred?: SiteTransferred;
294
+ /** Emitted on a meta site deletion. */
295
+ siteDeleted?: SiteDeleted;
296
+ /** Emitted on a meta site restoration. */
297
+ siteUndeleted?: SiteUndeleted;
298
+ /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
299
+ sitePublished?: SitePublished;
300
+ /** Emitted on a meta site unpublish. */
301
+ siteUnpublished?: SiteUnpublished;
302
+ /** Emitted when meta site is marked as template. */
303
+ siteMarkedAsTemplate?: SiteMarkedAsTemplate;
304
+ /** Emitted when meta site is marked as a WixSite. */
305
+ siteMarkedAsWixSite?: SiteMarkedAsWixSite;
306
+ /** Emitted when an application is provisioned (installed). */
307
+ serviceProvisioned?: ServiceProvisioned;
308
+ /** Emitted when an application is removed (uninstalled). */
309
+ serviceRemoved?: ServiceRemoved;
310
+ /** Emitted when meta site name (URL slug) is changed. */
311
+ siteRenamedPayload?: SiteRenamed;
312
+ /** Emitted when meta site was permanently deleted. */
313
+ hardDeleted?: SiteHardDeleted;
314
+ /** Emitted on a namespace change. */
315
+ namespaceChanged?: NamespaceChanged;
316
+ /** Emitted when Studio is attached. */
317
+ studioAssigned?: StudioAssigned;
318
+ /** Emitted when Studio is detached. */
319
+ studioUnassigned?: StudioUnassigned;
320
+ }
321
+ interface Asset {
322
+ /** An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum). */
323
+ appDefId?: string;
324
+ /** An instance id. For legacy reasons may be UUID or a string. */
325
+ instanceId?: string;
326
+ /** An application state. */
327
+ state?: State;
328
+ }
329
+ declare enum State {
330
+ UNKNOWN = "UNKNOWN",
331
+ ENABLED = "ENABLED",
332
+ DISABLED = "DISABLED",
333
+ PENDING = "PENDING",
334
+ DEMO = "DEMO"
335
+ }
336
+ interface SiteCreated {
337
+ /** A template identifier (empty if not created from a template). */
338
+ originTemplateId?: string;
339
+ /** An account id of the owner. */
340
+ ownerId?: string;
341
+ /** A context in which meta site was created. */
342
+ context?: SiteCreatedContext;
343
+ /**
344
+ * A meta site id from which this site was created.
345
+ *
346
+ * In case of a creation from a template it's a template id.
347
+ * In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site.
348
+ */
349
+ originMetaSiteId?: string | null;
350
+ /** A meta site name (URL slug). */
351
+ siteName?: string;
352
+ /** A namespace. */
353
+ namespace?: Namespace;
354
+ }
355
+ declare enum SiteCreatedContext {
356
+ /** A valid option, we don't expose all reasons why site might be created. */
357
+ OTHER = "OTHER",
358
+ /** A meta site was created from template. */
359
+ FROM_TEMPLATE = "FROM_TEMPLATE",
360
+ /** A meta site was created by copying of the transfferred meta site. */
361
+ DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER",
362
+ /** A copy of existing meta site. */
363
+ DUPLICATE = "DUPLICATE",
364
+ /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
365
+ OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER",
366
+ /** deprecated A meta site was created for Flash editor. */
367
+ FLASH = "FLASH"
368
+ }
369
+ declare enum Namespace {
370
+ UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
371
+ /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
372
+ WIX = "WIX",
373
+ /** 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. */
374
+ SHOUT_OUT = "SHOUT_OUT",
375
+ /** 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. */
376
+ ALBUMS = "ALBUMS",
377
+ /** 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. */
378
+ WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE",
379
+ /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
380
+ HOTELS = "HOTELS",
381
+ /** 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. */
382
+ CLUBS = "CLUBS",
383
+ /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
384
+ ONBOARDING_DRAFT = "ONBOARDING_DRAFT",
385
+ /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
386
+ DEV_SITE = "DEV_SITE",
387
+ /** 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. */
388
+ LOGOS = "LOGOS",
389
+ /** 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. */
390
+ VIDEO_MAKER = "VIDEO_MAKER",
391
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
392
+ PARTNER_DASHBOARD = "PARTNER_DASHBOARD",
393
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
394
+ DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY",
395
+ /**
396
+ * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
397
+ *
398
+ * Meta site with this namespace will *not* be shown in a user's site list by default.
399
+ */
400
+ HTML_DRAFT = "HTML_DRAFT",
401
+ /**
402
+ * the user-journey for Fitness users who want to start from managing their business instead of designing their website.
403
+ * Will be accessible from Site List and will not have a website app.
404
+ * Once the user attaches a site, the site will become a regular wixsite.
405
+ */
406
+ SITELESS_BUSINESS = "SITELESS_BUSINESS",
407
+ /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
408
+ CREATOR_ECONOMY = "CREATOR_ECONOMY",
409
+ /** It is to be used in the Business First efforts. */
410
+ DASHBOARD_FIRST = "DASHBOARD_FIRST",
411
+ /** Bookings business flow with no site. */
412
+ ANYWHERE = "ANYWHERE",
413
+ /** Namespace for Headless Backoffice with no editor */
414
+ HEADLESS = "HEADLESS",
415
+ /**
416
+ * Namespace for master site that will exist in parent account that will be referenced by subaccounts
417
+ * The site will be used for account level CSM feature for enterprise
418
+ */
419
+ ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS",
420
+ /** Rise.ai Siteless account management for Gift Cards and Store Credit. */
421
+ RISE = "RISE",
422
+ /**
423
+ * As part of the branded app new funnel, users now can create a meta site that will be branded app first.
424
+ * There's a blank site behind the scene but it's blank).
425
+ * The Mobile company will be the owner of this namespace.
426
+ */
427
+ BRANDED_FIRST = "BRANDED_FIRST"
428
+ }
429
+ /** Site transferred to another user. */
430
+ interface SiteTransferred {
431
+ /** A previous owner id (user that transfers meta site). */
432
+ oldOwnerId?: string;
433
+ /** A new owner id (user that accepts meta site). */
434
+ newOwnerId?: string;
435
+ }
436
+ /** Soft deletion of the meta site. Could be restored. */
437
+ interface SiteDeleted {
438
+ /** A deletion context. */
439
+ deleteContext?: DeleteContext;
440
+ }
441
+ interface DeleteContext {
442
+ /** When the meta site was deleted. */
443
+ dateDeleted?: Date;
444
+ /** A status. */
445
+ deleteStatus?: DeleteStatus;
446
+ /** A reason (flow). */
447
+ deleteOrigin?: string;
448
+ /** A service that deleted it. */
449
+ initiatorId?: string | null;
450
+ }
451
+ declare enum DeleteStatus {
452
+ UNKNOWN = "UNKNOWN",
453
+ TRASH = "TRASH",
454
+ DELETED = "DELETED",
455
+ PENDING_PURGE = "PENDING_PURGE"
456
+ }
457
+ /** Restoration of the meta site. */
458
+ interface SiteUndeleted {
459
+ }
460
+ /** First publish of a meta site. Or subsequent publish after unpublish. */
461
+ interface SitePublished {
462
+ }
463
+ interface SiteUnpublished {
464
+ /** A list of URLs previously associated with the meta site. */
465
+ urls?: string[];
466
+ }
467
+ interface SiteMarkedAsTemplate {
468
+ }
469
+ interface SiteMarkedAsWixSite {
470
+ }
471
+ interface ServiceProvisioned {
472
+ /** Either UUID or EmbeddedServiceType. */
473
+ appDefId?: string;
474
+ /** Not only UUID. Something here could be something weird. */
475
+ instanceId?: string;
476
+ /** An instance id from which this instance is originated. */
477
+ originInstanceId?: string;
478
+ /** A version. */
479
+ version?: string | null;
480
+ }
481
+ interface ServiceRemoved {
482
+ /** Either UUID or EmbeddedServiceType. */
483
+ appDefId?: string;
484
+ /** Not only UUID. Something here could be something weird. */
485
+ instanceId?: string;
486
+ /** A version. */
487
+ version?: string | null;
488
+ }
489
+ /** Rename of the site. Meaning, free public url has been changed as well. */
490
+ interface SiteRenamed {
491
+ /** A new meta site name (URL slug). */
492
+ newSiteName?: string;
493
+ /** A previous meta site name (URL slug). */
494
+ oldSiteName?: string;
495
+ }
496
+ /**
497
+ * Hard deletion of the meta site.
498
+ *
499
+ * Could not be restored. Therefore it's desirable to cleanup data.
500
+ */
501
+ interface SiteHardDeleted {
502
+ /** A deletion context. */
503
+ deleteContext?: DeleteContext;
504
+ }
505
+ interface NamespaceChanged {
506
+ /** A previous namespace. */
507
+ oldNamespace?: Namespace;
508
+ /** A new namespace. */
509
+ newNamespace?: Namespace;
510
+ }
511
+ /** Assigned Studio editor */
512
+ interface StudioAssigned {
513
+ }
514
+ /** Unassigned Studio editor */
515
+ interface StudioUnassigned {
516
+ }
517
+ interface Empty {
518
+ }
519
+ interface DomainEvent extends DomainEventBodyOneOf {
520
+ createdEvent?: EntityCreatedEvent;
521
+ updatedEvent?: EntityUpdatedEvent;
522
+ deletedEvent?: EntityDeletedEvent;
523
+ actionEvent?: ActionEvent;
524
+ /**
525
+ * Unique event ID.
526
+ * Allows clients to ignore duplicate webhooks.
527
+ */
528
+ _id?: string;
529
+ /**
530
+ * Assumes actions are also always typed to an entity_type
531
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
532
+ */
533
+ entityFqdn?: string;
534
+ /**
535
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
536
+ * This is although the created/updated/deleted notion is duplication of the oneof types
537
+ * Example: created/updated/deleted/started/completed/email_opened
538
+ */
539
+ slug?: string;
540
+ /** ID of the entity associated with the event. */
541
+ entityId?: string;
542
+ /** Event timestamp. */
543
+ eventTime?: Date;
544
+ /**
545
+ * Whether the event was triggered as a result of a privacy regulation application
546
+ * (for example, GDPR).
547
+ */
548
+ triggeredByAnonymizeRequest?: boolean | null;
549
+ /** If present, indicates the action that triggered the event. */
550
+ originatedFrom?: string | null;
551
+ /**
552
+ * A sequence number defining the order of updates to the underlying entity.
553
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
554
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
555
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
556
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
557
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
558
+ */
559
+ entityEventSequence?: string | null;
560
+ }
561
+ /** @oneof */
562
+ interface DomainEventBodyOneOf {
563
+ createdEvent?: EntityCreatedEvent;
564
+ updatedEvent?: EntityUpdatedEvent;
565
+ deletedEvent?: EntityDeletedEvent;
566
+ actionEvent?: ActionEvent;
567
+ }
568
+ interface EntityCreatedEvent {
569
+ entity?: string;
570
+ }
571
+ interface EntityUpdatedEvent {
572
+ /**
573
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
574
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
575
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
576
+ */
577
+ currentEntity?: string;
578
+ }
579
+ interface EntityDeletedEvent {
580
+ /** Entity that was deleted */
581
+ deletedEntity?: string | null;
582
+ }
583
+ interface ActionEvent {
584
+ body?: string;
585
+ }
586
+ interface MessageEnvelope {
587
+ /** App instance ID. */
588
+ instanceId?: string | null;
589
+ /** Event type. */
590
+ eventType?: string;
591
+ /** The identification type and identity data. */
592
+ identity?: IdentificationData;
593
+ /** Stringify payload. */
594
+ data?: string;
595
+ }
84
596
  interface IdentificationData extends IdentificationDataIdOneOf {
85
597
  /** ID of a site visitor that has not logged in to the site. */
86
598
  anonymousVisitorId?: string;
@@ -111,6 +623,25 @@ declare enum WebhookIdentityType {
111
623
  WIX_USER = "WIX_USER",
112
624
  APP = "APP"
113
625
  }
626
+ interface OAuthAppNonNullableFields {
627
+ allowedDomains: string[];
628
+ allowedRedirectUris: string[];
629
+ allowedRedirectDomains: string[];
630
+ applicationType: OAuthAppType;
631
+ technology: OAuthTechnologies;
632
+ }
633
+ interface CreateOAuthAppResponseNonNullableFields {
634
+ oAuthApp?: OAuthAppNonNullableFields;
635
+ }
636
+ interface GetOAuthAppResponseNonNullableFields {
637
+ oAuthApp?: OAuthAppNonNullableFields;
638
+ }
639
+ interface UpdateOAuthAppResponseNonNullableFields {
640
+ oAuthApp?: OAuthAppNonNullableFields;
641
+ }
642
+ interface QueryOAuthAppsResponseNonNullableFields {
643
+ oAuthApps: OAuthAppNonNullableFields[];
644
+ }
114
645
  interface BaseEventMetadata {
115
646
  /** App instance ID. */
116
647
  instanceId?: string | null;
@@ -259,72 +790,171 @@ interface OAuthAppsQueryBuilder {
259
790
  find: () => Promise<OAuthAppsQueryResult>;
260
791
  }
261
792
 
262
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
263
- interface HttpClient {
264
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
793
+ declare function createOAuthApp$1(httpClient: HttpClient): CreateOAuthAppSignature;
794
+ interface CreateOAuthAppSignature {
795
+ /**
796
+ * Creates a new OAuth app for a Wix Headless client.
797
+ *
798
+ *
799
+ * 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.
800
+ *
801
+ * > **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.
802
+ * @param - OAuth app to create.
803
+ * @returns Created OAuth app info.
804
+ */
805
+ (oAuthApp: OAuthApp): Promise<OAuthApp & OAuthAppNonNullableFields>;
806
+ }
807
+ declare function getOAuthApp$1(httpClient: HttpClient): GetOAuthAppSignature;
808
+ interface GetOAuthAppSignature {
809
+ /**
810
+ * Retrieves an OAuth app by ID.
811
+ * @param - ID of the OAuth app to retrieve.
812
+ * @returns Retrieved OAuth app info.
813
+ */
814
+ (oAuthAppId: string): Promise<OAuthApp & OAuthAppNonNullableFields>;
815
+ }
816
+ declare function updateOAuthApp$1(httpClient: HttpClient): UpdateOAuthAppSignature;
817
+ interface UpdateOAuthAppSignature {
818
+ /**
819
+ * Updates an OAuth app.
820
+ *
821
+ *
822
+ * Only fields provided in `mask` are updated.
823
+ *
824
+ * You can update the following fields:
825
+ * + `name`
826
+ * + `description`
827
+ * + `allowedDomain`
828
+ * + `loginUrl`
829
+ * + `logoutUrl`
830
+ * + `technology`
831
+ * @param - ID of the OAuth app.
832
+ * @returns Updated OAuth app info.
833
+ */
834
+ (_id: string | null, oAuthApp: UpdateOAuthApp): Promise<OAuthApp & OAuthAppNonNullableFields>;
835
+ }
836
+ declare function queryOAuthApps$1(httpClient: HttpClient): QueryOAuthAppsSignature;
837
+ interface QueryOAuthAppsSignature {
838
+ /**
839
+ * Retrieves a list of OAuth apps, given the provided paging, filtering, and sorting.
840
+ *
841
+ *
842
+ * Query OAuth Apps runs with these defaults, which you can override:
843
+ * + Results are sorted by `id` in descending order.
844
+ * + `paging.offset` is `0`.
845
+ */
846
+ (): OAuthAppsQueryBuilder;
265
847
  }
266
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
267
- type HttpResponse<T = any> = {
268
- data: T;
269
- status: number;
270
- statusText: string;
271
- headers: any;
272
- request?: any;
273
- };
274
- type RequestOptions<_TResponse = any, Data = any> = {
275
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
276
- url: string;
277
- data?: Data;
278
- params?: URLSearchParams;
279
- } & APIMetadata;
280
- type APIMetadata = {
281
- methodFqn?: string;
282
- entityFqdn?: string;
283
- packageName?: string;
284
- };
285
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
286
- type EventDefinition<Payload = unknown, Type extends string = string> = {
287
- __type: 'event-definition';
288
- type: Type;
289
- isDomainEvent?: boolean;
290
- transformations?: unknown;
291
- __payload: Payload;
292
- };
293
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
294
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
295
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
296
-
297
- declare function createOAuthApp$1(httpClient: HttpClient): (oAuthApp: OAuthApp) => Promise<OAuthApp & {
298
- allowedRedirectUris: string[];
299
- allowedRedirectDomains: string[];
300
- applicationType: OAuthAppType;
301
- technology: OAuthTechnologies;
302
- }>;
303
- declare function getOAuthApp$1(httpClient: HttpClient): (oAuthAppId: string) => Promise<OAuthApp & {
304
- allowedRedirectUris: string[];
305
- allowedRedirectDomains: string[];
306
- applicationType: OAuthAppType;
307
- technology: OAuthTechnologies;
308
- }>;
309
- declare function updateOAuthApp$1(httpClient: HttpClient): (_id: string | null, oAuthApp: UpdateOAuthApp) => Promise<OAuthApp & {
310
- allowedRedirectUris: string[];
311
- allowedRedirectDomains: string[];
312
- applicationType: OAuthAppType;
313
- technology: OAuthTechnologies;
314
- }>;
315
- declare function queryOAuthApps$1(httpClient: HttpClient): () => OAuthAppsQueryBuilder;
316
848
  declare const onOAuthAppCreated$1: EventDefinition<OAuthAppCreatedEnvelope, "wix.headless.v1.o_auth_app_created">;
317
849
  declare const onOAuthAppUpdated$1: EventDefinition<OAuthAppUpdatedEnvelope, "wix.headless.v1.o_auth_app_updated">;
318
850
  declare const onOAuthAppDeleted$1: EventDefinition<OAuthAppDeletedEnvelope, "wix.headless.v1.o_auth_app_deleted">;
319
851
 
320
- declare const createOAuthApp: BuildRESTFunction<typeof createOAuthApp$1>;
321
- declare const getOAuthApp: BuildRESTFunction<typeof getOAuthApp$1>;
322
- declare const updateOAuthApp: BuildRESTFunction<typeof updateOAuthApp$1>;
323
- declare const queryOAuthApps: BuildRESTFunction<typeof queryOAuthApps$1>;
324
- declare const onOAuthAppCreated: BuildEventDefinition<typeof onOAuthAppCreated$1>;
325
- declare const onOAuthAppUpdated: BuildEventDefinition<typeof onOAuthAppUpdated$1>;
326
- declare const onOAuthAppDeleted: BuildEventDefinition<typeof onOAuthAppDeleted$1>;
852
+ declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
853
+
854
+ declare const createOAuthApp: BuildRESTFunction<typeof createOAuthApp$1> & typeof createOAuthApp$1;
855
+ declare const getOAuthApp: BuildRESTFunction<typeof getOAuthApp$1> & typeof getOAuthApp$1;
856
+ declare const updateOAuthApp: BuildRESTFunction<typeof updateOAuthApp$1> & typeof updateOAuthApp$1;
857
+ declare const queryOAuthApps: BuildRESTFunction<typeof queryOAuthApps$1> & typeof queryOAuthApps$1;
858
+
859
+ type _publicOnOAuthAppCreatedType = typeof onOAuthAppCreated$1;
860
+ /**
861
+ * Triggered when an OAuth app is created.
862
+ */
863
+ declare const onOAuthAppCreated: ReturnType<typeof createEventModule<_publicOnOAuthAppCreatedType>>;
864
+
865
+ type _publicOnOAuthAppUpdatedType = typeof onOAuthAppUpdated$1;
866
+ /**
867
+ * Triggered when an OAuth app is updated.
868
+ */
869
+ declare const onOAuthAppUpdated: ReturnType<typeof createEventModule<_publicOnOAuthAppUpdatedType>>;
870
+
871
+ type _publicOnOAuthAppDeletedType = typeof onOAuthAppDeleted$1;
872
+ /**
873
+ * Triggered when an OAuth app is deleted.
874
+ */
875
+ declare const onOAuthAppDeleted: ReturnType<typeof createEventModule<_publicOnOAuthAppDeletedType>>;
327
876
 
877
+ type context_ActionEvent = ActionEvent;
878
+ type context_Asset = Asset;
879
+ type context_BaseEventMetadata = BaseEventMetadata;
880
+ type context_CreateOAuthAppRequest = CreateOAuthAppRequest;
881
+ type context_CreateOAuthAppResponse = CreateOAuthAppResponse;
882
+ type context_CreateOAuthAppResponseNonNullableFields = CreateOAuthAppResponseNonNullableFields;
883
+ type context_CursorPaging = CursorPaging;
884
+ type context_Cursors = Cursors;
885
+ type context_DeleteContext = DeleteContext;
886
+ type context_DeleteOAuthAppRequest = DeleteOAuthAppRequest;
887
+ type context_DeleteOAuthAppResponse = DeleteOAuthAppResponse;
888
+ type context_DeleteStatus = DeleteStatus;
889
+ declare const context_DeleteStatus: typeof DeleteStatus;
890
+ type context_DomainEvent = DomainEvent;
891
+ type context_DomainEventBodyOneOf = DomainEventBodyOneOf;
892
+ type context_Empty = Empty;
893
+ type context_EntityCreatedEvent = EntityCreatedEvent;
894
+ type context_EntityDeletedEvent = EntityDeletedEvent;
895
+ type context_EntityUpdatedEvent = EntityUpdatedEvent;
896
+ type context_EventMetadata = EventMetadata;
897
+ type context_GenerateOAuthAppSecretRequest = GenerateOAuthAppSecretRequest;
898
+ type context_GenerateOAuthAppSecretResponse = GenerateOAuthAppSecretResponse;
899
+ type context_GetOAuthAppRequest = GetOAuthAppRequest;
900
+ type context_GetOAuthAppResponse = GetOAuthAppResponse;
901
+ type context_GetOAuthAppResponseNonNullableFields = GetOAuthAppResponseNonNullableFields;
902
+ type context_IdentificationData = IdentificationData;
903
+ type context_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
904
+ type context_MessageEnvelope = MessageEnvelope;
905
+ type context_MetaSiteSpecialEvent = MetaSiteSpecialEvent;
906
+ type context_MetaSiteSpecialEventPayloadOneOf = MetaSiteSpecialEventPayloadOneOf;
907
+ type context_Namespace = Namespace;
908
+ declare const context_Namespace: typeof Namespace;
909
+ type context_NamespaceChanged = NamespaceChanged;
910
+ type context_OAuthApp = OAuthApp;
911
+ type context_OAuthAppCreatedEnvelope = OAuthAppCreatedEnvelope;
912
+ type context_OAuthAppDeletedEnvelope = OAuthAppDeletedEnvelope;
913
+ type context_OAuthAppNonNullableFields = OAuthAppNonNullableFields;
914
+ type context_OAuthAppType = OAuthAppType;
915
+ declare const context_OAuthAppType: typeof OAuthAppType;
916
+ type context_OAuthAppUpdatedEnvelope = OAuthAppUpdatedEnvelope;
917
+ type context_OAuthAppsQueryBuilder = OAuthAppsQueryBuilder;
918
+ type context_OAuthAppsQueryResult = OAuthAppsQueryResult;
919
+ type context_OAuthTechnologies = OAuthTechnologies;
920
+ declare const context_OAuthTechnologies: typeof OAuthTechnologies;
921
+ type context_Paging = Paging;
922
+ type context_PagingMetadataV2 = PagingMetadataV2;
923
+ type context_PlatformQuery = PlatformQuery;
924
+ type context_PlatformQueryPagingMethodOneOf = PlatformQueryPagingMethodOneOf;
925
+ type context_QueryOAuthAppsRequest = QueryOAuthAppsRequest;
926
+ type context_QueryOAuthAppsResponse = QueryOAuthAppsResponse;
927
+ type context_QueryOAuthAppsResponseNonNullableFields = QueryOAuthAppsResponseNonNullableFields;
928
+ type context_ServiceProvisioned = ServiceProvisioned;
929
+ type context_ServiceRemoved = ServiceRemoved;
930
+ type context_SiteCreated = SiteCreated;
931
+ type context_SiteCreatedContext = SiteCreatedContext;
932
+ declare const context_SiteCreatedContext: typeof SiteCreatedContext;
933
+ type context_SiteDeleted = SiteDeleted;
934
+ type context_SiteHardDeleted = SiteHardDeleted;
935
+ type context_SiteMarkedAsTemplate = SiteMarkedAsTemplate;
936
+ type context_SiteMarkedAsWixSite = SiteMarkedAsWixSite;
937
+ type context_SitePublished = SitePublished;
938
+ type context_SiteRenamed = SiteRenamed;
939
+ type context_SiteTransferred = SiteTransferred;
940
+ type context_SiteUndeleted = SiteUndeleted;
941
+ type context_SiteUnpublished = SiteUnpublished;
942
+ type context_SortOrder = SortOrder;
943
+ declare const context_SortOrder: typeof SortOrder;
944
+ type context_Sorting = Sorting;
945
+ type context_State = State;
946
+ declare const context_State: typeof State;
947
+ type context_StudioAssigned = StudioAssigned;
948
+ type context_StudioUnassigned = StudioUnassigned;
949
+ type context_UpdateOAuthApp = UpdateOAuthApp;
950
+ type context_UpdateOAuthAppRequest = UpdateOAuthAppRequest;
951
+ type context_UpdateOAuthAppResponse = UpdateOAuthAppResponse;
952
+ type context_UpdateOAuthAppResponseNonNullableFields = UpdateOAuthAppResponseNonNullableFields;
953
+ type context_WebhookIdentityType = WebhookIdentityType;
954
+ declare const context_WebhookIdentityType: typeof WebhookIdentityType;
955
+ type context__publicOnOAuthAppCreatedType = _publicOnOAuthAppCreatedType;
956
+ type context__publicOnOAuthAppDeletedType = _publicOnOAuthAppDeletedType;
957
+ type context__publicOnOAuthAppUpdatedType = _publicOnOAuthAppUpdatedType;
328
958
  declare const context_createOAuthApp: typeof createOAuthApp;
329
959
  declare const context_getOAuthApp: typeof getOAuthApp;
330
960
  declare const context_onOAuthAppCreated: typeof onOAuthAppCreated;
@@ -333,7 +963,7 @@ declare const context_onOAuthAppUpdated: typeof onOAuthAppUpdated;
333
963
  declare const context_queryOAuthApps: typeof queryOAuthApps;
334
964
  declare const context_updateOAuthApp: typeof updateOAuthApp;
335
965
  declare namespace context {
336
- export { context_createOAuthApp as createOAuthApp, context_getOAuthApp as getOAuthApp, context_onOAuthAppCreated as onOAuthAppCreated, context_onOAuthAppDeleted as onOAuthAppDeleted, context_onOAuthAppUpdated as onOAuthAppUpdated, context_queryOAuthApps as queryOAuthApps, context_updateOAuthApp as updateOAuthApp };
966
+ export { type context_ActionEvent as ActionEvent, type context_Asset as Asset, type context_BaseEventMetadata as BaseEventMetadata, type context_CreateOAuthAppRequest as CreateOAuthAppRequest, type context_CreateOAuthAppResponse as CreateOAuthAppResponse, type context_CreateOAuthAppResponseNonNullableFields as CreateOAuthAppResponseNonNullableFields, type context_CursorPaging as CursorPaging, type context_Cursors as Cursors, type context_DeleteContext as DeleteContext, type context_DeleteOAuthAppRequest as DeleteOAuthAppRequest, type context_DeleteOAuthAppResponse as DeleteOAuthAppResponse, context_DeleteStatus as DeleteStatus, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_Empty as Empty, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_EventMetadata as EventMetadata, type context_GenerateOAuthAppSecretRequest as GenerateOAuthAppSecretRequest, type context_GenerateOAuthAppSecretResponse as GenerateOAuthAppSecretResponse, type context_GetOAuthAppRequest as GetOAuthAppRequest, type context_GetOAuthAppResponse as GetOAuthAppResponse, type context_GetOAuthAppResponseNonNullableFields as GetOAuthAppResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context_MessageEnvelope as MessageEnvelope, type context_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type context_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, context_Namespace as Namespace, type context_NamespaceChanged as NamespaceChanged, type context_OAuthApp as OAuthApp, type context_OAuthAppCreatedEnvelope as OAuthAppCreatedEnvelope, type context_OAuthAppDeletedEnvelope as OAuthAppDeletedEnvelope, type context_OAuthAppNonNullableFields as OAuthAppNonNullableFields, context_OAuthAppType as OAuthAppType, type context_OAuthAppUpdatedEnvelope as OAuthAppUpdatedEnvelope, type context_OAuthAppsQueryBuilder as OAuthAppsQueryBuilder, type context_OAuthAppsQueryResult as OAuthAppsQueryResult, context_OAuthTechnologies as OAuthTechnologies, type context_Paging as Paging, type context_PagingMetadataV2 as PagingMetadataV2, type context_PlatformQuery as PlatformQuery, type context_PlatformQueryPagingMethodOneOf as PlatformQueryPagingMethodOneOf, type context_QueryOAuthAppsRequest as QueryOAuthAppsRequest, type context_QueryOAuthAppsResponse as QueryOAuthAppsResponse, type context_QueryOAuthAppsResponseNonNullableFields as QueryOAuthAppsResponseNonNullableFields, type context_ServiceProvisioned as ServiceProvisioned, type context_ServiceRemoved as ServiceRemoved, type context_SiteCreated as SiteCreated, context_SiteCreatedContext as SiteCreatedContext, type context_SiteDeleted as SiteDeleted, type context_SiteHardDeleted as SiteHardDeleted, type context_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type context_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type context_SitePublished as SitePublished, type context_SiteRenamed as SiteRenamed, type context_SiteTransferred as SiteTransferred, type context_SiteUndeleted as SiteUndeleted, type context_SiteUnpublished as SiteUnpublished, context_SortOrder as SortOrder, type context_Sorting as Sorting, context_State as State, type context_StudioAssigned as StudioAssigned, type context_StudioUnassigned as StudioUnassigned, type context_UpdateOAuthApp as UpdateOAuthApp, type context_UpdateOAuthAppRequest as UpdateOAuthAppRequest, type context_UpdateOAuthAppResponse as UpdateOAuthAppResponse, type context_UpdateOAuthAppResponseNonNullableFields as UpdateOAuthAppResponseNonNullableFields, context_WebhookIdentityType as WebhookIdentityType, type context__publicOnOAuthAppCreatedType as _publicOnOAuthAppCreatedType, type context__publicOnOAuthAppDeletedType as _publicOnOAuthAppDeletedType, type context__publicOnOAuthAppUpdatedType as _publicOnOAuthAppUpdatedType, context_createOAuthApp as createOAuthApp, context_getOAuthApp as getOAuthApp, context_onOAuthAppCreated as onOAuthAppCreated, context_onOAuthAppDeleted as onOAuthAppDeleted, context_onOAuthAppUpdated as onOAuthAppUpdated, onOAuthAppCreated$1 as publicOnOAuthAppCreated, onOAuthAppDeleted$1 as publicOnOAuthAppDeleted, onOAuthAppUpdated$1 as publicOnOAuthAppUpdated, context_queryOAuthApps as queryOAuthApps, context_updateOAuthApp as updateOAuthApp };
337
967
  }
338
968
 
339
969
  export { context as oAuthApps };
@@ -1,3 +1,47 @@
1
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
+ interface HttpClient {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
4
+ fetchWithAuth: typeof fetch;
5
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
+ }
7
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
+ type HttpResponse<T = any> = {
9
+ data: T;
10
+ status: number;
11
+ statusText: string;
12
+ headers: any;
13
+ request?: any;
14
+ };
15
+ type RequestOptions<_TResponse = any, Data = any> = {
16
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
+ url: string;
18
+ data?: Data;
19
+ params?: URLSearchParams;
20
+ } & APIMetadata;
21
+ type APIMetadata = {
22
+ methodFqn?: string;
23
+ entityFqdn?: string;
24
+ packageName?: string;
25
+ };
26
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
28
+ __type: 'event-definition';
29
+ type: Type;
30
+ isDomainEvent?: boolean;
31
+ transformations?: (envelope: unknown) => Payload;
32
+ __payload: Payload;
33
+ };
34
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
35
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
36
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
37
+
38
+ declare global {
39
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
40
+ interface SymbolConstructor {
41
+ readonly observable: symbol;
42
+ }
43
+ }
44
+
1
45
  /** An intermediary application that authorizes and authenticates an external client to access data on a Wix project or site. */
2
46
  interface OAuthApp {
3
47
  /**
@@ -579,37 +623,24 @@ declare enum WebhookIdentityType {
579
623
  WIX_USER = "WIX_USER",
580
624
  APP = "APP"
581
625
  }
626
+ interface OAuthAppNonNullableFields {
627
+ allowedDomains: string[];
628
+ allowedRedirectUris: string[];
629
+ allowedRedirectDomains: string[];
630
+ applicationType: OAuthAppType;
631
+ technology: OAuthTechnologies;
632
+ }
582
633
  interface CreateOAuthAppResponseNonNullableFields {
583
- oAuthApp?: {
584
- allowedRedirectUris: string[];
585
- allowedRedirectDomains: string[];
586
- applicationType: OAuthAppType;
587
- technology: OAuthTechnologies;
588
- };
634
+ oAuthApp?: OAuthAppNonNullableFields;
589
635
  }
590
636
  interface GetOAuthAppResponseNonNullableFields {
591
- oAuthApp?: {
592
- allowedRedirectUris: string[];
593
- allowedRedirectDomains: string[];
594
- applicationType: OAuthAppType;
595
- technology: OAuthTechnologies;
596
- };
637
+ oAuthApp?: OAuthAppNonNullableFields;
597
638
  }
598
639
  interface UpdateOAuthAppResponseNonNullableFields {
599
- oAuthApp?: {
600
- allowedRedirectUris: string[];
601
- allowedRedirectDomains: string[];
602
- applicationType: OAuthAppType;
603
- technology: OAuthTechnologies;
604
- };
640
+ oAuthApp?: OAuthAppNonNullableFields;
605
641
  }
606
642
  interface QueryOAuthAppsResponseNonNullableFields {
607
- oAuthApps: {
608
- allowedRedirectUris: string[];
609
- allowedRedirectDomains: string[];
610
- applicationType: OAuthAppType;
611
- technology: OAuthTechnologies;
612
- }[];
643
+ oAuthApps: OAuthAppNonNullableFields[];
613
644
  }
614
645
  interface BaseEventMetadata {
615
646
  /** App instance ID. */
@@ -759,62 +790,89 @@ interface OAuthAppsQueryBuilder {
759
790
  find: () => Promise<OAuthAppsQueryResult>;
760
791
  }
761
792
 
762
- interface HttpClient {
763
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
793
+ declare function createOAuthApp$1(httpClient: HttpClient): CreateOAuthAppSignature;
794
+ interface CreateOAuthAppSignature {
795
+ /**
796
+ * Creates a new OAuth app for a Wix Headless client.
797
+ *
798
+ *
799
+ * 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.
800
+ *
801
+ * > **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.
802
+ * @param - OAuth app to create.
803
+ * @returns Created OAuth app info.
804
+ */
805
+ (oAuthApp: OAuthApp): Promise<OAuthApp & OAuthAppNonNullableFields>;
764
806
  }
765
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
766
- type HttpResponse<T = any> = {
767
- data: T;
768
- status: number;
769
- statusText: string;
770
- headers: any;
771
- request?: any;
772
- };
773
- type RequestOptions<_TResponse = any, Data = any> = {
774
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
775
- url: string;
776
- data?: Data;
777
- params?: URLSearchParams;
778
- } & APIMetadata;
779
- type APIMetadata = {
780
- methodFqn?: string;
781
- entityFqdn?: string;
782
- packageName?: string;
783
- };
784
- type EventDefinition<Payload = unknown, Type extends string = string> = {
785
- __type: 'event-definition';
786
- type: Type;
787
- isDomainEvent?: boolean;
788
- transformations?: unknown;
789
- __payload: Payload;
790
- };
791
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
807
+ declare function getOAuthApp$1(httpClient: HttpClient): GetOAuthAppSignature;
808
+ interface GetOAuthAppSignature {
809
+ /**
810
+ * Retrieves an OAuth app by ID.
811
+ * @param - ID of the OAuth app to retrieve.
812
+ * @returns Retrieved OAuth app info.
813
+ */
814
+ (oAuthAppId: string): Promise<OAuthApp & OAuthAppNonNullableFields>;
815
+ }
816
+ declare function updateOAuthApp$1(httpClient: HttpClient): UpdateOAuthAppSignature;
817
+ interface UpdateOAuthAppSignature {
818
+ /**
819
+ * Updates an OAuth app.
820
+ *
821
+ *
822
+ * Only fields provided in `mask` are updated.
823
+ *
824
+ * You can update the following fields:
825
+ * + `name`
826
+ * + `description`
827
+ * + `allowedDomain`
828
+ * + `loginUrl`
829
+ * + `logoutUrl`
830
+ * + `technology`
831
+ * @param - ID of the OAuth app.
832
+ * @returns Updated OAuth app info.
833
+ */
834
+ (_id: string | null, oAuthApp: UpdateOAuthApp): Promise<OAuthApp & OAuthAppNonNullableFields>;
835
+ }
836
+ declare function queryOAuthApps$1(httpClient: HttpClient): QueryOAuthAppsSignature;
837
+ interface QueryOAuthAppsSignature {
838
+ /**
839
+ * Retrieves a list of OAuth apps, given the provided paging, filtering, and sorting.
840
+ *
841
+ *
842
+ * Query OAuth Apps runs with these defaults, which you can override:
843
+ * + Results are sorted by `id` in descending order.
844
+ * + `paging.offset` is `0`.
845
+ */
846
+ (): OAuthAppsQueryBuilder;
847
+ }
848
+ declare const onOAuthAppCreated$1: EventDefinition<OAuthAppCreatedEnvelope, "wix.headless.v1.o_auth_app_created">;
849
+ declare const onOAuthAppUpdated$1: EventDefinition<OAuthAppUpdatedEnvelope, "wix.headless.v1.o_auth_app_updated">;
850
+ declare const onOAuthAppDeleted$1: EventDefinition<OAuthAppDeletedEnvelope, "wix.headless.v1.o_auth_app_deleted">;
792
851
 
793
- declare const __metadata: {
794
- PACKAGE_NAME: string;
795
- };
796
- declare function createOAuthApp(httpClient: HttpClient): (oAuthApp: OAuthApp) => Promise<OAuthApp & {
797
- allowedRedirectUris: string[];
798
- allowedRedirectDomains: string[];
799
- applicationType: OAuthAppType;
800
- technology: OAuthTechnologies;
801
- }>;
802
- declare function getOAuthApp(httpClient: HttpClient): (oAuthAppId: string) => Promise<OAuthApp & {
803
- allowedRedirectUris: string[];
804
- allowedRedirectDomains: string[];
805
- applicationType: OAuthAppType;
806
- technology: OAuthTechnologies;
807
- }>;
808
- declare function updateOAuthApp(httpClient: HttpClient): (_id: string | null, oAuthApp: UpdateOAuthApp) => Promise<OAuthApp & {
809
- allowedRedirectUris: string[];
810
- allowedRedirectDomains: string[];
811
- applicationType: OAuthAppType;
812
- technology: OAuthTechnologies;
813
- }>;
814
- declare function queryOAuthApps(httpClient: HttpClient): () => OAuthAppsQueryBuilder;
815
- declare const onOAuthAppCreated: EventDefinition<OAuthAppCreatedEnvelope, "wix.headless.v1.o_auth_app_created">;
816
- declare const onOAuthAppUpdated: EventDefinition<OAuthAppUpdatedEnvelope, "wix.headless.v1.o_auth_app_updated">;
817
- declare const onOAuthAppDeleted: EventDefinition<OAuthAppDeletedEnvelope, "wix.headless.v1.o_auth_app_deleted">;
852
+ declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
853
+
854
+ declare const createOAuthApp: BuildRESTFunction<typeof createOAuthApp$1> & typeof createOAuthApp$1;
855
+ declare const getOAuthApp: BuildRESTFunction<typeof getOAuthApp$1> & typeof getOAuthApp$1;
856
+ declare const updateOAuthApp: BuildRESTFunction<typeof updateOAuthApp$1> & typeof updateOAuthApp$1;
857
+ declare const queryOAuthApps: BuildRESTFunction<typeof queryOAuthApps$1> & typeof queryOAuthApps$1;
858
+
859
+ type _publicOnOAuthAppCreatedType = typeof onOAuthAppCreated$1;
860
+ /**
861
+ * Triggered when an OAuth app is created.
862
+ */
863
+ declare const onOAuthAppCreated: ReturnType<typeof createEventModule<_publicOnOAuthAppCreatedType>>;
864
+
865
+ type _publicOnOAuthAppUpdatedType = typeof onOAuthAppUpdated$1;
866
+ /**
867
+ * Triggered when an OAuth app is updated.
868
+ */
869
+ declare const onOAuthAppUpdated: ReturnType<typeof createEventModule<_publicOnOAuthAppUpdatedType>>;
870
+
871
+ type _publicOnOAuthAppDeletedType = typeof onOAuthAppDeleted$1;
872
+ /**
873
+ * Triggered when an OAuth app is deleted.
874
+ */
875
+ declare const onOAuthAppDeleted: ReturnType<typeof createEventModule<_publicOnOAuthAppDeletedType>>;
818
876
 
819
877
  type index_d_ActionEvent = ActionEvent;
820
878
  type index_d_Asset = Asset;
@@ -852,6 +910,7 @@ type index_d_NamespaceChanged = NamespaceChanged;
852
910
  type index_d_OAuthApp = OAuthApp;
853
911
  type index_d_OAuthAppCreatedEnvelope = OAuthAppCreatedEnvelope;
854
912
  type index_d_OAuthAppDeletedEnvelope = OAuthAppDeletedEnvelope;
913
+ type index_d_OAuthAppNonNullableFields = OAuthAppNonNullableFields;
855
914
  type index_d_OAuthAppType = OAuthAppType;
856
915
  declare const index_d_OAuthAppType: typeof OAuthAppType;
857
916
  type index_d_OAuthAppUpdatedEnvelope = OAuthAppUpdatedEnvelope;
@@ -893,7 +952,9 @@ type index_d_UpdateOAuthAppResponse = UpdateOAuthAppResponse;
893
952
  type index_d_UpdateOAuthAppResponseNonNullableFields = UpdateOAuthAppResponseNonNullableFields;
894
953
  type index_d_WebhookIdentityType = WebhookIdentityType;
895
954
  declare const index_d_WebhookIdentityType: typeof WebhookIdentityType;
896
- declare const index_d___metadata: typeof __metadata;
955
+ type index_d__publicOnOAuthAppCreatedType = _publicOnOAuthAppCreatedType;
956
+ type index_d__publicOnOAuthAppDeletedType = _publicOnOAuthAppDeletedType;
957
+ type index_d__publicOnOAuthAppUpdatedType = _publicOnOAuthAppUpdatedType;
897
958
  declare const index_d_createOAuthApp: typeof createOAuthApp;
898
959
  declare const index_d_getOAuthApp: typeof getOAuthApp;
899
960
  declare const index_d_onOAuthAppCreated: typeof onOAuthAppCreated;
@@ -902,7 +963,7 @@ declare const index_d_onOAuthAppUpdated: typeof onOAuthAppUpdated;
902
963
  declare const index_d_queryOAuthApps: typeof queryOAuthApps;
903
964
  declare const index_d_updateOAuthApp: typeof updateOAuthApp;
904
965
  declare namespace index_d {
905
- export { type index_d_ActionEvent as ActionEvent, type index_d_Asset as Asset, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_CreateOAuthAppRequest as CreateOAuthAppRequest, type index_d_CreateOAuthAppResponse as CreateOAuthAppResponse, type index_d_CreateOAuthAppResponseNonNullableFields as CreateOAuthAppResponseNonNullableFields, type index_d_CursorPaging as CursorPaging, type index_d_Cursors as Cursors, type index_d_DeleteContext as DeleteContext, type index_d_DeleteOAuthAppRequest as DeleteOAuthAppRequest, type index_d_DeleteOAuthAppResponse as DeleteOAuthAppResponse, index_d_DeleteStatus as DeleteStatus, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_Empty as Empty, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_GenerateOAuthAppSecretRequest as GenerateOAuthAppSecretRequest, type index_d_GenerateOAuthAppSecretResponse as GenerateOAuthAppSecretResponse, type index_d_GetOAuthAppRequest as GetOAuthAppRequest, type index_d_GetOAuthAppResponse as GetOAuthAppResponse, type index_d_GetOAuthAppResponseNonNullableFields as GetOAuthAppResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type index_d_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, index_d_Namespace as Namespace, type index_d_NamespaceChanged as NamespaceChanged, type index_d_OAuthApp as OAuthApp, type index_d_OAuthAppCreatedEnvelope as OAuthAppCreatedEnvelope, type index_d_OAuthAppDeletedEnvelope as OAuthAppDeletedEnvelope, index_d_OAuthAppType as OAuthAppType, type index_d_OAuthAppUpdatedEnvelope as OAuthAppUpdatedEnvelope, type index_d_OAuthAppsQueryBuilder as OAuthAppsQueryBuilder, type index_d_OAuthAppsQueryResult as OAuthAppsQueryResult, index_d_OAuthTechnologies as OAuthTechnologies, type index_d_Paging as Paging, type index_d_PagingMetadataV2 as PagingMetadataV2, type index_d_PlatformQuery as PlatformQuery, type index_d_PlatformQueryPagingMethodOneOf as PlatformQueryPagingMethodOneOf, type index_d_QueryOAuthAppsRequest as QueryOAuthAppsRequest, type index_d_QueryOAuthAppsResponse as QueryOAuthAppsResponse, type index_d_QueryOAuthAppsResponseNonNullableFields as QueryOAuthAppsResponseNonNullableFields, type index_d_ServiceProvisioned as ServiceProvisioned, type index_d_ServiceRemoved as ServiceRemoved, type index_d_SiteCreated as SiteCreated, index_d_SiteCreatedContext as SiteCreatedContext, type index_d_SiteDeleted as SiteDeleted, type index_d_SiteHardDeleted as SiteHardDeleted, type index_d_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type index_d_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type index_d_SitePublished as SitePublished, type index_d_SiteRenamed as SiteRenamed, type index_d_SiteTransferred as SiteTransferred, type index_d_SiteUndeleted as SiteUndeleted, type index_d_SiteUnpublished as SiteUnpublished, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, index_d_State as State, type index_d_StudioAssigned as StudioAssigned, type index_d_StudioUnassigned as StudioUnassigned, type index_d_UpdateOAuthApp as UpdateOAuthApp, type index_d_UpdateOAuthAppRequest as UpdateOAuthAppRequest, type index_d_UpdateOAuthAppResponse as UpdateOAuthAppResponse, type index_d_UpdateOAuthAppResponseNonNullableFields as UpdateOAuthAppResponseNonNullableFields, index_d_WebhookIdentityType as WebhookIdentityType, index_d___metadata as __metadata, index_d_createOAuthApp as createOAuthApp, index_d_getOAuthApp as getOAuthApp, index_d_onOAuthAppCreated as onOAuthAppCreated, index_d_onOAuthAppDeleted as onOAuthAppDeleted, index_d_onOAuthAppUpdated as onOAuthAppUpdated, index_d_queryOAuthApps as queryOAuthApps, index_d_updateOAuthApp as updateOAuthApp };
966
+ export { type index_d_ActionEvent as ActionEvent, type index_d_Asset as Asset, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_CreateOAuthAppRequest as CreateOAuthAppRequest, type index_d_CreateOAuthAppResponse as CreateOAuthAppResponse, type index_d_CreateOAuthAppResponseNonNullableFields as CreateOAuthAppResponseNonNullableFields, type index_d_CursorPaging as CursorPaging, type index_d_Cursors as Cursors, type index_d_DeleteContext as DeleteContext, type index_d_DeleteOAuthAppRequest as DeleteOAuthAppRequest, type index_d_DeleteOAuthAppResponse as DeleteOAuthAppResponse, index_d_DeleteStatus as DeleteStatus, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_Empty as Empty, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_GenerateOAuthAppSecretRequest as GenerateOAuthAppSecretRequest, type index_d_GenerateOAuthAppSecretResponse as GenerateOAuthAppSecretResponse, type index_d_GetOAuthAppRequest as GetOAuthAppRequest, type index_d_GetOAuthAppResponse as GetOAuthAppResponse, type index_d_GetOAuthAppResponseNonNullableFields as GetOAuthAppResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type index_d_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, index_d_Namespace as Namespace, type index_d_NamespaceChanged as NamespaceChanged, type index_d_OAuthApp as OAuthApp, type index_d_OAuthAppCreatedEnvelope as OAuthAppCreatedEnvelope, type index_d_OAuthAppDeletedEnvelope as OAuthAppDeletedEnvelope, type index_d_OAuthAppNonNullableFields as OAuthAppNonNullableFields, index_d_OAuthAppType as OAuthAppType, type index_d_OAuthAppUpdatedEnvelope as OAuthAppUpdatedEnvelope, type index_d_OAuthAppsQueryBuilder as OAuthAppsQueryBuilder, type index_d_OAuthAppsQueryResult as OAuthAppsQueryResult, index_d_OAuthTechnologies as OAuthTechnologies, type index_d_Paging as Paging, type index_d_PagingMetadataV2 as PagingMetadataV2, type index_d_PlatformQuery as PlatformQuery, type index_d_PlatformQueryPagingMethodOneOf as PlatformQueryPagingMethodOneOf, type index_d_QueryOAuthAppsRequest as QueryOAuthAppsRequest, type index_d_QueryOAuthAppsResponse as QueryOAuthAppsResponse, type index_d_QueryOAuthAppsResponseNonNullableFields as QueryOAuthAppsResponseNonNullableFields, type index_d_ServiceProvisioned as ServiceProvisioned, type index_d_ServiceRemoved as ServiceRemoved, type index_d_SiteCreated as SiteCreated, index_d_SiteCreatedContext as SiteCreatedContext, type index_d_SiteDeleted as SiteDeleted, type index_d_SiteHardDeleted as SiteHardDeleted, type index_d_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type index_d_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type index_d_SitePublished as SitePublished, type index_d_SiteRenamed as SiteRenamed, type index_d_SiteTransferred as SiteTransferred, type index_d_SiteUndeleted as SiteUndeleted, type index_d_SiteUnpublished as SiteUnpublished, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, index_d_State as State, type index_d_StudioAssigned as StudioAssigned, type index_d_StudioUnassigned as StudioUnassigned, type index_d_UpdateOAuthApp as UpdateOAuthApp, type index_d_UpdateOAuthAppRequest as UpdateOAuthAppRequest, type index_d_UpdateOAuthAppResponse as UpdateOAuthAppResponse, type index_d_UpdateOAuthAppResponseNonNullableFields as UpdateOAuthAppResponseNonNullableFields, index_d_WebhookIdentityType as WebhookIdentityType, type index_d__publicOnOAuthAppCreatedType as _publicOnOAuthAppCreatedType, type index_d__publicOnOAuthAppDeletedType as _publicOnOAuthAppDeletedType, type index_d__publicOnOAuthAppUpdatedType as _publicOnOAuthAppUpdatedType, index_d_createOAuthApp as createOAuthApp, index_d_getOAuthApp as getOAuthApp, index_d_onOAuthAppCreated as onOAuthAppCreated, index_d_onOAuthAppDeleted as onOAuthAppDeleted, index_d_onOAuthAppUpdated as onOAuthAppUpdated, onOAuthAppCreated$1 as publicOnOAuthAppCreated, onOAuthAppDeleted$1 as publicOnOAuthAppDeleted, onOAuthAppUpdated$1 as publicOnOAuthAppUpdated, index_d_queryOAuthApps as queryOAuthApps, index_d_updateOAuthApp as updateOAuthApp };
906
967
  }
907
968
 
908
969
  export { index_d as oAuthApps };
@@ -187,41 +187,24 @@ interface Cursors$1 {
187
187
  /** Cursor pointing to the previous page in the list of results. */
188
188
  prev?: string | null;
189
189
  }
190
+ interface OAuthAppNonNullableFields$1 {
191
+ allowedDomains: string[];
192
+ allowedRedirectUris: string[];
193
+ allowedRedirectDomains: string[];
194
+ applicationType: OAuthAppType$1;
195
+ technology: OAuthTechnologies$1;
196
+ }
190
197
  interface CreateOAuthAppResponseNonNullableFields$1 {
191
- oAuthApp?: {
192
- allowedDomains: string[];
193
- allowedRedirectUris: string[];
194
- allowedRedirectDomains: string[];
195
- applicationType: OAuthAppType$1;
196
- technology: OAuthTechnologies$1;
197
- };
198
+ oAuthApp?: OAuthAppNonNullableFields$1;
198
199
  }
199
200
  interface GetOAuthAppResponseNonNullableFields$1 {
200
- oAuthApp?: {
201
- allowedDomains: string[];
202
- allowedRedirectUris: string[];
203
- allowedRedirectDomains: string[];
204
- applicationType: OAuthAppType$1;
205
- technology: OAuthTechnologies$1;
206
- };
201
+ oAuthApp?: OAuthAppNonNullableFields$1;
207
202
  }
208
203
  interface UpdateOAuthAppResponseNonNullableFields$1 {
209
- oAuthApp?: {
210
- allowedDomains: string[];
211
- allowedRedirectUris: string[];
212
- allowedRedirectDomains: string[];
213
- applicationType: OAuthAppType$1;
214
- technology: OAuthTechnologies$1;
215
- };
204
+ oAuthApp?: OAuthAppNonNullableFields$1;
216
205
  }
217
206
  interface QueryOAuthAppsResponseNonNullableFields$1 {
218
- oAuthApps: {
219
- allowedDomains: string[];
220
- allowedRedirectUris: string[];
221
- allowedRedirectDomains: string[];
222
- applicationType: OAuthAppType$1;
223
- technology: OAuthTechnologies$1;
224
- }[];
207
+ oAuthApps: OAuthAppNonNullableFields$1[];
225
208
  }
226
209
 
227
210
  /** An intermediary application that authorizes and authenticates an external client to access data on a Wix project or site. */
@@ -413,37 +396,24 @@ interface Cursors {
413
396
  /** Cursor pointing to the previous page in the list of results. */
414
397
  prev?: string | null;
415
398
  }
399
+ interface OAuthAppNonNullableFields {
400
+ allowedDomains: string[];
401
+ allowedRedirectUris: string[];
402
+ allowedRedirectDomains: string[];
403
+ applicationType: OAuthAppType;
404
+ technology: OAuthTechnologies;
405
+ }
416
406
  interface CreateOAuthAppResponseNonNullableFields {
417
- oAuthApp?: {
418
- allowedRedirectUris: string[];
419
- allowedRedirectDomains: string[];
420
- applicationType: OAuthAppType;
421
- technology: OAuthTechnologies;
422
- };
407
+ oAuthApp?: OAuthAppNonNullableFields;
423
408
  }
424
409
  interface GetOAuthAppResponseNonNullableFields {
425
- oAuthApp?: {
426
- allowedRedirectUris: string[];
427
- allowedRedirectDomains: string[];
428
- applicationType: OAuthAppType;
429
- technology: OAuthTechnologies;
430
- };
410
+ oAuthApp?: OAuthAppNonNullableFields;
431
411
  }
432
412
  interface UpdateOAuthAppResponseNonNullableFields {
433
- oAuthApp?: {
434
- allowedRedirectUris: string[];
435
- allowedRedirectDomains: string[];
436
- applicationType: OAuthAppType;
437
- technology: OAuthTechnologies;
438
- };
413
+ oAuthApp?: OAuthAppNonNullableFields;
439
414
  }
440
415
  interface QueryOAuthAppsResponseNonNullableFields {
441
- oAuthApps: {
442
- allowedRedirectUris: string[];
443
- allowedRedirectDomains: string[];
444
- applicationType: OAuthAppType;
445
- technology: OAuthTechnologies;
446
- }[];
416
+ oAuthApps: OAuthAppNonNullableFields[];
447
417
  }
448
418
 
449
419
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {