@wix/auto_sdk_motion_metroinspector 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +3 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +3 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +3 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +3 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +3 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +3 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js +3 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +3 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js +3 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs +3 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +3 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs +3 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -135,6 +135,9 @@ function echo(payload) {
|
|
|
135
135
|
method: "POST",
|
|
136
136
|
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
137
137
|
packageName: PACKAGE_NAME,
|
|
138
|
+
migrationOptions: {
|
|
139
|
+
optInTransformResponse: true
|
|
140
|
+
},
|
|
138
141
|
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
139
142
|
protoPath: "/api/v1/echo/{arg1}",
|
|
140
143
|
data: serializedData,
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/metroinspector-v1-echo-metroinspector.public.ts","../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../src/metroinspector-v1-echo-metroinspector.http.ts","../../src/metroinspector-v1-echo-metroinspector.context.ts"],"sourcesContent":["export * from './src/metroinspector-v1-echo-metroinspector.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient } from '@wix/sdk-types';\nimport {\n EchoDispatchedEnvelope,\n EchoOptions,\n echo as universalEcho,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/motion' };\n\nexport function echo(httpClient: HttpClient): EchoSignature {\n return (arg1: string, options?: EchoOptions) =>\n universalEcho(\n arg1,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface EchoSignature {\n /**\n * echo given arg1 and arg2\n * @param - 1st part of the message\n * @param - modified comment for arg2 el hovav\n * @returns messge reseult as string\n */\n (arg1: string, options?: EchoOptions): Promise<string>;\n}\n\nexport const onEchoDispatched = EventDefinition(\n 'wix.metroinspector.v1.echo_dispatched',\n true,\n (event: EchoDispatchedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<EchoDispatchedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EchoDispatchedEnvelope,\n EchoMessage,\n EchoOptions,\n EchoRequest,\n EchoResponse,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n MessageItem,\n RestoreInfo,\n WebhookIdentityType,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({\n protoPath: '/api/v1/echo/{arg1}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __echo;\n}\n","import { echo as publicEcho } from './metroinspector-v1-echo-metroinspector.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onEchoDispatched as publicOnEchoDispatched } from './metroinspector-v1-echo-metroinspector.public.js';\n\nexport const echo: MaybeContext<\n BuildRESTFunction<typeof publicEcho> & typeof publicEcho\n> = /*#__PURE__*/ createRESTModule(publicEcho);\n/**\n * echo event that might be consumed when somone says something!\n */\nexport const onEchoDispatched: BuildEventDefinition<\n typeof publicOnEchoDispatched\n> &\n typeof publicOnEchoDispatched = createEventModule(publicOnEchoDispatched);\n\nexport { WebhookIdentityType } from './metroinspector-v1-echo-metroinspector.universal.js';\nexport {\n MessageItem,\n EchoRequest,\n EchoResponse,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n EchoMessage,\n BaseEventMetadata,\n EventMetadata,\n EchoDispatchedEnvelope,\n EchoOptions,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './metroinspector-v1-echo-metroinspector.universal.js';\n"],"mappings":";;;;;;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AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI,GAAG;AAAA,EAC/D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ,SAAS;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AD1SO,SAASC,MAAK,YAAuC;AAC1D,SAAO,CAAC,MAAc,YACpBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,IAAM,uBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA0B;;;AG3C1B,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,QAEK,2DAAiBA,KAAU;AAItC,IAAMC,wBAGqB,mDAAkB,gBAAsB;","names":["echo","onEchoDispatched","import_rename_all_nested_keys","import_timestamp","import_transform_paths","WebhookIdentityType","echo","sdkTransformError","echo","import_rest_modules","echo","onEchoDispatched"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/metroinspector-v1-echo-metroinspector.public.ts","../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../src/metroinspector-v1-echo-metroinspector.http.ts","../../src/metroinspector-v1-echo-metroinspector.context.ts"],"sourcesContent":["export * from './src/metroinspector-v1-echo-metroinspector.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient } from '@wix/sdk-types';\nimport {\n EchoDispatchedEnvelope,\n EchoOptions,\n echo as universalEcho,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/motion' };\n\nexport function echo(httpClient: HttpClient): EchoSignature {\n return (arg1: string, options?: EchoOptions) =>\n universalEcho(\n arg1,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface EchoSignature {\n /**\n * echo given arg1 and arg2\n * @param - 1st part of the message\n * @param - modified comment for arg2 el hovav\n * @returns messge reseult as string\n */\n (arg1: string, options?: EchoOptions): Promise<string>;\n}\n\nexport const onEchoDispatched = EventDefinition(\n 'wix.metroinspector.v1.echo_dispatched',\n true,\n (event: EchoDispatchedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<EchoDispatchedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EchoDispatchedEnvelope,\n EchoMessage,\n EchoOptions,\n EchoRequest,\n EchoResponse,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n MessageItem,\n RestoreInfo,\n WebhookIdentityType,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n 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 { echo as publicEcho } from './metroinspector-v1-echo-metroinspector.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onEchoDispatched as publicOnEchoDispatched } from './metroinspector-v1-echo-metroinspector.public.js';\n\nexport const echo: MaybeContext<\n BuildRESTFunction<typeof publicEcho> & typeof publicEcho\n> = /*#__PURE__*/ createRESTModule(publicEcho);\n/**\n * echo event that might be consumed when somone says something!\n */\nexport const onEchoDispatched: BuildEventDefinition<\n typeof publicOnEchoDispatched\n> &\n typeof publicOnEchoDispatched = createEventModule(publicOnEchoDispatched);\n\nexport { WebhookIdentityType } from './metroinspector-v1-echo-metroinspector.universal.js';\nexport {\n MessageItem,\n EchoRequest,\n EchoResponse,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n EchoMessage,\n BaseEventMetadata,\n EventMetadata,\n EchoDispatchedEnvelope,\n EchoOptions,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './metroinspector-v1-echo-metroinspector.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,cAAAA;AAAA,EAAA,wBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAA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S,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ,SAAS;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AD1SO,SAASC,MAAK,YAAuC;AAC1D,SAAO,CAAC,MAAc,YACpBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,IAAM,uBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA0B;;;AG3C1B,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,QAEK,2DAAiBA,KAAU;AAItC,IAAMC,wBAGqB,mDAAkB,gBAAsB;","names":["echo","onEchoDispatched","import_rename_all_nested_keys","import_timestamp","import_transform_paths","WebhookIdentityType","echo","sdkTransformError","echo","import_rest_modules","echo","onEchoDispatched"]}
|
|
@@ -128,6 +128,9 @@ function echo(payload) {
|
|
|
128
128
|
method: "POST",
|
|
129
129
|
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
130
130
|
packageName: PACKAGE_NAME,
|
|
131
|
+
migrationOptions: {
|
|
132
|
+
optInTransformResponse: true
|
|
133
|
+
},
|
|
131
134
|
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
132
135
|
protoPath: "/api/v1/echo/{arg1}",
|
|
133
136
|
data: serializedData,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../src/metroinspector-v1-echo-metroinspector.http.ts"],"sourcesContent":["export * from './src/metroinspector-v1-echo-metroinspector.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({\n protoPath: '/api/v1/echo/{arg1}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __echo;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,cAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,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;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AA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B;AACpB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,SAAM;AALI,SAAAA;AAAA,GAAA;AA6FZ,eAAsBC,MACpB,MACA,SACiB;AAEjB,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,MAAM,SAAS;AAAA,IACf,YAAY,SAAS;AAAA,IACrB,WAAW,SAAS;AAAA,IACpB,UAAU,SAAS;AAAA,EACrB,CAAC;AAED,QAAM,UAA4C,KAAK,OAAO;AAE9D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI,GAAG;AAAA,EAC/D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ,SAAS;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["echo","WebhookIdentityType","echo","sdkTransformError"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../src/metroinspector-v1-echo-metroinspector.http.ts"],"sourcesContent":["export * from './src/metroinspector-v1-echo-metroinspector.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n 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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,cAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,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;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;AA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IACrB,WAAW,SAAS;AAAA,IACpB,UAAU,SAAS;AAAA,EACrB,CAAC;AAED,QAAM,UAA4C,KAAK,OAAO;AAE9D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI,GAAG;AAAA,EAC/D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ,SAAS;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["echo","WebhookIdentityType","echo","sdkTransformError"]}
|
package/build/cjs/meta.js
CHANGED
|
@@ -123,6 +123,9 @@ function echo(payload) {
|
|
|
123
123
|
method: "POST",
|
|
124
124
|
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
125
125
|
packageName: PACKAGE_NAME,
|
|
126
|
+
migrationOptions: {
|
|
127
|
+
optInTransformResponse: true
|
|
128
|
+
},
|
|
126
129
|
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
127
130
|
protoPath: "/api/v1/echo/{arg1}",
|
|
128
131
|
data: serializedData,
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -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 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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,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,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;;;
|
|
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;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,SA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AC;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"]}
|
package/build/es/index.mjs
CHANGED
|
@@ -110,6 +110,9 @@ function echo(payload) {
|
|
|
110
110
|
method: "POST",
|
|
111
111
|
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
112
112
|
packageName: PACKAGE_NAME,
|
|
113
|
+
migrationOptions: {
|
|
114
|
+
optInTransformResponse: true
|
|
115
|
+
},
|
|
113
116
|
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
114
117
|
protoPath: "/api/v1/echo/{arg1}",
|
|
115
118
|
data: serializedData,
|
package/build/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/metroinspector-v1-echo-metroinspector.public.ts","../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../src/metroinspector-v1-echo-metroinspector.http.ts","../../src/metroinspector-v1-echo-metroinspector.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient } from '@wix/sdk-types';\nimport {\n EchoDispatchedEnvelope,\n EchoOptions,\n echo as universalEcho,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/motion' };\n\nexport function echo(httpClient: HttpClient): EchoSignature {\n return (arg1: string, options?: EchoOptions) =>\n universalEcho(\n arg1,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface EchoSignature {\n /**\n * echo given arg1 and arg2\n * @param - 1st part of the message\n * @param - modified comment for arg2 el hovav\n * @returns messge reseult as string\n */\n (arg1: string, options?: EchoOptions): Promise<string>;\n}\n\nexport const onEchoDispatched = EventDefinition(\n 'wix.metroinspector.v1.echo_dispatched',\n true,\n (event: EchoDispatchedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<EchoDispatchedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EchoDispatchedEnvelope,\n EchoMessage,\n EchoOptions,\n EchoRequest,\n EchoResponse,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n MessageItem,\n RestoreInfo,\n WebhookIdentityType,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({\n protoPath: '/api/v1/echo/{arg1}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __echo;\n}\n","import { echo as publicEcho } from './metroinspector-v1-echo-metroinspector.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onEchoDispatched as publicOnEchoDispatched } from './metroinspector-v1-echo-metroinspector.public.js';\n\nexport const echo: MaybeContext<\n BuildRESTFunction<typeof publicEcho> & typeof publicEcho\n> = /*#__PURE__*/ createRESTModule(publicEcho);\n/**\n * echo event that might be consumed when somone says something!\n */\nexport const onEchoDispatched: BuildEventDefinition<\n typeof publicOnEchoDispatched\n> &\n typeof publicOnEchoDispatched = createEventModule(publicOnEchoDispatched);\n\nexport { WebhookIdentityType } from './metroinspector-v1-echo-metroinspector.universal.js';\nexport {\n MessageItem,\n EchoRequest,\n EchoResponse,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n EchoMessage,\n BaseEventMetadata,\n EventMetadata,\n EchoDispatchedEnvelope,\n EchoOptions,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './metroinspector-v1-echo-metroinspector.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,4CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAmC;;;ACH5C,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,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,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BAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AD1SO,SAASC,MAAK,YAAuC;AAC1D,SAAO,CAAC,MAAc,YACpBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,IAAM,mBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,CAAC,UACCC;AAAA,IACEC,gBAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA0B;;;AG3C1B,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAQ3B,IAAMC,QAEK,iCAAiBA,KAAU;AAItC,IAAMC,oBAGqB,kBAAkB,gBAAsB;","names":["renameKeysFromRESTResponseToSDKResponse","transformPaths","WebhookIdentityType","echo","echo","renameKeysFromRESTResponseToSDKResponse","transformPaths","echo","onEchoDispatched"]}
|
|
1
|
+
{"version":3,"sources":["../../src/metroinspector-v1-echo-metroinspector.public.ts","../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../src/metroinspector-v1-echo-metroinspector.http.ts","../../src/metroinspector-v1-echo-metroinspector.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient } from '@wix/sdk-types';\nimport {\n EchoDispatchedEnvelope,\n EchoOptions,\n echo as universalEcho,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/motion' };\n\nexport function echo(httpClient: HttpClient): EchoSignature {\n return (arg1: string, options?: EchoOptions) =>\n universalEcho(\n arg1,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface EchoSignature {\n /**\n * echo given arg1 and arg2\n * @param - 1st part of the message\n * @param - modified comment for arg2 el hovav\n * @returns messge reseult as string\n */\n (arg1: string, options?: EchoOptions): Promise<string>;\n}\n\nexport const onEchoDispatched = EventDefinition(\n 'wix.metroinspector.v1.echo_dispatched',\n true,\n (event: EchoDispatchedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<EchoDispatchedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EchoDispatchedEnvelope,\n EchoMessage,\n EchoOptions,\n EchoRequest,\n EchoResponse,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n MessageItem,\n RestoreInfo,\n WebhookIdentityType,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n 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 { echo as publicEcho } from './metroinspector-v1-echo-metroinspector.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onEchoDispatched as publicOnEchoDispatched } from './metroinspector-v1-echo-metroinspector.public.js';\n\nexport const echo: MaybeContext<\n BuildRESTFunction<typeof publicEcho> & typeof publicEcho\n> = /*#__PURE__*/ createRESTModule(publicEcho);\n/**\n * echo event that might be consumed when somone says something!\n */\nexport const onEchoDispatched: BuildEventDefinition<\n typeof publicOnEchoDispatched\n> &\n typeof publicOnEchoDispatched = createEventModule(publicOnEchoDispatched);\n\nexport { WebhookIdentityType } from './metroinspector-v1-echo-metroinspector.universal.js';\nexport {\n MessageItem,\n EchoRequest,\n EchoResponse,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n EchoMessage,\n BaseEventMetadata,\n EventMetadata,\n EchoDispatchedEnvelope,\n EchoOptions,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './metroinspector-v1-echo-metroinspector.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,4CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAmC;;;ACH5C,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,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,I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,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,IAAM,mBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,CAAC,UACCC;AAAA,IACEC,gBAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA0B;;;AG3C1B,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAQ3B,IAAMC,QAEK,iCAAiBA,KAAU;AAItC,IAAMC,oBAGqB,kBAAkB,gBAAsB;","names":["renameKeysFromRESTResponseToSDKResponse","transformPaths","WebhookIdentityType","echo","echo","renameKeysFromRESTResponseToSDKResponse","transformPaths","echo","onEchoDispatched"]}
|
|
@@ -104,6 +104,9 @@ function echo(payload) {
|
|
|
104
104
|
method: "POST",
|
|
105
105
|
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
106
106
|
packageName: PACKAGE_NAME,
|
|
107
|
+
migrationOptions: {
|
|
108
|
+
optInTransformResponse: true
|
|
109
|
+
},
|
|
107
110
|
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
108
111
|
protoPath: "/api/v1/echo/{arg1}",
|
|
109
112
|
data: serializedData,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../src/metroinspector-v1-echo-metroinspector.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({\n protoPath: '/api/v1/echo/{arg1}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __echo;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAA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OAAO,IAAI,GAAG;AAAA,EAC/D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ,SAAS;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["WebhookIdentityType","echo"]}
|
|
1
|
+
{"version":3,"sources":["../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../src/metroinspector-v1-echo-metroinspector.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n 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"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,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;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WebhookIdentityType","echo"]}
|
package/build/es/meta.mjs
CHANGED
|
@@ -97,6 +97,9 @@ function echo(payload) {
|
|
|
97
97
|
method: "POST",
|
|
98
98
|
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
99
99
|
packageName: PACKAGE_NAME,
|
|
100
|
+
migrationOptions: {
|
|
101
|
+
optInTransformResponse: true
|
|
102
|
+
},
|
|
100
103
|
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
101
104
|
protoPath: "/api/v1/echo/{arg1}",
|
|
102
105
|
data: serializedData,
|
package/build/es/meta.mjs.map
CHANGED
|
@@ -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 url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({\n protoPath: '/api/v1/echo/{arg1}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __echo;\n}\n","import * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\nimport * as ambassadorWixMetroinspectorV1EchoTypes from './metroinspector-v1-echo-metroinspector.types.js';\nimport * as ambassadorWixMetroinspectorV1EchoUniversalTypes from './metroinspector-v1-echo-metroinspector.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function echo(): __PublicMethodMetaInfo<\n 'POST',\n { arg1: string },\n ambassadorWixMetroinspectorV1EchoUniversalTypes.EchoRequest,\n ambassadorWixMetroinspectorV1EchoTypes.EchoRequest,\n ambassadorWixMetroinspectorV1EchoUniversalTypes.EchoResponse,\n ambassadorWixMetroinspectorV1EchoTypes.EchoResponse\n> {\n const payload = { arg1: ':arg1' } as any;\n\n const getRequestOptions = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/api/v1/echo/{arg1}',\n pathParams: { arg1: 'arg1' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";AAAA,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,KAAK,SAA6C;AAChE,WAAS,OAAO,EAAE,KAAK,GAAQ;AAC7B,UAAM,iBAAiB,eAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,WAAW,CAAC;AAAA,MAC9B;AAAA,IACF,CAAC;AACD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK,+DAA+D;AAAA,QAClE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;
|
|
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,kB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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;;;ACrGO,SAASA,QAOd;AACA,QAAM,UAAU,EAAE,MAAM,QAAQ;AAEhC,QAAM,oBAAsD,KAAK,OAAO;AAExE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,MAAM,OAAO;AAAA,IAC3B,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["echo"]}
|
|
@@ -135,6 +135,9 @@ function echo(payload) {
|
|
|
135
135
|
method: "POST",
|
|
136
136
|
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
137
137
|
packageName: PACKAGE_NAME,
|
|
138
|
+
migrationOptions: {
|
|
139
|
+
optInTransformResponse: true
|
|
140
|
+
},
|
|
138
141
|
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
139
142
|
protoPath: "/api/v1/echo/{arg1}",
|
|
140
143
|
data: serializedData,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../index.ts","../../../src/metroinspector-v1-echo-metroinspector.public.ts","../../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../../src/metroinspector-v1-echo-metroinspector.http.ts","../../../src/metroinspector-v1-echo-metroinspector.context.ts"],"sourcesContent":["export * from './src/metroinspector-v1-echo-metroinspector.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient } from '@wix/sdk-types';\nimport {\n EchoDispatchedEnvelope,\n EchoOptions,\n echo as universalEcho,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/motion' };\n\nexport function echo(httpClient: HttpClient): EchoSignature {\n return (arg1: string, options?: EchoOptions) =>\n universalEcho(\n arg1,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface EchoSignature {\n /**\n * echo given arg1 and arg2\n * @param - 1st part of the message\n * @param - modified comment for arg2 el hovav\n * @returns messge reseult as string\n */\n (arg1: string, options?: EchoOptions): Promise<string>;\n}\n\nexport const onEchoDispatched = EventDefinition(\n 'wix.metroinspector.v1.echo_dispatched',\n true,\n (event: EchoDispatchedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<EchoDispatchedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EchoDispatchedEnvelope,\n EchoMessage,\n EchoOptions,\n EchoRequest,\n EchoResponse,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n MessageItem,\n RestoreInfo,\n WebhookIdentityType,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({\n protoPath: '/api/v1/echo/{arg1}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __echo;\n}\n","import { echo as publicEcho } from './metroinspector-v1-echo-metroinspector.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onEchoDispatched as publicOnEchoDispatched } from './metroinspector-v1-echo-metroinspector.public.js';\n\nexport const echo: MaybeContext<\n BuildRESTFunction<typeof publicEcho> & typeof publicEcho\n> = /*#__PURE__*/ createRESTModule(publicEcho);\n/**\n * echo event that might be consumed when somone says something!\n */\nexport const onEchoDispatched: BuildEventDefinition<\n typeof publicOnEchoDispatched\n> &\n typeof publicOnEchoDispatched = createEventModule(publicOnEchoDispatched);\n\nexport { WebhookIdentityType } from './metroinspector-v1-echo-metroinspector.universal.js';\nexport {\n MessageItem,\n EchoRequest,\n EchoResponse,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n EchoMessage,\n BaseEventMetadata,\n EventMetadata,\n EchoDispatchedEnvelope,\n EchoOptions,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './metroinspector-v1-echo-metroinspector.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,cAAAA;AAAA,EAAA,wBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA4C;;;ACH5C,6BAAoD;AACpD,oCAGO;;;ACJP,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;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;A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,QAAM,UAA4C,KAAK,OAAO;AAE9D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI,GAAG;AAAA,EAC/D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ,SAAS;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AD1SO,SAASC,MAAK,YAAuC;AAC1D,SAAO,CAAC,MAAc,YACpBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,IAAM,uBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA0B;;;AG3C1B,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,QAEK,2DAAiBA,KAAU;AAItC,IAAMC,wBAGqB,mDAAkB,gBAAsB;","names":["echo","onEchoDispatched","import_rename_all_nested_keys","import_timestamp","import_transform_paths","WebhookIdentityType","echo","sdkTransformError","echo","import_rest_modules","echo","onEchoDispatched"]}
|
|
1
|
+
{"version":3,"sources":["../../../index.ts","../../../src/metroinspector-v1-echo-metroinspector.public.ts","../../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../../src/metroinspector-v1-echo-metroinspector.http.ts","../../../src/metroinspector-v1-echo-metroinspector.context.ts"],"sourcesContent":["export * from './src/metroinspector-v1-echo-metroinspector.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient } from '@wix/sdk-types';\nimport {\n EchoDispatchedEnvelope,\n EchoOptions,\n echo as universalEcho,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/motion' };\n\nexport function echo(httpClient: HttpClient): EchoSignature {\n return (arg1: string, options?: EchoOptions) =>\n universalEcho(\n arg1,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface EchoSignature {\n /**\n * echo given arg1 and arg2\n * @param - 1st part of the message\n * @param - modified comment for arg2 el hovav\n * @returns messge reseult as string\n */\n (arg1: string, options?: EchoOptions): Promise<string>;\n}\n\nexport const onEchoDispatched = EventDefinition(\n 'wix.metroinspector.v1.echo_dispatched',\n true,\n (event: EchoDispatchedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<EchoDispatchedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EchoDispatchedEnvelope,\n EchoMessage,\n EchoOptions,\n EchoRequest,\n EchoResponse,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n MessageItem,\n RestoreInfo,\n WebhookIdentityType,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n 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 { echo as publicEcho } from './metroinspector-v1-echo-metroinspector.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onEchoDispatched as publicOnEchoDispatched } from './metroinspector-v1-echo-metroinspector.public.js';\n\nexport const echo: MaybeContext<\n BuildRESTFunction<typeof publicEcho> & typeof publicEcho\n> = /*#__PURE__*/ createRESTModule(publicEcho);\n/**\n * echo event that might be consumed when somone says something!\n */\nexport const onEchoDispatched: BuildEventDefinition<\n typeof publicOnEchoDispatched\n> &\n typeof publicOnEchoDispatched = createEventModule(publicOnEchoDispatched);\n\nexport { WebhookIdentityType } from './metroinspector-v1-echo-metroinspector.universal.js';\nexport {\n MessageItem,\n EchoRequest,\n EchoResponse,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n EchoMessage,\n BaseEventMetadata,\n EventMetadata,\n EchoDispatchedEnvelope,\n EchoOptions,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './metroinspector-v1-echo-metroinspector.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;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AAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI,GAAG;AAAA,EAC/D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ,SAAS;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AD1SO,SAASC,MAAK,YAAuC;AAC1D,SAAO,CAAC,MAAc,YACpBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,IAAM,uBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA0B;;;AG3C1B,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,QAEK,2DAAiBA,KAAU;AAItC,IAAMC,wBAGqB,mDAAkB,gBAAsB;","names":["echo","onEchoDispatched","import_rename_all_nested_keys","import_timestamp","import_transform_paths","WebhookIdentityType","echo","sdkTransformError","echo","import_rest_modules","echo","onEchoDispatched"]}
|
|
@@ -128,6 +128,9 @@ function echo(payload) {
|
|
|
128
128
|
method: "POST",
|
|
129
129
|
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
130
130
|
packageName: PACKAGE_NAME,
|
|
131
|
+
migrationOptions: {
|
|
132
|
+
optInTransformResponse: true
|
|
133
|
+
},
|
|
131
134
|
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
132
135
|
protoPath: "/api/v1/echo/{arg1}",
|
|
133
136
|
data: serializedData,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../index.typings.ts","../../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../../src/metroinspector-v1-echo-metroinspector.http.ts"],"sourcesContent":["export * from './src/metroinspector-v1-echo-metroinspector.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({\n protoPath: '/api/v1/echo/{arg1}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __echo;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,cAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,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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EACT;AAEA,SAAO;AACT;;;ADmDO,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;AA6FZ,eAAsBC,MACpB,MACA,SACiB;AAEjB,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,MAAM,SAAS;AAAA,IACf,YAAY,SAAS;AAAA,IACrB,WAAW,SAAS;AAAA,IACpB,UAAU,SAAS;AAAA,EACrB,CAAC;AAED,QAAM,UAA4C,KAAK,OAAO;AAE9D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI,GAAG;AAAA,EAC/D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ,SAAS;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["echo","WebhookIdentityType","echo","sdkTransformError"]}
|
|
1
|
+
{"version":3,"sources":["../../../index.typings.ts","../../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../../src/metroinspector-v1-echo-metroinspector.http.ts"],"sourcesContent":["export * from './src/metroinspector-v1-echo-metroinspector.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n 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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,cAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,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;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;AAA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AAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,MAAM,SAAS;AAAA,IACf,YAAY,SAAS;AAAA,IACrB,WAAW,SAAS;AAAA,IACpB,UAAU,SAAS;AAAA,EACrB,CAAC;AAED,QAAM,UAA4C,KAAK,OAAO;AAE9D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI,GAAG;AAAA,EAC/D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ,SAAS;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["echo","WebhookIdentityType","echo","sdkTransformError"]}
|
|
@@ -123,6 +123,9 @@ function echo(payload) {
|
|
|
123
123
|
method: "POST",
|
|
124
124
|
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
125
125
|
packageName: PACKAGE_NAME,
|
|
126
|
+
migrationOptions: {
|
|
127
|
+
optInTransformResponse: true
|
|
128
|
+
},
|
|
126
129
|
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
127
130
|
protoPath: "/api/v1/echo/{arg1}",
|
|
128
131
|
data: serializedData,
|
|
@@ -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 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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AAAA,MACZ;AAAA,IACF;AAAA,EACF;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,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;;;
|
|
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;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,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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"]}
|
|
@@ -110,6 +110,9 @@ function echo(payload) {
|
|
|
110
110
|
method: "POST",
|
|
111
111
|
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
112
112
|
packageName: PACKAGE_NAME,
|
|
113
|
+
migrationOptions: {
|
|
114
|
+
optInTransformResponse: true
|
|
115
|
+
},
|
|
113
116
|
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
114
117
|
protoPath: "/api/v1/echo/{arg1}",
|
|
115
118
|
data: serializedData,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/metroinspector-v1-echo-metroinspector.public.ts","../../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../../src/metroinspector-v1-echo-metroinspector.http.ts","../../../src/metroinspector-v1-echo-metroinspector.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient } from '@wix/sdk-types';\nimport {\n EchoDispatchedEnvelope,\n EchoOptions,\n echo as universalEcho,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/motion' };\n\nexport function echo(httpClient: HttpClient): EchoSignature {\n return (arg1: string, options?: EchoOptions) =>\n universalEcho(\n arg1,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface EchoSignature {\n /**\n * echo given arg1 and arg2\n * @param - 1st part of the message\n * @param - modified comment for arg2 el hovav\n * @returns messge reseult as string\n */\n (arg1: string, options?: EchoOptions): Promise<string>;\n}\n\nexport const onEchoDispatched = EventDefinition(\n 'wix.metroinspector.v1.echo_dispatched',\n true,\n (event: EchoDispatchedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<EchoDispatchedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EchoDispatchedEnvelope,\n EchoMessage,\n EchoOptions,\n EchoRequest,\n EchoResponse,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n MessageItem,\n RestoreInfo,\n WebhookIdentityType,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({\n protoPath: '/api/v1/echo/{arg1}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __echo;\n}\n","import { echo as publicEcho } from './metroinspector-v1-echo-metroinspector.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onEchoDispatched as publicOnEchoDispatched } from './metroinspector-v1-echo-metroinspector.public.js';\n\nexport const echo: MaybeContext<\n BuildRESTFunction<typeof publicEcho> & typeof publicEcho\n> = /*#__PURE__*/ createRESTModule(publicEcho);\n/**\n * echo event that might be consumed when somone says something!\n */\nexport const onEchoDispatched: BuildEventDefinition<\n typeof publicOnEchoDispatched\n> &\n typeof publicOnEchoDispatched = createEventModule(publicOnEchoDispatched);\n\nexport { WebhookIdentityType } from './metroinspector-v1-echo-metroinspector.universal.js';\nexport {\n MessageItem,\n EchoRequest,\n EchoResponse,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n EchoMessage,\n BaseEventMetadata,\n EventMetadata,\n EchoDispatchedEnvelope,\n EchoOptions,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './metroinspector-v1-echo-metroinspector.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,4CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAmC;;;ACH5C,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,sBAAsB;AAAA,MACpB;AAAA,Q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,QAAQ,SAAS;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AD1SO,SAASC,MAAK,YAAuC;AAC1D,SAAO,CAAC,MAAc,YACpBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,IAAM,mBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,CAAC,UACCC;AAAA,IACEC,gBAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA0B;;;AG3C1B,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAQ3B,IAAMC,QAEK,iCAAiBA,KAAU;AAItC,IAAMC,oBAGqB,kBAAkB,gBAAsB;","names":["renameKeysFromRESTResponseToSDKResponse","transformPaths","WebhookIdentityType","echo","echo","renameKeysFromRESTResponseToSDKResponse","transformPaths","echo","onEchoDispatched"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/metroinspector-v1-echo-metroinspector.public.ts","../../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../../src/metroinspector-v1-echo-metroinspector.http.ts","../../../src/metroinspector-v1-echo-metroinspector.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient } from '@wix/sdk-types';\nimport {\n EchoDispatchedEnvelope,\n EchoOptions,\n echo as universalEcho,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/motion' };\n\nexport function echo(httpClient: HttpClient): EchoSignature {\n return (arg1: string, options?: EchoOptions) =>\n universalEcho(\n arg1,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface EchoSignature {\n /**\n * echo given arg1 and arg2\n * @param - 1st part of the message\n * @param - modified comment for arg2 el hovav\n * @returns messge reseult as string\n */\n (arg1: string, options?: EchoOptions): Promise<string>;\n}\n\nexport const onEchoDispatched = EventDefinition(\n 'wix.metroinspector.v1.echo_dispatched',\n true,\n (event: EchoDispatchedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<EchoDispatchedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EchoDispatchedEnvelope,\n EchoMessage,\n EchoOptions,\n EchoRequest,\n EchoResponse,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n MessageItem,\n RestoreInfo,\n WebhookIdentityType,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n 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 { echo as publicEcho } from './metroinspector-v1-echo-metroinspector.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onEchoDispatched as publicOnEchoDispatched } from './metroinspector-v1-echo-metroinspector.public.js';\n\nexport const echo: MaybeContext<\n BuildRESTFunction<typeof publicEcho> & typeof publicEcho\n> = /*#__PURE__*/ createRESTModule(publicEcho);\n/**\n * echo event that might be consumed when somone says something!\n */\nexport const onEchoDispatched: BuildEventDefinition<\n typeof publicOnEchoDispatched\n> &\n typeof publicOnEchoDispatched = createEventModule(publicOnEchoDispatched);\n\nexport { WebhookIdentityType } from './metroinspector-v1-echo-metroinspector.universal.js';\nexport {\n MessageItem,\n EchoRequest,\n EchoResponse,\n Dispatched,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n EchoMessage,\n BaseEventMetadata,\n EventMetadata,\n EchoDispatchedEnvelope,\n EchoOptions,\n} from './metroinspector-v1-echo-metroinspector.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './metroinspector-v1-echo-metroinspector.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,4CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAmC;;;ACH5C,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,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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AAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,IAAM,mBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,CAAC,UACCC;AAAA,IACEC,gBAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA0B;;;AG3C1B,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAQ3B,IAAMC,QAEK,iCAAiBA,KAAU;AAItC,IAAMC,oBAGqB,kBAAkB,gBAAsB;","names":["renameKeysFromRESTResponseToSDKResponse","transformPaths","WebhookIdentityType","echo","echo","renameKeysFromRESTResponseToSDKResponse","transformPaths","echo","onEchoDispatched"]}
|
|
@@ -104,6 +104,9 @@ function echo(payload) {
|
|
|
104
104
|
method: "POST",
|
|
105
105
|
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
106
106
|
packageName: PACKAGE_NAME,
|
|
107
|
+
migrationOptions: {
|
|
108
|
+
optInTransformResponse: true
|
|
109
|
+
},
|
|
107
110
|
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
108
111
|
protoPath: "/api/v1/echo/{arg1}",
|
|
109
112
|
data: serializedData,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../../src/metroinspector-v1-echo-metroinspector.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({\n protoPath: '/api/v1/echo/{arg1}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __echo;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,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BAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI,GAAG;AAAA,EAC/D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ,SAAS;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["WebhookIdentityType","echo"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/metroinspector-v1-echo-metroinspector.universal.ts","../../../src/metroinspector-v1-echo-metroinspector.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\n\nexport interface MessageItem {\n /** inner_message comment from EchoMessage proto def */\n innerMessage?: string;\n}\n\nexport interface EchoRequest {\n /** 1st part of the message */\n arg1: string;\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n\nexport interface EchoResponse {\n /** message result as EchoMessage */\n echoMessage?: EchoMessage;\n /** messge reseult as string */\n message?: string;\n}\n\nexport interface Dispatched {\n /** the message someone says */\n echo?: EchoMessage;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface EchoMessage {\n veloMessage: string;\n id: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface EchoDispatchedEnvelope {\n data: Dispatched;\n metadata: EventMetadata;\n}\n\n/**\n * echo event that might be consumed when somone says something!\n * @webhook\n * @eventType wix.metroinspector.v1.echo_dispatched\n * @serviceIdentifier wix.coreservices.metroinspector.v1.MetroInspectorService\n * @slug dispatched\n */\nexport declare function onEchoDispatched(\n handler: (event: EchoDispatchedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * echo given arg1 and arg2\n * @param arg1 - 1st part of the message\n * @public\n * @requiredField arg1\n * @param arg2 - modified comment for arg2 el hovav\n * @returns messge reseult as string\n * @fqn wix.coreservices.metroinspector.v1.MetroInspectorService.Echo\n */\nexport async function echo(\n arg1: string,\n options?: EchoOptions\n): Promise<string> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arg1: arg1,\n arg2: options?.arg2,\n titleField: options?.titleField,\n someInt32: options?.someInt32,\n someDate: options?.someDate,\n });\n\n const reqOpts = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.message!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arg1: '$[0]',\n arg2: '$[1].arg2',\n titleField: '$[1].titleField',\n someInt32: '$[1].someInt32',\n someDate: '$[1].someDate',\n },\n singleArgumentUnchanged: false,\n },\n ['arg1', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EchoOptions {\n /** 2nd part of the message */\n arg2?: string;\n /** this field test translatable annotation */\n titleField?: string;\n someInt32?: number;\n someDate?: Date | null;\n}\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'apps._base_domain_': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n _: [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n {\n srcPath: '/metro-inspector',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/metro-insepctor',\n destPath: '',\n },\n {\n srcPath: '/_api/metro-inspector',\n destPath: '/api',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_motion_metroinspector';\n\n/** echo given arg1 and arg2 */\nexport function echo(payload: object): RequestOptionsFactory<any> {\n function __echo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'someDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.metroinspector.v1.echo',\n method: 'POST' as any,\n methodFqn:\n 'wix.coreservices.metroinspector.v1.MetroInspectorService.Echo',\n packageName: PACKAGE_NAME,\n 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"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,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,SAA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U,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["WebhookIdentityType","echo"]}
|
|
@@ -97,6 +97,9 @@ function echo(payload) {
|
|
|
97
97
|
method: "POST",
|
|
98
98
|
methodFqn: "wix.coreservices.metroinspector.v1.MetroInspectorService.Echo",
|
|
99
99
|
packageName: PACKAGE_NAME,
|
|
100
|
+
migrationOptions: {
|
|
101
|
+
optInTransformResponse: true
|
|
102
|
+
},
|
|
100
103
|
url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({
|
|
101
104
|
protoPath: "/api/v1/echo/{arg1}",
|
|
102
105
|
data: serializedData,
|
|
@@ -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 url: resolveWixCoreservicesMetroinspectorV1MetroInspectorServiceUrl({\n protoPath: '/api/v1/echo/{arg1}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __echo;\n}\n","import * as ambassadorWixMetroinspectorV1Echo from './metroinspector-v1-echo-metroinspector.http.js';\nimport * as ambassadorWixMetroinspectorV1EchoTypes from './metroinspector-v1-echo-metroinspector.types.js';\nimport * as ambassadorWixMetroinspectorV1EchoUniversalTypes from './metroinspector-v1-echo-metroinspector.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function echo(): __PublicMethodMetaInfo<\n 'POST',\n { arg1: string },\n ambassadorWixMetroinspectorV1EchoUniversalTypes.EchoRequest,\n ambassadorWixMetroinspectorV1EchoTypes.EchoRequest,\n ambassadorWixMetroinspectorV1EchoUniversalTypes.EchoResponse,\n ambassadorWixMetroinspectorV1EchoTypes.EchoResponse\n> {\n const payload = { arg1: ':arg1' } as any;\n\n const getRequestOptions = ambassadorWixMetroinspectorV1Echo.echo(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/api/v1/echo/{arg1}',\n pathParams: { arg1: 'arg1' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";AAAA,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,KAAK,SAA6C;AAChE,WAAS,OAAO,EAAE,KAAK,GAAQ;AAC7B,UAAM,iBAAiB,eAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,WAAW,CAAC;AAAA,MAC9B;AAAA,IACF,CAAC;AACD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK,+DAA+D;AAAA,QAClE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;
|
|
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,kBA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AEA,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;;;ACrGO,SAASA,QAOd;AACA,QAAM,UAAU,EAAE,MAAM,QAAQ;AAEhC,QAAM,oBAAsD,KAAK,OAAO;AAExE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,MAAM,OAAO;AAAA,IAC3B,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["echo"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_motion_metroinspector",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"fqdn": "wix.metroinspector.v1.echo"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"falconPackageHash": "
|
|
53
|
+
"falconPackageHash": "bd874b7c84cfc5d7efdd7d79c62093c71d2f26e33d990ec8bc410594"
|
|
54
54
|
}
|