@wix/groups 1.0.100 → 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 +577 -67
- package/type-bundles/index.bundle.d.ts +577 -67
|
@@ -1,8 +1,47 @@
|
|
|
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
|
+
|
|
1
39
|
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2
40
|
interface HttpClient {
|
|
3
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
46
|
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
47
|
type HttpResponse<T = any> = {
|
|
@@ -24,16 +63,65 @@ type APIMetadata = {
|
|
|
24
63
|
packageName?: string;
|
|
25
64
|
};
|
|
26
65
|
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
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<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
35
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
36
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
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.
|
|
@@ -965,21 +1331,39 @@ interface QueryGroupsSignature {
|
|
|
965
1331
|
*/
|
|
966
1332
|
(options?: QueryGroupsOptions | undefined): GroupsQueryBuilder;
|
|
967
1333
|
}
|
|
968
|
-
declare const onGroupCreated$1: EventDefinition<GroupCreatedEnvelope, "wix.social_groups.v2.group_created">;
|
|
969
|
-
declare const onGroupUpdated$1: EventDefinition<GroupUpdatedEnvelope, "wix.social_groups.v2.group_updated">;
|
|
970
|
-
declare const onGroupCoverChanged$1: EventDefinition<GroupCoverChangedEnvelope, "wix.social_groups.v2.group_group_cover_changed">;
|
|
971
|
-
declare const onGroupDescriptionChanged$1: EventDefinition<GroupDescriptionChangedEnvelope, "wix.social_groups.v2.group_group_description_changed">;
|
|
972
|
-
declare const onGroupDeleted$1: EventDefinition<GroupDeletedEnvelope, "wix.social_groups.v2.group_deleted">;
|
|
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
|
-
declare function createEventModule$7<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
1358
|
+
declare function createEventModule$7<T extends EventDefinition$7<any, string>>(eventDefinition: T): BuildEventDefinition$7<T> & T;
|
|
975
1359
|
|
|
976
|
-
declare const createGroup: BuildRESTFunction<typeof createGroup$1> & typeof createGroup$1
|
|
977
|
-
declare const updateGroup: BuildRESTFunction<typeof updateGroup$1> & typeof updateGroup$1
|
|
978
|
-
declare const deleteGroup: BuildRESTFunction<typeof deleteGroup$1> & typeof deleteGroup$1
|
|
979
|
-
declare const getGroup: BuildRESTFunction<typeof getGroup$1> & typeof getGroup$1
|
|
980
|
-
declare const getGroupBySlug: BuildRESTFunction<typeof getGroupBySlug$1> & typeof getGroupBySlug$1
|
|
981
|
-
declare const listGroups: BuildRESTFunction<typeof listGroups$1> & typeof listGroups$1
|
|
982
|
-
declare const queryGroups: BuildRESTFunction<typeof queryGroups$1> & typeof queryGroups$1
|
|
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
|
/**
|
|
@@ -1781,17 +2165,35 @@ interface QueryMembershipsSignature {
|
|
|
1781
2165
|
*/
|
|
1782
2166
|
(memberId: string | null, options?: QueryMembershipsOptions | undefined): Promise<QueryMembershipsResponse & QueryMembershipsResponseNonNullableFields>;
|
|
1783
2167
|
}
|
|
1784
|
-
declare const onGroupMemberAdded$1: EventDefinition<GroupMemberAddedEnvelope, "wix.social_groups.v2.group_member_added">;
|
|
1785
|
-
declare const onGroupMemberRemoved$1: EventDefinition<GroupMemberRemovedEnvelope, "wix.social_groups.v2.group_member_removed">;
|
|
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">;
|
|
1786
2170
|
|
|
1787
|
-
|
|
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;
|
|
1788
2181
|
|
|
1789
|
-
declare
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
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
|
+
}
|
|
2188
|
+
|
|
2189
|
+
declare function createEventModule$6<T extends EventDefinition$6<any, string>>(eventDefinition: T): BuildEventDefinition$6<T> & T;
|
|
2190
|
+
|
|
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>;
|
|
1795
2197
|
|
|
1796
2198
|
type _publicOnGroupMemberAddedType = typeof onGroupMemberAdded$1;
|
|
1797
2199
|
/**
|
|
@@ -2629,16 +3031,34 @@ interface QueryGroupRequestsSignature {
|
|
|
2629
3031
|
*/
|
|
2630
3032
|
(options?: QueryGroupRequestsOptions | undefined): GroupRequestsQueryBuilder;
|
|
2631
3033
|
}
|
|
2632
|
-
declare const onGroupRequestCreated$1: EventDefinition<GroupRequestCreatedEnvelope, "wix.social_groups.v2.group_request_created">;
|
|
2633
|
-
declare const onGroupRequestApproved$1: EventDefinition<GroupRequestApprovedEnvelope, "wix.social_groups.v2.group_request_approved">;
|
|
2634
|
-
declare const onGroupRequestRejected$1: EventDefinition<GroupRequestRejectedEnvelope, "wix.social_groups.v2.group_request_rejected">;
|
|
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">;
|
|
2635
3037
|
|
|
2636
|
-
|
|
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;
|
|
2637
3048
|
|
|
2638
|
-
declare
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
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
|
+
}
|
|
3055
|
+
|
|
3056
|
+
declare function createEventModule$5<T extends EventDefinition$5<any, string>>(eventDefinition: T): BuildEventDefinition$5<T> & T;
|
|
3057
|
+
|
|
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>;
|
|
2642
3062
|
|
|
2643
3063
|
type _publicOnGroupRequestCreatedType = typeof onGroupRequestCreated$1;
|
|
2644
3064
|
/** */
|
|
@@ -3047,13 +3467,31 @@ interface UnassignRoleSignature {
|
|
|
3047
3467
|
*/
|
|
3048
3468
|
(groupId: string, memberIds: string[], role: GroupRole, options?: UnassignRoleOptions | undefined): Promise<UnassignRoleResponse & UnassignRoleResponseNonNullableFields>;
|
|
3049
3469
|
}
|
|
3050
|
-
declare const onGroupRoleAssigned$1: EventDefinition<GroupRoleAssignedEnvelope, "wix.social_groups.v2.group_role_assigned">;
|
|
3051
|
-
declare const onGroupRoleUnassigned$1: EventDefinition<GroupRoleUnassignedEnvelope, "wix.social_groups.v2.group_role_unassigned">;
|
|
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
|
+
}
|
|
3052
3490
|
|
|
3053
|
-
declare function createEventModule$4<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
3491
|
+
declare function createEventModule$4<T extends EventDefinition$4<any, string>>(eventDefinition: T): BuildEventDefinition$4<T> & T;
|
|
3054
3492
|
|
|
3055
|
-
declare const assignRole: BuildRESTFunction<typeof assignRole$1> & typeof assignRole$1
|
|
3056
|
-
declare const unassignRole: BuildRESTFunction<typeof unassignRole$1> & typeof unassignRole$1
|
|
3493
|
+
declare const assignRole: MaybeContext<BuildRESTFunction<typeof assignRole$1> & typeof assignRole$1>;
|
|
3494
|
+
declare const unassignRole: MaybeContext<BuildRESTFunction<typeof unassignRole$1> & typeof unassignRole$1>;
|
|
3057
3495
|
|
|
3058
3496
|
type _publicOnGroupRoleAssignedType = typeof onGroupRoleAssigned$1;
|
|
3059
3497
|
/**
|
|
@@ -3332,12 +3770,30 @@ interface CreateOrReplaceAllRulesSignature {
|
|
|
3332
3770
|
*/
|
|
3333
3771
|
(groupId: string, options?: CreateOrReplaceAllRulesOptions | undefined): Promise<CreateOrReplaceAllRulesResponse & CreateOrReplaceAllRulesResponseNonNullableFields>;
|
|
3334
3772
|
}
|
|
3335
|
-
declare const onGroupRulesUpdated$1: EventDefinition<GroupRulesUpdatedEnvelope, "wix.social_groups.v2.group_rules_updated">;
|
|
3773
|
+
declare const onGroupRulesUpdated$1: EventDefinition$8<GroupRulesUpdatedEnvelope, "wix.social_groups.v2.group_rules_updated">;
|
|
3336
3774
|
|
|
3337
|
-
|
|
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;
|
|
3338
3785
|
|
|
3339
|
-
declare
|
|
3340
|
-
|
|
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
|
+
}
|
|
3792
|
+
|
|
3793
|
+
declare function createEventModule$3<T extends EventDefinition$3<any, string>>(eventDefinition: T): BuildEventDefinition$3<T> & T;
|
|
3794
|
+
|
|
3795
|
+
declare const listRules: MaybeContext<BuildRESTFunction<typeof listRules$1> & typeof listRules$1>;
|
|
3796
|
+
declare const createOrReplaceAllRules: MaybeContext<BuildRESTFunction<typeof createOrReplaceAllRules$1> & typeof createOrReplaceAllRules$1>;
|
|
3341
3797
|
|
|
3342
3798
|
type _publicOnGroupRulesUpdatedType = typeof onGroupRulesUpdated$1;
|
|
3343
3799
|
/**
|
|
@@ -3986,16 +4442,34 @@ interface QueryJoinGroupRequestsSignature {
|
|
|
3986
4442
|
*/
|
|
3987
4443
|
(groupId: string, options?: QueryJoinGroupRequestsOptions | undefined): JoinGroupRequestsQueryBuilder;
|
|
3988
4444
|
}
|
|
3989
|
-
declare const onJoinGroupRequestCreated$1: EventDefinition<JoinGroupRequestCreatedEnvelope, "wix.social_groups.v2.join_group_request_created">;
|
|
3990
|
-
declare const onJoinGroupRequestApproved$1: EventDefinition<JoinGroupRequestApprovedEnvelope, "wix.social_groups.v2.join_group_request_approved">;
|
|
3991
|
-
declare const onJoinGroupRequestRejected$1: EventDefinition<JoinGroupRequestRejectedEnvelope, "wix.social_groups.v2.join_group_request_rejected">;
|
|
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
|
+
}
|
|
3992
4466
|
|
|
3993
|
-
declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4467
|
+
declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
|
|
3994
4468
|
|
|
3995
|
-
declare const approveJoinGroupRequests: BuildRESTFunction<typeof approveJoinGroupRequests$1> & typeof approveJoinGroupRequests$1
|
|
3996
|
-
declare const rejectJoinGroupRequests: BuildRESTFunction<typeof rejectJoinGroupRequests$1> & typeof rejectJoinGroupRequests$1
|
|
3997
|
-
declare const listJoinGroupRequests: BuildRESTFunction<typeof listJoinGroupRequests$1> & typeof listJoinGroupRequests$1
|
|
3998
|
-
declare const queryJoinGroupRequests: BuildRESTFunction<typeof queryJoinGroupRequests$1> & typeof queryJoinGroupRequests$1
|
|
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>;
|
|
3999
4473
|
|
|
4000
4474
|
type _publicOnJoinGroupRequestCreatedType = typeof onJoinGroupRequestCreated$1;
|
|
4001
4475
|
/** */
|
|
@@ -4231,9 +4705,9 @@ interface ListAnswersSignature {
|
|
|
4231
4705
|
(groupId: string, options?: ListAnswersOptions | undefined): Promise<ListAnswersResponse & ListAnswersResponseNonNullableFields>;
|
|
4232
4706
|
}
|
|
4233
4707
|
|
|
4234
|
-
declare const listMembershipQuestions: BuildRESTFunction<typeof listMembershipQuestions$1> & typeof listMembershipQuestions$1
|
|
4235
|
-
declare const createOrReplaceAllMembershipQuestions: BuildRESTFunction<typeof createOrReplaceAllMembershipQuestions$1> & typeof createOrReplaceAllMembershipQuestions$1
|
|
4236
|
-
declare const listAnswers: BuildRESTFunction<typeof listAnswers$1> & typeof listAnswers$1
|
|
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>;
|
|
4237
4711
|
|
|
4238
4712
|
type index_d$2_CreateOrReplaceAllMembershipQuestionsOptions = CreateOrReplaceAllMembershipQuestionsOptions;
|
|
4239
4713
|
type index_d$2_CreateOrReplaceAllMembershipQuestionsRequest = CreateOrReplaceAllMembershipQuestionsRequest;
|
|
@@ -4916,15 +5390,33 @@ interface QueryCreateRequestsSignature {
|
|
|
4916
5390
|
*/
|
|
4917
5391
|
(options?: QueryCreateRequestsOptions | undefined): Promise<QueryCreateRequestsResponse & QueryCreateRequestsResponseNonNullableFields>;
|
|
4918
5392
|
}
|
|
4919
|
-
declare const onCreateRequestApproved$1: EventDefinition<CreateRequestApprovedEnvelope, "wix.social_groups.v3.create_request_approved">;
|
|
4920
|
-
declare const onCreateRequestRejected$1: EventDefinition<CreateRequestRejectedEnvelope, "wix.social_groups.v3.create_request_rejected">;
|
|
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
|
+
}
|
|
4921
5413
|
|
|
4922
|
-
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
5414
|
+
declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
|
|
4923
5415
|
|
|
4924
|
-
declare const approveCreateRequests: BuildRESTFunction<typeof approveCreateRequests$1> & typeof approveCreateRequests$1
|
|
4925
|
-
declare const rejectCreateRequests: BuildRESTFunction<typeof rejectCreateRequests$1> & typeof rejectCreateRequests$1
|
|
4926
|
-
declare const listCreateRequests: BuildRESTFunction<typeof listCreateRequests$1> & typeof listCreateRequests$1
|
|
4927
|
-
declare const queryCreateRequests: BuildRESTFunction<typeof queryCreateRequests$1> & typeof queryCreateRequests$1
|
|
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>;
|
|
4928
5420
|
|
|
4929
5421
|
type _publicOnCreateRequestApprovedType = typeof onCreateRequestApproved$1;
|
|
4930
5422
|
/**
|
|
@@ -5423,15 +5915,33 @@ interface QueryJoinRequestsSignature {
|
|
|
5423
5915
|
*/
|
|
5424
5916
|
(groupId: string, options?: QueryJoinRequestsOptions | undefined): Promise<QueryJoinRequestsResponse & QueryJoinRequestsResponseNonNullableFields>;
|
|
5425
5917
|
}
|
|
5426
|
-
declare const onJoinRequestApproved$1: EventDefinition<JoinRequestApprovedEnvelope, "wix.social_groups.v3.join_request_approved">;
|
|
5427
|
-
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
|
+
}
|
|
5428
5938
|
|
|
5429
5939
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
5430
5940
|
|
|
5431
|
-
declare const approveJoinRequests: BuildRESTFunction<typeof approveJoinRequests$1> & typeof approveJoinRequests$1
|
|
5432
|
-
declare const rejectJoinRequests: BuildRESTFunction<typeof rejectJoinRequests$1> & typeof rejectJoinRequests$1
|
|
5433
|
-
declare const listJoinRequests: BuildRESTFunction<typeof listJoinRequests$1> & typeof listJoinRequests$1
|
|
5434
|
-
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>;
|
|
5435
5945
|
|
|
5436
5946
|
type _publicOnJoinRequestApprovedType = typeof onJoinRequestApproved$1;
|
|
5437
5947
|
/**
|