@ptkl/sdk 1.9.1 → 1.10.0
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.0.10.js +9 -12
- package/dist/index.0.9.js +3 -0
- package/dist/package.json +1 -1
- package/dist/v0.10/api/thunder.d.ts +5 -4
- package/dist/v0.10/index.cjs.js +9 -12
- package/dist/v0.10/index.esm.js +9 -12
- package/dist/v0.10/types/component.d.ts +0 -1
- package/dist/v0.10/types/thunder.d.ts +4 -0
- package/dist/v0.9/api/component.d.ts +1 -0
- package/dist/v0.9/index.cjs.js +3 -0
- package/dist/v0.9/index.esm.js +3 -0
- package/package.json +1 -1
package/dist/index.0.10.js
CHANGED
|
@@ -170,10 +170,6 @@ var ProtokolSDK010 = (function (exports, axios) {
|
|
|
170
170
|
if (ctx.only && ctx.only.length > 0) {
|
|
171
171
|
params.only = ctx.only;
|
|
172
172
|
}
|
|
173
|
-
else if (ctx.includeFields && ctx.includeFields.length > 0) {
|
|
174
|
-
// Backward-compatible alias. The API now prefers `only`.
|
|
175
|
-
params.includeFields = ctx.includeFields;
|
|
176
|
-
}
|
|
177
173
|
if (Object.keys(ctx.$adv || []).length > 0) {
|
|
178
174
|
params.$adv = [(_a = ctx.$adv) !== null && _a !== void 0 ? _a : {}];
|
|
179
175
|
}
|
|
@@ -961,12 +957,13 @@ var ProtokolSDK010 = (function (exports, axios) {
|
|
|
961
957
|
}
|
|
962
958
|
|
|
963
959
|
class Thunder extends PlatformBaseClient {
|
|
964
|
-
async read(type, filters, flag,
|
|
960
|
+
async read(type, filters, flag, opts) {
|
|
961
|
+
const { only, ...options } = opts !== null && opts !== void 0 ? opts : {};
|
|
965
962
|
return await this.client.post("/v3/system/thunder", {
|
|
966
963
|
type,
|
|
967
964
|
filters,
|
|
968
965
|
flag,
|
|
969
|
-
options,
|
|
966
|
+
options: Object.keys(options).length ? options : undefined,
|
|
970
967
|
only,
|
|
971
968
|
});
|
|
972
969
|
}
|
|
@@ -981,14 +978,14 @@ var ProtokolSDK010 = (function (exports, axios) {
|
|
|
981
978
|
async operation(name, filters, data) {
|
|
982
979
|
return await this.write(name, filters, data, "Operation");
|
|
983
980
|
}
|
|
984
|
-
async find(name, filters,
|
|
985
|
-
return await this.read(name, filters, "Find",
|
|
981
|
+
async find(name, filters, options) {
|
|
982
|
+
return await this.read(name, filters, "Find", options);
|
|
986
983
|
}
|
|
987
|
-
async findOne(name, filters,
|
|
988
|
-
return await this.read(name, filters, "FindOne",
|
|
984
|
+
async findOne(name, filters, options) {
|
|
985
|
+
return await this.read(name, filters, "FindOne", options);
|
|
989
986
|
}
|
|
990
|
-
async paginate(name, filters, options
|
|
991
|
-
return await this.read(name, filters, "Paginate", options
|
|
987
|
+
async paginate(name, filters, options) {
|
|
988
|
+
return await this.read(name, filters, "Paginate", options);
|
|
992
989
|
}
|
|
993
990
|
async upsert(name, filters, data) {
|
|
994
991
|
return await this.write(name, filters, data, "Upsert");
|
package/dist/index.0.9.js
CHANGED
|
@@ -372,6 +372,9 @@ var ProtokolSDK09 = (function (exports, axios) {
|
|
|
372
372
|
async settings() {
|
|
373
373
|
return await this.client.get(`/v3/system/component/settings/${this.ref}`);
|
|
374
374
|
}
|
|
375
|
+
async settingsForVersion(version) {
|
|
376
|
+
return await this.client.get(`/v3/system/component/settings/${this.ref}/${version}`);
|
|
377
|
+
}
|
|
375
378
|
async saveSettings(settings, version) {
|
|
376
379
|
return await this.client.post(`/v3/system/component/settings/${this.ref}/${version}`, settings);
|
|
377
380
|
}
|
package/dist/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import PlatformBaseClient from "./platformBaseClient";
|
|
2
|
+
import type { ThunderReadOptions } from "../types/thunder";
|
|
2
3
|
export default class Thunder extends PlatformBaseClient {
|
|
3
|
-
read(type: string, filters: any, flag: string,
|
|
4
|
+
read(type: string, filters: any, flag: string, opts?: ThunderReadOptions): Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
5
|
write(type: string, filters: any, d: any, flag: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
5
6
|
operation(name: string, filters: any, data: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
6
|
-
find(name: string, filters: any,
|
|
7
|
-
findOne(name: string, filters: any,
|
|
8
|
-
paginate(name: string, filters: any, options?:
|
|
7
|
+
find(name: string, filters: any, options?: ThunderReadOptions): Promise<import("axios").AxiosResponse<any, any>>;
|
|
8
|
+
findOne(name: string, filters: any, options?: ThunderReadOptions): Promise<import("axios").AxiosResponse<any, any>>;
|
|
9
|
+
paginate(name: string, filters: any, options?: ThunderReadOptions): Promise<import("axios").AxiosResponse<any, any>>;
|
|
9
10
|
upsert(name: string, filters: any, data: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
10
11
|
insertOne(name: string, data: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
11
12
|
updateOne(name: string, filters: any, data: any): Promise<import("axios").AxiosResponse<any, any>>;
|
package/dist/v0.10/index.cjs.js
CHANGED
|
@@ -19136,10 +19136,6 @@ class Component extends PlatformBaseClient {
|
|
|
19136
19136
|
if (ctx.only && ctx.only.length > 0) {
|
|
19137
19137
|
params.only = ctx.only;
|
|
19138
19138
|
}
|
|
19139
|
-
else if (ctx.includeFields && ctx.includeFields.length > 0) {
|
|
19140
|
-
// Backward-compatible alias. The API now prefers `only`.
|
|
19141
|
-
params.includeFields = ctx.includeFields;
|
|
19142
|
-
}
|
|
19143
19139
|
if (Object.keys(ctx.$adv || []).length > 0) {
|
|
19144
19140
|
params.$adv = [(_a = ctx.$adv) !== null && _a !== void 0 ? _a : {}];
|
|
19145
19141
|
}
|
|
@@ -19927,12 +19923,13 @@ class ComponentUtils extends PlatformBaseClient {
|
|
|
19927
19923
|
}
|
|
19928
19924
|
|
|
19929
19925
|
class Thunder extends PlatformBaseClient {
|
|
19930
|
-
async read(type, filters, flag,
|
|
19926
|
+
async read(type, filters, flag, opts) {
|
|
19927
|
+
const { only, ...options } = opts !== null && opts !== void 0 ? opts : {};
|
|
19931
19928
|
return await this.client.post("/v3/system/thunder", {
|
|
19932
19929
|
type,
|
|
19933
19930
|
filters,
|
|
19934
19931
|
flag,
|
|
19935
|
-
options,
|
|
19932
|
+
options: Object.keys(options).length ? options : undefined,
|
|
19936
19933
|
only,
|
|
19937
19934
|
});
|
|
19938
19935
|
}
|
|
@@ -19947,14 +19944,14 @@ class Thunder extends PlatformBaseClient {
|
|
|
19947
19944
|
async operation(name, filters, data) {
|
|
19948
19945
|
return await this.write(name, filters, data, "Operation");
|
|
19949
19946
|
}
|
|
19950
|
-
async find(name, filters,
|
|
19951
|
-
return await this.read(name, filters, "Find",
|
|
19947
|
+
async find(name, filters, options) {
|
|
19948
|
+
return await this.read(name, filters, "Find", options);
|
|
19952
19949
|
}
|
|
19953
|
-
async findOne(name, filters,
|
|
19954
|
-
return await this.read(name, filters, "FindOne",
|
|
19950
|
+
async findOne(name, filters, options) {
|
|
19951
|
+
return await this.read(name, filters, "FindOne", options);
|
|
19955
19952
|
}
|
|
19956
|
-
async paginate(name, filters, options
|
|
19957
|
-
return await this.read(name, filters, "Paginate", options
|
|
19953
|
+
async paginate(name, filters, options) {
|
|
19954
|
+
return await this.read(name, filters, "Paginate", options);
|
|
19958
19955
|
}
|
|
19959
19956
|
async upsert(name, filters, data) {
|
|
19960
19957
|
return await this.write(name, filters, data, "Upsert");
|
package/dist/v0.10/index.esm.js
CHANGED
|
@@ -169,10 +169,6 @@ class Component extends PlatformBaseClient {
|
|
|
169
169
|
if (ctx.only && ctx.only.length > 0) {
|
|
170
170
|
params.only = ctx.only;
|
|
171
171
|
}
|
|
172
|
-
else if (ctx.includeFields && ctx.includeFields.length > 0) {
|
|
173
|
-
// Backward-compatible alias. The API now prefers `only`.
|
|
174
|
-
params.includeFields = ctx.includeFields;
|
|
175
|
-
}
|
|
176
172
|
if (Object.keys(ctx.$adv || []).length > 0) {
|
|
177
173
|
params.$adv = [(_a = ctx.$adv) !== null && _a !== void 0 ? _a : {}];
|
|
178
174
|
}
|
|
@@ -960,12 +956,13 @@ class ComponentUtils extends PlatformBaseClient {
|
|
|
960
956
|
}
|
|
961
957
|
|
|
962
958
|
class Thunder extends PlatformBaseClient {
|
|
963
|
-
async read(type, filters, flag,
|
|
959
|
+
async read(type, filters, flag, opts) {
|
|
960
|
+
const { only, ...options } = opts !== null && opts !== void 0 ? opts : {};
|
|
964
961
|
return await this.client.post("/v3/system/thunder", {
|
|
965
962
|
type,
|
|
966
963
|
filters,
|
|
967
964
|
flag,
|
|
968
|
-
options,
|
|
965
|
+
options: Object.keys(options).length ? options : undefined,
|
|
969
966
|
only,
|
|
970
967
|
});
|
|
971
968
|
}
|
|
@@ -980,14 +977,14 @@ class Thunder extends PlatformBaseClient {
|
|
|
980
977
|
async operation(name, filters, data) {
|
|
981
978
|
return await this.write(name, filters, data, "Operation");
|
|
982
979
|
}
|
|
983
|
-
async find(name, filters,
|
|
984
|
-
return await this.read(name, filters, "Find",
|
|
980
|
+
async find(name, filters, options) {
|
|
981
|
+
return await this.read(name, filters, "Find", options);
|
|
985
982
|
}
|
|
986
|
-
async findOne(name, filters,
|
|
987
|
-
return await this.read(name, filters, "FindOne",
|
|
983
|
+
async findOne(name, filters, options) {
|
|
984
|
+
return await this.read(name, filters, "FindOne", options);
|
|
988
985
|
}
|
|
989
|
-
async paginate(name, filters, options
|
|
990
|
-
return await this.read(name, filters, "Paginate", options
|
|
986
|
+
async paginate(name, filters, options) {
|
|
987
|
+
return await this.read(name, filters, "Paginate", options);
|
|
991
988
|
}
|
|
992
989
|
async upsert(name, filters, data) {
|
|
993
990
|
return await this.write(name, filters, data, "Upsert");
|
|
@@ -121,6 +121,7 @@ export default class Component extends PlatformBaseClient {
|
|
|
121
121
|
*/
|
|
122
122
|
aggregate(pipeline: FindAggregateParams): AggregateChainable;
|
|
123
123
|
settings(): Promise<AxiosResponse<any, any>>;
|
|
124
|
+
settingsForVersion(version: string): Promise<AxiosResponse<any, any>>;
|
|
124
125
|
saveSettings(settings: any, version: string): Promise<AxiosResponse<any, any>>;
|
|
125
126
|
saveTemplatesDist(version: string, sdkVersion: string, engine: string, dist: Record<string, string>): Promise<any>;
|
|
126
127
|
workflow(event: string, input: any): Promise<AxiosResponse<any, any>>;
|
package/dist/v0.9/index.cjs.js
CHANGED
|
@@ -19340,6 +19340,9 @@ class Component extends PlatformBaseClient {
|
|
|
19340
19340
|
async settings() {
|
|
19341
19341
|
return await this.client.get(`/v3/system/component/settings/${this.ref}`);
|
|
19342
19342
|
}
|
|
19343
|
+
async settingsForVersion(version) {
|
|
19344
|
+
return await this.client.get(`/v3/system/component/settings/${this.ref}/${version}`);
|
|
19345
|
+
}
|
|
19343
19346
|
async saveSettings(settings, version) {
|
|
19344
19347
|
return await this.client.post(`/v3/system/component/settings/${this.ref}/${version}`, settings);
|
|
19345
19348
|
}
|
package/dist/v0.9/index.esm.js
CHANGED
|
@@ -371,6 +371,9 @@ class Component extends PlatformBaseClient {
|
|
|
371
371
|
async settings() {
|
|
372
372
|
return await this.client.get(`/v3/system/component/settings/${this.ref}`);
|
|
373
373
|
}
|
|
374
|
+
async settingsForVersion(version) {
|
|
375
|
+
return await this.client.get(`/v3/system/component/settings/${this.ref}/${version}`);
|
|
376
|
+
}
|
|
374
377
|
async saveSettings(settings, version) {
|
|
375
378
|
return await this.client.post(`/v3/system/component/settings/${this.ref}/${version}`, settings);
|
|
376
379
|
}
|