@boltic/sdk 0.1.1 → 0.1.2
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/README.md +1 -8
- package/dist/sdk.js +2 -34
- package/dist/sdk.js.map +1 -1
- package/dist/sdk.mjs +2 -34
- package/dist/sdk.mjs.map +1 -1
- package/dist/types/index.d.ts +1 -13
- package/package.json +1 -1
package/dist/sdk.mjs
CHANGED
|
@@ -2023,30 +2023,7 @@ class TableResource extends BaseResource {
|
|
|
2023
2023
|
*/
|
|
2024
2024
|
async rename(oldName, newName, dbId) {
|
|
2025
2025
|
try {
|
|
2026
|
-
const result = await this.update(
|
|
2027
|
-
oldName,
|
|
2028
|
-
{
|
|
2029
|
-
name: newName
|
|
2030
|
-
},
|
|
2031
|
-
dbId
|
|
2032
|
-
);
|
|
2033
|
-
return result;
|
|
2034
|
-
} catch (error) {
|
|
2035
|
-
throw error instanceof ApiError ? error : new ApiError(this.formatError(error), 500);
|
|
2036
|
-
}
|
|
2037
|
-
}
|
|
2038
|
-
/**
|
|
2039
|
-
* Set table access permissions
|
|
2040
|
-
*/
|
|
2041
|
-
async setAccess(request, dbId) {
|
|
2042
|
-
try {
|
|
2043
|
-
const result = await this.update(
|
|
2044
|
-
request.table_name,
|
|
2045
|
-
{
|
|
2046
|
-
is_shared: request.is_shared
|
|
2047
|
-
},
|
|
2048
|
-
dbId
|
|
2049
|
-
);
|
|
2026
|
+
const result = await this.update(oldName, { name: newName }, dbId);
|
|
2050
2027
|
return result;
|
|
2051
2028
|
} catch (error) {
|
|
2052
2029
|
throw error instanceof ApiError ? error : new ApiError(this.formatError(error), 500);
|
|
@@ -4506,7 +4483,6 @@ class SqlResource {
|
|
|
4506
4483
|
}
|
|
4507
4484
|
class TableBuilder {
|
|
4508
4485
|
constructor(options, tablesApiClient) {
|
|
4509
|
-
this.isPublic = false;
|
|
4510
4486
|
this.fields = [];
|
|
4511
4487
|
this.tableName = options.name;
|
|
4512
4488
|
this.description = options.description;
|
|
@@ -4526,13 +4502,6 @@ class TableBuilder {
|
|
|
4526
4502
|
this.description = description;
|
|
4527
4503
|
return this;
|
|
4528
4504
|
}
|
|
4529
|
-
/**
|
|
4530
|
-
* Set if table is public
|
|
4531
|
-
*/
|
|
4532
|
-
public(isPublic = true) {
|
|
4533
|
-
this.isPublic = isPublic;
|
|
4534
|
-
return this;
|
|
4535
|
-
}
|
|
4536
4505
|
/**
|
|
4537
4506
|
* Add a text field
|
|
4538
4507
|
*/
|
|
@@ -4916,8 +4885,7 @@ class BolticClient {
|
|
|
4916
4885
|
findOne: (options) => this.tableResource.findOne(options, dbId),
|
|
4917
4886
|
update: (name, data) => this.tableResource.update(name, data, dbId),
|
|
4918
4887
|
delete: (name) => this.tableResource.delete(name, dbId),
|
|
4919
|
-
rename: (oldName, newName) => this.tableResource.rename(oldName, newName, dbId)
|
|
4920
|
-
setAccess: (request) => this.tableResource.setAccess(request, dbId)
|
|
4888
|
+
rename: (oldName, newName) => this.tableResource.rename(oldName, newName, dbId)
|
|
4921
4889
|
};
|
|
4922
4890
|
}
|
|
4923
4891
|
// Direct column operations
|