@wix/echo 1.0.25 → 1.0.26
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/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAA2D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAA2D;AAEzD,wCAAc"}
|
package/build/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EACL,cAAc,GACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/echo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,10 +18,9 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/echo_metroinspector": "1.0.
|
|
21
|
+
"@wix/echo_metroinspector": "1.0.4"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
|
|
25
24
|
"glob": "^10.4.1",
|
|
26
25
|
"rollup": "^4.18.0",
|
|
27
26
|
"rollup-plugin-dts": "^6.1.1",
|
|
@@ -29,7 +28,7 @@
|
|
|
29
28
|
},
|
|
30
29
|
"scripts": {
|
|
31
30
|
"build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles",
|
|
32
|
-
"build:dts-bundles": "test -f config/rollup-config.js && rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
|
|
31
|
+
"build:dts-bundles": "test -f config/rollup-config.js && NODE_OPTIONS=--max-old-space-size=8192 rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
|
|
33
32
|
"test": ":"
|
|
34
33
|
},
|
|
35
34
|
"wix": {
|
|
@@ -43,5 +42,5 @@
|
|
|
43
42
|
"fqdn": ""
|
|
44
43
|
}
|
|
45
44
|
},
|
|
46
|
-
"falconPackageHash": "
|
|
45
|
+
"falconPackageHash": "c58b318780c8e3d1fab917c1afd609277847d6d391913c8667ce4a08"
|
|
47
46
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2
2
|
interface HttpClient {
|
|
3
3
|
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
|
+
fetchWithAuth: typeof fetch;
|
|
5
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
4
6
|
}
|
|
5
7
|
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
6
8
|
type HttpResponse<T = any> = {
|
|
@@ -26,17 +28,127 @@ type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
|
26
28
|
__type: 'event-definition';
|
|
27
29
|
type: Type;
|
|
28
30
|
isDomainEvent?: boolean;
|
|
29
|
-
transformations?: unknown;
|
|
31
|
+
transformations?: (envelope: unknown) => Payload;
|
|
30
32
|
__payload: Payload;
|
|
31
33
|
};
|
|
32
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean,
|
|
34
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
33
35
|
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
34
36
|
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
35
37
|
|
|
38
|
+
declare global {
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
40
|
+
interface SymbolConstructor {
|
|
41
|
+
readonly observable: symbol;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface MessageItem {
|
|
46
|
+
/** inner_message comment from EchoMessage proto def */
|
|
47
|
+
innerMessage?: string;
|
|
48
|
+
}
|
|
49
|
+
interface EchoRequest {
|
|
50
|
+
/** 1st part of the message */
|
|
51
|
+
arg1: string;
|
|
52
|
+
/** 2nd part of the message */
|
|
53
|
+
arg2?: string;
|
|
54
|
+
/** this field test translatable annotation */
|
|
55
|
+
titleField?: string;
|
|
56
|
+
someInt32?: number;
|
|
57
|
+
someDate?: Date;
|
|
58
|
+
}
|
|
59
|
+
interface EchoResponse {
|
|
60
|
+
/**
|
|
61
|
+
* override EchoResponse.echoMessage
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
echoMessage?: EchoMessage;
|
|
65
|
+
/** messge reseult as string */
|
|
66
|
+
message?: string;
|
|
67
|
+
}
|
|
36
68
|
interface Dispatched {
|
|
37
69
|
/** the message someone says */
|
|
38
70
|
echo?: EchoMessage;
|
|
39
71
|
}
|
|
72
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
73
|
+
createdEvent?: EntityCreatedEvent;
|
|
74
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
75
|
+
deletedEvent?: EntityDeletedEvent;
|
|
76
|
+
actionEvent?: ActionEvent;
|
|
77
|
+
/**
|
|
78
|
+
* Unique event ID.
|
|
79
|
+
* Allows clients to ignore duplicate webhooks.
|
|
80
|
+
*/
|
|
81
|
+
_id?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Assumes actions are also always typed to an entity_type
|
|
84
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
85
|
+
*/
|
|
86
|
+
entityFqdn?: string;
|
|
87
|
+
/**
|
|
88
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
89
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
90
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
91
|
+
*/
|
|
92
|
+
slug?: string;
|
|
93
|
+
/** ID of the entity associated with the event. */
|
|
94
|
+
entityId?: string;
|
|
95
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
96
|
+
eventTime?: Date;
|
|
97
|
+
/**
|
|
98
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
99
|
+
* (for example, GDPR).
|
|
100
|
+
*/
|
|
101
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
102
|
+
/** If present, indicates the action that triggered the event. */
|
|
103
|
+
originatedFrom?: string | null;
|
|
104
|
+
/**
|
|
105
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
106
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
107
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
108
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
109
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
110
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
111
|
+
*/
|
|
112
|
+
entityEventSequence?: string | null;
|
|
113
|
+
}
|
|
114
|
+
/** @oneof */
|
|
115
|
+
interface DomainEventBodyOneOf {
|
|
116
|
+
createdEvent?: EntityCreatedEvent;
|
|
117
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
118
|
+
deletedEvent?: EntityDeletedEvent;
|
|
119
|
+
actionEvent?: ActionEvent;
|
|
120
|
+
}
|
|
121
|
+
interface EntityCreatedEvent {
|
|
122
|
+
entity?: string;
|
|
123
|
+
}
|
|
124
|
+
interface RestoreInfo {
|
|
125
|
+
deletedDate?: Date;
|
|
126
|
+
}
|
|
127
|
+
interface EntityUpdatedEvent {
|
|
128
|
+
/**
|
|
129
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
130
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
131
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
132
|
+
*/
|
|
133
|
+
currentEntity?: string;
|
|
134
|
+
}
|
|
135
|
+
interface EntityDeletedEvent {
|
|
136
|
+
/** Entity that was deleted */
|
|
137
|
+
deletedEntity?: string | null;
|
|
138
|
+
}
|
|
139
|
+
interface ActionEvent {
|
|
140
|
+
body?: string;
|
|
141
|
+
}
|
|
142
|
+
interface MessageEnvelope {
|
|
143
|
+
/** App instance ID. */
|
|
144
|
+
instanceId?: string | null;
|
|
145
|
+
/** Event type. */
|
|
146
|
+
eventType?: string;
|
|
147
|
+
/** The identification type and identity data. */
|
|
148
|
+
identity?: IdentificationData;
|
|
149
|
+
/** Stringify payload. */
|
|
150
|
+
data?: string;
|
|
151
|
+
}
|
|
40
152
|
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
41
153
|
/** ID of a site visitor that has not logged in to the site. */
|
|
42
154
|
anonymousVisitorId?: string;
|
|
@@ -67,6 +179,18 @@ declare enum WebhookIdentityType {
|
|
|
67
179
|
WIX_USER = "WIX_USER",
|
|
68
180
|
APP = "APP"
|
|
69
181
|
}
|
|
182
|
+
interface MessageItemNonNullableFields {
|
|
183
|
+
innerMessage: string;
|
|
184
|
+
}
|
|
185
|
+
interface EchoMessageNonNullableFields {
|
|
186
|
+
message: string;
|
|
187
|
+
messagesList: MessageItemNonNullableFields[];
|
|
188
|
+
_id: string;
|
|
189
|
+
}
|
|
190
|
+
interface EchoResponseNonNullableFields {
|
|
191
|
+
echoMessage?: EchoMessageNonNullableFields;
|
|
192
|
+
message: string;
|
|
193
|
+
}
|
|
70
194
|
interface EchoMessage {
|
|
71
195
|
veloMessage: string;
|
|
72
196
|
id: string;
|
|
@@ -98,7 +222,7 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
98
222
|
slug?: string;
|
|
99
223
|
/** ID of the entity associated with the event. */
|
|
100
224
|
entityId?: string;
|
|
101
|
-
/** Event timestamp. */
|
|
225
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
102
226
|
eventTime?: Date;
|
|
103
227
|
/**
|
|
104
228
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -130,34 +254,39 @@ interface EchoOptions {
|
|
|
130
254
|
someDate?: Date;
|
|
131
255
|
}
|
|
132
256
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
* @public
|
|
137
|
-
* @documentationMaturity preview
|
|
138
|
-
* @requiredField arg1
|
|
139
|
-
* @param arg2 - modified comment for arg2 el hovav
|
|
140
|
-
* @returns ## override return 4
|
|
141
|
-
*/
|
|
142
|
-
declare function echo$1(httpClient: HttpClient): (arg1: string, options?: EchoOptions) => Promise<string>;
|
|
143
|
-
declare const onEchoDispatched$1: EventDefinition<EchoDispatchedEnvelope, "wix.metroinspector.v1.echo_dispatched">;
|
|
257
|
+
declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
258
|
+
|
|
259
|
+
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
144
260
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
* @param arg1 - 1st part of the message
|
|
148
|
-
* @public
|
|
149
|
-
* @documentationMaturity preview
|
|
150
|
-
* @requiredField arg1
|
|
151
|
-
* @param arg2 - modified comment for arg2 el hovav
|
|
152
|
-
* @returns ## override return 4
|
|
153
|
-
*/
|
|
154
|
-
declare const echo: BuildRESTFunction<typeof echo$1>;
|
|
155
|
-
declare const onEchoDispatched: BuildEventDefinition<typeof onEchoDispatched$1>;
|
|
261
|
+
declare const echo: ReturnType<typeof createRESTModule<typeof publicEcho>>;
|
|
262
|
+
declare const onEchoDispatched: ReturnType<typeof createEventModule<typeof publicOnEchoDispatched>>;
|
|
156
263
|
|
|
264
|
+
type context_ActionEvent = ActionEvent;
|
|
265
|
+
type context_BaseEventMetadata = BaseEventMetadata;
|
|
266
|
+
type context_Dispatched = Dispatched;
|
|
267
|
+
type context_DomainEvent = DomainEvent;
|
|
268
|
+
type context_DomainEventBodyOneOf = DomainEventBodyOneOf;
|
|
269
|
+
type context_EchoDispatchedEnvelope = EchoDispatchedEnvelope;
|
|
270
|
+
type context_EchoMessage = EchoMessage;
|
|
271
|
+
type context_EchoOptions = EchoOptions;
|
|
272
|
+
type context_EchoRequest = EchoRequest;
|
|
273
|
+
type context_EchoResponse = EchoResponse;
|
|
274
|
+
type context_EchoResponseNonNullableFields = EchoResponseNonNullableFields;
|
|
275
|
+
type context_EntityCreatedEvent = EntityCreatedEvent;
|
|
276
|
+
type context_EntityDeletedEvent = EntityDeletedEvent;
|
|
277
|
+
type context_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
278
|
+
type context_EventMetadata = EventMetadata;
|
|
279
|
+
type context_IdentificationData = IdentificationData;
|
|
280
|
+
type context_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
281
|
+
type context_MessageEnvelope = MessageEnvelope;
|
|
282
|
+
type context_MessageItem = MessageItem;
|
|
283
|
+
type context_RestoreInfo = RestoreInfo;
|
|
284
|
+
type context_WebhookIdentityType = WebhookIdentityType;
|
|
285
|
+
declare const context_WebhookIdentityType: typeof WebhookIdentityType;
|
|
157
286
|
declare const context_echo: typeof echo;
|
|
158
287
|
declare const context_onEchoDispatched: typeof onEchoDispatched;
|
|
159
288
|
declare namespace context {
|
|
160
|
-
export { context_echo as echo, context_onEchoDispatched as onEchoDispatched };
|
|
289
|
+
export { type context_ActionEvent as ActionEvent, type context_BaseEventMetadata as BaseEventMetadata, type context_Dispatched as Dispatched, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_EchoDispatchedEnvelope as EchoDispatchedEnvelope, type context_EchoMessage as EchoMessage, type context_EchoOptions as EchoOptions, type context_EchoRequest as EchoRequest, type context_EchoResponse as EchoResponse, type context_EchoResponseNonNullableFields as EchoResponseNonNullableFields, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_EventMetadata as EventMetadata, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context_MessageEnvelope as MessageEnvelope, type context_MessageItem as MessageItem, type context_RestoreInfo as RestoreInfo, context_WebhookIdentityType as WebhookIdentityType, context_echo as echo, context_onEchoDispatched as onEchoDispatched };
|
|
161
290
|
}
|
|
162
291
|
|
|
163
292
|
export { context as metroinspector };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
1
2
|
interface HttpClient {
|
|
2
3
|
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
|
+
fetchWithAuth: typeof fetch;
|
|
5
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
3
6
|
}
|
|
4
7
|
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
5
8
|
type HttpResponse<T = any> = {
|
|
@@ -20,14 +23,24 @@ type APIMetadata = {
|
|
|
20
23
|
entityFqdn?: string;
|
|
21
24
|
packageName?: string;
|
|
22
25
|
};
|
|
26
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
23
27
|
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
24
28
|
__type: 'event-definition';
|
|
25
29
|
type: Type;
|
|
26
30
|
isDomainEvent?: boolean;
|
|
27
|
-
transformations?: unknown;
|
|
31
|
+
transformations?: (envelope: unknown) => Payload;
|
|
28
32
|
__payload: Payload;
|
|
29
33
|
};
|
|
30
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean,
|
|
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;
|
|
37
|
+
|
|
38
|
+
declare global {
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
40
|
+
interface SymbolConstructor {
|
|
41
|
+
readonly observable: symbol;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
31
44
|
|
|
32
45
|
interface MessageItem {
|
|
33
46
|
/** inner_message comment from EchoMessage proto def */
|
|
@@ -79,7 +92,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
79
92
|
slug?: string;
|
|
80
93
|
/** ID of the entity associated with the event. */
|
|
81
94
|
entityId?: string;
|
|
82
|
-
/** Event timestamp. */
|
|
95
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
83
96
|
eventTime?: Date;
|
|
84
97
|
/**
|
|
85
98
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -108,6 +121,9 @@ interface DomainEventBodyOneOf {
|
|
|
108
121
|
interface EntityCreatedEvent {
|
|
109
122
|
entity?: string;
|
|
110
123
|
}
|
|
124
|
+
interface RestoreInfo {
|
|
125
|
+
deletedDate?: Date;
|
|
126
|
+
}
|
|
111
127
|
interface EntityUpdatedEvent {
|
|
112
128
|
/**
|
|
113
129
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
@@ -163,14 +179,16 @@ declare enum WebhookIdentityType {
|
|
|
163
179
|
WIX_USER = "WIX_USER",
|
|
164
180
|
APP = "APP"
|
|
165
181
|
}
|
|
182
|
+
interface MessageItemNonNullableFields {
|
|
183
|
+
innerMessage: string;
|
|
184
|
+
}
|
|
185
|
+
interface EchoMessageNonNullableFields {
|
|
186
|
+
message: string;
|
|
187
|
+
messagesList: MessageItemNonNullableFields[];
|
|
188
|
+
_id: string;
|
|
189
|
+
}
|
|
166
190
|
interface EchoResponseNonNullableFields {
|
|
167
|
-
echoMessage?:
|
|
168
|
-
message: string;
|
|
169
|
-
messagesList: {
|
|
170
|
-
innerMessage: string;
|
|
171
|
-
}[];
|
|
172
|
-
_id: string;
|
|
173
|
-
};
|
|
191
|
+
echoMessage?: EchoMessageNonNullableFields;
|
|
174
192
|
message: string;
|
|
175
193
|
}
|
|
176
194
|
interface EchoMessage {
|
|
@@ -204,7 +222,7 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
204
222
|
slug?: string;
|
|
205
223
|
/** ID of the entity associated with the event. */
|
|
206
224
|
entityId?: string;
|
|
207
|
-
/** Event timestamp. */
|
|
225
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
208
226
|
eventTime?: Date;
|
|
209
227
|
/**
|
|
210
228
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -236,20 +254,12 @@ interface EchoOptions {
|
|
|
236
254
|
someDate?: Date;
|
|
237
255
|
}
|
|
238
256
|
|
|
239
|
-
declare
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
* @public
|
|
246
|
-
* @documentationMaturity preview
|
|
247
|
-
* @requiredField arg1
|
|
248
|
-
* @param arg2 - modified comment for arg2 el hovav
|
|
249
|
-
* @returns ## override return 4
|
|
250
|
-
*/
|
|
251
|
-
declare function echo(httpClient: HttpClient): (arg1: string, options?: EchoOptions) => Promise<string>;
|
|
252
|
-
declare const onEchoDispatched: EventDefinition<EchoDispatchedEnvelope, "wix.metroinspector.v1.echo_dispatched">;
|
|
257
|
+
declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
258
|
+
|
|
259
|
+
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
260
|
+
|
|
261
|
+
declare const echo: ReturnType<typeof createRESTModule<typeof publicEcho>>;
|
|
262
|
+
declare const onEchoDispatched: ReturnType<typeof createEventModule<typeof publicOnEchoDispatched>>;
|
|
253
263
|
|
|
254
264
|
type index_d_ActionEvent = ActionEvent;
|
|
255
265
|
type index_d_BaseEventMetadata = BaseEventMetadata;
|
|
@@ -270,13 +280,13 @@ type index_d_IdentificationData = IdentificationData;
|
|
|
270
280
|
type index_d_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
271
281
|
type index_d_MessageEnvelope = MessageEnvelope;
|
|
272
282
|
type index_d_MessageItem = MessageItem;
|
|
283
|
+
type index_d_RestoreInfo = RestoreInfo;
|
|
273
284
|
type index_d_WebhookIdentityType = WebhookIdentityType;
|
|
274
285
|
declare const index_d_WebhookIdentityType: typeof WebhookIdentityType;
|
|
275
|
-
declare const index_d___metadata: typeof __metadata;
|
|
276
286
|
declare const index_d_echo: typeof echo;
|
|
277
287
|
declare const index_d_onEchoDispatched: typeof onEchoDispatched;
|
|
278
288
|
declare namespace index_d {
|
|
279
|
-
export { type index_d_ActionEvent as ActionEvent, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_Dispatched as Dispatched, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_EchoDispatchedEnvelope as EchoDispatchedEnvelope, type index_d_EchoMessage as EchoMessage, type index_d_EchoOptions as EchoOptions, type index_d_EchoRequest as EchoRequest, type index_d_EchoResponse as EchoResponse, type index_d_EchoResponseNonNullableFields as EchoResponseNonNullableFields, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MessageItem as MessageItem,
|
|
289
|
+
export { type index_d_ActionEvent as ActionEvent, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_Dispatched as Dispatched, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_EchoDispatchedEnvelope as EchoDispatchedEnvelope, type index_d_EchoMessage as EchoMessage, type index_d_EchoOptions as EchoOptions, type index_d_EchoRequest as EchoRequest, type index_d_EchoResponse as EchoResponse, type index_d_EchoResponseNonNullableFields as EchoResponseNonNullableFields, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MessageItem as MessageItem, type index_d_RestoreInfo as RestoreInfo, index_d_WebhookIdentityType as WebhookIdentityType, index_d_echo as echo, index_d_onEchoDispatched as onEchoDispatched };
|
|
280
290
|
}
|
|
281
291
|
|
|
282
292
|
export { index_d as metroinspector };
|
|
@@ -25,14 +25,16 @@ interface EchoResponse$1 {
|
|
|
25
25
|
/** messge reseult as string */
|
|
26
26
|
message?: string;
|
|
27
27
|
}
|
|
28
|
+
interface MessageItemNonNullableFields$1 {
|
|
29
|
+
innerMessage: string;
|
|
30
|
+
}
|
|
31
|
+
interface EchoMessageNonNullableFields$1 {
|
|
32
|
+
message: string;
|
|
33
|
+
messagesList: MessageItemNonNullableFields$1[];
|
|
34
|
+
id: string;
|
|
35
|
+
}
|
|
28
36
|
interface EchoResponseNonNullableFields$1 {
|
|
29
|
-
echoMessage?:
|
|
30
|
-
message: string;
|
|
31
|
-
messagesList: {
|
|
32
|
-
innerMessage: string;
|
|
33
|
-
}[];
|
|
34
|
-
id: string;
|
|
35
|
-
};
|
|
37
|
+
echoMessage?: EchoMessageNonNullableFields$1;
|
|
36
38
|
message: string;
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -55,14 +57,16 @@ interface EchoResponse {
|
|
|
55
57
|
/** messge reseult as string */
|
|
56
58
|
message?: string;
|
|
57
59
|
}
|
|
60
|
+
interface MessageItemNonNullableFields {
|
|
61
|
+
innerMessage: string;
|
|
62
|
+
}
|
|
63
|
+
interface EchoMessageNonNullableFields {
|
|
64
|
+
message: string;
|
|
65
|
+
messagesList: MessageItemNonNullableFields[];
|
|
66
|
+
_id: string;
|
|
67
|
+
}
|
|
58
68
|
interface EchoResponseNonNullableFields {
|
|
59
|
-
echoMessage?:
|
|
60
|
-
message: string;
|
|
61
|
-
messagesList: {
|
|
62
|
-
innerMessage: string;
|
|
63
|
-
}[];
|
|
64
|
-
_id: string;
|
|
65
|
-
};
|
|
69
|
+
echoMessage?: EchoMessageNonNullableFields;
|
|
66
70
|
message: string;
|
|
67
71
|
}
|
|
68
72
|
interface EchoMessage {
|