@wix/auto_sdk_forms_chat-settings 1.0.26 → 1.0.28

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.
Files changed (42) hide show
  1. package/build/cjs/index.d.ts +3 -3
  2. package/build/cjs/index.js +8 -10
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +5 -25
  5. package/build/cjs/index.typings.js +1 -3
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/es/index.d.mts +3 -3
  8. package/build/es/index.mjs +8 -10
  9. package/build/es/index.mjs.map +1 -1
  10. package/build/es/index.typings.d.mts +5 -25
  11. package/build/es/index.typings.mjs +1 -3
  12. package/build/es/index.typings.mjs.map +1 -1
  13. package/build/internal/cjs/index.d.ts +3 -3
  14. package/build/internal/cjs/index.typings.d.ts +5 -25
  15. package/build/internal/es/index.d.mts +3 -3
  16. package/build/internal/es/index.typings.d.mts +5 -25
  17. package/package.json +5 -12
  18. package/build/cjs/schemas.d.ts +0 -159
  19. package/build/cjs/schemas.js +0 -320
  20. package/build/cjs/schemas.js.map +0 -1
  21. package/build/es/schemas.d.mts +0 -159
  22. package/build/es/schemas.mjs +0 -274
  23. package/build/es/schemas.mjs.map +0 -1
  24. package/build/internal/cjs/index.js +0 -653
  25. package/build/internal/cjs/index.js.map +0 -1
  26. package/build/internal/cjs/index.typings.js +0 -519
  27. package/build/internal/cjs/index.typings.js.map +0 -1
  28. package/build/internal/cjs/meta.js +0 -428
  29. package/build/internal/cjs/meta.js.map +0 -1
  30. package/build/internal/cjs/schemas.d.ts +0 -159
  31. package/build/internal/cjs/schemas.js +0 -320
  32. package/build/internal/cjs/schemas.js.map +0 -1
  33. package/build/internal/es/index.mjs +0 -618
  34. package/build/internal/es/index.mjs.map +0 -1
  35. package/build/internal/es/index.typings.mjs +0 -486
  36. package/build/internal/es/index.typings.mjs.map +0 -1
  37. package/build/internal/es/meta.mjs +0 -394
  38. package/build/internal/es/meta.mjs.map +0 -1
  39. package/build/internal/es/schemas.d.mts +0 -159
  40. package/build/internal/es/schemas.mjs +0 -274
  41. package/build/internal/es/schemas.mjs.map +0 -1
  42. package/schemas/package.json +0 -3
@@ -1,653 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- Personality: () => Personality,
24
- SortOrder: () => SortOrder,
25
- WebhookIdentityType: () => WebhookIdentityType,
26
- createChatSettings: () => createChatSettings4,
27
- deleteChatSettings: () => deleteChatSettings4,
28
- getChatSettings: () => getChatSettings4,
29
- onChatSettingsCreated: () => onChatSettingsCreated2,
30
- onChatSettingsDeleted: () => onChatSettingsDeleted2,
31
- onChatSettingsUpdated: () => onChatSettingsUpdated2,
32
- queryChatSettings: () => queryChatSettings4,
33
- updateChatSettings: () => updateChatSettings4,
34
- utils: () => utils
35
- });
36
- module.exports = __toCommonJS(index_exports);
37
-
38
- // src/forms-ai-v1-chat-settings-chat-settings.public.ts
39
- var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
40
- var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
41
- var import_transform_paths3 = require("@wix/sdk-runtime/transformations/transform-paths");
42
- var import_sdk_types = require("@wix/sdk-types");
43
-
44
- // src/forms-ai-v1-chat-settings-chat-settings.universal.ts
45
- var import_transform_error = require("@wix/sdk-runtime/transform-error");
46
- var import_query_builder = require("@wix/sdk-runtime/query-builder");
47
- var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
48
-
49
- // src/forms-ai-v1-chat-settings-chat-settings.http.ts
50
- var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
51
- var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
52
- var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
53
- var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
54
- var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
55
- var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
56
- function resolveWixFormsAiV1ChatSettingsServiceUrl(opts) {
57
- const domainToMappings = {
58
- "bo._base_domain_": [
59
- {
60
- srcPath: "/_api/form-ai-assistant",
61
- destPath: ""
62
- }
63
- ],
64
- "wixbo.ai": [
65
- {
66
- srcPath: "/_api/form-ai-assistant",
67
- destPath: ""
68
- }
69
- ],
70
- "wix-bo.com": [
71
- {
72
- srcPath: "/_api/form-ai-assistant",
73
- destPath: ""
74
- }
75
- ],
76
- "*.wixforms.com": [
77
- {
78
- srcPath: "/_api/form-ai-assistant",
79
- destPath: ""
80
- }
81
- ],
82
- "manage._base_domain_": [
83
- {
84
- srcPath: "/_api/form-ai-assistant",
85
- destPath: ""
86
- }
87
- ],
88
- _: [
89
- {
90
- srcPath: "/_api/form-ai-assistant",
91
- destPath: ""
92
- }
93
- ],
94
- "www.wixapis.com": [
95
- {
96
- srcPath: "/forms/ai/v1/chat-settings",
97
- destPath: "/v1/chat-settings"
98
- },
99
- {
100
- srcPath: "/forms/ai/v1/interactive-form-sessions",
101
- destPath: "/v1/interactive-form-sessions"
102
- }
103
- ],
104
- "*.dev.wix-code.com": [
105
- {
106
- srcPath: "/_api/form-ai-assistant",
107
- destPath: ""
108
- }
109
- ],
110
- "editor._base_domain_": [
111
- {
112
- srcPath: "/_api/form-ai-assistant",
113
- destPath: ""
114
- }
115
- ],
116
- "blocks._base_domain_": [
117
- {
118
- srcPath: "/_api/form-ai-assistant",
119
- destPath: ""
120
- }
121
- ],
122
- "create.editorx": [
123
- {
124
- srcPath: "/_api/form-ai-assistant",
125
- destPath: ""
126
- }
127
- ],
128
- "apps.wixel.com": [
129
- {
130
- srcPath: "/_api/form-ai-assistant",
131
- destPath: ""
132
- }
133
- ],
134
- "*.wixel.com": [
135
- {
136
- srcPath: "/_api/form-ai-assistant",
137
- destPath: ""
138
- }
139
- ]
140
- };
141
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
142
- }
143
- var PACKAGE_NAME = "@wix/auto_sdk_forms_chat-settings";
144
- function createChatSettings(payload) {
145
- function __createChatSettings({ host }) {
146
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
147
- {
148
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
149
- paths: [
150
- { path: "chatSettings.createdDate" },
151
- { path: "chatSettings.updatedDate" }
152
- ]
153
- }
154
- ]);
155
- const metadata = {
156
- entityFqdn: "wix.forms.ai.v1.chat_settings",
157
- method: "POST",
158
- methodFqn: "wix.forms.ai.v1.ChatSettingsService.CreateChatSettings",
159
- packageName: PACKAGE_NAME,
160
- migrationOptions: {
161
- optInTransformResponse: true
162
- },
163
- url: resolveWixFormsAiV1ChatSettingsServiceUrl({
164
- protoPath: "/v1/chat-settings",
165
- data: serializedData,
166
- host
167
- }),
168
- data: serializedData,
169
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
170
- {
171
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
172
- paths: [
173
- { path: "chatSettings.createdDate" },
174
- { path: "chatSettings.updatedDate" }
175
- ]
176
- }
177
- ])
178
- };
179
- return metadata;
180
- }
181
- return __createChatSettings;
182
- }
183
- function updateChatSettings(payload) {
184
- function __updateChatSettings({ host }) {
185
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
186
- {
187
- transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
188
- paths: [{ path: "fieldMask" }]
189
- },
190
- {
191
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
192
- paths: [
193
- { path: "chatSettings.createdDate" },
194
- { path: "chatSettings.updatedDate" }
195
- ]
196
- }
197
- ]);
198
- const metadata = {
199
- entityFqdn: "wix.forms.ai.v1.chat_settings",
200
- method: "PATCH",
201
- methodFqn: "wix.forms.ai.v1.ChatSettingsService.UpdateChatSettings",
202
- packageName: PACKAGE_NAME,
203
- migrationOptions: {
204
- optInTransformResponse: true
205
- },
206
- url: resolveWixFormsAiV1ChatSettingsServiceUrl({
207
- protoPath: "/v1/chat-settings/{chatSettings.id}",
208
- data: serializedData,
209
- host
210
- }),
211
- data: serializedData,
212
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
213
- {
214
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
215
- paths: [
216
- { path: "chatSettings.createdDate" },
217
- { path: "chatSettings.updatedDate" }
218
- ]
219
- }
220
- ])
221
- };
222
- return metadata;
223
- }
224
- return __updateChatSettings;
225
- }
226
- function deleteChatSettings(payload) {
227
- function __deleteChatSettings({ host }) {
228
- const metadata = {
229
- entityFqdn: "wix.forms.ai.v1.chat_settings",
230
- method: "DELETE",
231
- methodFqn: "wix.forms.ai.v1.ChatSettingsService.DeleteChatSettings",
232
- packageName: PACKAGE_NAME,
233
- migrationOptions: {
234
- optInTransformResponse: true
235
- },
236
- url: resolveWixFormsAiV1ChatSettingsServiceUrl({
237
- protoPath: "/v1/chat-settings/{chatSettingsId}",
238
- data: payload,
239
- host
240
- }),
241
- params: (0, import_rest_modules.toURLSearchParams)(payload)
242
- };
243
- return metadata;
244
- }
245
- return __deleteChatSettings;
246
- }
247
- function getChatSettings(payload) {
248
- function __getChatSettings({ host }) {
249
- const metadata = {
250
- entityFqdn: "wix.forms.ai.v1.chat_settings",
251
- method: "GET",
252
- methodFqn: "wix.forms.ai.v1.ChatSettingsService.GetChatSettings",
253
- packageName: PACKAGE_NAME,
254
- migrationOptions: {
255
- optInTransformResponse: true
256
- },
257
- url: resolveWixFormsAiV1ChatSettingsServiceUrl({
258
- protoPath: "/v1/chat-settings/{chatSettingsId}",
259
- data: payload,
260
- host
261
- }),
262
- params: (0, import_rest_modules.toURLSearchParams)(payload),
263
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
264
- {
265
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
266
- paths: [
267
- { path: "chatSettings.createdDate" },
268
- { path: "chatSettings.updatedDate" }
269
- ]
270
- }
271
- ])
272
- };
273
- return metadata;
274
- }
275
- return __getChatSettings;
276
- }
277
- function queryChatSettings(payload) {
278
- function __queryChatSettings({ host }) {
279
- const metadata = {
280
- entityFqdn: "wix.forms.ai.v1.chat_settings",
281
- method: "GET",
282
- methodFqn: "wix.forms.ai.v1.ChatSettingsService.QueryChatSettings",
283
- packageName: PACKAGE_NAME,
284
- migrationOptions: {
285
- optInTransformResponse: true
286
- },
287
- url: resolveWixFormsAiV1ChatSettingsServiceUrl({
288
- protoPath: "/v1/chat-settings/query",
289
- data: payload,
290
- host
291
- }),
292
- params: (0, import_rest_modules.toURLSearchParams)(payload, true),
293
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
294
- {
295
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
296
- paths: [
297
- { path: "chatSettings.createdDate" },
298
- { path: "chatSettings.updatedDate" }
299
- ]
300
- }
301
- ]),
302
- fallback: [
303
- {
304
- method: "POST",
305
- url: resolveWixFormsAiV1ChatSettingsServiceUrl({
306
- protoPath: "/v1/chat-settings/query",
307
- data: payload,
308
- host
309
- }),
310
- data: payload
311
- }
312
- ]
313
- };
314
- return metadata;
315
- }
316
- return __queryChatSettings;
317
- }
318
-
319
- // src/forms-ai-v1-chat-settings-chat-settings.universal.ts
320
- var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
321
- var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
322
- var Personality = /* @__PURE__ */ ((Personality2) => {
323
- Personality2["PROFESSIONAL"] = "PROFESSIONAL";
324
- Personality2["FRIENDLY"] = "FRIENDLY";
325
- Personality2["PLAYFUL"] = "PLAYFUL";
326
- Personality2["DIRECT"] = "DIRECT";
327
- return Personality2;
328
- })(Personality || {});
329
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
330
- SortOrder2["ASC"] = "ASC";
331
- SortOrder2["DESC"] = "DESC";
332
- return SortOrder2;
333
- })(SortOrder || {});
334
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
335
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
336
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
337
- WebhookIdentityType2["MEMBER"] = "MEMBER";
338
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
339
- WebhookIdentityType2["APP"] = "APP";
340
- return WebhookIdentityType2;
341
- })(WebhookIdentityType || {});
342
- async function createChatSettings2(chatSettings) {
343
- const { httpClient, sideEffects } = arguments[1];
344
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
345
- chatSettings
346
- });
347
- const reqOpts = createChatSettings(payload);
348
- sideEffects?.onSiteCall?.();
349
- try {
350
- const result = await httpClient.request(reqOpts);
351
- sideEffects?.onSuccess?.(result);
352
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.chatSettings;
353
- } catch (err) {
354
- const transformedError = (0, import_transform_error.transformError)(
355
- err,
356
- {
357
- spreadPathsToArguments: {},
358
- explicitPathsToArguments: { chatSettings: "$[0]" },
359
- singleArgumentUnchanged: false
360
- },
361
- ["chatSettings"]
362
- );
363
- sideEffects?.onError?.(err);
364
- throw transformedError;
365
- }
366
- }
367
- async function updateChatSettings2(_id, chatSettings) {
368
- const { httpClient, sideEffects } = arguments[2];
369
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
370
- chatSettings: { ...chatSettings, id: _id }
371
- });
372
- const reqOpts = updateChatSettings(payload);
373
- sideEffects?.onSiteCall?.();
374
- try {
375
- const result = await httpClient.request(reqOpts);
376
- sideEffects?.onSuccess?.(result);
377
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.chatSettings;
378
- } catch (err) {
379
- const transformedError = (0, import_transform_error.transformError)(
380
- err,
381
- {
382
- spreadPathsToArguments: { chatSettings: "$[1]" },
383
- explicitPathsToArguments: { "chatSettings.id": "$[0]" },
384
- singleArgumentUnchanged: false
385
- },
386
- ["_id", "chatSettings"]
387
- );
388
- sideEffects?.onError?.(err);
389
- throw transformedError;
390
- }
391
- }
392
- async function deleteChatSettings2(chatSettingsId) {
393
- const { httpClient, sideEffects } = arguments[1];
394
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
395
- chatSettingsId
396
- });
397
- const reqOpts = deleteChatSettings(payload);
398
- sideEffects?.onSiteCall?.();
399
- try {
400
- const result = await httpClient.request(reqOpts);
401
- sideEffects?.onSuccess?.(result);
402
- } catch (err) {
403
- const transformedError = (0, import_transform_error.transformError)(
404
- err,
405
- {
406
- spreadPathsToArguments: {},
407
- explicitPathsToArguments: { chatSettingsId: "$[0]" },
408
- singleArgumentUnchanged: false
409
- },
410
- ["chatSettingsId"]
411
- );
412
- sideEffects?.onError?.(err);
413
- throw transformedError;
414
- }
415
- }
416
- async function getChatSettings2(chatSettingsId) {
417
- const { httpClient, sideEffects } = arguments[1];
418
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
419
- chatSettingsId
420
- });
421
- const reqOpts = getChatSettings(payload);
422
- sideEffects?.onSiteCall?.();
423
- try {
424
- const result = await httpClient.request(reqOpts);
425
- sideEffects?.onSuccess?.(result);
426
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.chatSettings;
427
- } catch (err) {
428
- const transformedError = (0, import_transform_error.transformError)(
429
- err,
430
- {
431
- spreadPathsToArguments: {},
432
- explicitPathsToArguments: { chatSettingsId: "$[0]" },
433
- singleArgumentUnchanged: false
434
- },
435
- ["chatSettingsId"]
436
- );
437
- sideEffects?.onError?.(err);
438
- throw transformedError;
439
- }
440
- }
441
- function queryChatSettings2() {
442
- const { httpClient, sideEffects } = arguments[0];
443
- return (0, import_query_builder.queryBuilder)({
444
- func: async (payload) => {
445
- const reqOpts = queryChatSettings(payload);
446
- sideEffects?.onSiteCall?.();
447
- try {
448
- const result = await httpClient.request(reqOpts);
449
- sideEffects?.onSuccess?.(result);
450
- return result;
451
- } catch (err) {
452
- sideEffects?.onError?.(err);
453
- throw err;
454
- }
455
- },
456
- requestTransformer: (query) => {
457
- const args = [query, {}];
458
- return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
459
- ...args?.[1],
460
- query: args?.[0]
461
- });
462
- },
463
- responseTransformer: ({
464
- data
465
- }) => {
466
- const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
467
- (0, import_transform_paths2.transformPaths)(data, [])
468
- );
469
- return {
470
- items: transformedData?.chatSettings,
471
- pagingMetadata: transformedData?.pagingMetadata
472
- };
473
- },
474
- errorTransformer: (err) => {
475
- const transformedError = (0, import_transform_error.transformError)(err, {
476
- spreadPathsToArguments: {},
477
- explicitPathsToArguments: { query: "$[0]" },
478
- singleArgumentUnchanged: false
479
- });
480
- throw transformedError;
481
- },
482
- pagingMethod: "CURSOR",
483
- transformationPaths: {}
484
- });
485
- }
486
- async function typedQueryChatSettings(query) {
487
- const { httpClient, sideEffects } = arguments[1];
488
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
489
- const reqOpts = queryChatSettings(payload);
490
- sideEffects?.onSiteCall?.();
491
- try {
492
- const result = await httpClient.request(reqOpts);
493
- sideEffects?.onSuccess?.(result);
494
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
495
- } catch (err) {
496
- const transformedError = (0, import_transform_error.transformError)(
497
- err,
498
- {
499
- spreadPathsToArguments: {},
500
- explicitPathsToArguments: { query: "$[0]" },
501
- singleArgumentUnchanged: false
502
- },
503
- ["query"]
504
- );
505
- sideEffects?.onError?.(err);
506
- throw transformedError;
507
- }
508
- }
509
- var utils = {
510
- query: {
511
- ...(0, import_query_builder_utils.createQueryUtils)()
512
- }
513
- };
514
-
515
- // src/forms-ai-v1-chat-settings-chat-settings.public.ts
516
- function createChatSettings3(httpClient) {
517
- return (chatSettings) => createChatSettings2(
518
- chatSettings,
519
- // @ts-ignore
520
- { httpClient }
521
- );
522
- }
523
- function updateChatSettings3(httpClient) {
524
- return (_id, chatSettings) => updateChatSettings2(
525
- _id,
526
- chatSettings,
527
- // @ts-ignore
528
- { httpClient }
529
- );
530
- }
531
- function deleteChatSettings3(httpClient) {
532
- return (chatSettingsId) => deleteChatSettings2(
533
- chatSettingsId,
534
- // @ts-ignore
535
- { httpClient }
536
- );
537
- }
538
- function getChatSettings3(httpClient) {
539
- return (chatSettingsId) => getChatSettings2(
540
- chatSettingsId,
541
- // @ts-ignore
542
- { httpClient }
543
- );
544
- }
545
- function queryChatSettings3(httpClient) {
546
- return () => queryChatSettings2(
547
- // @ts-ignore
548
- { httpClient }
549
- );
550
- }
551
- function typedQueryChatSettings2(httpClient) {
552
- return (query) => typedQueryChatSettings(
553
- query,
554
- // @ts-ignore
555
- { httpClient }
556
- );
557
- }
558
- var onChatSettingsCreated = (0, import_sdk_types.EventDefinition)(
559
- "wix.forms.ai.v1.chat_settings_created",
560
- true,
561
- (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
562
- (0, import_transform_paths3.transformPaths)(event, [
563
- {
564
- transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
565
- paths: [
566
- { path: "entity.createdDate" },
567
- { path: "entity.updatedDate" },
568
- { path: "metadata.eventTime" }
569
- ]
570
- }
571
- ])
572
- )
573
- )();
574
- var onChatSettingsDeleted = (0, import_sdk_types.EventDefinition)(
575
- "wix.forms.ai.v1.chat_settings_deleted",
576
- true,
577
- (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
578
- (0, import_transform_paths3.transformPaths)(event, [
579
- {
580
- transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
581
- paths: [
582
- { path: "undefined.createdDate" },
583
- { path: "undefined.updatedDate" },
584
- { path: "metadata.eventTime" }
585
- ]
586
- }
587
- ])
588
- )
589
- )();
590
- var onChatSettingsUpdated = (0, import_sdk_types.EventDefinition)(
591
- "wix.forms.ai.v1.chat_settings_updated",
592
- true,
593
- (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
594
- (0, import_transform_paths3.transformPaths)(event, [
595
- {
596
- transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
597
- paths: [
598
- { path: "entity.createdDate" },
599
- { path: "entity.updatedDate" },
600
- { path: "metadata.eventTime" },
601
- { path: "modifiedFields.createdDate" },
602
- { path: "modifiedFields.updatedDate" }
603
- ]
604
- }
605
- ])
606
- )
607
- )();
608
-
609
- // src/forms-ai-v1-chat-settings-chat-settings.context.ts
610
- var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
611
- var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
612
- var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
613
- function customQueryChatSettings(httpClient) {
614
- const router = (0, import_query_method_router.createQueryOverloadRouter)({
615
- builderQueryFunction: () => queryChatSettings3(httpClient)(),
616
- typedQueryFunction: (query) => typedQueryChatSettings2(httpClient)(query),
617
- hasOptionsParameter: false
618
- });
619
- function overloadedQuery(query) {
620
- return router(...arguments);
621
- }
622
- return overloadedQuery;
623
- }
624
- var createChatSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createChatSettings3);
625
- var updateChatSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateChatSettings3);
626
- var deleteChatSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteChatSettings3);
627
- var getChatSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getChatSettings3);
628
- var queryChatSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryChatSettings);
629
- var onChatSettingsCreated2 = (0, import_event_definition_modules.createEventModule)(
630
- onChatSettingsCreated
631
- );
632
- var onChatSettingsDeleted2 = (0, import_event_definition_modules.createEventModule)(
633
- onChatSettingsDeleted
634
- );
635
- var onChatSettingsUpdated2 = (0, import_event_definition_modules.createEventModule)(
636
- onChatSettingsUpdated
637
- );
638
- // Annotate the CommonJS export names for ESM import in node:
639
- 0 && (module.exports = {
640
- Personality,
641
- SortOrder,
642
- WebhookIdentityType,
643
- createChatSettings,
644
- deleteChatSettings,
645
- getChatSettings,
646
- onChatSettingsCreated,
647
- onChatSettingsDeleted,
648
- onChatSettingsUpdated,
649
- queryChatSettings,
650
- updateChatSettings,
651
- utils
652
- });
653
- //# sourceMappingURL=index.js.map