@wix/members 1.0.88 → 1.0.89

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/members",
3
- "version": "1.0.88",
3
+ "version": "1.0.89",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,11 +18,12 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/members_authentication": "1.0.17",
22
- "@wix/members_badges": "1.0.25",
23
- "@wix/members_members": "1.0.31"
21
+ "@wix/members_authentication": "1.0.18",
22
+ "@wix/members_badges": "1.0.26",
23
+ "@wix/members_members": "1.0.32"
24
24
  },
25
25
  "devDependencies": {
26
+ "@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
26
27
  "glob": "^10.4.1",
27
28
  "rollup": "^4.18.0",
28
29
  "rollup-plugin-dts": "^6.1.1",
@@ -44,5 +45,5 @@
44
45
  "fqdn": ""
45
46
  }
46
47
  },
47
- "falconPackageHash": "829837d34a9c7989cd18b8905a5cb1e3576d598de1586c89b00d305d"
48
+ "falconPackageHash": "32ab5c6b3b9f3402dda819f52c171739515bfb717cc92b495def402a"
48
49
  }
@@ -304,88 +304,80 @@ interface ListMembersByBadgeOptions {
304
304
  paging?: Paging$1;
305
305
  }
306
306
 
307
- type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
308
- interface HttpClient$2 {
309
- request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
310
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
307
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
308
+ interface HttpClient {
309
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
311
310
  }
312
- type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
313
- type HttpResponse$2<T = any> = {
311
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
312
+ type HttpResponse<T = any> = {
314
313
  data: T;
315
314
  status: number;
316
315
  statusText: string;
317
316
  headers: any;
318
317
  request?: any;
319
318
  };
320
- type RequestOptions$2<_TResponse = any, Data = any> = {
319
+ type RequestOptions<_TResponse = any, Data = any> = {
321
320
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
322
321
  url: string;
323
322
  data?: Data;
324
323
  params?: URLSearchParams;
325
- } & APIMetadata$2;
326
- type APIMetadata$2 = {
324
+ } & APIMetadata;
325
+ type APIMetadata = {
327
326
  methodFqn?: string;
328
327
  entityFqdn?: string;
329
328
  packageName?: string;
330
329
  };
331
- type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
332
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
330
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
331
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
333
332
  __type: 'event-definition';
334
333
  type: Type;
335
334
  isDomainEvent?: boolean;
336
- transformations?: (envelope: unknown) => Payload;
335
+ transformations?: unknown;
337
336
  __payload: Payload;
338
337
  };
339
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
340
- type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
341
- type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
342
-
343
- declare global {
344
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
345
- interface SymbolConstructor {
346
- readonly observable: symbol;
347
- }
348
- }
338
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
339
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
340
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
349
341
 
350
- declare function createBadge$1(httpClient: HttpClient$2): (badge: Badge) => Promise<Badge & {
342
+ declare function createBadge$1(httpClient: HttpClient): (badge: Badge) => Promise<Badge & {
351
343
  _id: string;
352
344
  }>;
353
- declare function updateBadge$1(httpClient: HttpClient$2): (_id: string, badge: UpdateBadge) => Promise<Badge & {
345
+ declare function updateBadge$1(httpClient: HttpClient): (_id: string, badge: UpdateBadge) => Promise<Badge & {
354
346
  _id: string;
355
347
  }>;
356
- declare function listBadges$1(httpClient: HttpClient$2): (options?: ListBadgesOptions) => Promise<ListBadgesResponse & ListBadgesResponseNonNullableFields>;
357
- declare function getBadge$1(httpClient: HttpClient$2): (_id: string) => Promise<Badge & {
348
+ declare function listBadges$1(httpClient: HttpClient): (options?: ListBadgesOptions) => Promise<ListBadgesResponse & ListBadgesResponseNonNullableFields>;
349
+ declare function getBadge$1(httpClient: HttpClient): (_id: string) => Promise<Badge & {
358
350
  _id: string;
359
351
  }>;
360
- declare function deleteBadge$1(httpClient: HttpClient$2): (_id: string) => Promise<void>;
361
- declare function assignBadge$1(httpClient: HttpClient$2): (_id: string, memberIds: string[]) => Promise<AssignBadgeResponse & AssignBadgeResponseNonNullableFields>;
362
- declare function unassignBadge$1(httpClient: HttpClient$2): (_id: string, memberIds: string[]) => Promise<void>;
363
- declare function listMembersByBadge$1(httpClient: HttpClient$2): (_id: string, options?: ListMembersByBadgeOptions) => Promise<ListMembersResponse$1 & ListMembersResponseNonNullableFields$1>;
364
- declare function listBadgesPerMember$1(httpClient: HttpClient$2): (memberIds: string[]) => Promise<ListMembersBadgeIdsResponse & ListMembersBadgeIdsResponseNonNullableFields>;
365
- declare function getMemberCountsPerBadge$1(httpClient: HttpClient$2): () => Promise<GetMemberCountsPerBadgeResponse & GetMemberCountsPerBadgeResponseNonNullableFields>;
366
- declare function updateBadgesDisplayOrder$1(httpClient: HttpClient$2): (badgeIds: string[]) => Promise<UpdateBadgesDisplayOrderResponse & UpdateBadgesDisplayOrderResponseNonNullableFields>;
367
- declare const onBadgeCreated$1: EventDefinition$1<BadgeCreatedEnvelope, "wix.badges.v3.badge_created">;
368
- declare const onBadgeUpdated$1: EventDefinition$1<BadgeUpdatedEnvelope, "wix.badges.v3.badge_updated">;
369
- declare const onBadgeDeleted$1: EventDefinition$1<BadgeDeletedEnvelope, "wix.badges.v3.badge_deleted">;
370
- declare const onBadgeAssigned$1: EventDefinition$1<BadgeAssignedEnvelope, "wix.badges.v3.badge_badge_assigned">;
371
- declare const onBadgeUnassigned$1: EventDefinition$1<BadgeUnassignedEnvelope, "wix.badges.v3.badge_badge_unassigned">;
352
+ declare function deleteBadge$1(httpClient: HttpClient): (_id: string) => Promise<void>;
353
+ declare function assignBadge$1(httpClient: HttpClient): (_id: string, memberIds: string[]) => Promise<AssignBadgeResponse & AssignBadgeResponseNonNullableFields>;
354
+ declare function unassignBadge$1(httpClient: HttpClient): (_id: string, memberIds: string[]) => Promise<void>;
355
+ declare function listMembersByBadge$1(httpClient: HttpClient): (_id: string, options?: ListMembersByBadgeOptions) => Promise<ListMembersResponse$1 & ListMembersResponseNonNullableFields$1>;
356
+ declare function listBadgesPerMember$1(httpClient: HttpClient): (memberIds: string[]) => Promise<ListMembersBadgeIdsResponse & ListMembersBadgeIdsResponseNonNullableFields>;
357
+ declare function getMemberCountsPerBadge$1(httpClient: HttpClient): () => Promise<GetMemberCountsPerBadgeResponse & GetMemberCountsPerBadgeResponseNonNullableFields>;
358
+ declare function updateBadgesDisplayOrder$1(httpClient: HttpClient): (badgeIds: string[]) => Promise<UpdateBadgesDisplayOrderResponse & UpdateBadgesDisplayOrderResponseNonNullableFields>;
359
+ declare const onBadgeCreated$1: EventDefinition<BadgeCreatedEnvelope, "wix.badges.v3.badge_created">;
360
+ declare const onBadgeUpdated$1: EventDefinition<BadgeUpdatedEnvelope, "wix.badges.v3.badge_updated">;
361
+ declare const onBadgeDeleted$1: EventDefinition<BadgeDeletedEnvelope, "wix.badges.v3.badge_deleted">;
362
+ declare const onBadgeAssigned$1: EventDefinition<BadgeAssignedEnvelope, "wix.badges.v3.badge_badge_assigned">;
363
+ declare const onBadgeUnassigned$1: EventDefinition<BadgeUnassignedEnvelope, "wix.badges.v3.badge_badge_unassigned">;
372
364
 
373
- declare const createBadge: BuildRESTFunction$2<typeof createBadge$1>;
374
- declare const updateBadge: BuildRESTFunction$2<typeof updateBadge$1>;
375
- declare const listBadges: BuildRESTFunction$2<typeof listBadges$1>;
376
- declare const getBadge: BuildRESTFunction$2<typeof getBadge$1>;
377
- declare const deleteBadge: BuildRESTFunction$2<typeof deleteBadge$1>;
378
- declare const assignBadge: BuildRESTFunction$2<typeof assignBadge$1>;
379
- declare const unassignBadge: BuildRESTFunction$2<typeof unassignBadge$1>;
380
- declare const listMembersByBadge: BuildRESTFunction$2<typeof listMembersByBadge$1>;
381
- declare const listBadgesPerMember: BuildRESTFunction$2<typeof listBadgesPerMember$1>;
382
- declare const getMemberCountsPerBadge: BuildRESTFunction$2<typeof getMemberCountsPerBadge$1>;
383
- declare const updateBadgesDisplayOrder: BuildRESTFunction$2<typeof updateBadgesDisplayOrder$1>;
384
- declare const onBadgeCreated: BuildEventDefinition$1<typeof onBadgeCreated$1>;
385
- declare const onBadgeUpdated: BuildEventDefinition$1<typeof onBadgeUpdated$1>;
386
- declare const onBadgeDeleted: BuildEventDefinition$1<typeof onBadgeDeleted$1>;
387
- declare const onBadgeAssigned: BuildEventDefinition$1<typeof onBadgeAssigned$1>;
388
- declare const onBadgeUnassigned: BuildEventDefinition$1<typeof onBadgeUnassigned$1>;
365
+ declare const createBadge: BuildRESTFunction<typeof createBadge$1>;
366
+ declare const updateBadge: BuildRESTFunction<typeof updateBadge$1>;
367
+ declare const listBadges: BuildRESTFunction<typeof listBadges$1>;
368
+ declare const getBadge: BuildRESTFunction<typeof getBadge$1>;
369
+ declare const deleteBadge: BuildRESTFunction<typeof deleteBadge$1>;
370
+ declare const assignBadge: BuildRESTFunction<typeof assignBadge$1>;
371
+ declare const unassignBadge: BuildRESTFunction<typeof unassignBadge$1>;
372
+ declare const listMembersByBadge: BuildRESTFunction<typeof listMembersByBadge$1>;
373
+ declare const listBadgesPerMember: BuildRESTFunction<typeof listBadgesPerMember$1>;
374
+ declare const getMemberCountsPerBadge: BuildRESTFunction<typeof getMemberCountsPerBadge$1>;
375
+ declare const updateBadgesDisplayOrder: BuildRESTFunction<typeof updateBadgesDisplayOrder$1>;
376
+ declare const onBadgeCreated: BuildEventDefinition<typeof onBadgeCreated$1>;
377
+ declare const onBadgeUpdated: BuildEventDefinition<typeof onBadgeUpdated$1>;
378
+ declare const onBadgeDeleted: BuildEventDefinition<typeof onBadgeDeleted$1>;
379
+ declare const onBadgeAssigned: BuildEventDefinition<typeof onBadgeAssigned$1>;
380
+ declare const onBadgeUnassigned: BuildEventDefinition<typeof onBadgeUnassigned$1>;
389
381
 
390
382
  declare const context$2_assignBadge: typeof assignBadge;
391
383
  declare const context$2_createBadge: typeof createBadge;
@@ -834,52 +826,19 @@ interface SendSetPasswordEmailOptions {
834
826
  hideIgnoreMessage?: boolean;
835
827
  }
836
828
 
837
- type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
838
- interface HttpClient$1 {
839
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
840
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
841
- }
842
- type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
843
- type HttpResponse$1<T = any> = {
844
- data: T;
845
- status: number;
846
- statusText: string;
847
- headers: any;
848
- request?: any;
849
- };
850
- type RequestOptions$1<_TResponse = any, Data = any> = {
851
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
852
- url: string;
853
- data?: Data;
854
- params?: URLSearchParams;
855
- } & APIMetadata$1;
856
- type APIMetadata$1 = {
857
- methodFqn?: string;
858
- entityFqdn?: string;
859
- packageName?: string;
860
- };
861
- type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
862
-
863
- declare global {
864
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
865
- interface SymbolConstructor {
866
- readonly observable: symbol;
867
- }
868
- }
869
-
870
- declare function changeLoginEmail$1(httpClient: HttpClient$1): (_id: string, newEmail: string, options?: ChangeLoginEmailOptions) => Promise<ChangeLoginEmailResponse & ChangeLoginEmailResponseNonNullableFields>;
871
- declare function approve$1(httpClient: HttpClient$1): (options?: ApproveOptions) => Promise<ApproveMemberResponse>;
872
- declare function block$1(httpClient: HttpClient$1): (options?: BlockOptions) => Promise<void>;
873
- declare function register$1(httpClient: HttpClient$1): (email: string, password: string, options?: RegisterOptions) => Promise<RegisterResponse & RegisterResponseNonNullableFields>;
874
- declare function login$1(httpClient: HttpClient$1): (email: string, password: string, options?: LoginOptions) => Promise<LoginResponse & LoginResponseNonNullableFields>;
875
- declare function sendSetPasswordEmail$1(httpClient: HttpClient$1): (email: string, options?: SendSetPasswordEmailOptions) => Promise<SendSetPasswordEmailResponse & SendSetPasswordEmailResponseNonNullableFields>;
829
+ declare function changeLoginEmail$1(httpClient: HttpClient): (_id: string, newEmail: string, options?: ChangeLoginEmailOptions) => Promise<ChangeLoginEmailResponse & ChangeLoginEmailResponseNonNullableFields>;
830
+ declare function approve$1(httpClient: HttpClient): (options?: ApproveOptions) => Promise<ApproveMemberResponse>;
831
+ declare function block$1(httpClient: HttpClient): (options?: BlockOptions) => Promise<void>;
832
+ declare function register$1(httpClient: HttpClient): (email: string, password: string, options?: RegisterOptions) => Promise<RegisterResponse & RegisterResponseNonNullableFields>;
833
+ declare function login$1(httpClient: HttpClient): (email: string, password: string, options?: LoginOptions) => Promise<LoginResponse & LoginResponseNonNullableFields>;
834
+ declare function sendSetPasswordEmail$1(httpClient: HttpClient): (email: string, options?: SendSetPasswordEmailOptions) => Promise<SendSetPasswordEmailResponse & SendSetPasswordEmailResponseNonNullableFields>;
876
835
 
877
- declare const changeLoginEmail: BuildRESTFunction$1<typeof changeLoginEmail$1>;
878
- declare const approve: BuildRESTFunction$1<typeof approve$1>;
879
- declare const block: BuildRESTFunction$1<typeof block$1>;
880
- declare const register: BuildRESTFunction$1<typeof register$1>;
881
- declare const login: BuildRESTFunction$1<typeof login$1>;
882
- declare const sendSetPasswordEmail: BuildRESTFunction$1<typeof sendSetPasswordEmail$1>;
836
+ declare const changeLoginEmail: BuildRESTFunction<typeof changeLoginEmail$1>;
837
+ declare const approve: BuildRESTFunction<typeof approve$1>;
838
+ declare const block: BuildRESTFunction<typeof block$1>;
839
+ declare const register: BuildRESTFunction<typeof register$1>;
840
+ declare const login: BuildRESTFunction<typeof login$1>;
841
+ declare const sendSetPasswordEmail: BuildRESTFunction<typeof sendSetPasswordEmail$1>;
883
842
 
884
843
  declare const context$1_approve: typeof approve;
885
844
  declare const context$1_block: typeof block;
@@ -1717,49 +1676,6 @@ interface UpdateMember {
1717
1676
  lastLoginDate?: Date;
1718
1677
  }
1719
1678
 
1720
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
1721
- interface HttpClient {
1722
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1723
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1724
- }
1725
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
1726
- type HttpResponse<T = any> = {
1727
- data: T;
1728
- status: number;
1729
- statusText: string;
1730
- headers: any;
1731
- request?: any;
1732
- };
1733
- type RequestOptions<_TResponse = any, Data = any> = {
1734
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1735
- url: string;
1736
- data?: Data;
1737
- params?: URLSearchParams;
1738
- } & APIMetadata;
1739
- type APIMetadata = {
1740
- methodFqn?: string;
1741
- entityFqdn?: string;
1742
- packageName?: string;
1743
- };
1744
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
1745
- type EventDefinition<Payload = unknown, Type extends string = string> = {
1746
- __type: 'event-definition';
1747
- type: Type;
1748
- isDomainEvent?: boolean;
1749
- transformations?: (envelope: unknown) => Payload;
1750
- __payload: Payload;
1751
- };
1752
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
1753
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
1754
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
1755
-
1756
- declare global {
1757
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1758
- interface SymbolConstructor {
1759
- readonly observable: symbol;
1760
- }
1761
- }
1762
-
1763
1679
  declare function updateCurrentMemberSlug$1(httpClient: HttpClient): (slug: string) => Promise<UpdateMySlugResponse & UpdateMySlugResponseNonNullableFields>;
1764
1680
  declare function joinCommunity$1(httpClient: HttpClient): () => Promise<JoinCommunityResponse & JoinCommunityResponseNonNullableFields>;
1765
1681
  declare function leaveCommunity$1(httpClient: HttpClient): () => Promise<LeaveCommunityResponse & LeaveCommunityResponseNonNullableFields>;
@@ -560,70 +560,62 @@ interface ListMembersByBadgeOptions {
560
560
  paging?: Paging$2;
561
561
  }
562
562
 
563
- interface HttpClient$2 {
564
- request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
565
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
563
+ interface HttpClient {
564
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
566
565
  }
567
- type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
568
- type HttpResponse$2<T = any> = {
566
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
567
+ type HttpResponse<T = any> = {
569
568
  data: T;
570
569
  status: number;
571
570
  statusText: string;
572
571
  headers: any;
573
572
  request?: any;
574
573
  };
575
- type RequestOptions$2<_TResponse = any, Data = any> = {
574
+ type RequestOptions<_TResponse = any, Data = any> = {
576
575
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
577
576
  url: string;
578
577
  data?: Data;
579
578
  params?: URLSearchParams;
580
- } & APIMetadata$2;
581
- type APIMetadata$2 = {
579
+ } & APIMetadata;
580
+ type APIMetadata = {
582
581
  methodFqn?: string;
583
582
  entityFqdn?: string;
584
583
  packageName?: string;
585
584
  };
586
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
585
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
587
586
  __type: 'event-definition';
588
587
  type: Type;
589
588
  isDomainEvent?: boolean;
590
- transformations?: (envelope: unknown) => Payload;
589
+ transformations?: unknown;
591
590
  __payload: Payload;
592
591
  };
593
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
594
-
595
- declare global {
596
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
597
- interface SymbolConstructor {
598
- readonly observable: symbol;
599
- }
600
- }
592
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
601
593
 
602
594
  declare const __metadata$2: {
603
595
  PACKAGE_NAME: string;
604
596
  };
605
- declare function createBadge(httpClient: HttpClient$2): (badge: Badge) => Promise<Badge & {
597
+ declare function createBadge(httpClient: HttpClient): (badge: Badge) => Promise<Badge & {
606
598
  _id: string;
607
599
  }>;
608
- declare function updateBadge(httpClient: HttpClient$2): (_id: string, badge: UpdateBadge) => Promise<Badge & {
600
+ declare function updateBadge(httpClient: HttpClient): (_id: string, badge: UpdateBadge) => Promise<Badge & {
609
601
  _id: string;
610
602
  }>;
611
- declare function listBadges(httpClient: HttpClient$2): (options?: ListBadgesOptions) => Promise<ListBadgesResponse & ListBadgesResponseNonNullableFields>;
612
- declare function getBadge(httpClient: HttpClient$2): (_id: string) => Promise<Badge & {
603
+ declare function listBadges(httpClient: HttpClient): (options?: ListBadgesOptions) => Promise<ListBadgesResponse & ListBadgesResponseNonNullableFields>;
604
+ declare function getBadge(httpClient: HttpClient): (_id: string) => Promise<Badge & {
613
605
  _id: string;
614
606
  }>;
615
- declare function deleteBadge(httpClient: HttpClient$2): (_id: string) => Promise<void>;
616
- declare function assignBadge(httpClient: HttpClient$2): (_id: string, memberIds: string[]) => Promise<AssignBadgeResponse & AssignBadgeResponseNonNullableFields>;
617
- declare function unassignBadge(httpClient: HttpClient$2): (_id: string, memberIds: string[]) => Promise<void>;
618
- declare function listMembersByBadge(httpClient: HttpClient$2): (_id: string, options?: ListMembersByBadgeOptions) => Promise<ListMembersResponse$2 & ListMembersResponseNonNullableFields$1>;
619
- declare function listBadgesPerMember(httpClient: HttpClient$2): (memberIds: string[]) => Promise<ListMembersBadgeIdsResponse & ListMembersBadgeIdsResponseNonNullableFields>;
620
- declare function getMemberCountsPerBadge(httpClient: HttpClient$2): () => Promise<GetMemberCountsPerBadgeResponse & GetMemberCountsPerBadgeResponseNonNullableFields>;
621
- declare function updateBadgesDisplayOrder(httpClient: HttpClient$2): (badgeIds: string[]) => Promise<UpdateBadgesDisplayOrderResponse & UpdateBadgesDisplayOrderResponseNonNullableFields>;
622
- declare const onBadgeCreated: EventDefinition$1<BadgeCreatedEnvelope, "wix.badges.v3.badge_created">;
623
- declare const onBadgeUpdated: EventDefinition$1<BadgeUpdatedEnvelope, "wix.badges.v3.badge_updated">;
624
- declare const onBadgeDeleted: EventDefinition$1<BadgeDeletedEnvelope, "wix.badges.v3.badge_deleted">;
625
- declare const onBadgeAssigned: EventDefinition$1<BadgeAssignedEnvelope, "wix.badges.v3.badge_badge_assigned">;
626
- declare const onBadgeUnassigned: EventDefinition$1<BadgeUnassignedEnvelope, "wix.badges.v3.badge_badge_unassigned">;
607
+ declare function deleteBadge(httpClient: HttpClient): (_id: string) => Promise<void>;
608
+ declare function assignBadge(httpClient: HttpClient): (_id: string, memberIds: string[]) => Promise<AssignBadgeResponse & AssignBadgeResponseNonNullableFields>;
609
+ declare function unassignBadge(httpClient: HttpClient): (_id: string, memberIds: string[]) => Promise<void>;
610
+ declare function listMembersByBadge(httpClient: HttpClient): (_id: string, options?: ListMembersByBadgeOptions) => Promise<ListMembersResponse$2 & ListMembersResponseNonNullableFields$1>;
611
+ declare function listBadgesPerMember(httpClient: HttpClient): (memberIds: string[]) => Promise<ListMembersBadgeIdsResponse & ListMembersBadgeIdsResponseNonNullableFields>;
612
+ declare function getMemberCountsPerBadge(httpClient: HttpClient): () => Promise<GetMemberCountsPerBadgeResponse & GetMemberCountsPerBadgeResponseNonNullableFields>;
613
+ declare function updateBadgesDisplayOrder(httpClient: HttpClient): (badgeIds: string[]) => Promise<UpdateBadgesDisplayOrderResponse & UpdateBadgesDisplayOrderResponseNonNullableFields>;
614
+ declare const onBadgeCreated: EventDefinition<BadgeCreatedEnvelope, "wix.badges.v3.badge_created">;
615
+ declare const onBadgeUpdated: EventDefinition<BadgeUpdatedEnvelope, "wix.badges.v3.badge_updated">;
616
+ declare const onBadgeDeleted: EventDefinition<BadgeDeletedEnvelope, "wix.badges.v3.badge_deleted">;
617
+ declare const onBadgeAssigned: EventDefinition<BadgeAssignedEnvelope, "wix.badges.v3.badge_badge_assigned">;
618
+ declare const onBadgeUnassigned: EventDefinition<BadgeUnassignedEnvelope, "wix.badges.v3.badge_badge_unassigned">;
627
619
 
628
620
  type index_d$2_AssignBadgeRequest = AssignBadgeRequest;
629
621
  type index_d$2_AssignBadgeResponse = AssignBadgeResponse;
@@ -1499,46 +1491,15 @@ interface SendSetPasswordEmailOptions {
1499
1491
  hideIgnoreMessage?: boolean;
1500
1492
  }
1501
1493
 
1502
- interface HttpClient$1 {
1503
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
1504
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1505
- }
1506
- type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
1507
- type HttpResponse$1<T = any> = {
1508
- data: T;
1509
- status: number;
1510
- statusText: string;
1511
- headers: any;
1512
- request?: any;
1513
- };
1514
- type RequestOptions$1<_TResponse = any, Data = any> = {
1515
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1516
- url: string;
1517
- data?: Data;
1518
- params?: URLSearchParams;
1519
- } & APIMetadata$1;
1520
- type APIMetadata$1 = {
1521
- methodFqn?: string;
1522
- entityFqdn?: string;
1523
- packageName?: string;
1524
- };
1525
-
1526
- declare global {
1527
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1528
- interface SymbolConstructor {
1529
- readonly observable: symbol;
1530
- }
1531
- }
1532
-
1533
1494
  declare const __metadata$1: {
1534
1495
  PACKAGE_NAME: string;
1535
1496
  };
1536
- declare function changeLoginEmail(httpClient: HttpClient$1): (_id: string, newEmail: string, options?: ChangeLoginEmailOptions) => Promise<ChangeLoginEmailResponse & ChangeLoginEmailResponseNonNullableFields>;
1537
- declare function approve(httpClient: HttpClient$1): (options?: ApproveOptions) => Promise<ApproveMemberResponse$1>;
1538
- declare function block(httpClient: HttpClient$1): (options?: BlockOptions) => Promise<void>;
1539
- declare function register(httpClient: HttpClient$1): (email: string, password: string, options?: RegisterOptions) => Promise<RegisterResponse & RegisterResponseNonNullableFields>;
1540
- declare function login(httpClient: HttpClient$1): (email: string, password: string, options?: LoginOptions) => Promise<LoginResponse & LoginResponseNonNullableFields>;
1541
- declare function sendSetPasswordEmail(httpClient: HttpClient$1): (email: string, options?: SendSetPasswordEmailOptions) => Promise<SendSetPasswordEmailResponse & SendSetPasswordEmailResponseNonNullableFields>;
1497
+ declare function changeLoginEmail(httpClient: HttpClient): (_id: string, newEmail: string, options?: ChangeLoginEmailOptions) => Promise<ChangeLoginEmailResponse & ChangeLoginEmailResponseNonNullableFields>;
1498
+ declare function approve(httpClient: HttpClient): (options?: ApproveOptions) => Promise<ApproveMemberResponse$1>;
1499
+ declare function block(httpClient: HttpClient): (options?: BlockOptions) => Promise<void>;
1500
+ declare function register(httpClient: HttpClient): (email: string, password: string, options?: RegisterOptions) => Promise<RegisterResponse & RegisterResponseNonNullableFields>;
1501
+ declare function login(httpClient: HttpClient): (email: string, password: string, options?: LoginOptions) => Promise<LoginResponse & LoginResponseNonNullableFields>;
1502
+ declare function sendSetPasswordEmail(httpClient: HttpClient): (email: string, options?: SendSetPasswordEmailOptions) => Promise<SendSetPasswordEmailResponse & SendSetPasswordEmailResponseNonNullableFields>;
1542
1503
 
1543
1504
  type index_d$1_AppleLogin = AppleLogin;
1544
1505
  type index_d$1_ApproveMemberRequestMemberIdentifierOneOf = ApproveMemberRequestMemberIdentifierOneOf;
@@ -3316,45 +3277,6 @@ interface UpdateMember {
3316
3277
  lastLoginDate?: Date;
3317
3278
  }
3318
3279
 
3319
- interface HttpClient {
3320
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
3321
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
3322
- }
3323
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
3324
- type HttpResponse<T = any> = {
3325
- data: T;
3326
- status: number;
3327
- statusText: string;
3328
- headers: any;
3329
- request?: any;
3330
- };
3331
- type RequestOptions<_TResponse = any, Data = any> = {
3332
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
3333
- url: string;
3334
- data?: Data;
3335
- params?: URLSearchParams;
3336
- } & APIMetadata;
3337
- type APIMetadata = {
3338
- methodFqn?: string;
3339
- entityFqdn?: string;
3340
- packageName?: string;
3341
- };
3342
- type EventDefinition<Payload = unknown, Type extends string = string> = {
3343
- __type: 'event-definition';
3344
- type: Type;
3345
- isDomainEvent?: boolean;
3346
- transformations?: (envelope: unknown) => Payload;
3347
- __payload: Payload;
3348
- };
3349
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
3350
-
3351
- declare global {
3352
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3353
- interface SymbolConstructor {
3354
- readonly observable: symbol;
3355
- }
3356
- }
3357
-
3358
3280
  declare const __metadata: {
3359
3281
  PACKAGE_NAME: string;
3360
3282
  };