@wix/auto_sdk_motion_metroinspector 1.0.3 → 1.0.5

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.
@@ -27,6 +27,146 @@ interface EchoResponse {
27
27
  /** messge reseult as string */
28
28
  message?: string;
29
29
  }
30
+ interface Dispatched {
31
+ /** the message someone says */
32
+ echo?: EchoMessage;
33
+ }
34
+ interface DomainEvent extends DomainEventBodyOneOf {
35
+ createdEvent?: EntityCreatedEvent;
36
+ updatedEvent?: EntityUpdatedEvent;
37
+ deletedEvent?: EntityDeletedEvent;
38
+ actionEvent?: ActionEvent;
39
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
40
+ id?: string;
41
+ /**
42
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
43
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
44
+ */
45
+ entityFqdn?: string;
46
+ /**
47
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
48
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
49
+ */
50
+ slug?: string;
51
+ /** ID of the entity associated with the event. */
52
+ entityId?: string;
53
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
54
+ eventTime?: Date | null;
55
+ /**
56
+ * Whether the event was triggered as a result of a privacy regulation application
57
+ * (for example, GDPR).
58
+ */
59
+ triggeredByAnonymizeRequest?: boolean | null;
60
+ /** If present, indicates the action that triggered the event. */
61
+ originatedFrom?: string | null;
62
+ /**
63
+ * 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.
64
+ * 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.
65
+ */
66
+ entityEventSequence?: string | null;
67
+ }
68
+ /** @oneof */
69
+ interface DomainEventBodyOneOf {
70
+ createdEvent?: EntityCreatedEvent;
71
+ updatedEvent?: EntityUpdatedEvent;
72
+ deletedEvent?: EntityDeletedEvent;
73
+ actionEvent?: ActionEvent;
74
+ }
75
+ interface EntityCreatedEvent {
76
+ entityAsJson?: string;
77
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
78
+ restoreInfo?: RestoreInfo;
79
+ }
80
+ interface RestoreInfo {
81
+ deletedDate?: Date | null;
82
+ }
83
+ interface EntityUpdatedEvent {
84
+ /**
85
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
86
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
87
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
88
+ */
89
+ currentEntityAsJson?: string;
90
+ }
91
+ interface EntityDeletedEvent {
92
+ /** Entity that was deleted. */
93
+ deletedEntityAsJson?: string | null;
94
+ }
95
+ interface ActionEvent {
96
+ bodyAsJson?: string;
97
+ }
98
+ interface MessageEnvelope {
99
+ /**
100
+ * App instance ID.
101
+ * @format GUID
102
+ */
103
+ instanceId?: string | null;
104
+ /**
105
+ * Event type.
106
+ * @maxLength 150
107
+ */
108
+ eventType?: string;
109
+ /** The identification type and identity data. */
110
+ identity?: IdentificationData;
111
+ /** Stringify payload. */
112
+ data?: string;
113
+ }
114
+ interface IdentificationData extends IdentificationDataIdOneOf {
115
+ /**
116
+ * ID of a site visitor that has not logged in to the site.
117
+ * @format GUID
118
+ */
119
+ anonymousVisitorId?: string;
120
+ /**
121
+ * ID of a site visitor that has logged in to the site.
122
+ * @format GUID
123
+ */
124
+ memberId?: string;
125
+ /**
126
+ * ID of a Wix user (site owner, contributor, etc.).
127
+ * @format GUID
128
+ */
129
+ wixUserId?: string;
130
+ /**
131
+ * ID of an app.
132
+ * @format GUID
133
+ */
134
+ appId?: string;
135
+ /** @readonly */
136
+ identityType?: WebhookIdentityTypeWithLiterals;
137
+ }
138
+ /** @oneof */
139
+ interface IdentificationDataIdOneOf {
140
+ /**
141
+ * ID of a site visitor that has not logged in to the site.
142
+ * @format GUID
143
+ */
144
+ anonymousVisitorId?: string;
145
+ /**
146
+ * ID of a site visitor that has logged in to the site.
147
+ * @format GUID
148
+ */
149
+ memberId?: string;
150
+ /**
151
+ * ID of a Wix user (site owner, contributor, etc.).
152
+ * @format GUID
153
+ */
154
+ wixUserId?: string;
155
+ /**
156
+ * ID of an app.
157
+ * @format GUID
158
+ */
159
+ appId?: string;
160
+ }
161
+ declare enum WebhookIdentityType {
162
+ UNKNOWN = "UNKNOWN",
163
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
164
+ MEMBER = "MEMBER",
165
+ WIX_USER = "WIX_USER",
166
+ APP = "APP"
167
+ }
168
+ /** @enumType */
169
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
30
170
 
31
171
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
32
172
  getUrl: (context: any) => string;
@@ -42,4 +182,4 @@ declare function echo(): __PublicMethodMetaInfo<'POST', {
42
182
  arg1: string;
43
183
  }, EchoRequest$1, EchoRequest, EchoResponse$1, EchoResponse>;
44
184
 
45
- export { type __PublicMethodMetaInfo, echo };
185
+ export { type ActionEvent as ActionEventOriginal, type Dispatched as DispatchedOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EchoMessage as EchoMessageOriginal, type EchoRequest as EchoRequestOriginal, type EchoResponse as EchoResponseOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MessageItem as MessageItemOriginal, type RestoreInfo as RestoreInfoOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, echo };
package/build/cjs/meta.js CHANGED
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // meta.ts
21
21
  var meta_exports = {};
22
22
  __export(meta_exports, {
23
+ WebhookIdentityTypeOriginal: () => WebhookIdentityType,
23
24
  echo: () => echo2
24
25
  });
25
26
  module.exports = __toCommonJS(meta_exports);
@@ -138,6 +139,16 @@ function echo(payload) {
138
139
  return __echo;
139
140
  }
140
141
 
142
+ // src/metroinspector-v1-echo-metroinspector.types.ts
143
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
144
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
145
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
146
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
147
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
148
+ WebhookIdentityType2["APP"] = "APP";
149
+ return WebhookIdentityType2;
150
+ })(WebhookIdentityType || {});
151
+
141
152
  // src/metroinspector-v1-echo-metroinspector.meta.ts
142
153
  function echo2() {
143
154
  const payload = { arg1: ":arg1" };
@@ -159,6 +170,7 @@ function echo2() {
159
170
  }
160
171
  // Annotate the CommonJS export names for ESM import in node:
161
172
  0 && (module.exports = {
173
+ WebhookIdentityTypeOriginal,
162
174
  echo
163
175
  });
164
176
  //# sourceMappingURL=meta.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/metroinspector-v1-echo-metroinspector.http.ts","../../src/metroinspector-v1-echo-metroinspector.meta.ts"],"sourcesContent":["export * from './src/metroinspector-v1-echo-metroinspector.meta.js';\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 migrationOptions: {\n optInTransformResponse: true,\n },\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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ACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,KAAK,SAA6C;AAChE,WAAS,OAAO,EAAE,KAAK,GAAQ;AAC7B,UAAM,qBAAiB,uCAAe,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,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,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;;;ACrGO,SAASC,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","echo"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/metroinspector-v1-echo-metroinspector.http.ts","../../src/metroinspector-v1-echo-metroinspector.types.ts","../../src/metroinspector-v1-echo-metroinspector.meta.ts"],"sourcesContent":["export * from './src/metroinspector-v1-echo-metroinspector.meta.js';\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 migrationOptions: {\n optInTransformResponse: true,\n },\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","export interface EchoMessage {\n /** message comment from EchoMessage proto def, with special comment */\n message?: string;\n /** messages_list comment from EchoMessage proto def */\n messagesList?: MessageItem[];\n id?: string;\n}\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 entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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 currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: 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","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\nexport {\n EchoMessage as EchoMessageOriginal,\n MessageItem as MessageItemOriginal,\n EchoRequest as EchoRequestOriginal,\n EchoResponse as EchoResponseOriginal,\n Dispatched as DispatchedOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n} from './metroinspector-v1-echo-metroinspector.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,cAAAA;AAAA;AAAA;;;ACAA,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;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,MACn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Y;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,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;;;ACkDO,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,uBAAoB;AACpB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,SAAM;AALI,SAAAA;AAAA,GAAA;;;ACvJL,SAASC,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","WebhookIdentityType","echo"]}
@@ -27,6 +27,146 @@ interface EchoResponse {
27
27
  /** messge reseult as string */
28
28
  message?: string;
29
29
  }
30
+ interface Dispatched {
31
+ /** the message someone says */
32
+ echo?: EchoMessage;
33
+ }
34
+ interface DomainEvent extends DomainEventBodyOneOf {
35
+ createdEvent?: EntityCreatedEvent;
36
+ updatedEvent?: EntityUpdatedEvent;
37
+ deletedEvent?: EntityDeletedEvent;
38
+ actionEvent?: ActionEvent;
39
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
40
+ id?: string;
41
+ /**
42
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
43
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
44
+ */
45
+ entityFqdn?: string;
46
+ /**
47
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
48
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
49
+ */
50
+ slug?: string;
51
+ /** ID of the entity associated with the event. */
52
+ entityId?: string;
53
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
54
+ eventTime?: Date | null;
55
+ /**
56
+ * Whether the event was triggered as a result of a privacy regulation application
57
+ * (for example, GDPR).
58
+ */
59
+ triggeredByAnonymizeRequest?: boolean | null;
60
+ /** If present, indicates the action that triggered the event. */
61
+ originatedFrom?: string | null;
62
+ /**
63
+ * 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.
64
+ * 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.
65
+ */
66
+ entityEventSequence?: string | null;
67
+ }
68
+ /** @oneof */
69
+ interface DomainEventBodyOneOf {
70
+ createdEvent?: EntityCreatedEvent;
71
+ updatedEvent?: EntityUpdatedEvent;
72
+ deletedEvent?: EntityDeletedEvent;
73
+ actionEvent?: ActionEvent;
74
+ }
75
+ interface EntityCreatedEvent {
76
+ entityAsJson?: string;
77
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
78
+ restoreInfo?: RestoreInfo;
79
+ }
80
+ interface RestoreInfo {
81
+ deletedDate?: Date | null;
82
+ }
83
+ interface EntityUpdatedEvent {
84
+ /**
85
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
86
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
87
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
88
+ */
89
+ currentEntityAsJson?: string;
90
+ }
91
+ interface EntityDeletedEvent {
92
+ /** Entity that was deleted. */
93
+ deletedEntityAsJson?: string | null;
94
+ }
95
+ interface ActionEvent {
96
+ bodyAsJson?: string;
97
+ }
98
+ interface MessageEnvelope {
99
+ /**
100
+ * App instance ID.
101
+ * @format GUID
102
+ */
103
+ instanceId?: string | null;
104
+ /**
105
+ * Event type.
106
+ * @maxLength 150
107
+ */
108
+ eventType?: string;
109
+ /** The identification type and identity data. */
110
+ identity?: IdentificationData;
111
+ /** Stringify payload. */
112
+ data?: string;
113
+ }
114
+ interface IdentificationData extends IdentificationDataIdOneOf {
115
+ /**
116
+ * ID of a site visitor that has not logged in to the site.
117
+ * @format GUID
118
+ */
119
+ anonymousVisitorId?: string;
120
+ /**
121
+ * ID of a site visitor that has logged in to the site.
122
+ * @format GUID
123
+ */
124
+ memberId?: string;
125
+ /**
126
+ * ID of a Wix user (site owner, contributor, etc.).
127
+ * @format GUID
128
+ */
129
+ wixUserId?: string;
130
+ /**
131
+ * ID of an app.
132
+ * @format GUID
133
+ */
134
+ appId?: string;
135
+ /** @readonly */
136
+ identityType?: WebhookIdentityTypeWithLiterals;
137
+ }
138
+ /** @oneof */
139
+ interface IdentificationDataIdOneOf {
140
+ /**
141
+ * ID of a site visitor that has not logged in to the site.
142
+ * @format GUID
143
+ */
144
+ anonymousVisitorId?: string;
145
+ /**
146
+ * ID of a site visitor that has logged in to the site.
147
+ * @format GUID
148
+ */
149
+ memberId?: string;
150
+ /**
151
+ * ID of a Wix user (site owner, contributor, etc.).
152
+ * @format GUID
153
+ */
154
+ wixUserId?: string;
155
+ /**
156
+ * ID of an app.
157
+ * @format GUID
158
+ */
159
+ appId?: string;
160
+ }
161
+ declare enum WebhookIdentityType {
162
+ UNKNOWN = "UNKNOWN",
163
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
164
+ MEMBER = "MEMBER",
165
+ WIX_USER = "WIX_USER",
166
+ APP = "APP"
167
+ }
168
+ /** @enumType */
169
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
30
170
 
31
171
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
32
172
  getUrl: (context: any) => string;
@@ -42,4 +182,4 @@ declare function echo(): __PublicMethodMetaInfo<'POST', {
42
182
  arg1: string;
43
183
  }, EchoRequest$1, EchoRequest, EchoResponse$1, EchoResponse>;
44
184
 
45
- export { type __PublicMethodMetaInfo, echo };
185
+ export { type ActionEvent as ActionEventOriginal, type Dispatched as DispatchedOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EchoMessage as EchoMessageOriginal, type EchoRequest as EchoRequestOriginal, type EchoResponse as EchoResponseOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MessageItem as MessageItemOriginal, type RestoreInfo as RestoreInfoOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, echo };
package/build/es/meta.mjs CHANGED
@@ -112,6 +112,16 @@ function echo(payload) {
112
112
  return __echo;
113
113
  }
114
114
 
115
+ // src/metroinspector-v1-echo-metroinspector.types.ts
116
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
117
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
118
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
119
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
120
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
121
+ WebhookIdentityType2["APP"] = "APP";
122
+ return WebhookIdentityType2;
123
+ })(WebhookIdentityType || {});
124
+
115
125
  // src/metroinspector-v1-echo-metroinspector.meta.ts
116
126
  function echo2() {
117
127
  const payload = { arg1: ":arg1" };
@@ -132,6 +142,7 @@ function echo2() {
132
142
  };
133
143
  }
134
144
  export {
145
+ WebhookIdentityType as WebhookIdentityTypeOriginal,
135
146
  echo2 as echo
136
147
  };
137
148
  //# sourceMappingURL=meta.mjs.map
@@ -1 +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 migrationOptions: {\n optInTransformResponse: true,\n },\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;A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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"]}
1
+ {"version":3,"sources":["../../src/metroinspector-v1-echo-metroinspector.http.ts","../../src/metroinspector-v1-echo-metroinspector.types.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 migrationOptions: {\n optInTransformResponse: true,\n },\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","export interface EchoMessage {\n /** message comment from EchoMessage proto def, with special comment */\n message?: string;\n /** messages_list comment from EchoMessage proto def */\n messagesList?: MessageItem[];\n id?: string;\n}\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 entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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 currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: 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","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\nexport {\n EchoMessage as EchoMessageOriginal,\n MessageItem as MessageItemOriginal,\n EchoRequest as EchoRequestOriginal,\n EchoResponse as EchoResponseOriginal,\n Dispatched as DispatchedOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n} from './metroinspector-v1-echo-metroinspector.types.js';\n"],"mapp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O,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,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,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;;;ACkDO,IAAK,sBAAL,kBAAKA,yBAAL;AACL,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,uBAAoB;AACpB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,SAAM;AALI,SAAAA;AAAA,GAAA;;;ACvJL,SAASC,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":["WebhookIdentityType","echo"]}
@@ -27,6 +27,146 @@ interface EchoResponse {
27
27
  /** messge reseult as string */
28
28
  message?: string;
29
29
  }
30
+ interface Dispatched {
31
+ /** the message someone says */
32
+ echo?: EchoMessage;
33
+ }
34
+ interface DomainEvent extends DomainEventBodyOneOf {
35
+ createdEvent?: EntityCreatedEvent;
36
+ updatedEvent?: EntityUpdatedEvent;
37
+ deletedEvent?: EntityDeletedEvent;
38
+ actionEvent?: ActionEvent;
39
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
40
+ id?: string;
41
+ /**
42
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
43
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
44
+ */
45
+ entityFqdn?: string;
46
+ /**
47
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
48
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
49
+ */
50
+ slug?: string;
51
+ /** ID of the entity associated with the event. */
52
+ entityId?: string;
53
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
54
+ eventTime?: Date | null;
55
+ /**
56
+ * Whether the event was triggered as a result of a privacy regulation application
57
+ * (for example, GDPR).
58
+ */
59
+ triggeredByAnonymizeRequest?: boolean | null;
60
+ /** If present, indicates the action that triggered the event. */
61
+ originatedFrom?: string | null;
62
+ /**
63
+ * 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.
64
+ * 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.
65
+ */
66
+ entityEventSequence?: string | null;
67
+ }
68
+ /** @oneof */
69
+ interface DomainEventBodyOneOf {
70
+ createdEvent?: EntityCreatedEvent;
71
+ updatedEvent?: EntityUpdatedEvent;
72
+ deletedEvent?: EntityDeletedEvent;
73
+ actionEvent?: ActionEvent;
74
+ }
75
+ interface EntityCreatedEvent {
76
+ entityAsJson?: string;
77
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
78
+ restoreInfo?: RestoreInfo;
79
+ }
80
+ interface RestoreInfo {
81
+ deletedDate?: Date | null;
82
+ }
83
+ interface EntityUpdatedEvent {
84
+ /**
85
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
86
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
87
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
88
+ */
89
+ currentEntityAsJson?: string;
90
+ }
91
+ interface EntityDeletedEvent {
92
+ /** Entity that was deleted. */
93
+ deletedEntityAsJson?: string | null;
94
+ }
95
+ interface ActionEvent {
96
+ bodyAsJson?: string;
97
+ }
98
+ interface MessageEnvelope {
99
+ /**
100
+ * App instance ID.
101
+ * @format GUID
102
+ */
103
+ instanceId?: string | null;
104
+ /**
105
+ * Event type.
106
+ * @maxLength 150
107
+ */
108
+ eventType?: string;
109
+ /** The identification type and identity data. */
110
+ identity?: IdentificationData;
111
+ /** Stringify payload. */
112
+ data?: string;
113
+ }
114
+ interface IdentificationData extends IdentificationDataIdOneOf {
115
+ /**
116
+ * ID of a site visitor that has not logged in to the site.
117
+ * @format GUID
118
+ */
119
+ anonymousVisitorId?: string;
120
+ /**
121
+ * ID of a site visitor that has logged in to the site.
122
+ * @format GUID
123
+ */
124
+ memberId?: string;
125
+ /**
126
+ * ID of a Wix user (site owner, contributor, etc.).
127
+ * @format GUID
128
+ */
129
+ wixUserId?: string;
130
+ /**
131
+ * ID of an app.
132
+ * @format GUID
133
+ */
134
+ appId?: string;
135
+ /** @readonly */
136
+ identityType?: WebhookIdentityTypeWithLiterals;
137
+ }
138
+ /** @oneof */
139
+ interface IdentificationDataIdOneOf {
140
+ /**
141
+ * ID of a site visitor that has not logged in to the site.
142
+ * @format GUID
143
+ */
144
+ anonymousVisitorId?: string;
145
+ /**
146
+ * ID of a site visitor that has logged in to the site.
147
+ * @format GUID
148
+ */
149
+ memberId?: string;
150
+ /**
151
+ * ID of a Wix user (site owner, contributor, etc.).
152
+ * @format GUID
153
+ */
154
+ wixUserId?: string;
155
+ /**
156
+ * ID of an app.
157
+ * @format GUID
158
+ */
159
+ appId?: string;
160
+ }
161
+ declare enum WebhookIdentityType {
162
+ UNKNOWN = "UNKNOWN",
163
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
164
+ MEMBER = "MEMBER",
165
+ WIX_USER = "WIX_USER",
166
+ APP = "APP"
167
+ }
168
+ /** @enumType */
169
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
30
170
 
31
171
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
32
172
  getUrl: (context: any) => string;
@@ -42,4 +182,4 @@ declare function echo(): __PublicMethodMetaInfo<'POST', {
42
182
  arg1: string;
43
183
  }, EchoRequest$1, EchoRequest, EchoResponse$1, EchoResponse>;
44
184
 
45
- export { type __PublicMethodMetaInfo, echo };
185
+ export { type ActionEvent as ActionEventOriginal, type Dispatched as DispatchedOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EchoMessage as EchoMessageOriginal, type EchoRequest as EchoRequestOriginal, type EchoResponse as EchoResponseOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MessageItem as MessageItemOriginal, type RestoreInfo as RestoreInfoOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, echo };
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // meta.ts
21
21
  var meta_exports = {};
22
22
  __export(meta_exports, {
23
+ WebhookIdentityTypeOriginal: () => WebhookIdentityType,
23
24
  echo: () => echo2
24
25
  });
25
26
  module.exports = __toCommonJS(meta_exports);
@@ -138,6 +139,16 @@ function echo(payload) {
138
139
  return __echo;
139
140
  }
140
141
 
142
+ // src/metroinspector-v1-echo-metroinspector.types.ts
143
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
144
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
145
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
146
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
147
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
148
+ WebhookIdentityType2["APP"] = "APP";
149
+ return WebhookIdentityType2;
150
+ })(WebhookIdentityType || {});
151
+
141
152
  // src/metroinspector-v1-echo-metroinspector.meta.ts
142
153
  function echo2() {
143
154
  const payload = { arg1: ":arg1" };
@@ -159,6 +170,7 @@ function echo2() {
159
170
  }
160
171
  // Annotate the CommonJS export names for ESM import in node:
161
172
  0 && (module.exports = {
173
+ WebhookIdentityTypeOriginal,
162
174
  echo
163
175
  });
164
176
  //# sourceMappingURL=meta.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../meta.ts","../../../src/metroinspector-v1-echo-metroinspector.http.ts","../../../src/metroinspector-v1-echo-metroinspector.meta.ts"],"sourcesContent":["export * from './src/metroinspector-v1-echo-metroinspector.meta.js';\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 migrationOptions: {\n optInTransformResponse: true,\n },\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;AAAA;AAAA,cAAAA;AAAA;AAAA;;;ACAA,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;A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;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,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,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;;;ACrGO,SAASC,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","echo"]}
1
+ {"version":3,"sources":["../../../meta.ts","../../../src/metroinspector-v1-echo-metroinspector.http.ts","../../../src/metroinspector-v1-echo-metroinspector.types.ts","../../../src/metroinspector-v1-echo-metroinspector.meta.ts"],"sourcesContent":["export * from './src/metroinspector-v1-echo-metroinspector.meta.js';\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 migrationOptions: {\n optInTransformResponse: true,\n },\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","export interface EchoMessage {\n /** message comment from EchoMessage proto def, with special comment */\n message?: string;\n /** messages_list comment from EchoMessage proto def */\n messagesList?: MessageItem[];\n id?: string;\n}\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 entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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 currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: 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","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\nexport {\n EchoMessage as EchoMessageOriginal,\n MessageItem as MessageItemOriginal,\n EchoRequest as EchoRequestOriginal,\n EchoResponse as EchoResponseOriginal,\n Dispatched as DispatchedOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n} from './metroinspector-v1-echo-metroinspector.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,cAAAA;AAAA;AAAA;;;ACAA,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;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;AA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AA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ACkDO,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,uBAAoB;AACpB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,SAAM;AALI,SAAAA;AAAA,GAAA;;;ACvJL,SAASC,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","WebhookIdentityType","echo"]}
@@ -27,6 +27,146 @@ interface EchoResponse {
27
27
  /** messge reseult as string */
28
28
  message?: string;
29
29
  }
30
+ interface Dispatched {
31
+ /** the message someone says */
32
+ echo?: EchoMessage;
33
+ }
34
+ interface DomainEvent extends DomainEventBodyOneOf {
35
+ createdEvent?: EntityCreatedEvent;
36
+ updatedEvent?: EntityUpdatedEvent;
37
+ deletedEvent?: EntityDeletedEvent;
38
+ actionEvent?: ActionEvent;
39
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
40
+ id?: string;
41
+ /**
42
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
43
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
44
+ */
45
+ entityFqdn?: string;
46
+ /**
47
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
48
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
49
+ */
50
+ slug?: string;
51
+ /** ID of the entity associated with the event. */
52
+ entityId?: string;
53
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
54
+ eventTime?: Date | null;
55
+ /**
56
+ * Whether the event was triggered as a result of a privacy regulation application
57
+ * (for example, GDPR).
58
+ */
59
+ triggeredByAnonymizeRequest?: boolean | null;
60
+ /** If present, indicates the action that triggered the event. */
61
+ originatedFrom?: string | null;
62
+ /**
63
+ * 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.
64
+ * 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.
65
+ */
66
+ entityEventSequence?: string | null;
67
+ }
68
+ /** @oneof */
69
+ interface DomainEventBodyOneOf {
70
+ createdEvent?: EntityCreatedEvent;
71
+ updatedEvent?: EntityUpdatedEvent;
72
+ deletedEvent?: EntityDeletedEvent;
73
+ actionEvent?: ActionEvent;
74
+ }
75
+ interface EntityCreatedEvent {
76
+ entityAsJson?: string;
77
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
78
+ restoreInfo?: RestoreInfo;
79
+ }
80
+ interface RestoreInfo {
81
+ deletedDate?: Date | null;
82
+ }
83
+ interface EntityUpdatedEvent {
84
+ /**
85
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
86
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
87
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
88
+ */
89
+ currentEntityAsJson?: string;
90
+ }
91
+ interface EntityDeletedEvent {
92
+ /** Entity that was deleted. */
93
+ deletedEntityAsJson?: string | null;
94
+ }
95
+ interface ActionEvent {
96
+ bodyAsJson?: string;
97
+ }
98
+ interface MessageEnvelope {
99
+ /**
100
+ * App instance ID.
101
+ * @format GUID
102
+ */
103
+ instanceId?: string | null;
104
+ /**
105
+ * Event type.
106
+ * @maxLength 150
107
+ */
108
+ eventType?: string;
109
+ /** The identification type and identity data. */
110
+ identity?: IdentificationData;
111
+ /** Stringify payload. */
112
+ data?: string;
113
+ }
114
+ interface IdentificationData extends IdentificationDataIdOneOf {
115
+ /**
116
+ * ID of a site visitor that has not logged in to the site.
117
+ * @format GUID
118
+ */
119
+ anonymousVisitorId?: string;
120
+ /**
121
+ * ID of a site visitor that has logged in to the site.
122
+ * @format GUID
123
+ */
124
+ memberId?: string;
125
+ /**
126
+ * ID of a Wix user (site owner, contributor, etc.).
127
+ * @format GUID
128
+ */
129
+ wixUserId?: string;
130
+ /**
131
+ * ID of an app.
132
+ * @format GUID
133
+ */
134
+ appId?: string;
135
+ /** @readonly */
136
+ identityType?: WebhookIdentityTypeWithLiterals;
137
+ }
138
+ /** @oneof */
139
+ interface IdentificationDataIdOneOf {
140
+ /**
141
+ * ID of a site visitor that has not logged in to the site.
142
+ * @format GUID
143
+ */
144
+ anonymousVisitorId?: string;
145
+ /**
146
+ * ID of a site visitor that has logged in to the site.
147
+ * @format GUID
148
+ */
149
+ memberId?: string;
150
+ /**
151
+ * ID of a Wix user (site owner, contributor, etc.).
152
+ * @format GUID
153
+ */
154
+ wixUserId?: string;
155
+ /**
156
+ * ID of an app.
157
+ * @format GUID
158
+ */
159
+ appId?: string;
160
+ }
161
+ declare enum WebhookIdentityType {
162
+ UNKNOWN = "UNKNOWN",
163
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
164
+ MEMBER = "MEMBER",
165
+ WIX_USER = "WIX_USER",
166
+ APP = "APP"
167
+ }
168
+ /** @enumType */
169
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
30
170
 
31
171
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
32
172
  getUrl: (context: any) => string;
@@ -42,4 +182,4 @@ declare function echo(): __PublicMethodMetaInfo<'POST', {
42
182
  arg1: string;
43
183
  }, EchoRequest$1, EchoRequest, EchoResponse$1, EchoResponse>;
44
184
 
45
- export { type __PublicMethodMetaInfo, echo };
185
+ export { type ActionEvent as ActionEventOriginal, type Dispatched as DispatchedOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EchoMessage as EchoMessageOriginal, type EchoRequest as EchoRequestOriginal, type EchoResponse as EchoResponseOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MessageItem as MessageItemOriginal, type RestoreInfo as RestoreInfoOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, echo };
@@ -112,6 +112,16 @@ function echo(payload) {
112
112
  return __echo;
113
113
  }
114
114
 
115
+ // src/metroinspector-v1-echo-metroinspector.types.ts
116
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
117
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
118
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
119
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
120
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
121
+ WebhookIdentityType2["APP"] = "APP";
122
+ return WebhookIdentityType2;
123
+ })(WebhookIdentityType || {});
124
+
115
125
  // src/metroinspector-v1-echo-metroinspector.meta.ts
116
126
  function echo2() {
117
127
  const payload = { arg1: ":arg1" };
@@ -132,6 +142,7 @@ function echo2() {
132
142
  };
133
143
  }
134
144
  export {
145
+ WebhookIdentityType as WebhookIdentityTypeOriginal,
135
146
  echo2 as echo
136
147
  };
137
148
  //# sourceMappingURL=meta.mjs.map
@@ -1 +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 migrationOptions: {\n optInTransformResponse: true,\n },\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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ts","../../../src/metroinspector-v1-echo-metroinspector.types.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 migrationOptions: {\n optInTransformResponse: true,\n },\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","export interface EchoMessage {\n /** message comment from EchoMessage proto def, with special comment */\n message?: string;\n /** messages_list comment from EchoMessage proto def */\n messagesList?: MessageItem[];\n id?: string;\n}\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 entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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 currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: 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","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\nexport {\n EchoMessage as EchoMessageOriginal,\n MessageItem as MessageItemOriginal,\n EchoRequest as EchoRequestOriginal,\n EchoResponse as EchoResponseOriginal,\n Dispatched as DispatchedOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n} from './metroinspector-v1-echo-metroinspector.types.js';\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,yBA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b,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,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,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;;;ACkDO,IAAK,sBAAL,kBAAKA,yBAAL;AACL,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,uBAAoB;AACpB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,SAAM;AALI,SAAAA;AAAA,GAAA;;;ACvJL,SAASC,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":["WebhookIdentityType","echo"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_motion_metroinspector",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -29,7 +29,7 @@
29
29
  "service-plugins"
30
30
  ],
31
31
  "dependencies": {
32
- "@wix/sdk-runtime": "^0.3.55",
32
+ "@wix/sdk-runtime": "^1.0.0",
33
33
  "@wix/sdk-types": "^1.13.35"
34
34
  },
35
35
  "devDependencies": {
@@ -50,5 +50,5 @@
50
50
  "fqdn": "wix.metroinspector.v1.echo"
51
51
  }
52
52
  },
53
- "falconPackageHash": "bd874b7c84cfc5d7efdd7d79c62093c71d2f26e33d990ec8bc410594"
53
+ "falconPackageHash": "339e681931ee6ed4dbe750e1f6734c6581f3c67d741d8ef1f8635628"
54
54
  }