@wix/data-backend-public-sdk-poc
Advanced tools
Comparing version 1.0.7 to 1.0.8
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.data = void 0; | ||
exports.data = __importStar(require("./src/data-v1-data-service.public")); | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.query = void 0; | ||
const ambassador_1 = require("@wix/metro-runtime/ambassador"); | ||
const metro_runtime_1 = require("@wix/metro-runtime"); | ||
const _queryRequest = {}; | ||
const _queryResponse = {}; | ||
function resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl(opts) { | ||
const domainToMappings = { | ||
'api._api_base_domain_': [ | ||
{ | ||
srcPath: '/cloud-data', | ||
destPath: '', | ||
}, | ||
], | ||
'code._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data/v1/data-settings', | ||
destPath: '/v1/data-settings', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/connector', | ||
destPath: '/v1/connector', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v1/data-settings', | ||
destPath: '/v1/data-settings', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v1/connector', | ||
destPath: '/v1/connector', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/wix-data', | ||
destPath: '/v1/wix-data', | ||
}, | ||
], | ||
'cloud-data.wix-code.com': [ | ||
{ | ||
srcPath: '', | ||
destPath: '', | ||
}, | ||
], | ||
_: [ | ||
{ | ||
srcPath: '/_api/cloud-data', | ||
destPath: '', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
], | ||
'www._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data', | ||
destPath: '', | ||
}, | ||
{ | ||
srcPath: '/_api/data', | ||
destPath: '', | ||
}, | ||
], | ||
'dev._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data', | ||
destPath: '', | ||
}, | ||
], | ||
'bo._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data/v1', | ||
destPath: '/v1', | ||
}, | ||
], | ||
'manage._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data', | ||
destPath: '', | ||
}, | ||
{ | ||
srcPath: '/_api/data', | ||
destPath: '', | ||
}, | ||
], | ||
'editor._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/dbs/tasks', | ||
destPath: '/dbs/tasks', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/data/dbs/tasks', | ||
destPath: '/dbs/tasks', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/wix-data', | ||
destPath: '/v1/wix-data', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/data-settings', | ||
destPath: '/v1/data-settings', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v2/indexes', | ||
destPath: '/v2/indexes', | ||
}, | ||
], | ||
'blocks._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/dbs/tasks', | ||
destPath: '/dbs/tasks', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/data/dbs/tasks', | ||
destPath: '/dbs/tasks', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/wix-data', | ||
destPath: '/v1/wix-data', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/data-settings', | ||
destPath: '/v1/data-settings', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v2/indexes', | ||
destPath: '/v2/indexes', | ||
}, | ||
], | ||
'create.editorx': [ | ||
{ | ||
srcPath: '/_api/cloud-data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/dbs/tasks', | ||
destPath: '/dbs/tasks', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/data/dbs/tasks', | ||
destPath: '/dbs/tasks', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/wix-data', | ||
destPath: '/v1/wix-data', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/data-settings', | ||
destPath: '/v1/data-settings', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v2/indexes', | ||
destPath: '/v2/indexes', | ||
}, | ||
], | ||
'www.wixapis.com': [ | ||
{ | ||
srcPath: '/wix-data/v1/collections', | ||
destPath: '/v1/wix-data/collections', | ||
}, | ||
{ | ||
srcPath: '/wix-data/v1/external-database-connections', | ||
destPath: '/v1/external-database-connections', | ||
}, | ||
{ | ||
srcPath: '/wix-data/v2/indexes', | ||
destPath: '/v2/indexes', | ||
}, | ||
{ | ||
srcPath: '/wix-data/v1/items', | ||
destPath: '/v1/items', | ||
}, | ||
{ | ||
srcPath: '/wix-data/v1/bulk', | ||
destPath: '/v1/bulk', | ||
}, | ||
], | ||
'www.wixgateway.com': [ | ||
{ | ||
srcPath: '/wix-data/v1/items', | ||
destPath: '/v1/items', | ||
}, | ||
{ | ||
srcPath: '/wix-data/v1/bulk', | ||
destPath: '/v1/bulk', | ||
}, | ||
], | ||
}; | ||
return metro_runtime_1.resolveUrl(Object.assign(opts, { domainToMappings })); | ||
} | ||
/** Query for items in a collection. */ | ||
function query(payload) { | ||
const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_queryRequest, {}); | ||
const { fromJSON: fromRes } = ambassador_1.serializer(_queryResponse, {}); | ||
function __query({ host }) { | ||
const serializedData = toReq(payload); | ||
const metadata = { | ||
method: 'POST', | ||
url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({ | ||
protoPath: '/v1/items/query', | ||
data: serializedData, | ||
host, | ||
}), | ||
data: serializedData, | ||
transformResponse: fromRes, | ||
}; | ||
return metadata; | ||
} | ||
__query.fromReq = fromReq; | ||
return __query; | ||
} | ||
exports.query = query; | ||
//# sourceMappingURL=data-v1-data-service.http.js.map |
@@ -105,3 +105,3 @@ export interface Item { | ||
/** Collection name */ | ||
collectionName?: string; | ||
collectionName: string; | ||
/** Includes referenced items for the specified properties in a query's results. */ | ||
@@ -108,0 +108,0 @@ include?: string[]; |
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
export * as data from './src/data-v1-data-service.public'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,237 @@ | ||
"use strict"; | ||
import { serializer } from '@wix/metro-runtime/ambassador'; | ||
import { resolveUrl } from '@wix/metro-runtime'; | ||
const _queryRequest = {}; | ||
const _queryResponse = {}; | ||
function resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl(opts) { | ||
const domainToMappings = { | ||
'api._api_base_domain_': [ | ||
{ | ||
srcPath: '/cloud-data', | ||
destPath: '', | ||
}, | ||
], | ||
'code._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data/v1/data-settings', | ||
destPath: '/v1/data-settings', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/connector', | ||
destPath: '/v1/connector', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v1/data-settings', | ||
destPath: '/v1/data-settings', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v1/connector', | ||
destPath: '/v1/connector', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/wix-data', | ||
destPath: '/v1/wix-data', | ||
}, | ||
], | ||
'cloud-data.wix-code.com': [ | ||
{ | ||
srcPath: '', | ||
destPath: '', | ||
}, | ||
], | ||
_: [ | ||
{ | ||
srcPath: '/_api/cloud-data', | ||
destPath: '', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
], | ||
'www._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data', | ||
destPath: '', | ||
}, | ||
{ | ||
srcPath: '/_api/data', | ||
destPath: '', | ||
}, | ||
], | ||
'dev._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data', | ||
destPath: '', | ||
}, | ||
], | ||
'bo._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data/v1', | ||
destPath: '/v1', | ||
}, | ||
], | ||
'manage._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data', | ||
destPath: '', | ||
}, | ||
{ | ||
srcPath: '/_api/data', | ||
destPath: '', | ||
}, | ||
], | ||
'editor._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/dbs/tasks', | ||
destPath: '/dbs/tasks', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/data/dbs/tasks', | ||
destPath: '/dbs/tasks', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/wix-data', | ||
destPath: '/v1/wix-data', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/data-settings', | ||
destPath: '/v1/data-settings', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v2/indexes', | ||
destPath: '/v2/indexes', | ||
}, | ||
], | ||
'blocks._base_domain_': [ | ||
{ | ||
srcPath: '/_api/cloud-data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/dbs/tasks', | ||
destPath: '/dbs/tasks', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/data/dbs/tasks', | ||
destPath: '/dbs/tasks', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/wix-data', | ||
destPath: '/v1/wix-data', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/data-settings', | ||
destPath: '/v1/data-settings', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v2/indexes', | ||
destPath: '/v2/indexes', | ||
}, | ||
], | ||
'create.editorx': [ | ||
{ | ||
srcPath: '/_api/cloud-data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/dbs/tasks', | ||
destPath: '/dbs/tasks', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v1/schemas', | ||
destPath: '/v1/schemas', | ||
}, | ||
{ | ||
srcPath: '/_api/data/dbs/tasks', | ||
destPath: '/dbs/tasks', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/wix-data', | ||
destPath: '/v1/wix-data', | ||
}, | ||
{ | ||
srcPath: '/_api/cloud-data/v1/data-settings', | ||
destPath: '/v1/data-settings', | ||
}, | ||
{ | ||
srcPath: '/_api/data/v2/indexes', | ||
destPath: '/v2/indexes', | ||
}, | ||
], | ||
'www.wixapis.com': [ | ||
{ | ||
srcPath: '/wix-data/v1/collections', | ||
destPath: '/v1/wix-data/collections', | ||
}, | ||
{ | ||
srcPath: '/wix-data/v1/external-database-connections', | ||
destPath: '/v1/external-database-connections', | ||
}, | ||
{ | ||
srcPath: '/wix-data/v2/indexes', | ||
destPath: '/v2/indexes', | ||
}, | ||
{ | ||
srcPath: '/wix-data/v1/items', | ||
destPath: '/v1/items', | ||
}, | ||
{ | ||
srcPath: '/wix-data/v1/bulk', | ||
destPath: '/v1/bulk', | ||
}, | ||
], | ||
'www.wixgateway.com': [ | ||
{ | ||
srcPath: '/wix-data/v1/items', | ||
destPath: '/v1/items', | ||
}, | ||
{ | ||
srcPath: '/wix-data/v1/bulk', | ||
destPath: '/v1/bulk', | ||
}, | ||
], | ||
}; | ||
return resolveUrl(Object.assign(opts, { domainToMappings })); | ||
} | ||
/** Query for items in a collection. */ | ||
export function query(payload) { | ||
const { toJSON: toReq, fromJSON: fromReq } = serializer(_queryRequest, {}); | ||
const { fromJSON: fromRes } = serializer(_queryResponse, {}); | ||
function __query({ host }) { | ||
const serializedData = toReq(payload); | ||
const metadata = { | ||
method: 'POST', | ||
url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({ | ||
protoPath: '/v1/items/query', | ||
data: serializedData, | ||
host, | ||
}), | ||
data: serializedData, | ||
transformResponse: fromRes, | ||
}; | ||
return metadata; | ||
} | ||
__query.fromReq = fromReq; | ||
return __query; | ||
} | ||
//# sourceMappingURL=data-v1-data-service.http.js.map |
@@ -105,3 +105,3 @@ export interface Item { | ||
/** Collection name */ | ||
collectionName?: string; | ||
collectionName: string; | ||
/** Includes referenced items for the specified properties in a query's results. */ | ||
@@ -108,0 +108,0 @@ include?: string[]; |
{ | ||
"name": "@wix/data-backend-public-sdk-poc", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"publishConfig": { | ||
@@ -36,3 +36,3 @@ "registry": "https://registry.npmjs.org/", | ||
}, | ||
"falconPackageHash": "a1b9224698ef7470908a1a3133ce403fe0ccbaa823b2386593d7ad09" | ||
"falconPackageHash": "2ced15c74627f8ddc21e169cc7b18a5cdabf1c9d8af3402ecde5b73c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
119585
31
3179