@wix/auto_sdk_forms_interactive-form-sessions 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +2 -2
- package/build/cjs/index.js +0 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +16 -40
- package/build/cjs/index.typings.js +0 -4
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +14 -26
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +2 -2
- package/build/es/index.mjs +0 -4
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +16 -40
- package/build/es/index.typings.mjs +0 -4
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +14 -26
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/index.js +0 -4
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +16 -40
- package/build/internal/cjs/index.typings.js +0 -4
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +14 -26
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/index.mjs +0 -4
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +16 -40
- package/build/internal/es/index.typings.mjs +0 -4
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +14 -26
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/meta.d.ts
CHANGED
|
@@ -25,12 +25,6 @@ interface CreateInteractiveFormSessionRequest {
|
|
|
25
25
|
* @format GUID
|
|
26
26
|
*/
|
|
27
27
|
formId: string;
|
|
28
|
-
/**
|
|
29
|
-
* Custom prompt ID to use for the AI assistant's conversation style and behavior.
|
|
30
|
-
* When not provided, uses the form's default chat settings configured in the Chat Settings API.
|
|
31
|
-
* @format GUID
|
|
32
|
-
*/
|
|
33
|
-
promptId?: string | null;
|
|
34
28
|
/**
|
|
35
29
|
* Pre-filled values to apply to the form, to initialize the session with existing data.
|
|
36
30
|
* Field keys must match the form schema field names.
|
|
@@ -57,7 +51,7 @@ interface ClientTime {
|
|
|
57
51
|
*/
|
|
58
52
|
currentTime?: string | null;
|
|
59
53
|
/**
|
|
60
|
-
*
|
|
54
|
+
* Browser's timezone identifier for localizing date and time values in IANA timezone format (for example, `Europe/Vilnius`, `America/New_York`).
|
|
61
55
|
* @minLength 1
|
|
62
56
|
* @maxLength 50
|
|
63
57
|
*/
|
|
@@ -71,11 +65,11 @@ interface CreateInteractiveFormSessionResponse {
|
|
|
71
65
|
}
|
|
72
66
|
/**
|
|
73
67
|
* AI assistant response chunk, containing different types of conversational content.
|
|
74
|
-
* Chunks are delivered sequentially and must be processed in order to build the complete
|
|
68
|
+
* Chunks are delivered sequentially and must be processed in the order they are received to build the complete
|
|
75
69
|
* conversation interface. Each chunk type requires different UI handling.
|
|
76
70
|
*/
|
|
77
71
|
interface InteractiveFormSessionResponseChunk extends InteractiveFormSessionResponseChunkOfOneOf {
|
|
78
|
-
/** Conversational text message for display
|
|
72
|
+
/** Conversational text message for display. */
|
|
79
73
|
textDetails?: TextDetails;
|
|
80
74
|
/** Structured data extracted from user input and mapped to specific form fields. */
|
|
81
75
|
textDataDetails?: TextDataDetails;
|
|
@@ -89,7 +83,7 @@ interface InteractiveFormSessionResponseChunk extends InteractiveFormSessionResp
|
|
|
89
83
|
singleSelectInputDetails?: SingleSelectInputDetails;
|
|
90
84
|
/** Error information when processing fails or validation errors occur. */
|
|
91
85
|
errorDetails?: ErrorDetails;
|
|
92
|
-
/** Form submission confirmation
|
|
86
|
+
/** Form submission confirmation including a form submission ID. A checkout ID will also be returned here if the user selected products for purchase. */
|
|
93
87
|
submissionDetails?: SubmissionDetails;
|
|
94
88
|
/** Important contextual information that may influence data extraction or user decisions. */
|
|
95
89
|
importantTextDetails?: ImportantTextDetails;
|
|
@@ -111,7 +105,7 @@ interface InteractiveFormSessionResponseChunk extends InteractiveFormSessionResp
|
|
|
111
105
|
}
|
|
112
106
|
/** @oneof */
|
|
113
107
|
interface InteractiveFormSessionResponseChunkOfOneOf {
|
|
114
|
-
/** Conversational text message for display
|
|
108
|
+
/** Conversational text message for display. */
|
|
115
109
|
textDetails?: TextDetails;
|
|
116
110
|
/** Structured data extracted from user input and mapped to specific form fields. */
|
|
117
111
|
textDataDetails?: TextDataDetails;
|
|
@@ -125,7 +119,7 @@ interface InteractiveFormSessionResponseChunkOfOneOf {
|
|
|
125
119
|
singleSelectInputDetails?: SingleSelectInputDetails;
|
|
126
120
|
/** Error information when processing fails or validation errors occur. */
|
|
127
121
|
errorDetails?: ErrorDetails;
|
|
128
|
-
/** Form submission confirmation
|
|
122
|
+
/** Form submission confirmation including a form submission ID. A checkout ID will also be returned here if the user selected products for purchase. */
|
|
129
123
|
submissionDetails?: SubmissionDetails;
|
|
130
124
|
/** Important contextual information that may influence data extraction or user decisions. */
|
|
131
125
|
importantTextDetails?: ImportantTextDetails;
|
|
@@ -155,7 +149,7 @@ declare enum ChunkType {
|
|
|
155
149
|
SINGLE_SELECT_INPUT = "SINGLE_SELECT_INPUT",
|
|
156
150
|
/** Error message when processing fails or validation errors occur. */
|
|
157
151
|
ERROR = "ERROR",
|
|
158
|
-
/** Form submission confirmation
|
|
152
|
+
/** Form submission confirmation including a submission ID. */
|
|
159
153
|
SUBMISSION = "SUBMISSION",
|
|
160
154
|
/** Highlighted information that may influence form data extraction. */
|
|
161
155
|
IMPORTANT_TEXT = "IMPORTANT_TEXT",
|
|
@@ -173,7 +167,7 @@ type ChunkTypeWithLiterals = ChunkType | 'UNKNOWN_CHUNK_TYPE' | 'TEXT' | 'TEXT_D
|
|
|
173
167
|
/** Conversational text content from the AI assistant. */
|
|
174
168
|
interface TextDetails {
|
|
175
169
|
/**
|
|
176
|
-
* Text content to display
|
|
170
|
+
* Text content to display.
|
|
177
171
|
* @minLength 1
|
|
178
172
|
* @maxLength 10000
|
|
179
173
|
*/
|
|
@@ -201,7 +195,7 @@ interface TextDataDetails {
|
|
|
201
195
|
*/
|
|
202
196
|
fieldTarget?: string;
|
|
203
197
|
/**
|
|
204
|
-
* Human-readable text representation of the extracted data to display
|
|
198
|
+
* Human-readable text representation of the extracted data to display.
|
|
205
199
|
* @minLength 1
|
|
206
200
|
* @maxLength 10000
|
|
207
201
|
*/
|
|
@@ -246,7 +240,7 @@ interface Option {
|
|
|
246
240
|
*/
|
|
247
241
|
value?: string;
|
|
248
242
|
/**
|
|
249
|
-
* Human-readable label
|
|
243
|
+
* Human-readable label for display for this option.
|
|
250
244
|
* @minLength 1
|
|
251
245
|
* @maxLength 10000
|
|
252
246
|
*/
|
|
@@ -333,7 +327,7 @@ interface ErrorDetails {
|
|
|
333
327
|
*/
|
|
334
328
|
messageText?: string;
|
|
335
329
|
}
|
|
336
|
-
/** Form submission confirmation containing submission
|
|
330
|
+
/** Form submission confirmation containing submission information. */
|
|
337
331
|
interface SubmissionDetails {
|
|
338
332
|
/**
|
|
339
333
|
* Form submission ID created when the form is successfully completed and submitted.
|
|
@@ -357,7 +351,7 @@ interface ImportantTextDetails {
|
|
|
357
351
|
*/
|
|
358
352
|
fieldTarget?: string;
|
|
359
353
|
/**
|
|
360
|
-
* Important contextual information to highlight
|
|
354
|
+
* Important contextual information to highlight.
|
|
361
355
|
* This might include validation requirements, format expectations, or clarifying questions.
|
|
362
356
|
* @minLength 1
|
|
363
357
|
* @maxLength 10000
|
|
@@ -418,12 +412,6 @@ interface CreateInteractiveFormSessionStreamedRequest {
|
|
|
418
412
|
* @format GUID
|
|
419
413
|
*/
|
|
420
414
|
formId: string;
|
|
421
|
-
/**
|
|
422
|
-
* Custom prompt ID to use for the AI assistant's conversation style and behavior.
|
|
423
|
-
* When not provided, uses the form's default chat settings configured in the Chat Settings API.
|
|
424
|
-
* @format GUID
|
|
425
|
-
*/
|
|
426
|
-
promptId?: string | null;
|
|
427
415
|
/**
|
|
428
416
|
* Pre-filled values to apply to the form, to initialize the session with existing data.
|
|
429
417
|
* Field keys must match the form schema field names.
|
|
@@ -481,7 +469,7 @@ interface SendUserMessageResponse {
|
|
|
481
469
|
interactiveFormSession?: InteractiveFormSession;
|
|
482
470
|
/**
|
|
483
471
|
* AI assistant response chunks generated from processing the user's message.
|
|
484
|
-
* These can include extracted data, follow-up questions, input
|
|
472
|
+
* These can include extracted data, follow-up questions, input selectors, or submission confirmation.
|
|
485
473
|
*/
|
|
486
474
|
responseChunks?: InteractiveFormSessionResponseChunk[];
|
|
487
475
|
}
|
|
@@ -510,7 +498,7 @@ interface SendUserMessageStreamedResponse {
|
|
|
510
498
|
responseChunk?: InteractiveFormSessionResponseChunk;
|
|
511
499
|
/**
|
|
512
500
|
* Updated interactive form session information.
|
|
513
|
-
*
|
|
501
|
+
* Session data, including session ID and form ID. Returned in the first chunk of the streamed response.
|
|
514
502
|
*/
|
|
515
503
|
interactiveFormSession?: InteractiveFormSession;
|
|
516
504
|
}
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.http.ts","../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.meta.ts"],"sourcesContent":["export * from './src/forms-ai-v1-interactive-form-session-interactive-form-sessions.meta.js';\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\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 resolveWixFormsAiV1InteractiveFormSessionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n '*.wixforms.com': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/forms/ai/v1/chat-settings',\n destPath: '/v1/chat-settings',\n },\n {\n srcPath: '/forms/ai/v1/interactive-form-sessions',\n destPath: '/v1/interactive-form-sessions',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_forms_interactive-form-sessions';\n\n/**\n * Creates an interactive form session for AI-powered conversational form completion.\n *\n * For implementations that require real-time streaming, call [Create Interactive Form Session Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session-streamed) instead.\n */\nexport function createInteractiveFormSession(\n payload: object\n): RequestOptionsFactory<any> {\n function __createInteractiveFormSession({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.CreateInteractiveFormSession',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath: '/v1/interactive-form-sessions',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'responseChunks.numberInputDetails.multipleOf' },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.maxInclusiveValue',\n },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.maxExclusiveValue',\n },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.minInclusiveValue',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createInteractiveFormSession;\n}\n\n/**\n * Creates an interactive form session for AI-powered conversational form completion, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Create Interactive Form Session](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session) instead.\n */\nexport function createInteractiveFormSessionStreamed(\n payload: object\n): RequestOptionsFactory<any> {\n function __createInteractiveFormSessionStreamed({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.CreateInteractiveFormSessionStreamed',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath: '/v1/interactive-form-sessions/create-streamed',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'responseChunk.numberInputDetails.multipleOf' },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.maxInclusiveValue',\n },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.maxExclusiveValue',\n },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.minInclusiveValue',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createInteractiveFormSessionStreamed;\n}\n\n/**\n * Sends a user message to an existing interactive form session and processes the conversational input.\n * User messages support up to 10,000 characters.\n *\n * For implementations that require real-time streaming, call [Send User Message Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message-streamed) instead.\n */\nexport function sendUserMessage(payload: object): RequestOptionsFactory<any> {\n function __sendUserMessage({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.SendUserMessage',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath:\n '/v1/interactive-form-sessions/{interactiveFormSessionId}/send-user-message',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'responseChunks.numberInputDetails.multipleOf' },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.maxInclusiveValue',\n },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.maxExclusiveValue',\n },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.minInclusiveValue',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __sendUserMessage;\n}\n\n/**\n * Sends a user message to an existing interactive form session and processes the conversational input, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Send User Message](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message) instead.\n */\nexport function sendUserMessageStreamed(\n payload: object\n): RequestOptionsFactory<any> {\n function __sendUserMessageStreamed({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.SendUserMessageStreamed',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath:\n '/v1/interactive-form-sessions/{interactiveFormSessionId}/send-user-message-streamed',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'responseChunk.numberInputDetails.multipleOf' },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.maxInclusiveValue',\n },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.maxExclusiveValue',\n },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.minInclusiveValue',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __sendUserMessageStreamed;\n}\n","import * as ambassadorWixFormsAiV1InteractiveFormSession from './forms-ai-v1-interactive-form-session-interactive-form-sessions.http.js';\nimport * as ambassadorWixFormsAiV1InteractiveFormSessionTypes from './forms-ai-v1-interactive-form-session-interactive-form-sessions.types.js';\nimport * as ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes from './forms-ai-v1-interactive-form-session-interactive-form-sessions.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 createInteractiveFormSession(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.CreateInteractiveFormSessionRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.CreateInteractiveFormSessionRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.CreateInteractiveFormSessionResponse,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.CreateInteractiveFormSessionResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixFormsAiV1InteractiveFormSession.createInteractiveFormSession(\n payload\n );\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: '/v1/interactive-form-sessions',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createInteractiveFormSessionStreamed(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.CreateInteractiveFormSessionStreamedRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.CreateInteractiveFormSessionStreamedRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.CreateInteractiveFormSessionStreamedResponse,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.CreateInteractiveFormSessionStreamedResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixFormsAiV1InteractiveFormSession.createInteractiveFormSessionStreamed(\n payload\n );\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: '/v1/interactive-form-sessions/create-streamed',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function sendUserMessage(): __PublicMethodMetaInfo<\n 'POST',\n { interactiveFormSessionId: string },\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.SendUserMessageRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.SendUserMessageRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.SendUserMessageResponse,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.SendUserMessageResponse\n> {\n const payload = {\n interactiveFormSessionId: ':interactiveFormSessionId',\n } as any;\n\n const getRequestOptions =\n ambassadorWixFormsAiV1InteractiveFormSession.sendUserMessage(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: '/v1/interactive-form-sessions/{interactiveFormSessionId}/send-user-message',\n pathParams: { interactiveFormSessionId: 'interactiveFormSessionId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function sendUserMessageStreamed(): __PublicMethodMetaInfo<\n 'POST',\n { interactiveFormSessionId: string },\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.SendUserMessageStreamedRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.SendUserMessageStreamedRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.SendUserMessageStreamedResponse,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.SendUserMessageStreamedResponse\n> {\n const payload = {\n interactiveFormSessionId: ':interactiveFormSessionId',\n } as any;\n\n const getRequestOptions =\n ambassadorWixFormsAiV1InteractiveFormSession.sendUserMessageStreamed(\n payload\n );\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: '/v1/interactive-form-sessions/{interactiveFormSessionId}/send-user-message-streamed',\n pathParams: { interactiveFormSessionId: 'interactiveFormSessionId' },\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,sCAAAA;AAAA,EAAA,4CAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,+BAAAC;AAAA;AAAA;;;ACAA,mBAA6C;AAC7C,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;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,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AA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E,0BAA0B,2BAA2B;AAAA,IACnE,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,2BAOd;AACA,QAAM,UAAU;AAAA,IACd,0BAA0B;AAAA,EAC5B;AAEA,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,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,0BAA0B,2BAA2B;AAAA,IACnE,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed","payload","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.http.ts","../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.meta.ts"],"sourcesContent":["export * from './src/forms-ai-v1-interactive-form-session-interactive-form-sessions.meta.js';\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\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 resolveWixFormsAiV1InteractiveFormSessionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n '*.wixforms.com': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/forms/ai/v1/chat-settings',\n destPath: '/v1/chat-settings',\n },\n {\n srcPath: '/forms/ai/v1/interactive-form-sessions',\n destPath: '/v1/interactive-form-sessions',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_forms_interactive-form-sessions';\n\n/**\n * Creates an interactive form session for AI-powered conversational form completion.\n *\n * For implementations that require real-time streaming, call [Create Interactive Form Session Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session-streamed) instead.\n */\nexport function createInteractiveFormSession(\n payload: object\n): RequestOptionsFactory<any> {\n function __createInteractiveFormSession({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.CreateInteractiveFormSession',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath: '/v1/interactive-form-sessions',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'responseChunks.numberInputDetails.multipleOf' },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.maxInclusiveValue',\n },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.maxExclusiveValue',\n },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.minInclusiveValue',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createInteractiveFormSession;\n}\n\n/**\n * Creates an interactive form session for AI-powered conversational form completion, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Create Interactive Form Session](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session) instead.\n */\nexport function createInteractiveFormSessionStreamed(\n payload: object\n): RequestOptionsFactory<any> {\n function __createInteractiveFormSessionStreamed({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.CreateInteractiveFormSessionStreamed',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath: '/v1/interactive-form-sessions/create-streamed',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'responseChunk.numberInputDetails.multipleOf' },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.maxInclusiveValue',\n },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.maxExclusiveValue',\n },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.minInclusiveValue',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createInteractiveFormSessionStreamed;\n}\n\n/**\n * Submits a user message to an existing interactive form session and processes the conversational input.\n * User messages support up to 10,000 characters.\n *\n * For implementations that require real-time streaming, call [Send User Message Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message-streamed) instead.\n */\nexport function sendUserMessage(payload: object): RequestOptionsFactory<any> {\n function __sendUserMessage({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.SendUserMessage',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath:\n '/v1/interactive-form-sessions/{interactiveFormSessionId}/send-user-message',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'responseChunks.numberInputDetails.multipleOf' },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.maxInclusiveValue',\n },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.maxExclusiveValue',\n },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.minInclusiveValue',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __sendUserMessage;\n}\n\n/**\n * Submits a user message to an existing interactive form session and processes the conversational input, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Send User Message](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message) instead.\n */\nexport function sendUserMessageStreamed(\n payload: object\n): RequestOptionsFactory<any> {\n function __sendUserMessageStreamed({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.SendUserMessageStreamed',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath:\n '/v1/interactive-form-sessions/{interactiveFormSessionId}/send-user-message-streamed',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'responseChunk.numberInputDetails.multipleOf' },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.maxInclusiveValue',\n },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.maxExclusiveValue',\n },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.minInclusiveValue',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __sendUserMessageStreamed;\n}\n","import * as ambassadorWixFormsAiV1InteractiveFormSession from './forms-ai-v1-interactive-form-session-interactive-form-sessions.http.js';\nimport * as ambassadorWixFormsAiV1InteractiveFormSessionTypes from './forms-ai-v1-interactive-form-session-interactive-form-sessions.types.js';\nimport * as ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes from './forms-ai-v1-interactive-form-session-interactive-form-sessions.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 createInteractiveFormSession(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.CreateInteractiveFormSessionRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.CreateInteractiveFormSessionRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.CreateInteractiveFormSessionResponse,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.CreateInteractiveFormSessionResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixFormsAiV1InteractiveFormSession.createInteractiveFormSession(\n payload\n );\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: '/v1/interactive-form-sessions',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createInteractiveFormSessionStreamed(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.CreateInteractiveFormSessionStreamedRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.CreateInteractiveFormSessionStreamedRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.CreateInteractiveFormSessionStreamedResponse,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.CreateInteractiveFormSessionStreamedResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixFormsAiV1InteractiveFormSession.createInteractiveFormSessionStreamed(\n payload\n );\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: '/v1/interactive-form-sessions/create-streamed',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function sendUserMessage(): __PublicMethodMetaInfo<\n 'POST',\n { interactiveFormSessionId: string },\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.SendUserMessageRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.SendUserMessageRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.SendUserMessageResponse,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.SendUserMessageResponse\n> {\n const payload = {\n interactiveFormSessionId: ':interactiveFormSessionId',\n } as any;\n\n const getRequestOptions =\n ambassadorWixFormsAiV1InteractiveFormSession.sendUserMessage(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: '/v1/interactive-form-sessions/{interactiveFormSessionId}/send-user-message',\n pathParams: { interactiveFormSessionId: 'interactiveFormSessionId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function sendUserMessageStreamed(): __PublicMethodMetaInfo<\n 'POST',\n { interactiveFormSessionId: string },\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.SendUserMessageStreamedRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.SendUserMessageStreamedRequest,\n ambassadorWixFormsAiV1InteractiveFormSessionUniversalTypes.SendUserMessageStreamedResponse,\n ambassadorWixFormsAiV1InteractiveFormSessionTypes.SendUserMessageStreamedResponse\n> {\n const payload = {\n interactiveFormSessionId: ':interactiveFormSessionId',\n } as any;\n\n const getRequestOptions =\n ambassadorWixFormsAiV1InteractiveFormSession.sendUserMessageStreamed(\n payload\n );\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: '/v1/interactive-form-sessions/{interactiveFormSessionId}/send-user-message-streamed',\n pathParams: { interactiveFormSessionId: 'interactiveFormSessionId' },\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,sCAAAA;AAAA,EAAA,4CAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,+BAAAC;AAAA;AAAA;;;ACAA,mBAA6C;AAC7C,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;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,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT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B,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,2BAOd;AACA,QAAM,UAAU;AAAA,IACd,0BAA0B;AAAA,EAC5B;AAEA,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,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,0BAA0B,2BAA2B;AAAA,IACnE,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed","payload","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed"]}
|
package/build/es/index.d.mts
CHANGED
|
@@ -26,7 +26,7 @@ interface CreateInteractiveFormSessionStreamedSignature {
|
|
|
26
26
|
declare function sendUserMessage$1(httpClient: HttpClient): SendUserMessageSignature;
|
|
27
27
|
interface SendUserMessageSignature {
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Submits a user message to an existing interactive form session and processes the conversational input.
|
|
30
30
|
* User messages support up to 10,000 characters.
|
|
31
31
|
*
|
|
32
32
|
* For implementations that require real-time streaming, call [Send User Message Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message-streamed) instead.
|
|
@@ -39,7 +39,7 @@ interface SendUserMessageSignature {
|
|
|
39
39
|
declare function sendUserMessageStreamed$1(httpClient: HttpClient): SendUserMessageStreamedSignature;
|
|
40
40
|
interface SendUserMessageStreamedSignature {
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Submits a user message to an existing interactive form session and processes the conversational input, with real-time streaming.
|
|
43
43
|
*
|
|
44
44
|
* For implementations that prefer to wait for the complete response, call [Send User Message](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message) instead.
|
|
45
45
|
* @param - Interactive form session ID to send the message to.
|
package/build/es/index.mjs
CHANGED
|
@@ -258,7 +258,6 @@ async function createInteractiveFormSession2(formId, options) {
|
|
|
258
258
|
const { httpClient, sideEffects } = arguments[2];
|
|
259
259
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
260
260
|
formId,
|
|
261
|
-
promptId: options?.promptId,
|
|
262
261
|
currentValues: options?.currentValues,
|
|
263
262
|
dryRun: options?.dryRun,
|
|
264
263
|
clientTime: options?.clientTime
|
|
@@ -278,7 +277,6 @@ async function createInteractiveFormSession2(formId, options) {
|
|
|
278
277
|
spreadPathsToArguments: {},
|
|
279
278
|
explicitPathsToArguments: {
|
|
280
279
|
formId: "$[0]",
|
|
281
|
-
promptId: "$[1].promptId",
|
|
282
280
|
currentValues: "$[1].currentValues",
|
|
283
281
|
dryRun: "$[1].dryRun",
|
|
284
282
|
clientTime: "$[1].clientTime"
|
|
@@ -295,7 +293,6 @@ async function createInteractiveFormSessionStreamed2(formId, options) {
|
|
|
295
293
|
const { httpClient, sideEffects } = arguments[2];
|
|
296
294
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
297
295
|
formId,
|
|
298
|
-
promptId: options?.promptId,
|
|
299
296
|
currentValues: options?.currentValues,
|
|
300
297
|
dryRun: options?.dryRun,
|
|
301
298
|
clientTime: options?.clientTime
|
|
@@ -315,7 +312,6 @@ async function createInteractiveFormSessionStreamed2(formId, options) {
|
|
|
315
312
|
spreadPathsToArguments: {},
|
|
316
313
|
explicitPathsToArguments: {
|
|
317
314
|
formId: "$[0]",
|
|
318
|
-
promptId: "$[1].promptId",
|
|
319
315
|
currentValues: "$[1].currentValues",
|
|
320
316
|
dryRun: "$[1].dryRun",
|
|
321
317
|
clientTime: "$[1].clientTime"
|