@wix/reports 1.0.0

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.
@@ -0,0 +1,1221 @@
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 name of the environment, use for logging
17
+ */
18
+ name?: string;
19
+ /**
20
+ * Optional bast url to use for API requests, for example `www.wixapis.com`
21
+ */
22
+ apiBaseUrl?: string;
23
+ /**
24
+ * Possible data to be provided by every host, for cross cutting concerns
25
+ * like internationalization, billing, etc.
26
+ */
27
+ essentials?: {
28
+ /**
29
+ * The language of the currently viewed session
30
+ */
31
+ language?: string;
32
+ /**
33
+ * The locale of the currently viewed session
34
+ */
35
+ locale?: string;
36
+ /**
37
+ * Any headers that should be passed through to the API requests
38
+ */
39
+ passThroughHeaders?: Record<string, string>;
40
+ };
41
+ };
42
+
43
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
44
+ interface HttpClient {
45
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
46
+ fetchWithAuth: typeof fetch;
47
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
48
+ getActiveToken?: () => string | undefined;
49
+ }
50
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
51
+ type HttpResponse<T = any> = {
52
+ data: T;
53
+ status: number;
54
+ statusText: string;
55
+ headers: any;
56
+ request?: any;
57
+ };
58
+ type RequestOptions<_TResponse = any, Data = any> = {
59
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
60
+ url: string;
61
+ data?: Data;
62
+ params?: URLSearchParams;
63
+ } & APIMetadata;
64
+ type APIMetadata = {
65
+ methodFqn?: string;
66
+ entityFqdn?: string;
67
+ packageName?: string;
68
+ };
69
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
70
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
71
+ __type: 'event-definition';
72
+ type: Type;
73
+ isDomainEvent?: boolean;
74
+ transformations?: (envelope: unknown) => Payload;
75
+ __payload: Payload;
76
+ };
77
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
78
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
79
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
80
+
81
+ type ServicePluginMethodInput = {
82
+ request: any;
83
+ metadata: any;
84
+ };
85
+ type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
86
+ type ServicePluginMethodMetadata = {
87
+ name: string;
88
+ primaryHttpMappingPath: string;
89
+ transformations: {
90
+ fromREST: (...args: unknown[]) => ServicePluginMethodInput;
91
+ toREST: (...args: unknown[]) => unknown;
92
+ };
93
+ };
94
+ type ServicePluginDefinition<Contract extends ServicePluginContract> = {
95
+ __type: 'service-plugin-definition';
96
+ componentType: string;
97
+ methods: ServicePluginMethodMetadata[];
98
+ __contract: Contract;
99
+ };
100
+ declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
101
+ type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
102
+ declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
103
+
104
+ type RequestContext = {
105
+ isSSR: boolean;
106
+ host: string;
107
+ protocol?: string;
108
+ };
109
+ type ResponseTransformer = (data: any, headers?: any) => any;
110
+ /**
111
+ * Ambassador request options types are copied mostly from AxiosRequestConfig.
112
+ * They are copied and not imported to reduce the amount of dependencies (to reduce install time).
113
+ * https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
114
+ */
115
+ type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
116
+ type AmbassadorRequestOptions<T = any> = {
117
+ _?: T;
118
+ url?: string;
119
+ method?: Method;
120
+ params?: any;
121
+ data?: any;
122
+ transformResponse?: ResponseTransformer | ResponseTransformer[];
123
+ };
124
+ type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
125
+ __isAmbassador: boolean;
126
+ };
127
+ type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
128
+ type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
129
+
130
+ declare global {
131
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
132
+ interface SymbolConstructor {
133
+ readonly observable: symbol;
134
+ }
135
+ }
136
+
137
+ declare const emptyObjectSymbol: unique symbol;
138
+
139
+ /**
140
+ Represents a strictly empty plain object, the `{}` value.
141
+
142
+ 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)).
143
+
144
+ @example
145
+ ```
146
+ import type {EmptyObject} from 'type-fest';
147
+
148
+ // The following illustrates the problem with `{}`.
149
+ const foo1: {} = {}; // Pass
150
+ const foo2: {} = []; // Pass
151
+ const foo3: {} = 42; // Pass
152
+ const foo4: {} = {a: 1}; // Pass
153
+
154
+ // With `EmptyObject` only the first case is valid.
155
+ const bar1: EmptyObject = {}; // Pass
156
+ const bar2: EmptyObject = 42; // Fail
157
+ const bar3: EmptyObject = []; // Fail
158
+ const bar4: EmptyObject = {a: 1}; // Fail
159
+ ```
160
+
161
+ 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}.
162
+
163
+ @category Object
164
+ */
165
+ type EmptyObject = {[emptyObjectSymbol]?: never};
166
+
167
+ /**
168
+ Returns a boolean for whether the two given types are equal.
169
+
170
+ @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
171
+ @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
172
+
173
+ Use-cases:
174
+ - If you want to make a conditional branch based on the result of a comparison of two types.
175
+
176
+ @example
177
+ ```
178
+ import type {IsEqual} from 'type-fest';
179
+
180
+ // This type returns a boolean for whether the given array includes the given item.
181
+ // `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
182
+ type Includes<Value extends readonly any[], Item> =
183
+ Value extends readonly [Value[0], ...infer rest]
184
+ ? IsEqual<Value[0], Item> extends true
185
+ ? true
186
+ : Includes<rest, Item>
187
+ : false;
188
+ ```
189
+
190
+ @category Type Guard
191
+ @category Utilities
192
+ */
193
+ type IsEqual<A, B> =
194
+ (<G>() => G extends A ? 1 : 2) extends
195
+ (<G>() => G extends B ? 1 : 2)
196
+ ? true
197
+ : false;
198
+
199
+ /**
200
+ Filter out keys from an object.
201
+
202
+ Returns `never` if `Exclude` is strictly equal to `Key`.
203
+ Returns `never` if `Key` extends `Exclude`.
204
+ Returns `Key` otherwise.
205
+
206
+ @example
207
+ ```
208
+ type Filtered = Filter<'foo', 'foo'>;
209
+ //=> never
210
+ ```
211
+
212
+ @example
213
+ ```
214
+ type Filtered = Filter<'bar', string>;
215
+ //=> never
216
+ ```
217
+
218
+ @example
219
+ ```
220
+ type Filtered = Filter<'bar', 'foo'>;
221
+ //=> 'bar'
222
+ ```
223
+
224
+ @see {Except}
225
+ */
226
+ type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
227
+
228
+ type ExceptOptions = {
229
+ /**
230
+ Disallow assigning non-specified properties.
231
+
232
+ Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
233
+
234
+ @default false
235
+ */
236
+ requireExactProps?: boolean;
237
+ };
238
+
239
+ /**
240
+ Create a type from an object type without certain keys.
241
+
242
+ We recommend setting the `requireExactProps` option to `true`.
243
+
244
+ 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.
245
+
246
+ 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)).
247
+
248
+ @example
249
+ ```
250
+ import type {Except} from 'type-fest';
251
+
252
+ type Foo = {
253
+ a: number;
254
+ b: string;
255
+ };
256
+
257
+ type FooWithoutA = Except<Foo, 'a'>;
258
+ //=> {b: string}
259
+
260
+ const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
261
+ //=> errors: 'a' does not exist in type '{ b: string; }'
262
+
263
+ type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
264
+ //=> {a: number} & Partial<Record<"b", never>>
265
+
266
+ const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
267
+ //=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
268
+ ```
269
+
270
+ @category Object
271
+ */
272
+ type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
273
+ [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
274
+ } & (Options['requireExactProps'] extends true
275
+ ? Partial<Record<KeysType, never>>
276
+ : {});
277
+
278
+ /**
279
+ Returns a boolean for whether the given type is `never`.
280
+
281
+ @link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
282
+ @link https://stackoverflow.com/a/53984913/10292952
283
+ @link https://www.zhenghao.io/posts/ts-never
284
+
285
+ Useful in type utilities, such as checking if something does not occur.
286
+
287
+ @example
288
+ ```
289
+ import type {IsNever, And} from 'type-fest';
290
+
291
+ // https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
292
+ type AreStringsEqual<A extends string, B extends string> =
293
+ And<
294
+ IsNever<Exclude<A, B>> extends true ? true : false,
295
+ IsNever<Exclude<B, A>> extends true ? true : false
296
+ >;
297
+
298
+ type EndIfEqual<I extends string, O extends string> =
299
+ AreStringsEqual<I, O> extends true
300
+ ? never
301
+ : void;
302
+
303
+ function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
304
+ if (input === output) {
305
+ process.exit(0);
306
+ }
307
+ }
308
+
309
+ endIfEqual('abc', 'abc');
310
+ //=> never
311
+
312
+ endIfEqual('abc', '123');
313
+ //=> void
314
+ ```
315
+
316
+ @category Type Guard
317
+ @category Utilities
318
+ */
319
+ type IsNever<T> = [T] extends [never] ? true : false;
320
+
321
+ /**
322
+ An if-else-like type that resolves depending on whether the given type is `never`.
323
+
324
+ @see {@link IsNever}
325
+
326
+ @example
327
+ ```
328
+ import type {IfNever} from 'type-fest';
329
+
330
+ type ShouldBeTrue = IfNever<never>;
331
+ //=> true
332
+
333
+ type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
334
+ //=> 'bar'
335
+ ```
336
+
337
+ @category Type Guard
338
+ @category Utilities
339
+ */
340
+ type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
341
+ IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
342
+ );
343
+
344
+ /**
345
+ Extract the keys from a type where the value type of the key extends the given `Condition`.
346
+
347
+ Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
348
+
349
+ @example
350
+ ```
351
+ import type {ConditionalKeys} from 'type-fest';
352
+
353
+ interface Example {
354
+ a: string;
355
+ b: string | number;
356
+ c?: string;
357
+ d: {};
358
+ }
359
+
360
+ type StringKeysOnly = ConditionalKeys<Example, string>;
361
+ //=> 'a'
362
+ ```
363
+
364
+ To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
365
+
366
+ @example
367
+ ```
368
+ import type {ConditionalKeys} from 'type-fest';
369
+
370
+ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
371
+ //=> 'a' | 'c'
372
+ ```
373
+
374
+ @category Object
375
+ */
376
+ type ConditionalKeys<Base, Condition> =
377
+ {
378
+ // Map through all the keys of the given base type.
379
+ [Key in keyof Base]-?:
380
+ // Pick only keys with types extending the given `Condition` type.
381
+ Base[Key] extends Condition
382
+ // Retain this key
383
+ // If the value for the key extends never, only include it if `Condition` also extends never
384
+ ? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
385
+ // Discard this key since the condition fails.
386
+ : never;
387
+ // Convert the produced object into a union type of the keys which passed the conditional test.
388
+ }[keyof Base];
389
+
390
+ /**
391
+ Exclude keys from a shape that matches the given `Condition`.
392
+
393
+ 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.
394
+
395
+ @example
396
+ ```
397
+ import type {Primitive, ConditionalExcept} from 'type-fest';
398
+
399
+ class Awesome {
400
+ name: string;
401
+ successes: number;
402
+ failures: bigint;
403
+
404
+ run() {}
405
+ }
406
+
407
+ type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
408
+ //=> {run: () => void}
409
+ ```
410
+
411
+ @example
412
+ ```
413
+ import type {ConditionalExcept} from 'type-fest';
414
+
415
+ interface Example {
416
+ a: string;
417
+ b: string | number;
418
+ c: () => void;
419
+ d: {};
420
+ }
421
+
422
+ type NonStringKeysOnly = ConditionalExcept<Example, string>;
423
+ //=> {b: string | number; c: () => void; d: {}}
424
+ ```
425
+
426
+ @category Object
427
+ */
428
+ type ConditionalExcept<Base, Condition> = Except<
429
+ Base,
430
+ ConditionalKeys<Base, Condition>
431
+ >;
432
+
433
+ /**
434
+ * Descriptors are objects that describe the API of a module, and the module
435
+ * can either be a REST module or a host module.
436
+ * This type is recursive, so it can describe nested modules.
437
+ */
438
+ type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
439
+ [key: string]: Descriptors | PublicMetadata | any;
440
+ };
441
+ /**
442
+ * This type takes in a descriptors object of a certain Host (including an `unknown` host)
443
+ * and returns an object with the same structure, but with all descriptors replaced with their API.
444
+ * Any non-descriptor properties are removed from the returned object, including descriptors that
445
+ * do not match the given host (as they will not work with the given host).
446
+ */
447
+ type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
448
+ done: T;
449
+ recurse: T extends {
450
+ __type: typeof SERVICE_PLUGIN_ERROR_TYPE;
451
+ } ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition<any> ? BuildEventDefinition<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
452
+ [Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
453
+ -1,
454
+ 0,
455
+ 1,
456
+ 2,
457
+ 3,
458
+ 4,
459
+ 5
460
+ ][Depth]> : never;
461
+ }, EmptyObject>;
462
+ }[Depth extends -1 ? 'done' : 'recurse'];
463
+ type PublicMetadata = {
464
+ PACKAGE_NAME?: string;
465
+ };
466
+
467
+ declare global {
468
+ interface ContextualClient {
469
+ }
470
+ }
471
+ /**
472
+ * A type used to create concerete types from SDK descriptors in
473
+ * case a contextual client is available.
474
+ */
475
+ type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
476
+ host: Host;
477
+ } ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
478
+
479
+ /**
480
+ * A Report is an entity defining a UoU complaint with a reason on the site
481
+ * You can report an entity from a select number of reasons, also providing details for the report
482
+ */
483
+ interface Report {
484
+ /**
485
+ * Report ID.
486
+ * @readonly
487
+ */
488
+ _id?: string | null;
489
+ /** Reported entity name */
490
+ entityName?: string;
491
+ /** Reported entity ID */
492
+ entityId?: string;
493
+ /**
494
+ * Identity of who made a report
495
+ * @readonly
496
+ */
497
+ identity?: CommonIdentificationData;
498
+ /** Reason for the report */
499
+ reason?: Reason;
500
+ /**
501
+ * Revision number, which increments by 1 each time the Report is updated.
502
+ * @readonly
503
+ */
504
+ revision?: string | null;
505
+ /**
506
+ * Date and time the Report was created.
507
+ * @readonly
508
+ */
509
+ _createdDate?: Date | null;
510
+ /**
511
+ * Date and time the Report was last updated.
512
+ * @readonly
513
+ */
514
+ _updatedDate?: Date | null;
515
+ /** Data Extensions */
516
+ extendedFields?: ExtendedFields;
517
+ }
518
+ interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
519
+ /** ID of a site visitor that has not logged in to the site. */
520
+ anonymousVisitorId?: string;
521
+ /** ID of a site visitor that has logged in to the site. */
522
+ memberId?: string;
523
+ /**
524
+ * Identity type
525
+ * @readonly
526
+ */
527
+ identityType?: IdentityType;
528
+ }
529
+ /** @oneof */
530
+ interface CommonIdentificationDataIdOneOf {
531
+ /** ID of a site visitor that has not logged in to the site. */
532
+ anonymousVisitorId?: string;
533
+ /** ID of a site visitor that has logged in to the site. */
534
+ memberId?: string;
535
+ }
536
+ declare enum IdentityType {
537
+ UNKNOWN = "UNKNOWN",
538
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
539
+ MEMBER = "MEMBER",
540
+ WIX_USER = "WIX_USER",
541
+ APP = "APP"
542
+ }
543
+ interface Reason {
544
+ /** Type of reason selected for the report */
545
+ reasonType?: Type;
546
+ /** Optional details provided alongside the report */
547
+ details?: string | null;
548
+ }
549
+ declare enum Type {
550
+ UNKNOWN_TYPE = "UNKNOWN_TYPE",
551
+ OTHER = "OTHER",
552
+ SPAM = "SPAM",
553
+ NUDITY_OR_SEXUAL_HARASSMENT = "NUDITY_OR_SEXUAL_HARASSMENT",
554
+ HATE_SPEECH_OR_SYMBOLS = "HATE_SPEECH_OR_SYMBOLS",
555
+ FALSE_INFORMATION = "FALSE_INFORMATION",
556
+ COMMUNITY_GUIDELINES_VIOLATION = "COMMUNITY_GUIDELINES_VIOLATION",
557
+ VIOLENCE = "VIOLENCE",
558
+ SUICIDE_OR_SELF_INJURY = "SUICIDE_OR_SELF_INJURY",
559
+ UNAUTHORIZED_SALES = "UNAUTHORIZED_SALES",
560
+ EATING_DISORDER = "EATING_DISORDER",
561
+ INVOLVES_A_CHILD = "INVOLVES_A_CHILD",
562
+ TERRORISM = "TERRORISM",
563
+ DRUGS = "DRUGS",
564
+ UNLAWFUL = "UNLAWFUL",
565
+ EXPOSING_IDENTIFYING_INFO = "EXPOSING_IDENTIFYING_INFO"
566
+ }
567
+ interface ExtendedFields {
568
+ /**
569
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
570
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
571
+ *
572
+ * You can only access fields for which you have the appropriate permissions.
573
+ *
574
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
575
+ */
576
+ namespaces?: Record<string, Record<string, any>>;
577
+ }
578
+ interface EntityReportSummaryChanged {
579
+ /** Reported entity name */
580
+ entityName?: string;
581
+ /** Reported entity ID */
582
+ entityId?: string;
583
+ /** Report count */
584
+ reportCount?: number;
585
+ /** Report count per reason type */
586
+ reasonCounts?: ReasonCount[];
587
+ }
588
+ interface ReasonCount {
589
+ /** Reason type */
590
+ reasonType?: Type;
591
+ /** Report count */
592
+ count?: number;
593
+ }
594
+ interface CreateReportRequest {
595
+ /** Report to be created. */
596
+ report: Report;
597
+ }
598
+ interface CreateReportResponse {
599
+ /** The created Report. */
600
+ report?: Report;
601
+ }
602
+ interface GetReportRequest {
603
+ /** ID of the Report to retrieve. */
604
+ reportId: string;
605
+ }
606
+ interface GetReportResponse {
607
+ /** The requested Report. */
608
+ report?: Report;
609
+ }
610
+ interface UpdateReportRequest {
611
+ /** Report to be updated, may be partial. */
612
+ report: Report;
613
+ }
614
+ interface UpdateReportResponse {
615
+ /** Updated Report. */
616
+ report?: Report;
617
+ }
618
+ interface DeleteReportRequest {
619
+ /** Id of the Report to delete. */
620
+ reportId: string;
621
+ }
622
+ interface DeleteReportResponse {
623
+ }
624
+ interface UpsertReportRequest {
625
+ /** Report to be upserted. */
626
+ report?: Report;
627
+ }
628
+ interface UpsertReportResponse {
629
+ /** Updated or created Report. */
630
+ report?: Report;
631
+ }
632
+ interface BulkDeleteReportsByFilterRequest {
633
+ /** Filter for which reports to delete */
634
+ filter: Record<string, any> | null;
635
+ }
636
+ interface BulkDeleteReportsByFilterResponse {
637
+ /** Reference to async job ID */
638
+ jobId?: string;
639
+ }
640
+ interface CountReportsByReasonTypesRequest {
641
+ /** Entity name */
642
+ entityName: string;
643
+ /** ID of the entity. */
644
+ entityId: string;
645
+ }
646
+ interface CountReportsByReasonTypesResponse {
647
+ /** The list of entity reports grouped by report reason. */
648
+ reasonTypeCount?: ReasonTypeCount[];
649
+ }
650
+ interface ReasonTypeCount {
651
+ /** Type of reason selected for the report */
652
+ reasonType?: Type;
653
+ /** Report count */
654
+ count?: number;
655
+ }
656
+ interface QueryReportsRequest {
657
+ /** WQL expression. */
658
+ query?: CursorQuery;
659
+ }
660
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
661
+ /** Cursor paging options */
662
+ cursorPaging?: CursorPaging;
663
+ /** Filter object. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information. */
664
+ filter?: Record<string, any> | null;
665
+ /** Sorting options */
666
+ sort?: Sorting[];
667
+ }
668
+ /** @oneof */
669
+ interface CursorQueryPagingMethodOneOf {
670
+ /** Cursor paging options */
671
+ cursorPaging?: CursorPaging;
672
+ }
673
+ interface Sorting {
674
+ /** Name of the field to sort by. */
675
+ fieldName?: string;
676
+ /** Sort order. */
677
+ order?: SortOrder;
678
+ }
679
+ declare enum SortOrder {
680
+ ASC = "ASC",
681
+ DESC = "DESC"
682
+ }
683
+ interface CursorPaging {
684
+ /** Maximum number of items to return in the results. */
685
+ limit?: number | null;
686
+ /**
687
+ * Pointer to the next or previous page in the list of results.
688
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
689
+ */
690
+ cursor?: string | null;
691
+ }
692
+ interface QueryReportsResponse {
693
+ /** List of Reports. */
694
+ reports?: Report[];
695
+ /** Paging metadata */
696
+ pagingMetadata?: CursorPagingMetadata;
697
+ }
698
+ interface CursorPagingMetadata {
699
+ /** Number of items returned in the response. */
700
+ count?: number | null;
701
+ /** Cursor strings that point to the next page, previous page, or both. */
702
+ cursors?: Cursors;
703
+ /** Whether there are more pages to retrieve following the current page. */
704
+ hasNext?: boolean | null;
705
+ }
706
+ interface Cursors {
707
+ /** Cursor string pointing to the next page in the list of results. */
708
+ next?: string | null;
709
+ /** Cursor pointing to the previous page in the list of results. */
710
+ prev?: string | null;
711
+ }
712
+ interface UpdateExtendedFieldsRequest {
713
+ /** ID of the entity to update. */
714
+ _id: string;
715
+ /** Identifier for the app whose extended fields are being updated. */
716
+ namespace: string;
717
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
718
+ namespaceData: Record<string, any> | null;
719
+ }
720
+ interface UpdateExtendedFieldsResponse {
721
+ /** Updated Report. */
722
+ report?: Report;
723
+ }
724
+ interface DomainEvent extends DomainEventBodyOneOf {
725
+ createdEvent?: EntityCreatedEvent;
726
+ updatedEvent?: EntityUpdatedEvent;
727
+ deletedEvent?: EntityDeletedEvent;
728
+ actionEvent?: ActionEvent;
729
+ /**
730
+ * Unique event ID.
731
+ * Allows clients to ignore duplicate webhooks.
732
+ */
733
+ _id?: string;
734
+ /**
735
+ * Assumes actions are also always typed to an entity_type
736
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
737
+ */
738
+ entityFqdn?: string;
739
+ /**
740
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
741
+ * This is although the created/updated/deleted notion is duplication of the oneof types
742
+ * Example: created/updated/deleted/started/completed/email_opened
743
+ */
744
+ slug?: string;
745
+ /** ID of the entity associated with the event. */
746
+ entityId?: string;
747
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
748
+ eventTime?: Date | null;
749
+ /**
750
+ * Whether the event was triggered as a result of a privacy regulation application
751
+ * (for example, GDPR).
752
+ */
753
+ triggeredByAnonymizeRequest?: boolean | null;
754
+ /** If present, indicates the action that triggered the event. */
755
+ originatedFrom?: string | null;
756
+ /**
757
+ * A sequence number defining the order of updates to the underlying entity.
758
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
759
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
760
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
761
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
762
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
763
+ */
764
+ entityEventSequence?: string | null;
765
+ }
766
+ /** @oneof */
767
+ interface DomainEventBodyOneOf {
768
+ createdEvent?: EntityCreatedEvent;
769
+ updatedEvent?: EntityUpdatedEvent;
770
+ deletedEvent?: EntityDeletedEvent;
771
+ actionEvent?: ActionEvent;
772
+ }
773
+ interface EntityCreatedEvent {
774
+ entity?: string;
775
+ }
776
+ interface RestoreInfo {
777
+ deletedDate?: Date | null;
778
+ }
779
+ interface EntityUpdatedEvent {
780
+ /**
781
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
782
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
783
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
784
+ */
785
+ currentEntity?: string;
786
+ }
787
+ interface EntityDeletedEvent {
788
+ /** Entity that was deleted */
789
+ deletedEntity?: string | null;
790
+ }
791
+ interface ActionEvent {
792
+ body?: string;
793
+ }
794
+ interface Empty {
795
+ }
796
+ interface MessageEnvelope {
797
+ /** App instance ID. */
798
+ instanceId?: string | null;
799
+ /** Event type. */
800
+ eventType?: string;
801
+ /** The identification type and identity data. */
802
+ identity?: IdentificationData;
803
+ /** Stringify payload. */
804
+ data?: string;
805
+ }
806
+ interface IdentificationData extends IdentificationDataIdOneOf {
807
+ /** ID of a site visitor that has not logged in to the site. */
808
+ anonymousVisitorId?: string;
809
+ /** ID of a site visitor that has logged in to the site. */
810
+ memberId?: string;
811
+ /** ID of a Wix user (site owner, contributor, etc.). */
812
+ wixUserId?: string;
813
+ /** ID of an app. */
814
+ appId?: string;
815
+ /** @readonly */
816
+ identityType?: WebhookIdentityType;
817
+ }
818
+ /** @oneof */
819
+ interface IdentificationDataIdOneOf {
820
+ /** ID of a site visitor that has not logged in to the site. */
821
+ anonymousVisitorId?: string;
822
+ /** ID of a site visitor that has logged in to the site. */
823
+ memberId?: string;
824
+ /** ID of a Wix user (site owner, contributor, etc.). */
825
+ wixUserId?: string;
826
+ /** ID of an app. */
827
+ appId?: string;
828
+ }
829
+ declare enum WebhookIdentityType {
830
+ UNKNOWN = "UNKNOWN",
831
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
832
+ MEMBER = "MEMBER",
833
+ WIX_USER = "WIX_USER",
834
+ APP = "APP"
835
+ }
836
+ interface CommonIdentificationDataNonNullableFields {
837
+ anonymousVisitorId: string;
838
+ memberId: string;
839
+ wixUserId: string;
840
+ appId: string;
841
+ identityType: IdentityType;
842
+ }
843
+ interface ReasonNonNullableFields {
844
+ reasonType: Type;
845
+ }
846
+ interface ReportNonNullableFields {
847
+ entityName: string;
848
+ entityId: string;
849
+ identity?: CommonIdentificationDataNonNullableFields;
850
+ reason?: ReasonNonNullableFields;
851
+ }
852
+ interface CreateReportResponseNonNullableFields {
853
+ report?: ReportNonNullableFields;
854
+ }
855
+ interface GetReportResponseNonNullableFields {
856
+ report?: ReportNonNullableFields;
857
+ }
858
+ interface UpdateReportResponseNonNullableFields {
859
+ report?: ReportNonNullableFields;
860
+ }
861
+ interface UpsertReportResponseNonNullableFields {
862
+ report?: ReportNonNullableFields;
863
+ }
864
+ interface BulkDeleteReportsByFilterResponseNonNullableFields {
865
+ jobId: string;
866
+ }
867
+ interface ReasonTypeCountNonNullableFields {
868
+ reasonType: Type;
869
+ count: number;
870
+ }
871
+ interface CountReportsByReasonTypesResponseNonNullableFields {
872
+ reasonTypeCount: ReasonTypeCountNonNullableFields[];
873
+ }
874
+ interface QueryReportsResponseNonNullableFields {
875
+ reports: ReportNonNullableFields[];
876
+ }
877
+ interface UpdateExtendedFieldsResponseNonNullableFields {
878
+ report?: ReportNonNullableFields;
879
+ }
880
+ interface UpdateReport {
881
+ /**
882
+ * Report ID.
883
+ * @readonly
884
+ */
885
+ _id?: string | null;
886
+ /** Reported entity name */
887
+ entityName?: string;
888
+ /** Reported entity ID */
889
+ entityId?: string;
890
+ /**
891
+ * Identity of who made a report
892
+ * @readonly
893
+ */
894
+ identity?: CommonIdentificationData;
895
+ /** Reason for the report */
896
+ reason?: Reason;
897
+ /**
898
+ * Revision number, which increments by 1 each time the Report is updated.
899
+ * @readonly
900
+ */
901
+ revision?: string | null;
902
+ /**
903
+ * Date and time the Report was created.
904
+ * @readonly
905
+ */
906
+ _createdDate?: Date | null;
907
+ /**
908
+ * Date and time the Report was last updated.
909
+ * @readonly
910
+ */
911
+ _updatedDate?: Date | null;
912
+ /** Data Extensions */
913
+ extendedFields?: ExtendedFields;
914
+ }
915
+ interface UpsertReportOptions {
916
+ report: {
917
+ /**
918
+ * Report ID.
919
+ * @readonly
920
+ */
921
+ _id?: string | null;
922
+ /**
923
+ * Identity of who made a report
924
+ * @readonly
925
+ */
926
+ identity?: CommonIdentificationData;
927
+ /** Reason for the report */
928
+ reason?: Reason;
929
+ /**
930
+ * Revision number, which increments by 1 each time the Report is updated.
931
+ * @readonly
932
+ */
933
+ revision?: string | null;
934
+ /**
935
+ * Date and time the Report was created.
936
+ * @readonly
937
+ */
938
+ _createdDate?: Date | null;
939
+ /**
940
+ * Date and time the Report was last updated.
941
+ * @readonly
942
+ */
943
+ _updatedDate?: Date | null;
944
+ /** Data Extensions */
945
+ extendedFields?: ExtendedFields;
946
+ };
947
+ }
948
+ interface UpsertReportIdentifiers {
949
+ /** Reported entity name */
950
+ reportEntityName?: string;
951
+ /** Reported entity ID */
952
+ reportEntityId?: string;
953
+ }
954
+ interface CountReportsByReasonTypesOptions {
955
+ /** ID of the entity. */
956
+ entityId: string;
957
+ }
958
+ interface QueryCursorResult {
959
+ cursors: Cursors;
960
+ hasNext: () => boolean;
961
+ hasPrev: () => boolean;
962
+ length: number;
963
+ pageSize: number;
964
+ }
965
+ interface ReportsQueryResult extends QueryCursorResult {
966
+ items: Report[];
967
+ query: ReportsQueryBuilder;
968
+ next: () => Promise<ReportsQueryResult>;
969
+ prev: () => Promise<ReportsQueryResult>;
970
+ }
971
+ interface ReportsQueryBuilder {
972
+ /** @param propertyName - Property whose value is compared with `value`.
973
+ * @param value - Value to compare against.
974
+ * @documentationMaturity preview
975
+ */
976
+ eq: (propertyName: '_id' | 'entityName' | 'entityId' | '_createdDate' | 'extendedFields', value: any) => ReportsQueryBuilder;
977
+ /** @param propertyName - Property whose value is compared with `value`.
978
+ * @param value - Value to compare against.
979
+ * @documentationMaturity preview
980
+ */
981
+ ne: (propertyName: '_id' | 'entityName' | 'entityId' | '_createdDate' | 'extendedFields', value: any) => ReportsQueryBuilder;
982
+ /** @param propertyName - Property whose value is compared with `value`.
983
+ * @param value - Value to compare against.
984
+ * @documentationMaturity preview
985
+ */
986
+ ge: (propertyName: '_createdDate', value: any) => ReportsQueryBuilder;
987
+ /** @param propertyName - Property whose value is compared with `value`.
988
+ * @param value - Value to compare against.
989
+ * @documentationMaturity preview
990
+ */
991
+ gt: (propertyName: '_createdDate', value: any) => ReportsQueryBuilder;
992
+ /** @param propertyName - Property whose value is compared with `value`.
993
+ * @param value - Value to compare against.
994
+ * @documentationMaturity preview
995
+ */
996
+ le: (propertyName: '_createdDate', value: any) => ReportsQueryBuilder;
997
+ /** @param propertyName - Property whose value is compared with `value`.
998
+ * @param value - Value to compare against.
999
+ * @documentationMaturity preview
1000
+ */
1001
+ lt: (propertyName: '_createdDate', value: any) => ReportsQueryBuilder;
1002
+ /** @param propertyName - Property whose value is compared with `string`.
1003
+ * @param string - String to compare against. Case-insensitive.
1004
+ * @documentationMaturity preview
1005
+ */
1006
+ startsWith: (propertyName: '_id' | 'entityName' | 'entityId', value: string) => ReportsQueryBuilder;
1007
+ /** @param propertyName - Property whose value is compared with `values`.
1008
+ * @param values - List of values to compare against.
1009
+ * @documentationMaturity preview
1010
+ */
1011
+ hasSome: (propertyName: '_id' | 'entityName' | 'entityId' | '_createdDate' | 'extendedFields', value: any[]) => ReportsQueryBuilder;
1012
+ /** @documentationMaturity preview */
1013
+ in: (propertyName: '_id' | 'entityName' | 'entityId' | '_createdDate' | 'extendedFields', value: any) => ReportsQueryBuilder;
1014
+ /** @documentationMaturity preview */
1015
+ exists: (propertyName: '_id' | 'entityName' | 'entityId' | '_createdDate' | 'extendedFields', value: boolean) => ReportsQueryBuilder;
1016
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1017
+ * @documentationMaturity preview
1018
+ */
1019
+ ascending: (...propertyNames: Array<'_id' | 'entityName' | 'entityId' | '_createdDate' | 'extendedFields'>) => ReportsQueryBuilder;
1020
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1021
+ * @documentationMaturity preview
1022
+ */
1023
+ descending: (...propertyNames: Array<'_id' | 'entityName' | 'entityId' | '_createdDate' | 'extendedFields'>) => ReportsQueryBuilder;
1024
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1025
+ * @documentationMaturity preview
1026
+ */
1027
+ limit: (limit: number) => ReportsQueryBuilder;
1028
+ /** @param cursor - A pointer to specific record
1029
+ * @documentationMaturity preview
1030
+ */
1031
+ skipTo: (cursor: string) => ReportsQueryBuilder;
1032
+ /** @documentationMaturity preview */
1033
+ find: () => Promise<ReportsQueryResult>;
1034
+ }
1035
+ interface UpdateExtendedFieldsOptions {
1036
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
1037
+ namespaceData: Record<string, any> | null;
1038
+ }
1039
+
1040
+ declare function createReport$1(httpClient: HttpClient): CreateReportSignature;
1041
+ interface CreateReportSignature {
1042
+ /**
1043
+ * Creates a Report.
1044
+ * @param - Report to be created.
1045
+ * @returns The created Report.
1046
+ */
1047
+ (report: Report): Promise<Report & ReportNonNullableFields>;
1048
+ }
1049
+ declare function getReport$1(httpClient: HttpClient): GetReportSignature;
1050
+ interface GetReportSignature {
1051
+ /**
1052
+ * Retrieves a Report.
1053
+ *
1054
+ * Member and visitor can only access reports they've made
1055
+ * @param - ID of the Report to retrieve.
1056
+ * @returns The requested Report.
1057
+ */
1058
+ (reportId: string): Promise<Report & ReportNonNullableFields>;
1059
+ }
1060
+ declare function updateReport$1(httpClient: HttpClient): UpdateReportSignature;
1061
+ interface UpdateReportSignature {
1062
+ /**
1063
+ * Updates a Report.
1064
+ * Each time the Report is updated,
1065
+ * `revision` increments by 1.
1066
+ * The current `revision` must be passed when updating the Report.
1067
+ * This ensures you're working with the latest Report
1068
+ * and prevents unintended overwrites.
1069
+ * @param - Report ID.
1070
+ * @returns Updated Report.
1071
+ */
1072
+ (_id: string | null, report: UpdateReport): Promise<Report & ReportNonNullableFields>;
1073
+ }
1074
+ declare function deleteReport$1(httpClient: HttpClient): DeleteReportSignature;
1075
+ interface DeleteReportSignature {
1076
+ /**
1077
+ * Deletes a Report.
1078
+ * Deleting a Report permanently removes them from the Report List.
1079
+ *
1080
+ * Member and visitor can only delete reports they've made
1081
+ * @param - Id of the Report to delete.
1082
+ */
1083
+ (reportId: string): Promise<void>;
1084
+ }
1085
+ declare function upsertReport$1(httpClient: HttpClient): UpsertReportSignature;
1086
+ interface UpsertReportSignature {
1087
+ /**
1088
+ * Upserts a Report.
1089
+ * Created a Report if it does not exists for particular entity.
1090
+ * If Report exists it will be updated with provided Reason
1091
+ */
1092
+ (identifiers: UpsertReportIdentifiers, options?: UpsertReportOptions | undefined): Promise<UpsertReportResponse & UpsertReportResponseNonNullableFields>;
1093
+ }
1094
+ declare function bulkDeleteReportsByFilter$1(httpClient: HttpClient): BulkDeleteReportsByFilterSignature;
1095
+ interface BulkDeleteReportsByFilterSignature {
1096
+ /**
1097
+ * Deletes multiple Reports by filter.
1098
+ * Deleting a Report permanently removes them from the Report List.
1099
+ * @param - Filter for which reports to delete
1100
+ */
1101
+ (filter: Record<string, any> | null): Promise<BulkDeleteReportsByFilterResponse & BulkDeleteReportsByFilterResponseNonNullableFields>;
1102
+ }
1103
+ declare function countReportsByReasonTypes$1(httpClient: HttpClient): CountReportsByReasonTypesSignature;
1104
+ interface CountReportsByReasonTypesSignature {
1105
+ /**
1106
+ * Get entity report counts grouped by report reason
1107
+ * @param - Entity name
1108
+ */
1109
+ (entityName: string, options: CountReportsByReasonTypesOptions): Promise<CountReportsByReasonTypesResponse & CountReportsByReasonTypesResponseNonNullableFields>;
1110
+ }
1111
+ declare function queryReports$1(httpClient: HttpClient): QueryReportsSignature;
1112
+ interface QueryReportsSignature {
1113
+ /**
1114
+ * Retrieves a list of Reports, given the provided [paging, filtering, and sorting][1].
1115
+ * Up to 100 Reports can be returned per request.
1116
+ *
1117
+ * If the call was made by a Member or Visitor, QueryReports will only return reports initiated by that caller
1118
+ */
1119
+ (): ReportsQueryBuilder;
1120
+ }
1121
+ declare function updateExtendedFields$1(httpClient: HttpClient): UpdateExtendedFieldsSignature;
1122
+ interface UpdateExtendedFieldsSignature {
1123
+ /**
1124
+ * Updates extended fields of a Reports without incrementing revision
1125
+ * @param - ID of the entity to update.
1126
+ * @param - Identifier for the app whose extended fields are being updated.
1127
+ */
1128
+ (_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
1129
+ }
1130
+
1131
+ declare const createReport: MaybeContext<BuildRESTFunction<typeof createReport$1> & typeof createReport$1>;
1132
+ declare const getReport: MaybeContext<BuildRESTFunction<typeof getReport$1> & typeof getReport$1>;
1133
+ declare const updateReport: MaybeContext<BuildRESTFunction<typeof updateReport$1> & typeof updateReport$1>;
1134
+ declare const deleteReport: MaybeContext<BuildRESTFunction<typeof deleteReport$1> & typeof deleteReport$1>;
1135
+ declare const upsertReport: MaybeContext<BuildRESTFunction<typeof upsertReport$1> & typeof upsertReport$1>;
1136
+ declare const bulkDeleteReportsByFilter: MaybeContext<BuildRESTFunction<typeof bulkDeleteReportsByFilter$1> & typeof bulkDeleteReportsByFilter$1>;
1137
+ declare const countReportsByReasonTypes: MaybeContext<BuildRESTFunction<typeof countReportsByReasonTypes$1> & typeof countReportsByReasonTypes$1>;
1138
+ declare const queryReports: MaybeContext<BuildRESTFunction<typeof queryReports$1> & typeof queryReports$1>;
1139
+ declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
1140
+
1141
+ type context_ActionEvent = ActionEvent;
1142
+ type context_BulkDeleteReportsByFilterRequest = BulkDeleteReportsByFilterRequest;
1143
+ type context_BulkDeleteReportsByFilterResponse = BulkDeleteReportsByFilterResponse;
1144
+ type context_BulkDeleteReportsByFilterResponseNonNullableFields = BulkDeleteReportsByFilterResponseNonNullableFields;
1145
+ type context_CommonIdentificationData = CommonIdentificationData;
1146
+ type context_CommonIdentificationDataIdOneOf = CommonIdentificationDataIdOneOf;
1147
+ type context_CountReportsByReasonTypesOptions = CountReportsByReasonTypesOptions;
1148
+ type context_CountReportsByReasonTypesRequest = CountReportsByReasonTypesRequest;
1149
+ type context_CountReportsByReasonTypesResponse = CountReportsByReasonTypesResponse;
1150
+ type context_CountReportsByReasonTypesResponseNonNullableFields = CountReportsByReasonTypesResponseNonNullableFields;
1151
+ type context_CreateReportRequest = CreateReportRequest;
1152
+ type context_CreateReportResponse = CreateReportResponse;
1153
+ type context_CreateReportResponseNonNullableFields = CreateReportResponseNonNullableFields;
1154
+ type context_CursorPaging = CursorPaging;
1155
+ type context_CursorPagingMetadata = CursorPagingMetadata;
1156
+ type context_CursorQuery = CursorQuery;
1157
+ type context_CursorQueryPagingMethodOneOf = CursorQueryPagingMethodOneOf;
1158
+ type context_Cursors = Cursors;
1159
+ type context_DeleteReportRequest = DeleteReportRequest;
1160
+ type context_DeleteReportResponse = DeleteReportResponse;
1161
+ type context_DomainEvent = DomainEvent;
1162
+ type context_DomainEventBodyOneOf = DomainEventBodyOneOf;
1163
+ type context_Empty = Empty;
1164
+ type context_EntityCreatedEvent = EntityCreatedEvent;
1165
+ type context_EntityDeletedEvent = EntityDeletedEvent;
1166
+ type context_EntityReportSummaryChanged = EntityReportSummaryChanged;
1167
+ type context_EntityUpdatedEvent = EntityUpdatedEvent;
1168
+ type context_ExtendedFields = ExtendedFields;
1169
+ type context_GetReportRequest = GetReportRequest;
1170
+ type context_GetReportResponse = GetReportResponse;
1171
+ type context_GetReportResponseNonNullableFields = GetReportResponseNonNullableFields;
1172
+ type context_IdentificationData = IdentificationData;
1173
+ type context_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
1174
+ type context_IdentityType = IdentityType;
1175
+ declare const context_IdentityType: typeof IdentityType;
1176
+ type context_MessageEnvelope = MessageEnvelope;
1177
+ type context_QueryReportsRequest = QueryReportsRequest;
1178
+ type context_QueryReportsResponse = QueryReportsResponse;
1179
+ type context_QueryReportsResponseNonNullableFields = QueryReportsResponseNonNullableFields;
1180
+ type context_Reason = Reason;
1181
+ type context_ReasonCount = ReasonCount;
1182
+ type context_ReasonTypeCount = ReasonTypeCount;
1183
+ type context_Report = Report;
1184
+ type context_ReportNonNullableFields = ReportNonNullableFields;
1185
+ type context_ReportsQueryBuilder = ReportsQueryBuilder;
1186
+ type context_ReportsQueryResult = ReportsQueryResult;
1187
+ type context_RestoreInfo = RestoreInfo;
1188
+ type context_SortOrder = SortOrder;
1189
+ declare const context_SortOrder: typeof SortOrder;
1190
+ type context_Sorting = Sorting;
1191
+ type context_Type = Type;
1192
+ declare const context_Type: typeof Type;
1193
+ type context_UpdateExtendedFieldsOptions = UpdateExtendedFieldsOptions;
1194
+ type context_UpdateExtendedFieldsRequest = UpdateExtendedFieldsRequest;
1195
+ type context_UpdateExtendedFieldsResponse = UpdateExtendedFieldsResponse;
1196
+ type context_UpdateExtendedFieldsResponseNonNullableFields = UpdateExtendedFieldsResponseNonNullableFields;
1197
+ type context_UpdateReport = UpdateReport;
1198
+ type context_UpdateReportRequest = UpdateReportRequest;
1199
+ type context_UpdateReportResponse = UpdateReportResponse;
1200
+ type context_UpdateReportResponseNonNullableFields = UpdateReportResponseNonNullableFields;
1201
+ type context_UpsertReportIdentifiers = UpsertReportIdentifiers;
1202
+ type context_UpsertReportOptions = UpsertReportOptions;
1203
+ type context_UpsertReportRequest = UpsertReportRequest;
1204
+ type context_UpsertReportResponse = UpsertReportResponse;
1205
+ type context_UpsertReportResponseNonNullableFields = UpsertReportResponseNonNullableFields;
1206
+ type context_WebhookIdentityType = WebhookIdentityType;
1207
+ declare const context_WebhookIdentityType: typeof WebhookIdentityType;
1208
+ declare const context_bulkDeleteReportsByFilter: typeof bulkDeleteReportsByFilter;
1209
+ declare const context_countReportsByReasonTypes: typeof countReportsByReasonTypes;
1210
+ declare const context_createReport: typeof createReport;
1211
+ declare const context_deleteReport: typeof deleteReport;
1212
+ declare const context_getReport: typeof getReport;
1213
+ declare const context_queryReports: typeof queryReports;
1214
+ declare const context_updateExtendedFields: typeof updateExtendedFields;
1215
+ declare const context_updateReport: typeof updateReport;
1216
+ declare const context_upsertReport: typeof upsertReport;
1217
+ declare namespace context {
1218
+ export { type context_ActionEvent as ActionEvent, type context_BulkDeleteReportsByFilterRequest as BulkDeleteReportsByFilterRequest, type context_BulkDeleteReportsByFilterResponse as BulkDeleteReportsByFilterResponse, type context_BulkDeleteReportsByFilterResponseNonNullableFields as BulkDeleteReportsByFilterResponseNonNullableFields, type context_CommonIdentificationData as CommonIdentificationData, type context_CommonIdentificationDataIdOneOf as CommonIdentificationDataIdOneOf, type context_CountReportsByReasonTypesOptions as CountReportsByReasonTypesOptions, type context_CountReportsByReasonTypesRequest as CountReportsByReasonTypesRequest, type context_CountReportsByReasonTypesResponse as CountReportsByReasonTypesResponse, type context_CountReportsByReasonTypesResponseNonNullableFields as CountReportsByReasonTypesResponseNonNullableFields, type context_CreateReportRequest as CreateReportRequest, type context_CreateReportResponse as CreateReportResponse, type context_CreateReportResponseNonNullableFields as CreateReportResponseNonNullableFields, type context_CursorPaging as CursorPaging, type context_CursorPagingMetadata as CursorPagingMetadata, type context_CursorQuery as CursorQuery, type context_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type context_Cursors as Cursors, type context_DeleteReportRequest as DeleteReportRequest, type context_DeleteReportResponse as DeleteReportResponse, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_Empty as Empty, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityReportSummaryChanged as EntityReportSummaryChanged, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_ExtendedFields as ExtendedFields, type context_GetReportRequest as GetReportRequest, type context_GetReportResponse as GetReportResponse, type context_GetReportResponseNonNullableFields as GetReportResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, context_IdentityType as IdentityType, type context_MessageEnvelope as MessageEnvelope, type context_QueryReportsRequest as QueryReportsRequest, type context_QueryReportsResponse as QueryReportsResponse, type context_QueryReportsResponseNonNullableFields as QueryReportsResponseNonNullableFields, type context_Reason as Reason, type context_ReasonCount as ReasonCount, type context_ReasonTypeCount as ReasonTypeCount, type context_Report as Report, type context_ReportNonNullableFields as ReportNonNullableFields, type context_ReportsQueryBuilder as ReportsQueryBuilder, type context_ReportsQueryResult as ReportsQueryResult, type context_RestoreInfo as RestoreInfo, context_SortOrder as SortOrder, type context_Sorting as Sorting, context_Type as Type, type context_UpdateExtendedFieldsOptions as UpdateExtendedFieldsOptions, type context_UpdateExtendedFieldsRequest as UpdateExtendedFieldsRequest, type context_UpdateExtendedFieldsResponse as UpdateExtendedFieldsResponse, type context_UpdateExtendedFieldsResponseNonNullableFields as UpdateExtendedFieldsResponseNonNullableFields, type context_UpdateReport as UpdateReport, type context_UpdateReportRequest as UpdateReportRequest, type context_UpdateReportResponse as UpdateReportResponse, type context_UpdateReportResponseNonNullableFields as UpdateReportResponseNonNullableFields, type context_UpsertReportIdentifiers as UpsertReportIdentifiers, type context_UpsertReportOptions as UpsertReportOptions, type context_UpsertReportRequest as UpsertReportRequest, type context_UpsertReportResponse as UpsertReportResponse, type context_UpsertReportResponseNonNullableFields as UpsertReportResponseNonNullableFields, context_WebhookIdentityType as WebhookIdentityType, context_bulkDeleteReportsByFilter as bulkDeleteReportsByFilter, context_countReportsByReasonTypes as countReportsByReasonTypes, context_createReport as createReport, context_deleteReport as deleteReport, context_getReport as getReport, context_queryReports as queryReports, context_updateExtendedFields as updateExtendedFields, context_updateReport as updateReport, context_upsertReport as upsertReport };
1219
+ }
1220
+
1221
+ export { context as reports };