edmaxlabs-core 1.4.8 → 2.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +17 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +17 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -210,7 +210,7 @@ var _Authentication = class _Authentication {
|
|
|
210
210
|
this.client = EdmaxLabs.instance;
|
|
211
211
|
this.app = new EdmaxLabs({
|
|
212
212
|
token: "auth",
|
|
213
|
-
project:
|
|
213
|
+
project: "6922d5982b23ae6a12e51d85"
|
|
214
214
|
});
|
|
215
215
|
_Authentication.instance = this;
|
|
216
216
|
this.restoreSession();
|
|
@@ -539,7 +539,7 @@ var Array2 = class {
|
|
|
539
539
|
const res = await new HttpsRequest({
|
|
540
540
|
method: "POST" /* POST */,
|
|
541
541
|
endpoint: `${this.app.getBaseUrl()}/db/array/show`,
|
|
542
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
542
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
543
543
|
body: {
|
|
544
544
|
collection: this.collection,
|
|
545
545
|
document: this.docID,
|
|
@@ -599,7 +599,7 @@ var Array2 = class {
|
|
|
599
599
|
const res = await new HttpsRequest({
|
|
600
600
|
method: "POST" /* POST */,
|
|
601
601
|
endpoint: `${this.app.getBaseUrl()}/db/array/push`,
|
|
602
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
602
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
603
603
|
body: {
|
|
604
604
|
collection: this.collection,
|
|
605
605
|
document: this.docID,
|
|
@@ -626,7 +626,7 @@ var Array2 = class {
|
|
|
626
626
|
const res = await new HttpsRequest({
|
|
627
627
|
method: "POST" /* POST */,
|
|
628
628
|
endpoint: `${this.app.getBaseUrl()}/db/array/update`,
|
|
629
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
629
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
630
630
|
body: {
|
|
631
631
|
collection: this.collection,
|
|
632
632
|
document: this.docID,
|
|
@@ -719,7 +719,7 @@ var DocumentRef = class {
|
|
|
719
719
|
const res = await new HttpsRequest({
|
|
720
720
|
method: "POST" /* POST */,
|
|
721
721
|
endpoint: `${this.app.getBaseUrl()}/db/create`,
|
|
722
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
722
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
723
723
|
body: { collection: this.collection, data: { ...data, id: this.id } }
|
|
724
724
|
}).sendRequest();
|
|
725
725
|
return res?.success ? DocumentSnapshot.fromMap(data) : null;
|
|
@@ -940,7 +940,7 @@ var Query = class {
|
|
|
940
940
|
const res = await new HttpsRequest({
|
|
941
941
|
method: "POST" /* POST */,
|
|
942
942
|
endpoint: `${this.app.getBaseUrl()}/db/read`,
|
|
943
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
943
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
944
944
|
body: {
|
|
945
945
|
collection: this.collection,
|
|
946
946
|
filter: genfilter
|
|
@@ -965,7 +965,7 @@ var Query = class {
|
|
|
965
965
|
const res = await new HttpsRequest({
|
|
966
966
|
method: "POST" /* POST */,
|
|
967
967
|
endpoint: `${this.app.getBaseUrl()}/db/update`,
|
|
968
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
968
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
969
969
|
body: {
|
|
970
970
|
collection: this.collection,
|
|
971
971
|
filter: genfilter,
|
|
@@ -1047,7 +1047,7 @@ var CollectionRef = class {
|
|
|
1047
1047
|
const res = await new HttpsRequest({
|
|
1048
1048
|
method: "POST" /* POST */,
|
|
1049
1049
|
endpoint: `${this.app.getBaseUrl()}/db/read`,
|
|
1050
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
1050
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
1051
1051
|
body: {
|
|
1052
1052
|
collection: this.collection,
|
|
1053
1053
|
filter: {}
|
|
@@ -1209,7 +1209,7 @@ var Batch = class {
|
|
|
1209
1209
|
const res = await new HttpsRequest({
|
|
1210
1210
|
method: "POST" /* POST */,
|
|
1211
1211
|
endpoint: `${this.app.getBaseUrl()}/db/batch`,
|
|
1212
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
1212
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
1213
1213
|
body: { ops: this.ops }
|
|
1214
1214
|
}).sendRequest();
|
|
1215
1215
|
if (res?.error) {
|
|
@@ -1261,7 +1261,7 @@ var Database = class {
|
|
|
1261
1261
|
const res = await new HttpsRequest({
|
|
1262
1262
|
method: "POST" /* POST */,
|
|
1263
1263
|
endpoint: `${this.app.getBaseUrl()}/db/transaction`,
|
|
1264
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
1264
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
1265
1265
|
body: { ops: tx.ops }
|
|
1266
1266
|
}).sendRequest();
|
|
1267
1267
|
if (res?.error) {
|
|
@@ -1321,7 +1321,7 @@ var Realtime = class {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
this.socket = io(this.app.getSocketUrl(), {
|
|
1323
1323
|
transports: ["websocket"],
|
|
1324
|
-
auth: { token: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
1324
|
+
auth: { token: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
1325
1325
|
autoConnect: true,
|
|
1326
1326
|
reconnection: true,
|
|
1327
1327
|
reconnectionAttempts: Infinity,
|
|
@@ -1454,7 +1454,7 @@ var Functions = class {
|
|
|
1454
1454
|
const res = await new HttpsRequest({
|
|
1455
1455
|
method: "POST" /* POST */,
|
|
1456
1456
|
endpoint: this.app.getBaseUrl() + "/functions/call/" + functionName,
|
|
1457
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
1457
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
1458
1458
|
body: data
|
|
1459
1459
|
}).sendRequest();
|
|
1460
1460
|
return res;
|
|
@@ -1477,7 +1477,7 @@ var Hosting = class {
|
|
|
1477
1477
|
const res = await new HttpsRequest({
|
|
1478
1478
|
method: "POST" /* POST */,
|
|
1479
1479
|
endpoint: this.app.getBaseUrl() + "/hosting/register",
|
|
1480
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
1480
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
1481
1481
|
body: {
|
|
1482
1482
|
hostname: name,
|
|
1483
1483
|
project: this.app.getConfig().project
|
|
@@ -2312,7 +2312,7 @@ var SyncEngine = class {
|
|
|
2312
2312
|
const res = await new HttpsRequest({
|
|
2313
2313
|
method: "POST" /* POST */,
|
|
2314
2314
|
endpoint: `${this.app.getBaseUrl()}/db/create`,
|
|
2315
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
2315
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
2316
2316
|
body: {
|
|
2317
2317
|
collection: mutation.collection,
|
|
2318
2318
|
data: mutation.payload
|
|
@@ -2339,7 +2339,7 @@ var SyncEngine = class {
|
|
|
2339
2339
|
const res = await new HttpsRequest({
|
|
2340
2340
|
method: "POST" /* POST */,
|
|
2341
2341
|
endpoint: `${this.app.getBaseUrl()}/db/update`,
|
|
2342
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
2342
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
2343
2343
|
body: {
|
|
2344
2344
|
collection: mutation.collection,
|
|
2345
2345
|
document: mutation.documentId,
|
|
@@ -2371,7 +2371,7 @@ var SyncEngine = class {
|
|
|
2371
2371
|
const res = await new HttpsRequest({
|
|
2372
2372
|
method: "POST" /* POST */,
|
|
2373
2373
|
endpoint: `${this.app.getBaseUrl()}/db/delete`,
|
|
2374
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
2374
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
2375
2375
|
body: {
|
|
2376
2376
|
collection: mutation.collection,
|
|
2377
2377
|
document: mutation.documentId
|
|
@@ -2530,7 +2530,7 @@ var StorageRef = class {
|
|
|
2530
2530
|
const res = await new HttpsRequest({
|
|
2531
2531
|
method: "POST" /* POST */,
|
|
2532
2532
|
endpoint: this.app.getBaseUrl() + "/storage/file/delete",
|
|
2533
|
-
headers: { authorization: this.app.getConfig().token, project: this.app.getConfig().project },
|
|
2533
|
+
headers: { authorization: this.app.getConfig().token, "x-project": this.app.getConfig().project },
|
|
2534
2534
|
body: {
|
|
2535
2535
|
file_id: id
|
|
2536
2536
|
}
|