@wix/auto_sdk_motion_metroinspector 1.0.0 → 1.0.1
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.d.ts +23 -1
- package/build/cjs/index.js +225 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +238 -1
- package/build/cjs/index.typings.js +189 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +45 -1
- package/build/cjs/meta.js +158 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +23 -0
- package/build/es/index.mjs +202 -0
- package/build/es/index.mjs.map +1 -0
- package/build/{internal/cjs/src/metroinspector-v1-echo-metroinspector.universal.d.ts → es/index.typings.d.mts} +44 -72
- package/build/es/index.typings.mjs +167 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +45 -0
- package/build/es/meta.mjs +134 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +23 -1
- package/build/internal/cjs/index.js +225 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +238 -1
- package/build/internal/cjs/index.typings.js +189 -15
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +45 -1
- package/build/internal/cjs/meta.js +158 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +23 -0
- package/build/internal/es/index.mjs +202 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/{cjs/src/metroinspector-v1-echo-metroinspector.universal.d.ts → internal/es/index.typings.d.mts} +44 -72
- package/build/internal/es/index.typings.mjs +167 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +45 -0
- package/build/internal/es/meta.mjs +134 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +12 -10
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.context.d.ts +0 -11
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.context.js +0 -15
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.context.js.map +0 -1
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.http.d.ts +0 -3
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.http.js +0 -115
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.http.js.map +0 -1
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.meta.d.ts +0 -15
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.meta.js +0 -47
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.meta.js.map +0 -1
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.public.d.ts +0 -17
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.public.js +0 -24
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.public.js.map +0 -1
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.types.d.ts +0 -189
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.types.js +0 -12
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.types.js.map +0 -1
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.universal.js +0 -81
- package/build/cjs/src/metroinspector-v1-echo-metroinspector.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/metroinspector-v1-echo-metroinspector.context.d.ts +0 -11
- package/build/es/src/metroinspector-v1-echo-metroinspector.context.js +0 -11
- package/build/es/src/metroinspector-v1-echo-metroinspector.context.js.map +0 -1
- package/build/es/src/metroinspector-v1-echo-metroinspector.http.d.ts +0 -3
- package/build/es/src/metroinspector-v1-echo-metroinspector.http.js +0 -111
- package/build/es/src/metroinspector-v1-echo-metroinspector.http.js.map +0 -1
- package/build/es/src/metroinspector-v1-echo-metroinspector.meta.d.ts +0 -15
- package/build/es/src/metroinspector-v1-echo-metroinspector.meta.js +0 -20
- package/build/es/src/metroinspector-v1-echo-metroinspector.meta.js.map +0 -1
- package/build/es/src/metroinspector-v1-echo-metroinspector.public.d.ts +0 -17
- package/build/es/src/metroinspector-v1-echo-metroinspector.public.js +0 -19
- package/build/es/src/metroinspector-v1-echo-metroinspector.public.js.map +0 -1
- package/build/es/src/metroinspector-v1-echo-metroinspector.types.d.ts +0 -189
- package/build/es/src/metroinspector-v1-echo-metroinspector.types.js +0 -9
- package/build/es/src/metroinspector-v1-echo-metroinspector.types.js.map +0 -1
- package/build/es/src/metroinspector-v1-echo-metroinspector.universal.d.ts +0 -266
- package/build/es/src/metroinspector-v1-echo-metroinspector.universal.js +0 -54
- package/build/es/src/metroinspector-v1-echo-metroinspector.universal.js.map +0 -1
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.context.d.ts +0 -11
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.context.js +0 -15
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.context.js.map +0 -1
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.http.d.ts +0 -3
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.http.js +0 -115
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.http.js.map +0 -1
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.meta.d.ts +0 -15
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.meta.js +0 -47
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.meta.js.map +0 -1
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.public.d.ts +0 -17
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.public.js +0 -24
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.public.js.map +0 -1
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.types.d.ts +0 -189
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.types.js +0 -12
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.types.js.map +0 -1
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.universal.js +0 -81
- package/build/internal/cjs/src/metroinspector-v1-echo-metroinspector.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.context.d.ts +0 -11
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.context.js +0 -11
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.context.js.map +0 -1
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.http.d.ts +0 -3
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.http.js +0 -111
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.http.js.map +0 -1
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.meta.d.ts +0 -15
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.meta.js +0 -20
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.meta.js.map +0 -1
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.public.d.ts +0 -17
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.public.js +0 -19
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.public.js.map +0 -1
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.types.d.ts +0 -189
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.types.js +0 -9
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.types.js.map +0 -1
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.universal.d.ts +0 -266
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.universal.js +0 -54
- package/build/internal/es/src/metroinspector-v1-echo-metroinspector.universal.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
interface MessageItem {
|
|
2
2
|
/** inner_message comment from EchoMessage proto def */
|
|
3
3
|
innerMessage?: string;
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
interface EchoRequest {
|
|
6
6
|
/** 1st part of the message */
|
|
7
7
|
arg1: string;
|
|
8
8
|
/** 2nd part of the message */
|
|
@@ -12,40 +12,36 @@ export interface EchoRequest {
|
|
|
12
12
|
someInt32?: number;
|
|
13
13
|
someDate?: Date | null;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
interface EchoResponse {
|
|
16
16
|
/** message result as EchoMessage */
|
|
17
17
|
echoMessage?: EchoMessage;
|
|
18
18
|
/** messge reseult as string */
|
|
19
19
|
message?: string;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
interface Dispatched {
|
|
22
22
|
/** the message someone says */
|
|
23
23
|
echo?: EchoMessage;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
26
26
|
createdEvent?: EntityCreatedEvent;
|
|
27
27
|
updatedEvent?: EntityUpdatedEvent;
|
|
28
28
|
deletedEvent?: EntityDeletedEvent;
|
|
29
29
|
actionEvent?: ActionEvent;
|
|
30
|
-
/**
|
|
31
|
-
* Unique event ID.
|
|
32
|
-
* Allows clients to ignore duplicate webhooks.
|
|
33
|
-
*/
|
|
30
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
34
31
|
_id?: string;
|
|
35
32
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
33
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
34
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
38
35
|
*/
|
|
39
36
|
entityFqdn?: string;
|
|
40
37
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
38
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
39
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
44
40
|
*/
|
|
45
41
|
slug?: string;
|
|
46
42
|
/** ID of the entity associated with the event. */
|
|
47
43
|
entityId?: string;
|
|
48
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example
|
|
44
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
49
45
|
eventTime?: Date | null;
|
|
50
46
|
/**
|
|
51
47
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -55,29 +51,25 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
55
51
|
/** If present, indicates the action that triggered the event. */
|
|
56
52
|
originatedFrom?: string | null;
|
|
57
53
|
/**
|
|
58
|
-
* A sequence number
|
|
59
|
-
*
|
|
60
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
61
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
62
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
63
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
54
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
55
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
64
56
|
*/
|
|
65
57
|
entityEventSequence?: string | null;
|
|
66
58
|
}
|
|
67
59
|
/** @oneof */
|
|
68
|
-
|
|
60
|
+
interface DomainEventBodyOneOf {
|
|
69
61
|
createdEvent?: EntityCreatedEvent;
|
|
70
62
|
updatedEvent?: EntityUpdatedEvent;
|
|
71
63
|
deletedEvent?: EntityDeletedEvent;
|
|
72
64
|
actionEvent?: ActionEvent;
|
|
73
65
|
}
|
|
74
|
-
|
|
66
|
+
interface EntityCreatedEvent {
|
|
75
67
|
entity?: string;
|
|
76
68
|
}
|
|
77
|
-
|
|
69
|
+
interface RestoreInfo {
|
|
78
70
|
deletedDate?: Date | null;
|
|
79
71
|
}
|
|
80
|
-
|
|
72
|
+
interface EntityUpdatedEvent {
|
|
81
73
|
/**
|
|
82
74
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
83
75
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -85,14 +77,14 @@ export interface EntityUpdatedEvent {
|
|
|
85
77
|
*/
|
|
86
78
|
currentEntity?: string;
|
|
87
79
|
}
|
|
88
|
-
|
|
89
|
-
/** Entity that was deleted */
|
|
80
|
+
interface EntityDeletedEvent {
|
|
81
|
+
/** Entity that was deleted. */
|
|
90
82
|
deletedEntity?: string | null;
|
|
91
83
|
}
|
|
92
|
-
|
|
84
|
+
interface ActionEvent {
|
|
93
85
|
body?: string;
|
|
94
86
|
}
|
|
95
|
-
|
|
87
|
+
interface MessageEnvelope {
|
|
96
88
|
/**
|
|
97
89
|
* App instance ID.
|
|
98
90
|
* @format GUID
|
|
@@ -108,7 +100,7 @@ export interface MessageEnvelope {
|
|
|
108
100
|
/** Stringify payload. */
|
|
109
101
|
data?: string;
|
|
110
102
|
}
|
|
111
|
-
|
|
103
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
112
104
|
/**
|
|
113
105
|
* ID of a site visitor that has not logged in to the site.
|
|
114
106
|
* @format GUID
|
|
@@ -130,10 +122,10 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
130
122
|
*/
|
|
131
123
|
appId?: string;
|
|
132
124
|
/** @readonly */
|
|
133
|
-
identityType?:
|
|
125
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
134
126
|
}
|
|
135
127
|
/** @oneof */
|
|
136
|
-
|
|
128
|
+
interface IdentificationDataIdOneOf {
|
|
137
129
|
/**
|
|
138
130
|
* ID of a site visitor that has not logged in to the site.
|
|
139
131
|
* @format GUID
|
|
@@ -155,33 +147,20 @@ export interface IdentificationDataIdOneOf {
|
|
|
155
147
|
*/
|
|
156
148
|
appId?: string;
|
|
157
149
|
}
|
|
158
|
-
|
|
150
|
+
declare enum WebhookIdentityType {
|
|
159
151
|
UNKNOWN = "UNKNOWN",
|
|
160
152
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
161
153
|
MEMBER = "MEMBER",
|
|
162
154
|
WIX_USER = "WIX_USER",
|
|
163
155
|
APP = "APP"
|
|
164
156
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
interface MessageItemNonNullableFields {
|
|
169
|
-
innerMessage: string;
|
|
170
|
-
}
|
|
171
|
-
interface EchoMessageNonNullableFields {
|
|
172
|
-
message: string;
|
|
173
|
-
messagesList: MessageItemNonNullableFields[];
|
|
174
|
-
_id: string;
|
|
175
|
-
}
|
|
176
|
-
export interface EchoResponseNonNullableFields {
|
|
177
|
-
echoMessage?: EchoMessageNonNullableFields;
|
|
178
|
-
message: string;
|
|
179
|
-
}
|
|
180
|
-
export interface EchoMessage {
|
|
157
|
+
/** @enumType */
|
|
158
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
159
|
+
interface EchoMessage {
|
|
181
160
|
veloMessage: string;
|
|
182
161
|
id: string;
|
|
183
162
|
}
|
|
184
|
-
|
|
163
|
+
interface BaseEventMetadata {
|
|
185
164
|
/**
|
|
186
165
|
* App instance ID.
|
|
187
166
|
* @format GUID
|
|
@@ -195,26 +174,22 @@ export interface BaseEventMetadata {
|
|
|
195
174
|
/** The identification type and identity data. */
|
|
196
175
|
identity?: IdentificationData;
|
|
197
176
|
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Unique event ID.
|
|
201
|
-
* Allows clients to ignore duplicate webhooks.
|
|
202
|
-
*/
|
|
177
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
178
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
203
179
|
_id?: string;
|
|
204
180
|
/**
|
|
205
|
-
*
|
|
206
|
-
*
|
|
181
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
182
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
207
183
|
*/
|
|
208
184
|
entityFqdn?: string;
|
|
209
185
|
/**
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
186
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
187
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
213
188
|
*/
|
|
214
189
|
slug?: string;
|
|
215
190
|
/** ID of the entity associated with the event. */
|
|
216
191
|
entityId?: string;
|
|
217
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example
|
|
192
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
218
193
|
eventTime?: Date | null;
|
|
219
194
|
/**
|
|
220
195
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -224,16 +199,12 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
224
199
|
/** If present, indicates the action that triggered the event. */
|
|
225
200
|
originatedFrom?: string | null;
|
|
226
201
|
/**
|
|
227
|
-
* A sequence number
|
|
228
|
-
*
|
|
229
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
230
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
231
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
232
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
202
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
203
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
233
204
|
*/
|
|
234
205
|
entityEventSequence?: string | null;
|
|
235
206
|
}
|
|
236
|
-
|
|
207
|
+
interface EchoDispatchedEnvelope {
|
|
237
208
|
data: Dispatched;
|
|
238
209
|
metadata: EventMetadata;
|
|
239
210
|
}
|
|
@@ -244,7 +215,7 @@ export interface EchoDispatchedEnvelope {
|
|
|
244
215
|
* @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService
|
|
245
216
|
* @slug dispatched
|
|
246
217
|
*/
|
|
247
|
-
|
|
218
|
+
declare function onEchoDispatched(handler: (event: EchoDispatchedEnvelope) => void | Promise<void>): void;
|
|
248
219
|
/**
|
|
249
220
|
* echo given arg1 and arg2
|
|
250
221
|
* @param arg1 - 1st part of the message
|
|
@@ -254,8 +225,8 @@ export declare function onEchoDispatched(handler: (event: EchoDispatchedEnvelope
|
|
|
254
225
|
* @returns messge reseult as string
|
|
255
226
|
* @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo
|
|
256
227
|
*/
|
|
257
|
-
|
|
258
|
-
|
|
228
|
+
declare function echo(arg1: string, options?: EchoOptions): Promise<string>;
|
|
229
|
+
interface EchoOptions {
|
|
259
230
|
/** 2nd part of the message */
|
|
260
231
|
arg2?: string;
|
|
261
232
|
/** this field test translatable annotation */
|
|
@@ -263,4 +234,5 @@ export interface EchoOptions {
|
|
|
263
234
|
someInt32?: number;
|
|
264
235
|
someDate?: Date | null;
|
|
265
236
|
}
|
|
266
|
-
|
|
237
|
+
|
|
238
|
+
export { type ActionEvent, type BaseEventMetadata, type Dispatched, type DomainEvent, type DomainEventBodyOneOf, type EchoDispatchedEnvelope, type EchoMessage, type EchoOptions, type EchoRequest, type EchoResponse, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type MessageItem, type RestoreInfo, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, echo, onEchoDispatched };
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// src/metroinspector-v1-echo-metroinspector.universal.ts
|
|
2
|
+
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
+
import {
|
|
4
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
5
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
6
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
7
|
+
|
|
8
|
+
// src/metroinspector-v1-echo-metroinspector.http.ts
|
|
9
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
10
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
11
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
12
|
+
function resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(opts) {
|
|
13
|
+
const domainToMappings = {
|
|
14
|
+
"apps._base_domain_": [
|
|
15
|
+
{
|
|
16
|
+
srcPath: "/_api/metro-inspector",
|
|
17
|
+
destPath: "/api"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"api._api_base_domain_": [
|
|
21
|
+
{
|
|
22
|
+
srcPath: "/metro-inspector",
|
|
23
|
+
destPath: ""
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"www._base_domain_": [
|
|
27
|
+
{
|
|
28
|
+
srcPath: "/metro-inspector",
|
|
29
|
+
destPath: "/api"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"manage._base_domain_": [
|
|
33
|
+
{
|
|
34
|
+
srcPath: "/metro-inspector",
|
|
35
|
+
destPath: ""
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"www.wixgateway.com": [
|
|
39
|
+
{
|
|
40
|
+
srcPath: "/_api/metro-inspector",
|
|
41
|
+
destPath: "/api"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
_: [
|
|
45
|
+
{
|
|
46
|
+
srcPath: "/_api/metro-inspector",
|
|
47
|
+
destPath: "/api"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"www.wixapis.com": [
|
|
51
|
+
{
|
|
52
|
+
srcPath: "/_api/metro-inspector",
|
|
53
|
+
destPath: "/api"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
srcPath: "/metro-inspector",
|
|
57
|
+
destPath: ""
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"editor._base_domain_": [
|
|
61
|
+
{
|
|
62
|
+
srcPath: "/metro-insepctor",
|
|
63
|
+
destPath: ""
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
srcPath: "/_api/metro-inspector",
|
|
67
|
+
destPath: "/api"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"blocks._base_domain_": [
|
|
71
|
+
{
|
|
72
|
+
srcPath: "/metro-insepctor",
|
|
73
|
+
destPath: ""
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
srcPath: "/_api/metro-inspector",
|
|
77
|
+
destPath: "/api"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"create.editorx": [
|
|
81
|
+
{
|
|
82
|
+
srcPath: "/metro-insepctor",
|
|
83
|
+
destPath: ""
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
srcPath: "/_api/metro-inspector",
|
|
87
|
+
destPath: "/api"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
};
|
|
91
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
92
|
+
}
|
|
93
|
+
var PACKAGE_NAME = "@wix/auto_sdk_motion_metroinspector";
|
|
94
|
+
function echo(payload) {
|
|
95
|
+
function __echo({ host }) {
|
|
96
|
+
const serializedData = transformPaths(payload, [
|
|
97
|
+
{
|
|
98
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
99
|
+
paths: [{ path: "someDate" }]
|
|
100
|
+
}
|
|
101
|
+
]);
|
|
102
|
+
const metadata = {
|
|
103
|
+
entityFqdn: "wix.metroinspector.v1.echo",
|
|
104
|
+
method: "POST",
|
|
105
|
+
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
106
|
+
packageName: PACKAGE_NAME,
|
|
107
|
+
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
108
|
+
protoPath: "/api/v1/echo/{arg1}",
|
|
109
|
+
data: serializedData,
|
|
110
|
+
host
|
|
111
|
+
}),
|
|
112
|
+
data: serializedData
|
|
113
|
+
};
|
|
114
|
+
return metadata;
|
|
115
|
+
}
|
|
116
|
+
return __echo;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// src/metroinspector-v1-echo-metroinspector.universal.ts
|
|
120
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
121
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
122
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
123
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
124
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
125
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
126
|
+
return WebhookIdentityType2;
|
|
127
|
+
})(WebhookIdentityType || {});
|
|
128
|
+
async function echo2(arg1, options) {
|
|
129
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
130
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
131
|
+
arg1,
|
|
132
|
+
arg2: options?.arg2,
|
|
133
|
+
titleField: options?.titleField,
|
|
134
|
+
someInt32: options?.someInt32,
|
|
135
|
+
someDate: options?.someDate
|
|
136
|
+
});
|
|
137
|
+
const reqOpts = echo(payload);
|
|
138
|
+
sideEffects?.onSiteCall?.();
|
|
139
|
+
try {
|
|
140
|
+
const result = await httpClient.request(reqOpts);
|
|
141
|
+
sideEffects?.onSuccess?.(result);
|
|
142
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.message;
|
|
143
|
+
} catch (err) {
|
|
144
|
+
const transformedError = sdkTransformError(
|
|
145
|
+
err,
|
|
146
|
+
{
|
|
147
|
+
spreadPathsToArguments: {},
|
|
148
|
+
explicitPathsToArguments: {
|
|
149
|
+
arg1: "$[0]",
|
|
150
|
+
arg2: "$[1].arg2",
|
|
151
|
+
titleField: "$[1].titleField",
|
|
152
|
+
someInt32: "$[1].someInt32",
|
|
153
|
+
someDate: "$[1].someDate"
|
|
154
|
+
},
|
|
155
|
+
singleArgumentUnchanged: false
|
|
156
|
+
},
|
|
157
|
+
["arg1", "options"]
|
|
158
|
+
);
|
|
159
|
+
sideEffects?.onError?.(err);
|
|
160
|
+
throw transformedError;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
export {
|
|
164
|
+
WebhookIdentityType,
|
|
165
|
+
echo2 as echo
|
|
166
|
+
};
|
|
167
|
+
//# sourceMappingURL=index.typings.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../../src/metroinspector-v1-echo-metroinspector.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({\n protoPath: '/api/v1/echo/{arg1}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __echo;\n}\n"],"mappings":"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","names":["WebhookIdentityType","echo"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { EchoRequest as EchoRequest$1, EchoResponse as EchoResponse$1 } from './index.typings.mjs';
|
|
2
|
+
|
|
3
|
+
interface EchoMessage {
|
|
4
|
+
/** message comment from EchoMessage proto def, with special comment */
|
|
5
|
+
message?: string;
|
|
6
|
+
/** messages_list comment from EchoMessage proto def */
|
|
7
|
+
messagesList?: MessageItem[];
|
|
8
|
+
id?: string;
|
|
9
|
+
}
|
|
10
|
+
interface MessageItem {
|
|
11
|
+
/** inner_message comment from EchoMessage proto def */
|
|
12
|
+
innerMessage?: string;
|
|
13
|
+
}
|
|
14
|
+
interface EchoRequest {
|
|
15
|
+
/** 1st part of the message */
|
|
16
|
+
arg1: string;
|
|
17
|
+
/** 2nd part of the message */
|
|
18
|
+
arg2?: string;
|
|
19
|
+
/** this field test translatable annotation */
|
|
20
|
+
titleField?: string;
|
|
21
|
+
someInt32?: number;
|
|
22
|
+
someDate?: Date | null;
|
|
23
|
+
}
|
|
24
|
+
interface EchoResponse {
|
|
25
|
+
/** message result as EchoMessage */
|
|
26
|
+
echoMessage?: EchoMessage;
|
|
27
|
+
/** messge reseult as string */
|
|
28
|
+
message?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
32
|
+
getUrl: (context: any) => string;
|
|
33
|
+
httpMethod: K;
|
|
34
|
+
path: string;
|
|
35
|
+
pathParams: M;
|
|
36
|
+
__requestType: T;
|
|
37
|
+
__originalRequestType: S;
|
|
38
|
+
__responseType: Q;
|
|
39
|
+
__originalResponseType: R;
|
|
40
|
+
};
|
|
41
|
+
declare function echo(): __PublicMethodMetaInfo<'POST', {
|
|
42
|
+
arg1: string;
|
|
43
|
+
}, EchoRequest$1, EchoRequest, EchoResponse$1, EchoResponse>;
|
|
44
|
+
|
|
45
|
+
export { type __PublicMethodMetaInfo, echo };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// src/metroinspector-v1-echo-metroinspector.http.ts
|
|
2
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
3
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
4
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
5
|
+
function resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(opts) {
|
|
6
|
+
const domainToMappings = {
|
|
7
|
+
"apps._base_domain_": [
|
|
8
|
+
{
|
|
9
|
+
srcPath: "/_api/metro-inspector",
|
|
10
|
+
destPath: "/api"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"api._api_base_domain_": [
|
|
14
|
+
{
|
|
15
|
+
srcPath: "/metro-inspector",
|
|
16
|
+
destPath: ""
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"www._base_domain_": [
|
|
20
|
+
{
|
|
21
|
+
srcPath: "/metro-inspector",
|
|
22
|
+
destPath: "/api"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"manage._base_domain_": [
|
|
26
|
+
{
|
|
27
|
+
srcPath: "/metro-inspector",
|
|
28
|
+
destPath: ""
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"www.wixgateway.com": [
|
|
32
|
+
{
|
|
33
|
+
srcPath: "/_api/metro-inspector",
|
|
34
|
+
destPath: "/api"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
_: [
|
|
38
|
+
{
|
|
39
|
+
srcPath: "/_api/metro-inspector",
|
|
40
|
+
destPath: "/api"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"www.wixapis.com": [
|
|
44
|
+
{
|
|
45
|
+
srcPath: "/_api/metro-inspector",
|
|
46
|
+
destPath: "/api"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
srcPath: "/metro-inspector",
|
|
50
|
+
destPath: ""
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"editor._base_domain_": [
|
|
54
|
+
{
|
|
55
|
+
srcPath: "/metro-insepctor",
|
|
56
|
+
destPath: ""
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
srcPath: "/_api/metro-inspector",
|
|
60
|
+
destPath: "/api"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"blocks._base_domain_": [
|
|
64
|
+
{
|
|
65
|
+
srcPath: "/metro-insepctor",
|
|
66
|
+
destPath: ""
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
srcPath: "/_api/metro-inspector",
|
|
70
|
+
destPath: "/api"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"create.editorx": [
|
|
74
|
+
{
|
|
75
|
+
srcPath: "/metro-insepctor",
|
|
76
|
+
destPath: ""
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
srcPath: "/_api/metro-inspector",
|
|
80
|
+
destPath: "/api"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
};
|
|
84
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
85
|
+
}
|
|
86
|
+
var PACKAGE_NAME = "@wix/auto_sdk_motion_metroinspector";
|
|
87
|
+
function echo(payload) {
|
|
88
|
+
function __echo({ host }) {
|
|
89
|
+
const serializedData = transformPaths(payload, [
|
|
90
|
+
{
|
|
91
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
92
|
+
paths: [{ path: "someDate" }]
|
|
93
|
+
}
|
|
94
|
+
]);
|
|
95
|
+
const metadata = {
|
|
96
|
+
entityFqdn: "wix.metroinspector.v1.echo",
|
|
97
|
+
method: "POST",
|
|
98
|
+
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
99
|
+
packageName: PACKAGE_NAME,
|
|
100
|
+
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
101
|
+
protoPath: "/api/v1/echo/{arg1}",
|
|
102
|
+
data: serializedData,
|
|
103
|
+
host
|
|
104
|
+
}),
|
|
105
|
+
data: serializedData
|
|
106
|
+
};
|
|
107
|
+
return metadata;
|
|
108
|
+
}
|
|
109
|
+
return __echo;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// src/metroinspector-v1-echo-metroinspector.meta.ts
|
|
113
|
+
function echo2() {
|
|
114
|
+
const payload = { arg1: ":arg1" };
|
|
115
|
+
const getRequestOptions = echo(payload);
|
|
116
|
+
const getUrl = (context) => {
|
|
117
|
+
const { url } = getRequestOptions(context);
|
|
118
|
+
return url;
|
|
119
|
+
};
|
|
120
|
+
return {
|
|
121
|
+
getUrl,
|
|
122
|
+
httpMethod: "POST",
|
|
123
|
+
path: "/api/v1/echo/{arg1}",
|
|
124
|
+
pathParams: { arg1: "arg1" },
|
|
125
|
+
__requestType: null,
|
|
126
|
+
__originalRequestType: null,
|
|
127
|
+
__responseType: null,
|
|
128
|
+
__originalResponseType: null
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
export {
|
|
132
|
+
echo2 as echo
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=meta.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/metroinspector-v1-echo-metroinspector.http.ts","../../../src/metroinspector-v1-echo-metroinspector.meta.ts"],"sourcesContent":["import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({\n protoPath: '/api/v1/echo/{arg1}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __echo;\n}\n","import * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\nimport * as ambassadorWixMetroinspectorV1EchoTypes from './metroinspector-v1-echo-metroinspector.types.js';\nimport * as ambassadorWixMetroinspectorV1EchoUniversalTypes from './metroinspector-v1-echo-metroinspector.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function echo(): __PublicMethodMetaInfo<\n 'POST',\n { arg1: string },\n ambassadorWixMetroinspectorV1EchoUniversalTypes.EchoRequest,\n ambassadorWixMetroinspectorV1EchoTypes.EchoRequest,\n ambassadorWixMetroinspectorV1EchoUniversalTypes.EchoResponse,\n ambassadorWixMetroinspectorV1EchoTypes.EchoResponse\n> {\n const payload = { arg1: ':arg1' } as any;\n\n const getRequestOptions = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/api/v1/echo/{arg1}',\n pathParams: { arg1: 'arg1' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";AAAA,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,KAAK,SAA6C;AAChE,WAAS,OAAO,EAAE,KAAK,GAAQ;AAC7B,UAAM,iBAAiB,eAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,WAAW,CAAC;AAAA,MAC9B;AAAA,IACF,CAAC;AACD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK,+DAA+D;AAAA,QAClE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;AClGO,SAASA,QAOd;AACA,QAAM,UAAU,EAAE,MAAM,QAAQ;AAEhC,QAAM,oBAAsD,KAAK,OAAO;AAExE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,MAAM,OAAO;AAAA,IAC3B,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["echo"]}
|