shred-api-client 2.12.2 → 2.13.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.d.ts +14 -2
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1713,11 +1713,17 @@ type Preferences = z.infer<typeof PreferencesSchema>;
|
|
|
1713
1713
|
interface IAPI$c {
|
|
1714
1714
|
getByInviteCode: (code: string, context?: Context) => Promise<Tenant | null>;
|
|
1715
1715
|
create: (tenant: Tenant, context: Context) => Promise<boolean>;
|
|
1716
|
-
|
|
1716
|
+
/** Deleted tenants are left out unless `includeInactive` is true. */
|
|
1717
|
+
list: (context: Context, options?: ListOptions) => Promise<Tenant[]>;
|
|
1717
1718
|
getTenant: (context: Context, tenantId?: string) => Promise<Tenant | null>;
|
|
1718
1719
|
getMembers: (context: Context, tenantId: string) => Promise<Member[]>;
|
|
1719
1720
|
update: (tenantId: string, data: TenantUpdate, context: Context) => Promise<boolean>;
|
|
1720
1721
|
updateMembers: (tenantId: string, memberUpdate: MemberUpdate, context: Context) => Promise<boolean>;
|
|
1722
|
+
/** Logical delete: the tenant becomes inactive and every member leaves it. */
|
|
1723
|
+
delete: (tenantId: string, context: Context) => Promise<boolean>;
|
|
1724
|
+
}
|
|
1725
|
+
interface ListOptions {
|
|
1726
|
+
includeInactive?: boolean;
|
|
1721
1727
|
}
|
|
1722
1728
|
declare const Endpoints$b: {
|
|
1723
1729
|
GetByInviteCode: {
|
|
@@ -1752,8 +1758,13 @@ declare const Endpoints$b: {
|
|
|
1752
1758
|
uri: string;
|
|
1753
1759
|
method: string;
|
|
1754
1760
|
};
|
|
1761
|
+
DeleteTenant: {
|
|
1762
|
+
uri: string;
|
|
1763
|
+
method: string;
|
|
1764
|
+
};
|
|
1755
1765
|
};
|
|
1756
1766
|
|
|
1767
|
+
type index$d_ListOptions = ListOptions;
|
|
1757
1768
|
type index$d_Member = Member;
|
|
1758
1769
|
declare const index$d_MemberSchema: typeof MemberSchema;
|
|
1759
1770
|
type index$d_MemberUpdate = MemberUpdate;
|
|
@@ -1764,7 +1775,7 @@ declare const index$d_TenantSchema: typeof TenantSchema;
|
|
|
1764
1775
|
type index$d_TenantUpdate = TenantUpdate;
|
|
1765
1776
|
declare const index$d_TenantUpdateSchema: typeof TenantUpdateSchema;
|
|
1766
1777
|
declare namespace index$d {
|
|
1767
|
-
export { Action$1 as Action, Endpoints$b as Endpoints, type Tenant as Entity, type IAPI$c as IAPI, type index$d_Member as Member, index$d_MemberSchema as MemberSchema, type index$d_MemberUpdate as MemberUpdate, index$d_MemberUpdateSchema as MemberUpdateSchema, type index$d_Preferences as Preferences, index$d_PreferencesSchema as PreferencesSchema, index$d_TenantSchema as TenantSchema, type index$d_TenantUpdate as TenantUpdate, index$d_TenantUpdateSchema as TenantUpdateSchema };
|
|
1778
|
+
export { Action$1 as Action, Endpoints$b as Endpoints, type Tenant as Entity, type IAPI$c as IAPI, type index$d_ListOptions as ListOptions, type index$d_Member as Member, index$d_MemberSchema as MemberSchema, type index$d_MemberUpdate as MemberUpdate, index$d_MemberUpdateSchema as MemberUpdateSchema, type index$d_Preferences as Preferences, index$d_PreferencesSchema as PreferencesSchema, index$d_TenantSchema as TenantSchema, type index$d_TenantUpdate as TenantUpdate, index$d_TenantUpdateSchema as TenantUpdateSchema };
|
|
1768
1779
|
}
|
|
1769
1780
|
|
|
1770
1781
|
declare const TrackParamSchema: z.ZodObject<{
|
|
@@ -5318,6 +5329,7 @@ declare const Actions: {
|
|
|
5318
5329
|
readonly TENANT_LIST: "tenant.list";
|
|
5319
5330
|
readonly TENANT_VIEW: "tenant.view";
|
|
5320
5331
|
readonly TENANT_UPDATE: "tenant.update";
|
|
5332
|
+
readonly TENANT_DELETE: "tenant.delete";
|
|
5321
5333
|
readonly TENANT_VIEW_MEMBERS: "tenant.view_members";
|
|
5322
5334
|
readonly TENANT_UPDATE_MEMBERS: "tenant.update_members";
|
|
5323
5335
|
readonly TENANT_VIEW_REPORT: "tenant.view_report";
|
package/dist/index.js
CHANGED
|
@@ -4747,11 +4747,12 @@ var TenantAPI = class {
|
|
|
4747
4747
|
);
|
|
4748
4748
|
return data;
|
|
4749
4749
|
}
|
|
4750
|
-
async list(context) {
|
|
4750
|
+
async list(context, options) {
|
|
4751
4751
|
const endpointInfo = tenant_exports.Endpoints.ListAll;
|
|
4752
|
+
const endpoint = (options == null ? void 0 : options.includeInactive) ? `${endpointInfo.uri}?includeInactive=true` : endpointInfo.uri;
|
|
4752
4753
|
const data = await this.clientHTTP.makeRequest(
|
|
4753
4754
|
this.env,
|
|
4754
|
-
|
|
4755
|
+
endpoint,
|
|
4755
4756
|
endpointInfo.method,
|
|
4756
4757
|
null,
|
|
4757
4758
|
context
|
|
@@ -4793,6 +4794,18 @@ var TenantAPI = class {
|
|
|
4793
4794
|
);
|
|
4794
4795
|
return data;
|
|
4795
4796
|
}
|
|
4797
|
+
async delete(tenantId, context) {
|
|
4798
|
+
const endpointInfo = tenant_exports.Endpoints.DeleteTenant;
|
|
4799
|
+
const endpoint = endpointInfo.uri.replace(":tenantId", tenantId);
|
|
4800
|
+
const data = await this.clientHTTP.makeRequest(
|
|
4801
|
+
this.env,
|
|
4802
|
+
endpoint,
|
|
4803
|
+
endpointInfo.method,
|
|
4804
|
+
null,
|
|
4805
|
+
context
|
|
4806
|
+
);
|
|
4807
|
+
return data;
|
|
4808
|
+
}
|
|
4796
4809
|
};
|
|
4797
4810
|
var Tenant_api_default = TenantAPI;
|
|
4798
4811
|
|
|
@@ -6476,6 +6489,7 @@ var Actions = {
|
|
|
6476
6489
|
TENANT_LIST: "tenant.list",
|
|
6477
6490
|
TENANT_VIEW: "tenant.view",
|
|
6478
6491
|
TENANT_UPDATE: "tenant.update",
|
|
6492
|
+
TENANT_DELETE: "tenant.delete",
|
|
6479
6493
|
TENANT_VIEW_MEMBERS: "tenant.view_members",
|
|
6480
6494
|
TENANT_UPDATE_MEMBERS: "tenant.update_members",
|
|
6481
6495
|
TENANT_VIEW_REPORT: "tenant.view_report",
|
|
@@ -6572,6 +6586,7 @@ var ActionCatalog = {
|
|
|
6572
6586
|
[Actions.TENANT_LIST]: { label: "List all tenants", group: "Tenants" },
|
|
6573
6587
|
[Actions.TENANT_VIEW]: { label: "View any tenant", group: "Tenants" },
|
|
6574
6588
|
[Actions.TENANT_UPDATE]: { label: "Update any tenant", group: "Tenants" },
|
|
6589
|
+
[Actions.TENANT_DELETE]: { label: "Delete a tenant", group: "Tenants" },
|
|
6575
6590
|
[Actions.TENANT_VIEW_MEMBERS]: { label: "View a tenant's members", group: "Tenants" },
|
|
6576
6591
|
[Actions.TENANT_UPDATE_MEMBERS]: { label: "Manage a tenant's members", group: "Tenants" },
|
|
6577
6592
|
[Actions.TENANT_VIEW_REPORT]: { label: "View a tenant's report", group: "Tenants", scopeable: true },
|
|
@@ -6999,6 +7014,10 @@ var Endpoints13 = {
|
|
|
6999
7014
|
UpdateMembers: {
|
|
7000
7015
|
uri: "/tenants/:tenantId/members",
|
|
7001
7016
|
method: "PUT"
|
|
7017
|
+
},
|
|
7018
|
+
DeleteTenant: {
|
|
7019
|
+
uri: "/tenants/:tenantId",
|
|
7020
|
+
method: "DELETE"
|
|
7002
7021
|
}
|
|
7003
7022
|
};
|
|
7004
7023
|
|