@wix/ditto-codegen-public 1.0.74 → 1.0.76
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/dist/out.js +488 -3728
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -77528,6 +77528,7 @@ var require_context = __commonJS({
|
|
|
77528
77528
|
apiKey: process.env.ANTHROPIC_API_KEY,
|
|
77529
77529
|
siteId: process.env.SITE_ID,
|
|
77530
77530
|
accessToken: process.env.ACCESS_TOKEN,
|
|
77531
|
+
appNamespace: process.env.APP_NAMESPACE,
|
|
77531
77532
|
hasActiveJobs: () => {
|
|
77532
77533
|
return Object.keys(exports2.ctx.activeJobs).some((jobId) => exports2.ctx.activeJobs[jobId] === CodeGenService_1.TaskStatus.RUNNING);
|
|
77533
77534
|
},
|
|
@@ -120429,10 +120430,10 @@ Path: ${scaffold.path}
|
|
|
120429
120430
|
${scaffold.content}
|
|
120430
120431
|
\`\`\``);
|
|
120431
120432
|
}
|
|
120432
|
-
if (planAndResources?.
|
|
120433
|
+
if (planAndResources?.collections) {
|
|
120433
120434
|
contextSections.push(`
|
|
120434
120435
|
## CREATED COLLECTIONS
|
|
120435
|
-
${JSON.stringify(planAndResources.
|
|
120436
|
+
${JSON.stringify(planAndResources.collections, null, 2)}`);
|
|
120436
120437
|
}
|
|
120437
120438
|
if (planAndResources?.apiSpec) {
|
|
120438
120439
|
contextSections.push(`
|
|
@@ -120774,7 +120775,7 @@ var require_SPIAgent = __commonJS({
|
|
|
120774
120775
|
const examples = (0, load_examples_1.loadExamples)([load_examples_1.types.ServicePluginExtension]);
|
|
120775
120776
|
const allSpiNames = extension.relatedSpis?.map((spi) => spi.name).filter((name) => !!name) || [];
|
|
120776
120777
|
const apiNames = (0, utils_1.extractApiNames)(params.extension);
|
|
120777
|
-
const useData = Boolean(planAndResources?.
|
|
120778
|
+
const useData = Boolean(planAndResources?.collections?.length);
|
|
120778
120779
|
const systemPrompt = `${this.buildSystemPrompt(allSpiNames, apiNames, useData)}
|
|
120779
120780
|
${examples}
|
|
120780
120781
|
`;
|
|
@@ -121018,7 +121019,6 @@ Your output must be strictly JSON that conforms to the provided schema (no markd
|
|
|
121018
121019
|
</role>
|
|
121019
121020
|
|
|
121020
121021
|
<constraints>
|
|
121021
|
-
- Collection must include: id, displayName, displayField (when appropriate), fields[], permissions, and plugins[].
|
|
121022
121022
|
- Field definitions must use supported FieldType enums exactly as strings: TEXT, NUMBER, DATE, DATETIME, IMAGE, BOOLEAN, DOCUMENT, URL, RICH_TEXT, VIDEO, ANY, ARRAY_STRING, ARRAY_DOCUMENT, AUDIO, TIME, LANGUAGE, RICH_CONTENT, MEDIA_GALLERY, ADDRESS, PAGE_LINK, REFERENCE, MULTI_REFERENCE, OBJECT, ARRAY.
|
|
121023
121023
|
- ALWAYS use REFERENCE fields when creating relationships between different CMS collections. ALL related fields must use REFERENCE type.
|
|
121024
121024
|
- ALWAYS use REFERENCE fields when the blueprint indicates relationships to Stores entities (products, categories, orders). Use TEXT fields for all other relationships.
|
|
@@ -121313,3634 +121313,399 @@ ${hasEmbeddedScriptExtensions ? (0, dynamicParameters_1.dynamicParametersPrompt)
|
|
|
121313
121313
|
}
|
|
121314
121314
|
});
|
|
121315
121315
|
|
|
121316
|
-
//
|
|
121317
|
-
var
|
|
121318
|
-
"
|
|
121319
|
-
"use strict";
|
|
121320
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
121321
|
-
exports2.
|
|
121322
|
-
var
|
|
121323
|
-
|
|
121324
|
-
|
|
121325
|
-
|
|
121326
|
-
|
|
121327
|
-
|
|
121328
|
-
|
|
121329
|
-
|
|
121330
|
-
|
|
121331
|
-
|
|
121332
|
-
|
|
121333
|
-
|
|
121334
|
-
|
|
121335
|
-
|
|
121336
|
-
|
|
121337
|
-
|
|
121338
|
-
|
|
121339
|
-
|
|
121340
|
-
|
|
121341
|
-
|
|
121342
|
-
|
|
121343
|
-
|
|
121344
|
-
|
|
121345
|
-
|
|
121346
|
-
|
|
121347
|
-
|
|
121348
|
-
|
|
121349
|
-
|
|
121350
|
-
|
|
121351
|
-
|
|
121352
|
-
|
|
121353
|
-
|
|
121354
|
-
|
|
121355
|
-
|
|
121356
|
-
|
|
121357
|
-
(
|
|
121358
|
-
|
|
121359
|
-
|
|
121360
|
-
|
|
121361
|
-
|
|
121362
|
-
})(
|
|
121363
|
-
var
|
|
121364
|
-
(function(
|
|
121365
|
-
|
|
121366
|
-
|
|
121367
|
-
|
|
121368
|
-
|
|
121369
|
-
|
|
121370
|
-
|
|
121371
|
-
|
|
121372
|
-
|
|
121373
|
-
|
|
121374
|
-
|
|
121375
|
-
|
|
121376
|
-
|
|
121377
|
-
|
|
121378
|
-
|
|
121379
|
-
|
|
121380
|
-
|
|
121381
|
-
|
|
121382
|
-
|
|
121383
|
-
|
|
121384
|
-
|
|
121385
|
-
|
|
121386
|
-
|
|
121387
|
-
|
|
121388
|
-
|
|
121389
|
-
|
|
121390
|
-
|
|
121391
|
-
|
|
121392
|
-
|
|
121393
|
-
|
|
121394
|
-
|
|
121395
|
-
|
|
121396
|
-
|
|
121397
|
-
|
|
121398
|
-
(
|
|
121399
|
-
|
|
121400
|
-
|
|
121401
|
-
|
|
121402
|
-
|
|
121403
|
-
|
|
121404
|
-
|
|
121405
|
-
|
|
121406
|
-
|
|
121407
|
-
|
|
121408
|
-
|
|
121409
|
-
|
|
121410
|
-
|
|
121411
|
-
|
|
121412
|
-
|
|
121413
|
-
|
|
121414
|
-
|
|
121415
|
-
|
|
121416
|
-
|
|
121417
|
-
|
|
121418
|
-
|
|
121419
|
-
|
|
121420
|
-
|
|
121421
|
-
|
|
121422
|
-
|
|
121423
|
-
|
|
121424
|
-
|
|
121425
|
-
|
|
121426
|
-
|
|
121427
|
-
|
|
121428
|
-
|
|
121429
|
-
|
|
121430
|
-
|
|
121431
|
-
|
|
121432
|
-
|
|
121433
|
-
(
|
|
121434
|
-
|
|
121435
|
-
|
|
121436
|
-
|
|
121437
|
-
|
|
121438
|
-
|
|
121439
|
-
|
|
121440
|
-
|
|
121441
|
-
|
|
121442
|
-
|
|
121443
|
-
|
|
121444
|
-
|
|
121445
|
-
|
|
121446
|
-
|
|
121447
|
-
|
|
121448
|
-
|
|
121449
|
-
|
|
121450
|
-
|
|
121451
|
-
|
|
121452
|
-
})(
|
|
121453
|
-
var
|
|
121454
|
-
(function(
|
|
121455
|
-
|
|
121456
|
-
|
|
121457
|
-
|
|
121458
|
-
|
|
121459
|
-
|
|
121460
|
-
|
|
121461
|
-
|
|
121462
|
-
|
|
121463
|
-
|
|
121464
|
-
|
|
121465
|
-
|
|
121466
|
-
})(
|
|
121467
|
-
var
|
|
121468
|
-
(function(
|
|
121469
|
-
|
|
121470
|
-
|
|
121471
|
-
|
|
121472
|
-
})(
|
|
121473
|
-
var
|
|
121474
|
-
(function(
|
|
121475
|
-
|
|
121476
|
-
|
|
121477
|
-
|
|
121478
|
-
|
|
121479
|
-
|
|
121480
|
-
|
|
121481
|
-
|
|
121482
|
-
|
|
121483
|
-
|
|
121484
|
-
|
|
121485
|
-
|
|
121486
|
-
|
|
121487
|
-
|
|
121488
|
-
|
|
121489
|
-
|
|
121490
|
-
|
|
121491
|
-
|
|
121492
|
-
|
|
121493
|
-
|
|
121494
|
-
|
|
121495
|
-
|
|
121496
|
-
|
|
121497
|
-
|
|
121498
|
-
|
|
121499
|
-
|
|
121500
|
-
|
|
121501
|
-
|
|
121502
|
-
|
|
121503
|
-
|
|
121504
|
-
|
|
121505
|
-
})(
|
|
121506
|
-
var
|
|
121507
|
-
(function(
|
|
121508
|
-
|
|
121509
|
-
|
|
121510
|
-
|
|
121511
|
-
|
|
121512
|
-
|
|
121513
|
-
|
|
121514
|
-
TenantMode2["ACCOUNT"] = "ACCOUNT";
|
|
121515
|
-
TenantMode2["APP"] = "APP";
|
|
121516
|
-
})(TenantMode = exports2.TenantMode || (exports2.TenantMode = {}));
|
|
121517
|
-
var Order;
|
|
121518
|
-
(function(Order2) {
|
|
121519
|
-
Order2["ASC"] = "ASC";
|
|
121520
|
-
Order2["DESC"] = "DESC";
|
|
121521
|
-
})(Order = exports2.Order || (exports2.Order = {}));
|
|
121522
|
-
var IndexStatus;
|
|
121523
|
-
(function(IndexStatus2) {
|
|
121524
|
-
IndexStatus2["UNKNOWN"] = "UNKNOWN";
|
|
121525
|
-
IndexStatus2["BUILDING"] = "BUILDING";
|
|
121526
|
-
IndexStatus2["ACTIVE"] = "ACTIVE";
|
|
121527
|
-
IndexStatus2["DROPPING"] = "DROPPING";
|
|
121528
|
-
IndexStatus2["DROPPED"] = "DROPPED";
|
|
121529
|
-
IndexStatus2["FAILED"] = "FAILED";
|
|
121530
|
-
IndexStatus2["INVALID"] = "INVALID";
|
|
121531
|
-
})(IndexStatus = exports2.IndexStatus || (exports2.IndexStatus = {}));
|
|
121532
|
-
var IndexSource;
|
|
121533
|
-
(function(IndexSource2) {
|
|
121534
|
-
IndexSource2["UNKNOWN_INDEX_SOURCE"] = "UNKNOWN_INDEX_SOURCE";
|
|
121535
|
-
IndexSource2["SYSTEM"] = "SYSTEM";
|
|
121536
|
-
IndexSource2["USER"] = "USER";
|
|
121537
|
-
IndexSource2["AUTO"] = "AUTO";
|
|
121538
|
-
})(IndexSource = exports2.IndexSource || (exports2.IndexSource = {}));
|
|
121539
|
-
var WebhookIdentityType;
|
|
121540
|
-
(function(WebhookIdentityType2) {
|
|
121541
|
-
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
121542
|
-
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
121543
|
-
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
121544
|
-
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
121545
|
-
WebhookIdentityType2["APP"] = "APP";
|
|
121546
|
-
})(WebhookIdentityType = exports2.WebhookIdentityType || (exports2.WebhookIdentityType = {}));
|
|
121547
|
-
}
|
|
121548
|
-
});
|
|
121549
|
-
|
|
121550
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/serialization/utils.js
|
|
121551
|
-
var require_utils15 = __commonJS({
|
|
121552
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/serialization/utils.js"(exports2) {
|
|
121553
|
-
"use strict";
|
|
121554
|
-
exports2.__esModule = true;
|
|
121555
|
-
exports2.parseLeanSchemaRef = parseLeanSchemaRef;
|
|
121556
|
-
function parseLeanSchemaRef(renderedSchemaName = "") {
|
|
121557
|
-
const [typeOrName, schemaName] = getSchemaNameAndType(renderedSchemaName);
|
|
121558
|
-
if (schemaName) {
|
|
121559
|
-
return {
|
|
121560
|
-
schemaName,
|
|
121561
|
-
schemaType: typeOrName
|
|
121562
|
-
};
|
|
121563
|
-
}
|
|
121564
|
-
return {
|
|
121565
|
-
schemaName: typeOrName
|
|
121566
|
-
};
|
|
121567
|
-
}
|
|
121568
|
-
var getSchemaNameAndType = (leanSchema) => leanSchema.split("#");
|
|
121569
|
-
}
|
|
121570
|
-
});
|
|
121571
|
-
|
|
121572
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/serialization/index.js
|
|
121573
|
-
var require_serialization = __commonJS({
|
|
121574
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/serialization/index.js"(exports2) {
|
|
121575
|
-
"use strict";
|
|
121576
|
-
exports2.__esModule = true;
|
|
121577
|
-
var _utils = require_utils15();
|
|
121578
|
-
Object.keys(_utils).forEach(function(key) {
|
|
121579
|
-
if (key === "default" || key === "__esModule") return;
|
|
121580
|
-
if (key in exports2 && exports2[key] === _utils[key]) return;
|
|
121581
|
-
exports2[key] = _utils[key];
|
|
121582
|
-
});
|
|
121583
|
-
}
|
|
121584
|
-
});
|
|
121585
|
-
|
|
121586
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/utils.js
|
|
121587
|
-
var require_utils16 = __commonJS({
|
|
121588
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/utils.js"(exports2) {
|
|
121589
|
-
"use strict";
|
|
121590
|
-
exports2.__esModule = true;
|
|
121591
|
-
exports2.findByPath = findByPath;
|
|
121592
|
-
function findByPath(obj, path2, defaultValue, suffix) {
|
|
121593
|
-
let result = obj;
|
|
121594
|
-
for (const field of path2.split(".")) {
|
|
121595
|
-
if (!result) {
|
|
121596
|
-
return defaultValue;
|
|
121597
|
-
}
|
|
121598
|
-
result = result[field];
|
|
121599
|
-
}
|
|
121600
|
-
return `${result}${suffix}`;
|
|
121601
|
-
}
|
|
121602
|
-
}
|
|
121603
|
-
});
|
|
121604
|
-
|
|
121605
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/url-resolver.js
|
|
121606
|
-
var require_url_resolver = __commonJS({
|
|
121607
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/url-resolver.js"(exports2) {
|
|
121608
|
-
"use strict";
|
|
121609
|
-
exports2.__esModule = true;
|
|
121610
|
-
exports2.resolveUrl = resolveUrl;
|
|
121611
|
-
var _utils = require_utils16();
|
|
121612
|
-
var USER_DOMAIN = "_";
|
|
121613
|
-
var DOMAINS = ["wix.com", "editorx.com"];
|
|
121614
|
-
var WIX_API_DOMAINS = ["42.wixprod.net", "uw2-edt-1.wixprod.net"];
|
|
121615
|
-
var DEV_WIX_CODE_DOMAIN = "dev.wix-code.com";
|
|
121616
|
-
var REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/;
|
|
121617
|
-
var REGEX_CAPTURE_DOMAINS = new RegExp(`\\.(${DOMAINS.join("|")})$`);
|
|
121618
|
-
var REGEX_CAPTURE_API_DOMAINS = new RegExp(`\\.(${WIX_API_DOMAINS.join("|")})$`);
|
|
121619
|
-
var REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN = new RegExp(`.*\\.${DEV_WIX_CODE_DOMAIN}$`);
|
|
121620
|
-
function resolveUrl(opts) {
|
|
121621
|
-
const domain = resolveDomain(opts.host);
|
|
121622
|
-
const mappings = resolveMappingsByDomain(domain, opts.domainToMappings);
|
|
121623
|
-
const path2 = injectDataIntoProtoPath(opts.protoPath, opts.data || {});
|
|
121624
|
-
return resolvePath(path2, mappings);
|
|
121625
|
-
}
|
|
121626
|
-
function injectDataIntoProtoPath(protoPath, data) {
|
|
121627
|
-
return protoPath.split("/").map((path2) => maybeProtoPathToData(path2, data)).join("/");
|
|
121628
|
-
}
|
|
121629
|
-
function maybeProtoPathToData(protoPath, data) {
|
|
121630
|
-
const protoRegExpMatch = protoPath.match(REGEX_CAPTURE_PROTO_FIELD) || [];
|
|
121631
|
-
const field = protoRegExpMatch[1];
|
|
121632
|
-
if (field) {
|
|
121633
|
-
const suffix = protoPath.replace(protoRegExpMatch[0], "");
|
|
121634
|
-
return (0, _utils.findByPath)(data, field, protoPath, suffix);
|
|
121635
|
-
}
|
|
121636
|
-
return protoPath;
|
|
121637
|
-
}
|
|
121638
|
-
function resolveDomain(host) {
|
|
121639
|
-
const resolvedHost = fixHostExceptions(host);
|
|
121640
|
-
return resolvedHost.replace(REGEX_CAPTURE_DOMAINS, "._base_domain_").replace(REGEX_CAPTURE_API_DOMAINS, "._api_base_domain_").replace(REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, "*.dev.wix-code.com");
|
|
121641
|
-
}
|
|
121642
|
-
function fixHostExceptions(host) {
|
|
121643
|
-
return host.replace("create.editorx.com", "editor.editorx.com");
|
|
121644
|
-
}
|
|
121645
|
-
function resolveMappingsByDomain(domain, domainToMappings) {
|
|
121646
|
-
const mappings = domainToMappings[domain];
|
|
121647
|
-
if (mappings) {
|
|
121648
|
-
return mappings;
|
|
121649
|
-
}
|
|
121650
|
-
const rootDomainMappings = resolveRootDomain(domain, domainToMappings);
|
|
121651
|
-
if (!rootDomainMappings) {
|
|
121652
|
-
const userMappings = domainToMappings[USER_DOMAIN];
|
|
121653
|
-
if (userMappings) {
|
|
121654
|
-
return userMappings;
|
|
121655
|
-
}
|
|
121656
|
-
if (isBaseDomain(domain)) {
|
|
121657
|
-
return domainToMappings[wwwBaseDomain];
|
|
121658
|
-
}
|
|
121659
|
-
}
|
|
121660
|
-
return rootDomainMappings ?? [];
|
|
121661
|
-
}
|
|
121662
|
-
function resolveRootDomain(domain, domainToMappings) {
|
|
121663
|
-
var _Object$entries$find;
|
|
121664
|
-
return (_Object$entries$find = Object.entries(domainToMappings).find(([entryDomain]) => {
|
|
121665
|
-
const [_, ...rooDomainSegments] = domain.split(".");
|
|
121666
|
-
return rooDomainSegments.join(".") === entryDomain;
|
|
121667
|
-
})) == null ? void 0 : _Object$entries$find[1];
|
|
121668
|
-
}
|
|
121669
|
-
function resolvePath(protoPath, mappings) {
|
|
121670
|
-
const mapping = mappings == null ? void 0 : mappings.find((m) => protoPath.startsWith(m.destPath));
|
|
121671
|
-
if (!mapping) {
|
|
121672
|
-
return protoPath;
|
|
121673
|
-
}
|
|
121674
|
-
return mapping.srcPath + protoPath.slice(mapping.destPath.length);
|
|
121675
|
-
}
|
|
121676
|
-
function isBaseDomain(domain) {
|
|
121677
|
-
return !!domain.match(/\._base_domain_$/);
|
|
121678
|
-
}
|
|
121679
|
-
var wwwBaseDomain = "www._base_domain_";
|
|
121680
|
-
}
|
|
121681
|
-
});
|
|
121682
|
-
|
|
121683
|
-
// ../../node_modules/js-base64/base64.js
|
|
121684
|
-
var require_base643 = __commonJS({
|
|
121685
|
-
"../../node_modules/js-base64/base64.js"(exports2, module2) {
|
|
121686
|
-
(function(global2, factory) {
|
|
121687
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (
|
|
121688
|
-
// cf. https://github.com/dankogai/js-base64/issues/119
|
|
121689
|
-
(function() {
|
|
121690
|
-
var _Base64 = global2.Base64;
|
|
121691
|
-
var gBase64 = factory();
|
|
121692
|
-
gBase64.noConflict = function() {
|
|
121693
|
-
global2.Base64 = _Base64;
|
|
121694
|
-
return gBase64;
|
|
121695
|
-
};
|
|
121696
|
-
if (global2.Meteor) {
|
|
121697
|
-
Base64 = gBase64;
|
|
121698
|
-
}
|
|
121699
|
-
global2.Base64 = gBase64;
|
|
121700
|
-
})()
|
|
121701
|
-
);
|
|
121702
|
-
})(typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : exports2, function() {
|
|
121703
|
-
"use strict";
|
|
121704
|
-
var version = "3.7.8";
|
|
121705
|
-
var VERSION2 = version;
|
|
121706
|
-
var _hasBuffer = typeof Buffer === "function";
|
|
121707
|
-
var _TD = typeof TextDecoder === "function" ? new TextDecoder() : void 0;
|
|
121708
|
-
var _TE = typeof TextEncoder === "function" ? new TextEncoder() : void 0;
|
|
121709
|
-
var b64ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
121710
|
-
var b64chs = Array.prototype.slice.call(b64ch);
|
|
121711
|
-
var b64tab = (function(a) {
|
|
121712
|
-
var tab = {};
|
|
121713
|
-
a.forEach(function(c, i) {
|
|
121714
|
-
return tab[c] = i;
|
|
121715
|
-
});
|
|
121716
|
-
return tab;
|
|
121717
|
-
})(b64chs);
|
|
121718
|
-
var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
|
|
121719
|
-
var _fromCC = String.fromCharCode.bind(String);
|
|
121720
|
-
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : function(it) {
|
|
121721
|
-
return new Uint8Array(Array.prototype.slice.call(it, 0));
|
|
121722
|
-
};
|
|
121723
|
-
var _mkUriSafe = function(src) {
|
|
121724
|
-
return src.replace(/=/g, "").replace(/[+\/]/g, function(m0) {
|
|
121725
|
-
return m0 == "+" ? "-" : "_";
|
|
121726
|
-
});
|
|
121727
|
-
};
|
|
121728
|
-
var _tidyB64 = function(s) {
|
|
121729
|
-
return s.replace(/[^A-Za-z0-9\+\/]/g, "");
|
|
121730
|
-
};
|
|
121731
|
-
var btoaPolyfill = function(bin) {
|
|
121732
|
-
var u32, c0, c1, c2, asc = "";
|
|
121733
|
-
var pad = bin.length % 3;
|
|
121734
|
-
for (var i = 0; i < bin.length; ) {
|
|
121735
|
-
if ((c0 = bin.charCodeAt(i++)) > 255 || (c1 = bin.charCodeAt(i++)) > 255 || (c2 = bin.charCodeAt(i++)) > 255)
|
|
121736
|
-
throw new TypeError("invalid character found");
|
|
121737
|
-
u32 = c0 << 16 | c1 << 8 | c2;
|
|
121738
|
-
asc += b64chs[u32 >> 18 & 63] + b64chs[u32 >> 12 & 63] + b64chs[u32 >> 6 & 63] + b64chs[u32 & 63];
|
|
121739
|
-
}
|
|
121740
|
-
return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
|
|
121741
|
-
};
|
|
121742
|
-
var _btoa = typeof btoa === "function" ? function(bin) {
|
|
121743
|
-
return btoa(bin);
|
|
121744
|
-
} : _hasBuffer ? function(bin) {
|
|
121745
|
-
return Buffer.from(bin, "binary").toString("base64");
|
|
121746
|
-
} : btoaPolyfill;
|
|
121747
|
-
var _fromUint8Array = _hasBuffer ? function(u8a) {
|
|
121748
|
-
return Buffer.from(u8a).toString("base64");
|
|
121749
|
-
} : function(u8a) {
|
|
121750
|
-
var maxargs = 4096;
|
|
121751
|
-
var strs = [];
|
|
121752
|
-
for (var i = 0, l = u8a.length; i < l; i += maxargs) {
|
|
121753
|
-
strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));
|
|
121754
|
-
}
|
|
121755
|
-
return _btoa(strs.join(""));
|
|
121756
|
-
};
|
|
121757
|
-
var fromUint8Array = function(u8a, urlsafe) {
|
|
121758
|
-
if (urlsafe === void 0) {
|
|
121759
|
-
urlsafe = false;
|
|
121760
|
-
}
|
|
121761
|
-
return urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);
|
|
121762
|
-
};
|
|
121763
|
-
var cb_utob = function(c) {
|
|
121764
|
-
if (c.length < 2) {
|
|
121765
|
-
var cc = c.charCodeAt(0);
|
|
121766
|
-
return cc < 128 ? c : cc < 2048 ? _fromCC(192 | cc >>> 6) + _fromCC(128 | cc & 63) : _fromCC(224 | cc >>> 12 & 15) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
|
|
121767
|
-
} else {
|
|
121768
|
-
var cc = 65536 + (c.charCodeAt(0) - 55296) * 1024 + (c.charCodeAt(1) - 56320);
|
|
121769
|
-
return _fromCC(240 | cc >>> 18 & 7) + _fromCC(128 | cc >>> 12 & 63) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
|
|
121770
|
-
}
|
|
121771
|
-
};
|
|
121772
|
-
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
121773
|
-
var utob = function(u) {
|
|
121774
|
-
return u.replace(re_utob, cb_utob);
|
|
121775
|
-
};
|
|
121776
|
-
var _encode = _hasBuffer ? function(s) {
|
|
121777
|
-
return Buffer.from(s, "utf8").toString("base64");
|
|
121778
|
-
} : _TE ? function(s) {
|
|
121779
|
-
return _fromUint8Array(_TE.encode(s));
|
|
121780
|
-
} : function(s) {
|
|
121781
|
-
return _btoa(utob(s));
|
|
121782
|
-
};
|
|
121783
|
-
var encode = function(src, urlsafe) {
|
|
121784
|
-
if (urlsafe === void 0) {
|
|
121785
|
-
urlsafe = false;
|
|
121786
|
-
}
|
|
121787
|
-
return urlsafe ? _mkUriSafe(_encode(src)) : _encode(src);
|
|
121788
|
-
};
|
|
121789
|
-
var encodeURI2 = function(src) {
|
|
121790
|
-
return encode(src, true);
|
|
121791
|
-
};
|
|
121792
|
-
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
|
121793
|
-
var cb_btou = function(cccc) {
|
|
121794
|
-
switch (cccc.length) {
|
|
121795
|
-
case 4:
|
|
121796
|
-
var cp = (7 & cccc.charCodeAt(0)) << 18 | (63 & cccc.charCodeAt(1)) << 12 | (63 & cccc.charCodeAt(2)) << 6 | 63 & cccc.charCodeAt(3), offset = cp - 65536;
|
|
121797
|
-
return _fromCC((offset >>> 10) + 55296) + _fromCC((offset & 1023) + 56320);
|
|
121798
|
-
case 3:
|
|
121799
|
-
return _fromCC((15 & cccc.charCodeAt(0)) << 12 | (63 & cccc.charCodeAt(1)) << 6 | 63 & cccc.charCodeAt(2));
|
|
121800
|
-
default:
|
|
121801
|
-
return _fromCC((31 & cccc.charCodeAt(0)) << 6 | 63 & cccc.charCodeAt(1));
|
|
121802
|
-
}
|
|
121803
|
-
};
|
|
121804
|
-
var btou = function(b) {
|
|
121805
|
-
return b.replace(re_btou, cb_btou);
|
|
121806
|
-
};
|
|
121807
|
-
var atobPolyfill = function(asc) {
|
|
121808
|
-
asc = asc.replace(/\s+/g, "");
|
|
121809
|
-
if (!b64re.test(asc))
|
|
121810
|
-
throw new TypeError("malformed base64.");
|
|
121811
|
-
asc += "==".slice(2 - (asc.length & 3));
|
|
121812
|
-
var u24, r1, r2;
|
|
121813
|
-
var binArray = [];
|
|
121814
|
-
for (var i = 0; i < asc.length; ) {
|
|
121815
|
-
u24 = b64tab[asc.charAt(i++)] << 18 | b64tab[asc.charAt(i++)] << 12 | (r1 = b64tab[asc.charAt(i++)]) << 6 | (r2 = b64tab[asc.charAt(i++)]);
|
|
121816
|
-
if (r1 === 64) {
|
|
121817
|
-
binArray.push(_fromCC(u24 >> 16 & 255));
|
|
121818
|
-
} else if (r2 === 64) {
|
|
121819
|
-
binArray.push(_fromCC(u24 >> 16 & 255, u24 >> 8 & 255));
|
|
121820
|
-
} else {
|
|
121821
|
-
binArray.push(_fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255));
|
|
121822
|
-
}
|
|
121823
|
-
}
|
|
121824
|
-
return binArray.join("");
|
|
121825
|
-
};
|
|
121826
|
-
var _atob = typeof atob === "function" ? function(asc) {
|
|
121827
|
-
return atob(_tidyB64(asc));
|
|
121828
|
-
} : _hasBuffer ? function(asc) {
|
|
121829
|
-
return Buffer.from(asc, "base64").toString("binary");
|
|
121830
|
-
} : atobPolyfill;
|
|
121831
|
-
var _toUint8Array = _hasBuffer ? function(a) {
|
|
121832
|
-
return _U8Afrom(Buffer.from(a, "base64"));
|
|
121833
|
-
} : function(a) {
|
|
121834
|
-
return _U8Afrom(_atob(a).split("").map(function(c) {
|
|
121835
|
-
return c.charCodeAt(0);
|
|
121836
|
-
}));
|
|
121837
|
-
};
|
|
121838
|
-
var toUint8Array = function(a) {
|
|
121839
|
-
return _toUint8Array(_unURI(a));
|
|
121840
|
-
};
|
|
121841
|
-
var _decode = _hasBuffer ? function(a) {
|
|
121842
|
-
return Buffer.from(a, "base64").toString("utf8");
|
|
121843
|
-
} : _TD ? function(a) {
|
|
121844
|
-
return _TD.decode(_toUint8Array(a));
|
|
121845
|
-
} : function(a) {
|
|
121846
|
-
return btou(_atob(a));
|
|
121847
|
-
};
|
|
121848
|
-
var _unURI = function(a) {
|
|
121849
|
-
return _tidyB64(a.replace(/[-_]/g, function(m0) {
|
|
121850
|
-
return m0 == "-" ? "+" : "/";
|
|
121851
|
-
}));
|
|
121852
|
-
};
|
|
121853
|
-
var decode = function(src) {
|
|
121854
|
-
return _decode(_unURI(src));
|
|
121855
|
-
};
|
|
121856
|
-
var isValid = function(src) {
|
|
121857
|
-
if (typeof src !== "string")
|
|
121858
|
-
return false;
|
|
121859
|
-
var s = src.replace(/\s+/g, "").replace(/={0,2}$/, "");
|
|
121860
|
-
return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
|
|
121861
|
-
};
|
|
121862
|
-
var _noEnum = function(v) {
|
|
121863
|
-
return {
|
|
121864
|
-
value: v,
|
|
121865
|
-
enumerable: false,
|
|
121866
|
-
writable: true,
|
|
121867
|
-
configurable: true
|
|
121868
|
-
};
|
|
121869
|
-
};
|
|
121870
|
-
var extendString = function() {
|
|
121871
|
-
var _add = function(name, body) {
|
|
121872
|
-
return Object.defineProperty(String.prototype, name, _noEnum(body));
|
|
121873
|
-
};
|
|
121874
|
-
_add("fromBase64", function() {
|
|
121875
|
-
return decode(this);
|
|
121876
|
-
});
|
|
121877
|
-
_add("toBase64", function(urlsafe) {
|
|
121878
|
-
return encode(this, urlsafe);
|
|
121879
|
-
});
|
|
121880
|
-
_add("toBase64URI", function() {
|
|
121881
|
-
return encode(this, true);
|
|
121882
|
-
});
|
|
121883
|
-
_add("toBase64URL", function() {
|
|
121884
|
-
return encode(this, true);
|
|
121885
|
-
});
|
|
121886
|
-
_add("toUint8Array", function() {
|
|
121887
|
-
return toUint8Array(this);
|
|
121888
|
-
});
|
|
121889
|
-
};
|
|
121890
|
-
var extendUint8Array = function() {
|
|
121891
|
-
var _add = function(name, body) {
|
|
121892
|
-
return Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));
|
|
121893
|
-
};
|
|
121894
|
-
_add("toBase64", function(urlsafe) {
|
|
121895
|
-
return fromUint8Array(this, urlsafe);
|
|
121896
|
-
});
|
|
121897
|
-
_add("toBase64URI", function() {
|
|
121898
|
-
return fromUint8Array(this, true);
|
|
121899
|
-
});
|
|
121900
|
-
_add("toBase64URL", function() {
|
|
121901
|
-
return fromUint8Array(this, true);
|
|
121902
|
-
});
|
|
121903
|
-
};
|
|
121904
|
-
var extendBuiltins = function() {
|
|
121905
|
-
extendString();
|
|
121906
|
-
extendUint8Array();
|
|
121907
|
-
};
|
|
121908
|
-
var gBase64 = {
|
|
121909
|
-
version,
|
|
121910
|
-
VERSION: VERSION2,
|
|
121911
|
-
atob: _atob,
|
|
121912
|
-
atobPolyfill,
|
|
121913
|
-
btoa: _btoa,
|
|
121914
|
-
btoaPolyfill,
|
|
121915
|
-
fromBase64: decode,
|
|
121916
|
-
toBase64: encode,
|
|
121917
|
-
encode,
|
|
121918
|
-
encodeURI: encodeURI2,
|
|
121919
|
-
encodeURL: encodeURI2,
|
|
121920
|
-
utob,
|
|
121921
|
-
btou,
|
|
121922
|
-
decode,
|
|
121923
|
-
isValid,
|
|
121924
|
-
fromUint8Array,
|
|
121925
|
-
toUint8Array,
|
|
121926
|
-
extendString,
|
|
121927
|
-
extendUint8Array,
|
|
121928
|
-
extendBuiltins
|
|
121929
|
-
};
|
|
121930
|
-
gBase64.Base64 = {};
|
|
121931
|
-
Object.keys(gBase64).forEach(function(k) {
|
|
121932
|
-
return gBase64.Base64[k] = gBase64[k];
|
|
121933
|
-
});
|
|
121934
|
-
return gBase64;
|
|
121935
|
-
});
|
|
121936
|
-
}
|
|
121937
|
-
});
|
|
121938
|
-
|
|
121939
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/flatten-params.js
|
|
121940
|
-
var require_flatten_params = __commonJS({
|
|
121941
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/flatten-params.js"(exports2) {
|
|
121942
|
-
"use strict";
|
|
121943
|
-
exports2.__esModule = true;
|
|
121944
|
-
exports2.toURLSearchParams = toURLSearchParams;
|
|
121945
|
-
var _jsBase = require_base643();
|
|
121946
|
-
function flattenParams(data, path2 = "") {
|
|
121947
|
-
const params = {};
|
|
121948
|
-
Object.entries(data).forEach(([key, value]) => {
|
|
121949
|
-
const isObject = value !== null && typeof value === "object" && !Array.isArray(value);
|
|
121950
|
-
const fieldPath = resolvePath(path2, key);
|
|
121951
|
-
if (isObject) {
|
|
121952
|
-
const serializedObject = flattenParams(value, fieldPath);
|
|
121953
|
-
Object.assign(params, serializedObject);
|
|
121954
|
-
} else {
|
|
121955
|
-
params[fieldPath] = value;
|
|
121956
|
-
}
|
|
121957
|
-
});
|
|
121958
|
-
return params;
|
|
121959
|
-
}
|
|
121960
|
-
function resolvePath(path2, key) {
|
|
121961
|
-
return `${path2}${path2 ? "." : ""}${key}`;
|
|
121962
|
-
}
|
|
121963
|
-
function toURLSearchParams(params, isComplexRequest) {
|
|
121964
|
-
const flatten = flattenParams(params);
|
|
121965
|
-
const isPayloadNonSerializableAsUrlSearchParams = Object.entries(flatten).some(([key, value]) => key.includes(".") || Array.isArray(value) && value.some((v) => typeof v === "object"));
|
|
121966
|
-
const shouldSerializeToRParam = isComplexRequest && isPayloadNonSerializableAsUrlSearchParams;
|
|
121967
|
-
if (shouldSerializeToRParam) {
|
|
121968
|
-
return new URLSearchParams({
|
|
121969
|
-
".r": (0, _jsBase.encode)(JSON.stringify(params), true)
|
|
121970
|
-
});
|
|
121971
|
-
} else {
|
|
121972
|
-
return Object.entries(flatten).reduce((urlSearchParams, [key, value]) => {
|
|
121973
|
-
const keyParams = Array.isArray(value) ? value : [value];
|
|
121974
|
-
keyParams.forEach((param) => {
|
|
121975
|
-
if (param === void 0 || param === null || Array.isArray(value) && typeof param === "object") {
|
|
121976
|
-
return;
|
|
121977
|
-
}
|
|
121978
|
-
urlSearchParams.append(key, param);
|
|
121979
|
-
});
|
|
121980
|
-
return urlSearchParams;
|
|
121981
|
-
}, new URLSearchParams());
|
|
121982
|
-
}
|
|
121983
|
-
}
|
|
121984
|
-
}
|
|
121985
|
-
});
|
|
121986
|
-
|
|
121987
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/index.js
|
|
121988
|
-
var require_cjs3 = __commonJS({
|
|
121989
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/index.js"(exports2) {
|
|
121990
|
-
"use strict";
|
|
121991
|
-
exports2.__esModule = true;
|
|
121992
|
-
var _serialization = require_serialization();
|
|
121993
|
-
Object.keys(_serialization).forEach(function(key) {
|
|
121994
|
-
if (key === "default" || key === "__esModule") return;
|
|
121995
|
-
if (key in exports2 && exports2[key] === _serialization[key]) return;
|
|
121996
|
-
exports2[key] = _serialization[key];
|
|
121997
|
-
});
|
|
121998
|
-
var _urlResolver = require_url_resolver();
|
|
121999
|
-
Object.keys(_urlResolver).forEach(function(key) {
|
|
122000
|
-
if (key === "default" || key === "__esModule") return;
|
|
122001
|
-
if (key in exports2 && exports2[key] === _urlResolver[key]) return;
|
|
122002
|
-
exports2[key] = _urlResolver[key];
|
|
122003
|
-
});
|
|
122004
|
-
var _flattenParams = require_flatten_params();
|
|
122005
|
-
Object.keys(_flattenParams).forEach(function(key) {
|
|
122006
|
-
if (key === "default" || key === "__esModule") return;
|
|
122007
|
-
if (key in exports2 && exports2[key] === _flattenParams[key]) return;
|
|
122008
|
-
exports2[key] = _flattenParams[key];
|
|
122009
|
-
});
|
|
122010
|
-
}
|
|
122011
|
-
});
|
|
122012
|
-
|
|
122013
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/serializer/domain.js
|
|
122014
|
-
var require_domain2 = __commonJS({
|
|
122015
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/serializer/domain.js"(exports2) {
|
|
122016
|
-
"use strict";
|
|
122017
|
-
exports2.__esModule = true;
|
|
122018
|
-
exports2.ConverterType = void 0;
|
|
122019
|
-
var ConverterType = exports2.ConverterType = /* @__PURE__ */ (function(ConverterType2) {
|
|
122020
|
-
ConverterType2[ConverterType2["TO_JSON"] = 0] = "TO_JSON";
|
|
122021
|
-
ConverterType2[ConverterType2["FROM_JSON"] = 1] = "FROM_JSON";
|
|
122022
|
-
return ConverterType2;
|
|
122023
|
-
})({});
|
|
122024
|
-
}
|
|
122025
|
-
});
|
|
122026
|
-
|
|
122027
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/serializer/serializer.js
|
|
122028
|
-
var require_serializer = __commonJS({
|
|
122029
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/serializer/serializer.js"(exports2) {
|
|
122030
|
-
"use strict";
|
|
122031
|
-
exports2.__esModule = true;
|
|
122032
|
-
exports2.schemaSerializer = schemaSerializer;
|
|
122033
|
-
var _ = require_cjs3();
|
|
122034
|
-
function schemaSerializer(rootSchema, depSchemas = {}, converterSets) {
|
|
122035
|
-
return function serialize(json = {}, converterType) {
|
|
122036
|
-
return typeof json === "string" ? json : transformSchema(rootSchema, json);
|
|
122037
|
-
function transformSchema(schema, payload) {
|
|
122038
|
-
const result = {};
|
|
122039
|
-
if ([null, void 0].includes(payload)) {
|
|
122040
|
-
return payload;
|
|
122041
|
-
}
|
|
122042
|
-
Object.entries(payload).forEach(([key, val]) => {
|
|
122043
|
-
var _getConverter;
|
|
122044
|
-
const renderedSchemaName = schema[key];
|
|
122045
|
-
const {
|
|
122046
|
-
schemaName,
|
|
122047
|
-
schemaType
|
|
122048
|
-
} = (0, _.parseLeanSchemaRef)(renderedSchemaName);
|
|
122049
|
-
const isMap = schemaType === "Map";
|
|
122050
|
-
const isRepeatable = ((_getConverter = getConverter(schemaName)) == null || _getConverter.checkRepetable == null ? void 0 : _getConverter.checkRepetable(val)) ?? Array.isArray(val);
|
|
122051
|
-
let parsedValue;
|
|
122052
|
-
if (isRepeatable) {
|
|
122053
|
-
parsedValue = val.map((v) => applyField(v, schemaName));
|
|
122054
|
-
} else if (isMap) {
|
|
122055
|
-
parsedValue = applyFieldOnMap(val, schemaName);
|
|
122056
|
-
} else {
|
|
122057
|
-
parsedValue = applyField(val, schemaName);
|
|
122058
|
-
}
|
|
122059
|
-
result[key] = parsedValue;
|
|
122060
|
-
});
|
|
122061
|
-
return result;
|
|
122062
|
-
}
|
|
122063
|
-
function applyField(val, schemaOrSerializer) {
|
|
122064
|
-
if (!schemaOrSerializer) {
|
|
122065
|
-
return val;
|
|
122066
|
-
}
|
|
122067
|
-
const maybeSchema = depSchemas[schemaOrSerializer];
|
|
122068
|
-
const maybeConverter = getConverter(schemaOrSerializer);
|
|
122069
|
-
if (maybeConverter) {
|
|
122070
|
-
return getConverter(schemaOrSerializer).transform(val);
|
|
122071
|
-
} else if (maybeSchema) {
|
|
122072
|
-
return transformSchema(maybeSchema, val);
|
|
122073
|
-
}
|
|
122074
|
-
throw new Error(`${schemaOrSerializer} is neither schema nor serializable type`);
|
|
122075
|
-
}
|
|
122076
|
-
function getConverter(name) {
|
|
122077
|
-
var _converterSets$name;
|
|
122078
|
-
return (_converterSets$name = converterSets[name]) == null ? void 0 : _converterSets$name[converterType];
|
|
122079
|
-
}
|
|
122080
|
-
function applyFieldOnMap(val, sanitizedSchemaOrSerializer) {
|
|
122081
|
-
return Object.entries(val).reduce((acc, [propertyName, value]) => {
|
|
122082
|
-
acc[propertyName] = applyField(value, sanitizedSchemaOrSerializer);
|
|
122083
|
-
return acc;
|
|
122084
|
-
}, {});
|
|
122085
|
-
}
|
|
122086
|
-
};
|
|
122087
|
-
}
|
|
122088
|
-
}
|
|
122089
|
-
});
|
|
122090
|
-
|
|
122091
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/serializer/protobuf-converters/timestamp.js
|
|
122092
|
-
var require_timestamp = __commonJS({
|
|
122093
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/serializer/protobuf-converters/timestamp.js"(exports2) {
|
|
122094
|
-
"use strict";
|
|
122095
|
-
exports2.__esModule = true;
|
|
122096
|
-
exports2.timestamp = void 0;
|
|
122097
|
-
var _domain = require_domain2();
|
|
122098
|
-
var timestamp = exports2.timestamp = {
|
|
122099
|
-
types: ["google.protobuf.Timestamp"],
|
|
122100
|
-
[_domain.ConverterType.TO_JSON]: {
|
|
122101
|
-
transform: (val) => {
|
|
122102
|
-
if (typeof val === "string" || !val) {
|
|
122103
|
-
return val;
|
|
122104
|
-
}
|
|
122105
|
-
return val.toISOString();
|
|
122106
|
-
}
|
|
122107
|
-
},
|
|
122108
|
-
[_domain.ConverterType.FROM_JSON]: {
|
|
122109
|
-
transform: (val) => val ? new Date(val) : val
|
|
122110
|
-
}
|
|
122111
|
-
};
|
|
122112
|
-
}
|
|
122113
|
-
});
|
|
122114
|
-
|
|
122115
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/serializer/protobuf-converters/field-mask.js
|
|
122116
|
-
var require_field_mask = __commonJS({
|
|
122117
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/serializer/protobuf-converters/field-mask.js"(exports2) {
|
|
122118
|
-
"use strict";
|
|
122119
|
-
exports2.__esModule = true;
|
|
122120
|
-
exports2.fieldMask = void 0;
|
|
122121
|
-
var _domain = require_domain2();
|
|
122122
|
-
var fieldMask = exports2.fieldMask = {
|
|
122123
|
-
types: ["google.protobuf.FieldMask"],
|
|
122124
|
-
[_domain.ConverterType.TO_JSON]: {
|
|
122125
|
-
transform: (val) => val.join(","),
|
|
122126
|
-
/**
|
|
122127
|
-
* This one handles cases where we have a repeated google.protobuf.FieldMask type,
|
|
122128
|
-
* so it will look like: [['foo', 'bar'], ['qux']].
|
|
122129
|
-
*
|
|
122130
|
-
* The problem is that the serializer detects it as an array with actual fields (strings),
|
|
122131
|
-
* while in practice it is an array of multiple google.protobuf.FieldMask.
|
|
122132
|
-
*
|
|
122133
|
-
* We should determine if the items are actual fields (so each item is a string),
|
|
122134
|
-
* or arrays of google.protobuf.FieldMask (so each item is array that has items with fields).
|
|
122135
|
-
*
|
|
122136
|
-
* Another approach could be marking on the schama itseld each field if it's a repeatable or not,
|
|
122137
|
-
* it's not a good appraoch, but as long as google.protobuf.FieldMask is our only issue, it's
|
|
122138
|
-
* not _that_ bad solution.
|
|
122139
|
-
*/
|
|
122140
|
-
checkRepetable: (val) => {
|
|
122141
|
-
return val.some((v) => Array.isArray(v));
|
|
122142
|
-
}
|
|
122143
|
-
},
|
|
122144
|
-
[_domain.ConverterType.FROM_JSON]: {
|
|
122145
|
-
transform: (val) => {
|
|
122146
|
-
if (typeof val === "object") {
|
|
122147
|
-
return val.paths;
|
|
122148
|
-
}
|
|
122149
|
-
return val.split(",");
|
|
122150
|
-
}
|
|
122151
|
-
}
|
|
122152
|
-
};
|
|
122153
|
-
}
|
|
122154
|
-
});
|
|
122155
|
-
|
|
122156
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/serializer/protobuf-converters/bytes.js
|
|
122157
|
-
var require_bytes = __commonJS({
|
|
122158
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/serializer/protobuf-converters/bytes.js"(exports2) {
|
|
122159
|
-
"use strict";
|
|
122160
|
-
exports2.__esModule = true;
|
|
122161
|
-
exports2.bytes = void 0;
|
|
122162
|
-
var _domain = require_domain2();
|
|
122163
|
-
var bytes = exports2.bytes = {
|
|
122164
|
-
types: ["google.protobuf.BytesValue", "BYTES"],
|
|
122165
|
-
[_domain.ConverterType.TO_JSON]: {
|
|
122166
|
-
transform: (val) => {
|
|
122167
|
-
const chars = val.reduce((res, c) => res + String.fromCharCode(c), "");
|
|
122168
|
-
return btoa(chars);
|
|
122169
|
-
}
|
|
122170
|
-
},
|
|
122171
|
-
[_domain.ConverterType.FROM_JSON]: {
|
|
122172
|
-
transform: (val) => {
|
|
122173
|
-
return Uint8Array.from(atob(val), (c) => c.charCodeAt(0));
|
|
122174
|
-
}
|
|
122175
|
-
}
|
|
122176
|
-
};
|
|
122177
|
-
}
|
|
122178
|
-
});
|
|
122179
|
-
|
|
122180
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/serializer/protobuf-converters/duration.js
|
|
122181
|
-
var require_duration2 = __commonJS({
|
|
122182
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/serializer/protobuf-converters/duration.js"(exports2) {
|
|
122183
|
-
"use strict";
|
|
122184
|
-
exports2.__esModule = true;
|
|
122185
|
-
exports2.duration = void 0;
|
|
122186
|
-
var _domain = require_domain2();
|
|
122187
|
-
var duration = exports2.duration = {
|
|
122188
|
-
types: ["google.protobuf.Duration"],
|
|
122189
|
-
[_domain.ConverterType.TO_JSON]: {
|
|
122190
|
-
transform: ({
|
|
122191
|
-
seconds = "0",
|
|
122192
|
-
nanos = 0
|
|
122193
|
-
}) => {
|
|
122194
|
-
let nanosPortion = "";
|
|
122195
|
-
if (nanos !== 0) {
|
|
122196
|
-
nanosPortion = `.${nanos.toString().padStart(9, "0")}`;
|
|
122197
|
-
}
|
|
122198
|
-
return `${seconds}${nanosPortion}s`;
|
|
122199
|
-
}
|
|
122200
|
-
},
|
|
122201
|
-
[_domain.ConverterType.FROM_JSON]: {
|
|
122202
|
-
transform: (val) => {
|
|
122203
|
-
const [seconds, nanos] = val.substring(0, val.length - 1).split(".");
|
|
122204
|
-
return {
|
|
122205
|
-
seconds,
|
|
122206
|
-
nanos: nanosForString(nanos)
|
|
122207
|
-
};
|
|
122208
|
-
}
|
|
122209
|
-
}
|
|
122210
|
-
};
|
|
122211
|
-
function nanosForString(nanos) {
|
|
122212
|
-
let res = 0;
|
|
122213
|
-
if (nanos !== void 0) {
|
|
122214
|
-
const precision = 3 - nanos.length / 3;
|
|
122215
|
-
res = parseInt(nanos, 10) * Math.pow(1e3, precision);
|
|
122216
|
-
}
|
|
122217
|
-
return res;
|
|
122218
|
-
}
|
|
122219
|
-
}
|
|
122220
|
-
});
|
|
122221
|
-
|
|
122222
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/serializer/protobuf-converters/float.js
|
|
122223
|
-
var require_float2 = __commonJS({
|
|
122224
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/serializer/protobuf-converters/float.js"(exports2) {
|
|
122225
|
-
"use strict";
|
|
122226
|
-
exports2.__esModule = true;
|
|
122227
|
-
exports2.float = void 0;
|
|
122228
|
-
var _domain = require_domain2();
|
|
122229
|
-
var float = exports2.float = {
|
|
122230
|
-
types: ["FLOAT", "DOUBLE", "google.protobuf.FloatValue", "google.protobuf.DoubleValue"],
|
|
122231
|
-
[_domain.ConverterType.TO_JSON]: {
|
|
122232
|
-
transform: (val) => {
|
|
122233
|
-
return isFinite(val) ? val : val.toString();
|
|
122234
|
-
}
|
|
122235
|
-
},
|
|
122236
|
-
[_domain.ConverterType.FROM_JSON]: {
|
|
122237
|
-
transform: (val) => {
|
|
122238
|
-
if (val === "NaN") {
|
|
122239
|
-
return NaN;
|
|
122240
|
-
}
|
|
122241
|
-
if (val === "Infinity") {
|
|
122242
|
-
return Infinity;
|
|
122243
|
-
}
|
|
122244
|
-
if (val === "-Infinity") {
|
|
122245
|
-
return -Infinity;
|
|
122246
|
-
}
|
|
122247
|
-
return val;
|
|
122248
|
-
}
|
|
122249
|
-
}
|
|
122250
|
-
};
|
|
122251
|
-
}
|
|
122252
|
-
});
|
|
122253
|
-
|
|
122254
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/serializer/protobuf-converters/converters.js
|
|
122255
|
-
var require_converters = __commonJS({
|
|
122256
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/serializer/protobuf-converters/converters.js"(exports2) {
|
|
122257
|
-
"use strict";
|
|
122258
|
-
exports2.__esModule = true;
|
|
122259
|
-
exports2.protobufConverters = void 0;
|
|
122260
|
-
var _timestamp = require_timestamp();
|
|
122261
|
-
var _fieldMask = require_field_mask();
|
|
122262
|
-
var _bytes = require_bytes();
|
|
122263
|
-
var _duration = require_duration2();
|
|
122264
|
-
var _float = require_float2();
|
|
122265
|
-
var protobufConverters = exports2.protobufConverters = [_timestamp.timestamp, _fieldMask.fieldMask, _bytes.bytes, _duration.duration, _float.float];
|
|
122266
|
-
}
|
|
122267
|
-
});
|
|
122268
|
-
|
|
122269
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/serializer/utils.js
|
|
122270
|
-
var require_utils17 = __commonJS({
|
|
122271
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/serializer/utils.js"(exports2) {
|
|
122272
|
-
"use strict";
|
|
122273
|
-
exports2.__esModule = true;
|
|
122274
|
-
exports2.typeToConverterSet = typeToConverterSet;
|
|
122275
|
-
function typeToConverterSet(converterSets) {
|
|
122276
|
-
return converterSets.reduce((result, converterSet) => {
|
|
122277
|
-
const types = converterSet.types.reduce((typeResult, type) => {
|
|
122278
|
-
return {
|
|
122279
|
-
...typeResult,
|
|
122280
|
-
[type]: converterSet
|
|
122281
|
-
};
|
|
122282
|
-
}, {});
|
|
122283
|
-
return {
|
|
122284
|
-
...result,
|
|
122285
|
-
...types
|
|
122286
|
-
};
|
|
122287
|
-
}, {});
|
|
122288
|
-
}
|
|
122289
|
-
}
|
|
122290
|
-
});
|
|
122291
|
-
|
|
122292
|
-
// ../../node_modules/@wix/metro-runtime/dist/cjs/ambassador-index.js
|
|
122293
|
-
var require_ambassador_index = __commonJS({
|
|
122294
|
-
"../../node_modules/@wix/metro-runtime/dist/cjs/ambassador-index.js"(exports2) {
|
|
122295
|
-
"use strict";
|
|
122296
|
-
exports2.__esModule = true;
|
|
122297
|
-
exports2.serializer = serializer;
|
|
122298
|
-
var _domain = require_domain2();
|
|
122299
|
-
var _serializer = require_serializer();
|
|
122300
|
-
var _converters = require_converters();
|
|
122301
|
-
var _utils = require_utils17();
|
|
122302
|
-
var ambassadorConverters = (0, _utils.typeToConverterSet)([..._converters.protobufConverters]);
|
|
122303
|
-
function serializer(rootSchema, depSchemas = {}) {
|
|
122304
|
-
const transform = (0, _serializer.schemaSerializer)(rootSchema, depSchemas, ambassadorConverters);
|
|
122305
|
-
return {
|
|
122306
|
-
fromJSON(jsonOrString) {
|
|
122307
|
-
const jsonOrText = safeJsonParse(jsonOrString) || jsonOrString;
|
|
122308
|
-
return transform(jsonOrText, _domain.ConverterType.FROM_JSON);
|
|
122309
|
-
},
|
|
122310
|
-
toJSON(json) {
|
|
122311
|
-
return transform(json, _domain.ConverterType.TO_JSON);
|
|
122312
|
-
}
|
|
122313
|
-
};
|
|
122314
|
-
}
|
|
122315
|
-
function safeJsonParse(someString) {
|
|
122316
|
-
try {
|
|
122317
|
-
return JSON.parse(someString);
|
|
122318
|
-
} catch (error) {
|
|
122319
|
-
}
|
|
122320
|
-
}
|
|
122321
|
-
}
|
|
122322
|
-
});
|
|
122323
|
-
|
|
122324
|
-
// ../../node_modules/@wix/ambassador-data-v2-data-collection/build/cjs/http.impl.js
|
|
122325
|
-
var require_http_impl = __commonJS({
|
|
122326
|
-
"../../node_modules/@wix/ambassador-data-v2-data-collection/build/cjs/http.impl.js"(exports2) {
|
|
122327
|
-
"use strict";
|
|
122328
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
122329
|
-
exports2.deleteDataCollectionField = exports2.updateDataCollectionField = exports2.createDataCollectionField = exports2.restoreDataCollection = exports2.deleteDataCollection = exports2.updateDataCollection = exports2.bulkGetDataCollections = exports2.listDataCollections = exports2.getDataCollection = exports2.createDataCollection = void 0;
|
|
122330
|
-
var metro_runtime_1 = require_cjs3();
|
|
122331
|
-
var ambassador_1 = require_ambassador_index();
|
|
122332
|
-
var metro_runtime_2 = require_cjs3();
|
|
122333
|
-
var _array = { typeMetadata: "_typeMetadata" };
|
|
122334
|
-
var _bulkGetDataCollectionsRequest = {};
|
|
122335
|
-
var _bulkGetDataCollectionsResponse = {
|
|
122336
|
-
activeCollections: "_dataCollection",
|
|
122337
|
-
deletedCollections: "_dataCollection"
|
|
122338
|
-
};
|
|
122339
|
-
var _createDataCollectionFieldRequest = { field: "_field" };
|
|
122340
|
-
var _createDataCollectionFieldResponse = {
|
|
122341
|
-
dataCollection: "_dataCollection"
|
|
122342
|
-
};
|
|
122343
|
-
var _createDataCollectionRequest = { collection: "_dataCollection" };
|
|
122344
|
-
var _createDataCollectionResponse = { collection: "_dataCollection" };
|
|
122345
|
-
var _dataCollection = {
|
|
122346
|
-
createdDate: "google.protobuf.Timestamp",
|
|
122347
|
-
updatedDate: "google.protobuf.Timestamp",
|
|
122348
|
-
fields: "_field"
|
|
122349
|
-
};
|
|
122350
|
-
var _deleteDataCollectionFieldRequest = {};
|
|
122351
|
-
var _deleteDataCollectionFieldResponse = {
|
|
122352
|
-
dataCollection: "_dataCollection"
|
|
122353
|
-
};
|
|
122354
|
-
var _deleteDataCollectionRequest = {};
|
|
122355
|
-
var _deleteDataCollectionResponse = {};
|
|
122356
|
-
var _field = { numberRange: "_numberRange", typeMetadata: "_typeMetadata" };
|
|
122357
|
-
var _getDataCollectionRequest = {};
|
|
122358
|
-
var _getDataCollectionResponse = {
|
|
122359
|
-
collection: "_dataCollection",
|
|
122360
|
-
referencedCollections: "_dataCollection"
|
|
122361
|
-
};
|
|
122362
|
-
var _listDataCollectionsRequest = {};
|
|
122363
|
-
var _listDataCollectionsResponse = { collections: "_dataCollection" };
|
|
122364
|
-
var _numberRange = {
|
|
122365
|
-
min: "google.protobuf.DoubleValue",
|
|
122366
|
-
max: "google.protobuf.DoubleValue"
|
|
122367
|
-
};
|
|
122368
|
-
var _object = { fields: "_objectField" };
|
|
122369
|
-
var _objectField = { typeMetadata: "_typeMetadata" };
|
|
122370
|
-
var _restoreDataCollectionRequest = {};
|
|
122371
|
-
var _restoreDataCollectionResponse = { dataCollection: "_dataCollection" };
|
|
122372
|
-
var _typeMetadata = { object: "_object", array: "_array" };
|
|
122373
|
-
var _updateDataCollectionFieldRequest = { field: "_field" };
|
|
122374
|
-
var _updateDataCollectionFieldResponse = {
|
|
122375
|
-
dataCollection: "_dataCollection"
|
|
122376
|
-
};
|
|
122377
|
-
var _updateDataCollectionRequest = { collection: "_dataCollection" };
|
|
122378
|
-
var _updateDataCollectionResponse = { collection: "_dataCollection" };
|
|
122379
|
-
function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(opts) {
|
|
122380
|
-
var domainToMappings = {
|
|
122381
|
-
"api._api_base_domain_": [
|
|
122382
|
-
{
|
|
122383
|
-
srcPath: "/cloud-data",
|
|
122384
|
-
destPath: ""
|
|
122385
|
-
}
|
|
122386
|
-
],
|
|
122387
|
-
"code._base_domain_": [
|
|
122388
|
-
{
|
|
122389
|
-
srcPath: "/_api/cloud-data/v1/data-settings",
|
|
122390
|
-
destPath: "/v1/data-settings"
|
|
122391
|
-
},
|
|
122392
|
-
{
|
|
122393
|
-
srcPath: "/_api/cloud-data/v1/schemas",
|
|
122394
|
-
destPath: "/v1/schemas"
|
|
122395
|
-
},
|
|
122396
|
-
{
|
|
122397
|
-
srcPath: "/_api/cloud-data/v1/connector",
|
|
122398
|
-
destPath: "/v1/connector"
|
|
122399
|
-
},
|
|
122400
|
-
{
|
|
122401
|
-
srcPath: "/_api/data/v1/data-settings",
|
|
122402
|
-
destPath: "/v1/data-settings"
|
|
122403
|
-
},
|
|
122404
|
-
{
|
|
122405
|
-
srcPath: "/_api/data/v1/schemas",
|
|
122406
|
-
destPath: "/v1/schemas"
|
|
122407
|
-
},
|
|
122408
|
-
{
|
|
122409
|
-
srcPath: "/_api/data/v1/connector",
|
|
122410
|
-
destPath: "/v1/connector"
|
|
122411
|
-
},
|
|
122412
|
-
{
|
|
122413
|
-
srcPath: "/_api/cloud-data/v1/wix-data",
|
|
122414
|
-
destPath: "/v1/wix-data"
|
|
122415
|
-
}
|
|
122416
|
-
],
|
|
122417
|
-
"cloud-data.wix-code.com": [
|
|
122418
|
-
{
|
|
122419
|
-
srcPath: "",
|
|
122420
|
-
destPath: ""
|
|
122421
|
-
}
|
|
122422
|
-
],
|
|
122423
|
-
_: [
|
|
122424
|
-
{
|
|
122425
|
-
srcPath: "/_api/cloud-data",
|
|
122426
|
-
destPath: ""
|
|
122427
|
-
}
|
|
122428
|
-
],
|
|
122429
|
-
"www._base_domain_": [
|
|
122430
|
-
{
|
|
122431
|
-
srcPath: "/_api/cloud-data",
|
|
122432
|
-
destPath: ""
|
|
122433
|
-
},
|
|
122434
|
-
{
|
|
122435
|
-
srcPath: "/_api/data",
|
|
122436
|
-
destPath: ""
|
|
122437
|
-
},
|
|
122438
|
-
{
|
|
122439
|
-
srcPath: "/_api/cloud-data",
|
|
122440
|
-
destPath: ""
|
|
122441
|
-
}
|
|
122442
|
-
],
|
|
122443
|
-
"dev._base_domain_": [
|
|
122444
|
-
{
|
|
122445
|
-
srcPath: "/_api/cloud-data",
|
|
122446
|
-
destPath: ""
|
|
122447
|
-
}
|
|
122448
|
-
],
|
|
122449
|
-
"bo._base_domain_": [
|
|
122450
|
-
{
|
|
122451
|
-
srcPath: "/_api/cloud-data/v1",
|
|
122452
|
-
destPath: "/v1"
|
|
122453
|
-
},
|
|
122454
|
-
{
|
|
122455
|
-
srcPath: "/_api/cloud-data/v2",
|
|
122456
|
-
destPath: "/v2"
|
|
122457
|
-
}
|
|
122458
|
-
],
|
|
122459
|
-
"wixbo.ai": [
|
|
122460
|
-
{
|
|
122461
|
-
srcPath: "/_api/cloud-data/v1",
|
|
122462
|
-
destPath: "/v1"
|
|
122463
|
-
},
|
|
122464
|
-
{
|
|
122465
|
-
srcPath: "/_api/cloud-data/v2",
|
|
122466
|
-
destPath: "/v2"
|
|
122467
|
-
}
|
|
122468
|
-
],
|
|
122469
|
-
"wix-bo.com": [
|
|
122470
|
-
{
|
|
122471
|
-
srcPath: "/_api/cloud-data/v1",
|
|
122472
|
-
destPath: "/v1"
|
|
122473
|
-
},
|
|
122474
|
-
{
|
|
122475
|
-
srcPath: "/_api/cloud-data/v2",
|
|
122476
|
-
destPath: "/v2"
|
|
122477
|
-
}
|
|
122478
|
-
],
|
|
122479
|
-
"manage._base_domain_": [
|
|
122480
|
-
{
|
|
122481
|
-
srcPath: "/_api/cloud-data",
|
|
122482
|
-
destPath: ""
|
|
122483
|
-
},
|
|
122484
|
-
{
|
|
122485
|
-
srcPath: "/_api/data",
|
|
122486
|
-
destPath: ""
|
|
122487
|
-
},
|
|
122488
|
-
{
|
|
122489
|
-
srcPath: "/_api/cloud-data",
|
|
122490
|
-
destPath: ""
|
|
122491
|
-
}
|
|
122492
|
-
],
|
|
122493
|
-
"editor._base_domain_": [
|
|
122494
|
-
{
|
|
122495
|
-
srcPath: "/_api/cloud-data/v1/schemas",
|
|
122496
|
-
destPath: "/v1/schemas"
|
|
122497
|
-
},
|
|
122498
|
-
{
|
|
122499
|
-
srcPath: "/_api/cloud-data/dbs/tasks",
|
|
122500
|
-
destPath: "/dbs/tasks"
|
|
122501
|
-
},
|
|
122502
|
-
{
|
|
122503
|
-
srcPath: "/_api/data/v1/schemas",
|
|
122504
|
-
destPath: "/v1/schemas"
|
|
122505
|
-
},
|
|
122506
|
-
{
|
|
122507
|
-
srcPath: "/_api/data/dbs/tasks",
|
|
122508
|
-
destPath: "/dbs/tasks"
|
|
122509
|
-
},
|
|
122510
|
-
{
|
|
122511
|
-
srcPath: "/_api/cloud-data/v1/wix-data",
|
|
122512
|
-
destPath: "/v1/wix-data"
|
|
122513
|
-
},
|
|
122514
|
-
{
|
|
122515
|
-
srcPath: "/_api/cloud-data/v1/data-settings",
|
|
122516
|
-
destPath: "/v1/data-settings"
|
|
122517
|
-
},
|
|
122518
|
-
{
|
|
122519
|
-
srcPath: "/_api/data/v2/indexes",
|
|
122520
|
-
destPath: "/v2/indexes"
|
|
122521
|
-
},
|
|
122522
|
-
{
|
|
122523
|
-
srcPath: "/_api/cloud-data/v1/external-database-connections",
|
|
122524
|
-
destPath: "/v1/external-database-connections"
|
|
122525
|
-
},
|
|
122526
|
-
{
|
|
122527
|
-
srcPath: "/_api/data/v1/data-collection-sharing",
|
|
122528
|
-
destPath: "/v1/data-collection-sharing"
|
|
122529
|
-
},
|
|
122530
|
-
{
|
|
122531
|
-
srcPath: "/_api/cloud-data/v2/collections",
|
|
122532
|
-
destPath: "/v2/collections"
|
|
122533
|
-
},
|
|
122534
|
-
{
|
|
122535
|
-
srcPath: "/_api/cloud-data/v2/bulk",
|
|
122536
|
-
destPath: "/v2/bulk"
|
|
122537
|
-
},
|
|
122538
|
-
{
|
|
122539
|
-
srcPath: "/_api/cloud-data/v2/items",
|
|
122540
|
-
destPath: "/v2/items"
|
|
122541
|
-
},
|
|
122542
|
-
{
|
|
122543
|
-
srcPath: "/_api/cloud-data/v2/dbs/tasks",
|
|
122544
|
-
destPath: "/v2/dbs/tasks"
|
|
122545
|
-
}
|
|
122546
|
-
],
|
|
122547
|
-
"blocks._base_domain_": [
|
|
122548
|
-
{
|
|
122549
|
-
srcPath: "/_api/cloud-data/v1/schemas",
|
|
122550
|
-
destPath: "/v1/schemas"
|
|
122551
|
-
},
|
|
122552
|
-
{
|
|
122553
|
-
srcPath: "/_api/cloud-data/dbs/tasks",
|
|
122554
|
-
destPath: "/dbs/tasks"
|
|
122555
|
-
},
|
|
122556
|
-
{
|
|
122557
|
-
srcPath: "/_api/data/v1/schemas",
|
|
122558
|
-
destPath: "/v1/schemas"
|
|
122559
|
-
},
|
|
122560
|
-
{
|
|
122561
|
-
srcPath: "/_api/data/dbs/tasks",
|
|
122562
|
-
destPath: "/dbs/tasks"
|
|
122563
|
-
},
|
|
122564
|
-
{
|
|
122565
|
-
srcPath: "/_api/cloud-data/v1/wix-data",
|
|
122566
|
-
destPath: "/v1/wix-data"
|
|
122567
|
-
},
|
|
122568
|
-
{
|
|
122569
|
-
srcPath: "/_api/cloud-data/v1/data-settings",
|
|
122570
|
-
destPath: "/v1/data-settings"
|
|
122571
|
-
},
|
|
122572
|
-
{
|
|
122573
|
-
srcPath: "/_api/data/v2/indexes",
|
|
122574
|
-
destPath: "/v2/indexes"
|
|
122575
|
-
},
|
|
122576
|
-
{
|
|
122577
|
-
srcPath: "/_api/cloud-data/v1/external-database-connections",
|
|
122578
|
-
destPath: "/v1/external-database-connections"
|
|
122579
|
-
},
|
|
122580
|
-
{
|
|
122581
|
-
srcPath: "/_api/data/v1/data-collection-sharing",
|
|
122582
|
-
destPath: "/v1/data-collection-sharing"
|
|
122583
|
-
},
|
|
122584
|
-
{
|
|
122585
|
-
srcPath: "/_api/cloud-data/v2/collections",
|
|
122586
|
-
destPath: "/v2/collections"
|
|
122587
|
-
},
|
|
122588
|
-
{
|
|
122589
|
-
srcPath: "/_api/cloud-data/v2/bulk",
|
|
122590
|
-
destPath: "/v2/bulk"
|
|
122591
|
-
},
|
|
122592
|
-
{
|
|
122593
|
-
srcPath: "/_api/cloud-data/v2/items",
|
|
122594
|
-
destPath: "/v2/items"
|
|
122595
|
-
},
|
|
122596
|
-
{
|
|
122597
|
-
srcPath: "/_api/cloud-data/v2/dbs/tasks",
|
|
122598
|
-
destPath: "/v2/dbs/tasks"
|
|
122599
|
-
}
|
|
122600
|
-
],
|
|
122601
|
-
"create.editorx": [
|
|
122602
|
-
{
|
|
122603
|
-
srcPath: "/_api/cloud-data/v1/schemas",
|
|
122604
|
-
destPath: "/v1/schemas"
|
|
122605
|
-
},
|
|
122606
|
-
{
|
|
122607
|
-
srcPath: "/_api/cloud-data/dbs/tasks",
|
|
122608
|
-
destPath: "/dbs/tasks"
|
|
122609
|
-
},
|
|
122610
|
-
{
|
|
122611
|
-
srcPath: "/_api/data/v1/schemas",
|
|
122612
|
-
destPath: "/v1/schemas"
|
|
122613
|
-
},
|
|
122614
|
-
{
|
|
122615
|
-
srcPath: "/_api/data/dbs/tasks",
|
|
122616
|
-
destPath: "/dbs/tasks"
|
|
122617
|
-
},
|
|
122618
|
-
{
|
|
122619
|
-
srcPath: "/_api/cloud-data/v1/wix-data",
|
|
122620
|
-
destPath: "/v1/wix-data"
|
|
122621
|
-
},
|
|
122622
|
-
{
|
|
122623
|
-
srcPath: "/_api/cloud-data/v1/data-settings",
|
|
122624
|
-
destPath: "/v1/data-settings"
|
|
122625
|
-
},
|
|
122626
|
-
{
|
|
122627
|
-
srcPath: "/_api/data/v2/indexes",
|
|
122628
|
-
destPath: "/v2/indexes"
|
|
122629
|
-
},
|
|
122630
|
-
{
|
|
122631
|
-
srcPath: "/_api/cloud-data/v1/external-database-connections",
|
|
122632
|
-
destPath: "/v1/external-database-connections"
|
|
122633
|
-
},
|
|
122634
|
-
{
|
|
122635
|
-
srcPath: "/_api/data/v1/data-collection-sharing",
|
|
122636
|
-
destPath: "/v1/data-collection-sharing"
|
|
122637
|
-
},
|
|
122638
|
-
{
|
|
122639
|
-
srcPath: "/_api/cloud-data/v2/collections",
|
|
122640
|
-
destPath: "/v2/collections"
|
|
122641
|
-
},
|
|
122642
|
-
{
|
|
122643
|
-
srcPath: "/_api/cloud-data/v2/bulk",
|
|
122644
|
-
destPath: "/v2/bulk"
|
|
122645
|
-
},
|
|
122646
|
-
{
|
|
122647
|
-
srcPath: "/_api/cloud-data/v2/items",
|
|
122648
|
-
destPath: "/v2/items"
|
|
122649
|
-
},
|
|
122650
|
-
{
|
|
122651
|
-
srcPath: "/_api/cloud-data/v2/dbs/tasks",
|
|
122652
|
-
destPath: "/v2/dbs/tasks"
|
|
122653
|
-
}
|
|
122654
|
-
],
|
|
122655
|
-
"www.wixapis.com": [
|
|
122656
|
-
{
|
|
122657
|
-
srcPath: "/wix-data/v1/collections",
|
|
122658
|
-
destPath: "/v1/wix-data/collections"
|
|
122659
|
-
},
|
|
122660
|
-
{
|
|
122661
|
-
srcPath: "/wix-data/v1/external-database-connections",
|
|
122662
|
-
destPath: "/v1/external-database-connections"
|
|
122663
|
-
},
|
|
122664
|
-
{
|
|
122665
|
-
srcPath: "/wix-data/v2/indexes",
|
|
122666
|
-
destPath: "/v2/indexes"
|
|
122667
|
-
},
|
|
122668
|
-
{
|
|
122669
|
-
srcPath: "/wix-data/v1/items",
|
|
122670
|
-
destPath: "/v1/items"
|
|
122671
|
-
},
|
|
122672
|
-
{
|
|
122673
|
-
srcPath: "/wix-data/v1/bulk",
|
|
122674
|
-
destPath: "/v1/bulk"
|
|
122675
|
-
},
|
|
122676
|
-
{
|
|
122677
|
-
srcPath: "/wix-data/v1/external-databases",
|
|
122678
|
-
destPath: "/v1/external-databases"
|
|
122679
|
-
},
|
|
122680
|
-
{
|
|
122681
|
-
srcPath: "/wix-data/v2",
|
|
122682
|
-
destPath: "/v2"
|
|
122683
|
-
},
|
|
122684
|
-
{
|
|
122685
|
-
srcPath: "/data/v2/collections",
|
|
122686
|
-
destPath: "/v2/collections"
|
|
122687
|
-
},
|
|
122688
|
-
{
|
|
122689
|
-
srcPath: "/data/v2/items",
|
|
122690
|
-
destPath: "/v2/items"
|
|
122691
|
-
},
|
|
122692
|
-
{
|
|
122693
|
-
srcPath: "/data/v2/bulk/items",
|
|
122694
|
-
destPath: "/v2/bulk/items"
|
|
122695
|
-
},
|
|
122696
|
-
{
|
|
122697
|
-
srcPath: "/data/v2/indexes",
|
|
122698
|
-
destPath: "/v2/indexes"
|
|
122699
|
-
},
|
|
122700
|
-
{
|
|
122701
|
-
srcPath: "/data/v1/external-database-connections",
|
|
122702
|
-
destPath: "/v1/external-database-connections"
|
|
122703
|
-
},
|
|
122704
|
-
{
|
|
122705
|
-
srcPath: "/data/v1/data-collection-sharing",
|
|
122706
|
-
destPath: "/v1/data-collection-sharing"
|
|
122707
|
-
}
|
|
122708
|
-
],
|
|
122709
|
-
"www.wixgateway.com": [
|
|
122710
|
-
{
|
|
122711
|
-
srcPath: "/wix-data/v1/items",
|
|
122712
|
-
destPath: "/v1/items"
|
|
122713
|
-
},
|
|
122714
|
-
{
|
|
122715
|
-
srcPath: "/wix-data/v1/bulk",
|
|
122716
|
-
destPath: "/v1/bulk"
|
|
122717
|
-
}
|
|
122718
|
-
],
|
|
122719
|
-
"*.dev.wix-code.com": [
|
|
122720
|
-
{
|
|
122721
|
-
srcPath: "/_api/cloud-data/v2",
|
|
122722
|
-
destPath: "/v2"
|
|
122723
|
-
},
|
|
122724
|
-
{
|
|
122725
|
-
srcPath: "/_api/cloud-data/v1/external-database-connections",
|
|
122726
|
-
destPath: "/v1/external-database-connections"
|
|
122727
|
-
},
|
|
122728
|
-
{
|
|
122729
|
-
srcPath: "/data/v1/data-collection-sharing",
|
|
122730
|
-
destPath: "/v1/data-collection-sharing"
|
|
122731
|
-
}
|
|
122732
|
-
]
|
|
122733
|
-
};
|
|
122734
|
-
return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
122735
|
-
}
|
|
122736
|
-
function createDataCollection(payload) {
|
|
122737
|
-
var _a2 = (0, ambassador_1.serializer)(_createDataCollectionRequest, {
|
|
122738
|
-
_array,
|
|
122739
|
-
_dataCollection,
|
|
122740
|
-
_field,
|
|
122741
|
-
_numberRange,
|
|
122742
|
-
_object,
|
|
122743
|
-
_objectField,
|
|
122744
|
-
_typeMetadata
|
|
122745
|
-
}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
122746
|
-
var fromRes = (0, ambassador_1.serializer)(_createDataCollectionResponse, {
|
|
122747
|
-
_array,
|
|
122748
|
-
_dataCollection,
|
|
122749
|
-
_field,
|
|
122750
|
-
_numberRange,
|
|
122751
|
-
_object,
|
|
122752
|
-
_objectField,
|
|
122753
|
-
_typeMetadata
|
|
122754
|
-
}).fromJSON;
|
|
122755
|
-
function __createDataCollection(_a3) {
|
|
122756
|
-
var host = _a3.host;
|
|
122757
|
-
var serializedData = toReq(payload);
|
|
122758
|
-
var metadata = {
|
|
122759
|
-
entityFqdn: "wix.data.v2.data_collection",
|
|
122760
|
-
method: "POST",
|
|
122761
|
-
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.CreateDataCollection",
|
|
122762
|
-
migrationOptions: {
|
|
122763
|
-
optInTransformResponse: true
|
|
122764
|
-
},
|
|
122765
|
-
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl({ protoPath: "/v2/collections", data: serializedData, host }),
|
|
122766
|
-
data: serializedData,
|
|
122767
|
-
transformResponse: fromRes
|
|
122768
|
-
};
|
|
122769
|
-
return metadata;
|
|
122770
|
-
}
|
|
122771
|
-
__createDataCollection.fromReq = fromReq;
|
|
122772
|
-
__createDataCollection.__isAmbassador = true;
|
|
122773
|
-
return __createDataCollection;
|
|
122774
|
-
}
|
|
122775
|
-
exports2.createDataCollection = createDataCollection;
|
|
122776
|
-
function getDataCollection(payload) {
|
|
122777
|
-
var _a2 = (0, ambassador_1.serializer)(_getDataCollectionRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
122778
|
-
var fromRes = (0, ambassador_1.serializer)(_getDataCollectionResponse, {
|
|
122779
|
-
_array,
|
|
122780
|
-
_dataCollection,
|
|
122781
|
-
_field,
|
|
122782
|
-
_numberRange,
|
|
122783
|
-
_object,
|
|
122784
|
-
_objectField,
|
|
122785
|
-
_typeMetadata
|
|
122786
|
-
}).fromJSON;
|
|
122787
|
-
function __getDataCollection(_a3) {
|
|
122788
|
-
var host = _a3.host;
|
|
122789
|
-
var serializedData = toReq(payload);
|
|
122790
|
-
var metadata = {
|
|
122791
|
-
entityFqdn: "wix.data.v2.data_collection",
|
|
122792
|
-
method: "GET",
|
|
122793
|
-
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.GetDataCollection",
|
|
122794
|
-
migrationOptions: {
|
|
122795
|
-
optInTransformResponse: true
|
|
122796
|
-
},
|
|
122797
|
-
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl({
|
|
122798
|
-
protoPath: "/v2/collections/{dataCollectionId}",
|
|
122799
|
-
data: serializedData,
|
|
122800
|
-
host
|
|
122801
|
-
}),
|
|
122802
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
|
|
122803
|
-
transformResponse: fromRes
|
|
122804
|
-
};
|
|
122805
|
-
return metadata;
|
|
122806
|
-
}
|
|
122807
|
-
__getDataCollection.fromReq = fromReq;
|
|
122808
|
-
__getDataCollection.__isAmbassador = true;
|
|
122809
|
-
return __getDataCollection;
|
|
122810
|
-
}
|
|
122811
|
-
exports2.getDataCollection = getDataCollection;
|
|
122812
|
-
function listDataCollections(payload) {
|
|
122813
|
-
var _a2 = (0, ambassador_1.serializer)(_listDataCollectionsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
122814
|
-
var fromRes = (0, ambassador_1.serializer)(_listDataCollectionsResponse, {
|
|
122815
|
-
_array,
|
|
122816
|
-
_dataCollection,
|
|
122817
|
-
_field,
|
|
122818
|
-
_numberRange,
|
|
122819
|
-
_object,
|
|
122820
|
-
_objectField,
|
|
122821
|
-
_typeMetadata
|
|
122822
|
-
}).fromJSON;
|
|
122823
|
-
function __listDataCollections(_a3) {
|
|
122824
|
-
var host = _a3.host;
|
|
122825
|
-
var serializedData = toReq(payload);
|
|
122826
|
-
var metadata = {
|
|
122827
|
-
entityFqdn: "wix.data.v2.data_collection",
|
|
122828
|
-
method: "GET",
|
|
122829
|
-
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.ListDataCollections",
|
|
122830
|
-
migrationOptions: {
|
|
122831
|
-
optInTransformResponse: true
|
|
122832
|
-
},
|
|
122833
|
-
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl({ protoPath: "/v2/collections", data: serializedData, host }),
|
|
122834
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
|
|
122835
|
-
transformResponse: fromRes
|
|
122836
|
-
};
|
|
122837
|
-
return metadata;
|
|
122838
|
-
}
|
|
122839
|
-
__listDataCollections.fromReq = fromReq;
|
|
122840
|
-
__listDataCollections.__isAmbassador = true;
|
|
122841
|
-
return __listDataCollections;
|
|
122842
|
-
}
|
|
122843
|
-
exports2.listDataCollections = listDataCollections;
|
|
122844
|
-
function bulkGetDataCollections(payload) {
|
|
122845
|
-
var _a2 = (0, ambassador_1.serializer)(_bulkGetDataCollectionsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
122846
|
-
var fromRes = (0, ambassador_1.serializer)(_bulkGetDataCollectionsResponse, {
|
|
122847
|
-
_array,
|
|
122848
|
-
_dataCollection,
|
|
122849
|
-
_field,
|
|
122850
|
-
_numberRange,
|
|
122851
|
-
_object,
|
|
122852
|
-
_objectField,
|
|
122853
|
-
_typeMetadata
|
|
122854
|
-
}).fromJSON;
|
|
122855
|
-
function __bulkGetDataCollections(_a3) {
|
|
122856
|
-
var host = _a3.host;
|
|
122857
|
-
var serializedData = toReq(payload);
|
|
122858
|
-
var metadata = {
|
|
122859
|
-
entityFqdn: "wix.data.v2.data_collection",
|
|
122860
|
-
method: "POST",
|
|
122861
|
-
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.BulkGetDataCollections",
|
|
122862
|
-
migrationOptions: {
|
|
122863
|
-
optInTransformResponse: true
|
|
122864
|
-
},
|
|
122865
|
-
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl({ protoPath: "/v2/bulk/collections/get", data: serializedData, host }),
|
|
122866
|
-
data: serializedData,
|
|
122867
|
-
transformResponse: fromRes
|
|
122868
|
-
};
|
|
122869
|
-
return metadata;
|
|
122870
|
-
}
|
|
122871
|
-
__bulkGetDataCollections.fromReq = fromReq;
|
|
122872
|
-
__bulkGetDataCollections.__isAmbassador = true;
|
|
122873
|
-
return __bulkGetDataCollections;
|
|
122874
|
-
}
|
|
122875
|
-
exports2.bulkGetDataCollections = bulkGetDataCollections;
|
|
122876
|
-
function updateDataCollection(payload) {
|
|
122877
|
-
var _a2 = (0, ambassador_1.serializer)(_updateDataCollectionRequest, {
|
|
122878
|
-
_array,
|
|
122879
|
-
_dataCollection,
|
|
122880
|
-
_field,
|
|
122881
|
-
_numberRange,
|
|
122882
|
-
_object,
|
|
122883
|
-
_objectField,
|
|
122884
|
-
_typeMetadata
|
|
122885
|
-
}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
122886
|
-
var fromRes = (0, ambassador_1.serializer)(_updateDataCollectionResponse, {
|
|
122887
|
-
_array,
|
|
122888
|
-
_dataCollection,
|
|
122889
|
-
_field,
|
|
122890
|
-
_numberRange,
|
|
122891
|
-
_object,
|
|
122892
|
-
_objectField,
|
|
122893
|
-
_typeMetadata
|
|
122894
|
-
}).fromJSON;
|
|
122895
|
-
function __updateDataCollection(_a3) {
|
|
122896
|
-
var host = _a3.host;
|
|
122897
|
-
var serializedData = toReq(payload);
|
|
122898
|
-
var metadata = {
|
|
122899
|
-
entityFqdn: "wix.data.v2.data_collection",
|
|
122900
|
-
method: "PUT",
|
|
122901
|
-
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.UpdateDataCollection",
|
|
122902
|
-
migrationOptions: {
|
|
122903
|
-
optInTransformResponse: true
|
|
122904
|
-
},
|
|
122905
|
-
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl({ protoPath: "/v2/collections", data: serializedData, host }),
|
|
122906
|
-
data: serializedData,
|
|
122907
|
-
transformResponse: fromRes
|
|
122908
|
-
};
|
|
122909
|
-
return metadata;
|
|
122910
|
-
}
|
|
122911
|
-
__updateDataCollection.fromReq = fromReq;
|
|
122912
|
-
__updateDataCollection.__isAmbassador = true;
|
|
122913
|
-
return __updateDataCollection;
|
|
122914
|
-
}
|
|
122915
|
-
exports2.updateDataCollection = updateDataCollection;
|
|
122916
|
-
function deleteDataCollection(payload) {
|
|
122917
|
-
var _a2 = (0, ambassador_1.serializer)(_deleteDataCollectionRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
122918
|
-
var fromRes = (0, ambassador_1.serializer)(_deleteDataCollectionResponse, {}).fromJSON;
|
|
122919
|
-
function __deleteDataCollection(_a3) {
|
|
122920
|
-
var host = _a3.host;
|
|
122921
|
-
var serializedData = toReq(payload);
|
|
122922
|
-
var metadata = {
|
|
122923
|
-
entityFqdn: "wix.data.v2.data_collection",
|
|
122924
|
-
method: "DELETE",
|
|
122925
|
-
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollection",
|
|
122926
|
-
migrationOptions: {
|
|
122927
|
-
optInTransformResponse: true
|
|
122928
|
-
},
|
|
122929
|
-
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl({
|
|
122930
|
-
protoPath: "/v2/collections/{dataCollectionId}",
|
|
122931
|
-
data: serializedData,
|
|
122932
|
-
host
|
|
122933
|
-
}),
|
|
122934
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
|
|
122935
|
-
transformResponse: fromRes
|
|
122936
|
-
};
|
|
122937
|
-
return metadata;
|
|
122938
|
-
}
|
|
122939
|
-
__deleteDataCollection.fromReq = fromReq;
|
|
122940
|
-
__deleteDataCollection.__isAmbassador = true;
|
|
122941
|
-
return __deleteDataCollection;
|
|
122942
|
-
}
|
|
122943
|
-
exports2.deleteDataCollection = deleteDataCollection;
|
|
122944
|
-
function restoreDataCollection(payload) {
|
|
122945
|
-
var _a2 = (0, ambassador_1.serializer)(_restoreDataCollectionRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
122946
|
-
var fromRes = (0, ambassador_1.serializer)(_restoreDataCollectionResponse, {
|
|
122947
|
-
_array,
|
|
122948
|
-
_dataCollection,
|
|
122949
|
-
_field,
|
|
122950
|
-
_numberRange,
|
|
122951
|
-
_object,
|
|
122952
|
-
_objectField,
|
|
122953
|
-
_typeMetadata
|
|
122954
|
-
}).fromJSON;
|
|
122955
|
-
function __restoreDataCollection(_a3) {
|
|
122956
|
-
var host = _a3.host;
|
|
122957
|
-
var serializedData = toReq(payload);
|
|
122958
|
-
var metadata = {
|
|
122959
|
-
entityFqdn: "wix.data.v2.data_collection",
|
|
122960
|
-
method: "POST",
|
|
122961
|
-
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.RestoreDataCollection",
|
|
122962
|
-
migrationOptions: {
|
|
122963
|
-
optInTransformResponse: true
|
|
122964
|
-
},
|
|
122965
|
-
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl({
|
|
122966
|
-
protoPath: "/v2/collections/restore/{dataCollectionId}",
|
|
122967
|
-
data: serializedData,
|
|
122968
|
-
host
|
|
122969
|
-
}),
|
|
122970
|
-
data: serializedData,
|
|
122971
|
-
transformResponse: fromRes
|
|
122972
|
-
};
|
|
122973
|
-
return metadata;
|
|
122974
|
-
}
|
|
122975
|
-
__restoreDataCollection.fromReq = fromReq;
|
|
122976
|
-
__restoreDataCollection.__isAmbassador = true;
|
|
122977
|
-
return __restoreDataCollection;
|
|
122978
|
-
}
|
|
122979
|
-
exports2.restoreDataCollection = restoreDataCollection;
|
|
122980
|
-
function createDataCollectionField(payload) {
|
|
122981
|
-
var _a2 = (0, ambassador_1.serializer)(_createDataCollectionFieldRequest, { _array, _field, _numberRange, _object, _objectField, _typeMetadata }), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
122982
|
-
var fromRes = (0, ambassador_1.serializer)(_createDataCollectionFieldResponse, {
|
|
122983
|
-
_array,
|
|
122984
|
-
_dataCollection,
|
|
122985
|
-
_field,
|
|
122986
|
-
_numberRange,
|
|
122987
|
-
_object,
|
|
122988
|
-
_objectField,
|
|
122989
|
-
_typeMetadata
|
|
122990
|
-
}).fromJSON;
|
|
122991
|
-
function __createDataCollectionField(_a3) {
|
|
122992
|
-
var host = _a3.host;
|
|
122993
|
-
var serializedData = toReq(payload);
|
|
122994
|
-
var metadata = {
|
|
122995
|
-
entityFqdn: "wix.data.v2.data_collection",
|
|
122996
|
-
method: "POST",
|
|
122997
|
-
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.CreateDataCollectionField",
|
|
122998
|
-
migrationOptions: {
|
|
122999
|
-
optInTransformResponse: true
|
|
123000
|
-
},
|
|
123001
|
-
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl({
|
|
123002
|
-
protoPath: "/v2/collections/create-field",
|
|
123003
|
-
data: serializedData,
|
|
123004
|
-
host
|
|
123005
|
-
}),
|
|
123006
|
-
data: serializedData,
|
|
123007
|
-
transformResponse: fromRes
|
|
123008
|
-
};
|
|
123009
|
-
return metadata;
|
|
123010
|
-
}
|
|
123011
|
-
__createDataCollectionField.fromReq = fromReq;
|
|
123012
|
-
__createDataCollectionField.__isAmbassador = true;
|
|
123013
|
-
return __createDataCollectionField;
|
|
123014
|
-
}
|
|
123015
|
-
exports2.createDataCollectionField = createDataCollectionField;
|
|
123016
|
-
function updateDataCollectionField(payload) {
|
|
123017
|
-
var _a2 = (0, ambassador_1.serializer)(_updateDataCollectionFieldRequest, { _array, _field, _numberRange, _object, _objectField, _typeMetadata }), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
123018
|
-
var fromRes = (0, ambassador_1.serializer)(_updateDataCollectionFieldResponse, {
|
|
123019
|
-
_array,
|
|
123020
|
-
_dataCollection,
|
|
123021
|
-
_field,
|
|
123022
|
-
_numberRange,
|
|
123023
|
-
_object,
|
|
123024
|
-
_objectField,
|
|
123025
|
-
_typeMetadata
|
|
123026
|
-
}).fromJSON;
|
|
123027
|
-
function __updateDataCollectionField(_a3) {
|
|
123028
|
-
var host = _a3.host;
|
|
123029
|
-
var serializedData = toReq(payload);
|
|
123030
|
-
var metadata = {
|
|
123031
|
-
entityFqdn: "wix.data.v2.data_collection",
|
|
123032
|
-
method: "POST",
|
|
123033
|
-
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.UpdateDataCollectionField",
|
|
123034
|
-
migrationOptions: {
|
|
123035
|
-
optInTransformResponse: true
|
|
123036
|
-
},
|
|
123037
|
-
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl({
|
|
123038
|
-
protoPath: "/v2/collections/update-field",
|
|
123039
|
-
data: serializedData,
|
|
123040
|
-
host
|
|
123041
|
-
}),
|
|
123042
|
-
data: serializedData,
|
|
123043
|
-
transformResponse: fromRes
|
|
123044
|
-
};
|
|
123045
|
-
return metadata;
|
|
123046
|
-
}
|
|
123047
|
-
__updateDataCollectionField.fromReq = fromReq;
|
|
123048
|
-
__updateDataCollectionField.__isAmbassador = true;
|
|
123049
|
-
return __updateDataCollectionField;
|
|
123050
|
-
}
|
|
123051
|
-
exports2.updateDataCollectionField = updateDataCollectionField;
|
|
123052
|
-
function deleteDataCollectionField(payload) {
|
|
123053
|
-
var _a2 = (0, ambassador_1.serializer)(_deleteDataCollectionFieldRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
123054
|
-
var fromRes = (0, ambassador_1.serializer)(_deleteDataCollectionFieldResponse, {
|
|
123055
|
-
_array,
|
|
123056
|
-
_dataCollection,
|
|
123057
|
-
_field,
|
|
123058
|
-
_numberRange,
|
|
123059
|
-
_object,
|
|
123060
|
-
_objectField,
|
|
123061
|
-
_typeMetadata
|
|
123062
|
-
}).fromJSON;
|
|
123063
|
-
function __deleteDataCollectionField(_a3) {
|
|
123064
|
-
var host = _a3.host;
|
|
123065
|
-
var serializedData = toReq(payload);
|
|
123066
|
-
var metadata = {
|
|
123067
|
-
entityFqdn: "wix.data.v2.data_collection",
|
|
123068
|
-
method: "POST",
|
|
123069
|
-
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollectionField",
|
|
123070
|
-
migrationOptions: {
|
|
123071
|
-
optInTransformResponse: true
|
|
123072
|
-
},
|
|
123073
|
-
url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl({
|
|
123074
|
-
protoPath: "/v2/collections/delete-field",
|
|
123075
|
-
data: serializedData,
|
|
123076
|
-
host
|
|
123077
|
-
}),
|
|
123078
|
-
data: serializedData,
|
|
123079
|
-
transformResponse: fromRes
|
|
123080
|
-
};
|
|
123081
|
-
return metadata;
|
|
123082
|
-
}
|
|
123083
|
-
__deleteDataCollectionField.fromReq = fromReq;
|
|
123084
|
-
__deleteDataCollectionField.__isAmbassador = true;
|
|
123085
|
-
return __deleteDataCollectionField;
|
|
123086
|
-
}
|
|
123087
|
-
exports2.deleteDataCollectionField = deleteDataCollectionField;
|
|
123088
|
-
}
|
|
123089
|
-
});
|
|
123090
|
-
|
|
123091
|
-
// dist/agents/CMSAgent.js
|
|
123092
|
-
var require_CMSAgent = __commonJS({
|
|
123093
|
-
"dist/agents/CMSAgent.js"(exports2) {
|
|
123094
|
-
"use strict";
|
|
123095
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
123096
|
-
exports2.CmsAgent = exports2.CmsCollectionSchema = void 0;
|
|
123097
|
-
var anthropic_1 = require_dist5();
|
|
123098
|
-
var ai_1 = require_dist9();
|
|
123099
|
-
var schemaFixer_1 = require_schemaFixer();
|
|
123100
|
-
var types_1 = require_types_impl2();
|
|
123101
|
-
var http_1 = require_http_impl();
|
|
123102
|
-
var zod_1 = require_zod();
|
|
123103
|
-
var utils_1 = require_utils14();
|
|
123104
|
-
var FieldTypeEnum = zod_1.z.enum(Object.values(types_1.FieldType));
|
|
123105
|
-
var RoleEnum = zod_1.z.enum(Object.values(types_1.Role));
|
|
123106
|
-
var ReferenceMetadataSchema = zod_1.z.object({
|
|
123107
|
-
referencedCollectionId: zod_1.z.string()
|
|
123108
|
-
});
|
|
123109
|
-
var MultiReferenceMetadataSchema = zod_1.z.object({
|
|
123110
|
-
referencedCollectionId: zod_1.z.string(),
|
|
123111
|
-
referencingFieldKey: zod_1.z.string(),
|
|
123112
|
-
referencingDisplayName: zod_1.z.string()
|
|
123113
|
-
});
|
|
123114
|
-
var TypeMetadataSchema = zod_1.z.object({
|
|
123115
|
-
reference: ReferenceMetadataSchema.optional(),
|
|
123116
|
-
multiReference: MultiReferenceMetadataSchema.optional()
|
|
123117
|
-
});
|
|
123118
|
-
var FieldDef = zod_1.z.object({
|
|
123119
|
-
key: zod_1.z.string(),
|
|
123120
|
-
displayName: zod_1.z.string().optional(),
|
|
123121
|
-
type: FieldTypeEnum,
|
|
123122
|
-
typeMetadata: TypeMetadataSchema.optional()
|
|
123123
|
-
});
|
|
123124
|
-
exports2.CmsCollectionSchema = zod_1.z.object({
|
|
123125
|
-
id: zod_1.z.string(),
|
|
123126
|
-
displayName: zod_1.z.string(),
|
|
123127
|
-
displayField: zod_1.z.string().optional(),
|
|
123128
|
-
fields: zod_1.z.array(FieldDef).default([]),
|
|
123129
|
-
permissions: zod_1.z.object({
|
|
123130
|
-
read: RoleEnum,
|
|
123131
|
-
insert: RoleEnum,
|
|
123132
|
-
update: RoleEnum,
|
|
123133
|
-
remove: RoleEnum
|
|
123134
|
-
}).default({
|
|
123135
|
-
read: types_1.Role.ANYONE,
|
|
123136
|
-
insert: types_1.Role.ADMIN,
|
|
123137
|
-
update: types_1.Role.ADMIN,
|
|
123138
|
-
remove: types_1.Role.ADMIN
|
|
123139
|
-
}),
|
|
123140
|
-
plugins: zod_1.z.array(zod_1.z.unknown()).default([])
|
|
123141
|
-
});
|
|
123142
|
-
var CmsRecoveryOutput = zod_1.z.object({
|
|
123143
|
-
collection: exports2.CmsCollectionSchema.optional()
|
|
123144
|
-
});
|
|
123145
|
-
var CmsAgent = class {
|
|
123146
|
-
constructor(apiKey) {
|
|
123147
|
-
this.apiKey = apiKey;
|
|
123148
|
-
this.name = "CmsAgent";
|
|
123149
|
-
}
|
|
123150
|
-
async createCollection(input) {
|
|
123151
|
-
const { siteId, accessToken, collection } = input;
|
|
123152
|
-
const httpClient = (0, utils_1.getHttpClient)(accessToken, siteId);
|
|
123153
|
-
const res = await httpClient.request((0, http_1.createDataCollection)({ collection }));
|
|
123154
|
-
if (!res?.data?.collection) {
|
|
123155
|
-
throw new Error("Failed to create collection");
|
|
123156
|
-
}
|
|
123157
|
-
return res.data?.collection;
|
|
123158
|
-
}
|
|
123159
|
-
getModel() {
|
|
123160
|
-
return (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-3-5-haiku-latest");
|
|
123161
|
-
}
|
|
123162
|
-
async proposeFixedCollection(errorText, originalCollection, summary) {
|
|
123163
|
-
const systemPrompt = (0, schemaFixer_1.schemaFixerPrompt)();
|
|
123164
|
-
const originalBodyJson = JSON.stringify({ collection: originalCollection }, null, 2);
|
|
123165
|
-
const userPrompt = `Fix the collection object to satisfy the API and the error message.
|
|
123166
|
-
Summary:${summary}
|
|
123167
|
-
Error:${errorText}
|
|
123168
|
-
Original request body:${originalBodyJson}
|
|
123169
|
-
Return only the corrected collection object inside the schema.`;
|
|
123170
|
-
const result = await (0, ai_1.generateObject)({
|
|
123171
|
-
model: this.getModel(),
|
|
123172
|
-
schema: CmsRecoveryOutput,
|
|
123173
|
-
system: systemPrompt,
|
|
123174
|
-
prompt: userPrompt,
|
|
123175
|
-
maxRetries: 3,
|
|
123176
|
-
temperature: 0,
|
|
123177
|
-
experimental_telemetry: {
|
|
123178
|
-
isEnabled: true,
|
|
123179
|
-
functionId: this.name
|
|
123180
|
-
}
|
|
123181
|
-
});
|
|
123182
|
-
return result.object.collection;
|
|
123183
|
-
}
|
|
123184
|
-
async generate(payload) {
|
|
123185
|
-
this.currentCollectionSchema = payload.collection;
|
|
123186
|
-
if (this.currentCollectionSchema?.permissions) {
|
|
123187
|
-
this.currentCollectionSchema.permissions = {
|
|
123188
|
-
...this.currentCollectionSchema.permissions,
|
|
123189
|
-
read: types_1.Role.ANYONE,
|
|
123190
|
-
insert: types_1.Role.ANYONE,
|
|
123191
|
-
update: types_1.Role.ANYONE,
|
|
123192
|
-
remove: types_1.Role.ANYONE
|
|
123193
|
-
};
|
|
123194
|
-
}
|
|
123195
|
-
let lastError;
|
|
123196
|
-
let createdCollection;
|
|
123197
|
-
for (let attempt = 0; attempt < 3 && !createdCollection; attempt++) {
|
|
123198
|
-
try {
|
|
123199
|
-
createdCollection = await this.createCollection({
|
|
123200
|
-
siteId: payload.siteId,
|
|
123201
|
-
accessToken: payload.accessToken,
|
|
123202
|
-
collection: this.currentCollectionSchema
|
|
123203
|
-
});
|
|
123204
|
-
} catch (err) {
|
|
123205
|
-
lastError = (0, utils_1.getErrorMessage)(err);
|
|
123206
|
-
const fixedCollection = await this.proposeFixedCollection(lastError, this.currentCollectionSchema, payload.blueprint.summary ?? "");
|
|
123207
|
-
this.currentCollectionSchema = fixedCollection;
|
|
123208
|
-
continue;
|
|
123209
|
-
}
|
|
123210
|
-
}
|
|
123211
|
-
if (!createdCollection) {
|
|
123212
|
-
throw new Error(`Failed to create or repair collection after 3 attempts: ${lastError}`);
|
|
123213
|
-
}
|
|
123214
|
-
return { collection: createdCollection };
|
|
123215
|
-
}
|
|
123216
|
-
};
|
|
123217
|
-
exports2.CmsAgent = CmsAgent;
|
|
123218
|
-
exports2.default = CmsAgent;
|
|
123219
|
-
}
|
|
123220
|
-
});
|
|
123221
|
-
|
|
123222
|
-
// dist/ApiSpecSchema.js
|
|
123223
|
-
var require_ApiSpecSchema = __commonJS({
|
|
123224
|
-
"dist/ApiSpecSchema.js"(exports2) {
|
|
123225
|
-
"use strict";
|
|
123226
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
123227
|
-
exports2.ApiSpecSchema = void 0;
|
|
123228
|
-
var zod_1 = require_zod();
|
|
123229
|
-
var HttpMethodSchema = zod_1.z.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]);
|
|
123230
|
-
var EndpointSchema = zod_1.z.object({
|
|
123231
|
-
id: zod_1.z.string().describe("Unique identifier for the endpoint"),
|
|
123232
|
-
path: zod_1.z.string().describe("API endpoint path (e.g., '/api/users', '/api/users/[id]')"),
|
|
123233
|
-
method: HttpMethodSchema.describe("HTTP method for the endpoint"),
|
|
123234
|
-
name: zod_1.z.string().describe("Human-readable name for the endpoint"),
|
|
123235
|
-
description: zod_1.z.string().describe("What the endpoint does"),
|
|
123236
|
-
parameters: zod_1.z.array(zod_1.z.object({
|
|
123237
|
-
name: zod_1.z.string(),
|
|
123238
|
-
type: zod_1.z.enum(["string", "number", "boolean", "object", "array"]),
|
|
123239
|
-
required: zod_1.z.boolean().default(false),
|
|
123240
|
-
location: zod_1.z.enum(["path", "query", "body"]).default("body")
|
|
123241
|
-
})).default([]).describe("Input parameters"),
|
|
123242
|
-
response: zod_1.z.object({
|
|
123243
|
-
statusCode: zod_1.z.number().default(200),
|
|
123244
|
-
type: zod_1.z.enum(["string", "number", "boolean", "object", "array"]).default("object")
|
|
123245
|
-
}).describe("Expected response")
|
|
123246
|
-
});
|
|
123247
|
-
var DataModelSchema = zod_1.z.object({
|
|
123248
|
-
name: zod_1.z.string().describe("Name of the data model"),
|
|
123249
|
-
properties: zod_1.z.record(zod_1.z.string(), zod_1.z.object({
|
|
123250
|
-
type: zod_1.z.enum(["string", "number", "boolean", "object", "array"]),
|
|
123251
|
-
required: zod_1.z.boolean().default(false)
|
|
123252
|
-
})).describe("Properties of the model")
|
|
123253
|
-
});
|
|
123254
|
-
exports2.ApiSpecSchema = zod_1.z.object({
|
|
123255
|
-
name: zod_1.z.string().describe("Name of the API"),
|
|
123256
|
-
description: zod_1.z.string().describe("Overall description of the API"),
|
|
123257
|
-
endpoints: zod_1.z.array(EndpointSchema).describe("List of API endpoints to implement"),
|
|
123258
|
-
dataModels: zod_1.z.array(DataModelSchema).default([]).describe("Shared data models/types")
|
|
123259
|
-
}).describe("Complete API specification");
|
|
123260
|
-
}
|
|
123261
|
-
});
|
|
123262
|
-
|
|
123263
|
-
// dist/EmbeddedScriptSchema.js
|
|
123264
|
-
var require_EmbeddedScriptSchema = __commonJS({
|
|
123265
|
-
"dist/EmbeddedScriptSchema.js"(exports2) {
|
|
123266
|
-
"use strict";
|
|
123267
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
123268
|
-
exports2.EmbeddedScriptParametersSchema = exports2.DynamicParameterSchema = void 0;
|
|
123269
|
-
var zod_1 = require_zod();
|
|
123270
|
-
var ParameterTypeEnum = zod_1.z.enum([
|
|
123271
|
-
"TEXT",
|
|
123272
|
-
"NUMBER",
|
|
123273
|
-
"BOOLEAN",
|
|
123274
|
-
"IMAGE",
|
|
123275
|
-
"DATE",
|
|
123276
|
-
"DATETIME",
|
|
123277
|
-
"URL",
|
|
123278
|
-
"SELECT",
|
|
123279
|
-
"COLOR"
|
|
123280
|
-
]).describe("The data type of a dynamic parameter for embedded scripts");
|
|
123281
|
-
exports2.DynamicParameterSchema = zod_1.z.object({
|
|
123282
|
-
key: zod_1.z.string().describe("The template variable name used as {{key}} in the embedded script (lowerCamelCase)"),
|
|
123283
|
-
displayName: zod_1.z.string().describe("Human-readable label for the dashboard UI"),
|
|
123284
|
-
type: ParameterTypeEnum.describe("The data type of the parameter"),
|
|
123285
|
-
description: zod_1.z.string().optional().describe("Help text explaining the parameter's purpose"),
|
|
123286
|
-
required: zod_1.z.boolean().describe("Whether the parameter must have a value"),
|
|
123287
|
-
defaultValue: zod_1.z.string().optional().describe("Default value if not set by the user"),
|
|
123288
|
-
options: zod_1.z.array(zod_1.z.string()).optional().describe("For SELECT type parameters, the available options")
|
|
123289
|
-
}).describe("A dynamic parameter definition for embedded script configuration");
|
|
123290
|
-
exports2.EmbeddedScriptParametersSchema = zod_1.z.object({
|
|
123291
|
-
extensionId: zod_1.z.string().describe("The name of the embedded script extension these parameters belong to"),
|
|
123292
|
-
parameters: zod_1.z.array(exports2.DynamicParameterSchema).default([]).describe("Array of dynamic parameter definitions for this embedded script")
|
|
123293
|
-
}).describe("Dynamic parameters configuration for a specific embedded script extension");
|
|
123294
|
-
}
|
|
123295
|
-
});
|
|
123296
|
-
|
|
123297
|
-
// dist/agents/PlannerAgent.js
|
|
123298
|
-
var require_PlannerAgent = __commonJS({
|
|
123299
|
-
"dist/agents/PlannerAgent.js"(exports2) {
|
|
123300
|
-
"use strict";
|
|
123301
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
123302
|
-
exports2.PlannerAgent = exports2.PlannerOutputSchema = void 0;
|
|
123303
|
-
var types_1 = require_types_impl();
|
|
123304
|
-
var anthropic_1 = require_dist5();
|
|
123305
|
-
var ai_1 = require_dist9();
|
|
123306
|
-
var zod_1 = require_zod();
|
|
123307
|
-
var planner_1 = require_planner();
|
|
123308
|
-
var CMSAgent_1 = require_CMSAgent();
|
|
123309
|
-
var utils_1 = require_utils14();
|
|
123310
|
-
var ApiSpecSchema_1 = require_ApiSpecSchema();
|
|
123311
|
-
var EmbeddedScriptSchema_1 = require_EmbeddedScriptSchema();
|
|
123312
|
-
exports2.PlannerOutputSchema = zod_1.z.object({
|
|
123313
|
-
collections: zod_1.z.array(CMSAgent_1.CmsCollectionSchema).default([]).describe("CMS collections to be created for the app"),
|
|
123314
|
-
embeddedScriptParameters: zod_1.z.array(EmbeddedScriptSchema_1.EmbeddedScriptParametersSchema).default([]).describe("Dynamic parameters for embedded script extensions (empty array if no embedded scripts)"),
|
|
123315
|
-
apiSpec: ApiSpecSchema_1.ApiSpecSchema.optional().describe("API specification for the app, don't return anything if no backend API extensions")
|
|
123316
|
-
});
|
|
123317
|
-
var PlannerAgent = class {
|
|
123318
|
-
constructor(apiKey) {
|
|
123319
|
-
this.apiKey = apiKey;
|
|
123320
|
-
this.name = "PlannerAgent";
|
|
123321
|
-
}
|
|
123322
|
-
buildSystemPrompt(hasEmbeddedScriptExtensions, hasBackendApiExtensions) {
|
|
123323
|
-
return (0, planner_1.plannerPrompt)(hasEmbeddedScriptExtensions, hasBackendApiExtensions);
|
|
123324
|
-
}
|
|
123325
|
-
async generatePlan(systemPrompt, blueprint, model, error) {
|
|
123326
|
-
const userContent = `
|
|
123327
|
-
${JSON.stringify(blueprint, null, 2)}
|
|
123328
|
-
${error ? `
|
|
123329
|
-
|
|
123330
|
-
The previous attempt failed with the following error:
|
|
123331
|
-
${error}` : ""}
|
|
123332
|
-
`;
|
|
123333
|
-
const result = await (0, ai_1.generateObject)({
|
|
123334
|
-
model,
|
|
123335
|
-
schema: exports2.PlannerOutputSchema,
|
|
123336
|
-
messages: [
|
|
123337
|
-
{
|
|
123338
|
-
role: "system",
|
|
123339
|
-
content: systemPrompt,
|
|
123340
|
-
providerOptions: (0, utils_1.withCaching)("1h")
|
|
123341
|
-
},
|
|
123342
|
-
{
|
|
123343
|
-
role: "user",
|
|
123344
|
-
content: userContent
|
|
123345
|
-
}
|
|
123346
|
-
],
|
|
123347
|
-
maxRetries: 3,
|
|
123348
|
-
temperature: 0,
|
|
123349
|
-
experimental_telemetry: {
|
|
123350
|
-
isEnabled: true,
|
|
123351
|
-
functionId: this.name
|
|
123352
|
-
}
|
|
123353
|
-
});
|
|
123354
|
-
return result.object;
|
|
123355
|
-
}
|
|
123356
|
-
async generate(blueprint) {
|
|
123357
|
-
const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-3-5-haiku-latest");
|
|
123358
|
-
const hasEmbeddedScriptExtensions = blueprint?.extensions?.some((ext) => ext.type === types_1.ExtensionType.EMBEDDED_SCRIPT) ?? false;
|
|
123359
|
-
const hasBackendApiExtensions = blueprint?.extensions?.some((ext) => ext.type === types_1.ExtensionType.BACKEND_API) ?? false;
|
|
123360
|
-
const systemPrompt = this.buildSystemPrompt(hasEmbeddedScriptExtensions, hasBackendApiExtensions);
|
|
123361
|
-
let lastError;
|
|
123362
|
-
for (let i = 0; i < 3; i++) {
|
|
123363
|
-
try {
|
|
123364
|
-
const result = await this.generatePlan(systemPrompt, blueprint, model, lastError);
|
|
123365
|
-
return result;
|
|
123366
|
-
} catch (error) {
|
|
123367
|
-
lastError = JSON.stringify(error);
|
|
123368
|
-
console.error(`Error generating plan (attempt ${i + 1}): ${error}`);
|
|
123369
|
-
continue;
|
|
123370
|
-
}
|
|
123371
|
-
}
|
|
123372
|
-
throw new Error("Failed to generate plan after 3 attempts");
|
|
123373
|
-
}
|
|
123374
|
-
};
|
|
123375
|
-
exports2.PlannerAgent = PlannerAgent;
|
|
123376
|
-
exports2.default = PlannerAgent;
|
|
123377
|
-
}
|
|
123378
|
-
});
|
|
123379
|
-
|
|
123380
|
-
// ../../node_modules/@wix/ambassador-data-v2-data-item/build/cjs/http.impl.js
|
|
123381
|
-
var require_http_impl2 = __commonJS({
|
|
123382
|
-
"../../node_modules/@wix/ambassador-data-v2-data-item/build/cjs/http.impl.js"(exports2) {
|
|
123383
|
-
"use strict";
|
|
123384
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
123385
|
-
exports2.searchDataItems = exports2.replaceDataItemReferences = exports2.bulkRemoveDataItemReferences = exports2.bulkInsertDataItemReferences = exports2.removeDataItemReference = exports2.insertDataItemReference = exports2.isReferencedDataItem = exports2.queryReferencedDataItems = exports2.bulkRemoveDataItems = exports2.bulkSaveDataItems = exports2.bulkUpdateDataItems = exports2.bulkInsertDataItems = exports2.queryDistinctValues = exports2.countDataItems = exports2.aggregatePipelineDataItems = exports2.aggregateDataItems = exports2.truncateDataItems = exports2.removeDataItem = exports2.getDataItem = exports2.queryDataItems = exports2.saveDataItem = exports2.updateDataItem = exports2.bulkPatchDataItems = exports2.patchDataItem = exports2.insertDataItem = void 0;
|
|
123386
|
-
var metro_runtime_1 = require_cjs3();
|
|
123387
|
-
var ambassador_1 = require_ambassador_index();
|
|
123388
|
-
var metro_runtime_2 = require_cjs3();
|
|
123389
|
-
var _absOperation = { expression: "_expression" };
|
|
123390
|
-
var _accumulator = {
|
|
123391
|
-
avg: "_avg",
|
|
123392
|
-
min: "_accumulatorMin",
|
|
123393
|
-
max: "_accumulatorMax",
|
|
123394
|
-
sum: "_accumulatorSum",
|
|
123395
|
-
first: "_first",
|
|
123396
|
-
last: "_last",
|
|
123397
|
-
push: "_push"
|
|
123398
|
-
};
|
|
123399
|
-
var _accumulatorMax = { expression: "_expression" };
|
|
123400
|
-
var _accumulatorMin = { expression: "_expression" };
|
|
123401
|
-
var _accumulatorSum = { expression: "_expression" };
|
|
123402
|
-
var _addOperation = { expressions: "_expression" };
|
|
123403
|
-
var _aggregateDataItemsRequest = {};
|
|
123404
|
-
var _aggregateDataItemsResponse = {};
|
|
123405
|
-
var _aggregatePipelineDataItemsRequest = { pipeline: "_aggregationPipeline" };
|
|
123406
|
-
var _aggregatePipelineDataItemsResponse = {};
|
|
123407
|
-
var _aggregationPipeline = { stages: "_stage" };
|
|
123408
|
-
var _avg = { expression: "_expression" };
|
|
123409
|
-
var _bulkInsertDataItemReferencesRequest = {};
|
|
123410
|
-
var _bulkInsertDataItemReferencesResponse = {};
|
|
123411
|
-
var _bulkInsertDataItemsRequest = {};
|
|
123412
|
-
var _bulkInsertDataItemsResponse = {};
|
|
123413
|
-
var _bulkPatchDataItemsRequest = { patches: "_patch" };
|
|
123414
|
-
var _bulkPatchDataItemsResponse = {};
|
|
123415
|
-
var _bulkRemoveDataItemReferencesRequest = {};
|
|
123416
|
-
var _bulkRemoveDataItemReferencesResponse = {};
|
|
123417
|
-
var _bulkRemoveDataItemsRequest = {};
|
|
123418
|
-
var _bulkRemoveDataItemsResponse = {};
|
|
123419
|
-
var _bulkSaveDataItemsRequest = {};
|
|
123420
|
-
var _bulkSaveDataItemsResponse = {};
|
|
123421
|
-
var _bulkUpdateDataItemsRequest = {};
|
|
123422
|
-
var _bulkUpdateDataItemsResponse = {};
|
|
123423
|
-
var _ceilOperation = { expression: "_expression" };
|
|
123424
|
-
var _concatOperation = { expressions: "_expression" };
|
|
123425
|
-
var _countDataItemsRequest = {};
|
|
123426
|
-
var _countDataItemsResponse = {};
|
|
123427
|
-
var _divideOperation = {
|
|
123428
|
-
firstExpression: "_expression",
|
|
123429
|
-
secondExpression: "_expression"
|
|
123430
|
-
};
|
|
123431
|
-
var _expression = {
|
|
123432
|
-
numeric: "DOUBLE",
|
|
123433
|
-
add: "_addOperation",
|
|
123434
|
-
sum: "_sumOperation",
|
|
123435
|
-
subtract: "_subtractOperation",
|
|
123436
|
-
multiply: "_multiplyOperation",
|
|
123437
|
-
divide: "_divideOperation",
|
|
123438
|
-
abs: "_absOperation",
|
|
123439
|
-
mod: "_modOperation",
|
|
123440
|
-
floor: "_floorOperation",
|
|
123441
|
-
ceil: "_ceilOperation",
|
|
123442
|
-
concat: "_concatOperation",
|
|
123443
|
-
stringify: "_stringifyOperation",
|
|
123444
|
-
toLower: "_toLowerOperation",
|
|
123445
|
-
toUpper: "_toUpperOperation",
|
|
123446
|
-
substring: "_substringOperation",
|
|
123447
|
-
length: "_lengthOperation"
|
|
123448
|
-
};
|
|
123449
|
-
var _field = { reshape: "_reshape", projectNested: "_projectNested" };
|
|
123450
|
-
var _fieldModification = { incrementFieldOptions: "_incrementFieldOptions" };
|
|
123451
|
-
var _first = { expression: "_expression" };
|
|
123452
|
-
var _floorOperation = { expression: "_expression" };
|
|
123453
|
-
var _getDataItemRequest = {};
|
|
123454
|
-
var _getDataItemResponse = {};
|
|
123455
|
-
var _group = { groupIds: "_groupId", accumulators: "_accumulator" };
|
|
123456
|
-
var _groupId = { expression: "_expression" };
|
|
123457
|
-
var _incrementFieldOptions = { value: "DOUBLE" };
|
|
123458
|
-
var _insertDataItemReferenceRequest = {};
|
|
123459
|
-
var _insertDataItemReferenceResponse = {};
|
|
123460
|
-
var _insertDataItemRequest = {};
|
|
123461
|
-
var _insertDataItemResponse = {};
|
|
123462
|
-
var _isReferencedDataItemRequest = {};
|
|
123463
|
-
var _isReferencedDataItemResponse = {};
|
|
123464
|
-
var _last = { expression: "_expression" };
|
|
123465
|
-
var _lengthOperation = { expression: "_expression" };
|
|
123466
|
-
var _modOperation = {
|
|
123467
|
-
firstExpression: "_expression",
|
|
123468
|
-
secondExpression: "_expression"
|
|
123469
|
-
};
|
|
123470
|
-
var _multiplyOperation = { expressions: "_expression" };
|
|
123471
|
-
var _patch = { fieldModifications: "_fieldModification" };
|
|
123472
|
-
var _patchDataItemRequest = { patch: "_patch" };
|
|
123473
|
-
var _patchDataItemResponse = {};
|
|
123474
|
-
var _projection = { fields: "_field" };
|
|
123475
|
-
var _projectNested = { fields: "_field" };
|
|
123476
|
-
var _push = { expression: "_expression" };
|
|
123477
|
-
var _queryDataItemsRequest = {};
|
|
123478
|
-
var _queryDataItemsResponse = {};
|
|
123479
|
-
var _queryDistinctValuesRequest = {};
|
|
123480
|
-
var _queryDistinctValuesResponse = {};
|
|
123481
|
-
var _queryReferencedDataItemsRequest = {};
|
|
123482
|
-
var _queryReferencedDataItemsResponse = {};
|
|
123483
|
-
var _removeDataItemReferenceRequest = {};
|
|
123484
|
-
var _removeDataItemReferenceResponse = {};
|
|
123485
|
-
var _removeDataItemRequest = {};
|
|
123486
|
-
var _removeDataItemResponse = {};
|
|
123487
|
-
var _replaceDataItemReferencesRequest = {};
|
|
123488
|
-
var _replaceDataItemReferencesResponse = {};
|
|
123489
|
-
var _reshape = { expression: "_expression" };
|
|
123490
|
-
var _saveDataItemRequest = {};
|
|
123491
|
-
var _saveDataItemResponse = {};
|
|
123492
|
-
var _searchDataItemsRequest = {};
|
|
123493
|
-
var _searchDataItemsResponse = {};
|
|
123494
|
-
var _stage = { group: "_group", projection: "_projection" };
|
|
123495
|
-
var _stringifyOperation = { expression: "_expression" };
|
|
123496
|
-
var _substringOperation = {
|
|
123497
|
-
expression: "_expression",
|
|
123498
|
-
startExpression: "_expression",
|
|
123499
|
-
lengthExpression: "_expression"
|
|
123500
|
-
};
|
|
123501
|
-
var _subtractOperation = {
|
|
123502
|
-
firstExpression: "_expression",
|
|
123503
|
-
secondExpression: "_expression"
|
|
123504
|
-
};
|
|
123505
|
-
var _sumOperation = { expressions: "_expression" };
|
|
123506
|
-
var _toLowerOperation = { expression: "_expression" };
|
|
123507
|
-
var _toUpperOperation = { expression: "_expression" };
|
|
123508
|
-
var _truncateDataItemsRequest = {};
|
|
123509
|
-
var _truncateDataItemsResponse = {};
|
|
123510
|
-
var _updateDataItemRequest = {};
|
|
123511
|
-
var _updateDataItemResponse = {};
|
|
123512
|
-
function resolveComWixpressCloudDataApiDataDataItemServiceUrl(opts) {
|
|
123513
|
-
var domainToMappings = {
|
|
123514
|
-
"api._api_base_domain_": [
|
|
123515
|
-
{
|
|
123516
|
-
srcPath: "/cloud-data",
|
|
123517
|
-
destPath: ""
|
|
123518
|
-
}
|
|
123519
|
-
],
|
|
123520
|
-
"code._base_domain_": [
|
|
123521
|
-
{
|
|
123522
|
-
srcPath: "/_api/cloud-data/v1/data-settings",
|
|
123523
|
-
destPath: "/v1/data-settings"
|
|
123524
|
-
},
|
|
123525
|
-
{
|
|
123526
|
-
srcPath: "/_api/cloud-data/v1/schemas",
|
|
123527
|
-
destPath: "/v1/schemas"
|
|
123528
|
-
},
|
|
123529
|
-
{
|
|
123530
|
-
srcPath: "/_api/cloud-data/v1/connector",
|
|
123531
|
-
destPath: "/v1/connector"
|
|
123532
|
-
},
|
|
123533
|
-
{
|
|
123534
|
-
srcPath: "/_api/data/v1/data-settings",
|
|
123535
|
-
destPath: "/v1/data-settings"
|
|
123536
|
-
},
|
|
123537
|
-
{
|
|
123538
|
-
srcPath: "/_api/data/v1/schemas",
|
|
123539
|
-
destPath: "/v1/schemas"
|
|
123540
|
-
},
|
|
123541
|
-
{
|
|
123542
|
-
srcPath: "/_api/data/v1/connector",
|
|
123543
|
-
destPath: "/v1/connector"
|
|
123544
|
-
},
|
|
123545
|
-
{
|
|
123546
|
-
srcPath: "/_api/cloud-data/v1/wix-data",
|
|
123547
|
-
destPath: "/v1/wix-data"
|
|
123548
|
-
}
|
|
123549
|
-
],
|
|
123550
|
-
"cloud-data.wix-code.com": [
|
|
123551
|
-
{
|
|
123552
|
-
srcPath: "",
|
|
123553
|
-
destPath: ""
|
|
123554
|
-
}
|
|
123555
|
-
],
|
|
123556
|
-
_: [
|
|
123557
|
-
{
|
|
123558
|
-
srcPath: "/_api/cloud-data",
|
|
123559
|
-
destPath: ""
|
|
123560
|
-
}
|
|
123561
|
-
],
|
|
123562
|
-
"www._base_domain_": [
|
|
123563
|
-
{
|
|
123564
|
-
srcPath: "/_api/cloud-data",
|
|
123565
|
-
destPath: ""
|
|
123566
|
-
},
|
|
123567
|
-
{
|
|
123568
|
-
srcPath: "/_api/data",
|
|
123569
|
-
destPath: ""
|
|
123570
|
-
},
|
|
123571
|
-
{
|
|
123572
|
-
srcPath: "/_api/cloud-data",
|
|
123573
|
-
destPath: ""
|
|
123574
|
-
}
|
|
123575
|
-
],
|
|
123576
|
-
"dev._base_domain_": [
|
|
123577
|
-
{
|
|
123578
|
-
srcPath: "/_api/cloud-data",
|
|
123579
|
-
destPath: ""
|
|
123580
|
-
}
|
|
123581
|
-
],
|
|
123582
|
-
"bo._base_domain_": [
|
|
123583
|
-
{
|
|
123584
|
-
srcPath: "/_api/cloud-data/v1",
|
|
123585
|
-
destPath: "/v1"
|
|
123586
|
-
},
|
|
123587
|
-
{
|
|
123588
|
-
srcPath: "/_api/cloud-data/v2",
|
|
123589
|
-
destPath: "/v2"
|
|
123590
|
-
}
|
|
123591
|
-
],
|
|
123592
|
-
"wixbo.ai": [
|
|
123593
|
-
{
|
|
123594
|
-
srcPath: "/_api/cloud-data/v1",
|
|
123595
|
-
destPath: "/v1"
|
|
123596
|
-
},
|
|
123597
|
-
{
|
|
123598
|
-
srcPath: "/_api/cloud-data/v2",
|
|
123599
|
-
destPath: "/v2"
|
|
123600
|
-
}
|
|
123601
|
-
],
|
|
123602
|
-
"wix-bo.com": [
|
|
123603
|
-
{
|
|
123604
|
-
srcPath: "/_api/cloud-data/v1",
|
|
123605
|
-
destPath: "/v1"
|
|
123606
|
-
},
|
|
123607
|
-
{
|
|
123608
|
-
srcPath: "/_api/cloud-data/v2",
|
|
123609
|
-
destPath: "/v2"
|
|
123610
|
-
}
|
|
123611
|
-
],
|
|
123612
|
-
"manage._base_domain_": [
|
|
123613
|
-
{
|
|
123614
|
-
srcPath: "/_api/cloud-data",
|
|
123615
|
-
destPath: ""
|
|
123616
|
-
},
|
|
123617
|
-
{
|
|
123618
|
-
srcPath: "/_api/data",
|
|
123619
|
-
destPath: ""
|
|
123620
|
-
},
|
|
123621
|
-
{
|
|
123622
|
-
srcPath: "/_api/cloud-data",
|
|
123623
|
-
destPath: ""
|
|
123624
|
-
}
|
|
123625
|
-
],
|
|
123626
|
-
"editor._base_domain_": [
|
|
123627
|
-
{
|
|
123628
|
-
srcPath: "/_api/cloud-data/v1/schemas",
|
|
123629
|
-
destPath: "/v1/schemas"
|
|
123630
|
-
},
|
|
123631
|
-
{
|
|
123632
|
-
srcPath: "/_api/cloud-data/dbs/tasks",
|
|
123633
|
-
destPath: "/dbs/tasks"
|
|
123634
|
-
},
|
|
123635
|
-
{
|
|
123636
|
-
srcPath: "/_api/data/v1/schemas",
|
|
123637
|
-
destPath: "/v1/schemas"
|
|
123638
|
-
},
|
|
123639
|
-
{
|
|
123640
|
-
srcPath: "/_api/data/dbs/tasks",
|
|
123641
|
-
destPath: "/dbs/tasks"
|
|
123642
|
-
},
|
|
123643
|
-
{
|
|
123644
|
-
srcPath: "/_api/cloud-data/v1/wix-data",
|
|
123645
|
-
destPath: "/v1/wix-data"
|
|
123646
|
-
},
|
|
123647
|
-
{
|
|
123648
|
-
srcPath: "/_api/cloud-data/v1/data-settings",
|
|
123649
|
-
destPath: "/v1/data-settings"
|
|
123650
|
-
},
|
|
123651
|
-
{
|
|
123652
|
-
srcPath: "/_api/data/v2/indexes",
|
|
123653
|
-
destPath: "/v2/indexes"
|
|
123654
|
-
},
|
|
123655
|
-
{
|
|
123656
|
-
srcPath: "/_api/cloud-data/v1/external-database-connections",
|
|
123657
|
-
destPath: "/v1/external-database-connections"
|
|
123658
|
-
},
|
|
123659
|
-
{
|
|
123660
|
-
srcPath: "/_api/data/v1/data-collection-sharing",
|
|
123661
|
-
destPath: "/v1/data-collection-sharing"
|
|
123662
|
-
},
|
|
123663
|
-
{
|
|
123664
|
-
srcPath: "/_api/cloud-data/v2/collections",
|
|
123665
|
-
destPath: "/v2/collections"
|
|
123666
|
-
},
|
|
123667
|
-
{
|
|
123668
|
-
srcPath: "/_api/cloud-data/v2/bulk",
|
|
123669
|
-
destPath: "/v2/bulk"
|
|
123670
|
-
},
|
|
123671
|
-
{
|
|
123672
|
-
srcPath: "/_api/cloud-data/v2/items",
|
|
123673
|
-
destPath: "/v2/items"
|
|
123674
|
-
},
|
|
123675
|
-
{
|
|
123676
|
-
srcPath: "/_api/cloud-data/v2/dbs/tasks",
|
|
123677
|
-
destPath: "/v2/dbs/tasks"
|
|
123678
|
-
}
|
|
123679
|
-
],
|
|
123680
|
-
"blocks._base_domain_": [
|
|
123681
|
-
{
|
|
123682
|
-
srcPath: "/_api/cloud-data/v1/schemas",
|
|
123683
|
-
destPath: "/v1/schemas"
|
|
123684
|
-
},
|
|
123685
|
-
{
|
|
123686
|
-
srcPath: "/_api/cloud-data/dbs/tasks",
|
|
123687
|
-
destPath: "/dbs/tasks"
|
|
123688
|
-
},
|
|
123689
|
-
{
|
|
123690
|
-
srcPath: "/_api/data/v1/schemas",
|
|
123691
|
-
destPath: "/v1/schemas"
|
|
123692
|
-
},
|
|
123693
|
-
{
|
|
123694
|
-
srcPath: "/_api/data/dbs/tasks",
|
|
123695
|
-
destPath: "/dbs/tasks"
|
|
123696
|
-
},
|
|
123697
|
-
{
|
|
123698
|
-
srcPath: "/_api/cloud-data/v1/wix-data",
|
|
123699
|
-
destPath: "/v1/wix-data"
|
|
123700
|
-
},
|
|
123701
|
-
{
|
|
123702
|
-
srcPath: "/_api/cloud-data/v1/data-settings",
|
|
123703
|
-
destPath: "/v1/data-settings"
|
|
123704
|
-
},
|
|
123705
|
-
{
|
|
123706
|
-
srcPath: "/_api/data/v2/indexes",
|
|
123707
|
-
destPath: "/v2/indexes"
|
|
123708
|
-
},
|
|
123709
|
-
{
|
|
123710
|
-
srcPath: "/_api/cloud-data/v1/external-database-connections",
|
|
123711
|
-
destPath: "/v1/external-database-connections"
|
|
123712
|
-
},
|
|
123713
|
-
{
|
|
123714
|
-
srcPath: "/_api/data/v1/data-collection-sharing",
|
|
123715
|
-
destPath: "/v1/data-collection-sharing"
|
|
123716
|
-
},
|
|
123717
|
-
{
|
|
123718
|
-
srcPath: "/_api/cloud-data/v2/collections",
|
|
123719
|
-
destPath: "/v2/collections"
|
|
123720
|
-
},
|
|
123721
|
-
{
|
|
123722
|
-
srcPath: "/_api/cloud-data/v2/bulk",
|
|
123723
|
-
destPath: "/v2/bulk"
|
|
123724
|
-
},
|
|
123725
|
-
{
|
|
123726
|
-
srcPath: "/_api/cloud-data/v2/items",
|
|
123727
|
-
destPath: "/v2/items"
|
|
123728
|
-
},
|
|
123729
|
-
{
|
|
123730
|
-
srcPath: "/_api/cloud-data/v2/dbs/tasks",
|
|
123731
|
-
destPath: "/v2/dbs/tasks"
|
|
123732
|
-
}
|
|
123733
|
-
],
|
|
123734
|
-
"create.editorx": [
|
|
123735
|
-
{
|
|
123736
|
-
srcPath: "/_api/cloud-data/v1/schemas",
|
|
123737
|
-
destPath: "/v1/schemas"
|
|
123738
|
-
},
|
|
123739
|
-
{
|
|
123740
|
-
srcPath: "/_api/cloud-data/dbs/tasks",
|
|
123741
|
-
destPath: "/dbs/tasks"
|
|
123742
|
-
},
|
|
123743
|
-
{
|
|
123744
|
-
srcPath: "/_api/data/v1/schemas",
|
|
123745
|
-
destPath: "/v1/schemas"
|
|
123746
|
-
},
|
|
123747
|
-
{
|
|
123748
|
-
srcPath: "/_api/data/dbs/tasks",
|
|
123749
|
-
destPath: "/dbs/tasks"
|
|
123750
|
-
},
|
|
123751
|
-
{
|
|
123752
|
-
srcPath: "/_api/cloud-data/v1/wix-data",
|
|
123753
|
-
destPath: "/v1/wix-data"
|
|
123754
|
-
},
|
|
123755
|
-
{
|
|
123756
|
-
srcPath: "/_api/cloud-data/v1/data-settings",
|
|
123757
|
-
destPath: "/v1/data-settings"
|
|
123758
|
-
},
|
|
123759
|
-
{
|
|
123760
|
-
srcPath: "/_api/data/v2/indexes",
|
|
123761
|
-
destPath: "/v2/indexes"
|
|
123762
|
-
},
|
|
123763
|
-
{
|
|
123764
|
-
srcPath: "/_api/cloud-data/v1/external-database-connections",
|
|
123765
|
-
destPath: "/v1/external-database-connections"
|
|
123766
|
-
},
|
|
123767
|
-
{
|
|
123768
|
-
srcPath: "/_api/data/v1/data-collection-sharing",
|
|
123769
|
-
destPath: "/v1/data-collection-sharing"
|
|
123770
|
-
},
|
|
123771
|
-
{
|
|
123772
|
-
srcPath: "/_api/cloud-data/v2/collections",
|
|
123773
|
-
destPath: "/v2/collections"
|
|
123774
|
-
},
|
|
123775
|
-
{
|
|
123776
|
-
srcPath: "/_api/cloud-data/v2/bulk",
|
|
123777
|
-
destPath: "/v2/bulk"
|
|
123778
|
-
},
|
|
123779
|
-
{
|
|
123780
|
-
srcPath: "/_api/cloud-data/v2/items",
|
|
123781
|
-
destPath: "/v2/items"
|
|
123782
|
-
},
|
|
123783
|
-
{
|
|
123784
|
-
srcPath: "/_api/cloud-data/v2/dbs/tasks",
|
|
123785
|
-
destPath: "/v2/dbs/tasks"
|
|
123786
|
-
}
|
|
123787
|
-
],
|
|
123788
|
-
"www.wixapis.com": [
|
|
123789
|
-
{
|
|
123790
|
-
srcPath: "/wix-data/v1/collections",
|
|
123791
|
-
destPath: "/v1/wix-data/collections"
|
|
123792
|
-
},
|
|
123793
|
-
{
|
|
123794
|
-
srcPath: "/wix-data/v1/external-database-connections",
|
|
123795
|
-
destPath: "/v1/external-database-connections"
|
|
123796
|
-
},
|
|
123797
|
-
{
|
|
123798
|
-
srcPath: "/wix-data/v2/indexes",
|
|
123799
|
-
destPath: "/v2/indexes"
|
|
123800
|
-
},
|
|
123801
|
-
{
|
|
123802
|
-
srcPath: "/wix-data/v1/items",
|
|
123803
|
-
destPath: "/v1/items"
|
|
123804
|
-
},
|
|
123805
|
-
{
|
|
123806
|
-
srcPath: "/wix-data/v1/bulk",
|
|
123807
|
-
destPath: "/v1/bulk"
|
|
123808
|
-
},
|
|
123809
|
-
{
|
|
123810
|
-
srcPath: "/wix-data/v1/external-databases",
|
|
123811
|
-
destPath: "/v1/external-databases"
|
|
123812
|
-
},
|
|
123813
|
-
{
|
|
123814
|
-
srcPath: "/wix-data/v2",
|
|
123815
|
-
destPath: "/v2"
|
|
123816
|
-
},
|
|
123817
|
-
{
|
|
123818
|
-
srcPath: "/data/v2/collections",
|
|
123819
|
-
destPath: "/v2/collections"
|
|
123820
|
-
},
|
|
123821
|
-
{
|
|
123822
|
-
srcPath: "/data/v2/items",
|
|
123823
|
-
destPath: "/v2/items"
|
|
123824
|
-
},
|
|
123825
|
-
{
|
|
123826
|
-
srcPath: "/data/v2/bulk/items",
|
|
123827
|
-
destPath: "/v2/bulk/items"
|
|
123828
|
-
},
|
|
123829
|
-
{
|
|
123830
|
-
srcPath: "/data/v2/indexes",
|
|
123831
|
-
destPath: "/v2/indexes"
|
|
123832
|
-
},
|
|
123833
|
-
{
|
|
123834
|
-
srcPath: "/data/v1/external-database-connections",
|
|
123835
|
-
destPath: "/v1/external-database-connections"
|
|
123836
|
-
},
|
|
123837
|
-
{
|
|
123838
|
-
srcPath: "/data/v1/data-collection-sharing",
|
|
123839
|
-
destPath: "/v1/data-collection-sharing"
|
|
123840
|
-
}
|
|
123841
|
-
],
|
|
123842
|
-
"www.wixgateway.com": [
|
|
123843
|
-
{
|
|
123844
|
-
srcPath: "/wix-data/v1/items",
|
|
123845
|
-
destPath: "/v1/items"
|
|
123846
|
-
},
|
|
123847
|
-
{
|
|
123848
|
-
srcPath: "/wix-data/v1/bulk",
|
|
123849
|
-
destPath: "/v1/bulk"
|
|
123850
|
-
}
|
|
123851
|
-
],
|
|
123852
|
-
"*.dev.wix-code.com": [
|
|
123853
|
-
{
|
|
123854
|
-
srcPath: "/_api/cloud-data/v2",
|
|
123855
|
-
destPath: "/v2"
|
|
123856
|
-
},
|
|
123857
|
-
{
|
|
123858
|
-
srcPath: "/_api/cloud-data/v1/external-database-connections",
|
|
123859
|
-
destPath: "/v1/external-database-connections"
|
|
123860
|
-
},
|
|
123861
|
-
{
|
|
123862
|
-
srcPath: "/data/v1/data-collection-sharing",
|
|
123863
|
-
destPath: "/v1/data-collection-sharing"
|
|
123864
|
-
}
|
|
123865
|
-
]
|
|
123866
|
-
};
|
|
123867
|
-
return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
123868
|
-
}
|
|
123869
|
-
function insertDataItem(payload) {
|
|
123870
|
-
var _a2 = (0, ambassador_1.serializer)(_insertDataItemRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
123871
|
-
var fromRes = (0, ambassador_1.serializer)(_insertDataItemResponse, {}).fromJSON;
|
|
123872
|
-
function __insertDataItem(_a3) {
|
|
123873
|
-
var host = _a3.host;
|
|
123874
|
-
var serializedData = toReq(payload);
|
|
123875
|
-
var metadata = {
|
|
123876
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
123877
|
-
method: "POST",
|
|
123878
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.InsertDataItem",
|
|
123879
|
-
migrationOptions: {
|
|
123880
|
-
optInTransformResponse: true
|
|
123881
|
-
},
|
|
123882
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
123883
|
-
protoPath: "/v2/items",
|
|
123884
|
-
data: serializedData,
|
|
123885
|
-
host
|
|
123886
|
-
}),
|
|
123887
|
-
data: serializedData,
|
|
123888
|
-
transformResponse: fromRes
|
|
123889
|
-
};
|
|
123890
|
-
return metadata;
|
|
123891
|
-
}
|
|
123892
|
-
__insertDataItem.fromReq = fromReq;
|
|
123893
|
-
__insertDataItem.__isAmbassador = true;
|
|
123894
|
-
return __insertDataItem;
|
|
123895
|
-
}
|
|
123896
|
-
exports2.insertDataItem = insertDataItem;
|
|
123897
|
-
function patchDataItem(payload) {
|
|
123898
|
-
var _a2 = (0, ambassador_1.serializer)(_patchDataItemRequest, { _fieldModification, _incrementFieldOptions, _patch }), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
123899
|
-
var fromRes = (0, ambassador_1.serializer)(_patchDataItemResponse, {}).fromJSON;
|
|
123900
|
-
function __patchDataItem(_a3) {
|
|
123901
|
-
var host = _a3.host;
|
|
123902
|
-
var serializedData = toReq(payload);
|
|
123903
|
-
var metadata = {
|
|
123904
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
123905
|
-
method: "PATCH",
|
|
123906
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.PatchDataItem",
|
|
123907
|
-
migrationOptions: {
|
|
123908
|
-
optInTransformResponse: true
|
|
123909
|
-
},
|
|
123910
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
123911
|
-
protoPath: "/v2/items/{patch.dataItemId}",
|
|
123912
|
-
data: serializedData,
|
|
123913
|
-
host
|
|
123914
|
-
}),
|
|
123915
|
-
data: serializedData,
|
|
123916
|
-
transformResponse: fromRes
|
|
123917
|
-
};
|
|
123918
|
-
return metadata;
|
|
123919
|
-
}
|
|
123920
|
-
__patchDataItem.fromReq = fromReq;
|
|
123921
|
-
__patchDataItem.__isAmbassador = true;
|
|
123922
|
-
return __patchDataItem;
|
|
123923
|
-
}
|
|
123924
|
-
exports2.patchDataItem = patchDataItem;
|
|
123925
|
-
function bulkPatchDataItems(payload) {
|
|
123926
|
-
var _a2 = (0, ambassador_1.serializer)(_bulkPatchDataItemsRequest, { _fieldModification, _incrementFieldOptions, _patch }), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
123927
|
-
var fromRes = (0, ambassador_1.serializer)(_bulkPatchDataItemsResponse, {}).fromJSON;
|
|
123928
|
-
function __bulkPatchDataItems(_a3) {
|
|
123929
|
-
var host = _a3.host;
|
|
123930
|
-
var serializedData = toReq(payload);
|
|
123931
|
-
var metadata = {
|
|
123932
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
123933
|
-
method: "POST",
|
|
123934
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.BulkPatchDataItems",
|
|
123935
|
-
migrationOptions: {
|
|
123936
|
-
optInTransformResponse: true
|
|
123937
|
-
},
|
|
123938
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
123939
|
-
protoPath: "/v2/bulk/items/patch",
|
|
123940
|
-
data: serializedData,
|
|
123941
|
-
host
|
|
123942
|
-
}),
|
|
123943
|
-
data: serializedData,
|
|
123944
|
-
transformResponse: fromRes
|
|
123945
|
-
};
|
|
123946
|
-
return metadata;
|
|
123947
|
-
}
|
|
123948
|
-
__bulkPatchDataItems.fromReq = fromReq;
|
|
123949
|
-
__bulkPatchDataItems.__isAmbassador = true;
|
|
123950
|
-
return __bulkPatchDataItems;
|
|
123951
|
-
}
|
|
123952
|
-
exports2.bulkPatchDataItems = bulkPatchDataItems;
|
|
123953
|
-
function updateDataItem(payload) {
|
|
123954
|
-
var _a2 = (0, ambassador_1.serializer)(_updateDataItemRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
123955
|
-
var fromRes = (0, ambassador_1.serializer)(_updateDataItemResponse, {}).fromJSON;
|
|
123956
|
-
function __updateDataItem(_a3) {
|
|
123957
|
-
var host = _a3.host;
|
|
123958
|
-
var serializedData = toReq(payload);
|
|
123959
|
-
var metadata = {
|
|
123960
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
123961
|
-
method: "PUT",
|
|
123962
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.UpdateDataItem",
|
|
123963
|
-
migrationOptions: {
|
|
123964
|
-
optInTransformResponse: true
|
|
123965
|
-
},
|
|
123966
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
123967
|
-
protoPath: "/v2/items/{dataItem.id}",
|
|
123968
|
-
data: serializedData,
|
|
123969
|
-
host
|
|
123970
|
-
}),
|
|
123971
|
-
data: serializedData,
|
|
123972
|
-
transformResponse: fromRes
|
|
123973
|
-
};
|
|
123974
|
-
return metadata;
|
|
123975
|
-
}
|
|
123976
|
-
__updateDataItem.fromReq = fromReq;
|
|
123977
|
-
__updateDataItem.__isAmbassador = true;
|
|
123978
|
-
return __updateDataItem;
|
|
123979
|
-
}
|
|
123980
|
-
exports2.updateDataItem = updateDataItem;
|
|
123981
|
-
function saveDataItem(payload) {
|
|
123982
|
-
var _a2 = (0, ambassador_1.serializer)(_saveDataItemRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
123983
|
-
var fromRes = (0, ambassador_1.serializer)(_saveDataItemResponse, {}).fromJSON;
|
|
123984
|
-
function __saveDataItem(_a3) {
|
|
123985
|
-
var host = _a3.host;
|
|
123986
|
-
var serializedData = toReq(payload);
|
|
123987
|
-
var metadata = {
|
|
123988
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
123989
|
-
method: "POST",
|
|
123990
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.SaveDataItem",
|
|
123991
|
-
migrationOptions: {
|
|
123992
|
-
optInTransformResponse: true
|
|
123993
|
-
},
|
|
123994
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
123995
|
-
protoPath: "/v2/items/save",
|
|
123996
|
-
data: serializedData,
|
|
123997
|
-
host
|
|
123998
|
-
}),
|
|
123999
|
-
data: serializedData,
|
|
124000
|
-
transformResponse: fromRes
|
|
124001
|
-
};
|
|
124002
|
-
return metadata;
|
|
124003
|
-
}
|
|
124004
|
-
__saveDataItem.fromReq = fromReq;
|
|
124005
|
-
__saveDataItem.__isAmbassador = true;
|
|
124006
|
-
return __saveDataItem;
|
|
124007
|
-
}
|
|
124008
|
-
exports2.saveDataItem = saveDataItem;
|
|
124009
|
-
function queryDataItems(payload) {
|
|
124010
|
-
var _a2 = (0, ambassador_1.serializer)(_queryDataItemsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124011
|
-
var fromRes = (0, ambassador_1.serializer)(_queryDataItemsResponse, {}).fromJSON;
|
|
124012
|
-
function __queryDataItems(_a3) {
|
|
124013
|
-
var host = _a3.host;
|
|
124014
|
-
var serializedData = toReq(payload);
|
|
124015
|
-
var metadata = {
|
|
124016
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124017
|
-
method: "GET",
|
|
124018
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.QueryDataItems",
|
|
124019
|
-
migrationOptions: {
|
|
124020
|
-
optInTransformResponse: true
|
|
124021
|
-
},
|
|
124022
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124023
|
-
protoPath: "/v2/items/query",
|
|
124024
|
-
data: serializedData,
|
|
124025
|
-
host
|
|
124026
|
-
}),
|
|
124027
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData, true),
|
|
124028
|
-
transformResponse: fromRes,
|
|
124029
|
-
fallback: [
|
|
124030
|
-
{
|
|
124031
|
-
method: "POST",
|
|
124032
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124033
|
-
protoPath: "/v2/items/query",
|
|
124034
|
-
data: serializedData,
|
|
124035
|
-
host
|
|
124036
|
-
}),
|
|
124037
|
-
data: serializedData
|
|
124038
|
-
}
|
|
124039
|
-
]
|
|
124040
|
-
};
|
|
124041
|
-
return metadata;
|
|
124042
|
-
}
|
|
124043
|
-
__queryDataItems.fromReq = fromReq;
|
|
124044
|
-
__queryDataItems.__isAmbassador = true;
|
|
124045
|
-
return __queryDataItems;
|
|
124046
|
-
}
|
|
124047
|
-
exports2.queryDataItems = queryDataItems;
|
|
124048
|
-
function getDataItem(payload) {
|
|
124049
|
-
var _a2 = (0, ambassador_1.serializer)(_getDataItemRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124050
|
-
var fromRes = (0, ambassador_1.serializer)(_getDataItemResponse, {}).fromJSON;
|
|
124051
|
-
function __getDataItem(_a3) {
|
|
124052
|
-
var host = _a3.host;
|
|
124053
|
-
var serializedData = toReq(payload);
|
|
124054
|
-
var metadata = {
|
|
124055
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124056
|
-
method: "GET",
|
|
124057
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.GetDataItem",
|
|
124058
|
-
migrationOptions: {
|
|
124059
|
-
optInTransformResponse: true
|
|
124060
|
-
},
|
|
124061
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124062
|
-
protoPath: "/v2/items/{dataItemId}",
|
|
124063
|
-
data: serializedData,
|
|
124064
|
-
host
|
|
124065
|
-
}),
|
|
124066
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData, true),
|
|
124067
|
-
transformResponse: fromRes
|
|
124068
|
-
};
|
|
124069
|
-
return metadata;
|
|
124070
|
-
}
|
|
124071
|
-
__getDataItem.fromReq = fromReq;
|
|
124072
|
-
__getDataItem.__isAmbassador = true;
|
|
124073
|
-
return __getDataItem;
|
|
124074
|
-
}
|
|
124075
|
-
exports2.getDataItem = getDataItem;
|
|
124076
|
-
function removeDataItem(payload) {
|
|
124077
|
-
var _a2 = (0, ambassador_1.serializer)(_removeDataItemRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124078
|
-
var fromRes = (0, ambassador_1.serializer)(_removeDataItemResponse, {}).fromJSON;
|
|
124079
|
-
function __removeDataItem(_a3) {
|
|
124080
|
-
var host = _a3.host;
|
|
124081
|
-
var serializedData = toReq(payload);
|
|
124082
|
-
var metadata = {
|
|
124083
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124084
|
-
method: "DELETE",
|
|
124085
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.RemoveDataItem",
|
|
124086
|
-
migrationOptions: {
|
|
124087
|
-
optInTransformResponse: true
|
|
124088
|
-
},
|
|
124089
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124090
|
-
protoPath: "/v2/items/{dataItemId}",
|
|
124091
|
-
data: serializedData,
|
|
124092
|
-
host
|
|
124093
|
-
}),
|
|
124094
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
|
|
124095
|
-
transformResponse: fromRes
|
|
124096
|
-
};
|
|
124097
|
-
return metadata;
|
|
124098
|
-
}
|
|
124099
|
-
__removeDataItem.fromReq = fromReq;
|
|
124100
|
-
__removeDataItem.__isAmbassador = true;
|
|
124101
|
-
return __removeDataItem;
|
|
124102
|
-
}
|
|
124103
|
-
exports2.removeDataItem = removeDataItem;
|
|
124104
|
-
function truncateDataItems(payload) {
|
|
124105
|
-
var _a2 = (0, ambassador_1.serializer)(_truncateDataItemsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124106
|
-
var fromRes = (0, ambassador_1.serializer)(_truncateDataItemsResponse, {}).fromJSON;
|
|
124107
|
-
function __truncateDataItems(_a3) {
|
|
124108
|
-
var host = _a3.host;
|
|
124109
|
-
var serializedData = toReq(payload);
|
|
124110
|
-
var metadata = {
|
|
124111
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124112
|
-
method: "POST",
|
|
124113
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.TruncateDataItems",
|
|
124114
|
-
migrationOptions: {
|
|
124115
|
-
optInTransformResponse: true
|
|
124116
|
-
},
|
|
124117
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124118
|
-
protoPath: "/v2/items/truncate",
|
|
124119
|
-
data: serializedData,
|
|
124120
|
-
host
|
|
124121
|
-
}),
|
|
124122
|
-
data: serializedData,
|
|
124123
|
-
transformResponse: fromRes
|
|
124124
|
-
};
|
|
124125
|
-
return metadata;
|
|
124126
|
-
}
|
|
124127
|
-
__truncateDataItems.fromReq = fromReq;
|
|
124128
|
-
__truncateDataItems.__isAmbassador = true;
|
|
124129
|
-
return __truncateDataItems;
|
|
124130
|
-
}
|
|
124131
|
-
exports2.truncateDataItems = truncateDataItems;
|
|
124132
|
-
function aggregateDataItems(payload) {
|
|
124133
|
-
var _a2 = (0, ambassador_1.serializer)(_aggregateDataItemsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124134
|
-
var fromRes = (0, ambassador_1.serializer)(_aggregateDataItemsResponse, {}).fromJSON;
|
|
124135
|
-
function __aggregateDataItems(_a3) {
|
|
124136
|
-
var host = _a3.host;
|
|
124137
|
-
var serializedData = toReq(payload);
|
|
124138
|
-
var metadata = {
|
|
124139
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124140
|
-
method: "GET",
|
|
124141
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.AggregateDataItems",
|
|
124142
|
-
migrationOptions: {
|
|
124143
|
-
optInTransformResponse: true
|
|
124144
|
-
},
|
|
124145
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124146
|
-
protoPath: "/v2/items/aggregate",
|
|
124147
|
-
data: serializedData,
|
|
124148
|
-
host
|
|
124149
|
-
}),
|
|
124150
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData, true),
|
|
124151
|
-
transformResponse: fromRes,
|
|
124152
|
-
fallback: [
|
|
124153
|
-
{
|
|
124154
|
-
method: "POST",
|
|
124155
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124156
|
-
protoPath: "/v2/items/aggregate",
|
|
124157
|
-
data: serializedData,
|
|
124158
|
-
host
|
|
124159
|
-
}),
|
|
124160
|
-
data: serializedData
|
|
124161
|
-
}
|
|
124162
|
-
]
|
|
124163
|
-
};
|
|
124164
|
-
return metadata;
|
|
124165
|
-
}
|
|
124166
|
-
__aggregateDataItems.fromReq = fromReq;
|
|
124167
|
-
__aggregateDataItems.__isAmbassador = true;
|
|
124168
|
-
return __aggregateDataItems;
|
|
124169
|
-
}
|
|
124170
|
-
exports2.aggregateDataItems = aggregateDataItems;
|
|
124171
|
-
function aggregatePipelineDataItems(payload) {
|
|
124172
|
-
var _a2 = (0, ambassador_1.serializer)(_aggregatePipelineDataItemsRequest, {
|
|
124173
|
-
_absOperation,
|
|
124174
|
-
_accumulator,
|
|
124175
|
-
_accumulatorMax,
|
|
124176
|
-
_accumulatorMin,
|
|
124177
|
-
_accumulatorSum,
|
|
124178
|
-
_addOperation,
|
|
124179
|
-
_aggregationPipeline,
|
|
124180
|
-
_avg,
|
|
124181
|
-
_ceilOperation,
|
|
124182
|
-
_concatOperation,
|
|
124183
|
-
_divideOperation,
|
|
124184
|
-
_expression,
|
|
124185
|
-
_field,
|
|
124186
|
-
_first,
|
|
124187
|
-
_floorOperation,
|
|
124188
|
-
_group,
|
|
124189
|
-
_groupId,
|
|
124190
|
-
_last,
|
|
124191
|
-
_lengthOperation,
|
|
124192
|
-
_modOperation,
|
|
124193
|
-
_multiplyOperation,
|
|
124194
|
-
_projectNested,
|
|
124195
|
-
_projection,
|
|
124196
|
-
_push,
|
|
124197
|
-
_reshape,
|
|
124198
|
-
_stage,
|
|
124199
|
-
_stringifyOperation,
|
|
124200
|
-
_substringOperation,
|
|
124201
|
-
_subtractOperation,
|
|
124202
|
-
_sumOperation,
|
|
124203
|
-
_toLowerOperation,
|
|
124204
|
-
_toUpperOperation
|
|
124205
|
-
}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124206
|
-
var fromRes = (0, ambassador_1.serializer)(_aggregatePipelineDataItemsResponse, {}).fromJSON;
|
|
124207
|
-
function __aggregatePipelineDataItems(_a3) {
|
|
124208
|
-
var host = _a3.host;
|
|
124209
|
-
var serializedData = toReq(payload);
|
|
124210
|
-
var metadata = {
|
|
124211
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124212
|
-
method: "GET",
|
|
124213
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.AggregatePipelineDataItems",
|
|
124214
|
-
migrationOptions: {
|
|
124215
|
-
optInTransformResponse: true
|
|
124216
|
-
},
|
|
124217
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124218
|
-
protoPath: "/v2/items/aggregate-pipeline",
|
|
124219
|
-
data: serializedData,
|
|
124220
|
-
host
|
|
124221
|
-
}),
|
|
124222
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData, true),
|
|
124223
|
-
transformResponse: fromRes,
|
|
124224
|
-
fallback: [
|
|
124225
|
-
{
|
|
124226
|
-
method: "POST",
|
|
124227
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124228
|
-
protoPath: "/v2/items/aggregate-pipeline",
|
|
124229
|
-
data: serializedData,
|
|
124230
|
-
host
|
|
124231
|
-
}),
|
|
124232
|
-
data: serializedData
|
|
124233
|
-
}
|
|
124234
|
-
]
|
|
124235
|
-
};
|
|
124236
|
-
return metadata;
|
|
124237
|
-
}
|
|
124238
|
-
__aggregatePipelineDataItems.fromReq = fromReq;
|
|
124239
|
-
__aggregatePipelineDataItems.__isAmbassador = true;
|
|
124240
|
-
return __aggregatePipelineDataItems;
|
|
124241
|
-
}
|
|
124242
|
-
exports2.aggregatePipelineDataItems = aggregatePipelineDataItems;
|
|
124243
|
-
function countDataItems(payload) {
|
|
124244
|
-
var _a2 = (0, ambassador_1.serializer)(_countDataItemsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124245
|
-
var fromRes = (0, ambassador_1.serializer)(_countDataItemsResponse, {}).fromJSON;
|
|
124246
|
-
function __countDataItems(_a3) {
|
|
124247
|
-
var host = _a3.host;
|
|
124248
|
-
var serializedData = toReq(payload);
|
|
124249
|
-
var metadata = {
|
|
124250
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124251
|
-
method: "GET",
|
|
124252
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.CountDataItems",
|
|
124253
|
-
migrationOptions: {
|
|
124254
|
-
optInTransformResponse: true
|
|
124255
|
-
},
|
|
124256
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124257
|
-
protoPath: "/v2/items/count",
|
|
124258
|
-
data: serializedData,
|
|
124259
|
-
host
|
|
124260
|
-
}),
|
|
124261
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData, true),
|
|
124262
|
-
transformResponse: fromRes,
|
|
124263
|
-
fallback: [
|
|
124264
|
-
{
|
|
124265
|
-
method: "POST",
|
|
124266
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124267
|
-
protoPath: "/v2/items/count",
|
|
124268
|
-
data: serializedData,
|
|
124269
|
-
host
|
|
124270
|
-
}),
|
|
124271
|
-
data: serializedData
|
|
124272
|
-
}
|
|
124273
|
-
]
|
|
124274
|
-
};
|
|
124275
|
-
return metadata;
|
|
124276
|
-
}
|
|
124277
|
-
__countDataItems.fromReq = fromReq;
|
|
124278
|
-
__countDataItems.__isAmbassador = true;
|
|
124279
|
-
return __countDataItems;
|
|
124280
|
-
}
|
|
124281
|
-
exports2.countDataItems = countDataItems;
|
|
124282
|
-
function queryDistinctValues(payload) {
|
|
124283
|
-
var _a2 = (0, ambassador_1.serializer)(_queryDistinctValuesRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124284
|
-
var fromRes = (0, ambassador_1.serializer)(_queryDistinctValuesResponse, {}).fromJSON;
|
|
124285
|
-
function __queryDistinctValues(_a3) {
|
|
124286
|
-
var host = _a3.host;
|
|
124287
|
-
var serializedData = toReq(payload);
|
|
124288
|
-
var metadata = {
|
|
124289
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124290
|
-
method: "GET",
|
|
124291
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.QueryDistinctValues",
|
|
124292
|
-
migrationOptions: {
|
|
124293
|
-
optInTransformResponse: true
|
|
124294
|
-
},
|
|
124295
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124296
|
-
protoPath: "/v2/items/query-distinct-values",
|
|
124297
|
-
data: serializedData,
|
|
124298
|
-
host
|
|
124299
|
-
}),
|
|
124300
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData, true),
|
|
124301
|
-
transformResponse: fromRes,
|
|
124302
|
-
fallback: [
|
|
124303
|
-
{
|
|
124304
|
-
method: "POST",
|
|
124305
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124306
|
-
protoPath: "/v2/items/query-distinct-values",
|
|
124307
|
-
data: serializedData,
|
|
124308
|
-
host
|
|
124309
|
-
}),
|
|
124310
|
-
data: serializedData
|
|
124311
|
-
}
|
|
124312
|
-
]
|
|
124313
|
-
};
|
|
124314
|
-
return metadata;
|
|
124315
|
-
}
|
|
124316
|
-
__queryDistinctValues.fromReq = fromReq;
|
|
124317
|
-
__queryDistinctValues.__isAmbassador = true;
|
|
124318
|
-
return __queryDistinctValues;
|
|
124319
|
-
}
|
|
124320
|
-
exports2.queryDistinctValues = queryDistinctValues;
|
|
124321
|
-
function bulkInsertDataItems(payload) {
|
|
124322
|
-
var _a2 = (0, ambassador_1.serializer)(_bulkInsertDataItemsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124323
|
-
var fromRes = (0, ambassador_1.serializer)(_bulkInsertDataItemsResponse, {}).fromJSON;
|
|
124324
|
-
function __bulkInsertDataItems(_a3) {
|
|
124325
|
-
var host = _a3.host;
|
|
124326
|
-
var serializedData = toReq(payload);
|
|
124327
|
-
var metadata = {
|
|
124328
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124329
|
-
method: "POST",
|
|
124330
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.BulkInsertDataItems",
|
|
124331
|
-
migrationOptions: {
|
|
124332
|
-
optInTransformResponse: true
|
|
124333
|
-
},
|
|
124334
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124335
|
-
protoPath: "/v2/bulk/items/insert",
|
|
124336
|
-
data: serializedData,
|
|
124337
|
-
host
|
|
124338
|
-
}),
|
|
124339
|
-
data: serializedData,
|
|
124340
|
-
transformResponse: fromRes
|
|
124341
|
-
};
|
|
124342
|
-
return metadata;
|
|
124343
|
-
}
|
|
124344
|
-
__bulkInsertDataItems.fromReq = fromReq;
|
|
124345
|
-
__bulkInsertDataItems.__isAmbassador = true;
|
|
124346
|
-
return __bulkInsertDataItems;
|
|
124347
|
-
}
|
|
124348
|
-
exports2.bulkInsertDataItems = bulkInsertDataItems;
|
|
124349
|
-
function bulkUpdateDataItems(payload) {
|
|
124350
|
-
var _a2 = (0, ambassador_1.serializer)(_bulkUpdateDataItemsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124351
|
-
var fromRes = (0, ambassador_1.serializer)(_bulkUpdateDataItemsResponse, {}).fromJSON;
|
|
124352
|
-
function __bulkUpdateDataItems(_a3) {
|
|
124353
|
-
var host = _a3.host;
|
|
124354
|
-
var serializedData = toReq(payload);
|
|
124355
|
-
var metadata = {
|
|
124356
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124357
|
-
method: "POST",
|
|
124358
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.BulkUpdateDataItems",
|
|
124359
|
-
migrationOptions: {
|
|
124360
|
-
optInTransformResponse: true
|
|
124361
|
-
},
|
|
124362
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124363
|
-
protoPath: "/v2/bulk/items/update",
|
|
124364
|
-
data: serializedData,
|
|
124365
|
-
host
|
|
124366
|
-
}),
|
|
124367
|
-
data: serializedData,
|
|
124368
|
-
transformResponse: fromRes
|
|
124369
|
-
};
|
|
124370
|
-
return metadata;
|
|
124371
|
-
}
|
|
124372
|
-
__bulkUpdateDataItems.fromReq = fromReq;
|
|
124373
|
-
__bulkUpdateDataItems.__isAmbassador = true;
|
|
124374
|
-
return __bulkUpdateDataItems;
|
|
124375
|
-
}
|
|
124376
|
-
exports2.bulkUpdateDataItems = bulkUpdateDataItems;
|
|
124377
|
-
function bulkSaveDataItems(payload) {
|
|
124378
|
-
var _a2 = (0, ambassador_1.serializer)(_bulkSaveDataItemsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124379
|
-
var fromRes = (0, ambassador_1.serializer)(_bulkSaveDataItemsResponse, {}).fromJSON;
|
|
124380
|
-
function __bulkSaveDataItems(_a3) {
|
|
124381
|
-
var host = _a3.host;
|
|
124382
|
-
var serializedData = toReq(payload);
|
|
124383
|
-
var metadata = {
|
|
124384
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124385
|
-
method: "POST",
|
|
124386
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.BulkSaveDataItems",
|
|
124387
|
-
migrationOptions: {
|
|
124388
|
-
optInTransformResponse: true
|
|
124389
|
-
},
|
|
124390
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124391
|
-
protoPath: "/v2/bulk/items/save",
|
|
124392
|
-
data: serializedData,
|
|
124393
|
-
host
|
|
124394
|
-
}),
|
|
124395
|
-
data: serializedData,
|
|
124396
|
-
transformResponse: fromRes
|
|
124397
|
-
};
|
|
124398
|
-
return metadata;
|
|
124399
|
-
}
|
|
124400
|
-
__bulkSaveDataItems.fromReq = fromReq;
|
|
124401
|
-
__bulkSaveDataItems.__isAmbassador = true;
|
|
124402
|
-
return __bulkSaveDataItems;
|
|
124403
|
-
}
|
|
124404
|
-
exports2.bulkSaveDataItems = bulkSaveDataItems;
|
|
124405
|
-
function bulkRemoveDataItems(payload) {
|
|
124406
|
-
var _a2 = (0, ambassador_1.serializer)(_bulkRemoveDataItemsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124407
|
-
var fromRes = (0, ambassador_1.serializer)(_bulkRemoveDataItemsResponse, {}).fromJSON;
|
|
124408
|
-
function __bulkRemoveDataItems(_a3) {
|
|
124409
|
-
var host = _a3.host;
|
|
124410
|
-
var serializedData = toReq(payload);
|
|
124411
|
-
var metadata = {
|
|
124412
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124413
|
-
method: "POST",
|
|
124414
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.BulkRemoveDataItems",
|
|
124415
|
-
migrationOptions: {
|
|
124416
|
-
optInTransformResponse: true
|
|
124417
|
-
},
|
|
124418
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124419
|
-
protoPath: "/v2/bulk/items/remove",
|
|
124420
|
-
data: serializedData,
|
|
124421
|
-
host
|
|
124422
|
-
}),
|
|
124423
|
-
data: serializedData,
|
|
124424
|
-
transformResponse: fromRes
|
|
124425
|
-
};
|
|
124426
|
-
return metadata;
|
|
124427
|
-
}
|
|
124428
|
-
__bulkRemoveDataItems.fromReq = fromReq;
|
|
124429
|
-
__bulkRemoveDataItems.__isAmbassador = true;
|
|
124430
|
-
return __bulkRemoveDataItems;
|
|
124431
|
-
}
|
|
124432
|
-
exports2.bulkRemoveDataItems = bulkRemoveDataItems;
|
|
124433
|
-
function queryReferencedDataItems(payload) {
|
|
124434
|
-
var _a2 = (0, ambassador_1.serializer)(_queryReferencedDataItemsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124435
|
-
var fromRes = (0, ambassador_1.serializer)(_queryReferencedDataItemsResponse, {}).fromJSON;
|
|
124436
|
-
function __queryReferencedDataItems(_a3) {
|
|
124437
|
-
var host = _a3.host;
|
|
124438
|
-
var serializedData = toReq(payload);
|
|
124439
|
-
var metadata = {
|
|
124440
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124441
|
-
method: "GET",
|
|
124442
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.QueryReferencedDataItems",
|
|
124443
|
-
migrationOptions: {
|
|
124444
|
-
optInTransformResponse: true
|
|
124445
|
-
},
|
|
124446
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124447
|
-
protoPath: "/v2/items/query-referenced",
|
|
124448
|
-
data: serializedData,
|
|
124449
|
-
host
|
|
124450
|
-
}),
|
|
124451
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData, true),
|
|
124452
|
-
transformResponse: fromRes,
|
|
124453
|
-
fallback: [
|
|
124454
|
-
{
|
|
124455
|
-
method: "POST",
|
|
124456
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124457
|
-
protoPath: "/v2/items/query-referenced",
|
|
124458
|
-
data: serializedData,
|
|
124459
|
-
host
|
|
124460
|
-
}),
|
|
124461
|
-
data: serializedData
|
|
124462
|
-
}
|
|
124463
|
-
]
|
|
124464
|
-
};
|
|
124465
|
-
return metadata;
|
|
124466
|
-
}
|
|
124467
|
-
__queryReferencedDataItems.fromReq = fromReq;
|
|
124468
|
-
__queryReferencedDataItems.__isAmbassador = true;
|
|
124469
|
-
return __queryReferencedDataItems;
|
|
124470
|
-
}
|
|
124471
|
-
exports2.queryReferencedDataItems = queryReferencedDataItems;
|
|
124472
|
-
function isReferencedDataItem(payload) {
|
|
124473
|
-
var _a2 = (0, ambassador_1.serializer)(_isReferencedDataItemRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124474
|
-
var fromRes = (0, ambassador_1.serializer)(_isReferencedDataItemResponse, {}).fromJSON;
|
|
124475
|
-
function __isReferencedDataItem(_a3) {
|
|
124476
|
-
var host = _a3.host;
|
|
124477
|
-
var serializedData = toReq(payload);
|
|
124478
|
-
var metadata = {
|
|
124479
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124480
|
-
method: "GET",
|
|
124481
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.IsReferencedDataItem",
|
|
124482
|
-
migrationOptions: {
|
|
124483
|
-
optInTransformResponse: true
|
|
124484
|
-
},
|
|
124485
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124486
|
-
protoPath: "/v2/items/is-referenced",
|
|
124487
|
-
data: serializedData,
|
|
124488
|
-
host
|
|
124489
|
-
}),
|
|
124490
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData, true),
|
|
124491
|
-
transformResponse: fromRes,
|
|
124492
|
-
fallback: [
|
|
124493
|
-
{
|
|
124494
|
-
method: "POST",
|
|
124495
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124496
|
-
protoPath: "/v2/items/is-referenced",
|
|
124497
|
-
data: serializedData,
|
|
124498
|
-
host
|
|
124499
|
-
}),
|
|
124500
|
-
data: serializedData
|
|
124501
|
-
}
|
|
124502
|
-
]
|
|
124503
|
-
};
|
|
124504
|
-
return metadata;
|
|
124505
|
-
}
|
|
124506
|
-
__isReferencedDataItem.fromReq = fromReq;
|
|
124507
|
-
__isReferencedDataItem.__isAmbassador = true;
|
|
124508
|
-
return __isReferencedDataItem;
|
|
124509
|
-
}
|
|
124510
|
-
exports2.isReferencedDataItem = isReferencedDataItem;
|
|
124511
|
-
function insertDataItemReference(payload) {
|
|
124512
|
-
var _a2 = (0, ambassador_1.serializer)(_insertDataItemReferenceRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124513
|
-
var fromRes = (0, ambassador_1.serializer)(_insertDataItemReferenceResponse, {}).fromJSON;
|
|
124514
|
-
function __insertDataItemReference(_a3) {
|
|
124515
|
-
var host = _a3.host;
|
|
124516
|
-
var serializedData = toReq(payload);
|
|
124517
|
-
var metadata = {
|
|
124518
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124519
|
-
method: "POST",
|
|
124520
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.InsertDataItemReference",
|
|
124521
|
-
migrationOptions: {
|
|
124522
|
-
optInTransformResponse: true
|
|
124523
|
-
},
|
|
124524
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124525
|
-
protoPath: "/v2/items/insert-reference",
|
|
124526
|
-
data: serializedData,
|
|
124527
|
-
host
|
|
124528
|
-
}),
|
|
124529
|
-
data: serializedData,
|
|
124530
|
-
transformResponse: fromRes
|
|
124531
|
-
};
|
|
124532
|
-
return metadata;
|
|
124533
|
-
}
|
|
124534
|
-
__insertDataItemReference.fromReq = fromReq;
|
|
124535
|
-
__insertDataItemReference.__isAmbassador = true;
|
|
124536
|
-
return __insertDataItemReference;
|
|
124537
|
-
}
|
|
124538
|
-
exports2.insertDataItemReference = insertDataItemReference;
|
|
124539
|
-
function removeDataItemReference(payload) {
|
|
124540
|
-
var _a2 = (0, ambassador_1.serializer)(_removeDataItemReferenceRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124541
|
-
var fromRes = (0, ambassador_1.serializer)(_removeDataItemReferenceResponse, {}).fromJSON;
|
|
124542
|
-
function __removeDataItemReference(_a3) {
|
|
124543
|
-
var host = _a3.host;
|
|
124544
|
-
var serializedData = toReq(payload);
|
|
124545
|
-
var metadata = {
|
|
124546
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124547
|
-
method: "POST",
|
|
124548
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.RemoveDataItemReference",
|
|
124549
|
-
migrationOptions: {
|
|
124550
|
-
optInTransformResponse: true
|
|
124551
|
-
},
|
|
124552
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124553
|
-
protoPath: "/v2/items/remove-reference",
|
|
124554
|
-
data: serializedData,
|
|
124555
|
-
host
|
|
124556
|
-
}),
|
|
124557
|
-
data: serializedData,
|
|
124558
|
-
transformResponse: fromRes
|
|
124559
|
-
};
|
|
124560
|
-
return metadata;
|
|
124561
|
-
}
|
|
124562
|
-
__removeDataItemReference.fromReq = fromReq;
|
|
124563
|
-
__removeDataItemReference.__isAmbassador = true;
|
|
124564
|
-
return __removeDataItemReference;
|
|
124565
|
-
}
|
|
124566
|
-
exports2.removeDataItemReference = removeDataItemReference;
|
|
124567
|
-
function bulkInsertDataItemReferences(payload) {
|
|
124568
|
-
var _a2 = (0, ambassador_1.serializer)(_bulkInsertDataItemReferencesRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124569
|
-
var fromRes = (0, ambassador_1.serializer)(_bulkInsertDataItemReferencesResponse, {}).fromJSON;
|
|
124570
|
-
function __bulkInsertDataItemReferences(_a3) {
|
|
124571
|
-
var host = _a3.host;
|
|
124572
|
-
var serializedData = toReq(payload);
|
|
124573
|
-
var metadata = {
|
|
124574
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124575
|
-
method: "POST",
|
|
124576
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.BulkInsertDataItemReferences",
|
|
124577
|
-
migrationOptions: {
|
|
124578
|
-
optInTransformResponse: true
|
|
124579
|
-
},
|
|
124580
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124581
|
-
protoPath: "/v2/bulk/items/insert-references",
|
|
124582
|
-
data: serializedData,
|
|
124583
|
-
host
|
|
124584
|
-
}),
|
|
124585
|
-
data: serializedData,
|
|
124586
|
-
transformResponse: fromRes
|
|
124587
|
-
};
|
|
124588
|
-
return metadata;
|
|
124589
|
-
}
|
|
124590
|
-
__bulkInsertDataItemReferences.fromReq = fromReq;
|
|
124591
|
-
__bulkInsertDataItemReferences.__isAmbassador = true;
|
|
124592
|
-
return __bulkInsertDataItemReferences;
|
|
124593
|
-
}
|
|
124594
|
-
exports2.bulkInsertDataItemReferences = bulkInsertDataItemReferences;
|
|
124595
|
-
function bulkRemoveDataItemReferences(payload) {
|
|
124596
|
-
var _a2 = (0, ambassador_1.serializer)(_bulkRemoveDataItemReferencesRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124597
|
-
var fromRes = (0, ambassador_1.serializer)(_bulkRemoveDataItemReferencesResponse, {}).fromJSON;
|
|
124598
|
-
function __bulkRemoveDataItemReferences(_a3) {
|
|
124599
|
-
var host = _a3.host;
|
|
124600
|
-
var serializedData = toReq(payload);
|
|
124601
|
-
var metadata = {
|
|
124602
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124603
|
-
method: "POST",
|
|
124604
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.BulkRemoveDataItemReferences",
|
|
124605
|
-
migrationOptions: {
|
|
124606
|
-
optInTransformResponse: true
|
|
124607
|
-
},
|
|
124608
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124609
|
-
protoPath: "/v2/bulk/items/remove-references",
|
|
124610
|
-
data: serializedData,
|
|
124611
|
-
host
|
|
124612
|
-
}),
|
|
124613
|
-
data: serializedData,
|
|
124614
|
-
transformResponse: fromRes
|
|
124615
|
-
};
|
|
124616
|
-
return metadata;
|
|
124617
|
-
}
|
|
124618
|
-
__bulkRemoveDataItemReferences.fromReq = fromReq;
|
|
124619
|
-
__bulkRemoveDataItemReferences.__isAmbassador = true;
|
|
124620
|
-
return __bulkRemoveDataItemReferences;
|
|
124621
|
-
}
|
|
124622
|
-
exports2.bulkRemoveDataItemReferences = bulkRemoveDataItemReferences;
|
|
124623
|
-
function replaceDataItemReferences(payload) {
|
|
124624
|
-
var _a2 = (0, ambassador_1.serializer)(_replaceDataItemReferencesRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124625
|
-
var fromRes = (0, ambassador_1.serializer)(_replaceDataItemReferencesResponse, {}).fromJSON;
|
|
124626
|
-
function __replaceDataItemReferences(_a3) {
|
|
124627
|
-
var host = _a3.host;
|
|
124628
|
-
var serializedData = toReq(payload);
|
|
124629
|
-
var metadata = {
|
|
124630
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124631
|
-
method: "POST",
|
|
124632
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.ReplaceDataItemReferences",
|
|
124633
|
-
migrationOptions: {
|
|
124634
|
-
optInTransformResponse: true
|
|
124635
|
-
},
|
|
124636
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124637
|
-
protoPath: "/v2/items/replace-references",
|
|
124638
|
-
data: serializedData,
|
|
124639
|
-
host
|
|
124640
|
-
}),
|
|
124641
|
-
data: serializedData,
|
|
124642
|
-
transformResponse: fromRes
|
|
124643
|
-
};
|
|
124644
|
-
return metadata;
|
|
124645
|
-
}
|
|
124646
|
-
__replaceDataItemReferences.fromReq = fromReq;
|
|
124647
|
-
__replaceDataItemReferences.__isAmbassador = true;
|
|
124648
|
-
return __replaceDataItemReferences;
|
|
124649
|
-
}
|
|
124650
|
-
exports2.replaceDataItemReferences = replaceDataItemReferences;
|
|
124651
|
-
function searchDataItems(payload) {
|
|
124652
|
-
var _a2 = (0, ambassador_1.serializer)(_searchDataItemsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
|
|
124653
|
-
var fromRes = (0, ambassador_1.serializer)(_searchDataItemsResponse, {}).fromJSON;
|
|
124654
|
-
function __searchDataItems(_a3) {
|
|
124655
|
-
var host = _a3.host;
|
|
124656
|
-
var serializedData = toReq(payload);
|
|
124657
|
-
var metadata = {
|
|
124658
|
-
entityFqdn: "wix.data.v2.data_item",
|
|
124659
|
-
method: "POST",
|
|
124660
|
-
methodFqn: "com.wixpress.cloud.data.api.data.DataItemService.SearchDataItems",
|
|
124661
|
-
migrationOptions: {
|
|
124662
|
-
optInTransformResponse: true
|
|
124663
|
-
},
|
|
124664
|
-
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
124665
|
-
protoPath: "/v2/items/search",
|
|
124666
|
-
data: serializedData,
|
|
124667
|
-
host
|
|
124668
|
-
}),
|
|
124669
|
-
data: serializedData,
|
|
124670
|
-
transformResponse: fromRes
|
|
124671
|
-
};
|
|
124672
|
-
return metadata;
|
|
124673
|
-
}
|
|
124674
|
-
__searchDataItems.fromReq = fromReq;
|
|
124675
|
-
__searchDataItems.__isAmbassador = true;
|
|
124676
|
-
return __searchDataItems;
|
|
124677
|
-
}
|
|
124678
|
-
exports2.searchDataItems = searchDataItems;
|
|
124679
|
-
}
|
|
124680
|
-
});
|
|
124681
|
-
|
|
124682
|
-
// dist/system-prompts/cmsData/shared.js
|
|
124683
|
-
var require_shared = __commonJS({
|
|
124684
|
-
"dist/system-prompts/cmsData/shared.js"(exports2) {
|
|
124685
|
-
"use strict";
|
|
124686
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
124687
|
-
exports2.EXAMPLE_OUTPUT_WITH_EMPTY_DATA = exports2.EXAMPLE_DATAITEM = exports2.FIELD_TYPES_REFERENCE = exports2.DATAITEM_STRUCTURE_RULES = void 0;
|
|
124688
|
-
exports2.DATAITEM_STRUCTURE_RULES = `- Each dataItem has an optional "id" field and a required "data" object
|
|
124689
|
-
- The "data" object contains the actual field values for the collection
|
|
124690
|
-
- Do NOT include _id, _createdDate, _updatedDate in the "data" object - these are auto-generated by Wix
|
|
124691
|
-
- Only generate data for fields that are defined in the collection schema
|
|
124692
|
-
- Do not add extra fields or system fields`;
|
|
124693
|
-
exports2.FIELD_TYPES_REFERENCE = `- TEXT: String values
|
|
124694
|
-
- NUMBER: Numeric values
|
|
124695
|
-
- BOOLEAN: true/false
|
|
124696
|
-
- DATE: Date-only strings in YYYY-MM-DD format (e.g., "2024-01-15")
|
|
124697
|
-
- DATETIME: ISO 8601 datetime strings (e.g., "2024-01-15T10:30:00.000Z")
|
|
124698
|
-
- RICH_TEXT: HTML formatted strings
|
|
124699
|
-
- IMAGE: Image URLs or empty strings
|
|
124700
|
-
- REFERENCE: Object references - NEVER use null, undefined, or generate sample data. Return empty dataItems array [] for collections with REFERENCE fields
|
|
124701
|
-
- MULTI_REFERENCE: Multiple object references - NEVER use null, undefined, or generate sample data. Return empty dataItems array [] for collections with MULTI_REFERENCE fields
|
|
124702
|
-
- ARRAY: Arrays of appropriate types`;
|
|
124703
|
-
exports2.EXAMPLE_DATAITEM = `{
|
|
124704
|
-
"data": {
|
|
124705
|
-
"title": "Sample Product",
|
|
124706
|
-
"price": 29.99,
|
|
124707
|
-
"inStock": true
|
|
124708
|
-
}
|
|
124709
|
-
}`;
|
|
124710
|
-
exports2.EXAMPLE_OUTPUT_WITH_EMPTY_DATA = `{
|
|
124711
|
-
"collections": [
|
|
124712
|
-
{
|
|
124713
|
-
"dataCollectionId": "customer-reviews",
|
|
124714
|
-
"dataItems": []
|
|
124715
|
-
},
|
|
124716
|
-
{
|
|
124717
|
-
"dataCollectionId": "orders",
|
|
124718
|
-
"dataItems": []
|
|
124719
|
-
}
|
|
124720
|
-
]
|
|
124721
|
-
}`;
|
|
121316
|
+
// ../../node_modules/@wix/ambassador-data-v2-data-collection/build/cjs/types.impl.js
|
|
121317
|
+
var require_types_impl2 = __commonJS({
|
|
121318
|
+
"../../node_modules/@wix/ambassador-data-v2-data-collection/build/cjs/types.impl.js"(exports2) {
|
|
121319
|
+
"use strict";
|
|
121320
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
121321
|
+
exports2.WebhookIdentityType = exports2.IndexSource = exports2.IndexStatus = exports2.Order = exports2.TenantMode = exports2.SortOrder = exports2.Segment = exports2.AccessLevel = exports2.PagingMode = exports2.Type = exports2.Format = exports2.Status = exports2.Role = exports2.FieldPluginType = exports2.QueryOperator = exports2.FieldType = exports2.CollectionOperation = exports2.DataOperation = exports2.Direction = exports2.CollectionType = void 0;
|
|
121322
|
+
var CollectionType;
|
|
121323
|
+
(function(CollectionType2) {
|
|
121324
|
+
CollectionType2["NATIVE"] = "NATIVE";
|
|
121325
|
+
CollectionType2["WIX_APP"] = "WIX_APP";
|
|
121326
|
+
CollectionType2["BLOCKS_APP"] = "BLOCKS_APP";
|
|
121327
|
+
CollectionType2["EXTERNAL"] = "EXTERNAL";
|
|
121328
|
+
})(CollectionType = exports2.CollectionType || (exports2.CollectionType = {}));
|
|
121329
|
+
var Direction;
|
|
121330
|
+
(function(Direction2) {
|
|
121331
|
+
Direction2["ASC"] = "ASC";
|
|
121332
|
+
Direction2["DESC"] = "DESC";
|
|
121333
|
+
})(Direction = exports2.Direction || (exports2.Direction = {}));
|
|
121334
|
+
var DataOperation;
|
|
121335
|
+
(function(DataOperation2) {
|
|
121336
|
+
DataOperation2["AGGREGATE"] = "AGGREGATE";
|
|
121337
|
+
DataOperation2["BULK_INSERT"] = "BULK_INSERT";
|
|
121338
|
+
DataOperation2["BULK_REMOVE"] = "BULK_REMOVE";
|
|
121339
|
+
DataOperation2["BULK_SAVE"] = "BULK_SAVE";
|
|
121340
|
+
DataOperation2["BULK_UPDATE"] = "BULK_UPDATE";
|
|
121341
|
+
DataOperation2["COUNT"] = "COUNT";
|
|
121342
|
+
DataOperation2["DISTINCT"] = "DISTINCT";
|
|
121343
|
+
DataOperation2["FIND"] = "FIND";
|
|
121344
|
+
DataOperation2["GET"] = "GET";
|
|
121345
|
+
DataOperation2["INSERT"] = "INSERT";
|
|
121346
|
+
DataOperation2["INSERT_REFERENCE"] = "INSERT_REFERENCE";
|
|
121347
|
+
DataOperation2["IS_REFERENCED"] = "IS_REFERENCED";
|
|
121348
|
+
DataOperation2["QUERY_REFERENCED"] = "QUERY_REFERENCED";
|
|
121349
|
+
DataOperation2["REMOVE"] = "REMOVE";
|
|
121350
|
+
DataOperation2["REMOVE_REFERENCE"] = "REMOVE_REFERENCE";
|
|
121351
|
+
DataOperation2["REPLACE_REFERENCES"] = "REPLACE_REFERENCES";
|
|
121352
|
+
DataOperation2["SAVE"] = "SAVE";
|
|
121353
|
+
DataOperation2["TRUNCATE"] = "TRUNCATE";
|
|
121354
|
+
DataOperation2["UPDATE"] = "UPDATE";
|
|
121355
|
+
DataOperation2["PATCH"] = "PATCH";
|
|
121356
|
+
DataOperation2["BULK_PATCH"] = "BULK_PATCH";
|
|
121357
|
+
})(DataOperation = exports2.DataOperation || (exports2.DataOperation = {}));
|
|
121358
|
+
var CollectionOperation;
|
|
121359
|
+
(function(CollectionOperation2) {
|
|
121360
|
+
CollectionOperation2["UPDATE"] = "UPDATE";
|
|
121361
|
+
CollectionOperation2["REMOVE"] = "REMOVE";
|
|
121362
|
+
})(CollectionOperation = exports2.CollectionOperation || (exports2.CollectionOperation = {}));
|
|
121363
|
+
var FieldType;
|
|
121364
|
+
(function(FieldType2) {
|
|
121365
|
+
FieldType2["UNKNOWN_FIELD_TYPE"] = "UNKNOWN_FIELD_TYPE";
|
|
121366
|
+
FieldType2["TEXT"] = "TEXT";
|
|
121367
|
+
FieldType2["NUMBER"] = "NUMBER";
|
|
121368
|
+
FieldType2["DATE"] = "DATE";
|
|
121369
|
+
FieldType2["DATETIME"] = "DATETIME";
|
|
121370
|
+
FieldType2["IMAGE"] = "IMAGE";
|
|
121371
|
+
FieldType2["BOOLEAN"] = "BOOLEAN";
|
|
121372
|
+
FieldType2["DOCUMENT"] = "DOCUMENT";
|
|
121373
|
+
FieldType2["URL"] = "URL";
|
|
121374
|
+
FieldType2["RICH_TEXT"] = "RICH_TEXT";
|
|
121375
|
+
FieldType2["VIDEO"] = "VIDEO";
|
|
121376
|
+
FieldType2["ANY"] = "ANY";
|
|
121377
|
+
FieldType2["ARRAY_STRING"] = "ARRAY_STRING";
|
|
121378
|
+
FieldType2["ARRAY_DOCUMENT"] = "ARRAY_DOCUMENT";
|
|
121379
|
+
FieldType2["AUDIO"] = "AUDIO";
|
|
121380
|
+
FieldType2["TIME"] = "TIME";
|
|
121381
|
+
FieldType2["LANGUAGE"] = "LANGUAGE";
|
|
121382
|
+
FieldType2["RICH_CONTENT"] = "RICH_CONTENT";
|
|
121383
|
+
FieldType2["MEDIA_GALLERY"] = "MEDIA_GALLERY";
|
|
121384
|
+
FieldType2["ADDRESS"] = "ADDRESS";
|
|
121385
|
+
FieldType2["PAGE_LINK"] = "PAGE_LINK";
|
|
121386
|
+
FieldType2["REFERENCE"] = "REFERENCE";
|
|
121387
|
+
FieldType2["MULTI_REFERENCE"] = "MULTI_REFERENCE";
|
|
121388
|
+
FieldType2["OBJECT"] = "OBJECT";
|
|
121389
|
+
FieldType2["ARRAY"] = "ARRAY";
|
|
121390
|
+
FieldType2["LEGACY_TIME"] = "LEGACY_TIME";
|
|
121391
|
+
FieldType2["LEGACY_BOOK"] = "LEGACY_BOOK";
|
|
121392
|
+
FieldType2["LEGACY_EXTERNAL_URL"] = "LEGACY_EXTERNAL_URL";
|
|
121393
|
+
FieldType2["LEGACY_BROKEN_REFERENCE"] = "LEGACY_BROKEN_REFERENCE";
|
|
121394
|
+
FieldType2["LEGACY_IMAGE"] = "LEGACY_IMAGE";
|
|
121395
|
+
FieldType2["LEGACY_COLOR"] = "LEGACY_COLOR";
|
|
121396
|
+
FieldType2["LEGACY_EXTERNAL_VIDEO"] = "LEGACY_EXTERNAL_VIDEO";
|
|
121397
|
+
FieldType2["SLUG"] = "SLUG";
|
|
121398
|
+
})(FieldType = exports2.FieldType || (exports2.FieldType = {}));
|
|
121399
|
+
var QueryOperator;
|
|
121400
|
+
(function(QueryOperator2) {
|
|
121401
|
+
QueryOperator2["EQ"] = "EQ";
|
|
121402
|
+
QueryOperator2["LT"] = "LT";
|
|
121403
|
+
QueryOperator2["GT"] = "GT";
|
|
121404
|
+
QueryOperator2["NE"] = "NE";
|
|
121405
|
+
QueryOperator2["LTE"] = "LTE";
|
|
121406
|
+
QueryOperator2["GTE"] = "GTE";
|
|
121407
|
+
QueryOperator2["STARTS_WITH"] = "STARTS_WITH";
|
|
121408
|
+
QueryOperator2["ENDS_WITH"] = "ENDS_WITH";
|
|
121409
|
+
QueryOperator2["CONTAINS"] = "CONTAINS";
|
|
121410
|
+
QueryOperator2["HAS_SOME"] = "HAS_SOME";
|
|
121411
|
+
QueryOperator2["HAS_ALL"] = "HAS_ALL";
|
|
121412
|
+
QueryOperator2["EXISTS"] = "EXISTS";
|
|
121413
|
+
QueryOperator2["URLIZED"] = "URLIZED";
|
|
121414
|
+
})(QueryOperator = exports2.QueryOperator || (exports2.QueryOperator = {}));
|
|
121415
|
+
var FieldPluginType;
|
|
121416
|
+
(function(FieldPluginType2) {
|
|
121417
|
+
FieldPluginType2["UNKNOWN"] = "UNKNOWN";
|
|
121418
|
+
FieldPluginType2["CMS"] = "CMS";
|
|
121419
|
+
})(FieldPluginType = exports2.FieldPluginType || (exports2.FieldPluginType = {}));
|
|
121420
|
+
var Role;
|
|
121421
|
+
(function(Role2) {
|
|
121422
|
+
Role2["UNKNOWN_ROLE"] = "UNKNOWN_ROLE";
|
|
121423
|
+
Role2["ADMIN"] = "ADMIN";
|
|
121424
|
+
Role2["SITE_MEMBER_AUTHOR"] = "SITE_MEMBER_AUTHOR";
|
|
121425
|
+
Role2["SITE_MEMBER"] = "SITE_MEMBER";
|
|
121426
|
+
Role2["ANYONE"] = "ANYONE";
|
|
121427
|
+
})(Role = exports2.Role || (exports2.Role = {}));
|
|
121428
|
+
var Status;
|
|
121429
|
+
(function(Status2) {
|
|
121430
|
+
Status2["UNKNOWN_PUBLISH_PLUGIN_STATUS"] = "UNKNOWN_PUBLISH_PLUGIN_STATUS";
|
|
121431
|
+
Status2["PUBLISHED"] = "PUBLISHED";
|
|
121432
|
+
Status2["DRAFT"] = "DRAFT";
|
|
121433
|
+
})(Status = exports2.Status || (exports2.Status = {}));
|
|
121434
|
+
var Format;
|
|
121435
|
+
(function(Format2) {
|
|
121436
|
+
Format2["UNKNOWN_URLIZED_PLUGIN_FORMAT"] = "UNKNOWN_URLIZED_PLUGIN_FORMAT";
|
|
121437
|
+
Format2["ORIGINAL"] = "ORIGINAL";
|
|
121438
|
+
Format2["PLAIN"] = "PLAIN";
|
|
121439
|
+
})(Format = exports2.Format || (exports2.Format = {}));
|
|
121440
|
+
var Type;
|
|
121441
|
+
(function(Type2) {
|
|
121442
|
+
Type2["UNKNOWN_PLUGIN_TYPE"] = "UNKNOWN_PLUGIN_TYPE";
|
|
121443
|
+
Type2["PUBLISH"] = "PUBLISH";
|
|
121444
|
+
Type2["SINGLE_ITEM"] = "SINGLE_ITEM";
|
|
121445
|
+
Type2["URLIZED"] = "URLIZED";
|
|
121446
|
+
Type2["GRIDAPPLESS"] = "GRIDAPPLESS";
|
|
121447
|
+
Type2["MULTILINGUAL"] = "MULTILINGUAL";
|
|
121448
|
+
Type2["SHARED"] = "SHARED";
|
|
121449
|
+
Type2["EDITABLE_PAGE_LINK"] = "EDITABLE_PAGE_LINK";
|
|
121450
|
+
Type2["CMS"] = "CMS";
|
|
121451
|
+
Type2["CATALOG"] = "CATALOG";
|
|
121452
|
+
})(Type = exports2.Type || (exports2.Type = {}));
|
|
121453
|
+
var PagingMode;
|
|
121454
|
+
(function(PagingMode2) {
|
|
121455
|
+
PagingMode2["OFFSET"] = "OFFSET";
|
|
121456
|
+
PagingMode2["CURSOR"] = "CURSOR";
|
|
121457
|
+
})(PagingMode = exports2.PagingMode || (exports2.PagingMode = {}));
|
|
121458
|
+
var AccessLevel;
|
|
121459
|
+
(function(AccessLevel2) {
|
|
121460
|
+
AccessLevel2["UNDEFINED"] = "UNDEFINED";
|
|
121461
|
+
AccessLevel2["ANYONE"] = "ANYONE";
|
|
121462
|
+
AccessLevel2["SITE_MEMBER"] = "SITE_MEMBER";
|
|
121463
|
+
AccessLevel2["SITE_MEMBER_AUTHOR"] = "SITE_MEMBER_AUTHOR";
|
|
121464
|
+
AccessLevel2["CMS_EDITOR"] = "CMS_EDITOR";
|
|
121465
|
+
AccessLevel2["PRIVILEGED"] = "PRIVILEGED";
|
|
121466
|
+
})(AccessLevel = exports2.AccessLevel || (exports2.AccessLevel = {}));
|
|
121467
|
+
var Segment;
|
|
121468
|
+
(function(Segment2) {
|
|
121469
|
+
Segment2["UNKNOWN_SEGMENT"] = "UNKNOWN_SEGMENT";
|
|
121470
|
+
Segment2["PUBLIC"] = "PUBLIC";
|
|
121471
|
+
Segment2["DEV"] = "DEV";
|
|
121472
|
+
})(Segment = exports2.Segment || (exports2.Segment = {}));
|
|
121473
|
+
var SortOrder;
|
|
121474
|
+
(function(SortOrder2) {
|
|
121475
|
+
SortOrder2["ASC"] = "ASC";
|
|
121476
|
+
SortOrder2["DESC"] = "DESC";
|
|
121477
|
+
})(SortOrder = exports2.SortOrder || (exports2.SortOrder = {}));
|
|
121478
|
+
var TenantMode;
|
|
121479
|
+
(function(TenantMode2) {
|
|
121480
|
+
TenantMode2["META_SITE"] = "META_SITE";
|
|
121481
|
+
TenantMode2["ACCOUNT"] = "ACCOUNT";
|
|
121482
|
+
TenantMode2["APP"] = "APP";
|
|
121483
|
+
})(TenantMode = exports2.TenantMode || (exports2.TenantMode = {}));
|
|
121484
|
+
var Order;
|
|
121485
|
+
(function(Order2) {
|
|
121486
|
+
Order2["ASC"] = "ASC";
|
|
121487
|
+
Order2["DESC"] = "DESC";
|
|
121488
|
+
})(Order = exports2.Order || (exports2.Order = {}));
|
|
121489
|
+
var IndexStatus;
|
|
121490
|
+
(function(IndexStatus2) {
|
|
121491
|
+
IndexStatus2["UNKNOWN"] = "UNKNOWN";
|
|
121492
|
+
IndexStatus2["BUILDING"] = "BUILDING";
|
|
121493
|
+
IndexStatus2["ACTIVE"] = "ACTIVE";
|
|
121494
|
+
IndexStatus2["DROPPING"] = "DROPPING";
|
|
121495
|
+
IndexStatus2["DROPPED"] = "DROPPED";
|
|
121496
|
+
IndexStatus2["FAILED"] = "FAILED";
|
|
121497
|
+
IndexStatus2["INVALID"] = "INVALID";
|
|
121498
|
+
})(IndexStatus = exports2.IndexStatus || (exports2.IndexStatus = {}));
|
|
121499
|
+
var IndexSource;
|
|
121500
|
+
(function(IndexSource2) {
|
|
121501
|
+
IndexSource2["UNKNOWN_INDEX_SOURCE"] = "UNKNOWN_INDEX_SOURCE";
|
|
121502
|
+
IndexSource2["SYSTEM"] = "SYSTEM";
|
|
121503
|
+
IndexSource2["USER"] = "USER";
|
|
121504
|
+
IndexSource2["AUTO"] = "AUTO";
|
|
121505
|
+
})(IndexSource = exports2.IndexSource || (exports2.IndexSource = {}));
|
|
121506
|
+
var WebhookIdentityType;
|
|
121507
|
+
(function(WebhookIdentityType2) {
|
|
121508
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
121509
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
121510
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
121511
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
121512
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
121513
|
+
})(WebhookIdentityType = exports2.WebhookIdentityType || (exports2.WebhookIdentityType = {}));
|
|
124722
121514
|
}
|
|
124723
121515
|
});
|
|
124724
121516
|
|
|
124725
|
-
// dist/
|
|
124726
|
-
var
|
|
124727
|
-
"dist/
|
|
121517
|
+
// dist/cms/CMSSchema.js
|
|
121518
|
+
var require_CMSSchema = __commonJS({
|
|
121519
|
+
"dist/cms/CMSSchema.js"(exports2) {
|
|
124728
121520
|
"use strict";
|
|
124729
121521
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
124730
|
-
exports2.
|
|
124731
|
-
var
|
|
124732
|
-
var
|
|
124733
|
-
|
|
124734
|
-
|
|
124735
|
-
|
|
124736
|
-
|
|
124737
|
-
|
|
124738
|
-
|
|
124739
|
-
|
|
124740
|
-
|
|
124741
|
-
|
|
124742
|
-
|
|
124743
|
-
|
|
124744
|
-
|
|
124745
|
-
|
|
124746
|
-
|
|
124747
|
-
|
|
124748
|
-
|
|
124749
|
-
|
|
124750
|
-
|
|
124751
|
-
|
|
124752
|
-
|
|
124753
|
-
|
|
124754
|
-
|
|
124755
|
-
|
|
124756
|
-
|
|
124757
|
-
|
|
124758
|
-
|
|
124759
|
-
|
|
124760
|
-
|
|
124761
|
-
|
|
124762
|
-
|
|
124763
|
-
|
|
121522
|
+
exports2.CmsCollectionSchema = void 0;
|
|
121523
|
+
var types_1 = require_types_impl2();
|
|
121524
|
+
var zod_1 = require_zod();
|
|
121525
|
+
var FieldTypeEnum = zod_1.z.enum(Object.values(types_1.FieldType));
|
|
121526
|
+
var AccessLevelEnum = zod_1.z.enum(Object.values(types_1.AccessLevel));
|
|
121527
|
+
var ReferenceSchema = zod_1.z.object({
|
|
121528
|
+
referencedCollectionId: zod_1.z.string().optional()
|
|
121529
|
+
});
|
|
121530
|
+
var MultiReferenceSchema = zod_1.z.object({
|
|
121531
|
+
referencedCollectionId: zod_1.z.string().optional(),
|
|
121532
|
+
referencingFieldKey: zod_1.z.string().optional()
|
|
121533
|
+
});
|
|
121534
|
+
var ObjectFieldSchema = zod_1.z.object({
|
|
121535
|
+
key: zod_1.z.string().optional()
|
|
121536
|
+
});
|
|
121537
|
+
var ObjectSchema = zod_1.z.object({
|
|
121538
|
+
fields: zod_1.z.array(ObjectFieldSchema).optional()
|
|
121539
|
+
});
|
|
121540
|
+
var ArraySchema = zod_1.z.object({
|
|
121541
|
+
elementType: FieldTypeEnum.optional(),
|
|
121542
|
+
typeMetadata: zod_1.z.any().optional()
|
|
121543
|
+
// Recursive, simplified for now
|
|
121544
|
+
});
|
|
121545
|
+
var TypeMetadataSchema = zod_1.z.object({
|
|
121546
|
+
reference: ReferenceSchema.optional(),
|
|
121547
|
+
multiReference: MultiReferenceSchema.optional(),
|
|
121548
|
+
object: ObjectSchema.optional(),
|
|
121549
|
+
array: ArraySchema.optional()
|
|
121550
|
+
}).optional();
|
|
121551
|
+
var FieldSchema = zod_1.z.object({
|
|
121552
|
+
key: zod_1.z.string().optional(),
|
|
121553
|
+
displayName: zod_1.z.string().nullable().optional(),
|
|
121554
|
+
type: FieldTypeEnum.optional(),
|
|
121555
|
+
typeMetadata: TypeMetadataSchema,
|
|
121556
|
+
encrypted: zod_1.z.boolean().optional(),
|
|
121557
|
+
description: zod_1.z.string().nullable().optional()
|
|
121558
|
+
});
|
|
121559
|
+
var DataPermissionsSchema = zod_1.z.object({
|
|
121560
|
+
itemRead: AccessLevelEnum.optional(),
|
|
121561
|
+
itemInsert: AccessLevelEnum.optional(),
|
|
121562
|
+
itemUpdate: AccessLevelEnum.optional(),
|
|
121563
|
+
itemRemove: AccessLevelEnum.optional()
|
|
121564
|
+
});
|
|
121565
|
+
exports2.CmsCollectionSchema = zod_1.z.object({
|
|
121566
|
+
id: zod_1.z.string().optional(),
|
|
121567
|
+
displayName: zod_1.z.string().nullable().optional(),
|
|
121568
|
+
displayField: zod_1.z.string().nullable().optional(),
|
|
121569
|
+
fields: zod_1.z.array(FieldSchema).optional(),
|
|
121570
|
+
dataPermissions: DataPermissionsSchema.optional(),
|
|
121571
|
+
initialData: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())).optional()
|
|
121572
|
+
});
|
|
124764
121573
|
}
|
|
124765
121574
|
});
|
|
124766
121575
|
|
|
124767
|
-
// dist/
|
|
124768
|
-
var
|
|
124769
|
-
"dist/
|
|
121576
|
+
// dist/ApiSpecSchema.js
|
|
121577
|
+
var require_ApiSpecSchema = __commonJS({
|
|
121578
|
+
"dist/ApiSpecSchema.js"(exports2) {
|
|
124770
121579
|
"use strict";
|
|
124771
121580
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
124772
|
-
exports2.
|
|
124773
|
-
var
|
|
124774
|
-
var
|
|
124775
|
-
|
|
124776
|
-
|
|
124777
|
-
|
|
124778
|
-
|
|
124779
|
-
|
|
124780
|
-
|
|
124781
|
-
|
|
124782
|
-
|
|
124783
|
-
|
|
124784
|
-
|
|
124785
|
-
|
|
124786
|
-
|
|
124787
|
-
|
|
124788
|
-
|
|
124789
|
-
|
|
124790
|
-
|
|
124791
|
-
|
|
124792
|
-
|
|
124793
|
-
|
|
124794
|
-
|
|
124795
|
-
|
|
124796
|
-
|
|
124797
|
-
|
|
124798
|
-
|
|
124799
|
-
|
|
124800
|
-
|
|
124801
|
-
|
|
124802
|
-
|
|
124803
|
-
|
|
124804
|
-
|
|
124805
|
-
|
|
124806
|
-
|
|
124807
|
-
|
|
124808
|
-
<example_output_with_empty_data>
|
|
124809
|
-
${shared_1.EXAMPLE_OUTPUT_WITH_EMPTY_DATA}
|
|
124810
|
-
</example_output_with_empty_data>
|
|
124811
|
-
|
|
124812
|
-
<output_instructions>
|
|
124813
|
-
Return only the corrected data items that should resolve the insertion error.
|
|
124814
|
-
</output_instructions>
|
|
121581
|
+
exports2.ApiSpecSchema = void 0;
|
|
121582
|
+
var zod_1 = require_zod();
|
|
121583
|
+
var HttpMethodSchema = zod_1.z.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]);
|
|
121584
|
+
var EndpointSchema = zod_1.z.object({
|
|
121585
|
+
id: zod_1.z.string().describe("Unique identifier for the endpoint"),
|
|
121586
|
+
path: zod_1.z.string().describe("API endpoint path (e.g., '/api/users', '/api/users/[id]')"),
|
|
121587
|
+
method: HttpMethodSchema.describe("HTTP method for the endpoint"),
|
|
121588
|
+
name: zod_1.z.string().describe("Human-readable name for the endpoint"),
|
|
121589
|
+
description: zod_1.z.string().describe("What the endpoint does"),
|
|
121590
|
+
parameters: zod_1.z.array(zod_1.z.object({
|
|
121591
|
+
name: zod_1.z.string(),
|
|
121592
|
+
type: zod_1.z.enum(["string", "number", "boolean", "object", "array"]),
|
|
121593
|
+
required: zod_1.z.boolean().default(false),
|
|
121594
|
+
location: zod_1.z.enum(["path", "query", "body"]).default("body")
|
|
121595
|
+
})).default([]).describe("Input parameters"),
|
|
121596
|
+
response: zod_1.z.object({
|
|
121597
|
+
statusCode: zod_1.z.number().default(200),
|
|
121598
|
+
type: zod_1.z.enum(["string", "number", "boolean", "object", "array"]).default("object")
|
|
121599
|
+
}).describe("Expected response")
|
|
121600
|
+
});
|
|
121601
|
+
var DataModelSchema = zod_1.z.object({
|
|
121602
|
+
name: zod_1.z.string().describe("Name of the data model"),
|
|
121603
|
+
properties: zod_1.z.record(zod_1.z.string(), zod_1.z.object({
|
|
121604
|
+
type: zod_1.z.enum(["string", "number", "boolean", "object", "array"]),
|
|
121605
|
+
required: zod_1.z.boolean().default(false)
|
|
121606
|
+
})).describe("Properties of the model")
|
|
121607
|
+
});
|
|
121608
|
+
exports2.ApiSpecSchema = zod_1.z.object({
|
|
121609
|
+
name: zod_1.z.string().describe("Name of the API"),
|
|
121610
|
+
description: zod_1.z.string().describe("Overall description of the API"),
|
|
121611
|
+
endpoints: zod_1.z.array(EndpointSchema).describe("List of API endpoints to implement"),
|
|
121612
|
+
dataModels: zod_1.z.array(DataModelSchema).default([]).describe("Shared data models/types")
|
|
121613
|
+
}).describe("Complete API specification");
|
|
121614
|
+
}
|
|
121615
|
+
});
|
|
124815
121616
|
|
|
124816
|
-
|
|
124817
|
-
|
|
121617
|
+
// dist/EmbeddedScriptSchema.js
|
|
121618
|
+
var require_EmbeddedScriptSchema = __commonJS({
|
|
121619
|
+
"dist/EmbeddedScriptSchema.js"(exports2) {
|
|
121620
|
+
"use strict";
|
|
121621
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
121622
|
+
exports2.EmbeddedScriptParametersSchema = exports2.DynamicParameterSchema = void 0;
|
|
121623
|
+
var zod_1 = require_zod();
|
|
121624
|
+
var ParameterTypeEnum = zod_1.z.enum([
|
|
121625
|
+
"TEXT",
|
|
121626
|
+
"NUMBER",
|
|
121627
|
+
"BOOLEAN",
|
|
121628
|
+
"IMAGE",
|
|
121629
|
+
"DATE",
|
|
121630
|
+
"DATETIME",
|
|
121631
|
+
"URL",
|
|
121632
|
+
"SELECT",
|
|
121633
|
+
"COLOR"
|
|
121634
|
+
]).describe("The data type of a dynamic parameter for embedded scripts");
|
|
121635
|
+
exports2.DynamicParameterSchema = zod_1.z.object({
|
|
121636
|
+
key: zod_1.z.string().describe("The template variable name used as {{key}} in the embedded script (lowerCamelCase)"),
|
|
121637
|
+
displayName: zod_1.z.string().describe("Human-readable label for the dashboard UI"),
|
|
121638
|
+
type: ParameterTypeEnum.describe("The data type of the parameter"),
|
|
121639
|
+
description: zod_1.z.string().optional().describe("Help text explaining the parameter's purpose"),
|
|
121640
|
+
required: zod_1.z.boolean().describe("Whether the parameter must have a value"),
|
|
121641
|
+
defaultValue: zod_1.z.string().optional().describe("Default value if not set by the user"),
|
|
121642
|
+
options: zod_1.z.array(zod_1.z.string()).optional().describe("For SELECT type parameters, the available options")
|
|
121643
|
+
}).describe("A dynamic parameter definition for embedded script configuration");
|
|
121644
|
+
exports2.EmbeddedScriptParametersSchema = zod_1.z.object({
|
|
121645
|
+
extensionId: zod_1.z.string().describe("The name of the embedded script extension these parameters belong to"),
|
|
121646
|
+
parameters: zod_1.z.array(exports2.DynamicParameterSchema).default([]).describe("Array of dynamic parameter definitions for this embedded script")
|
|
121647
|
+
}).describe("Dynamic parameters configuration for a specific embedded script extension");
|
|
124818
121648
|
}
|
|
124819
121649
|
});
|
|
124820
121650
|
|
|
124821
|
-
// dist/agents/
|
|
124822
|
-
var
|
|
124823
|
-
"dist/agents/
|
|
121651
|
+
// dist/agents/PlannerAgent.js
|
|
121652
|
+
var require_PlannerAgent = __commonJS({
|
|
121653
|
+
"dist/agents/PlannerAgent.js"(exports2) {
|
|
124824
121654
|
"use strict";
|
|
124825
121655
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
124826
|
-
exports2.
|
|
121656
|
+
exports2.PlannerAgent = exports2.PlannerOutputSchema = void 0;
|
|
121657
|
+
var types_1 = require_types_impl();
|
|
124827
121658
|
var anthropic_1 = require_dist5();
|
|
124828
121659
|
var ai_1 = require_dist9();
|
|
124829
121660
|
var zod_1 = require_zod();
|
|
121661
|
+
var planner_1 = require_planner();
|
|
121662
|
+
var CMSSchema_1 = require_CMSSchema();
|
|
124830
121663
|
var utils_1 = require_utils14();
|
|
124831
|
-
var
|
|
124832
|
-
var
|
|
124833
|
-
|
|
124834
|
-
|
|
124835
|
-
|
|
124836
|
-
|
|
124837
|
-
});
|
|
124838
|
-
var DataGenerationOutputSchema = zod_1.z.object({
|
|
124839
|
-
collections: zod_1.z.array(zod_1.z.object({
|
|
124840
|
-
dataCollectionId: zod_1.z.string(),
|
|
124841
|
-
dataItems: zod_1.z.array(DataItemSchema).min(0).max(10)
|
|
124842
|
-
}))
|
|
124843
|
-
});
|
|
124844
|
-
var DataFixOutputSchema = zod_1.z.object({
|
|
124845
|
-
fixedDataItems: zod_1.z.array(DataItemSchema)
|
|
121664
|
+
var ApiSpecSchema_1 = require_ApiSpecSchema();
|
|
121665
|
+
var EmbeddedScriptSchema_1 = require_EmbeddedScriptSchema();
|
|
121666
|
+
exports2.PlannerOutputSchema = zod_1.z.object({
|
|
121667
|
+
collections: zod_1.z.array(CMSSchema_1.CmsCollectionSchema).default([]).describe("CMS collections to be created for the app"),
|
|
121668
|
+
embeddedScriptParameters: zod_1.z.array(EmbeddedScriptSchema_1.EmbeddedScriptParametersSchema).default([]).describe("Dynamic parameters for embedded script extensions (empty array if no embedded scripts)"),
|
|
121669
|
+
apiSpec: ApiSpecSchema_1.ApiSpecSchema.optional().describe("API specification for the app, don't return anything if no backend API extensions")
|
|
124846
121670
|
});
|
|
124847
|
-
var
|
|
121671
|
+
var PlannerAgent = class {
|
|
124848
121672
|
constructor(apiKey) {
|
|
124849
121673
|
this.apiKey = apiKey;
|
|
124850
|
-
this.name = "
|
|
124851
|
-
}
|
|
124852
|
-
|
|
124853
|
-
return (0,
|
|
124854
|
-
}
|
|
124855
|
-
formatCollectionsInfo(collections) {
|
|
124856
|
-
return collections.map((collection) => ({
|
|
124857
|
-
dataCollectionId: collection.id,
|
|
124858
|
-
displayName: collection.displayName,
|
|
124859
|
-
fields: collection.fields?.map((field) => ({
|
|
124860
|
-
key: field.key,
|
|
124861
|
-
displayName: field.displayName,
|
|
124862
|
-
type: field.type
|
|
124863
|
-
})) || []
|
|
124864
|
-
}));
|
|
121674
|
+
this.name = "PlannerAgent";
|
|
121675
|
+
}
|
|
121676
|
+
buildSystemPrompt(hasEmbeddedScriptExtensions, hasBackendApiExtensions) {
|
|
121677
|
+
return (0, planner_1.plannerPrompt)(hasEmbeddedScriptExtensions, hasBackendApiExtensions);
|
|
124865
121678
|
}
|
|
124866
|
-
async
|
|
124867
|
-
const
|
|
124868
|
-
const
|
|
124869
|
-
|
|
124870
|
-
}
|
|
124871
|
-
buildPrompt(collections, blueprint, errorContext) {
|
|
124872
|
-
const collectionsInfo = this.formatCollectionsInfo(collections);
|
|
124873
|
-
const summary = blueprint.summary || "No summary provided";
|
|
124874
|
-
if (errorContext) {
|
|
124875
|
-
return `Fix the data items to resolve the insertion error.
|
|
124876
|
-
Blueprint Summary: ${summary}
|
|
124877
|
-
Collection Schema: ${JSON.stringify(collectionsInfo, null, 2)}
|
|
124878
|
-
Error Message: ${errorContext.error}
|
|
124879
|
-
Original Data Items: ${JSON.stringify(errorContext.originalItems, null, 2)}
|
|
124880
|
-
Analyze the error and return corrected data items that will successfully insert into the collection.`;
|
|
124881
|
-
}
|
|
124882
|
-
return `Generate realistic sample data for the following CMS collections based on the app blueprint:
|
|
124883
|
-
Blueprint Summary: ${summary}
|
|
124884
|
-
Collections to populate: ${JSON.stringify(collectionsInfo, null, 2)}
|
|
124885
|
-
Generate diverse, realistic sample data that would be appropriate for this type of application. Ensure the data makes sense in the context of the app's purpose.`;
|
|
124886
|
-
}
|
|
124887
|
-
async generateData(schema, systemPrompt, userPrompt, functionId) {
|
|
121679
|
+
async generate(blueprint) {
|
|
121680
|
+
const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-3-5-haiku-latest");
|
|
121681
|
+
const hasEmbeddedScriptExtensions = blueprint?.extensions?.some((ext) => ext.type === types_1.ExtensionType.EMBEDDED_SCRIPT) ?? false;
|
|
121682
|
+
const hasBackendApiExtensions = blueprint?.extensions?.some((ext) => ext.type === types_1.ExtensionType.BACKEND_API) ?? false;
|
|
124888
121683
|
const result = await (0, ai_1.generateObject)({
|
|
124889
|
-
model
|
|
124890
|
-
schema,
|
|
124891
|
-
|
|
124892
|
-
|
|
121684
|
+
model,
|
|
121685
|
+
schema: exports2.PlannerOutputSchema,
|
|
121686
|
+
messages: [
|
|
121687
|
+
{
|
|
121688
|
+
role: "system",
|
|
121689
|
+
content: this.buildSystemPrompt(hasEmbeddedScriptExtensions, hasBackendApiExtensions),
|
|
121690
|
+
providerOptions: (0, utils_1.withCaching)("1h")
|
|
121691
|
+
},
|
|
121692
|
+
{
|
|
121693
|
+
role: "user",
|
|
121694
|
+
content: JSON.stringify(blueprint ?? {}, null, 2)
|
|
121695
|
+
}
|
|
121696
|
+
],
|
|
124893
121697
|
maxRetries: 3,
|
|
124894
|
-
|
|
121698
|
+
temperature: 0,
|
|
121699
|
+
experimental_telemetry: {
|
|
121700
|
+
isEnabled: true,
|
|
121701
|
+
functionId: this.name
|
|
121702
|
+
}
|
|
124895
121703
|
});
|
|
124896
121704
|
return result.object;
|
|
124897
121705
|
}
|
|
124898
|
-
async generate(payload) {
|
|
124899
|
-
const { siteId, accessToken, collections, blueprint } = payload;
|
|
124900
|
-
if (!collections?.length)
|
|
124901
|
-
return { results: [] };
|
|
124902
|
-
const generatedData = await this.generateData(DataGenerationOutputSchema, (0, dataGenerationPrompt_1.dataGenerationPrompt)(), this.buildPrompt(collections, blueprint), this.name);
|
|
124903
|
-
const results = [];
|
|
124904
|
-
for (const collectionData of generatedData.collections) {
|
|
124905
|
-
const collection = collections.find((c) => c.id === collectionData.dataCollectionId);
|
|
124906
|
-
if (!collection) {
|
|
124907
|
-
console.warn(`\u26A0\uFE0F Collection ${collectionData.dataCollectionId} not found, skipping...`);
|
|
124908
|
-
continue;
|
|
124909
|
-
}
|
|
124910
|
-
let dataItems = collectionData.dataItems;
|
|
124911
|
-
if (!dataItems.length) {
|
|
124912
|
-
console.log(`\u23ED\uFE0F No sample data generated for "${collection.displayName}"`);
|
|
124913
|
-
continue;
|
|
124914
|
-
}
|
|
124915
|
-
let success = false;
|
|
124916
|
-
let lastError;
|
|
124917
|
-
for (let attempt = 0; attempt < 3 && !success; attempt++) {
|
|
124918
|
-
try {
|
|
124919
|
-
const insertResult = await this.bulkInsertItems(siteId, accessToken, collectionData.dataCollectionId, dataItems);
|
|
124920
|
-
results.push({
|
|
124921
|
-
collectionId: collection.id,
|
|
124922
|
-
insertedCount: insertResult.results?.length || 0
|
|
124923
|
-
});
|
|
124924
|
-
success = true;
|
|
124925
|
-
} catch (error) {
|
|
124926
|
-
lastError = (0, utils_1.getErrorMessage)(error);
|
|
124927
|
-
const systemPrompt = this.buildPrompt([collection], blueprint, {
|
|
124928
|
-
error: lastError,
|
|
124929
|
-
originalItems: dataItems
|
|
124930
|
-
});
|
|
124931
|
-
const fixedData = await this.generateData(DataFixOutputSchema, (0, dataFixPrompt_1.dataFixPrompt)(), systemPrompt, `${this.name}_fix`);
|
|
124932
|
-
dataItems = fixedData.fixedDataItems;
|
|
124933
|
-
}
|
|
124934
|
-
}
|
|
124935
|
-
if (!success) {
|
|
124936
|
-
console.error(`\u274C Failed to insert data for collection "${collection.displayName}", error: ${lastError}`);
|
|
124937
|
-
}
|
|
124938
|
-
}
|
|
124939
|
-
return { results };
|
|
124940
|
-
}
|
|
124941
121706
|
};
|
|
124942
|
-
exports2.
|
|
124943
|
-
exports2.default =
|
|
121707
|
+
exports2.PlannerAgent = PlannerAgent;
|
|
121708
|
+
exports2.default = PlannerAgent;
|
|
124944
121709
|
}
|
|
124945
121710
|
});
|
|
124946
121711
|
|
|
@@ -125161,7 +121926,7 @@ var require_BackendEventAgent = __commonJS({
|
|
|
125161
121926
|
const { blueprint, planAndResources } = params;
|
|
125162
121927
|
const examples = (0, load_examples_1.default)([load_examples_1.types.BackendEvent]);
|
|
125163
121928
|
const allApiNames = (0, utils_1.extractApiNames)(params.extension);
|
|
125164
|
-
const useData = Boolean(planAndResources?.
|
|
121929
|
+
const useData = Boolean(planAndResources?.collections?.length);
|
|
125165
121930
|
const systemPrompt = `${this.buildSystemPrompt(allApiNames, useData)}
|
|
125166
121931
|
${examples}
|
|
125167
121932
|
`;
|
|
@@ -127308,7 +124073,7 @@ var require_DashboardPageAgent = __commonJS({
|
|
|
127308
124073
|
async generate(params) {
|
|
127309
124074
|
const { blueprint, planAndResources } = params;
|
|
127310
124075
|
const examples = (0, load_examples_1.loadExamples)([load_examples_1.types.DashboardPage]);
|
|
127311
|
-
const useData = Boolean(planAndResources?.
|
|
124076
|
+
const useData = Boolean(planAndResources?.collections?.length);
|
|
127312
124077
|
const useApiSpec = Boolean(planAndResources?.apiSpec);
|
|
127313
124078
|
const useDynamicParameters = Boolean(planAndResources?.embeddedScriptParameters?.length);
|
|
127314
124079
|
const apiNames = (0, utils_1.extractApiNames)(params.extension);
|
|
@@ -127624,7 +124389,7 @@ var require_DashboardDecisionAgent = __commonJS({
|
|
|
127624
124389
|
const hasEmbeddedScriptExtension = blueprint?.extensions?.some((ext) => ext.type === types_1.ExtensionType.EMBEDDED_SCRIPT) ?? false;
|
|
127625
124390
|
const hasOneDashboardPageExtension = blueprint?.extensions?.filter((ext) => ext.type === types_1.ExtensionType.DASHBOARD_PAGE).length === 1;
|
|
127626
124391
|
const shouldImplementEmbeddedScriptParameters = hasOneDashboardPageExtension && hasEmbeddedScriptExtension;
|
|
127627
|
-
if (!planAndResources?.
|
|
124392
|
+
if (!planAndResources?.collections?.length || shouldImplementEmbeddedScriptParameters) {
|
|
127628
124393
|
return true;
|
|
127629
124394
|
}
|
|
127630
124395
|
return false;
|
|
@@ -127894,17 +124659,21 @@ var require_dist13 = __commonJS({
|
|
|
127894
124659
|
var require_AutoPatternsGenerator = __commonJS({
|
|
127895
124660
|
"dist/agents/AutoPatternsGenerator.js"(exports2) {
|
|
127896
124661
|
"use strict";
|
|
124662
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod2) {
|
|
124663
|
+
return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
|
|
124664
|
+
};
|
|
127897
124665
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
127898
124666
|
exports2.AutoPatternsGenerator = void 0;
|
|
127899
124667
|
var ditto_scaffolding_1 = require_dist13();
|
|
124668
|
+
var path_1 = __importDefault2(require("path"));
|
|
127900
124669
|
var AutoPatternsGenerator = class {
|
|
127901
124670
|
constructor() {
|
|
127902
124671
|
this.name = "AutoPatternsGenerator";
|
|
127903
124672
|
}
|
|
127904
|
-
generate({ collection, decision, extensionName }) {
|
|
124673
|
+
generate({ collection, decision, extensionName, appNamespace }) {
|
|
127905
124674
|
const name = (0, ditto_scaffolding_1.toKebabCase)(extensionName);
|
|
127906
124675
|
const path2 = `src/dashboard/pages/${name}`;
|
|
127907
|
-
const patternsConfig = this.generatePatternsConfig(collection, decision);
|
|
124676
|
+
const patternsConfig = this.generatePatternsConfig(collection, appNamespace, decision);
|
|
127908
124677
|
const pageTsx = this.generatePageTsx();
|
|
127909
124678
|
return [
|
|
127910
124679
|
{
|
|
@@ -127919,7 +124688,8 @@ var require_AutoPatternsGenerator = __commonJS({
|
|
|
127919
124688
|
}
|
|
127920
124689
|
];
|
|
127921
124690
|
}
|
|
127922
|
-
generatePatternsConfig(collection, contentResult) {
|
|
124691
|
+
generatePatternsConfig(collection, appNamespace, contentResult) {
|
|
124692
|
+
const fullCollectionId = path_1.default.join(appNamespace, collection.id);
|
|
127923
124693
|
const collectionRouteId = contentResult.schema?.content?.collectionRouteId;
|
|
127924
124694
|
const singularEntityName = contentResult.schema?.content?.singularEntityName;
|
|
127925
124695
|
const fieldMap = new Map(collection.fields?.filter((field) => field.key && field.displayName).map((field) => [field.key, field]) || []);
|
|
@@ -128028,7 +124798,7 @@ var require_AutoPatternsGenerator = __commonJS({
|
|
|
128028
124798
|
type: "create",
|
|
128029
124799
|
label: contentResult.schema?.content.actionButtonLabel,
|
|
128030
124800
|
collection: {
|
|
128031
|
-
collectionId:
|
|
124801
|
+
collectionId: fullCollectionId,
|
|
128032
124802
|
entityTypeSource: "cms"
|
|
128033
124803
|
},
|
|
128034
124804
|
create: {
|
|
@@ -128047,7 +124817,7 @@ var require_AutoPatternsGenerator = __commonJS({
|
|
|
128047
124817
|
layout,
|
|
128048
124818
|
entityPageId: `${collectionRouteId}-entity`,
|
|
128049
124819
|
collection: {
|
|
128050
|
-
collectionId:
|
|
124820
|
+
collectionId: fullCollectionId,
|
|
128051
124821
|
entityTypeSource: "cms"
|
|
128052
124822
|
},
|
|
128053
124823
|
toolbarTitle: {
|
|
@@ -128162,7 +124932,7 @@ var require_AutoPatternsGenerator = __commonJS({
|
|
|
128162
124932
|
},
|
|
128163
124933
|
parentPageId: `${collectionRouteId}-collection`,
|
|
128164
124934
|
layout: this.generateEntityPageLayout(contentResult.schema?.layout),
|
|
128165
|
-
collectionId:
|
|
124935
|
+
collectionId: fullCollectionId,
|
|
128166
124936
|
entityTypeSource: "cms"
|
|
128167
124937
|
}
|
|
128168
124938
|
}
|
|
@@ -128503,7 +125273,7 @@ var require_EmbeddedScriptAgent = __commonJS({
|
|
|
128503
125273
|
const examples = (0, load_examples_1.loadExamples)([load_examples_1.types.EmbeddedScript]);
|
|
128504
125274
|
const hasDynamicParameters = Boolean(planAndResources?.embeddedScriptParameters && planAndResources.embeddedScriptParameters.length > 0);
|
|
128505
125275
|
const apiNames = (0, utils_1.extractApiNames)(params.extension);
|
|
128506
|
-
const useData = Boolean(planAndResources?.
|
|
125276
|
+
const useData = Boolean(planAndResources?.collections?.length);
|
|
128507
125277
|
const systemPrompt = `${this.buildSystemPrompt(hasDynamicParameters, apiNames, useData)}
|
|
128508
125278
|
${examples}
|
|
128509
125279
|
`;
|
|
@@ -128558,8 +125328,6 @@ var require_AgentsFactory = __commonJS({
|
|
|
128558
125328
|
var types_1 = require_types_impl();
|
|
128559
125329
|
var SPIAgent_1 = require_SPIAgent();
|
|
128560
125330
|
var PlannerAgent_1 = __importDefault2(require_PlannerAgent());
|
|
128561
|
-
var CMSAgent_1 = require_CMSAgent();
|
|
128562
|
-
var CMSDataAgent_1 = require_CMSDataAgent();
|
|
128563
125331
|
var SiteComponentAgent_1 = __importDefault2(require_SiteComponentAgent());
|
|
128564
125332
|
var BackendEventAgent_1 = __importDefault2(require_BackendEventAgent());
|
|
128565
125333
|
var BackendApiAgent_1 = require_BackendApiAgent();
|
|
@@ -128579,10 +125347,6 @@ var require_AgentsFactory = __commonJS({
|
|
|
128579
125347
|
return new SPIAgent_1.SPIAgent(this.apiKey);
|
|
128580
125348
|
case types_1.ExtensionType.DASHBOARD_PAGE:
|
|
128581
125349
|
return new DashboardPageAgent_1.default(this.apiKey);
|
|
128582
|
-
case "CMS":
|
|
128583
|
-
return new CMSAgent_1.CmsAgent(this.apiKey);
|
|
128584
|
-
case "CMS_DATA":
|
|
128585
|
-
return new CMSDataAgent_1.CMSDataAgent(this.apiKey);
|
|
128586
125350
|
case "PLANNER":
|
|
128587
125351
|
return new PlannerAgent_1.default(this.apiKey);
|
|
128588
125352
|
case "ITERATION_AGENT":
|
|
@@ -128645,25 +125409,6 @@ var require_cli_listeners = __commonJS({
|
|
|
128645
125409
|
timer.delete(name);
|
|
128646
125410
|
console.log(`\u{1F916}\u2714\uFE0F Generated ${extId(extension)} (${name}) \u2192 ${files.map((f) => f.path).join(", ")} in ${duration / 1e3}s`);
|
|
128647
125411
|
});
|
|
128648
|
-
orchestrator.onEvent("cms:start", () => {
|
|
128649
|
-
timer.set("CmsAgent", Date.now());
|
|
128650
|
-
console.log("\u{1F916} Generating CMS...");
|
|
128651
|
-
});
|
|
128652
|
-
orchestrator.onEvent("cms:done", ({ numberOfCollections }) => {
|
|
128653
|
-
const duration = Date.now() - timer.get("CmsAgent");
|
|
128654
|
-
timer.delete("CmsAgent");
|
|
128655
|
-
console.log(`\u{1F916}\u2714\uFE0F Generated CMS in ${duration / 1e3}s`);
|
|
128656
|
-
console.log(`\u{1F4C1} Generated ${numberOfCollections} collections`);
|
|
128657
|
-
});
|
|
128658
|
-
orchestrator.onEvent("cms-data:start", ({ numberOfCollections }) => {
|
|
128659
|
-
timer.set("CMSDataAgent", Date.now());
|
|
128660
|
-
console.log(`\u{1F3AF} Populating ${numberOfCollections} collections with sample data...`);
|
|
128661
|
-
});
|
|
128662
|
-
orchestrator.onEvent("cms-data:done", ({ numberOfCollections, totalItemsInserted }) => {
|
|
128663
|
-
const duration = Date.now() - timer.get("CMSDataAgent");
|
|
128664
|
-
timer.delete("CMSDataAgent");
|
|
128665
|
-
console.log(`\u{1F3AF}\u2714\uFE0F Populated ${numberOfCollections} collections with ${totalItemsInserted} items in ${duration / 1e3}s`);
|
|
128666
|
-
});
|
|
128667
125412
|
orchestrator.onEvent("planner:start", () => {
|
|
128668
125413
|
timer.set("PlannerAgent", Date.now());
|
|
128669
125414
|
console.log("\u{1F916} Generating plan...");
|
|
@@ -128697,7 +125442,7 @@ var require_cli_listeners = __commonJS({
|
|
|
128697
125442
|
});
|
|
128698
125443
|
|
|
128699
125444
|
// dist/utils.js
|
|
128700
|
-
var
|
|
125445
|
+
var require_utils15 = __commonJS({
|
|
128701
125446
|
"dist/utils.js"(exports2) {
|
|
128702
125447
|
"use strict";
|
|
128703
125448
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -129928,7 +126673,7 @@ var require_fs = __commonJS({
|
|
|
129928
126673
|
});
|
|
129929
126674
|
|
|
129930
126675
|
// ../../node_modules/fs-extra/lib/mkdirs/utils.js
|
|
129931
|
-
var
|
|
126676
|
+
var require_utils16 = __commonJS({
|
|
129932
126677
|
"../../node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
|
|
129933
126678
|
"use strict";
|
|
129934
126679
|
var path2 = require("path");
|
|
@@ -129950,7 +126695,7 @@ var require_make_dir = __commonJS({
|
|
|
129950
126695
|
"../../node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
|
|
129951
126696
|
"use strict";
|
|
129952
126697
|
var fs4 = require_fs();
|
|
129953
|
-
var { checkPath } =
|
|
126698
|
+
var { checkPath } = require_utils16();
|
|
129954
126699
|
var getMode = (options) => {
|
|
129955
126700
|
const defaults = { mode: 511 };
|
|
129956
126701
|
if (typeof options === "number") return options;
|
|
@@ -130843,7 +127588,7 @@ var require_ensure = __commonJS({
|
|
|
130843
127588
|
});
|
|
130844
127589
|
|
|
130845
127590
|
// ../../node_modules/jsonfile/utils.js
|
|
130846
|
-
var
|
|
127591
|
+
var require_utils17 = __commonJS({
|
|
130847
127592
|
"../../node_modules/jsonfile/utils.js"(exports2, module2) {
|
|
130848
127593
|
function stringify(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
|
|
130849
127594
|
const EOF = finalEOL ? EOL : "";
|
|
@@ -130868,7 +127613,7 @@ var require_jsonfile = __commonJS({
|
|
|
130868
127613
|
_fs = require("fs");
|
|
130869
127614
|
}
|
|
130870
127615
|
var universalify = require_universalify();
|
|
130871
|
-
var { stringify, stripBom } =
|
|
127616
|
+
var { stringify, stripBom } = require_utils17();
|
|
130872
127617
|
async function _readFile(file, options = {}) {
|
|
130873
127618
|
if (typeof options === "string") {
|
|
130874
127619
|
options = { encoding: options };
|
|
@@ -130979,7 +127724,7 @@ var require_output_file = __commonJS({
|
|
|
130979
127724
|
var require_output_json = __commonJS({
|
|
130980
127725
|
"../../node_modules/fs-extra/lib/json/output-json.js"(exports2, module2) {
|
|
130981
127726
|
"use strict";
|
|
130982
|
-
var { stringify } =
|
|
127727
|
+
var { stringify } = require_utils17();
|
|
130983
127728
|
var { outputFile } = require_output_file();
|
|
130984
127729
|
async function outputJson(file, data, options = {}) {
|
|
130985
127730
|
const str = stringify(data, options);
|
|
@@ -130993,7 +127738,7 @@ var require_output_json = __commonJS({
|
|
|
130993
127738
|
var require_output_json_sync = __commonJS({
|
|
130994
127739
|
"../../node_modules/fs-extra/lib/json/output-json-sync.js"(exports2, module2) {
|
|
130995
127740
|
"use strict";
|
|
130996
|
-
var { stringify } =
|
|
127741
|
+
var { stringify } = require_utils17();
|
|
130997
127742
|
var { outputFileSync } = require_output_file();
|
|
130998
127743
|
function outputJsonSync(file, data, options) {
|
|
130999
127744
|
const str = stringify(data, options);
|
|
@@ -131919,7 +128664,7 @@ var require_glob_parent = __commonJS({
|
|
|
131919
128664
|
});
|
|
131920
128665
|
|
|
131921
128666
|
// ../../node_modules/braces/lib/utils.js
|
|
131922
|
-
var
|
|
128667
|
+
var require_utils18 = __commonJS({
|
|
131923
128668
|
"../../node_modules/braces/lib/utils.js"(exports2) {
|
|
131924
128669
|
"use strict";
|
|
131925
128670
|
exports2.isInteger = (num) => {
|
|
@@ -132004,7 +128749,7 @@ var require_utils21 = __commonJS({
|
|
|
132004
128749
|
var require_stringify = __commonJS({
|
|
132005
128750
|
"../../node_modules/braces/lib/stringify.js"(exports2, module2) {
|
|
132006
128751
|
"use strict";
|
|
132007
|
-
var utils =
|
|
128752
|
+
var utils = require_utils18();
|
|
132008
128753
|
module2.exports = (ast, options = {}) => {
|
|
132009
128754
|
const stringify = (node, parent = {}) => {
|
|
132010
128755
|
const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
|
|
@@ -132457,7 +129202,7 @@ var require_compile = __commonJS({
|
|
|
132457
129202
|
"../../node_modules/braces/lib/compile.js"(exports2, module2) {
|
|
132458
129203
|
"use strict";
|
|
132459
129204
|
var fill = require_fill_range();
|
|
132460
|
-
var utils =
|
|
129205
|
+
var utils = require_utils18();
|
|
132461
129206
|
var compile = (ast, options = {}) => {
|
|
132462
129207
|
const walk = (node, parent = {}) => {
|
|
132463
129208
|
const invalidBlock = utils.isInvalidBrace(parent);
|
|
@@ -132510,7 +129255,7 @@ var require_expand = __commonJS({
|
|
|
132510
129255
|
"use strict";
|
|
132511
129256
|
var fill = require_fill_range();
|
|
132512
129257
|
var stringify = require_stringify();
|
|
132513
|
-
var utils =
|
|
129258
|
+
var utils = require_utils18();
|
|
132514
129259
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
132515
129260
|
const result = [];
|
|
132516
129261
|
queue = [].concat(queue);
|
|
@@ -133198,7 +129943,7 @@ var require_constants7 = __commonJS({
|
|
|
133198
129943
|
});
|
|
133199
129944
|
|
|
133200
129945
|
// ../../node_modules/picomatch/lib/utils.js
|
|
133201
|
-
var
|
|
129946
|
+
var require_utils19 = __commonJS({
|
|
133202
129947
|
"../../node_modules/picomatch/lib/utils.js"(exports2) {
|
|
133203
129948
|
"use strict";
|
|
133204
129949
|
var path2 = require("path");
|
|
@@ -133262,7 +130007,7 @@ var require_utils22 = __commonJS({
|
|
|
133262
130007
|
var require_scan = __commonJS({
|
|
133263
130008
|
"../../node_modules/picomatch/lib/scan.js"(exports2, module2) {
|
|
133264
130009
|
"use strict";
|
|
133265
|
-
var utils =
|
|
130010
|
+
var utils = require_utils19();
|
|
133266
130011
|
var {
|
|
133267
130012
|
CHAR_ASTERISK,
|
|
133268
130013
|
/* * */
|
|
@@ -133593,7 +130338,7 @@ var require_parse5 = __commonJS({
|
|
|
133593
130338
|
"../../node_modules/picomatch/lib/parse.js"(exports2, module2) {
|
|
133594
130339
|
"use strict";
|
|
133595
130340
|
var constants = require_constants7();
|
|
133596
|
-
var utils =
|
|
130341
|
+
var utils = require_utils19();
|
|
133597
130342
|
var {
|
|
133598
130343
|
MAX_LENGTH,
|
|
133599
130344
|
POSIX_REGEX_SOURCE,
|
|
@@ -134368,7 +131113,7 @@ var require_picomatch = __commonJS({
|
|
|
134368
131113
|
var path2 = require("path");
|
|
134369
131114
|
var scan = require_scan();
|
|
134370
131115
|
var parse = require_parse5();
|
|
134371
|
-
var utils =
|
|
131116
|
+
var utils = require_utils19();
|
|
134372
131117
|
var constants = require_constants7();
|
|
134373
131118
|
var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
|
|
134374
131119
|
var picomatch = (glob, options, returnState = false) => {
|
|
@@ -134517,7 +131262,7 @@ var require_micromatch = __commonJS({
|
|
|
134517
131262
|
var util = require("util");
|
|
134518
131263
|
var braces = require_braces();
|
|
134519
131264
|
var picomatch = require_picomatch2();
|
|
134520
|
-
var utils =
|
|
131265
|
+
var utils = require_utils19();
|
|
134521
131266
|
var isEmptyString = (v) => v === "" || v === "./";
|
|
134522
131267
|
var hasBraces = (v) => {
|
|
134523
131268
|
const index = v.indexOf("{");
|
|
@@ -134996,7 +131741,7 @@ var require_string = __commonJS({
|
|
|
134996
131741
|
});
|
|
134997
131742
|
|
|
134998
131743
|
// ../../node_modules/fast-glob/out/utils/index.js
|
|
134999
|
-
var
|
|
131744
|
+
var require_utils20 = __commonJS({
|
|
135000
131745
|
"../../node_modules/fast-glob/out/utils/index.js"(exports2) {
|
|
135001
131746
|
"use strict";
|
|
135002
131747
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -135024,7 +131769,7 @@ var require_tasks = __commonJS({
|
|
|
135024
131769
|
"use strict";
|
|
135025
131770
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
135026
131771
|
exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0;
|
|
135027
|
-
var utils =
|
|
131772
|
+
var utils = require_utils20();
|
|
135028
131773
|
function generate(input, settings) {
|
|
135029
131774
|
const patterns = processPatterns(input, settings);
|
|
135030
131775
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -135367,7 +132112,7 @@ var require_fs4 = __commonJS({
|
|
|
135367
132112
|
});
|
|
135368
132113
|
|
|
135369
132114
|
// ../../node_modules/@nodelib/fs.scandir/out/utils/index.js
|
|
135370
|
-
var
|
|
132115
|
+
var require_utils21 = __commonJS({
|
|
135371
132116
|
"../../node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) {
|
|
135372
132117
|
"use strict";
|
|
135373
132118
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -135402,7 +132147,7 @@ var require_async4 = __commonJS({
|
|
|
135402
132147
|
var fsStat = require_out();
|
|
135403
132148
|
var rpl = require_run_parallel();
|
|
135404
132149
|
var constants_1 = require_constants8();
|
|
135405
|
-
var utils =
|
|
132150
|
+
var utils = require_utils21();
|
|
135406
132151
|
var common = require_common4();
|
|
135407
132152
|
function read(directory, settings, callback) {
|
|
135408
132153
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -135511,7 +132256,7 @@ var require_sync3 = __commonJS({
|
|
|
135511
132256
|
exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
|
|
135512
132257
|
var fsStat = require_out();
|
|
135513
132258
|
var constants_1 = require_constants8();
|
|
135514
|
-
var utils =
|
|
132259
|
+
var utils = require_utils21();
|
|
135515
132260
|
var common = require_common4();
|
|
135516
132261
|
function read(directory, settings) {
|
|
135517
132262
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -136335,7 +133080,7 @@ var require_reader3 = __commonJS({
|
|
|
136335
133080
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
136336
133081
|
var path2 = require("path");
|
|
136337
133082
|
var fsStat = require_out();
|
|
136338
|
-
var utils =
|
|
133083
|
+
var utils = require_utils20();
|
|
136339
133084
|
var Reader = class {
|
|
136340
133085
|
constructor(_settings) {
|
|
136341
133086
|
this._settings = _settings;
|
|
@@ -136468,7 +133213,7 @@ var require_matcher = __commonJS({
|
|
|
136468
133213
|
"../../node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) {
|
|
136469
133214
|
"use strict";
|
|
136470
133215
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
136471
|
-
var utils =
|
|
133216
|
+
var utils = require_utils20();
|
|
136472
133217
|
var Matcher = class {
|
|
136473
133218
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
136474
133219
|
this._patterns = _patterns;
|
|
@@ -136556,7 +133301,7 @@ var require_deep = __commonJS({
|
|
|
136556
133301
|
"../../node_modules/fast-glob/out/providers/filters/deep.js"(exports2) {
|
|
136557
133302
|
"use strict";
|
|
136558
133303
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
136559
|
-
var utils =
|
|
133304
|
+
var utils = require_utils20();
|
|
136560
133305
|
var partial_1 = require_partial();
|
|
136561
133306
|
var DeepFilter = class {
|
|
136562
133307
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -136621,7 +133366,7 @@ var require_entry = __commonJS({
|
|
|
136621
133366
|
"../../node_modules/fast-glob/out/providers/filters/entry.js"(exports2) {
|
|
136622
133367
|
"use strict";
|
|
136623
133368
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
136624
|
-
var utils =
|
|
133369
|
+
var utils = require_utils20();
|
|
136625
133370
|
var EntryFilter = class {
|
|
136626
133371
|
constructor(_settings, _micromatchOptions) {
|
|
136627
133372
|
this._settings = _settings;
|
|
@@ -136709,7 +133454,7 @@ var require_error3 = __commonJS({
|
|
|
136709
133454
|
"../../node_modules/fast-glob/out/providers/filters/error.js"(exports2) {
|
|
136710
133455
|
"use strict";
|
|
136711
133456
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
136712
|
-
var utils =
|
|
133457
|
+
var utils = require_utils20();
|
|
136713
133458
|
var ErrorFilter = class {
|
|
136714
133459
|
constructor(_settings) {
|
|
136715
133460
|
this._settings = _settings;
|
|
@@ -136730,7 +133475,7 @@ var require_entry2 = __commonJS({
|
|
|
136730
133475
|
"../../node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) {
|
|
136731
133476
|
"use strict";
|
|
136732
133477
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
136733
|
-
var utils =
|
|
133478
|
+
var utils = require_utils20();
|
|
136734
133479
|
var EntryTransformer = class {
|
|
136735
133480
|
constructor(_settings) {
|
|
136736
133481
|
this._settings = _settings;
|
|
@@ -137020,7 +133765,7 @@ var require_out4 = __commonJS({
|
|
|
137020
133765
|
var stream_1 = require_stream5();
|
|
137021
133766
|
var sync_1 = require_sync7();
|
|
137022
133767
|
var settings_1 = require_settings4();
|
|
137023
|
-
var utils =
|
|
133768
|
+
var utils = require_utils20();
|
|
137024
133769
|
async function FastGlob(source, options) {
|
|
137025
133770
|
assertPatternsInput2(source);
|
|
137026
133771
|
const works = getWorks(source, async_1.default, options);
|
|
@@ -138081,6 +134826,58 @@ var require_file_collector = __commonJS({
|
|
|
138081
134826
|
}
|
|
138082
134827
|
});
|
|
138083
134828
|
|
|
134829
|
+
// dist/cms/index.js
|
|
134830
|
+
var require_cms = __commonJS({
|
|
134831
|
+
"dist/cms/index.js"(exports2) {
|
|
134832
|
+
"use strict";
|
|
134833
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod2) {
|
|
134834
|
+
return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
|
|
134835
|
+
};
|
|
134836
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
134837
|
+
exports2.getDataExtensionAndCollectionsFiles = void 0;
|
|
134838
|
+
var path_1 = __importDefault2(require("path"));
|
|
134839
|
+
var crypto_1 = require("crypto");
|
|
134840
|
+
var getDataExtensionAndCollectionsFiles = ({ planAndResources, appNamespace }) => {
|
|
134841
|
+
if (!planAndResources.collections?.length) {
|
|
134842
|
+
return [];
|
|
134843
|
+
}
|
|
134844
|
+
const files = [];
|
|
134845
|
+
files.push({
|
|
134846
|
+
operation: "insert",
|
|
134847
|
+
path: path_1.default.join("src", "data", "extensions.ts"),
|
|
134848
|
+
content: `import { genericExtension } from '@wix/astro/builders';
|
|
134849
|
+
export const dataExtension = genericExtension({
|
|
134850
|
+
compId: '${(0, crypto_1.randomUUID)()}',
|
|
134851
|
+
compName: 'data-extension',
|
|
134852
|
+
compType: 'DATA_COMPONENT',
|
|
134853
|
+
compData: {
|
|
134854
|
+
dataComponent: {
|
|
134855
|
+
collections: [${planAndResources.collections.map((collection) => `{
|
|
134856
|
+
id: '${path_1.default.join(appNamespace, collection.id ?? "no-collection-id")}',
|
|
134857
|
+
schemaUrl: '{{BASE_URL}}/collections/${collection.id}/schema.json',
|
|
134858
|
+
}`).join(",\n")}]
|
|
134859
|
+
}
|
|
134860
|
+
}
|
|
134861
|
+
})
|
|
134862
|
+
`
|
|
134863
|
+
});
|
|
134864
|
+
planAndResources.collections.forEach((collection) => {
|
|
134865
|
+
if (!collection.id) {
|
|
134866
|
+
return;
|
|
134867
|
+
}
|
|
134868
|
+
const collectionDirPath = path_1.default.join("public", "collections", collection.id);
|
|
134869
|
+
files.push({
|
|
134870
|
+
operation: "insert",
|
|
134871
|
+
path: path_1.default.join(collectionDirPath, "schema.json"),
|
|
134872
|
+
content: JSON.stringify(collection, null, 2)
|
|
134873
|
+
});
|
|
134874
|
+
});
|
|
134875
|
+
return files;
|
|
134876
|
+
};
|
|
134877
|
+
exports2.getDataExtensionAndCollectionsFiles = getDataExtensionAndCollectionsFiles;
|
|
134878
|
+
}
|
|
134879
|
+
});
|
|
134880
|
+
|
|
138084
134881
|
// dist/orchestrator-error-helpers.js
|
|
138085
134882
|
var require_orchestrator_error_helpers = __commonJS({
|
|
138086
134883
|
"dist/orchestrator-error-helpers.js"(exports2) {
|
|
@@ -138138,12 +134935,13 @@ var require_orchestrator = __commonJS({
|
|
|
138138
134935
|
var types_1 = require_types_impl();
|
|
138139
134936
|
var ditto_scaffolding_1 = require_dist13();
|
|
138140
134937
|
var fs_1 = __importDefault2(require("fs"));
|
|
138141
|
-
var utils_1 =
|
|
134938
|
+
var utils_1 = require_utils15();
|
|
138142
134939
|
var ValidatorFactory_1 = __importDefault2(require_ValidatorFactory());
|
|
138143
134940
|
var FixerFactory_1 = __importDefault2(require_FixerFactory());
|
|
138144
134941
|
var extensionGenerators_1 = require_extensionGenerators();
|
|
138145
134942
|
var extensionIndexer_1 = require_extensionIndexer();
|
|
138146
134943
|
var file_collector_1 = require_file_collector();
|
|
134944
|
+
var cms_1 = require_cms();
|
|
138147
134945
|
var orchestrator_error_helpers_1 = require_orchestrator_error_helpers();
|
|
138148
134946
|
var MAX_ERRORS_PER_BATCH = 20;
|
|
138149
134947
|
var DittoOrchestrator = class extends events_1.EventEmitter {
|
|
@@ -138251,40 +135049,13 @@ var require_orchestrator = __commonJS({
|
|
|
138251
135049
|
}
|
|
138252
135050
|
}
|
|
138253
135051
|
async generatePlanAndResources(request) {
|
|
138254
|
-
const {
|
|
135052
|
+
const { blueprint } = request;
|
|
138255
135053
|
this.emitEvent("planner:start", {});
|
|
138256
135054
|
const planner = this.agentsFactory.getAgent({ type: "PLANNER" });
|
|
138257
135055
|
const plan = await planner.generate(blueprint);
|
|
138258
135056
|
console.log("Plan", JSON.stringify(plan));
|
|
138259
135057
|
this.emitEvent("planner:done", {});
|
|
138260
|
-
|
|
138261
|
-
if (plan?.collections?.length > 0 && siteId && siteId !== "N/A" && accessToken) {
|
|
138262
|
-
this.emitEvent("cms:start", {});
|
|
138263
|
-
const cmsAgent = this.agentsFactory.getAgent({ type: "CMS" });
|
|
138264
|
-
for (const collection of plan.collections) {
|
|
138265
|
-
const result2 = await cmsAgent.generate({
|
|
138266
|
-
blueprint,
|
|
138267
|
-
siteId,
|
|
138268
|
-
accessToken,
|
|
138269
|
-
collection
|
|
138270
|
-
});
|
|
138271
|
-
createdCollections.push(result2.collection);
|
|
138272
|
-
}
|
|
138273
|
-
this.emitEvent("cms:done", {
|
|
138274
|
-
numberOfCollections: plan.collections.length
|
|
138275
|
-
});
|
|
138276
|
-
}
|
|
138277
|
-
const result = {};
|
|
138278
|
-
if (createdCollections.length > 0) {
|
|
138279
|
-
result.createdCollections = createdCollections;
|
|
138280
|
-
}
|
|
138281
|
-
if (plan?.apiSpec) {
|
|
138282
|
-
result.apiSpec = plan.apiSpec;
|
|
138283
|
-
}
|
|
138284
|
-
if (plan?.embeddedScriptParameters) {
|
|
138285
|
-
result.embeddedScriptParameters = plan.embeddedScriptParameters;
|
|
138286
|
-
}
|
|
138287
|
-
return result;
|
|
135058
|
+
return plan;
|
|
138288
135059
|
}
|
|
138289
135060
|
async runIterationPlanningAndAugmentExtensions(outputPath, chatHistory) {
|
|
138290
135061
|
const iterationAgent = this.agentsFactory.getAgent({
|
|
@@ -138295,14 +135066,15 @@ var require_orchestrator = __commonJS({
|
|
|
138295
135066
|
const iterationPlan = await iterationAgent.generate(outputPath, candidateFiles, currentUserRequest, chatHistory);
|
|
138296
135067
|
return iterationPlan;
|
|
138297
135068
|
}
|
|
138298
|
-
async processExtension({ extension, blueprint, outputPath, planAndResources }) {
|
|
135069
|
+
async processExtension({ extension, blueprint, outputPath, planAndResources, appNamespace }) {
|
|
138299
135070
|
switch (extension.type) {
|
|
138300
135071
|
case types_1.ExtensionType.DASHBOARD_PAGE:
|
|
138301
135072
|
return this.processDashboardPage({
|
|
138302
135073
|
extension,
|
|
138303
135074
|
blueprint,
|
|
138304
135075
|
outputPath,
|
|
138305
|
-
planAndResources
|
|
135076
|
+
planAndResources,
|
|
135077
|
+
appNamespace
|
|
138306
135078
|
});
|
|
138307
135079
|
case types_1.ExtensionType.SERVICE_PLUGIN:
|
|
138308
135080
|
return this.processServicePlugin({
|
|
@@ -138368,7 +135140,7 @@ var require_orchestrator = __commonJS({
|
|
|
138368
135140
|
});
|
|
138369
135141
|
}
|
|
138370
135142
|
async processDashboardPage(opts) {
|
|
138371
|
-
const { extension, blueprint, outputPath, planAndResources } = opts;
|
|
135143
|
+
const { extension, blueprint, outputPath, planAndResources, appNamespace } = opts;
|
|
138372
135144
|
const decisionAgent = this.agentsFactory.getAgent({
|
|
138373
135145
|
type: "DASHBOARD_DECISION"
|
|
138374
135146
|
});
|
|
@@ -138385,7 +135157,7 @@ var require_orchestrator = __commonJS({
|
|
|
138385
135157
|
return;
|
|
138386
135158
|
}
|
|
138387
135159
|
console.log("\u{1F3AF} Using auto-patterns for dashboard generation");
|
|
138388
|
-
const relevantCollection = planAndResources.
|
|
135160
|
+
const relevantCollection = planAndResources.collections?.find((c) => c.id === decision.relevantCollectionId);
|
|
138389
135161
|
if (!relevantCollection) {
|
|
138390
135162
|
throw new Error(`\u274C Collection with ID ${decision.relevantCollectionId} not found in created collections`);
|
|
138391
135163
|
}
|
|
@@ -138399,7 +135171,8 @@ var require_orchestrator = __commonJS({
|
|
|
138399
135171
|
const files = autoPatternsGenerator.generate({
|
|
138400
135172
|
collection: relevantCollection,
|
|
138401
135173
|
decision,
|
|
138402
|
-
extensionName: extension.name || ""
|
|
135174
|
+
extensionName: extension.name || "",
|
|
135175
|
+
appNamespace
|
|
138403
135176
|
});
|
|
138404
135177
|
const pagePath = files[0].path || "";
|
|
138405
135178
|
this.finalizeExtensionGeneration({
|
|
@@ -138531,7 +135304,7 @@ var require_orchestrator = __commonJS({
|
|
|
138531
135304
|
blueprint: { extensions: [], appName: "", summary: "" },
|
|
138532
135305
|
// Minimal blueprint for iteration
|
|
138533
135306
|
outputPath,
|
|
138534
|
-
planAndResources: {},
|
|
135307
|
+
planAndResources: { collections: [] },
|
|
138535
135308
|
scaffolds
|
|
138536
135309
|
});
|
|
138537
135310
|
return;
|
|
@@ -138571,26 +135344,8 @@ var require_orchestrator = __commonJS({
|
|
|
138571
135344
|
});
|
|
138572
135345
|
}
|
|
138573
135346
|
}
|
|
138574
|
-
async generateCMSData(request, createdCollections) {
|
|
138575
|
-
const { siteId, accessToken, blueprint } = request;
|
|
138576
|
-
this.emitEvent("cms-data:start", {
|
|
138577
|
-
numberOfCollections: createdCollections.length
|
|
138578
|
-
});
|
|
138579
|
-
const cmsDataAgent = this.agentsFactory.getAgent({ type: "CMS_DATA" });
|
|
138580
|
-
const dataResult = await cmsDataAgent.generate({
|
|
138581
|
-
blueprint,
|
|
138582
|
-
siteId,
|
|
138583
|
-
accessToken,
|
|
138584
|
-
collections: createdCollections
|
|
138585
|
-
});
|
|
138586
|
-
const totalItemsInserted = dataResult.results.reduce((sum, result) => sum + result.insertedCount, 0);
|
|
138587
|
-
this.emitEvent("cms-data:done", {
|
|
138588
|
-
numberOfCollections: createdCollections.length,
|
|
138589
|
-
totalItemsInserted
|
|
138590
|
-
});
|
|
138591
|
-
}
|
|
138592
135347
|
async generateCode(request) {
|
|
138593
|
-
const { blueprint, outputPath,
|
|
135348
|
+
const { blueprint, outputPath, appNamespace } = request;
|
|
138594
135349
|
this.emitEvent("start", {
|
|
138595
135350
|
appName: blueprint.appName ?? "",
|
|
138596
135351
|
summary: blueprint.summary ?? "",
|
|
@@ -138600,16 +135355,20 @@ var require_orchestrator = __commonJS({
|
|
|
138600
135355
|
const start = Date.now();
|
|
138601
135356
|
const { extensions = [] } = blueprint;
|
|
138602
135357
|
const planAndResources = await this.generatePlanAndResources(request);
|
|
135358
|
+
const cmsFiles = (0, cms_1.getDataExtensionAndCollectionsFiles)({
|
|
135359
|
+
planAndResources,
|
|
135360
|
+
appNamespace
|
|
135361
|
+
});
|
|
135362
|
+
if (cmsFiles.length > 0) {
|
|
135363
|
+
this.writeFile(cmsFiles, outputPath);
|
|
135364
|
+
}
|
|
138603
135365
|
const parallelTasks = extensions.map((extension) => this.processExtension({
|
|
138604
135366
|
extension,
|
|
138605
135367
|
blueprint,
|
|
138606
135368
|
outputPath,
|
|
138607
|
-
planAndResources
|
|
138608
|
-
|
|
138609
|
-
|
|
138610
|
-
if (collections.length > 0 && siteId && siteId !== "N/A" && accessToken) {
|
|
138611
|
-
parallelTasks.push(this.generateCMSData(request, collections));
|
|
138612
|
-
}
|
|
135369
|
+
planAndResources,
|
|
135370
|
+
appNamespace
|
|
135371
|
+
}));
|
|
138613
135372
|
const results = await Promise.allSettled(parallelTasks.filter(Boolean));
|
|
138614
135373
|
(0, orchestrator_error_helpers_1.throwIfFailures)(results);
|
|
138615
135374
|
await (0, extensionIndexer_1.generateMainExtensionsFile)(outputPath);
|
|
@@ -138776,7 +135535,7 @@ var require_codegen_flow_helpers = __commonJS({
|
|
|
138776
135535
|
var __1 = require_index();
|
|
138777
135536
|
var orchestrator_1 = require_orchestrator();
|
|
138778
135537
|
var CodeGenService_1 = require_CodeGenService();
|
|
138779
|
-
var utils_1 =
|
|
135538
|
+
var utils_1 = require_utils15();
|
|
138780
135539
|
var slugify = (str = "") => {
|
|
138781
135540
|
return str.toLowerCase().replace(/ /g, "-");
|
|
138782
135541
|
};
|
|
@@ -138851,7 +135610,8 @@ var require_init_codegen = __commonJS({
|
|
|
138851
135610
|
blueprint,
|
|
138852
135611
|
outputPath,
|
|
138853
135612
|
siteId: context_1.ctx.siteId,
|
|
138854
|
-
accessToken: context_1.ctx.accessToken
|
|
135613
|
+
accessToken: context_1.ctx.accessToken,
|
|
135614
|
+
appNamespace: context_1.ctx.appNamespace
|
|
138855
135615
|
});
|
|
138856
135616
|
await (0, codegen_flow_helpers_1.updateParentTaskStatus)(localJobContext, CodeGenService_1.TaskStatus.COMPLETED);
|
|
138857
135617
|
await (0, codegen_flow_helpers_1.updateJobPayload)(localJobContext, {
|