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