@ptkl/sdk 0.3.0 → 0.3.1
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.js +49 -0
- package/dist/index.esm.js +49 -1
- package/dist/index.umd.js +49 -0
- package/dist/package.json +1 -1
- package/dist/types/api/platform.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -18214,6 +18214,51 @@ class ComponentUtils extends PlatformBaseClient {
|
|
|
18214
18214
|
}
|
|
18215
18215
|
}
|
|
18216
18216
|
|
|
18217
|
+
class Thunder extends PlatformBaseClient {
|
|
18218
|
+
async read(type, filters, flag, options) {
|
|
18219
|
+
const { data } = await this.client.post("/v3/system/thunder", {
|
|
18220
|
+
type,
|
|
18221
|
+
filters,
|
|
18222
|
+
flag,
|
|
18223
|
+
options,
|
|
18224
|
+
});
|
|
18225
|
+
return data;
|
|
18226
|
+
}
|
|
18227
|
+
async write(type, filters, d, flag) {
|
|
18228
|
+
const { data } = await this.client.put("/v3/system/thunder", {
|
|
18229
|
+
type,
|
|
18230
|
+
filters,
|
|
18231
|
+
flag,
|
|
18232
|
+
data: d,
|
|
18233
|
+
});
|
|
18234
|
+
return data;
|
|
18235
|
+
}
|
|
18236
|
+
async operation(name, filters, data) {
|
|
18237
|
+
return await this.write(name, filters, data, "Operation");
|
|
18238
|
+
}
|
|
18239
|
+
async find(name, filters) {
|
|
18240
|
+
return await this.read(name, filters, "Find");
|
|
18241
|
+
}
|
|
18242
|
+
async findOne(name, filters) {
|
|
18243
|
+
return await this.read(name, filters, "FindOne");
|
|
18244
|
+
}
|
|
18245
|
+
async paginate(name, filters, options) {
|
|
18246
|
+
return await this.read(name, filters, "Paginate", options);
|
|
18247
|
+
}
|
|
18248
|
+
async upsert(name, filters, data) {
|
|
18249
|
+
return await this.write(name, filters, data, "Upsert");
|
|
18250
|
+
}
|
|
18251
|
+
async insertOne(name, data) {
|
|
18252
|
+
return await this.write(name, {}, data, "InsertOne");
|
|
18253
|
+
}
|
|
18254
|
+
async updateOne(name, filters, data) {
|
|
18255
|
+
return await this.write(name, filters, data, "UpdateOne");
|
|
18256
|
+
}
|
|
18257
|
+
async delete(name, filters) {
|
|
18258
|
+
return await this.write(name, filters, {}, "Delete");
|
|
18259
|
+
}
|
|
18260
|
+
}
|
|
18261
|
+
|
|
18217
18262
|
class Ratchet extends PlatformBaseClient {
|
|
18218
18263
|
async query(name, params) {
|
|
18219
18264
|
let res = await this.client.post('/v1/ratchet/query', {
|
|
@@ -18318,6 +18363,9 @@ class Platform extends PlatformBaseClient {
|
|
|
18318
18363
|
workflow() {
|
|
18319
18364
|
return (new Workflow()).setClient(this.client);
|
|
18320
18365
|
}
|
|
18366
|
+
thunder() {
|
|
18367
|
+
return (new Thunder()).setClient(this.client);
|
|
18368
|
+
}
|
|
18321
18369
|
}
|
|
18322
18370
|
|
|
18323
18371
|
class Invoicing extends PlatformBaseClient {
|
|
@@ -18574,6 +18622,7 @@ exports.Ratchet = Ratchet;
|
|
|
18574
18622
|
exports.Roles = Roles;
|
|
18575
18623
|
exports.Sandbox = Sandbox;
|
|
18576
18624
|
exports.System = System;
|
|
18625
|
+
exports.Thunder = Thunder;
|
|
18577
18626
|
exports.Users = Users;
|
|
18578
18627
|
exports.Workflow = Workflow;
|
|
18579
18628
|
exports.default = Platform;
|
package/dist/index.esm.js
CHANGED
|
@@ -404,6 +404,51 @@ class ComponentUtils extends PlatformBaseClient {
|
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
+
class Thunder extends PlatformBaseClient {
|
|
408
|
+
async read(type, filters, flag, options) {
|
|
409
|
+
const { data } = await this.client.post("/v3/system/thunder", {
|
|
410
|
+
type,
|
|
411
|
+
filters,
|
|
412
|
+
flag,
|
|
413
|
+
options,
|
|
414
|
+
});
|
|
415
|
+
return data;
|
|
416
|
+
}
|
|
417
|
+
async write(type, filters, d, flag) {
|
|
418
|
+
const { data } = await this.client.put("/v3/system/thunder", {
|
|
419
|
+
type,
|
|
420
|
+
filters,
|
|
421
|
+
flag,
|
|
422
|
+
data: d,
|
|
423
|
+
});
|
|
424
|
+
return data;
|
|
425
|
+
}
|
|
426
|
+
async operation(name, filters, data) {
|
|
427
|
+
return await this.write(name, filters, data, "Operation");
|
|
428
|
+
}
|
|
429
|
+
async find(name, filters) {
|
|
430
|
+
return await this.read(name, filters, "Find");
|
|
431
|
+
}
|
|
432
|
+
async findOne(name, filters) {
|
|
433
|
+
return await this.read(name, filters, "FindOne");
|
|
434
|
+
}
|
|
435
|
+
async paginate(name, filters, options) {
|
|
436
|
+
return await this.read(name, filters, "Paginate", options);
|
|
437
|
+
}
|
|
438
|
+
async upsert(name, filters, data) {
|
|
439
|
+
return await this.write(name, filters, data, "Upsert");
|
|
440
|
+
}
|
|
441
|
+
async insertOne(name, data) {
|
|
442
|
+
return await this.write(name, {}, data, "InsertOne");
|
|
443
|
+
}
|
|
444
|
+
async updateOne(name, filters, data) {
|
|
445
|
+
return await this.write(name, filters, data, "UpdateOne");
|
|
446
|
+
}
|
|
447
|
+
async delete(name, filters) {
|
|
448
|
+
return await this.write(name, filters, {}, "Delete");
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
407
452
|
class Ratchet extends PlatformBaseClient {
|
|
408
453
|
async query(name, params) {
|
|
409
454
|
let res = await this.client.post('/v1/ratchet/query', {
|
|
@@ -508,6 +553,9 @@ class Platform extends PlatformBaseClient {
|
|
|
508
553
|
workflow() {
|
|
509
554
|
return (new Workflow()).setClient(this.client);
|
|
510
555
|
}
|
|
556
|
+
thunder() {
|
|
557
|
+
return (new Thunder()).setClient(this.client);
|
|
558
|
+
}
|
|
511
559
|
}
|
|
512
560
|
|
|
513
561
|
class Invoicing extends PlatformBaseClient {
|
|
@@ -754,4 +802,4 @@ class Integrations extends IntegrationsBaseClient {
|
|
|
754
802
|
}
|
|
755
803
|
}
|
|
756
804
|
|
|
757
|
-
export { APIUser, Apps, Component, ComponentUtils, Functions, Integrations as Integration, Ratchet, Roles, Sandbox, System, Users, Workflow, Platform as default };
|
|
805
|
+
export { APIUser, Apps, Component, ComponentUtils, Functions, Integrations as Integration, Ratchet, Roles, Sandbox, System, Thunder, Users, Workflow, Platform as default };
|
package/dist/index.umd.js
CHANGED
|
@@ -408,6 +408,51 @@
|
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
+
class Thunder extends PlatformBaseClient {
|
|
412
|
+
async read(type, filters, flag, options) {
|
|
413
|
+
const { data } = await this.client.post("/v3/system/thunder", {
|
|
414
|
+
type,
|
|
415
|
+
filters,
|
|
416
|
+
flag,
|
|
417
|
+
options,
|
|
418
|
+
});
|
|
419
|
+
return data;
|
|
420
|
+
}
|
|
421
|
+
async write(type, filters, d, flag) {
|
|
422
|
+
const { data } = await this.client.put("/v3/system/thunder", {
|
|
423
|
+
type,
|
|
424
|
+
filters,
|
|
425
|
+
flag,
|
|
426
|
+
data: d,
|
|
427
|
+
});
|
|
428
|
+
return data;
|
|
429
|
+
}
|
|
430
|
+
async operation(name, filters, data) {
|
|
431
|
+
return await this.write(name, filters, data, "Operation");
|
|
432
|
+
}
|
|
433
|
+
async find(name, filters) {
|
|
434
|
+
return await this.read(name, filters, "Find");
|
|
435
|
+
}
|
|
436
|
+
async findOne(name, filters) {
|
|
437
|
+
return await this.read(name, filters, "FindOne");
|
|
438
|
+
}
|
|
439
|
+
async paginate(name, filters, options) {
|
|
440
|
+
return await this.read(name, filters, "Paginate", options);
|
|
441
|
+
}
|
|
442
|
+
async upsert(name, filters, data) {
|
|
443
|
+
return await this.write(name, filters, data, "Upsert");
|
|
444
|
+
}
|
|
445
|
+
async insertOne(name, data) {
|
|
446
|
+
return await this.write(name, {}, data, "InsertOne");
|
|
447
|
+
}
|
|
448
|
+
async updateOne(name, filters, data) {
|
|
449
|
+
return await this.write(name, filters, data, "UpdateOne");
|
|
450
|
+
}
|
|
451
|
+
async delete(name, filters) {
|
|
452
|
+
return await this.write(name, filters, {}, "Delete");
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
411
456
|
class Ratchet extends PlatformBaseClient {
|
|
412
457
|
async query(name, params) {
|
|
413
458
|
let res = await this.client.post('/v1/ratchet/query', {
|
|
@@ -512,6 +557,9 @@
|
|
|
512
557
|
workflow() {
|
|
513
558
|
return (new Workflow()).setClient(this.client);
|
|
514
559
|
}
|
|
560
|
+
thunder() {
|
|
561
|
+
return (new Thunder()).setClient(this.client);
|
|
562
|
+
}
|
|
515
563
|
}
|
|
516
564
|
|
|
517
565
|
class Invoicing extends PlatformBaseClient {
|
|
@@ -768,6 +816,7 @@
|
|
|
768
816
|
exports.Roles = Roles;
|
|
769
817
|
exports.Sandbox = Sandbox;
|
|
770
818
|
exports.System = System;
|
|
819
|
+
exports.Thunder = Thunder;
|
|
771
820
|
exports.Users = Users;
|
|
772
821
|
exports.Workflow = Workflow;
|
|
773
822
|
exports.default = Platform;
|
package/dist/package.json
CHANGED
|
@@ -6,6 +6,7 @@ import Users from "./users";
|
|
|
6
6
|
import Apps from "./apps";
|
|
7
7
|
import Component from "./component";
|
|
8
8
|
import ComponentUtils from "./componentUtils";
|
|
9
|
+
import Thunder from "./thunder";
|
|
9
10
|
import Ratchet from "./ratchet";
|
|
10
11
|
import Sandbox from "./sandbox";
|
|
11
12
|
import System from "./system";
|
|
@@ -27,4 +28,5 @@ export default class Platform extends PlatformBaseClient {
|
|
|
27
28
|
sandbox(): Sandbox;
|
|
28
29
|
system(): System;
|
|
29
30
|
workflow(): Workflow;
|
|
31
|
+
thunder(): Thunder;
|
|
30
32
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -11,4 +11,5 @@ export { default as Roles } from './api/roles';
|
|
|
11
11
|
export { default as Apps } from './api/apps';
|
|
12
12
|
export { default as Workflow } from './api/workflow';
|
|
13
13
|
export { default as ComponentUtils } from './api/componentUtils';
|
|
14
|
+
export { default as Thunder } from './api/thunder';
|
|
14
15
|
export default Platform;
|