@eide/foir-cli 0.37.0 → 0.38.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/cli.js +8 -8
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -807,7 +807,7 @@ function createIdentityMethods(client) {
|
|
|
807
807
|
// ── Tenants ───────────────────────────────────────────
|
|
808
808
|
async createTenant(params) {
|
|
809
809
|
const resp = await client.createTenant(
|
|
810
|
-
create(CreateTenantRequestSchema, { name: params.name })
|
|
810
|
+
create(CreateTenantRequestSchema, { create: { name: params.name } })
|
|
811
811
|
);
|
|
812
812
|
return { tenant: resp.tenant ?? null };
|
|
813
813
|
},
|
|
@@ -818,26 +818,26 @@ function createIdentityMethods(client) {
|
|
|
818
818
|
return { tenant: resp.tenant ?? null };
|
|
819
819
|
},
|
|
820
820
|
async updateTenant(params) {
|
|
821
|
+
const update = {};
|
|
822
|
+
if (params.name !== void 0) update.name = { set: params.name };
|
|
823
|
+
if (params.status !== void 0) update.status = { set: params.status };
|
|
821
824
|
const resp = await client.updateTenant(
|
|
822
|
-
create(UpdateTenantRequestSchema, {
|
|
823
|
-
id: params.id,
|
|
824
|
-
name: params.name,
|
|
825
|
-
status: params.status
|
|
826
|
-
})
|
|
825
|
+
create(UpdateTenantRequestSchema, { id: params.id, update })
|
|
827
826
|
);
|
|
828
827
|
return { tenant: resp.tenant ?? null };
|
|
829
828
|
},
|
|
830
829
|
async listTenants(params = {}) {
|
|
831
830
|
const resp = await client.listTenants(
|
|
832
831
|
create(ListTenantsRequestSchema, {
|
|
833
|
-
|
|
832
|
+
where: params.where,
|
|
834
833
|
first: params.first ?? DEFAULT_PAGE_SIZE,
|
|
835
834
|
after: params?.after
|
|
836
835
|
})
|
|
837
836
|
);
|
|
838
837
|
return {
|
|
839
838
|
items: resp.items ?? [],
|
|
840
|
-
total: Number(resp.total)
|
|
839
|
+
total: Number(resp.total),
|
|
840
|
+
cursors: resp.cursors ?? []
|
|
841
841
|
};
|
|
842
842
|
},
|
|
843
843
|
async deleteTenant(id) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eide/foir-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Universal platform CLI for Foir platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@bufbuild/protovalidate": "^1.1.1",
|
|
51
51
|
"@connectrpc/connect": "^2.0.0",
|
|
52
52
|
"@connectrpc/connect-node": "^2.0.0",
|
|
53
|
-
"@eide/foir-proto-ts": "^0.
|
|
53
|
+
"@eide/foir-proto-ts": "^0.89.0",
|
|
54
54
|
"chalk": "^5.3.0",
|
|
55
55
|
"commander": "^12.1.0",
|
|
56
56
|
"dotenv": "^16.4.5",
|