@wix/groups 1.0.101 → 1.0.102
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/build/cjs/context.js +1 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.js +1 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/meta.js +1 -0
- package/build/cjs/meta.js.map +1 -0
- package/package.json +11 -11
- package/type-bundles/context.bundle.d.ts +622 -454
- package/type-bundles/index.bundle.d.ts +622 -454
|
@@ -1,39 +1,127 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
type HostModule<T, H extends Host> = {
|
|
2
|
+
__type: 'host';
|
|
3
|
+
create(host: H): T;
|
|
4
|
+
};
|
|
5
|
+
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
6
|
+
type Host<Environment = unknown> = {
|
|
7
|
+
channel: {
|
|
8
|
+
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
9
|
+
disconnect: () => void;
|
|
10
|
+
} | Promise<{
|
|
11
|
+
disconnect: () => void;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
environment?: Environment;
|
|
15
|
+
/**
|
|
16
|
+
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
17
|
+
*/
|
|
18
|
+
apiBaseUrl?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Possible data to be provided by every host, for cross cutting concerns
|
|
21
|
+
* like internationalization, billing, etc.
|
|
22
|
+
*/
|
|
23
|
+
essentials?: {
|
|
24
|
+
/**
|
|
25
|
+
* The language of the currently viewed session
|
|
26
|
+
*/
|
|
27
|
+
language?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The locale of the currently viewed session
|
|
30
|
+
*/
|
|
31
|
+
locale?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Any headers that should be passed through to the API requests
|
|
34
|
+
*/
|
|
35
|
+
passThroughHeaders?: Record<string, string>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
40
|
+
interface HttpClient {
|
|
41
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
42
|
fetchWithAuth: typeof fetch;
|
|
5
43
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
44
|
+
getActiveToken?: () => string | undefined;
|
|
6
45
|
}
|
|
7
|
-
type RequestOptionsFactory
|
|
8
|
-
type HttpResponse
|
|
46
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
47
|
+
type HttpResponse<T = any> = {
|
|
9
48
|
data: T;
|
|
10
49
|
status: number;
|
|
11
50
|
statusText: string;
|
|
12
51
|
headers: any;
|
|
13
52
|
request?: any;
|
|
14
53
|
};
|
|
15
|
-
type RequestOptions
|
|
54
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
16
55
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
17
56
|
url: string;
|
|
18
57
|
data?: Data;
|
|
19
58
|
params?: URLSearchParams;
|
|
20
|
-
} & APIMetadata
|
|
21
|
-
type APIMetadata
|
|
59
|
+
} & APIMetadata;
|
|
60
|
+
type APIMetadata = {
|
|
22
61
|
methodFqn?: string;
|
|
23
62
|
entityFqdn?: string;
|
|
24
63
|
packageName?: string;
|
|
25
64
|
};
|
|
26
|
-
type BuildRESTFunction
|
|
27
|
-
type EventDefinition$
|
|
65
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
66
|
+
type EventDefinition$8<Payload = unknown, Type extends string = string> = {
|
|
28
67
|
__type: 'event-definition';
|
|
29
68
|
type: Type;
|
|
30
69
|
isDomainEvent?: boolean;
|
|
31
70
|
transformations?: (envelope: unknown) => Payload;
|
|
32
71
|
__payload: Payload;
|
|
33
72
|
};
|
|
34
|
-
declare function EventDefinition$
|
|
35
|
-
type EventHandler$
|
|
36
|
-
type BuildEventDefinition$
|
|
73
|
+
declare function EventDefinition$8<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$8<Payload, Type>;
|
|
74
|
+
type EventHandler$8<T extends EventDefinition$8> = (payload: T['__payload']) => void | Promise<void>;
|
|
75
|
+
type BuildEventDefinition$8<T extends EventDefinition$8<any, string>> = (handler: EventHandler$8<T>) => void;
|
|
76
|
+
|
|
77
|
+
type ServicePluginMethodInput = {
|
|
78
|
+
request: any;
|
|
79
|
+
metadata: any;
|
|
80
|
+
};
|
|
81
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
82
|
+
type ServicePluginMethodMetadata = {
|
|
83
|
+
name: string;
|
|
84
|
+
primaryHttpMappingPath: string;
|
|
85
|
+
transformations: {
|
|
86
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
87
|
+
toREST: (...args: unknown[]) => unknown;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
91
|
+
__type: 'service-plugin-definition';
|
|
92
|
+
componentType: string;
|
|
93
|
+
methods: ServicePluginMethodMetadata[];
|
|
94
|
+
__contract: Contract;
|
|
95
|
+
};
|
|
96
|
+
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
97
|
+
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
98
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
99
|
+
|
|
100
|
+
type RequestContext = {
|
|
101
|
+
isSSR: boolean;
|
|
102
|
+
host: string;
|
|
103
|
+
protocol?: string;
|
|
104
|
+
};
|
|
105
|
+
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
106
|
+
/**
|
|
107
|
+
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
108
|
+
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
109
|
+
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
110
|
+
*/
|
|
111
|
+
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
112
|
+
type AmbassadorRequestOptions<T = any> = {
|
|
113
|
+
_?: T;
|
|
114
|
+
url?: string;
|
|
115
|
+
method?: Method;
|
|
116
|
+
params?: any;
|
|
117
|
+
data?: any;
|
|
118
|
+
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
119
|
+
};
|
|
120
|
+
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
121
|
+
__isAmbassador: boolean;
|
|
122
|
+
};
|
|
123
|
+
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
124
|
+
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
37
125
|
|
|
38
126
|
declare global {
|
|
39
127
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -42,6 +130,284 @@ declare global {
|
|
|
42
130
|
}
|
|
43
131
|
}
|
|
44
132
|
|
|
133
|
+
declare const emptyObjectSymbol: unique symbol;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
Represents a strictly empty plain object, the `{}` value.
|
|
137
|
+
|
|
138
|
+
When you annotate something as the type `{}`, it can be anything except `null` and `undefined`. This means that you cannot use `{}` to represent an empty plain object ([read more](https://stackoverflow.com/questions/47339869/typescript-empty-object-and-any-difference/52193484#52193484)).
|
|
139
|
+
|
|
140
|
+
@example
|
|
141
|
+
```
|
|
142
|
+
import type {EmptyObject} from 'type-fest';
|
|
143
|
+
|
|
144
|
+
// The following illustrates the problem with `{}`.
|
|
145
|
+
const foo1: {} = {}; // Pass
|
|
146
|
+
const foo2: {} = []; // Pass
|
|
147
|
+
const foo3: {} = 42; // Pass
|
|
148
|
+
const foo4: {} = {a: 1}; // Pass
|
|
149
|
+
|
|
150
|
+
// With `EmptyObject` only the first case is valid.
|
|
151
|
+
const bar1: EmptyObject = {}; // Pass
|
|
152
|
+
const bar2: EmptyObject = 42; // Fail
|
|
153
|
+
const bar3: EmptyObject = []; // Fail
|
|
154
|
+
const bar4: EmptyObject = {a: 1}; // Fail
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
|
|
158
|
+
|
|
159
|
+
@category Object
|
|
160
|
+
*/
|
|
161
|
+
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
Returns a boolean for whether the two given types are equal.
|
|
165
|
+
|
|
166
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
167
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
168
|
+
|
|
169
|
+
Use-cases:
|
|
170
|
+
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
171
|
+
|
|
172
|
+
@example
|
|
173
|
+
```
|
|
174
|
+
import type {IsEqual} from 'type-fest';
|
|
175
|
+
|
|
176
|
+
// This type returns a boolean for whether the given array includes the given item.
|
|
177
|
+
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
178
|
+
type Includes<Value extends readonly any[], Item> =
|
|
179
|
+
Value extends readonly [Value[0], ...infer rest]
|
|
180
|
+
? IsEqual<Value[0], Item> extends true
|
|
181
|
+
? true
|
|
182
|
+
: Includes<rest, Item>
|
|
183
|
+
: false;
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
@category Type Guard
|
|
187
|
+
@category Utilities
|
|
188
|
+
*/
|
|
189
|
+
type IsEqual<A, B> =
|
|
190
|
+
(<G>() => G extends A ? 1 : 2) extends
|
|
191
|
+
(<G>() => G extends B ? 1 : 2)
|
|
192
|
+
? true
|
|
193
|
+
: false;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
Filter out keys from an object.
|
|
197
|
+
|
|
198
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
199
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
200
|
+
Returns `Key` otherwise.
|
|
201
|
+
|
|
202
|
+
@example
|
|
203
|
+
```
|
|
204
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
205
|
+
//=> never
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
@example
|
|
209
|
+
```
|
|
210
|
+
type Filtered = Filter<'bar', string>;
|
|
211
|
+
//=> never
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
@example
|
|
215
|
+
```
|
|
216
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
217
|
+
//=> 'bar'
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
@see {Except}
|
|
221
|
+
*/
|
|
222
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
223
|
+
|
|
224
|
+
type ExceptOptions = {
|
|
225
|
+
/**
|
|
226
|
+
Disallow assigning non-specified properties.
|
|
227
|
+
|
|
228
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
229
|
+
|
|
230
|
+
@default false
|
|
231
|
+
*/
|
|
232
|
+
requireExactProps?: boolean;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
Create a type from an object type without certain keys.
|
|
237
|
+
|
|
238
|
+
We recommend setting the `requireExactProps` option to `true`.
|
|
239
|
+
|
|
240
|
+
This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
|
|
241
|
+
|
|
242
|
+
This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
|
|
243
|
+
|
|
244
|
+
@example
|
|
245
|
+
```
|
|
246
|
+
import type {Except} from 'type-fest';
|
|
247
|
+
|
|
248
|
+
type Foo = {
|
|
249
|
+
a: number;
|
|
250
|
+
b: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
type FooWithoutA = Except<Foo, 'a'>;
|
|
254
|
+
//=> {b: string}
|
|
255
|
+
|
|
256
|
+
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
257
|
+
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
258
|
+
|
|
259
|
+
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
260
|
+
//=> {a: number} & Partial<Record<"b", never>>
|
|
261
|
+
|
|
262
|
+
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
263
|
+
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
@category Object
|
|
267
|
+
*/
|
|
268
|
+
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
269
|
+
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
270
|
+
} & (Options['requireExactProps'] extends true
|
|
271
|
+
? Partial<Record<KeysType, never>>
|
|
272
|
+
: {});
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
276
|
+
|
|
277
|
+
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
278
|
+
|
|
279
|
+
@example
|
|
280
|
+
```
|
|
281
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
282
|
+
|
|
283
|
+
interface Example {
|
|
284
|
+
a: string;
|
|
285
|
+
b: string | number;
|
|
286
|
+
c?: string;
|
|
287
|
+
d: {};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
291
|
+
//=> 'a'
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
295
|
+
|
|
296
|
+
@example
|
|
297
|
+
```
|
|
298
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
299
|
+
|
|
300
|
+
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
301
|
+
//=> 'a' | 'c'
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
@category Object
|
|
305
|
+
*/
|
|
306
|
+
type ConditionalKeys<Base, Condition> = NonNullable<
|
|
307
|
+
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
308
|
+
{
|
|
309
|
+
// Map through all the keys of the given base type.
|
|
310
|
+
[Key in keyof Base]:
|
|
311
|
+
// Pick only keys with types extending the given `Condition` type.
|
|
312
|
+
Base[Key] extends Condition
|
|
313
|
+
// Retain this key since the condition passes.
|
|
314
|
+
? Key
|
|
315
|
+
// Discard this key since the condition fails.
|
|
316
|
+
: never;
|
|
317
|
+
|
|
318
|
+
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
319
|
+
}[keyof Base]
|
|
320
|
+
>;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
Exclude keys from a shape that matches the given `Condition`.
|
|
324
|
+
|
|
325
|
+
This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
|
|
326
|
+
|
|
327
|
+
@example
|
|
328
|
+
```
|
|
329
|
+
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
330
|
+
|
|
331
|
+
class Awesome {
|
|
332
|
+
name: string;
|
|
333
|
+
successes: number;
|
|
334
|
+
failures: bigint;
|
|
335
|
+
|
|
336
|
+
run() {}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
340
|
+
//=> {run: () => void}
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
@example
|
|
344
|
+
```
|
|
345
|
+
import type {ConditionalExcept} from 'type-fest';
|
|
346
|
+
|
|
347
|
+
interface Example {
|
|
348
|
+
a: string;
|
|
349
|
+
b: string | number;
|
|
350
|
+
c: () => void;
|
|
351
|
+
d: {};
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
355
|
+
//=> {b: string | number; c: () => void; d: {}}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
@category Object
|
|
359
|
+
*/
|
|
360
|
+
type ConditionalExcept<Base, Condition> = Except<
|
|
361
|
+
Base,
|
|
362
|
+
ConditionalKeys<Base, Condition>
|
|
363
|
+
>;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Descriptors are objects that describe the API of a module, and the module
|
|
367
|
+
* can either be a REST module or a host module.
|
|
368
|
+
* This type is recursive, so it can describe nested modules.
|
|
369
|
+
*/
|
|
370
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition$8<any> | ServicePluginDefinition<any> | {
|
|
371
|
+
[key: string]: Descriptors | PublicMetadata | any;
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
375
|
+
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
376
|
+
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
377
|
+
* do not match the given host (as they will not work with the given host).
|
|
378
|
+
*/
|
|
379
|
+
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
380
|
+
done: T;
|
|
381
|
+
recurse: T extends {
|
|
382
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
383
|
+
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition$8<any> ? BuildEventDefinition$8<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
384
|
+
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
385
|
+
-1,
|
|
386
|
+
0,
|
|
387
|
+
1,
|
|
388
|
+
2,
|
|
389
|
+
3,
|
|
390
|
+
4,
|
|
391
|
+
5
|
|
392
|
+
][Depth]> : never;
|
|
393
|
+
}, EmptyObject>;
|
|
394
|
+
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
395
|
+
type PublicMetadata = {
|
|
396
|
+
PACKAGE_NAME?: string;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
declare global {
|
|
400
|
+
interface ContextualClient {
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* A type used to create concerete types from SDK descriptors in
|
|
405
|
+
* case a contextual client is available.
|
|
406
|
+
*/
|
|
407
|
+
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
408
|
+
host: Host;
|
|
409
|
+
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
410
|
+
|
|
45
411
|
interface Group$2 {
|
|
46
412
|
/**
|
|
47
413
|
* Group ID.
|
|
@@ -865,7 +1231,7 @@ interface GroupsQueryBuilder {
|
|
|
865
1231
|
find: () => Promise<GroupsQueryResult>;
|
|
866
1232
|
}
|
|
867
1233
|
|
|
868
|
-
declare function createGroup$1(httpClient: HttpClient
|
|
1234
|
+
declare function createGroup$1(httpClient: HttpClient): CreateGroupSignature;
|
|
869
1235
|
interface CreateGroupSignature {
|
|
870
1236
|
/**
|
|
871
1237
|
* Creates a group.
|
|
@@ -880,7 +1246,7 @@ interface CreateGroupSignature {
|
|
|
880
1246
|
*/
|
|
881
1247
|
(group: Group$2, options?: CreateGroupOptions | undefined): Promise<Group$2 & GroupNonNullableFields$2>;
|
|
882
1248
|
}
|
|
883
|
-
declare function updateGroup$1(httpClient: HttpClient
|
|
1249
|
+
declare function updateGroup$1(httpClient: HttpClient): UpdateGroupSignature;
|
|
884
1250
|
interface UpdateGroupSignature {
|
|
885
1251
|
/**
|
|
886
1252
|
* Updates a group.
|
|
@@ -898,7 +1264,7 @@ interface UpdateGroupSignature {
|
|
|
898
1264
|
*/
|
|
899
1265
|
(_id: string | null, group: UpdateGroup, options?: UpdateGroupOptions | undefined): Promise<Group$2 & GroupNonNullableFields$2>;
|
|
900
1266
|
}
|
|
901
|
-
declare function deleteGroup$1(httpClient: HttpClient
|
|
1267
|
+
declare function deleteGroup$1(httpClient: HttpClient): DeleteGroupSignature;
|
|
902
1268
|
interface DeleteGroupSignature {
|
|
903
1269
|
/**
|
|
904
1270
|
* Deletes a group.
|
|
@@ -910,7 +1276,7 @@ interface DeleteGroupSignature {
|
|
|
910
1276
|
*/
|
|
911
1277
|
(groupId: string): Promise<DeleteGroupResponse & DeleteGroupResponseNonNullableFields>;
|
|
912
1278
|
}
|
|
913
|
-
declare function getGroup$1(httpClient: HttpClient
|
|
1279
|
+
declare function getGroup$1(httpClient: HttpClient): GetGroupSignature;
|
|
914
1280
|
interface GetGroupSignature {
|
|
915
1281
|
/**
|
|
916
1282
|
* Gets a group by ID.
|
|
@@ -924,7 +1290,7 @@ interface GetGroupSignature {
|
|
|
924
1290
|
*/
|
|
925
1291
|
(groupId: string, options?: GetGroupOptions | undefined): Promise<Group$2 & GroupNonNullableFields$2>;
|
|
926
1292
|
}
|
|
927
|
-
declare function getGroupBySlug$1(httpClient: HttpClient
|
|
1293
|
+
declare function getGroupBySlug$1(httpClient: HttpClient): GetGroupBySlugSignature;
|
|
928
1294
|
interface GetGroupBySlugSignature {
|
|
929
1295
|
/**
|
|
930
1296
|
* Gets a group by slug.
|
|
@@ -937,7 +1303,7 @@ interface GetGroupBySlugSignature {
|
|
|
937
1303
|
*/
|
|
938
1304
|
(slug: string, options?: GetGroupBySlugOptions | undefined): Promise<GetGroupBySlugResponse & GetGroupBySlugResponseNonNullableFields>;
|
|
939
1305
|
}
|
|
940
|
-
declare function listGroups$1(httpClient: HttpClient
|
|
1306
|
+
declare function listGroups$1(httpClient: HttpClient): ListGroupsSignature;
|
|
941
1307
|
interface ListGroupsSignature {
|
|
942
1308
|
/**
|
|
943
1309
|
* Lists groups.
|
|
@@ -953,7 +1319,7 @@ interface ListGroupsSignature {
|
|
|
953
1319
|
*/
|
|
954
1320
|
(options?: ListGroupsOptions | undefined): Promise<ListGroupsResponse & ListGroupsResponseNonNullableFields>;
|
|
955
1321
|
}
|
|
956
|
-
declare function queryGroups$1(httpClient: HttpClient
|
|
1322
|
+
declare function queryGroups$1(httpClient: HttpClient): QueryGroupsSignature;
|
|
957
1323
|
interface QueryGroupsSignature {
|
|
958
1324
|
/**
|
|
959
1325
|
* Creates a query to retrieve a list of groups.
|
|
@@ -965,21 +1331,39 @@ interface QueryGroupsSignature {
|
|
|
965
1331
|
*/
|
|
966
1332
|
(options?: QueryGroupsOptions | undefined): GroupsQueryBuilder;
|
|
967
1333
|
}
|
|
968
|
-
declare const onGroupCreated$1: EventDefinition$
|
|
969
|
-
declare const onGroupUpdated$1: EventDefinition$
|
|
970
|
-
declare const onGroupCoverChanged$1: EventDefinition$
|
|
971
|
-
declare const onGroupDescriptionChanged$1: EventDefinition$
|
|
972
|
-
declare const onGroupDeleted$1: EventDefinition$
|
|
1334
|
+
declare const onGroupCreated$1: EventDefinition$8<GroupCreatedEnvelope, "wix.social_groups.v2.group_created">;
|
|
1335
|
+
declare const onGroupUpdated$1: EventDefinition$8<GroupUpdatedEnvelope, "wix.social_groups.v2.group_updated">;
|
|
1336
|
+
declare const onGroupCoverChanged$1: EventDefinition$8<GroupCoverChangedEnvelope, "wix.social_groups.v2.group_group_cover_changed">;
|
|
1337
|
+
declare const onGroupDescriptionChanged$1: EventDefinition$8<GroupDescriptionChangedEnvelope, "wix.social_groups.v2.group_group_description_changed">;
|
|
1338
|
+
declare const onGroupDeleted$1: EventDefinition$8<GroupDeletedEnvelope, "wix.social_groups.v2.group_deleted">;
|
|
1339
|
+
|
|
1340
|
+
type EventDefinition$7<Payload = unknown, Type extends string = string> = {
|
|
1341
|
+
__type: 'event-definition';
|
|
1342
|
+
type: Type;
|
|
1343
|
+
isDomainEvent?: boolean;
|
|
1344
|
+
transformations?: (envelope: unknown) => Payload;
|
|
1345
|
+
__payload: Payload;
|
|
1346
|
+
};
|
|
1347
|
+
declare function EventDefinition$7<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$7<Payload, Type>;
|
|
1348
|
+
type EventHandler$7<T extends EventDefinition$7> = (payload: T['__payload']) => void | Promise<void>;
|
|
1349
|
+
type BuildEventDefinition$7<T extends EventDefinition$7<any, string>> = (handler: EventHandler$7<T>) => void;
|
|
1350
|
+
|
|
1351
|
+
declare global {
|
|
1352
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1353
|
+
interface SymbolConstructor {
|
|
1354
|
+
readonly observable: symbol;
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
973
1357
|
|
|
974
1358
|
declare function createEventModule$7<T extends EventDefinition$7<any, string>>(eventDefinition: T): BuildEventDefinition$7<T> & T;
|
|
975
1359
|
|
|
976
|
-
declare const createGroup: BuildRESTFunction
|
|
977
|
-
declare const updateGroup: BuildRESTFunction
|
|
978
|
-
declare const deleteGroup: BuildRESTFunction
|
|
979
|
-
declare const getGroup: BuildRESTFunction
|
|
980
|
-
declare const getGroupBySlug: BuildRESTFunction
|
|
981
|
-
declare const listGroups: BuildRESTFunction
|
|
982
|
-
declare const queryGroups: BuildRESTFunction
|
|
1360
|
+
declare const createGroup: MaybeContext<BuildRESTFunction<typeof createGroup$1> & typeof createGroup$1>;
|
|
1361
|
+
declare const updateGroup: MaybeContext<BuildRESTFunction<typeof updateGroup$1> & typeof updateGroup$1>;
|
|
1362
|
+
declare const deleteGroup: MaybeContext<BuildRESTFunction<typeof deleteGroup$1> & typeof deleteGroup$1>;
|
|
1363
|
+
declare const getGroup: MaybeContext<BuildRESTFunction<typeof getGroup$1> & typeof getGroup$1>;
|
|
1364
|
+
declare const getGroupBySlug: MaybeContext<BuildRESTFunction<typeof getGroupBySlug$1> & typeof getGroupBySlug$1>;
|
|
1365
|
+
declare const listGroups: MaybeContext<BuildRESTFunction<typeof listGroups$1> & typeof listGroups$1>;
|
|
1366
|
+
declare const queryGroups: MaybeContext<BuildRESTFunction<typeof queryGroups$1> & typeof queryGroups$1>;
|
|
983
1367
|
|
|
984
1368
|
type _publicOnGroupCreatedType = typeof onGroupCreated$1;
|
|
985
1369
|
/**
|
|
@@ -1089,50 +1473,6 @@ declare namespace context$8 {
|
|
|
1089
1473
|
export { type AccessRestriction$2 as AccessRestriction, type AccessRestrictionDataOneOf$2 as AccessRestrictionDataOneOf, type ActionEvent$7 as ActionEvent, AllowPolicy$2 as AllowPolicy, type context$8_BMFeatures as BMFeatures, context$8_BMFeaturesBMFeatures as BMFeaturesBMFeatures, type BaseEventMetadata$7 as BaseEventMetadata, context$8_ContentType as ContentType, type CoverImage$2 as CoverImage, type context$8_CreateGroupOptions as CreateGroupOptions, type context$8_CreateGroupRequest as CreateGroupRequest, type context$8_CreateGroupResponse as CreateGroupResponse, type context$8_CreateGroupResponseNonNullableFields as CreateGroupResponseNonNullableFields, type context$8_DeleteGroupRequest as DeleteGroupRequest, type context$8_DeleteGroupResponse as DeleteGroupResponse, type context$8_DeleteGroupResponseNonNullableFields as DeleteGroupResponseNonNullableFields, type DomainEvent$7 as DomainEvent, type DomainEventBodyOneOf$7 as DomainEventBodyOneOf, type EntityCreatedEvent$7 as EntityCreatedEvent, type EntityDeletedEvent$7 as EntityDeletedEvent, type EntityUpdatedEvent$7 as EntityUpdatedEvent, type EventMetadata$7 as EventMetadata, type Events$2 as Events, type context$8_GetGroupBMFeaturesRequest as GetGroupBMFeaturesRequest, type context$8_GetGroupBMFeaturesResponse as GetGroupBMFeaturesResponse, type context$8_GetGroupBySlugOptions as GetGroupBySlugOptions, type context$8_GetGroupBySlugRequest as GetGroupBySlugRequest, type context$8_GetGroupBySlugResponse as GetGroupBySlugResponse, type context$8_GetGroupBySlugResponseNonNullableFields as GetGroupBySlugResponseNonNullableFields, type context$8_GetGroupMembersGroupIdsRequest as GetGroupMembersGroupIdsRequest, type context$8_GetGroupMembersGroupIdsResponse as GetGroupMembersGroupIdsResponse, type context$8_GetGroupOptions as GetGroupOptions, type context$8_GetGroupRequest as GetGroupRequest, type context$8_GetGroupResponse as GetGroupResponse, type context$8_GetGroupResponseNonNullableFields as GetGroupResponseNonNullableFields, type Group$2 as Group, type context$8_GroupCoverChanged as GroupCoverChanged, type context$8_GroupCoverChangedEnvelope as GroupCoverChangedEnvelope, type context$8_GroupCreatedEnvelope as GroupCreatedEnvelope, type context$8_GroupDeletedEnvelope as GroupDeletedEnvelope, type context$8_GroupDescriptionChanged as GroupDescriptionChanged, type context$8_GroupDescriptionChangedEnvelope as GroupDescriptionChangedEnvelope, type GroupDetails$2 as GroupDetails, type GroupDetailsPosition$2 as GroupDetailsPosition, type context$8_GroupIntegrationsData as GroupIntegrationsData, type GroupNonNullableFields$2 as GroupNonNullableFields, type context$8_GroupPermissions as GroupPermissions, type GroupSettings$2 as GroupSettings, type context$8_GroupUpdatedEnvelope as GroupUpdatedEnvelope, type context$8_GroupWithMsId as GroupWithMsId, type context$8_GroupsQueryBuilder as GroupsQueryBuilder, type context$8_GroupsQueryResult as GroupsQueryResult, type IdentificationData$7 as IdentificationData, type IdentificationDataIdOneOf$7 as IdentificationDataIdOneOf, type Identity$2 as Identity, IdentityType$2 as IdentityType, type Image$2 as Image, type context$8_ListGroupIntegrationsDataRequest as ListGroupIntegrationsDataRequest, type context$8_ListGroupIntegrationsDataResponse as ListGroupIntegrationsDataResponse, type context$8_ListGroupsByUserIdRequest as ListGroupsByUserIdRequest, type context$8_ListGroupsByUserIdResponse as ListGroupsByUserIdResponse, type context$8_ListGroupsOptions as ListGroupsOptions, type context$8_ListGroupsRequest as ListGroupsRequest, type context$8_ListGroupsResponse as ListGroupsResponse, type context$8_ListGroupsResponseNonNullableFields as ListGroupsResponseNonNullableFields, type Logo$2 as Logo, MembershipStatus$1 as MembershipStatus, type MessageEnvelope$7 as MessageEnvelope, type OnboardingStepSettings$2 as OnboardingStepSettings, type Paging$6 as Paging, type PagingMetadata$6 as PagingMetadata, type Position$2 as Position, PrivacyStatus$2 as PrivacyStatus, type Query$5 as Query, type context$8_QueryGroupsByMembershipRequest as QueryGroupsByMembershipRequest, type context$8_QueryGroupsByMembershipResponse as QueryGroupsByMembershipResponse, type context$8_QueryGroupsOptions as QueryGroupsOptions, type context$8_QueryGroupsRequest as QueryGroupsRequest, type context$8_QueryGroupsResponse as QueryGroupsResponse, type context$8_QueryGroupsResponseNonNullableFields as QueryGroupsResponseNonNullableFields, type context$8_QueryJoinedGroupsRequest as QueryJoinedGroupsRequest, type context$8_QueryJoinedGroupsResponse as QueryJoinedGroupsResponse, type RestoreInfo$7 as RestoreInfo, SortOrder$5 as SortOrder, type Sorting$5 as Sorting, StepKey$2 as StepKey, Type$2 as Type, type context$8_UpdateGroup as UpdateGroup, type context$8_UpdateGroupOptions as UpdateGroupOptions, type context$8_UpdateGroupRequest as UpdateGroupRequest, type context$8_UpdateGroupResponse as UpdateGroupResponse, type context$8_UpdateGroupResponseNonNullableFields as UpdateGroupResponseNonNullableFields, WebhookIdentityType$7 as WebhookIdentityType, type context$8__publicOnGroupCoverChangedType as _publicOnGroupCoverChangedType, type context$8__publicOnGroupCreatedType as _publicOnGroupCreatedType, type context$8__publicOnGroupDeletedType as _publicOnGroupDeletedType, type context$8__publicOnGroupDescriptionChangedType as _publicOnGroupDescriptionChangedType, type context$8__publicOnGroupUpdatedType as _publicOnGroupUpdatedType, context$8_createGroup as createGroup, context$8_deleteGroup as deleteGroup, context$8_getGroup as getGroup, context$8_getGroupBySlug as getGroupBySlug, context$8_listGroups as listGroups, context$8_onGroupCoverChanged as onGroupCoverChanged, context$8_onGroupCreated as onGroupCreated, context$8_onGroupDeleted as onGroupDeleted, context$8_onGroupDescriptionChanged as onGroupDescriptionChanged, context$8_onGroupUpdated as onGroupUpdated, onGroupCoverChanged$1 as publicOnGroupCoverChanged, onGroupCreated$1 as publicOnGroupCreated, onGroupDeleted$1 as publicOnGroupDeleted, onGroupDescriptionChanged$1 as publicOnGroupDescriptionChanged, onGroupUpdated$1 as publicOnGroupUpdated, context$8_queryGroups as queryGroups, context$8_updateGroup as updateGroup };
|
|
1090
1474
|
}
|
|
1091
1475
|
|
|
1092
|
-
type RESTFunctionDescriptor$7<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$7) => T;
|
|
1093
|
-
interface HttpClient$7 {
|
|
1094
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$7<TResponse, TData>): Promise<HttpResponse$7<TResponse>>;
|
|
1095
|
-
fetchWithAuth: typeof fetch;
|
|
1096
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
1097
|
-
}
|
|
1098
|
-
type RequestOptionsFactory$7<TResponse = any, TData = any> = (context: any) => RequestOptions$7<TResponse, TData>;
|
|
1099
|
-
type HttpResponse$7<T = any> = {
|
|
1100
|
-
data: T;
|
|
1101
|
-
status: number;
|
|
1102
|
-
statusText: string;
|
|
1103
|
-
headers: any;
|
|
1104
|
-
request?: any;
|
|
1105
|
-
};
|
|
1106
|
-
type RequestOptions$7<_TResponse = any, Data = any> = {
|
|
1107
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1108
|
-
url: string;
|
|
1109
|
-
data?: Data;
|
|
1110
|
-
params?: URLSearchParams;
|
|
1111
|
-
} & APIMetadata$7;
|
|
1112
|
-
type APIMetadata$7 = {
|
|
1113
|
-
methodFqn?: string;
|
|
1114
|
-
entityFqdn?: string;
|
|
1115
|
-
packageName?: string;
|
|
1116
|
-
};
|
|
1117
|
-
type BuildRESTFunction$7<T extends RESTFunctionDescriptor$7> = T extends RESTFunctionDescriptor$7<infer U> ? U : never;
|
|
1118
|
-
type EventDefinition$6<Payload = unknown, Type extends string = string> = {
|
|
1119
|
-
__type: 'event-definition';
|
|
1120
|
-
type: Type;
|
|
1121
|
-
isDomainEvent?: boolean;
|
|
1122
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1123
|
-
__payload: Payload;
|
|
1124
|
-
};
|
|
1125
|
-
declare function EventDefinition$6<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$6<Payload, Type>;
|
|
1126
|
-
type EventHandler$6<T extends EventDefinition$6> = (payload: T['__payload']) => void | Promise<void>;
|
|
1127
|
-
type BuildEventDefinition$6<T extends EventDefinition$6<any, string>> = (handler: EventHandler$6<T>) => void;
|
|
1128
|
-
|
|
1129
|
-
declare global {
|
|
1130
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1131
|
-
interface SymbolConstructor {
|
|
1132
|
-
readonly observable: symbol;
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
1476
|
interface GroupMember$1 {
|
|
1137
1477
|
/**
|
|
1138
1478
|
* @internal
|
|
@@ -1712,7 +2052,7 @@ interface QueryMembershipsOptions {
|
|
|
1712
2052
|
query?: Query$4;
|
|
1713
2053
|
}
|
|
1714
2054
|
|
|
1715
|
-
declare function addGroupMembers$1(httpClient: HttpClient
|
|
2055
|
+
declare function addGroupMembers$1(httpClient: HttpClient): AddGroupMembersSignature;
|
|
1716
2056
|
interface AddGroupMembersSignature {
|
|
1717
2057
|
/**
|
|
1718
2058
|
* Adds site members to a group.
|
|
@@ -1733,7 +2073,7 @@ interface AddGroupMembersSignature {
|
|
|
1733
2073
|
*/
|
|
1734
2074
|
(groupId: string, memberIds: string[], options?: AddGroupMembersOptions | undefined): Promise<AddGroupMembersResponse & AddGroupMembersResponseNonNullableFields>;
|
|
1735
2075
|
}
|
|
1736
|
-
declare function removeGroupMembers$1(httpClient: HttpClient
|
|
2076
|
+
declare function removeGroupMembers$1(httpClient: HttpClient): RemoveGroupMembersSignature;
|
|
1737
2077
|
interface RemoveGroupMembersSignature {
|
|
1738
2078
|
/**
|
|
1739
2079
|
* Removes members from a group.
|
|
@@ -1748,7 +2088,7 @@ interface RemoveGroupMembersSignature {
|
|
|
1748
2088
|
*/
|
|
1749
2089
|
(groupId: string, memberIds: string[], options?: RemoveGroupMembersOptions | undefined): Promise<void>;
|
|
1750
2090
|
}
|
|
1751
|
-
declare function listGroupMembers$1(httpClient: HttpClient
|
|
2091
|
+
declare function listGroupMembers$1(httpClient: HttpClient): ListGroupMembersSignature;
|
|
1752
2092
|
interface ListGroupMembersSignature {
|
|
1753
2093
|
/**
|
|
1754
2094
|
* Lists all members of a group.
|
|
@@ -1765,7 +2105,7 @@ interface ListGroupMembersSignature {
|
|
|
1765
2105
|
*/
|
|
1766
2106
|
(groupId: string, options?: ListGroupMembersOptions | undefined): Promise<ListGroupMembersResponse & ListGroupMembersResponseNonNullableFields>;
|
|
1767
2107
|
}
|
|
1768
|
-
declare function queryGroupMembers$1(httpClient: HttpClient
|
|
2108
|
+
declare function queryGroupMembers$1(httpClient: HttpClient): QueryGroupMembersSignature;
|
|
1769
2109
|
interface QueryGroupMembersSignature {
|
|
1770
2110
|
/**
|
|
1771
2111
|
* Retrieves a list of up to 100 group members, given the provided paging, sorting and filtering.
|
|
@@ -1790,7 +2130,7 @@ interface QueryGroupMembersSignature {
|
|
|
1790
2130
|
*/
|
|
1791
2131
|
(groupId: string): MembersQueryBuilder;
|
|
1792
2132
|
}
|
|
1793
|
-
declare function listMemberships$1(httpClient: HttpClient
|
|
2133
|
+
declare function listMemberships$1(httpClient: HttpClient): ListMembershipsSignature;
|
|
1794
2134
|
interface ListMembershipsSignature {
|
|
1795
2135
|
/**
|
|
1796
2136
|
* Lists all group memberships of a site member.
|
|
@@ -1807,7 +2147,7 @@ interface ListMembershipsSignature {
|
|
|
1807
2147
|
*/
|
|
1808
2148
|
(memberId: string | null, options?: ListMembershipsOptions | undefined): Promise<ListMembershipsResponse & ListMembershipsResponseNonNullableFields>;
|
|
1809
2149
|
}
|
|
1810
|
-
declare function queryMemberships$1(httpClient: HttpClient
|
|
2150
|
+
declare function queryMemberships$1(httpClient: HttpClient): QueryMembershipsSignature;
|
|
1811
2151
|
interface QueryMembershipsSignature {
|
|
1812
2152
|
/**
|
|
1813
2153
|
* Retrieves a list of up to 100 members and their membership status, given the provided paging and filtering.
|
|
@@ -1825,17 +2165,35 @@ interface QueryMembershipsSignature {
|
|
|
1825
2165
|
*/
|
|
1826
2166
|
(memberId: string | null, options?: QueryMembershipsOptions | undefined): Promise<QueryMembershipsResponse & QueryMembershipsResponseNonNullableFields>;
|
|
1827
2167
|
}
|
|
1828
|
-
declare const onGroupMemberAdded$1: EventDefinition$
|
|
1829
|
-
declare const onGroupMemberRemoved$1: EventDefinition$
|
|
2168
|
+
declare const onGroupMemberAdded$1: EventDefinition$8<GroupMemberAddedEnvelope, "wix.social_groups.v2.group_member_added">;
|
|
2169
|
+
declare const onGroupMemberRemoved$1: EventDefinition$8<GroupMemberRemovedEnvelope, "wix.social_groups.v2.group_member_removed">;
|
|
2170
|
+
|
|
2171
|
+
type EventDefinition$6<Payload = unknown, Type extends string = string> = {
|
|
2172
|
+
__type: 'event-definition';
|
|
2173
|
+
type: Type;
|
|
2174
|
+
isDomainEvent?: boolean;
|
|
2175
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2176
|
+
__payload: Payload;
|
|
2177
|
+
};
|
|
2178
|
+
declare function EventDefinition$6<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$6<Payload, Type>;
|
|
2179
|
+
type EventHandler$6<T extends EventDefinition$6> = (payload: T['__payload']) => void | Promise<void>;
|
|
2180
|
+
type BuildEventDefinition$6<T extends EventDefinition$6<any, string>> = (handler: EventHandler$6<T>) => void;
|
|
2181
|
+
|
|
2182
|
+
declare global {
|
|
2183
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2184
|
+
interface SymbolConstructor {
|
|
2185
|
+
readonly observable: symbol;
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
1830
2188
|
|
|
1831
2189
|
declare function createEventModule$6<T extends EventDefinition$6<any, string>>(eventDefinition: T): BuildEventDefinition$6<T> & T;
|
|
1832
2190
|
|
|
1833
|
-
declare const addGroupMembers: BuildRESTFunction
|
|
1834
|
-
declare const removeGroupMembers: BuildRESTFunction
|
|
1835
|
-
declare const listGroupMembers: BuildRESTFunction
|
|
1836
|
-
declare const queryGroupMembers: BuildRESTFunction
|
|
1837
|
-
declare const listMemberships: BuildRESTFunction
|
|
1838
|
-
declare const queryMemberships: BuildRESTFunction
|
|
2191
|
+
declare const addGroupMembers: MaybeContext<BuildRESTFunction<typeof addGroupMembers$1> & typeof addGroupMembers$1>;
|
|
2192
|
+
declare const removeGroupMembers: MaybeContext<BuildRESTFunction<typeof removeGroupMembers$1> & typeof removeGroupMembers$1>;
|
|
2193
|
+
declare const listGroupMembers: MaybeContext<BuildRESTFunction<typeof listGroupMembers$1> & typeof listGroupMembers$1>;
|
|
2194
|
+
declare const queryGroupMembers: MaybeContext<BuildRESTFunction<typeof queryGroupMembers$1> & typeof queryGroupMembers$1>;
|
|
2195
|
+
declare const listMemberships: MaybeContext<BuildRESTFunction<typeof listMemberships$1> & typeof listMemberships$1>;
|
|
2196
|
+
declare const queryMemberships: MaybeContext<BuildRESTFunction<typeof queryMemberships$1> & typeof queryMemberships$1>;
|
|
1839
2197
|
|
|
1840
2198
|
type _publicOnGroupMemberAddedType = typeof onGroupMemberAdded$1;
|
|
1841
2199
|
/**
|
|
@@ -1903,50 +2261,6 @@ declare namespace context$7 {
|
|
|
1903
2261
|
export { type ActionEvent$6 as ActionEvent, type context$7_AddGroupMembersOptions as AddGroupMembersOptions, type context$7_AddGroupMembersRequest as AddGroupMembersRequest, type context$7_AddGroupMembersResponse as AddGroupMembersResponse, type context$7_AddGroupMembersResponseNonNullableFields as AddGroupMembersResponseNonNullableFields, type BaseEventMetadata$6 as BaseEventMetadata, type DomainEvent$6 as DomainEvent, type DomainEventBodyOneOf$6 as DomainEventBodyOneOf, type EntityCreatedEvent$6 as EntityCreatedEvent, type EntityDeletedEvent$6 as EntityDeletedEvent, type EntityUpdatedEvent$6 as EntityUpdatedEvent, type EventMetadata$6 as EventMetadata, type GroupMember$1 as GroupMember, type context$7_GroupMemberAddedEnvelope as GroupMemberAddedEnvelope, type context$7_GroupMemberRemovedEnvelope as GroupMemberRemovedEnvelope, type GroupRole$1 as GroupRole, type IdentificationData$6 as IdentificationData, type IdentificationDataIdOneOf$6 as IdentificationDataIdOneOf, context$7_JoinBy as JoinBy, type JoinRequest$1 as JoinRequest, type JoinRequestsApproved$1 as JoinRequestsApproved, type context$7_JoinResponse as JoinResponse, type context$7_LeaveRequest as LeaveRequest, type context$7_LeaveResponse as LeaveResponse, type context$7_ListGroupMembersOptions as ListGroupMembersOptions, type context$7_ListGroupMembersRequest as ListGroupMembersRequest, type context$7_ListGroupMembersResponse as ListGroupMembersResponse, type context$7_ListGroupMembersResponseNonNullableFields as ListGroupMembersResponseNonNullableFields, type context$7_ListMembershipsOptions as ListMembershipsOptions, type context$7_ListMembershipsRequest as ListMembershipsRequest, type context$7_ListMembershipsResponse as ListMembershipsResponse, type context$7_ListMembershipsResponseNonNullableFields as ListMembershipsResponseNonNullableFields, type context$7_MemberAdded as MemberAdded, type context$7_MemberJoined as MemberJoined, type MemberJoinedGroup$1 as MemberJoinedGroup, type context$7_MemberLeft as MemberLeft, type context$7_MemberRemoved as MemberRemoved, type MembersAddedToGroup$1 as MembersAddedToGroup, type MembersInvitedToGroup$1 as MembersInvitedToGroup, type context$7_MembersQueryBuilder as MembersQueryBuilder, type context$7_MembersQueryResult as MembersQueryResult, type context$7_Membership as Membership, type MembershipQuestionAnswer$3 as MembershipQuestionAnswer, context$7_MembershipStatus as MembershipStatus, type MessageEnvelope$6 as MessageEnvelope, type Paging$5 as Paging, type PagingMetadata$5 as PagingMetadata, type Query$4 as Query, type context$7_QueryGroupMembersRequest as QueryGroupMembersRequest, type context$7_QueryGroupMembersResponse as QueryGroupMembersResponse, type context$7_QueryGroupMembersResponseNonNullableFields as QueryGroupMembersResponseNonNullableFields, type context$7_QueryMembershipsOptions as QueryMembershipsOptions, type context$7_QueryMembershipsRequest as QueryMembershipsRequest, type context$7_QueryMembershipsResponse as QueryMembershipsResponse, type context$7_QueryMembershipsResponseNonNullableFields as QueryMembershipsResponseNonNullableFields, type context$7_QueryMyMembershipRequest as QueryMyMembershipRequest, type context$7_QueryMyMembershipResponse as QueryMyMembershipResponse, type context$7_QueryNonGroupMembersRequest as QueryNonGroupMembersRequest, type context$7_QueryNonGroupMembersResponse as QueryNonGroupMembersResponse, type context$7_RemoveGroupMembersOptions as RemoveGroupMembersOptions, type context$7_RemoveGroupMembersRequest as RemoveGroupMembersRequest, type context$7_RemoveGroupMembersResponse as RemoveGroupMembersResponse, type RestoreInfo$6 as RestoreInfo, Role$1 as Role, type SocialGroupsEvent$1 as SocialGroupsEvent, type SocialGroupsEventPayloadOneOf$1 as SocialGroupsEventPayloadOneOf, SortOrder$4 as SortOrder, type Sorting$4 as Sorting, WebhookIdentityType$6 as WebhookIdentityType, type context$7__publicOnGroupMemberAddedType as _publicOnGroupMemberAddedType, type context$7__publicOnGroupMemberRemovedType as _publicOnGroupMemberRemovedType, context$7_addGroupMembers as addGroupMembers, context$7_listGroupMembers as listGroupMembers, context$7_listMemberships as listMemberships, context$7_onGroupMemberAdded as onGroupMemberAdded, context$7_onGroupMemberRemoved as onGroupMemberRemoved, onGroupMemberAdded$1 as publicOnGroupMemberAdded, onGroupMemberRemoved$1 as publicOnGroupMemberRemoved, context$7_queryGroupMembers as queryGroupMembers, context$7_queryMemberships as queryMemberships, context$7_removeGroupMembers as removeGroupMembers };
|
|
1904
2262
|
}
|
|
1905
2263
|
|
|
1906
|
-
type RESTFunctionDescriptor$6<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$6) => T;
|
|
1907
|
-
interface HttpClient$6 {
|
|
1908
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$6<TResponse, TData>): Promise<HttpResponse$6<TResponse>>;
|
|
1909
|
-
fetchWithAuth: typeof fetch;
|
|
1910
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
1911
|
-
}
|
|
1912
|
-
type RequestOptionsFactory$6<TResponse = any, TData = any> = (context: any) => RequestOptions$6<TResponse, TData>;
|
|
1913
|
-
type HttpResponse$6<T = any> = {
|
|
1914
|
-
data: T;
|
|
1915
|
-
status: number;
|
|
1916
|
-
statusText: string;
|
|
1917
|
-
headers: any;
|
|
1918
|
-
request?: any;
|
|
1919
|
-
};
|
|
1920
|
-
type RequestOptions$6<_TResponse = any, Data = any> = {
|
|
1921
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1922
|
-
url: string;
|
|
1923
|
-
data?: Data;
|
|
1924
|
-
params?: URLSearchParams;
|
|
1925
|
-
} & APIMetadata$6;
|
|
1926
|
-
type APIMetadata$6 = {
|
|
1927
|
-
methodFqn?: string;
|
|
1928
|
-
entityFqdn?: string;
|
|
1929
|
-
packageName?: string;
|
|
1930
|
-
};
|
|
1931
|
-
type BuildRESTFunction$6<T extends RESTFunctionDescriptor$6> = T extends RESTFunctionDescriptor$6<infer U> ? U : never;
|
|
1932
|
-
type EventDefinition$5<Payload = unknown, Type extends string = string> = {
|
|
1933
|
-
__type: 'event-definition';
|
|
1934
|
-
type: Type;
|
|
1935
|
-
isDomainEvent?: boolean;
|
|
1936
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1937
|
-
__payload: Payload;
|
|
1938
|
-
};
|
|
1939
|
-
declare function EventDefinition$5<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$5<Payload, Type>;
|
|
1940
|
-
type EventHandler$5<T extends EventDefinition$5> = (payload: T['__payload']) => void | Promise<void>;
|
|
1941
|
-
type BuildEventDefinition$5<T extends EventDefinition$5<any, string>> = (handler: EventHandler$5<T>) => void;
|
|
1942
|
-
|
|
1943
|
-
declare global {
|
|
1944
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1945
|
-
interface SymbolConstructor {
|
|
1946
|
-
readonly observable: symbol;
|
|
1947
|
-
}
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
2264
|
/**
|
|
1951
2265
|
* >**Notes:**
|
|
1952
2266
|
* > + Site owners may set that members are not permitted to create groups in the Wix Groups application settings.
|
|
@@ -2657,7 +2971,7 @@ interface GroupRequestsQueryBuilder {
|
|
|
2657
2971
|
find: () => Promise<GroupRequestsQueryResult>;
|
|
2658
2972
|
}
|
|
2659
2973
|
|
|
2660
|
-
declare function approveGroupRequests$1(httpClient: HttpClient
|
|
2974
|
+
declare function approveGroupRequests$1(httpClient: HttpClient): ApproveGroupRequestsSignature;
|
|
2661
2975
|
interface ApproveGroupRequestsSignature {
|
|
2662
2976
|
/**
|
|
2663
2977
|
* Approves requests to create a group.
|
|
@@ -2671,7 +2985,7 @@ interface ApproveGroupRequestsSignature {
|
|
|
2671
2985
|
*/
|
|
2672
2986
|
(groupRequestIds: string[]): Promise<ApproveGroupRequestsResponse & ApproveGroupRequestsResponseNonNullableFields>;
|
|
2673
2987
|
}
|
|
2674
|
-
declare function rejectGroupRequests$1(httpClient: HttpClient
|
|
2988
|
+
declare function rejectGroupRequests$1(httpClient: HttpClient): RejectGroupRequestsSignature;
|
|
2675
2989
|
interface RejectGroupRequestsSignature {
|
|
2676
2990
|
/**
|
|
2677
2991
|
* Rejects a request to create a group.
|
|
@@ -2683,7 +2997,7 @@ interface RejectGroupRequestsSignature {
|
|
|
2683
2997
|
*/
|
|
2684
2998
|
(rejections: Rejection$3[]): Promise<RejectGroupRequestsResponse & RejectGroupRequestsResponseNonNullableFields>;
|
|
2685
2999
|
}
|
|
2686
|
-
declare function listGroupRequests$1(httpClient: HttpClient
|
|
3000
|
+
declare function listGroupRequests$1(httpClient: HttpClient): ListGroupRequestsSignature;
|
|
2687
3001
|
interface ListGroupRequestsSignature {
|
|
2688
3002
|
/**
|
|
2689
3003
|
* Lists requests to create a group.
|
|
@@ -2700,7 +3014,7 @@ interface ListGroupRequestsSignature {
|
|
|
2700
3014
|
*/
|
|
2701
3015
|
(options?: ListGroupRequestsOptions | undefined): Promise<ListGroupRequestsResponse & ListGroupRequestsResponseNonNullableFields>;
|
|
2702
3016
|
}
|
|
2703
|
-
declare function queryGroupRequests$1(httpClient: HttpClient
|
|
3017
|
+
declare function queryGroupRequests$1(httpClient: HttpClient): QueryGroupRequestsSignature;
|
|
2704
3018
|
interface QueryGroupRequestsSignature {
|
|
2705
3019
|
/**
|
|
2706
3020
|
* Creates a query to retrieve a list of create requests.
|
|
@@ -2717,16 +3031,34 @@ interface QueryGroupRequestsSignature {
|
|
|
2717
3031
|
*/
|
|
2718
3032
|
(options?: QueryGroupRequestsOptions | undefined): GroupRequestsQueryBuilder;
|
|
2719
3033
|
}
|
|
2720
|
-
declare const onGroupRequestCreated$1: EventDefinition$
|
|
2721
|
-
declare const onGroupRequestApproved$1: EventDefinition$
|
|
2722
|
-
declare const onGroupRequestRejected$1: EventDefinition$
|
|
3034
|
+
declare const onGroupRequestCreated$1: EventDefinition$8<GroupRequestCreatedEnvelope, "wix.social_groups.v2.group_request_created">;
|
|
3035
|
+
declare const onGroupRequestApproved$1: EventDefinition$8<GroupRequestApprovedEnvelope, "wix.social_groups.v2.group_request_approved">;
|
|
3036
|
+
declare const onGroupRequestRejected$1: EventDefinition$8<GroupRequestRejectedEnvelope, "wix.social_groups.v2.group_request_rejected">;
|
|
3037
|
+
|
|
3038
|
+
type EventDefinition$5<Payload = unknown, Type extends string = string> = {
|
|
3039
|
+
__type: 'event-definition';
|
|
3040
|
+
type: Type;
|
|
3041
|
+
isDomainEvent?: boolean;
|
|
3042
|
+
transformations?: (envelope: unknown) => Payload;
|
|
3043
|
+
__payload: Payload;
|
|
3044
|
+
};
|
|
3045
|
+
declare function EventDefinition$5<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$5<Payload, Type>;
|
|
3046
|
+
type EventHandler$5<T extends EventDefinition$5> = (payload: T['__payload']) => void | Promise<void>;
|
|
3047
|
+
type BuildEventDefinition$5<T extends EventDefinition$5<any, string>> = (handler: EventHandler$5<T>) => void;
|
|
3048
|
+
|
|
3049
|
+
declare global {
|
|
3050
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3051
|
+
interface SymbolConstructor {
|
|
3052
|
+
readonly observable: symbol;
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
2723
3055
|
|
|
2724
3056
|
declare function createEventModule$5<T extends EventDefinition$5<any, string>>(eventDefinition: T): BuildEventDefinition$5<T> & T;
|
|
2725
3057
|
|
|
2726
|
-
declare const approveGroupRequests: BuildRESTFunction
|
|
2727
|
-
declare const rejectGroupRequests: BuildRESTFunction
|
|
2728
|
-
declare const listGroupRequests: BuildRESTFunction
|
|
2729
|
-
declare const queryGroupRequests: BuildRESTFunction
|
|
3058
|
+
declare const approveGroupRequests: MaybeContext<BuildRESTFunction<typeof approveGroupRequests$1> & typeof approveGroupRequests$1>;
|
|
3059
|
+
declare const rejectGroupRequests: MaybeContext<BuildRESTFunction<typeof rejectGroupRequests$1> & typeof rejectGroupRequests$1>;
|
|
3060
|
+
declare const listGroupRequests: MaybeContext<BuildRESTFunction<typeof listGroupRequests$1> & typeof listGroupRequests$1>;
|
|
3061
|
+
declare const queryGroupRequests: MaybeContext<BuildRESTFunction<typeof queryGroupRequests$1> & typeof queryGroupRequests$1>;
|
|
2730
3062
|
|
|
2731
3063
|
type _publicOnGroupRequestCreatedType = typeof onGroupRequestCreated$1;
|
|
2732
3064
|
/** */
|
|
@@ -2784,61 +3116,17 @@ declare namespace context$6 {
|
|
|
2784
3116
|
export { type AccessRestriction$1 as AccessRestriction, type AccessRestrictionDataOneOf$1 as AccessRestrictionDataOneOf, type ActionEvent$5 as ActionEvent, AllowPolicy$1 as AllowPolicy, type context$6_ApproveGroupRequestsRequest as ApproveGroupRequestsRequest, type context$6_ApproveGroupRequestsResponse as ApproveGroupRequestsResponse, type context$6_ApproveGroupRequestsResponseNonNullableFields as ApproveGroupRequestsResponseNonNullableFields, type BaseEventMetadata$5 as BaseEventMetadata, type context$6_CancelGroupRequestRequest as CancelGroupRequestRequest, type context$6_CancelGroupRequestResponse as CancelGroupRequestResponse, type CoverImage$1 as CoverImage, type DomainEvent$5 as DomainEvent, type DomainEventBodyOneOf$5 as DomainEventBodyOneOf, type EntityCreatedEvent$5 as EntityCreatedEvent, type EntityDeletedEvent$5 as EntityDeletedEvent, type EntityUpdatedEvent$5 as EntityUpdatedEvent, type EventMetadata$5 as EventMetadata, type Events$1 as Events, type Group$1 as Group, type GroupDetails$1 as GroupDetails, type GroupDetailsPosition$1 as GroupDetailsPosition, type context$6_GroupRequest as GroupRequest, type context$6_GroupRequestApproved as GroupRequestApproved, type context$6_GroupRequestApprovedEnvelope as GroupRequestApprovedEnvelope, type context$6_GroupRequestCreatedEnvelope as GroupRequestCreatedEnvelope, type context$6_GroupRequestRejected as GroupRequestRejected, type context$6_GroupRequestRejectedEnvelope as GroupRequestRejectedEnvelope, type context$6_GroupRequestsQueryBuilder as GroupRequestsQueryBuilder, type context$6_GroupRequestsQueryResult as GroupRequestsQueryResult, type GroupSettings$1 as GroupSettings, type IdentificationData$5 as IdentificationData, type IdentificationDataIdOneOf$5 as IdentificationDataIdOneOf, type Identity$1 as Identity, IdentityType$1 as IdentityType, type Image$1 as Image, ItemsToUpdate$3 as ItemsToUpdate, type context$6_ListGroupRequestsOptions as ListGroupRequestsOptions, type context$6_ListGroupRequestsRequest as ListGroupRequestsRequest, type context$6_ListGroupRequestsResponse as ListGroupRequestsResponse, type context$6_ListGroupRequestsResponseNonNullableFields as ListGroupRequestsResponseNonNullableFields, type Logo$1 as Logo, type MessageEnvelope$5 as MessageEnvelope, type OnboardingStepSettings$1 as OnboardingStepSettings, OwnershipFilter$3 as OwnershipFilter, type Paging$4 as Paging, type PagingMetadata$4 as PagingMetadata, type Position$1 as Position, PrivacyStatus$1 as PrivacyStatus, type Query$3 as Query, type context$6_QueryGroupRequestsOptions as QueryGroupRequestsOptions, type context$6_QueryGroupRequestsRequest as QueryGroupRequestsRequest, type context$6_QueryGroupRequestsResponse as QueryGroupRequestsResponse, type context$6_QueryGroupRequestsResponseNonNullableFields as QueryGroupRequestsResponseNonNullableFields, type context$6_RejectGroupRequestsRequest as RejectGroupRequestsRequest, type context$6_RejectGroupRequestsResponse as RejectGroupRequestsResponse, type context$6_RejectGroupRequestsResponseNonNullableFields as RejectGroupRequestsResponseNonNullableFields, type Rejection$3 as Rejection, type RequestDetails$3 as RequestDetails, RequestStatus$3 as RequestStatus, type RestoreInfo$5 as RestoreInfo, SortOrder$3 as SortOrder, type Sorting$3 as Sorting, StepKey$1 as StepKey, type context$6_SubmitGroupRequestRequest as SubmitGroupRequestRequest, type context$6_SubmitGroupRequestResponse as SubmitGroupRequestResponse, Type$1 as Type, WebhookIdentityType$5 as WebhookIdentityType, type context$6__publicOnGroupRequestApprovedType as _publicOnGroupRequestApprovedType, type context$6__publicOnGroupRequestCreatedType as _publicOnGroupRequestCreatedType, type context$6__publicOnGroupRequestRejectedType as _publicOnGroupRequestRejectedType, context$6_approveGroupRequests as approveGroupRequests, context$6_listGroupRequests as listGroupRequests, context$6_onGroupRequestApproved as onGroupRequestApproved, context$6_onGroupRequestCreated as onGroupRequestCreated, context$6_onGroupRequestRejected as onGroupRequestRejected, onGroupRequestApproved$1 as publicOnGroupRequestApproved, onGroupRequestCreated$1 as publicOnGroupRequestCreated, onGroupRequestRejected$1 as publicOnGroupRequestRejected, context$6_queryGroupRequests as queryGroupRequests, context$6_rejectGroupRequests as rejectGroupRequests };
|
|
2785
3117
|
}
|
|
2786
3118
|
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
headers: any;
|
|
2799
|
-
request?: any;
|
|
2800
|
-
};
|
|
2801
|
-
type RequestOptions$5<_TResponse = any, Data = any> = {
|
|
2802
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2803
|
-
url: string;
|
|
2804
|
-
data?: Data;
|
|
2805
|
-
params?: URLSearchParams;
|
|
2806
|
-
} & APIMetadata$5;
|
|
2807
|
-
type APIMetadata$5 = {
|
|
2808
|
-
methodFqn?: string;
|
|
2809
|
-
entityFqdn?: string;
|
|
2810
|
-
packageName?: string;
|
|
2811
|
-
};
|
|
2812
|
-
type BuildRESTFunction$5<T extends RESTFunctionDescriptor$5> = T extends RESTFunctionDescriptor$5<infer U> ? U : never;
|
|
2813
|
-
type EventDefinition$4<Payload = unknown, Type extends string = string> = {
|
|
2814
|
-
__type: 'event-definition';
|
|
2815
|
-
type: Type;
|
|
2816
|
-
isDomainEvent?: boolean;
|
|
2817
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2818
|
-
__payload: Payload;
|
|
2819
|
-
};
|
|
2820
|
-
declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
|
|
2821
|
-
type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
|
|
2822
|
-
type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
|
|
2823
|
-
|
|
2824
|
-
declare global {
|
|
2825
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2826
|
-
interface SymbolConstructor {
|
|
2827
|
-
readonly observable: symbol;
|
|
2828
|
-
}
|
|
2829
|
-
}
|
|
2830
|
-
|
|
2831
|
-
/**
|
|
2832
|
-
* A group member may have multiple roles in a single group.
|
|
2833
|
-
* Currently, only `MEMBER` and `ADMIN` roles are supported, but more roles may be available in the future.
|
|
2834
|
-
*/
|
|
2835
|
-
interface GroupRole {
|
|
2836
|
-
/**
|
|
2837
|
-
* Member's role.
|
|
2838
|
-
* - `MEMBER` - Regular group member.
|
|
2839
|
-
* - `ADMIN` - Group administrator.
|
|
2840
|
-
*/
|
|
2841
|
-
value?: Role;
|
|
3119
|
+
/**
|
|
3120
|
+
* A group member may have multiple roles in a single group.
|
|
3121
|
+
* Currently, only `MEMBER` and `ADMIN` roles are supported, but more roles may be available in the future.
|
|
3122
|
+
*/
|
|
3123
|
+
interface GroupRole {
|
|
3124
|
+
/**
|
|
3125
|
+
* Member's role.
|
|
3126
|
+
* - `MEMBER` - Regular group member.
|
|
3127
|
+
* - `ADMIN` - Group administrator.
|
|
3128
|
+
*/
|
|
3129
|
+
value?: Role;
|
|
2842
3130
|
}
|
|
2843
3131
|
declare enum Role {
|
|
2844
3132
|
UNKNOWN_ROLE = "UNKNOWN_ROLE",
|
|
@@ -3146,7 +3434,7 @@ interface UnassignRoleOptions {
|
|
|
3146
3434
|
siteMemberIds?: string[];
|
|
3147
3435
|
}
|
|
3148
3436
|
|
|
3149
|
-
declare function assignRole$1(httpClient: HttpClient
|
|
3437
|
+
declare function assignRole$1(httpClient: HttpClient): AssignRoleSignature;
|
|
3150
3438
|
interface AssignRoleSignature {
|
|
3151
3439
|
/**
|
|
3152
3440
|
* Assigns a specific role to group members.
|
|
@@ -3163,7 +3451,7 @@ interface AssignRoleSignature {
|
|
|
3163
3451
|
*/
|
|
3164
3452
|
(groupId: string, memberIds: string[], role: GroupRole, options?: AssignRoleOptions | undefined): Promise<AssignRoleResponse & AssignRoleResponseNonNullableFields>;
|
|
3165
3453
|
}
|
|
3166
|
-
declare function unassignRole$1(httpClient: HttpClient
|
|
3454
|
+
declare function unassignRole$1(httpClient: HttpClient): UnassignRoleSignature;
|
|
3167
3455
|
interface UnassignRoleSignature {
|
|
3168
3456
|
/**
|
|
3169
3457
|
* Unassigns a role from group members.
|
|
@@ -3179,13 +3467,31 @@ interface UnassignRoleSignature {
|
|
|
3179
3467
|
*/
|
|
3180
3468
|
(groupId: string, memberIds: string[], role: GroupRole, options?: UnassignRoleOptions | undefined): Promise<UnassignRoleResponse & UnassignRoleResponseNonNullableFields>;
|
|
3181
3469
|
}
|
|
3182
|
-
declare const onGroupRoleAssigned$1: EventDefinition$
|
|
3183
|
-
declare const onGroupRoleUnassigned$1: EventDefinition$
|
|
3470
|
+
declare const onGroupRoleAssigned$1: EventDefinition$8<GroupRoleAssignedEnvelope, "wix.social_groups.v2.group_role_assigned">;
|
|
3471
|
+
declare const onGroupRoleUnassigned$1: EventDefinition$8<GroupRoleUnassignedEnvelope, "wix.social_groups.v2.group_role_unassigned">;
|
|
3472
|
+
|
|
3473
|
+
type EventDefinition$4<Payload = unknown, Type extends string = string> = {
|
|
3474
|
+
__type: 'event-definition';
|
|
3475
|
+
type: Type;
|
|
3476
|
+
isDomainEvent?: boolean;
|
|
3477
|
+
transformations?: (envelope: unknown) => Payload;
|
|
3478
|
+
__payload: Payload;
|
|
3479
|
+
};
|
|
3480
|
+
declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
|
|
3481
|
+
type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
|
|
3482
|
+
type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
|
|
3483
|
+
|
|
3484
|
+
declare global {
|
|
3485
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3486
|
+
interface SymbolConstructor {
|
|
3487
|
+
readonly observable: symbol;
|
|
3488
|
+
}
|
|
3489
|
+
}
|
|
3184
3490
|
|
|
3185
3491
|
declare function createEventModule$4<T extends EventDefinition$4<any, string>>(eventDefinition: T): BuildEventDefinition$4<T> & T;
|
|
3186
3492
|
|
|
3187
|
-
declare const assignRole: BuildRESTFunction
|
|
3188
|
-
declare const unassignRole: BuildRESTFunction
|
|
3493
|
+
declare const assignRole: MaybeContext<BuildRESTFunction<typeof assignRole$1> & typeof assignRole$1>;
|
|
3494
|
+
declare const unassignRole: MaybeContext<BuildRESTFunction<typeof unassignRole$1> & typeof unassignRole$1>;
|
|
3189
3495
|
|
|
3190
3496
|
type _publicOnGroupRoleAssignedType = typeof onGroupRoleAssigned$1;
|
|
3191
3497
|
/**
|
|
@@ -3225,50 +3531,6 @@ declare namespace context$5 {
|
|
|
3225
3531
|
export { type ActionEvent$4 as ActionEvent, type context$5_AssignRoleOptions as AssignRoleOptions, type context$5_AssignRoleRequest as AssignRoleRequest, type context$5_AssignRoleResponse as AssignRoleResponse, type context$5_AssignRoleResponseNonNullableFields as AssignRoleResponseNonNullableFields, type BaseEventMetadata$4 as BaseEventMetadata, type DomainEvent$4 as DomainEvent, type DomainEventBodyOneOf$4 as DomainEventBodyOneOf, type EntityCreatedEvent$4 as EntityCreatedEvent, type EntityDeletedEvent$4 as EntityDeletedEvent, type EntityUpdatedEvent$4 as EntityUpdatedEvent, type EventMetadata$4 as EventMetadata, type context$5_GroupMember as GroupMember, type context$5_GroupRole as GroupRole, type context$5_GroupRoleAssignedEnvelope as GroupRoleAssignedEnvelope, type context$5_GroupRoleUnassignedEnvelope as GroupRoleUnassignedEnvelope, type IdentificationData$4 as IdentificationData, type IdentificationDataIdOneOf$4 as IdentificationDataIdOneOf, type MessageEnvelope$4 as MessageEnvelope, type RestoreInfo$4 as RestoreInfo, context$5_Role as Role, type context$5_RoleAssignedToGroupMember as RoleAssignedToGroupMember, type context$5_RoleUnassignedFromGroupMember as RoleUnassignedFromGroupMember, type context$5_UnassignRoleOptions as UnassignRoleOptions, type context$5_UnassignRoleRequest as UnassignRoleRequest, type context$5_UnassignRoleResponse as UnassignRoleResponse, type context$5_UnassignRoleResponseNonNullableFields as UnassignRoleResponseNonNullableFields, WebhookIdentityType$4 as WebhookIdentityType, type context$5__publicOnGroupRoleAssignedType as _publicOnGroupRoleAssignedType, type context$5__publicOnGroupRoleUnassignedType as _publicOnGroupRoleUnassignedType, context$5_assignRole as assignRole, context$5_onGroupRoleAssigned as onGroupRoleAssigned, context$5_onGroupRoleUnassigned as onGroupRoleUnassigned, onGroupRoleAssigned$1 as publicOnGroupRoleAssigned, onGroupRoleUnassigned$1 as publicOnGroupRoleUnassigned, context$5_unassignRole as unassignRole };
|
|
3226
3532
|
}
|
|
3227
3533
|
|
|
3228
|
-
type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
|
|
3229
|
-
interface HttpClient$4 {
|
|
3230
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
|
|
3231
|
-
fetchWithAuth: typeof fetch;
|
|
3232
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
3233
|
-
}
|
|
3234
|
-
type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
|
|
3235
|
-
type HttpResponse$4<T = any> = {
|
|
3236
|
-
data: T;
|
|
3237
|
-
status: number;
|
|
3238
|
-
statusText: string;
|
|
3239
|
-
headers: any;
|
|
3240
|
-
request?: any;
|
|
3241
|
-
};
|
|
3242
|
-
type RequestOptions$4<_TResponse = any, Data = any> = {
|
|
3243
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3244
|
-
url: string;
|
|
3245
|
-
data?: Data;
|
|
3246
|
-
params?: URLSearchParams;
|
|
3247
|
-
} & APIMetadata$4;
|
|
3248
|
-
type APIMetadata$4 = {
|
|
3249
|
-
methodFqn?: string;
|
|
3250
|
-
entityFqdn?: string;
|
|
3251
|
-
packageName?: string;
|
|
3252
|
-
};
|
|
3253
|
-
type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
|
|
3254
|
-
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
3255
|
-
__type: 'event-definition';
|
|
3256
|
-
type: Type;
|
|
3257
|
-
isDomainEvent?: boolean;
|
|
3258
|
-
transformations?: (envelope: unknown) => Payload;
|
|
3259
|
-
__payload: Payload;
|
|
3260
|
-
};
|
|
3261
|
-
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
3262
|
-
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
3263
|
-
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
3264
|
-
|
|
3265
|
-
declare global {
|
|
3266
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3267
|
-
interface SymbolConstructor {
|
|
3268
|
-
readonly observable: symbol;
|
|
3269
|
-
}
|
|
3270
|
-
}
|
|
3271
|
-
|
|
3272
3534
|
/**
|
|
3273
3535
|
* Guidelines ensuring that members post responsibly and respectfully. Site owners can set up Group Rules in the dashboard.
|
|
3274
3536
|
* >**Note:** Only admins can update the group rules.
|
|
@@ -3485,7 +3747,7 @@ interface CreateOrReplaceAllRulesOptions {
|
|
|
3485
3747
|
rules?: GroupRule[];
|
|
3486
3748
|
}
|
|
3487
3749
|
|
|
3488
|
-
declare function listRules$1(httpClient: HttpClient
|
|
3750
|
+
declare function listRules$1(httpClient: HttpClient): ListRulesSignature;
|
|
3489
3751
|
interface ListRulesSignature {
|
|
3490
3752
|
/**
|
|
3491
3753
|
* Retrieves rules.
|
|
@@ -3496,7 +3758,7 @@ interface ListRulesSignature {
|
|
|
3496
3758
|
*/
|
|
3497
3759
|
(groupId: string): Promise<ListRulesResponse & ListRulesResponseNonNullableFields>;
|
|
3498
3760
|
}
|
|
3499
|
-
declare function createOrReplaceAllRules$1(httpClient: HttpClient
|
|
3761
|
+
declare function createOrReplaceAllRules$1(httpClient: HttpClient): CreateOrReplaceAllRulesSignature;
|
|
3500
3762
|
interface CreateOrReplaceAllRulesSignature {
|
|
3501
3763
|
/**
|
|
3502
3764
|
* Creates rules if no rules have been set up. Otherwise, replaces all existing rules.
|
|
@@ -3508,12 +3770,30 @@ interface CreateOrReplaceAllRulesSignature {
|
|
|
3508
3770
|
*/
|
|
3509
3771
|
(groupId: string, options?: CreateOrReplaceAllRulesOptions | undefined): Promise<CreateOrReplaceAllRulesResponse & CreateOrReplaceAllRulesResponseNonNullableFields>;
|
|
3510
3772
|
}
|
|
3511
|
-
declare const onGroupRulesUpdated$1: EventDefinition$
|
|
3773
|
+
declare const onGroupRulesUpdated$1: EventDefinition$8<GroupRulesUpdatedEnvelope, "wix.social_groups.v2.group_rules_updated">;
|
|
3774
|
+
|
|
3775
|
+
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
3776
|
+
__type: 'event-definition';
|
|
3777
|
+
type: Type;
|
|
3778
|
+
isDomainEvent?: boolean;
|
|
3779
|
+
transformations?: (envelope: unknown) => Payload;
|
|
3780
|
+
__payload: Payload;
|
|
3781
|
+
};
|
|
3782
|
+
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
3783
|
+
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
3784
|
+
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
3785
|
+
|
|
3786
|
+
declare global {
|
|
3787
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3788
|
+
interface SymbolConstructor {
|
|
3789
|
+
readonly observable: symbol;
|
|
3790
|
+
}
|
|
3791
|
+
}
|
|
3512
3792
|
|
|
3513
3793
|
declare function createEventModule$3<T extends EventDefinition$3<any, string>>(eventDefinition: T): BuildEventDefinition$3<T> & T;
|
|
3514
3794
|
|
|
3515
|
-
declare const listRules: BuildRESTFunction
|
|
3516
|
-
declare const createOrReplaceAllRules: BuildRESTFunction
|
|
3795
|
+
declare const listRules: MaybeContext<BuildRESTFunction<typeof listRules$1> & typeof listRules$1>;
|
|
3796
|
+
declare const createOrReplaceAllRules: MaybeContext<BuildRESTFunction<typeof createOrReplaceAllRules$1> & typeof createOrReplaceAllRules$1>;
|
|
3517
3797
|
|
|
3518
3798
|
type _publicOnGroupRulesUpdatedType = typeof onGroupRulesUpdated$1;
|
|
3519
3799
|
/**
|
|
@@ -3541,50 +3821,6 @@ declare namespace context$4 {
|
|
|
3541
3821
|
export { type ActionEvent$3 as ActionEvent, type BaseEventMetadata$3 as BaseEventMetadata, type context$4_CreateOrReplaceAllRulesOptions as CreateOrReplaceAllRulesOptions, type context$4_CreateOrReplaceAllRulesRequest as CreateOrReplaceAllRulesRequest, type context$4_CreateOrReplaceAllRulesResponse as CreateOrReplaceAllRulesResponse, type context$4_CreateOrReplaceAllRulesResponseNonNullableFields as CreateOrReplaceAllRulesResponseNonNullableFields, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type context$4_Empty as Empty, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type EventMetadata$3 as EventMetadata, type context$4_GroupRule as GroupRule, type context$4_GroupRules as GroupRules, type context$4_GroupRulesUpdatedEnvelope as GroupRulesUpdatedEnvelope, type IdentificationData$3 as IdentificationData, type IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, type context$4_ListRulesRequest as ListRulesRequest, type context$4_ListRulesResponse as ListRulesResponse, type context$4_ListRulesResponseNonNullableFields as ListRulesResponseNonNullableFields, type context$4_ListTemplatesResponse as ListTemplatesResponse, type MessageEnvelope$3 as MessageEnvelope, type RestoreInfo$3 as RestoreInfo, WebhookIdentityType$3 as WebhookIdentityType, type context$4__publicOnGroupRulesUpdatedType as _publicOnGroupRulesUpdatedType, context$4_createOrReplaceAllRules as createOrReplaceAllRules, context$4_listRules as listRules, context$4_onGroupRulesUpdated as onGroupRulesUpdated, onGroupRulesUpdated$1 as publicOnGroupRulesUpdated };
|
|
3542
3822
|
}
|
|
3543
3823
|
|
|
3544
|
-
type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
|
|
3545
|
-
interface HttpClient$3 {
|
|
3546
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
3547
|
-
fetchWithAuth: typeof fetch;
|
|
3548
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
3549
|
-
}
|
|
3550
|
-
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
3551
|
-
type HttpResponse$3<T = any> = {
|
|
3552
|
-
data: T;
|
|
3553
|
-
status: number;
|
|
3554
|
-
statusText: string;
|
|
3555
|
-
headers: any;
|
|
3556
|
-
request?: any;
|
|
3557
|
-
};
|
|
3558
|
-
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
3559
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3560
|
-
url: string;
|
|
3561
|
-
data?: Data;
|
|
3562
|
-
params?: URLSearchParams;
|
|
3563
|
-
} & APIMetadata$3;
|
|
3564
|
-
type APIMetadata$3 = {
|
|
3565
|
-
methodFqn?: string;
|
|
3566
|
-
entityFqdn?: string;
|
|
3567
|
-
packageName?: string;
|
|
3568
|
-
};
|
|
3569
|
-
type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
|
|
3570
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
3571
|
-
__type: 'event-definition';
|
|
3572
|
-
type: Type;
|
|
3573
|
-
isDomainEvent?: boolean;
|
|
3574
|
-
transformations?: (envelope: unknown) => Payload;
|
|
3575
|
-
__payload: Payload;
|
|
3576
|
-
};
|
|
3577
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
3578
|
-
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
3579
|
-
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
3580
|
-
|
|
3581
|
-
declare global {
|
|
3582
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3583
|
-
interface SymbolConstructor {
|
|
3584
|
-
readonly observable: symbol;
|
|
3585
|
-
}
|
|
3586
|
-
}
|
|
3587
|
-
|
|
3588
3824
|
/**
|
|
3589
3825
|
* To join a private group, a site member must submit a Join Request, which can be approved or rejected by an admin.
|
|
3590
3826
|
* When the request is approved, the site member becomes a group member.
|
|
@@ -4127,7 +4363,7 @@ interface JoinGroupRequestsQueryBuilder {
|
|
|
4127
4363
|
find: () => Promise<JoinGroupRequestsQueryResult>;
|
|
4128
4364
|
}
|
|
4129
4365
|
|
|
4130
|
-
declare function approveJoinGroupRequests$1(httpClient: HttpClient
|
|
4366
|
+
declare function approveJoinGroupRequests$1(httpClient: HttpClient): ApproveJoinGroupRequestsSignature;
|
|
4131
4367
|
interface ApproveJoinGroupRequestsSignature {
|
|
4132
4368
|
/**
|
|
4133
4369
|
* Approves requests to join a group.
|
|
@@ -4145,7 +4381,7 @@ interface ApproveJoinGroupRequestsSignature {
|
|
|
4145
4381
|
*/
|
|
4146
4382
|
(groupId: string, memberIds: string[], options?: ApproveJoinGroupRequestsOptions | undefined): Promise<ApproveJoinGroupRequestsResponse & ApproveJoinGroupRequestsResponseNonNullableFields>;
|
|
4147
4383
|
}
|
|
4148
|
-
declare function rejectJoinGroupRequests$1(httpClient: HttpClient
|
|
4384
|
+
declare function rejectJoinGroupRequests$1(httpClient: HttpClient): RejectJoinGroupRequestsSignature;
|
|
4149
4385
|
interface RejectJoinGroupRequestsSignature {
|
|
4150
4386
|
/**
|
|
4151
4387
|
* Rejects requests to join a group.
|
|
@@ -4164,7 +4400,7 @@ interface RejectJoinGroupRequestsSignature {
|
|
|
4164
4400
|
*/
|
|
4165
4401
|
(groupId: string, rejections: Rejection$2[]): Promise<RejectJoinGroupRequestsResponse & RejectJoinGroupRequestsResponseNonNullableFields>;
|
|
4166
4402
|
}
|
|
4167
|
-
declare function listJoinGroupRequests$1(httpClient: HttpClient
|
|
4403
|
+
declare function listJoinGroupRequests$1(httpClient: HttpClient): ListJoinGroupRequestsSignature;
|
|
4168
4404
|
interface ListJoinGroupRequestsSignature {
|
|
4169
4405
|
/**
|
|
4170
4406
|
* Lists requests to join a group.
|
|
@@ -4180,7 +4416,7 @@ interface ListJoinGroupRequestsSignature {
|
|
|
4180
4416
|
*/
|
|
4181
4417
|
(groupId: string, options?: ListJoinGroupRequestsOptions | undefined): Promise<ListJoinGroupRequestsResponse & ListJoinGroupRequestsResponseNonNullableFields>;
|
|
4182
4418
|
}
|
|
4183
|
-
declare function queryJoinGroupRequests$1(httpClient: HttpClient
|
|
4419
|
+
declare function queryJoinGroupRequests$1(httpClient: HttpClient): QueryJoinGroupRequestsSignature;
|
|
4184
4420
|
interface QueryJoinGroupRequestsSignature {
|
|
4185
4421
|
/**
|
|
4186
4422
|
* Creates a query to retrieve a list of join requests.
|
|
@@ -4206,16 +4442,34 @@ interface QueryJoinGroupRequestsSignature {
|
|
|
4206
4442
|
*/
|
|
4207
4443
|
(groupId: string, options?: QueryJoinGroupRequestsOptions | undefined): JoinGroupRequestsQueryBuilder;
|
|
4208
4444
|
}
|
|
4209
|
-
declare const onJoinGroupRequestCreated$1: EventDefinition$
|
|
4210
|
-
declare const onJoinGroupRequestApproved$1: EventDefinition$
|
|
4211
|
-
declare const onJoinGroupRequestRejected$1: EventDefinition$
|
|
4445
|
+
declare const onJoinGroupRequestCreated$1: EventDefinition$8<JoinGroupRequestCreatedEnvelope, "wix.social_groups.v2.join_group_request_created">;
|
|
4446
|
+
declare const onJoinGroupRequestApproved$1: EventDefinition$8<JoinGroupRequestApprovedEnvelope, "wix.social_groups.v2.join_group_request_approved">;
|
|
4447
|
+
declare const onJoinGroupRequestRejected$1: EventDefinition$8<JoinGroupRequestRejectedEnvelope, "wix.social_groups.v2.join_group_request_rejected">;
|
|
4448
|
+
|
|
4449
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
4450
|
+
__type: 'event-definition';
|
|
4451
|
+
type: Type;
|
|
4452
|
+
isDomainEvent?: boolean;
|
|
4453
|
+
transformations?: (envelope: unknown) => Payload;
|
|
4454
|
+
__payload: Payload;
|
|
4455
|
+
};
|
|
4456
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
4457
|
+
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
4458
|
+
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
4459
|
+
|
|
4460
|
+
declare global {
|
|
4461
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4462
|
+
interface SymbolConstructor {
|
|
4463
|
+
readonly observable: symbol;
|
|
4464
|
+
}
|
|
4465
|
+
}
|
|
4212
4466
|
|
|
4213
4467
|
declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
|
|
4214
4468
|
|
|
4215
|
-
declare const approveJoinGroupRequests: BuildRESTFunction
|
|
4216
|
-
declare const rejectJoinGroupRequests: BuildRESTFunction
|
|
4217
|
-
declare const listJoinGroupRequests: BuildRESTFunction
|
|
4218
|
-
declare const queryJoinGroupRequests: BuildRESTFunction
|
|
4469
|
+
declare const approveJoinGroupRequests: MaybeContext<BuildRESTFunction<typeof approveJoinGroupRequests$1> & typeof approveJoinGroupRequests$1>;
|
|
4470
|
+
declare const rejectJoinGroupRequests: MaybeContext<BuildRESTFunction<typeof rejectJoinGroupRequests$1> & typeof rejectJoinGroupRequests$1>;
|
|
4471
|
+
declare const listJoinGroupRequests: MaybeContext<BuildRESTFunction<typeof listJoinGroupRequests$1> & typeof listJoinGroupRequests$1>;
|
|
4472
|
+
declare const queryJoinGroupRequests: MaybeContext<BuildRESTFunction<typeof queryJoinGroupRequests$1> & typeof queryJoinGroupRequests$1>;
|
|
4219
4473
|
|
|
4220
4474
|
type _publicOnJoinGroupRequestCreatedType = typeof onJoinGroupRequestCreated$1;
|
|
4221
4475
|
/** */
|
|
@@ -4297,40 +4551,6 @@ declare namespace context$3 {
|
|
|
4297
4551
|
export { type ActionEvent$2 as ActionEvent, type context$3_ApproveAllJoinGroupRequestsRequest as ApproveAllJoinGroupRequestsRequest, type context$3_ApproveAllJoinGroupRequestsResponse as ApproveAllJoinGroupRequestsResponse, type context$3_ApproveJoinGroupRequestsOptions as ApproveJoinGroupRequestsOptions, type context$3_ApproveJoinGroupRequestsRequest as ApproveJoinGroupRequestsRequest, type context$3_ApproveJoinGroupRequestsResponse as ApproveJoinGroupRequestsResponse, type context$3_ApproveJoinGroupRequestsResponseNonNullableFields as ApproveJoinGroupRequestsResponseNonNullableFields, type BaseEventMetadata$2 as BaseEventMetadata, type context$3_CancelJoinGroupRequestRequest as CancelJoinGroupRequestRequest, type context$3_CancelJoinGroupRequestResponse as CancelJoinGroupRequestResponse, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type EventMetadata$2 as EventMetadata, type context$3_EventsViolationOptions as EventsViolationOptions, type context$3_GetJoinRequirementsRequest as GetJoinRequirementsRequest, type context$3_GetJoinRequirementsResponse as GetJoinRequirementsResponse, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, ItemsToUpdate$2 as ItemsToUpdate, type context$3_JoinGroupRequest as JoinGroupRequest, type context$3_JoinGroupRequestApproved as JoinGroupRequestApproved, type context$3_JoinGroupRequestApprovedEnvelope as JoinGroupRequestApprovedEnvelope, type context$3_JoinGroupRequestCancelled as JoinGroupRequestCancelled, type context$3_JoinGroupRequestCreatedEnvelope as JoinGroupRequestCreatedEnvelope, type context$3_JoinGroupRequestRejected as JoinGroupRequestRejected, type context$3_JoinGroupRequestRejectedEnvelope as JoinGroupRequestRejectedEnvelope, type context$3_JoinGroupRequestsQueryBuilder as JoinGroupRequestsQueryBuilder, type context$3_JoinGroupRequestsQueryResult as JoinGroupRequestsQueryResult, type context$3_JoinRequestsApproved as JoinRequestsApproved, type context$3_ListAllJoinGroupRequestsRequest as ListAllJoinGroupRequestsRequest, type context$3_ListAllJoinGroupRequestsResponse as ListAllJoinGroupRequestsResponse, type context$3_ListJoinGroupRequestsOptions as ListJoinGroupRequestsOptions, type context$3_ListJoinGroupRequestsRequest as ListJoinGroupRequestsRequest, type context$3_ListJoinGroupRequestsResponse as ListJoinGroupRequestsResponse, type context$3_ListJoinGroupRequestsResponseNonNullableFields as ListJoinGroupRequestsResponseNonNullableFields, type context$3_MemberJoinedGroup as MemberJoinedGroup, type context$3_MembersAddedToGroup as MembersAddedToGroup, type context$3_MembersInvitedToGroup as MembersInvitedToGroup, type MembershipQuestionAnswer$2 as MembershipQuestionAnswer, type context$3_MembershipQuestionViolationOptions as MembershipQuestionViolationOptions, type MessageEnvelope$2 as MessageEnvelope, OwnershipFilter$2 as OwnershipFilter, type Paging$3 as Paging, type PagingMetadata$3 as PagingMetadata, type context$3_PaidPlan as PaidPlan, type context$3_PricingPlanViolationOptions as PricingPlanViolationOptions, type Query$2 as Query, type context$3_QueryJoinGroupRequestsOptions as QueryJoinGroupRequestsOptions, type context$3_QueryJoinGroupRequestsRequest as QueryJoinGroupRequestsRequest, type context$3_QueryJoinGroupRequestsResponse as QueryJoinGroupRequestsResponse, type context$3_QueryJoinGroupRequestsResponseNonNullableFields as QueryJoinGroupRequestsResponseNonNullableFields, type context$3_RejectAllJoinGroupRequestsRequest as RejectAllJoinGroupRequestsRequest, type context$3_RejectAllJoinGroupRequestsResponse as RejectAllJoinGroupRequestsResponse, type context$3_RejectJoinGroupRequestsRequest as RejectJoinGroupRequestsRequest, type context$3_RejectJoinGroupRequestsResponse as RejectJoinGroupRequestsResponse, type context$3_RejectJoinGroupRequestsResponseNonNullableFields as RejectJoinGroupRequestsResponseNonNullableFields, type Rejection$2 as Rejection, type RequestDetails$2 as RequestDetails, RequestStatus$2 as RequestStatus, type RestoreInfo$2 as RestoreInfo, type context$3_SocialGroupsEvent as SocialGroupsEvent, type context$3_SocialGroupsEventPayloadOneOf as SocialGroupsEventPayloadOneOf, SortOrder$2 as SortOrder, type Sorting$2 as Sorting, type context$3_SubmitJoinGroupRequestRequest as SubmitJoinGroupRequestRequest, type context$3_SubmitJoinGroupRequestResponse as SubmitJoinGroupRequestResponse, type context$3_Violation as Violation, context$3_ViolationType as ViolationType, type context$3_ViolationViolationOptionsOneOf as ViolationViolationOptionsOneOf, WebhookIdentityType$2 as WebhookIdentityType, type context$3__publicOnJoinGroupRequestApprovedType as _publicOnJoinGroupRequestApprovedType, type context$3__publicOnJoinGroupRequestCreatedType as _publicOnJoinGroupRequestCreatedType, type context$3__publicOnJoinGroupRequestRejectedType as _publicOnJoinGroupRequestRejectedType, context$3_approveJoinGroupRequests as approveJoinGroupRequests, context$3_listJoinGroupRequests as listJoinGroupRequests, context$3_onJoinGroupRequestApproved as onJoinGroupRequestApproved, context$3_onJoinGroupRequestCreated as onJoinGroupRequestCreated, context$3_onJoinGroupRequestRejected as onJoinGroupRequestRejected, onJoinGroupRequestApproved$1 as publicOnJoinGroupRequestApproved, onJoinGroupRequestCreated$1 as publicOnJoinGroupRequestCreated, onJoinGroupRequestRejected$1 as publicOnJoinGroupRequestRejected, context$3_queryJoinGroupRequests as queryJoinGroupRequests, context$3_rejectJoinGroupRequests as rejectJoinGroupRequests };
|
|
4298
4552
|
}
|
|
4299
4553
|
|
|
4300
|
-
type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
|
|
4301
|
-
interface HttpClient$2 {
|
|
4302
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
4303
|
-
fetchWithAuth: typeof fetch;
|
|
4304
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
4305
|
-
}
|
|
4306
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
4307
|
-
type HttpResponse$2<T = any> = {
|
|
4308
|
-
data: T;
|
|
4309
|
-
status: number;
|
|
4310
|
-
statusText: string;
|
|
4311
|
-
headers: any;
|
|
4312
|
-
request?: any;
|
|
4313
|
-
};
|
|
4314
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
4315
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4316
|
-
url: string;
|
|
4317
|
-
data?: Data;
|
|
4318
|
-
params?: URLSearchParams;
|
|
4319
|
-
} & APIMetadata$2;
|
|
4320
|
-
type APIMetadata$2 = {
|
|
4321
|
-
methodFqn?: string;
|
|
4322
|
-
entityFqdn?: string;
|
|
4323
|
-
packageName?: string;
|
|
4324
|
-
};
|
|
4325
|
-
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
4326
|
-
|
|
4327
|
-
declare global {
|
|
4328
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4329
|
-
interface SymbolConstructor {
|
|
4330
|
-
readonly observable: symbol;
|
|
4331
|
-
}
|
|
4332
|
-
}
|
|
4333
|
-
|
|
4334
4554
|
/**
|
|
4335
4555
|
* Question asked to members when joining a group. Site owners can set whether it is required to answer the question in the dashboard.
|
|
4336
4556
|
* > **Note:** Only admins can create or update membership questions.
|
|
@@ -4448,7 +4668,7 @@ interface ListAnswersOptions {
|
|
|
4448
4668
|
paging?: Paging$2;
|
|
4449
4669
|
}
|
|
4450
4670
|
|
|
4451
|
-
declare function listMembershipQuestions$1(httpClient: HttpClient
|
|
4671
|
+
declare function listMembershipQuestions$1(httpClient: HttpClient): ListMembershipQuestionsSignature;
|
|
4452
4672
|
interface ListMembershipQuestionsSignature {
|
|
4453
4673
|
/**
|
|
4454
4674
|
* Retrieves the membership questions for the given group.
|
|
@@ -4459,7 +4679,7 @@ interface ListMembershipQuestionsSignature {
|
|
|
4459
4679
|
*/
|
|
4460
4680
|
(groupId: string): Promise<ListMembershipQuestionsResponse & ListMembershipQuestionsResponseNonNullableFields>;
|
|
4461
4681
|
}
|
|
4462
|
-
declare function createOrReplaceAllMembershipQuestions$1(httpClient: HttpClient
|
|
4682
|
+
declare function createOrReplaceAllMembershipQuestions$1(httpClient: HttpClient): CreateOrReplaceAllMembershipQuestionsSignature;
|
|
4463
4683
|
interface CreateOrReplaceAllMembershipQuestionsSignature {
|
|
4464
4684
|
/**
|
|
4465
4685
|
* Creates membership questions if none have been set up. Otherwise, replaces all existing questions.
|
|
@@ -4473,7 +4693,7 @@ interface CreateOrReplaceAllMembershipQuestionsSignature {
|
|
|
4473
4693
|
*/
|
|
4474
4694
|
(groupId: string, options?: CreateOrReplaceAllMembershipQuestionsOptions | undefined): Promise<CreateOrReplaceAllMembershipQuestionsResponse & CreateOrReplaceAllMembershipQuestionsResponseNonNullableFields>;
|
|
4475
4695
|
}
|
|
4476
|
-
declare function listAnswers$1(httpClient: HttpClient
|
|
4696
|
+
declare function listAnswers$1(httpClient: HttpClient): ListAnswersSignature;
|
|
4477
4697
|
interface ListAnswersSignature {
|
|
4478
4698
|
/**
|
|
4479
4699
|
* Retrieves the answers to the membership questions, given the provided filters.
|
|
@@ -4485,9 +4705,9 @@ interface ListAnswersSignature {
|
|
|
4485
4705
|
(groupId: string, options?: ListAnswersOptions | undefined): Promise<ListAnswersResponse & ListAnswersResponseNonNullableFields>;
|
|
4486
4706
|
}
|
|
4487
4707
|
|
|
4488
|
-
declare const listMembershipQuestions: BuildRESTFunction
|
|
4489
|
-
declare const createOrReplaceAllMembershipQuestions: BuildRESTFunction
|
|
4490
|
-
declare const listAnswers: BuildRESTFunction
|
|
4708
|
+
declare const listMembershipQuestions: MaybeContext<BuildRESTFunction<typeof listMembershipQuestions$1> & typeof listMembershipQuestions$1>;
|
|
4709
|
+
declare const createOrReplaceAllMembershipQuestions: MaybeContext<BuildRESTFunction<typeof createOrReplaceAllMembershipQuestions$1> & typeof createOrReplaceAllMembershipQuestions$1>;
|
|
4710
|
+
declare const listAnswers: MaybeContext<BuildRESTFunction<typeof listAnswers$1> & typeof listAnswers$1>;
|
|
4491
4711
|
|
|
4492
4712
|
type context$2_CreateOrReplaceAllMembershipQuestionsOptions = CreateOrReplaceAllMembershipQuestionsOptions;
|
|
4493
4713
|
type context$2_CreateOrReplaceAllMembershipQuestionsRequest = CreateOrReplaceAllMembershipQuestionsRequest;
|
|
@@ -4512,50 +4732,6 @@ declare namespace context$2 {
|
|
|
4512
4732
|
export { type context$2_CreateOrReplaceAllMembershipQuestionsOptions as CreateOrReplaceAllMembershipQuestionsOptions, type context$2_CreateOrReplaceAllMembershipQuestionsRequest as CreateOrReplaceAllMembershipQuestionsRequest, type context$2_CreateOrReplaceAllMembershipQuestionsResponse as CreateOrReplaceAllMembershipQuestionsResponse, type context$2_CreateOrReplaceAllMembershipQuestionsResponseNonNullableFields as CreateOrReplaceAllMembershipQuestionsResponseNonNullableFields, type context$2_ListAnswerCountsRequest as ListAnswerCountsRequest, type context$2_ListAnswerCountsResponse as ListAnswerCountsResponse, type context$2_ListAnswersOptions as ListAnswersOptions, type context$2_ListAnswersRequest as ListAnswersRequest, type context$2_ListAnswersResponse as ListAnswersResponse, type context$2_ListAnswersResponseNonNullableFields as ListAnswersResponseNonNullableFields, type context$2_ListMembershipQuestionsRequest as ListMembershipQuestionsRequest, type context$2_ListMembershipQuestionsResponse as ListMembershipQuestionsResponse, type context$2_ListMembershipQuestionsResponseNonNullableFields as ListMembershipQuestionsResponseNonNullableFields, type context$2_MemberAnswerCount as MemberAnswerCount, type context$2_MemberMembershipQuestionAnswers as MemberMembershipQuestionAnswers, type context$2_MembershipQuestion as MembershipQuestion, type MembershipQuestionAnswer$1 as MembershipQuestionAnswer, type Paging$2 as Paging, type PagingMetadata$2 as PagingMetadata, context$2_createOrReplaceAllMembershipQuestions as createOrReplaceAllMembershipQuestions, context$2_listAnswers as listAnswers, context$2_listMembershipQuestions as listMembershipQuestions };
|
|
4513
4733
|
}
|
|
4514
4734
|
|
|
4515
|
-
type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
|
|
4516
|
-
interface HttpClient$1 {
|
|
4517
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
4518
|
-
fetchWithAuth: typeof fetch;
|
|
4519
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
4520
|
-
}
|
|
4521
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
4522
|
-
type HttpResponse$1<T = any> = {
|
|
4523
|
-
data: T;
|
|
4524
|
-
status: number;
|
|
4525
|
-
statusText: string;
|
|
4526
|
-
headers: any;
|
|
4527
|
-
request?: any;
|
|
4528
|
-
};
|
|
4529
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
4530
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4531
|
-
url: string;
|
|
4532
|
-
data?: Data;
|
|
4533
|
-
params?: URLSearchParams;
|
|
4534
|
-
} & APIMetadata$1;
|
|
4535
|
-
type APIMetadata$1 = {
|
|
4536
|
-
methodFqn?: string;
|
|
4537
|
-
entityFqdn?: string;
|
|
4538
|
-
packageName?: string;
|
|
4539
|
-
};
|
|
4540
|
-
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
4541
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
4542
|
-
__type: 'event-definition';
|
|
4543
|
-
type: Type;
|
|
4544
|
-
isDomainEvent?: boolean;
|
|
4545
|
-
transformations?: (envelope: unknown) => Payload;
|
|
4546
|
-
__payload: Payload;
|
|
4547
|
-
};
|
|
4548
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
4549
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
4550
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
4551
|
-
|
|
4552
|
-
declare global {
|
|
4553
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4554
|
-
interface SymbolConstructor {
|
|
4555
|
-
readonly observable: symbol;
|
|
4556
|
-
}
|
|
4557
|
-
}
|
|
4558
|
-
|
|
4559
4735
|
/**
|
|
4560
4736
|
* >**Notes:**
|
|
4561
4737
|
* > + Site owners may set that members are not permitted to create groups in the Wix Groups application settings.
|
|
@@ -5178,7 +5354,7 @@ interface QueryCreateRequestsOptions {
|
|
|
5178
5354
|
query?: Query$1;
|
|
5179
5355
|
}
|
|
5180
5356
|
|
|
5181
|
-
declare function approveCreateRequests$1(httpClient: HttpClient
|
|
5357
|
+
declare function approveCreateRequests$1(httpClient: HttpClient): ApproveCreateRequestsSignature;
|
|
5182
5358
|
interface ApproveCreateRequestsSignature {
|
|
5183
5359
|
/**
|
|
5184
5360
|
* Approves Create Requests.
|
|
@@ -5186,7 +5362,7 @@ interface ApproveCreateRequestsSignature {
|
|
|
5186
5362
|
*/
|
|
5187
5363
|
(options?: ApproveCreateRequestsOptions | undefined): Promise<ApproveCreateRequestsResponse & ApproveCreateRequestsResponseNonNullableFields>;
|
|
5188
5364
|
}
|
|
5189
|
-
declare function rejectCreateRequests$1(httpClient: HttpClient
|
|
5365
|
+
declare function rejectCreateRequests$1(httpClient: HttpClient): RejectCreateRequestsSignature;
|
|
5190
5366
|
interface RejectCreateRequestsSignature {
|
|
5191
5367
|
/**
|
|
5192
5368
|
* Rejects Create Requests.
|
|
@@ -5194,14 +5370,14 @@ interface RejectCreateRequestsSignature {
|
|
|
5194
5370
|
*/
|
|
5195
5371
|
(options?: RejectCreateRequestsOptions | undefined): Promise<RejectCreateRequestsResponse & RejectCreateRequestsResponseNonNullableFields>;
|
|
5196
5372
|
}
|
|
5197
|
-
declare function listCreateRequests$1(httpClient: HttpClient
|
|
5373
|
+
declare function listCreateRequests$1(httpClient: HttpClient): ListCreateRequestsSignature;
|
|
5198
5374
|
interface ListCreateRequestsSignature {
|
|
5199
5375
|
/**
|
|
5200
5376
|
* Lists create requests across the site.
|
|
5201
5377
|
*/
|
|
5202
5378
|
(options?: ListCreateRequestsOptions | undefined): Promise<ListCreateRequestsResponse & ListCreateRequestsResponseNonNullableFields>;
|
|
5203
5379
|
}
|
|
5204
|
-
declare function queryCreateRequests$1(httpClient: HttpClient
|
|
5380
|
+
declare function queryCreateRequests$1(httpClient: HttpClient): QueryCreateRequestsSignature;
|
|
5205
5381
|
interface QueryCreateRequestsSignature {
|
|
5206
5382
|
/**
|
|
5207
5383
|
* Retrieves a list of create requests across the site.
|
|
@@ -5214,15 +5390,33 @@ interface QueryCreateRequestsSignature {
|
|
|
5214
5390
|
*/
|
|
5215
5391
|
(options?: QueryCreateRequestsOptions | undefined): Promise<QueryCreateRequestsResponse & QueryCreateRequestsResponseNonNullableFields>;
|
|
5216
5392
|
}
|
|
5217
|
-
declare const onCreateRequestApproved$1: EventDefinition$
|
|
5218
|
-
declare const onCreateRequestRejected$1: EventDefinition$
|
|
5393
|
+
declare const onCreateRequestApproved$1: EventDefinition$8<CreateRequestApprovedEnvelope, "wix.social_groups.v3.create_request_approved">;
|
|
5394
|
+
declare const onCreateRequestRejected$1: EventDefinition$8<CreateRequestRejectedEnvelope, "wix.social_groups.v3.create_request_rejected">;
|
|
5395
|
+
|
|
5396
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
5397
|
+
__type: 'event-definition';
|
|
5398
|
+
type: Type;
|
|
5399
|
+
isDomainEvent?: boolean;
|
|
5400
|
+
transformations?: (envelope: unknown) => Payload;
|
|
5401
|
+
__payload: Payload;
|
|
5402
|
+
};
|
|
5403
|
+
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
5404
|
+
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
5405
|
+
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
5406
|
+
|
|
5407
|
+
declare global {
|
|
5408
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
5409
|
+
interface SymbolConstructor {
|
|
5410
|
+
readonly observable: symbol;
|
|
5411
|
+
}
|
|
5412
|
+
}
|
|
5219
5413
|
|
|
5220
5414
|
declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
|
|
5221
5415
|
|
|
5222
|
-
declare const approveCreateRequests: BuildRESTFunction
|
|
5223
|
-
declare const rejectCreateRequests: BuildRESTFunction
|
|
5224
|
-
declare const listCreateRequests: BuildRESTFunction
|
|
5225
|
-
declare const queryCreateRequests: BuildRESTFunction
|
|
5416
|
+
declare const approveCreateRequests: MaybeContext<BuildRESTFunction<typeof approveCreateRequests$1> & typeof approveCreateRequests$1>;
|
|
5417
|
+
declare const rejectCreateRequests: MaybeContext<BuildRESTFunction<typeof rejectCreateRequests$1> & typeof rejectCreateRequests$1>;
|
|
5418
|
+
declare const listCreateRequests: MaybeContext<BuildRESTFunction<typeof listCreateRequests$1> & typeof listCreateRequests$1>;
|
|
5419
|
+
declare const queryCreateRequests: MaybeContext<BuildRESTFunction<typeof queryCreateRequests$1> & typeof queryCreateRequests$1>;
|
|
5226
5420
|
|
|
5227
5421
|
type _publicOnCreateRequestApprovedType = typeof onCreateRequestApproved$1;
|
|
5228
5422
|
/**
|
|
@@ -5296,50 +5490,6 @@ declare namespace context$1 {
|
|
|
5296
5490
|
export { type context$1_AccessRestriction as AccessRestriction, type context$1_AccessRestrictionDataOneOf as AccessRestrictionDataOneOf, type ActionEvent$1 as ActionEvent, context$1_AllowPolicy as AllowPolicy, type context$1_ApproveCreateRequestsOptions as ApproveCreateRequestsOptions, type context$1_ApproveCreateRequestsRequest as ApproveCreateRequestsRequest, type context$1_ApproveCreateRequestsResponse as ApproveCreateRequestsResponse, type context$1_ApproveCreateRequestsResponseNonNullableFields as ApproveCreateRequestsResponseNonNullableFields, type BaseEventMetadata$1 as BaseEventMetadata, type context$1_CancelCreateRequestRequest as CancelCreateRequestRequest, type context$1_CancelCreateRequestResponse as CancelCreateRequestResponse, type context$1_CoverImage as CoverImage, type context$1_CreateRequest as CreateRequest, type context$1_CreateRequestApproved as CreateRequestApproved, type context$1_CreateRequestApprovedEnvelope as CreateRequestApprovedEnvelope, type context$1_CreateRequestRejected as CreateRequestRejected, type context$1_CreateRequestRejectedEnvelope as CreateRequestRejectedEnvelope, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type context$1_Events as Events, type context$1_Group as Group, type context$1_GroupDetails as GroupDetails, type context$1_GroupDetailsPosition as GroupDetailsPosition, type context$1_GroupSettings as GroupSettings, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type context$1_Identity as Identity, context$1_IdentityType as IdentityType, type context$1_Image as Image, ItemsToUpdate$1 as ItemsToUpdate, type context$1_ListCreateRequestsOptions as ListCreateRequestsOptions, type context$1_ListCreateRequestsRequest as ListCreateRequestsRequest, type context$1_ListCreateRequestsResponse as ListCreateRequestsResponse, type context$1_ListCreateRequestsResponseNonNullableFields as ListCreateRequestsResponseNonNullableFields, type context$1_Logo as Logo, type MessageEnvelope$1 as MessageEnvelope, type context$1_OnboardingStepSettings as OnboardingStepSettings, OwnershipFilter$1 as OwnershipFilter, type Paging$1 as Paging, type PagingMetadata$1 as PagingMetadata, type context$1_Position as Position, context$1_PrivacyStatus as PrivacyStatus, type Query$1 as Query, type context$1_QueryCreateRequestsOptions as QueryCreateRequestsOptions, type context$1_QueryCreateRequestsRequest as QueryCreateRequestsRequest, type context$1_QueryCreateRequestsResponse as QueryCreateRequestsResponse, type context$1_QueryCreateRequestsResponseNonNullableFields as QueryCreateRequestsResponseNonNullableFields, type context$1_RejectCreateRequestsOptions as RejectCreateRequestsOptions, type context$1_RejectCreateRequestsRequest as RejectCreateRequestsRequest, type context$1_RejectCreateRequestsResponse as RejectCreateRequestsResponse, type context$1_RejectCreateRequestsResponseNonNullableFields as RejectCreateRequestsResponseNonNullableFields, type Rejection$1 as Rejection, type RequestDetails$1 as RequestDetails, RequestStatus$1 as RequestStatus, type RestoreInfo$1 as RestoreInfo, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, context$1_StepKey as StepKey, type context$1_SubmitCreateRequestRequest as SubmitCreateRequestRequest, type context$1_SubmitCreateRequestResponse as SubmitCreateRequestResponse, context$1_Type as Type, WebhookIdentityType$1 as WebhookIdentityType, type context$1__publicOnCreateRequestApprovedType as _publicOnCreateRequestApprovedType, type context$1__publicOnCreateRequestRejectedType as _publicOnCreateRequestRejectedType, context$1_approveCreateRequests as approveCreateRequests, context$1_listCreateRequests as listCreateRequests, context$1_onCreateRequestApproved as onCreateRequestApproved, context$1_onCreateRequestRejected as onCreateRequestRejected, onCreateRequestApproved$1 as publicOnCreateRequestApproved, onCreateRequestRejected$1 as publicOnCreateRequestRejected, context$1_queryCreateRequests as queryCreateRequests, context$1_rejectCreateRequests as rejectCreateRequests };
|
|
5297
5491
|
}
|
|
5298
5492
|
|
|
5299
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
5300
|
-
interface HttpClient {
|
|
5301
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
5302
|
-
fetchWithAuth: typeof fetch;
|
|
5303
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
5304
|
-
}
|
|
5305
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
5306
|
-
type HttpResponse<T = any> = {
|
|
5307
|
-
data: T;
|
|
5308
|
-
status: number;
|
|
5309
|
-
statusText: string;
|
|
5310
|
-
headers: any;
|
|
5311
|
-
request?: any;
|
|
5312
|
-
};
|
|
5313
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
5314
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
5315
|
-
url: string;
|
|
5316
|
-
data?: Data;
|
|
5317
|
-
params?: URLSearchParams;
|
|
5318
|
-
} & APIMetadata;
|
|
5319
|
-
type APIMetadata = {
|
|
5320
|
-
methodFqn?: string;
|
|
5321
|
-
entityFqdn?: string;
|
|
5322
|
-
packageName?: string;
|
|
5323
|
-
};
|
|
5324
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
5325
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
5326
|
-
__type: 'event-definition';
|
|
5327
|
-
type: Type;
|
|
5328
|
-
isDomainEvent?: boolean;
|
|
5329
|
-
transformations?: (envelope: unknown) => Payload;
|
|
5330
|
-
__payload: Payload;
|
|
5331
|
-
};
|
|
5332
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
5333
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
5334
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
5335
|
-
|
|
5336
|
-
declare global {
|
|
5337
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
5338
|
-
interface SymbolConstructor {
|
|
5339
|
-
readonly observable: symbol;
|
|
5340
|
-
}
|
|
5341
|
-
}
|
|
5342
|
-
|
|
5343
5493
|
/**
|
|
5344
5494
|
* To join a private group, a site member must submit a Join Request, which can be approved or rejected by an admin.
|
|
5345
5495
|
* When the request is approved, the site member becomes a group member.
|
|
@@ -5765,15 +5915,33 @@ interface QueryJoinRequestsSignature {
|
|
|
5765
5915
|
*/
|
|
5766
5916
|
(groupId: string, options?: QueryJoinRequestsOptions | undefined): Promise<QueryJoinRequestsResponse & QueryJoinRequestsResponseNonNullableFields>;
|
|
5767
5917
|
}
|
|
5768
|
-
declare const onJoinRequestApproved$1: EventDefinition<JoinRequestApprovedEnvelope, "wix.social_groups.v3.join_request_approved">;
|
|
5769
|
-
declare const onJoinRequestRejected$1: EventDefinition<JoinRequestRejectedEnvelope, "wix.social_groups.v3.join_request_rejected">;
|
|
5918
|
+
declare const onJoinRequestApproved$1: EventDefinition$8<JoinRequestApprovedEnvelope, "wix.social_groups.v3.join_request_approved">;
|
|
5919
|
+
declare const onJoinRequestRejected$1: EventDefinition$8<JoinRequestRejectedEnvelope, "wix.social_groups.v3.join_request_rejected">;
|
|
5920
|
+
|
|
5921
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
5922
|
+
__type: 'event-definition';
|
|
5923
|
+
type: Type;
|
|
5924
|
+
isDomainEvent?: boolean;
|
|
5925
|
+
transformations?: (envelope: unknown) => Payload;
|
|
5926
|
+
__payload: Payload;
|
|
5927
|
+
};
|
|
5928
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
5929
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
5930
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
5931
|
+
|
|
5932
|
+
declare global {
|
|
5933
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
5934
|
+
interface SymbolConstructor {
|
|
5935
|
+
readonly observable: symbol;
|
|
5936
|
+
}
|
|
5937
|
+
}
|
|
5770
5938
|
|
|
5771
5939
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
5772
5940
|
|
|
5773
|
-
declare const approveJoinRequests: BuildRESTFunction<typeof approveJoinRequests$1> & typeof approveJoinRequests$1
|
|
5774
|
-
declare const rejectJoinRequests: BuildRESTFunction<typeof rejectJoinRequests$1> & typeof rejectJoinRequests$1
|
|
5775
|
-
declare const listJoinRequests: BuildRESTFunction<typeof listJoinRequests$1> & typeof listJoinRequests$1
|
|
5776
|
-
declare const queryJoinRequests: BuildRESTFunction<typeof queryJoinRequests$1> & typeof queryJoinRequests$1
|
|
5941
|
+
declare const approveJoinRequests: MaybeContext<BuildRESTFunction<typeof approveJoinRequests$1> & typeof approveJoinRequests$1>;
|
|
5942
|
+
declare const rejectJoinRequests: MaybeContext<BuildRESTFunction<typeof rejectJoinRequests$1> & typeof rejectJoinRequests$1>;
|
|
5943
|
+
declare const listJoinRequests: MaybeContext<BuildRESTFunction<typeof listJoinRequests$1> & typeof listJoinRequests$1>;
|
|
5944
|
+
declare const queryJoinRequests: MaybeContext<BuildRESTFunction<typeof queryJoinRequests$1> & typeof queryJoinRequests$1>;
|
|
5777
5945
|
|
|
5778
5946
|
type _publicOnJoinRequestApprovedType = typeof onJoinRequestApproved$1;
|
|
5779
5947
|
/**
|