@wix/groups 1.0.87 → 1.0.88

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.
@@ -538,50 +538,42 @@ interface GroupsQueryBuilder {
538
538
  find: () => Promise<GroupsQueryResult>;
539
539
  }
540
540
 
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>;
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>>;
545
544
  }
546
- type RequestOptionsFactory$8<TResponse = any, TData = any> = (context: any) => RequestOptions$8<TResponse, TData>;
547
- type HttpResponse$8<T = any> = {
545
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
546
+ type HttpResponse<T = any> = {
548
547
  data: T;
549
548
  status: number;
550
549
  statusText: string;
551
550
  headers: any;
552
551
  request?: any;
553
552
  };
554
- type RequestOptions$8<_TResponse = any, Data = any> = {
553
+ type RequestOptions<_TResponse = any, Data = any> = {
555
554
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
556
555
  url: string;
557
556
  data?: Data;
558
557
  params?: URLSearchParams;
559
- } & APIMetadata$8;
560
- type APIMetadata$8 = {
558
+ } & APIMetadata;
559
+ type APIMetadata = {
561
560
  methodFqn?: string;
562
561
  entityFqdn?: string;
563
562
  packageName?: string;
564
563
  };
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> = {
564
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
565
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
567
566
  __type: 'event-definition';
568
567
  type: Type;
569
568
  isDomainEvent?: boolean;
570
- transformations?: (envelope: unknown) => Payload;
569
+ transformations?: unknown;
571
570
  __payload: Payload;
572
571
  };
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
- }
572
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
573
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
574
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
583
575
 
584
- declare function createGroup$1(httpClient: HttpClient$8): (group: Group$2, options?: CreateGroupOptions) => Promise<Group$2 & {
576
+ declare function createGroup$1(httpClient: HttpClient): (group: Group$2, options?: CreateGroupOptions) => Promise<Group$2 & {
585
577
  privacyLevel: PrivacyStatus$2;
586
578
  privacyStatus: PrivacyStatus$2;
587
579
  coverImage?: {
@@ -604,7 +596,7 @@ declare function createGroup$1(httpClient: HttpClient$8): (group: Group$2, optio
604
596
  identityType: IdentityType$2;
605
597
  } | undefined;
606
598
  }>;
607
- declare function updateGroup$1(httpClient: HttpClient$8): (_id: string | null, group: UpdateGroup, options?: UpdateGroupOptions) => Promise<Group$2 & {
599
+ declare function updateGroup$1(httpClient: HttpClient): (_id: string | null, group: UpdateGroup, options?: UpdateGroupOptions) => Promise<Group$2 & {
608
600
  privacyLevel: PrivacyStatus$2;
609
601
  privacyStatus: PrivacyStatus$2;
610
602
  coverImage?: {
@@ -627,8 +619,8 @@ declare function updateGroup$1(httpClient: HttpClient$8): (_id: string | null, g
627
619
  identityType: IdentityType$2;
628
620
  } | undefined;
629
621
  }>;
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 & {
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 & {
632
624
  privacyLevel: PrivacyStatus$2;
633
625
  privacyStatus: PrivacyStatus$2;
634
626
  coverImage?: {
@@ -651,27 +643,27 @@ declare function getGroup$1(httpClient: HttpClient$8): (groupId: string, options
651
643
  identityType: IdentityType$2;
652
644
  } | undefined;
653
645
  }>;
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">;
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">;
662
654
 
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>;
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>;
675
667
 
676
668
  declare const context$8_createGroup: typeof createGroup;
677
669
  declare const context$8_deleteGroup: typeof deleteGroup;
@@ -1031,66 +1023,23 @@ interface QueryMembershipsOptions {
1031
1023
  query?: Query$2;
1032
1024
  }
1033
1025
 
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">;
1026
+ declare function addGroupMembers$1(httpClient: HttpClient): (groupId: string, memberIds: string[], options?: AddGroupMembersOptions) => Promise<AddGroupMembersResponse & AddGroupMembersResponseNonNullableFields>;
1027
+ declare function removeGroupMembers$1(httpClient: HttpClient): (groupId: string, memberIds: string[], options?: RemoveGroupMembersOptions) => Promise<void>;
1028
+ declare function listGroupMembers$1(httpClient: HttpClient): (groupId: string, options?: ListGroupMembersOptions) => Promise<ListGroupMembersResponse & ListGroupMembersResponseNonNullableFields>;
1029
+ declare function queryGroupMembers$1(httpClient: HttpClient): (groupId: string) => MembersQueryBuilder;
1030
+ declare function listMemberships$1(httpClient: HttpClient): (memberId: string | null, options?: ListMembershipsOptions) => Promise<ListMembershipsResponse & ListMembershipsResponseNonNullableFields>;
1031
+ declare function queryMemberships$1(httpClient: HttpClient): (memberId: string | null, options?: QueryMembershipsOptions) => Promise<QueryMembershipsResponse & QueryMembershipsResponseNonNullableFields>;
1032
+ declare const onGroupMemberAdded$1: EventDefinition<GroupMemberAddedEnvelope, "wix.social_groups.v2.group_member_added">;
1033
+ declare const onGroupMemberRemoved$1: EventDefinition<GroupMemberRemovedEnvelope, "wix.social_groups.v2.group_member_removed">;
1085
1034
 
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>;
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>;
1094
1043
 
1095
1044
  declare const context$7_addGroupMembers: typeof addGroupMembers;
1096
1045
  declare const context$7_listGroupMembers: typeof listGroupMembers;
@@ -1628,64 +1577,21 @@ interface GroupRequestsQueryBuilder {
1628
1577
  find: () => Promise<GroupRequestsQueryResult>;
1629
1578
  }
1630
1579
 
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
- }
1580
+ declare function approveGroupRequests$1(httpClient: HttpClient): (groupRequestIds: string[]) => Promise<ApproveGroupRequestsResponse & ApproveGroupRequestsResponseNonNullableFields>;
1581
+ declare function rejectGroupRequests$1(httpClient: HttpClient): (rejections: Rejection$3[]) => Promise<RejectGroupRequestsResponse & RejectGroupRequestsResponseNonNullableFields>;
1582
+ declare function listGroupRequests$1(httpClient: HttpClient): (options?: ListGroupRequestsOptions) => Promise<ListGroupRequestsResponse & ListGroupRequestsResponseNonNullableFields>;
1583
+ declare function queryGroupRequests$1(httpClient: HttpClient): (options?: QueryGroupRequestsOptions) => GroupRequestsQueryBuilder;
1584
+ declare const onGroupRequestCreated$1: EventDefinition<GroupRequestCreatedEnvelope, "wix.social_groups.v2.group_request_created">;
1585
+ declare const onGroupRequestApproved$1: EventDefinition<GroupRequestApprovedEnvelope, "wix.social_groups.v2.group_request_approved">;
1586
+ declare const onGroupRequestRejected$1: EventDefinition<GroupRequestRejectedEnvelope, "wix.social_groups.v2.group_request_rejected">;
1673
1587
 
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>;
1588
+ declare const approveGroupRequests: BuildRESTFunction<typeof approveGroupRequests$1>;
1589
+ declare const rejectGroupRequests: BuildRESTFunction<typeof rejectGroupRequests$1>;
1590
+ declare const listGroupRequests: BuildRESTFunction<typeof listGroupRequests$1>;
1591
+ declare const queryGroupRequests: BuildRESTFunction<typeof queryGroupRequests$1>;
1592
+ declare const onGroupRequestCreated: BuildEventDefinition<typeof onGroupRequestCreated$1>;
1593
+ declare const onGroupRequestApproved: BuildEventDefinition<typeof onGroupRequestApproved$1>;
1594
+ declare const onGroupRequestRejected: BuildEventDefinition<typeof onGroupRequestRejected$1>;
1689
1595
 
1690
1596
  declare const context$6_approveGroupRequests: typeof approveGroupRequests;
1691
1597
  declare const context$6_listGroupRequests: typeof listGroupRequests;
@@ -1901,58 +1807,15 @@ interface UnassignRoleOptions {
1901
1807
  siteMemberIds?: string[];
1902
1808
  }
1903
1809
 
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
- }
1810
+ declare function assignRole$1(httpClient: HttpClient): (groupId: string, memberIds: string[], role: GroupRole, options?: AssignRoleOptions) => Promise<AssignRoleResponse & AssignRoleResponseNonNullableFields>;
1811
+ declare function unassignRole$1(httpClient: HttpClient): (groupId: string, memberIds: string[], role: GroupRole, options?: UnassignRoleOptions) => Promise<UnassignRoleResponse & UnassignRoleResponseNonNullableFields>;
1812
+ declare const onGroupRoleAssigned$1: EventDefinition<GroupRoleAssignedEnvelope, "wix.social_groups.v2.group_role_assigned">;
1813
+ declare const onGroupRoleUnassigned$1: EventDefinition<GroupRoleUnassignedEnvelope, "wix.social_groups.v2.group_role_unassigned">;
1946
1814
 
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>;
1815
+ declare const assignRole: BuildRESTFunction<typeof assignRole$1>;
1816
+ declare const unassignRole: BuildRESTFunction<typeof unassignRole$1>;
1817
+ declare const onGroupRoleAssigned: BuildEventDefinition<typeof onGroupRoleAssigned$1>;
1818
+ declare const onGroupRoleUnassigned: BuildEventDefinition<typeof onGroupRoleUnassigned$1>;
1956
1819
 
1957
1820
  declare const context$5_assignRole: typeof assignRole;
1958
1821
  declare const context$5_onGroupRoleAssigned: typeof onGroupRoleAssigned;
@@ -2084,56 +1947,13 @@ interface CreateOrReplaceAllRulesOptions {
2084
1947
  rules?: GroupRule[];
2085
1948
  }
2086
1949
 
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;
1950
+ declare function listRules$1(httpClient: HttpClient): (groupId: string) => Promise<ListRulesResponse & ListRulesResponseNonNullableFields>;
1951
+ declare function createOrReplaceAllRules$1(httpClient: HttpClient): (groupId: string, options?: CreateOrReplaceAllRulesOptions) => Promise<CreateOrReplaceAllRulesResponse & CreateOrReplaceAllRulesResponseNonNullableFields>;
1952
+ declare const onGroupRulesUpdated$1: EventDefinition<GroupRulesUpdatedEnvelope, "wix.social_groups.v2.group_rules_updated">;
2122
1953
 
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>;
1954
+ declare const listRules: BuildRESTFunction<typeof listRules$1>;
1955
+ declare const createOrReplaceAllRules: BuildRESTFunction<typeof createOrReplaceAllRules$1>;
1956
+ declare const onGroupRulesUpdated: BuildEventDefinition<typeof onGroupRulesUpdated$1>;
2137
1957
 
2138
1958
  declare const context$4_createOrReplaceAllRules: typeof createOrReplaceAllRules;
2139
1959
  declare const context$4_listRules: typeof listRules;
@@ -2384,64 +2204,21 @@ interface JoinGroupRequestsQueryBuilder {
2384
2204
  find: () => Promise<JoinGroupRequestsQueryResult>;
2385
2205
  }
2386
2206
 
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">;
2207
+ declare function approveJoinGroupRequests$1(httpClient: HttpClient): (groupId: string, memberIds: string[], options?: ApproveJoinGroupRequestsOptions) => Promise<ApproveJoinGroupRequestsResponse & ApproveJoinGroupRequestsResponseNonNullableFields>;
2208
+ declare function rejectJoinGroupRequests$1(httpClient: HttpClient): (groupId: string, rejections: Rejection$2[]) => Promise<RejectJoinGroupRequestsResponse & RejectJoinGroupRequestsResponseNonNullableFields>;
2209
+ declare function listJoinGroupRequests$1(httpClient: HttpClient): (groupId: string, options?: ListJoinGroupRequestsOptions) => Promise<ListJoinGroupRequestsResponse & ListJoinGroupRequestsResponseNonNullableFields>;
2210
+ declare function queryJoinGroupRequests$1(httpClient: HttpClient): (groupId: string, options?: QueryJoinGroupRequestsOptions) => JoinGroupRequestsQueryBuilder;
2211
+ declare const onJoinGroupRequestCreated$1: EventDefinition<JoinGroupRequestCreatedEnvelope, "wix.social_groups.v2.join_group_request_created">;
2212
+ declare const onJoinGroupRequestApproved$1: EventDefinition<JoinGroupRequestApprovedEnvelope, "wix.social_groups.v2.join_group_request_approved">;
2213
+ declare const onJoinGroupRequestRejected$1: EventDefinition<JoinGroupRequestRejectedEnvelope, "wix.social_groups.v2.join_group_request_rejected">;
2437
2214
 
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>;
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>;
2445
2222
 
2446
2223
  declare const context$3_approveJoinGroupRequests: typeof approveJoinGroupRequests;
2447
2224
  declare const context$3_listJoinGroupRequests: typeof listJoinGroupRequests;
@@ -2547,46 +2324,13 @@ interface ListAnswersOptions {
2547
2324
  paging?: Paging$2;
2548
2325
  }
2549
2326
 
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>;
2327
+ declare function listMembershipQuestions$1(httpClient: HttpClient): (groupId: string) => Promise<ListMembershipQuestionsResponse & ListMembershipQuestionsResponseNonNullableFields>;
2328
+ declare function createOrReplaceAllMembershipQuestions$1(httpClient: HttpClient): (groupId: string, options?: CreateOrReplaceAllMembershipQuestionsOptions) => Promise<CreateOrReplaceAllMembershipQuestionsResponse & CreateOrReplaceAllMembershipQuestionsResponseNonNullableFields>;
2329
+ declare function listAnswers$1(httpClient: HttpClient): (groupId: string, options?: ListAnswersOptions) => Promise<ListAnswersResponse & ListAnswersResponseNonNullableFields>;
2586
2330
 
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>;
2331
+ declare const listMembershipQuestions: BuildRESTFunction<typeof listMembershipQuestions$1>;
2332
+ declare const createOrReplaceAllMembershipQuestions: BuildRESTFunction<typeof createOrReplaceAllMembershipQuestions$1>;
2333
+ declare const listAnswers: BuildRESTFunction<typeof listAnswers$1>;
2590
2334
 
2591
2335
  declare const context$2_createOrReplaceAllMembershipQuestions: typeof createOrReplaceAllMembershipQuestions;
2592
2336
  declare const context$2_listAnswers: typeof listAnswers;
@@ -3113,62 +2857,19 @@ interface QueryCreateRequestsOptions {
3113
2857
  query?: Query$1;
3114
2858
  }
3115
2859
 
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">;
2860
+ declare function approveCreateRequests$1(httpClient: HttpClient): (options?: ApproveCreateRequestsOptions) => Promise<ApproveCreateRequestsResponse & ApproveCreateRequestsResponseNonNullableFields>;
2861
+ declare function rejectCreateRequests$1(httpClient: HttpClient): (options?: RejectCreateRequestsOptions) => Promise<RejectCreateRequestsResponse & RejectCreateRequestsResponseNonNullableFields>;
2862
+ declare function listCreateRequests$1(httpClient: HttpClient): (options?: ListCreateRequestsOptions) => Promise<ListCreateRequestsResponse & ListCreateRequestsResponseNonNullableFields>;
2863
+ declare function queryCreateRequests$1(httpClient: HttpClient): (options?: QueryCreateRequestsOptions) => Promise<QueryCreateRequestsResponse & QueryCreateRequestsResponseNonNullableFields>;
2864
+ declare const onCreateRequestApproved$1: EventDefinition<CreateRequestApprovedEnvelope, "wix.social_groups.v3.create_request_approved">;
2865
+ declare const onCreateRequestRejected$1: EventDefinition<CreateRequestRejectedEnvelope, "wix.social_groups.v3.create_request_rejected">;
3165
2866
 
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>;
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>;
3172
2873
 
3173
2874
  declare const context$1_approveCreateRequests: typeof approveCreateRequests;
3174
2875
  declare const context$1_listCreateRequests: typeof listCreateRequests;
@@ -3426,49 +3127,6 @@ interface QueryJoinRequestsOptions {
3426
3127
  query?: Query;
3427
3128
  }
3428
3129
 
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
-
3472
3130
  declare function approveJoinRequests$1(httpClient: HttpClient): (groupId: string, options: ApproveJoinRequestsOptions) => Promise<ApproveJoinRequestsResponse & ApproveJoinRequestsResponseNonNullableFields>;
3473
3131
  declare function rejectJoinRequests$1(httpClient: HttpClient): (groupId: string, options?: RejectJoinRequestsOptions) => Promise<RejectJoinRequestsResponse & RejectJoinRequestsResponseNonNullableFields>;
3474
3132
  declare function listJoinRequests$1(httpClient: HttpClient): (groupId: string, options?: ListJoinRequestsOptions) => Promise<ListJoinRequestsResponse & ListJoinRequestsResponseNonNullableFields>;