@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 +6 -5
- package/type-bundles/context.bundle.d.ts +58 -142
- package/type-bundles/index.bundle.d.ts +32 -110
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/members",
|
|
3
|
-
"version": "1.0.
|
|
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.
|
|
22
|
-
"@wix/members_badges": "1.0.
|
|
23
|
-
"@wix/members_members": "1.0.
|
|
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": "
|
|
48
|
+
"falconPackageHash": "32ab5c6b3b9f3402dda819f52c171739515bfb717cc92b495def402a"
|
|
48
49
|
}
|
|
@@ -304,88 +304,80 @@ interface ListMembersByBadgeOptions {
|
|
|
304
304
|
paging?: Paging$1;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
type RESTFunctionDescriptor
|
|
308
|
-
interface HttpClient
|
|
309
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
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
|
|
313
|
-
type HttpResponse
|
|
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
|
|
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
|
|
326
|
-
type APIMetadata
|
|
324
|
+
} & APIMetadata;
|
|
325
|
+
type APIMetadata = {
|
|
327
326
|
methodFqn?: string;
|
|
328
327
|
entityFqdn?: string;
|
|
329
328
|
packageName?: string;
|
|
330
329
|
};
|
|
331
|
-
type BuildRESTFunction
|
|
332
|
-
type EventDefinition
|
|
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?:
|
|
335
|
+
transformations?: unknown;
|
|
337
336
|
__payload: Payload;
|
|
338
337
|
};
|
|
339
|
-
declare function EventDefinition
|
|
340
|
-
type EventHandler
|
|
341
|
-
type BuildEventDefinition
|
|
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
|
|
342
|
+
declare function createBadge$1(httpClient: HttpClient): (badge: Badge) => Promise<Badge & {
|
|
351
343
|
_id: string;
|
|
352
344
|
}>;
|
|
353
|
-
declare function updateBadge$1(httpClient: HttpClient
|
|
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
|
|
357
|
-
declare function getBadge$1(httpClient: HttpClient
|
|
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
|
|
361
|
-
declare function assignBadge$1(httpClient: HttpClient
|
|
362
|
-
declare function unassignBadge$1(httpClient: HttpClient
|
|
363
|
-
declare function listMembersByBadge$1(httpClient: HttpClient
|
|
364
|
-
declare function listBadgesPerMember$1(httpClient: HttpClient
|
|
365
|
-
declare function getMemberCountsPerBadge$1(httpClient: HttpClient
|
|
366
|
-
declare function updateBadgesDisplayOrder$1(httpClient: HttpClient
|
|
367
|
-
declare const onBadgeCreated$1: EventDefinition
|
|
368
|
-
declare const onBadgeUpdated$1: EventDefinition
|
|
369
|
-
declare const onBadgeDeleted$1: EventDefinition
|
|
370
|
-
declare const onBadgeAssigned$1: EventDefinition
|
|
371
|
-
declare const onBadgeUnassigned$1: EventDefinition
|
|
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
|
|
374
|
-
declare const updateBadge: BuildRESTFunction
|
|
375
|
-
declare const listBadges: BuildRESTFunction
|
|
376
|
-
declare const getBadge: BuildRESTFunction
|
|
377
|
-
declare const deleteBadge: BuildRESTFunction
|
|
378
|
-
declare const assignBadge: BuildRESTFunction
|
|
379
|
-
declare const unassignBadge: BuildRESTFunction
|
|
380
|
-
declare const listMembersByBadge: BuildRESTFunction
|
|
381
|
-
declare const listBadgesPerMember: BuildRESTFunction
|
|
382
|
-
declare const getMemberCountsPerBadge: BuildRESTFunction
|
|
383
|
-
declare const updateBadgesDisplayOrder: BuildRESTFunction
|
|
384
|
-
declare const onBadgeCreated: BuildEventDefinition
|
|
385
|
-
declare const onBadgeUpdated: BuildEventDefinition
|
|
386
|
-
declare const onBadgeDeleted: BuildEventDefinition
|
|
387
|
-
declare const onBadgeAssigned: BuildEventDefinition
|
|
388
|
-
declare const onBadgeUnassigned: BuildEventDefinition
|
|
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
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
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
|
|
878
|
-
declare const approve: BuildRESTFunction
|
|
879
|
-
declare const block: BuildRESTFunction
|
|
880
|
-
declare const register: BuildRESTFunction
|
|
881
|
-
declare const login: BuildRESTFunction
|
|
882
|
-
declare const sendSetPasswordEmail: BuildRESTFunction
|
|
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
|
|
564
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
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
|
|
568
|
-
type HttpResponse
|
|
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
|
|
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
|
|
581
|
-
type APIMetadata
|
|
579
|
+
} & APIMetadata;
|
|
580
|
+
type APIMetadata = {
|
|
582
581
|
methodFqn?: string;
|
|
583
582
|
entityFqdn?: string;
|
|
584
583
|
packageName?: string;
|
|
585
584
|
};
|
|
586
|
-
type EventDefinition
|
|
585
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
587
586
|
__type: 'event-definition';
|
|
588
587
|
type: Type;
|
|
589
588
|
isDomainEvent?: boolean;
|
|
590
|
-
transformations?:
|
|
589
|
+
transformations?: unknown;
|
|
591
590
|
__payload: Payload;
|
|
592
591
|
};
|
|
593
|
-
declare function EventDefinition
|
|
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
|
|
597
|
+
declare function createBadge(httpClient: HttpClient): (badge: Badge) => Promise<Badge & {
|
|
606
598
|
_id: string;
|
|
607
599
|
}>;
|
|
608
|
-
declare function updateBadge(httpClient: HttpClient
|
|
600
|
+
declare function updateBadge(httpClient: HttpClient): (_id: string, badge: UpdateBadge) => Promise<Badge & {
|
|
609
601
|
_id: string;
|
|
610
602
|
}>;
|
|
611
|
-
declare function listBadges(httpClient: HttpClient
|
|
612
|
-
declare function getBadge(httpClient: HttpClient
|
|
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
|
|
616
|
-
declare function assignBadge(httpClient: HttpClient
|
|
617
|
-
declare function unassignBadge(httpClient: HttpClient
|
|
618
|
-
declare function listMembersByBadge(httpClient: HttpClient
|
|
619
|
-
declare function listBadgesPerMember(httpClient: HttpClient
|
|
620
|
-
declare function getMemberCountsPerBadge(httpClient: HttpClient
|
|
621
|
-
declare function updateBadgesDisplayOrder(httpClient: HttpClient
|
|
622
|
-
declare const onBadgeCreated: EventDefinition
|
|
623
|
-
declare const onBadgeUpdated: EventDefinition
|
|
624
|
-
declare const onBadgeDeleted: EventDefinition
|
|
625
|
-
declare const onBadgeAssigned: EventDefinition
|
|
626
|
-
declare const onBadgeUnassigned: EventDefinition
|
|
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
|
|
1537
|
-
declare function approve(httpClient: HttpClient
|
|
1538
|
-
declare function block(httpClient: HttpClient
|
|
1539
|
-
declare function register(httpClient: HttpClient
|
|
1540
|
-
declare function login(httpClient: HttpClient
|
|
1541
|
-
declare function sendSetPasswordEmail(httpClient: HttpClient
|
|
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
|
};
|