@wix/groups 1.0.85 → 1.0.87
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 +11 -12
- package/type-bundles/context.bundle.d.ts +456 -114
- package/type-bundles/index.bundle.d.ts +372 -60
|
@@ -538,42 +538,50 @@ interface GroupsQueryBuilder {
|
|
|
538
538
|
find: () => Promise<GroupsQueryResult>;
|
|
539
539
|
}
|
|
540
540
|
|
|
541
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
542
|
-
interface HttpClient {
|
|
543
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
541
|
+
type RESTFunctionDescriptor$8<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$8) => T;
|
|
542
|
+
interface HttpClient$8 {
|
|
543
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$8<TResponse, TData>): Promise<HttpResponse$8<TResponse>>;
|
|
544
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
544
545
|
}
|
|
545
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
546
|
-
type HttpResponse<T = any> = {
|
|
546
|
+
type RequestOptionsFactory$8<TResponse = any, TData = any> = (context: any) => RequestOptions$8<TResponse, TData>;
|
|
547
|
+
type HttpResponse$8<T = any> = {
|
|
547
548
|
data: T;
|
|
548
549
|
status: number;
|
|
549
550
|
statusText: string;
|
|
550
551
|
headers: any;
|
|
551
552
|
request?: any;
|
|
552
553
|
};
|
|
553
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
554
|
+
type RequestOptions$8<_TResponse = any, Data = any> = {
|
|
554
555
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
555
556
|
url: string;
|
|
556
557
|
data?: Data;
|
|
557
558
|
params?: URLSearchParams;
|
|
558
|
-
} & APIMetadata;
|
|
559
|
-
type APIMetadata = {
|
|
559
|
+
} & APIMetadata$8;
|
|
560
|
+
type APIMetadata$8 = {
|
|
560
561
|
methodFqn?: string;
|
|
561
562
|
entityFqdn?: string;
|
|
562
563
|
packageName?: string;
|
|
563
564
|
};
|
|
564
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
565
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
565
|
+
type BuildRESTFunction$8<T extends RESTFunctionDescriptor$8> = T extends RESTFunctionDescriptor$8<infer U> ? U : never;
|
|
566
|
+
type EventDefinition$7<Payload = unknown, Type extends string = string> = {
|
|
566
567
|
__type: 'event-definition';
|
|
567
568
|
type: Type;
|
|
568
569
|
isDomainEvent?: boolean;
|
|
569
|
-
transformations?: unknown;
|
|
570
|
+
transformations?: (envelope: unknown) => Payload;
|
|
570
571
|
__payload: Payload;
|
|
571
572
|
};
|
|
572
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean,
|
|
573
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
574
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
573
|
+
declare function EventDefinition$7<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$7<Payload, Type>;
|
|
574
|
+
type EventHandler$7<T extends EventDefinition$7> = (payload: T['__payload']) => void | Promise<void>;
|
|
575
|
+
type BuildEventDefinition$7<T extends EventDefinition$7<any, string>> = (handler: EventHandler$7<T>) => void;
|
|
576
|
+
|
|
577
|
+
declare global {
|
|
578
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
579
|
+
interface SymbolConstructor {
|
|
580
|
+
readonly observable: symbol;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
575
583
|
|
|
576
|
-
declare function createGroup$1(httpClient: HttpClient): (group: Group$2, options?: CreateGroupOptions) => Promise<Group$2 & {
|
|
584
|
+
declare function createGroup$1(httpClient: HttpClient$8): (group: Group$2, options?: CreateGroupOptions) => Promise<Group$2 & {
|
|
577
585
|
privacyLevel: PrivacyStatus$2;
|
|
578
586
|
privacyStatus: PrivacyStatus$2;
|
|
579
587
|
coverImage?: {
|
|
@@ -596,7 +604,7 @@ declare function createGroup$1(httpClient: HttpClient): (group: Group$2, options
|
|
|
596
604
|
identityType: IdentityType$2;
|
|
597
605
|
} | undefined;
|
|
598
606
|
}>;
|
|
599
|
-
declare function updateGroup$1(httpClient: HttpClient): (_id: string | null, group: UpdateGroup, options?: UpdateGroupOptions) => Promise<Group$2 & {
|
|
607
|
+
declare function updateGroup$1(httpClient: HttpClient$8): (_id: string | null, group: UpdateGroup, options?: UpdateGroupOptions) => Promise<Group$2 & {
|
|
600
608
|
privacyLevel: PrivacyStatus$2;
|
|
601
609
|
privacyStatus: PrivacyStatus$2;
|
|
602
610
|
coverImage?: {
|
|
@@ -619,8 +627,8 @@ declare function updateGroup$1(httpClient: HttpClient): (_id: string | null, gro
|
|
|
619
627
|
identityType: IdentityType$2;
|
|
620
628
|
} | undefined;
|
|
621
629
|
}>;
|
|
622
|
-
declare function deleteGroup$1(httpClient: HttpClient): (groupId: string) => Promise<DeleteGroupResponse & DeleteGroupResponseNonNullableFields>;
|
|
623
|
-
declare function getGroup$1(httpClient: HttpClient): (groupId: string, options?: GetGroupOptions) => Promise<Group$2 & {
|
|
630
|
+
declare function deleteGroup$1(httpClient: HttpClient$8): (groupId: string) => Promise<DeleteGroupResponse & DeleteGroupResponseNonNullableFields>;
|
|
631
|
+
declare function getGroup$1(httpClient: HttpClient$8): (groupId: string, options?: GetGroupOptions) => Promise<Group$2 & {
|
|
624
632
|
privacyLevel: PrivacyStatus$2;
|
|
625
633
|
privacyStatus: PrivacyStatus$2;
|
|
626
634
|
coverImage?: {
|
|
@@ -643,27 +651,27 @@ declare function getGroup$1(httpClient: HttpClient): (groupId: string, options?:
|
|
|
643
651
|
identityType: IdentityType$2;
|
|
644
652
|
} | undefined;
|
|
645
653
|
}>;
|
|
646
|
-
declare function getGroupBySlug$1(httpClient: HttpClient): (slug: string, options?: GetGroupBySlugOptions) => Promise<GetGroupBySlugResponse & GetGroupBySlugResponseNonNullableFields>;
|
|
647
|
-
declare function listGroups$1(httpClient: HttpClient): (options?: ListGroupsOptions) => Promise<ListGroupsResponse & ListGroupsResponseNonNullableFields>;
|
|
648
|
-
declare function queryGroups$1(httpClient: HttpClient): (options?: QueryGroupsOptions) => GroupsQueryBuilder;
|
|
649
|
-
declare const onGroupCreated$1: EventDefinition<GroupCreatedEnvelope, "wix.social_groups.v2.group_created">;
|
|
650
|
-
declare const onGroupUpdated$1: EventDefinition<GroupUpdatedEnvelope, "wix.social_groups.v2.group_updated">;
|
|
651
|
-
declare const onGroupCoverChanged$1: EventDefinition<GroupCoverChangedEnvelope, "wix.social_groups.v2.group_group_cover_changed">;
|
|
652
|
-
declare const onGroupDescriptionChanged$1: EventDefinition<GroupDescriptionChangedEnvelope, "wix.social_groups.v2.group_group_description_changed">;
|
|
653
|
-
declare const onGroupDeleted$1: EventDefinition<GroupDeletedEnvelope, "wix.social_groups.v2.group_deleted">;
|
|
654
|
+
declare function getGroupBySlug$1(httpClient: HttpClient$8): (slug: string, options?: GetGroupBySlugOptions) => Promise<GetGroupBySlugResponse & GetGroupBySlugResponseNonNullableFields>;
|
|
655
|
+
declare function listGroups$1(httpClient: HttpClient$8): (options?: ListGroupsOptions) => Promise<ListGroupsResponse & ListGroupsResponseNonNullableFields>;
|
|
656
|
+
declare function queryGroups$1(httpClient: HttpClient$8): (options?: QueryGroupsOptions) => GroupsQueryBuilder;
|
|
657
|
+
declare const onGroupCreated$1: EventDefinition$7<GroupCreatedEnvelope, "wix.social_groups.v2.group_created">;
|
|
658
|
+
declare const onGroupUpdated$1: EventDefinition$7<GroupUpdatedEnvelope, "wix.social_groups.v2.group_updated">;
|
|
659
|
+
declare const onGroupCoverChanged$1: EventDefinition$7<GroupCoverChangedEnvelope, "wix.social_groups.v2.group_group_cover_changed">;
|
|
660
|
+
declare const onGroupDescriptionChanged$1: EventDefinition$7<GroupDescriptionChangedEnvelope, "wix.social_groups.v2.group_group_description_changed">;
|
|
661
|
+
declare const onGroupDeleted$1: EventDefinition$7<GroupDeletedEnvelope, "wix.social_groups.v2.group_deleted">;
|
|
654
662
|
|
|
655
|
-
declare const createGroup: BuildRESTFunction<typeof createGroup$1>;
|
|
656
|
-
declare const updateGroup: BuildRESTFunction<typeof updateGroup$1>;
|
|
657
|
-
declare const deleteGroup: BuildRESTFunction<typeof deleteGroup$1>;
|
|
658
|
-
declare const getGroup: BuildRESTFunction<typeof getGroup$1>;
|
|
659
|
-
declare const getGroupBySlug: BuildRESTFunction<typeof getGroupBySlug$1>;
|
|
660
|
-
declare const listGroups: BuildRESTFunction<typeof listGroups$1>;
|
|
661
|
-
declare const queryGroups: BuildRESTFunction<typeof queryGroups$1>;
|
|
662
|
-
declare const onGroupCreated: BuildEventDefinition<typeof onGroupCreated$1>;
|
|
663
|
-
declare const onGroupUpdated: BuildEventDefinition<typeof onGroupUpdated$1>;
|
|
664
|
-
declare const onGroupCoverChanged: BuildEventDefinition<typeof onGroupCoverChanged$1>;
|
|
665
|
-
declare const onGroupDescriptionChanged: BuildEventDefinition<typeof onGroupDescriptionChanged$1>;
|
|
666
|
-
declare const onGroupDeleted: BuildEventDefinition<typeof onGroupDeleted$1>;
|
|
663
|
+
declare const createGroup: BuildRESTFunction$8<typeof createGroup$1>;
|
|
664
|
+
declare const updateGroup: BuildRESTFunction$8<typeof updateGroup$1>;
|
|
665
|
+
declare const deleteGroup: BuildRESTFunction$8<typeof deleteGroup$1>;
|
|
666
|
+
declare const getGroup: BuildRESTFunction$8<typeof getGroup$1>;
|
|
667
|
+
declare const getGroupBySlug: BuildRESTFunction$8<typeof getGroupBySlug$1>;
|
|
668
|
+
declare const listGroups: BuildRESTFunction$8<typeof listGroups$1>;
|
|
669
|
+
declare const queryGroups: BuildRESTFunction$8<typeof queryGroups$1>;
|
|
670
|
+
declare const onGroupCreated: BuildEventDefinition$7<typeof onGroupCreated$1>;
|
|
671
|
+
declare const onGroupUpdated: BuildEventDefinition$7<typeof onGroupUpdated$1>;
|
|
672
|
+
declare const onGroupCoverChanged: BuildEventDefinition$7<typeof onGroupCoverChanged$1>;
|
|
673
|
+
declare const onGroupDescriptionChanged: BuildEventDefinition$7<typeof onGroupDescriptionChanged$1>;
|
|
674
|
+
declare const onGroupDeleted: BuildEventDefinition$7<typeof onGroupDeleted$1>;
|
|
667
675
|
|
|
668
676
|
declare const context$8_createGroup: typeof createGroup;
|
|
669
677
|
declare const context$8_deleteGroup: typeof deleteGroup;
|
|
@@ -1023,23 +1031,66 @@ interface QueryMembershipsOptions {
|
|
|
1023
1031
|
query?: Query$2;
|
|
1024
1032
|
}
|
|
1025
1033
|
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
+
type RESTFunctionDescriptor$7<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$7) => T;
|
|
1035
|
+
interface HttpClient$7 {
|
|
1036
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$7<TResponse, TData>): Promise<HttpResponse$7<TResponse>>;
|
|
1037
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1038
|
+
}
|
|
1039
|
+
type RequestOptionsFactory$7<TResponse = any, TData = any> = (context: any) => RequestOptions$7<TResponse, TData>;
|
|
1040
|
+
type HttpResponse$7<T = any> = {
|
|
1041
|
+
data: T;
|
|
1042
|
+
status: number;
|
|
1043
|
+
statusText: string;
|
|
1044
|
+
headers: any;
|
|
1045
|
+
request?: any;
|
|
1046
|
+
};
|
|
1047
|
+
type RequestOptions$7<_TResponse = any, Data = any> = {
|
|
1048
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1049
|
+
url: string;
|
|
1050
|
+
data?: Data;
|
|
1051
|
+
params?: URLSearchParams;
|
|
1052
|
+
} & APIMetadata$7;
|
|
1053
|
+
type APIMetadata$7 = {
|
|
1054
|
+
methodFqn?: string;
|
|
1055
|
+
entityFqdn?: string;
|
|
1056
|
+
packageName?: string;
|
|
1057
|
+
};
|
|
1058
|
+
type BuildRESTFunction$7<T extends RESTFunctionDescriptor$7> = T extends RESTFunctionDescriptor$7<infer U> ? U : never;
|
|
1059
|
+
type EventDefinition$6<Payload = unknown, Type extends string = string> = {
|
|
1060
|
+
__type: 'event-definition';
|
|
1061
|
+
type: Type;
|
|
1062
|
+
isDomainEvent?: boolean;
|
|
1063
|
+
transformations?: (envelope: unknown) => Payload;
|
|
1064
|
+
__payload: Payload;
|
|
1065
|
+
};
|
|
1066
|
+
declare function EventDefinition$6<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$6<Payload, Type>;
|
|
1067
|
+
type EventHandler$6<T extends EventDefinition$6> = (payload: T['__payload']) => void | Promise<void>;
|
|
1068
|
+
type BuildEventDefinition$6<T extends EventDefinition$6<any, string>> = (handler: EventHandler$6<T>) => void;
|
|
1069
|
+
|
|
1070
|
+
declare global {
|
|
1071
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1072
|
+
interface SymbolConstructor {
|
|
1073
|
+
readonly observable: symbol;
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
declare function addGroupMembers$1(httpClient: HttpClient$7): (groupId: string, memberIds: string[], options?: AddGroupMembersOptions) => Promise<AddGroupMembersResponse & AddGroupMembersResponseNonNullableFields>;
|
|
1078
|
+
declare function removeGroupMembers$1(httpClient: HttpClient$7): (groupId: string, memberIds: string[], options?: RemoveGroupMembersOptions) => Promise<void>;
|
|
1079
|
+
declare function listGroupMembers$1(httpClient: HttpClient$7): (groupId: string, options?: ListGroupMembersOptions) => Promise<ListGroupMembersResponse & ListGroupMembersResponseNonNullableFields>;
|
|
1080
|
+
declare function queryGroupMembers$1(httpClient: HttpClient$7): (groupId: string) => MembersQueryBuilder;
|
|
1081
|
+
declare function listMemberships$1(httpClient: HttpClient$7): (memberId: string | null, options?: ListMembershipsOptions) => Promise<ListMembershipsResponse & ListMembershipsResponseNonNullableFields>;
|
|
1082
|
+
declare function queryMemberships$1(httpClient: HttpClient$7): (memberId: string | null, options?: QueryMembershipsOptions) => Promise<QueryMembershipsResponse & QueryMembershipsResponseNonNullableFields>;
|
|
1083
|
+
declare const onGroupMemberAdded$1: EventDefinition$6<GroupMemberAddedEnvelope, "wix.social_groups.v2.group_member_added">;
|
|
1084
|
+
declare const onGroupMemberRemoved$1: EventDefinition$6<GroupMemberRemovedEnvelope, "wix.social_groups.v2.group_member_removed">;
|
|
1034
1085
|
|
|
1035
|
-
declare const addGroupMembers: BuildRESTFunction<typeof addGroupMembers$1>;
|
|
1036
|
-
declare const removeGroupMembers: BuildRESTFunction<typeof removeGroupMembers$1>;
|
|
1037
|
-
declare const listGroupMembers: BuildRESTFunction<typeof listGroupMembers$1>;
|
|
1038
|
-
declare const queryGroupMembers: BuildRESTFunction<typeof queryGroupMembers$1>;
|
|
1039
|
-
declare const listMemberships: BuildRESTFunction<typeof listMemberships$1>;
|
|
1040
|
-
declare const queryMemberships: BuildRESTFunction<typeof queryMemberships$1>;
|
|
1041
|
-
declare const onGroupMemberAdded: BuildEventDefinition<typeof onGroupMemberAdded$1>;
|
|
1042
|
-
declare const onGroupMemberRemoved: BuildEventDefinition<typeof onGroupMemberRemoved$1>;
|
|
1086
|
+
declare const addGroupMembers: BuildRESTFunction$7<typeof addGroupMembers$1>;
|
|
1087
|
+
declare const removeGroupMembers: BuildRESTFunction$7<typeof removeGroupMembers$1>;
|
|
1088
|
+
declare const listGroupMembers: BuildRESTFunction$7<typeof listGroupMembers$1>;
|
|
1089
|
+
declare const queryGroupMembers: BuildRESTFunction$7<typeof queryGroupMembers$1>;
|
|
1090
|
+
declare const listMemberships: BuildRESTFunction$7<typeof listMemberships$1>;
|
|
1091
|
+
declare const queryMemberships: BuildRESTFunction$7<typeof queryMemberships$1>;
|
|
1092
|
+
declare const onGroupMemberAdded: BuildEventDefinition$6<typeof onGroupMemberAdded$1>;
|
|
1093
|
+
declare const onGroupMemberRemoved: BuildEventDefinition$6<typeof onGroupMemberRemoved$1>;
|
|
1043
1094
|
|
|
1044
1095
|
declare const context$7_addGroupMembers: typeof addGroupMembers;
|
|
1045
1096
|
declare const context$7_listGroupMembers: typeof listGroupMembers;
|
|
@@ -1577,21 +1628,64 @@ interface GroupRequestsQueryBuilder {
|
|
|
1577
1628
|
find: () => Promise<GroupRequestsQueryResult>;
|
|
1578
1629
|
}
|
|
1579
1630
|
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1631
|
+
type RESTFunctionDescriptor$6<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$6) => T;
|
|
1632
|
+
interface HttpClient$6 {
|
|
1633
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$6<TResponse, TData>): Promise<HttpResponse$6<TResponse>>;
|
|
1634
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1635
|
+
}
|
|
1636
|
+
type RequestOptionsFactory$6<TResponse = any, TData = any> = (context: any) => RequestOptions$6<TResponse, TData>;
|
|
1637
|
+
type HttpResponse$6<T = any> = {
|
|
1638
|
+
data: T;
|
|
1639
|
+
status: number;
|
|
1640
|
+
statusText: string;
|
|
1641
|
+
headers: any;
|
|
1642
|
+
request?: any;
|
|
1643
|
+
};
|
|
1644
|
+
type RequestOptions$6<_TResponse = any, Data = any> = {
|
|
1645
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1646
|
+
url: string;
|
|
1647
|
+
data?: Data;
|
|
1648
|
+
params?: URLSearchParams;
|
|
1649
|
+
} & APIMetadata$6;
|
|
1650
|
+
type APIMetadata$6 = {
|
|
1651
|
+
methodFqn?: string;
|
|
1652
|
+
entityFqdn?: string;
|
|
1653
|
+
packageName?: string;
|
|
1654
|
+
};
|
|
1655
|
+
type BuildRESTFunction$6<T extends RESTFunctionDescriptor$6> = T extends RESTFunctionDescriptor$6<infer U> ? U : never;
|
|
1656
|
+
type EventDefinition$5<Payload = unknown, Type extends string = string> = {
|
|
1657
|
+
__type: 'event-definition';
|
|
1658
|
+
type: Type;
|
|
1659
|
+
isDomainEvent?: boolean;
|
|
1660
|
+
transformations?: (envelope: unknown) => Payload;
|
|
1661
|
+
__payload: Payload;
|
|
1662
|
+
};
|
|
1663
|
+
declare function EventDefinition$5<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$5<Payload, Type>;
|
|
1664
|
+
type EventHandler$5<T extends EventDefinition$5> = (payload: T['__payload']) => void | Promise<void>;
|
|
1665
|
+
type BuildEventDefinition$5<T extends EventDefinition$5<any, string>> = (handler: EventHandler$5<T>) => void;
|
|
1666
|
+
|
|
1667
|
+
declare global {
|
|
1668
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1669
|
+
interface SymbolConstructor {
|
|
1670
|
+
readonly observable: symbol;
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1587
1673
|
|
|
1588
|
-
declare
|
|
1589
|
-
declare
|
|
1590
|
-
declare
|
|
1591
|
-
declare
|
|
1592
|
-
declare const onGroupRequestCreated:
|
|
1593
|
-
declare const onGroupRequestApproved:
|
|
1594
|
-
declare const onGroupRequestRejected:
|
|
1674
|
+
declare function approveGroupRequests$1(httpClient: HttpClient$6): (groupRequestIds: string[]) => Promise<ApproveGroupRequestsResponse & ApproveGroupRequestsResponseNonNullableFields>;
|
|
1675
|
+
declare function rejectGroupRequests$1(httpClient: HttpClient$6): (rejections: Rejection$3[]) => Promise<RejectGroupRequestsResponse & RejectGroupRequestsResponseNonNullableFields>;
|
|
1676
|
+
declare function listGroupRequests$1(httpClient: HttpClient$6): (options?: ListGroupRequestsOptions) => Promise<ListGroupRequestsResponse & ListGroupRequestsResponseNonNullableFields>;
|
|
1677
|
+
declare function queryGroupRequests$1(httpClient: HttpClient$6): (options?: QueryGroupRequestsOptions) => GroupRequestsQueryBuilder;
|
|
1678
|
+
declare const onGroupRequestCreated$1: EventDefinition$5<GroupRequestCreatedEnvelope, "wix.social_groups.v2.group_request_created">;
|
|
1679
|
+
declare const onGroupRequestApproved$1: EventDefinition$5<GroupRequestApprovedEnvelope, "wix.social_groups.v2.group_request_approved">;
|
|
1680
|
+
declare const onGroupRequestRejected$1: EventDefinition$5<GroupRequestRejectedEnvelope, "wix.social_groups.v2.group_request_rejected">;
|
|
1681
|
+
|
|
1682
|
+
declare const approveGroupRequests: BuildRESTFunction$6<typeof approveGroupRequests$1>;
|
|
1683
|
+
declare const rejectGroupRequests: BuildRESTFunction$6<typeof rejectGroupRequests$1>;
|
|
1684
|
+
declare const listGroupRequests: BuildRESTFunction$6<typeof listGroupRequests$1>;
|
|
1685
|
+
declare const queryGroupRequests: BuildRESTFunction$6<typeof queryGroupRequests$1>;
|
|
1686
|
+
declare const onGroupRequestCreated: BuildEventDefinition$5<typeof onGroupRequestCreated$1>;
|
|
1687
|
+
declare const onGroupRequestApproved: BuildEventDefinition$5<typeof onGroupRequestApproved$1>;
|
|
1688
|
+
declare const onGroupRequestRejected: BuildEventDefinition$5<typeof onGroupRequestRejected$1>;
|
|
1595
1689
|
|
|
1596
1690
|
declare const context$6_approveGroupRequests: typeof approveGroupRequests;
|
|
1597
1691
|
declare const context$6_listGroupRequests: typeof listGroupRequests;
|
|
@@ -1807,15 +1901,58 @@ interface UnassignRoleOptions {
|
|
|
1807
1901
|
siteMemberIds?: string[];
|
|
1808
1902
|
}
|
|
1809
1903
|
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1904
|
+
type RESTFunctionDescriptor$5<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$5) => T;
|
|
1905
|
+
interface HttpClient$5 {
|
|
1906
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$5<TResponse, TData>): Promise<HttpResponse$5<TResponse>>;
|
|
1907
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1908
|
+
}
|
|
1909
|
+
type RequestOptionsFactory$5<TResponse = any, TData = any> = (context: any) => RequestOptions$5<TResponse, TData>;
|
|
1910
|
+
type HttpResponse$5<T = any> = {
|
|
1911
|
+
data: T;
|
|
1912
|
+
status: number;
|
|
1913
|
+
statusText: string;
|
|
1914
|
+
headers: any;
|
|
1915
|
+
request?: any;
|
|
1916
|
+
};
|
|
1917
|
+
type RequestOptions$5<_TResponse = any, Data = any> = {
|
|
1918
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1919
|
+
url: string;
|
|
1920
|
+
data?: Data;
|
|
1921
|
+
params?: URLSearchParams;
|
|
1922
|
+
} & APIMetadata$5;
|
|
1923
|
+
type APIMetadata$5 = {
|
|
1924
|
+
methodFqn?: string;
|
|
1925
|
+
entityFqdn?: string;
|
|
1926
|
+
packageName?: string;
|
|
1927
|
+
};
|
|
1928
|
+
type BuildRESTFunction$5<T extends RESTFunctionDescriptor$5> = T extends RESTFunctionDescriptor$5<infer U> ? U : never;
|
|
1929
|
+
type EventDefinition$4<Payload = unknown, Type extends string = string> = {
|
|
1930
|
+
__type: 'event-definition';
|
|
1931
|
+
type: Type;
|
|
1932
|
+
isDomainEvent?: boolean;
|
|
1933
|
+
transformations?: (envelope: unknown) => Payload;
|
|
1934
|
+
__payload: Payload;
|
|
1935
|
+
};
|
|
1936
|
+
declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
|
|
1937
|
+
type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
|
|
1938
|
+
type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
|
|
1939
|
+
|
|
1940
|
+
declare global {
|
|
1941
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1942
|
+
interface SymbolConstructor {
|
|
1943
|
+
readonly observable: symbol;
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1814
1946
|
|
|
1815
|
-
declare
|
|
1816
|
-
declare
|
|
1817
|
-
declare const onGroupRoleAssigned:
|
|
1818
|
-
declare const onGroupRoleUnassigned:
|
|
1947
|
+
declare function assignRole$1(httpClient: HttpClient$5): (groupId: string, memberIds: string[], role: GroupRole, options?: AssignRoleOptions) => Promise<AssignRoleResponse & AssignRoleResponseNonNullableFields>;
|
|
1948
|
+
declare function unassignRole$1(httpClient: HttpClient$5): (groupId: string, memberIds: string[], role: GroupRole, options?: UnassignRoleOptions) => Promise<UnassignRoleResponse & UnassignRoleResponseNonNullableFields>;
|
|
1949
|
+
declare const onGroupRoleAssigned$1: EventDefinition$4<GroupRoleAssignedEnvelope, "wix.social_groups.v2.group_role_assigned">;
|
|
1950
|
+
declare const onGroupRoleUnassigned$1: EventDefinition$4<GroupRoleUnassignedEnvelope, "wix.social_groups.v2.group_role_unassigned">;
|
|
1951
|
+
|
|
1952
|
+
declare const assignRole: BuildRESTFunction$5<typeof assignRole$1>;
|
|
1953
|
+
declare const unassignRole: BuildRESTFunction$5<typeof unassignRole$1>;
|
|
1954
|
+
declare const onGroupRoleAssigned: BuildEventDefinition$4<typeof onGroupRoleAssigned$1>;
|
|
1955
|
+
declare const onGroupRoleUnassigned: BuildEventDefinition$4<typeof onGroupRoleUnassigned$1>;
|
|
1819
1956
|
|
|
1820
1957
|
declare const context$5_assignRole: typeof assignRole;
|
|
1821
1958
|
declare const context$5_onGroupRoleAssigned: typeof onGroupRoleAssigned;
|
|
@@ -1947,13 +2084,56 @@ interface CreateOrReplaceAllRulesOptions {
|
|
|
1947
2084
|
rules?: GroupRule[];
|
|
1948
2085
|
}
|
|
1949
2086
|
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
2087
|
+
type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
|
|
2088
|
+
interface HttpClient$4 {
|
|
2089
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
|
|
2090
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2091
|
+
}
|
|
2092
|
+
type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
|
|
2093
|
+
type HttpResponse$4<T = any> = {
|
|
2094
|
+
data: T;
|
|
2095
|
+
status: number;
|
|
2096
|
+
statusText: string;
|
|
2097
|
+
headers: any;
|
|
2098
|
+
request?: any;
|
|
2099
|
+
};
|
|
2100
|
+
type RequestOptions$4<_TResponse = any, Data = any> = {
|
|
2101
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2102
|
+
url: string;
|
|
2103
|
+
data?: Data;
|
|
2104
|
+
params?: URLSearchParams;
|
|
2105
|
+
} & APIMetadata$4;
|
|
2106
|
+
type APIMetadata$4 = {
|
|
2107
|
+
methodFqn?: string;
|
|
2108
|
+
entityFqdn?: string;
|
|
2109
|
+
packageName?: string;
|
|
2110
|
+
};
|
|
2111
|
+
type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
|
|
2112
|
+
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
2113
|
+
__type: 'event-definition';
|
|
2114
|
+
type: Type;
|
|
2115
|
+
isDomainEvent?: boolean;
|
|
2116
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2117
|
+
__payload: Payload;
|
|
2118
|
+
};
|
|
2119
|
+
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
2120
|
+
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
2121
|
+
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
1953
2122
|
|
|
1954
|
-
declare
|
|
1955
|
-
|
|
1956
|
-
|
|
2123
|
+
declare global {
|
|
2124
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2125
|
+
interface SymbolConstructor {
|
|
2126
|
+
readonly observable: symbol;
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
declare function listRules$1(httpClient: HttpClient$4): (groupId: string) => Promise<ListRulesResponse & ListRulesResponseNonNullableFields>;
|
|
2131
|
+
declare function createOrReplaceAllRules$1(httpClient: HttpClient$4): (groupId: string, options?: CreateOrReplaceAllRulesOptions) => Promise<CreateOrReplaceAllRulesResponse & CreateOrReplaceAllRulesResponseNonNullableFields>;
|
|
2132
|
+
declare const onGroupRulesUpdated$1: EventDefinition$3<GroupRulesUpdatedEnvelope, "wix.social_groups.v2.group_rules_updated">;
|
|
2133
|
+
|
|
2134
|
+
declare const listRules: BuildRESTFunction$4<typeof listRules$1>;
|
|
2135
|
+
declare const createOrReplaceAllRules: BuildRESTFunction$4<typeof createOrReplaceAllRules$1>;
|
|
2136
|
+
declare const onGroupRulesUpdated: BuildEventDefinition$3<typeof onGroupRulesUpdated$1>;
|
|
1957
2137
|
|
|
1958
2138
|
declare const context$4_createOrReplaceAllRules: typeof createOrReplaceAllRules;
|
|
1959
2139
|
declare const context$4_listRules: typeof listRules;
|
|
@@ -2204,21 +2384,64 @@ interface JoinGroupRequestsQueryBuilder {
|
|
|
2204
2384
|
find: () => Promise<JoinGroupRequestsQueryResult>;
|
|
2205
2385
|
}
|
|
2206
2386
|
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2387
|
+
type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
|
|
2388
|
+
interface HttpClient$3 {
|
|
2389
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
2390
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2391
|
+
}
|
|
2392
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
2393
|
+
type HttpResponse$3<T = any> = {
|
|
2394
|
+
data: T;
|
|
2395
|
+
status: number;
|
|
2396
|
+
statusText: string;
|
|
2397
|
+
headers: any;
|
|
2398
|
+
request?: any;
|
|
2399
|
+
};
|
|
2400
|
+
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
2401
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2402
|
+
url: string;
|
|
2403
|
+
data?: Data;
|
|
2404
|
+
params?: URLSearchParams;
|
|
2405
|
+
} & APIMetadata$3;
|
|
2406
|
+
type APIMetadata$3 = {
|
|
2407
|
+
methodFqn?: string;
|
|
2408
|
+
entityFqdn?: string;
|
|
2409
|
+
packageName?: string;
|
|
2410
|
+
};
|
|
2411
|
+
type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
|
|
2412
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
2413
|
+
__type: 'event-definition';
|
|
2414
|
+
type: Type;
|
|
2415
|
+
isDomainEvent?: boolean;
|
|
2416
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2417
|
+
__payload: Payload;
|
|
2418
|
+
};
|
|
2419
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
2420
|
+
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
2421
|
+
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
2422
|
+
|
|
2423
|
+
declare global {
|
|
2424
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2425
|
+
interface SymbolConstructor {
|
|
2426
|
+
readonly observable: symbol;
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
declare function approveJoinGroupRequests$1(httpClient: HttpClient$3): (groupId: string, memberIds: string[], options?: ApproveJoinGroupRequestsOptions) => Promise<ApproveJoinGroupRequestsResponse & ApproveJoinGroupRequestsResponseNonNullableFields>;
|
|
2431
|
+
declare function rejectJoinGroupRequests$1(httpClient: HttpClient$3): (groupId: string, rejections: Rejection$2[]) => Promise<RejectJoinGroupRequestsResponse & RejectJoinGroupRequestsResponseNonNullableFields>;
|
|
2432
|
+
declare function listJoinGroupRequests$1(httpClient: HttpClient$3): (groupId: string, options?: ListJoinGroupRequestsOptions) => Promise<ListJoinGroupRequestsResponse & ListJoinGroupRequestsResponseNonNullableFields>;
|
|
2433
|
+
declare function queryJoinGroupRequests$1(httpClient: HttpClient$3): (groupId: string, options?: QueryJoinGroupRequestsOptions) => JoinGroupRequestsQueryBuilder;
|
|
2434
|
+
declare const onJoinGroupRequestCreated$1: EventDefinition$2<JoinGroupRequestCreatedEnvelope, "wix.social_groups.v2.join_group_request_created">;
|
|
2435
|
+
declare const onJoinGroupRequestApproved$1: EventDefinition$2<JoinGroupRequestApprovedEnvelope, "wix.social_groups.v2.join_group_request_approved">;
|
|
2436
|
+
declare const onJoinGroupRequestRejected$1: EventDefinition$2<JoinGroupRequestRejectedEnvelope, "wix.social_groups.v2.join_group_request_rejected">;
|
|
2214
2437
|
|
|
2215
|
-
declare const approveJoinGroupRequests: BuildRESTFunction<typeof approveJoinGroupRequests$1>;
|
|
2216
|
-
declare const rejectJoinGroupRequests: BuildRESTFunction<typeof rejectJoinGroupRequests$1>;
|
|
2217
|
-
declare const listJoinGroupRequests: BuildRESTFunction<typeof listJoinGroupRequests$1>;
|
|
2218
|
-
declare const queryJoinGroupRequests: BuildRESTFunction<typeof queryJoinGroupRequests$1>;
|
|
2219
|
-
declare const onJoinGroupRequestCreated: BuildEventDefinition<typeof onJoinGroupRequestCreated$1>;
|
|
2220
|
-
declare const onJoinGroupRequestApproved: BuildEventDefinition<typeof onJoinGroupRequestApproved$1>;
|
|
2221
|
-
declare const onJoinGroupRequestRejected: BuildEventDefinition<typeof onJoinGroupRequestRejected$1>;
|
|
2438
|
+
declare const approveJoinGroupRequests: BuildRESTFunction$3<typeof approveJoinGroupRequests$1>;
|
|
2439
|
+
declare const rejectJoinGroupRequests: BuildRESTFunction$3<typeof rejectJoinGroupRequests$1>;
|
|
2440
|
+
declare const listJoinGroupRequests: BuildRESTFunction$3<typeof listJoinGroupRequests$1>;
|
|
2441
|
+
declare const queryJoinGroupRequests: BuildRESTFunction$3<typeof queryJoinGroupRequests$1>;
|
|
2442
|
+
declare const onJoinGroupRequestCreated: BuildEventDefinition$2<typeof onJoinGroupRequestCreated$1>;
|
|
2443
|
+
declare const onJoinGroupRequestApproved: BuildEventDefinition$2<typeof onJoinGroupRequestApproved$1>;
|
|
2444
|
+
declare const onJoinGroupRequestRejected: BuildEventDefinition$2<typeof onJoinGroupRequestRejected$1>;
|
|
2222
2445
|
|
|
2223
2446
|
declare const context$3_approveJoinGroupRequests: typeof approveJoinGroupRequests;
|
|
2224
2447
|
declare const context$3_listJoinGroupRequests: typeof listJoinGroupRequests;
|
|
@@ -2324,13 +2547,46 @@ interface ListAnswersOptions {
|
|
|
2324
2547
|
paging?: Paging$2;
|
|
2325
2548
|
}
|
|
2326
2549
|
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2550
|
+
type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
|
|
2551
|
+
interface HttpClient$2 {
|
|
2552
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
2553
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2554
|
+
}
|
|
2555
|
+
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
2556
|
+
type HttpResponse$2<T = any> = {
|
|
2557
|
+
data: T;
|
|
2558
|
+
status: number;
|
|
2559
|
+
statusText: string;
|
|
2560
|
+
headers: any;
|
|
2561
|
+
request?: any;
|
|
2562
|
+
};
|
|
2563
|
+
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
2564
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2565
|
+
url: string;
|
|
2566
|
+
data?: Data;
|
|
2567
|
+
params?: URLSearchParams;
|
|
2568
|
+
} & APIMetadata$2;
|
|
2569
|
+
type APIMetadata$2 = {
|
|
2570
|
+
methodFqn?: string;
|
|
2571
|
+
entityFqdn?: string;
|
|
2572
|
+
packageName?: string;
|
|
2573
|
+
};
|
|
2574
|
+
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
2575
|
+
|
|
2576
|
+
declare global {
|
|
2577
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2578
|
+
interface SymbolConstructor {
|
|
2579
|
+
readonly observable: symbol;
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
declare function listMembershipQuestions$1(httpClient: HttpClient$2): (groupId: string) => Promise<ListMembershipQuestionsResponse & ListMembershipQuestionsResponseNonNullableFields>;
|
|
2584
|
+
declare function createOrReplaceAllMembershipQuestions$1(httpClient: HttpClient$2): (groupId: string, options?: CreateOrReplaceAllMembershipQuestionsOptions) => Promise<CreateOrReplaceAllMembershipQuestionsResponse & CreateOrReplaceAllMembershipQuestionsResponseNonNullableFields>;
|
|
2585
|
+
declare function listAnswers$1(httpClient: HttpClient$2): (groupId: string, options?: ListAnswersOptions) => Promise<ListAnswersResponse & ListAnswersResponseNonNullableFields>;
|
|
2330
2586
|
|
|
2331
|
-
declare const listMembershipQuestions: BuildRESTFunction<typeof listMembershipQuestions$1>;
|
|
2332
|
-
declare const createOrReplaceAllMembershipQuestions: BuildRESTFunction<typeof createOrReplaceAllMembershipQuestions$1>;
|
|
2333
|
-
declare const listAnswers: BuildRESTFunction<typeof listAnswers$1>;
|
|
2587
|
+
declare const listMembershipQuestions: BuildRESTFunction$2<typeof listMembershipQuestions$1>;
|
|
2588
|
+
declare const createOrReplaceAllMembershipQuestions: BuildRESTFunction$2<typeof createOrReplaceAllMembershipQuestions$1>;
|
|
2589
|
+
declare const listAnswers: BuildRESTFunction$2<typeof listAnswers$1>;
|
|
2334
2590
|
|
|
2335
2591
|
declare const context$2_createOrReplaceAllMembershipQuestions: typeof createOrReplaceAllMembershipQuestions;
|
|
2336
2592
|
declare const context$2_listAnswers: typeof listAnswers;
|
|
@@ -2857,19 +3113,62 @@ interface QueryCreateRequestsOptions {
|
|
|
2857
3113
|
query?: Query$1;
|
|
2858
3114
|
}
|
|
2859
3115
|
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
3116
|
+
type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
|
|
3117
|
+
interface HttpClient$1 {
|
|
3118
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
3119
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
3120
|
+
}
|
|
3121
|
+
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
3122
|
+
type HttpResponse$1<T = any> = {
|
|
3123
|
+
data: T;
|
|
3124
|
+
status: number;
|
|
3125
|
+
statusText: string;
|
|
3126
|
+
headers: any;
|
|
3127
|
+
request?: any;
|
|
3128
|
+
};
|
|
3129
|
+
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
3130
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3131
|
+
url: string;
|
|
3132
|
+
data?: Data;
|
|
3133
|
+
params?: URLSearchParams;
|
|
3134
|
+
} & APIMetadata$1;
|
|
3135
|
+
type APIMetadata$1 = {
|
|
3136
|
+
methodFqn?: string;
|
|
3137
|
+
entityFqdn?: string;
|
|
3138
|
+
packageName?: string;
|
|
3139
|
+
};
|
|
3140
|
+
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
3141
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
3142
|
+
__type: 'event-definition';
|
|
3143
|
+
type: Type;
|
|
3144
|
+
isDomainEvent?: boolean;
|
|
3145
|
+
transformations?: (envelope: unknown) => Payload;
|
|
3146
|
+
__payload: Payload;
|
|
3147
|
+
};
|
|
3148
|
+
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
3149
|
+
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
3150
|
+
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
3151
|
+
|
|
3152
|
+
declare global {
|
|
3153
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3154
|
+
interface SymbolConstructor {
|
|
3155
|
+
readonly observable: symbol;
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
declare function approveCreateRequests$1(httpClient: HttpClient$1): (options?: ApproveCreateRequestsOptions) => Promise<ApproveCreateRequestsResponse & ApproveCreateRequestsResponseNonNullableFields>;
|
|
3160
|
+
declare function rejectCreateRequests$1(httpClient: HttpClient$1): (options?: RejectCreateRequestsOptions) => Promise<RejectCreateRequestsResponse & RejectCreateRequestsResponseNonNullableFields>;
|
|
3161
|
+
declare function listCreateRequests$1(httpClient: HttpClient$1): (options?: ListCreateRequestsOptions) => Promise<ListCreateRequestsResponse & ListCreateRequestsResponseNonNullableFields>;
|
|
3162
|
+
declare function queryCreateRequests$1(httpClient: HttpClient$1): (options?: QueryCreateRequestsOptions) => Promise<QueryCreateRequestsResponse & QueryCreateRequestsResponseNonNullableFields>;
|
|
3163
|
+
declare const onCreateRequestApproved$1: EventDefinition$1<CreateRequestApprovedEnvelope, "wix.social_groups.v3.create_request_approved">;
|
|
3164
|
+
declare const onCreateRequestRejected$1: EventDefinition$1<CreateRequestRejectedEnvelope, "wix.social_groups.v3.create_request_rejected">;
|
|
2866
3165
|
|
|
2867
|
-
declare const approveCreateRequests: BuildRESTFunction<typeof approveCreateRequests$1>;
|
|
2868
|
-
declare const rejectCreateRequests: BuildRESTFunction<typeof rejectCreateRequests$1>;
|
|
2869
|
-
declare const listCreateRequests: BuildRESTFunction<typeof listCreateRequests$1>;
|
|
2870
|
-
declare const queryCreateRequests: BuildRESTFunction<typeof queryCreateRequests$1>;
|
|
2871
|
-
declare const onCreateRequestApproved: BuildEventDefinition<typeof onCreateRequestApproved$1>;
|
|
2872
|
-
declare const onCreateRequestRejected: BuildEventDefinition<typeof onCreateRequestRejected$1>;
|
|
3166
|
+
declare const approveCreateRequests: BuildRESTFunction$1<typeof approveCreateRequests$1>;
|
|
3167
|
+
declare const rejectCreateRequests: BuildRESTFunction$1<typeof rejectCreateRequests$1>;
|
|
3168
|
+
declare const listCreateRequests: BuildRESTFunction$1<typeof listCreateRequests$1>;
|
|
3169
|
+
declare const queryCreateRequests: BuildRESTFunction$1<typeof queryCreateRequests$1>;
|
|
3170
|
+
declare const onCreateRequestApproved: BuildEventDefinition$1<typeof onCreateRequestApproved$1>;
|
|
3171
|
+
declare const onCreateRequestRejected: BuildEventDefinition$1<typeof onCreateRequestRejected$1>;
|
|
2873
3172
|
|
|
2874
3173
|
declare const context$1_approveCreateRequests: typeof approveCreateRequests;
|
|
2875
3174
|
declare const context$1_listCreateRequests: typeof listCreateRequests;
|
|
@@ -3127,6 +3426,49 @@ interface QueryJoinRequestsOptions {
|
|
|
3127
3426
|
query?: Query;
|
|
3128
3427
|
}
|
|
3129
3428
|
|
|
3429
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
3430
|
+
interface HttpClient {
|
|
3431
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
3432
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
3433
|
+
}
|
|
3434
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
3435
|
+
type HttpResponse<T = any> = {
|
|
3436
|
+
data: T;
|
|
3437
|
+
status: number;
|
|
3438
|
+
statusText: string;
|
|
3439
|
+
headers: any;
|
|
3440
|
+
request?: any;
|
|
3441
|
+
};
|
|
3442
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
3443
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3444
|
+
url: string;
|
|
3445
|
+
data?: Data;
|
|
3446
|
+
params?: URLSearchParams;
|
|
3447
|
+
} & APIMetadata;
|
|
3448
|
+
type APIMetadata = {
|
|
3449
|
+
methodFqn?: string;
|
|
3450
|
+
entityFqdn?: string;
|
|
3451
|
+
packageName?: string;
|
|
3452
|
+
};
|
|
3453
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
3454
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
3455
|
+
__type: 'event-definition';
|
|
3456
|
+
type: Type;
|
|
3457
|
+
isDomainEvent?: boolean;
|
|
3458
|
+
transformations?: (envelope: unknown) => Payload;
|
|
3459
|
+
__payload: Payload;
|
|
3460
|
+
};
|
|
3461
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
3462
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
3463
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
3464
|
+
|
|
3465
|
+
declare global {
|
|
3466
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3467
|
+
interface SymbolConstructor {
|
|
3468
|
+
readonly observable: symbol;
|
|
3469
|
+
}
|
|
3470
|
+
}
|
|
3471
|
+
|
|
3130
3472
|
declare function approveJoinRequests$1(httpClient: HttpClient): (groupId: string, options: ApproveJoinRequestsOptions) => Promise<ApproveJoinRequestsResponse & ApproveJoinRequestsResponseNonNullableFields>;
|
|
3131
3473
|
declare function rejectJoinRequests$1(httpClient: HttpClient): (groupId: string, options?: RejectJoinRequestsOptions) => Promise<RejectJoinRequestsResponse & RejectJoinRequestsResponseNonNullableFields>;
|
|
3132
3474
|
declare function listJoinRequests$1(httpClient: HttpClient): (groupId: string, options?: ListJoinRequestsOptions) => Promise<ListJoinRequestsResponse & ListJoinRequestsResponseNonNullableFields>;
|