shred-api-client 2.6.2-rc.2 → 2.6.2-rc.6
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 +27 -6
- package/dist/index.js +27 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1526,6 +1526,20 @@ declare const MemberSchema: z.ZodObject<{
|
|
|
1526
1526
|
name: string;
|
|
1527
1527
|
isActive: boolean;
|
|
1528
1528
|
}>;
|
|
1529
|
+
declare enum Action {
|
|
1530
|
+
ADD = "ADD",
|
|
1531
|
+
REMOVE = "REMOVE"
|
|
1532
|
+
}
|
|
1533
|
+
declare const ReportViewerUpdateSchema: z.ZodObject<{
|
|
1534
|
+
userId: z.ZodString;
|
|
1535
|
+
action: z.ZodNativeEnum<typeof Action>;
|
|
1536
|
+
}, "strip", z.ZodTypeAny, {
|
|
1537
|
+
userId: string;
|
|
1538
|
+
action: Action;
|
|
1539
|
+
}, {
|
|
1540
|
+
userId: string;
|
|
1541
|
+
action: Action;
|
|
1542
|
+
}>;
|
|
1529
1543
|
declare const TenantUpdateSchema: z.ZodObject<{
|
|
1530
1544
|
preferences: z.ZodOptional<z.ZodObject<{
|
|
1531
1545
|
iconUrl: z.ZodString;
|
|
@@ -1621,7 +1635,6 @@ declare const TenantUpdateSchema: z.ZodObject<{
|
|
|
1621
1635
|
}[] | undefined;
|
|
1622
1636
|
}>>;
|
|
1623
1637
|
reportUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1624
|
-
reportViewers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1625
1638
|
}, "strip", z.ZodTypeAny, {
|
|
1626
1639
|
preferences?: {
|
|
1627
1640
|
iconUrl: string;
|
|
@@ -1647,7 +1660,6 @@ declare const TenantUpdateSchema: z.ZodObject<{
|
|
|
1647
1660
|
}[] | undefined;
|
|
1648
1661
|
} | undefined;
|
|
1649
1662
|
reportUrl?: string | undefined;
|
|
1650
|
-
reportViewers?: string[] | undefined;
|
|
1651
1663
|
}, {
|
|
1652
1664
|
preferences?: {
|
|
1653
1665
|
iconUrl: string;
|
|
@@ -1673,8 +1685,8 @@ declare const TenantUpdateSchema: z.ZodObject<{
|
|
|
1673
1685
|
}[] | undefined;
|
|
1674
1686
|
} | undefined;
|
|
1675
1687
|
reportUrl?: string | undefined;
|
|
1676
|
-
reportViewers?: string[] | undefined;
|
|
1677
1688
|
}>;
|
|
1689
|
+
type ReportViewerUpdate = z.infer<typeof ReportViewerUpdateSchema>;
|
|
1678
1690
|
type TenantUpdate = z.infer<typeof TenantUpdateSchema>;
|
|
1679
1691
|
type Tenant = z.infer<typeof TenantSchema>;
|
|
1680
1692
|
type Member = z.infer<typeof MemberSchema>;
|
|
@@ -1687,6 +1699,7 @@ interface IAPI$9 {
|
|
|
1687
1699
|
getTenant: (context: Context, tenantId?: string) => Promise<Tenant | null>;
|
|
1688
1700
|
getMembers: (context: Context, tenantId: string) => Promise<Member[]>;
|
|
1689
1701
|
update: (tenantId: string, data: TenantUpdate, context: Context) => Promise<boolean>;
|
|
1702
|
+
updateReportViewers: (tenantId: string, reportViewerUpdate: ReportViewerUpdate, context: Context) => Promise<boolean>;
|
|
1690
1703
|
}
|
|
1691
1704
|
declare const Endpoints$8: {
|
|
1692
1705
|
GetByInviteCode: {
|
|
@@ -1717,17 +1730,25 @@ declare const Endpoints$8: {
|
|
|
1717
1730
|
uri: string;
|
|
1718
1731
|
method: string;
|
|
1719
1732
|
};
|
|
1733
|
+
UpdateReportViewers: {
|
|
1734
|
+
uri: string;
|
|
1735
|
+
method: string;
|
|
1736
|
+
};
|
|
1720
1737
|
};
|
|
1721
1738
|
|
|
1739
|
+
type index$a_Action = Action;
|
|
1740
|
+
declare const index$a_Action: typeof Action;
|
|
1722
1741
|
type index$a_Member = Member;
|
|
1723
1742
|
declare const index$a_MemberSchema: typeof MemberSchema;
|
|
1724
1743
|
type index$a_Preferences = Preferences;
|
|
1725
1744
|
declare const index$a_PreferencesSchema: typeof PreferencesSchema;
|
|
1745
|
+
type index$a_ReportViewerUpdate = ReportViewerUpdate;
|
|
1746
|
+
declare const index$a_ReportViewerUpdateSchema: typeof ReportViewerUpdateSchema;
|
|
1726
1747
|
declare const index$a_TenantSchema: typeof TenantSchema;
|
|
1727
1748
|
type index$a_TenantUpdate = TenantUpdate;
|
|
1728
1749
|
declare const index$a_TenantUpdateSchema: typeof TenantUpdateSchema;
|
|
1729
1750
|
declare namespace index$a {
|
|
1730
|
-
export { Endpoints$8 as Endpoints, type Tenant as Entity, type IAPI$9 as IAPI, type index$a_Member as Member, index$a_MemberSchema as MemberSchema, type index$a_Preferences as Preferences, index$a_PreferencesSchema as PreferencesSchema, index$a_TenantSchema as TenantSchema, type index$a_TenantUpdate as TenantUpdate, index$a_TenantUpdateSchema as TenantUpdateSchema };
|
|
1751
|
+
export { index$a_Action as Action, Endpoints$8 as Endpoints, type Tenant as Entity, type IAPI$9 as IAPI, type index$a_Member as Member, index$a_MemberSchema as MemberSchema, type index$a_Preferences as Preferences, index$a_PreferencesSchema as PreferencesSchema, type index$a_ReportViewerUpdate as ReportViewerUpdate, index$a_ReportViewerUpdateSchema as ReportViewerUpdateSchema, index$a_TenantSchema as TenantSchema, type index$a_TenantUpdate as TenantUpdate, index$a_TenantUpdateSchema as TenantUpdateSchema };
|
|
1731
1752
|
}
|
|
1732
1753
|
|
|
1733
1754
|
declare const TrackParamSchema: z.ZodObject<{
|
|
@@ -1756,16 +1777,16 @@ declare const TrackSchema: z.ZodObject<{
|
|
|
1756
1777
|
}>, "many">>;
|
|
1757
1778
|
}, "strip", z.ZodTypeAny, {
|
|
1758
1779
|
label: string;
|
|
1759
|
-
category: string;
|
|
1760
1780
|
action: string;
|
|
1781
|
+
category: string;
|
|
1761
1782
|
params?: {
|
|
1762
1783
|
value: string | number;
|
|
1763
1784
|
name: string;
|
|
1764
1785
|
}[] | undefined;
|
|
1765
1786
|
}, {
|
|
1766
1787
|
label: string;
|
|
1767
|
-
category: string;
|
|
1768
1788
|
action: string;
|
|
1789
|
+
category: string;
|
|
1769
1790
|
params?: {
|
|
1770
1791
|
value: string | number;
|
|
1771
1792
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -4773,6 +4773,18 @@ var TenantAPI = class {
|
|
|
4773
4773
|
);
|
|
4774
4774
|
return data;
|
|
4775
4775
|
}
|
|
4776
|
+
async updateReportViewers(tenantId, reportViewerUpdate, context) {
|
|
4777
|
+
const endpointInfo = tenant_exports.Endpoints.UpdateReportViewers;
|
|
4778
|
+
const endpoint = endpointInfo.uri.replace(":tenantId", tenantId);
|
|
4779
|
+
const data = await this.clientHTTP.makeRequest(
|
|
4780
|
+
this.env,
|
|
4781
|
+
`${endpoint}`,
|
|
4782
|
+
endpointInfo.method,
|
|
4783
|
+
{ data: reportViewerUpdate, context },
|
|
4784
|
+
context
|
|
4785
|
+
);
|
|
4786
|
+
return data;
|
|
4787
|
+
}
|
|
4776
4788
|
};
|
|
4777
4789
|
var Tenant_api_default = TenantAPI;
|
|
4778
4790
|
|
|
@@ -6058,9 +6070,11 @@ var Endpoints9 = {
|
|
|
6058
6070
|
// src/model/tenant/index.ts
|
|
6059
6071
|
var tenant_exports = {};
|
|
6060
6072
|
__export(tenant_exports, {
|
|
6073
|
+
Action: () => Action,
|
|
6061
6074
|
Endpoints: () => Endpoints10,
|
|
6062
6075
|
MemberSchema: () => MemberSchema,
|
|
6063
6076
|
PreferencesSchema: () => PreferencesSchema,
|
|
6077
|
+
ReportViewerUpdateSchema: () => ReportViewerUpdateSchema,
|
|
6064
6078
|
TenantSchema: () => TenantSchema,
|
|
6065
6079
|
TenantUpdateSchema: () => TenantUpdateSchema
|
|
6066
6080
|
});
|
|
@@ -6168,9 +6182,17 @@ var MemberSchema = external_exports.object({
|
|
|
6168
6182
|
pictureUrl: external_exports.string(),
|
|
6169
6183
|
isActive: external_exports.boolean()
|
|
6170
6184
|
});
|
|
6185
|
+
var Action = /* @__PURE__ */ ((Action2) => {
|
|
6186
|
+
Action2["ADD"] = "ADD";
|
|
6187
|
+
Action2["REMOVE"] = "REMOVE";
|
|
6188
|
+
return Action2;
|
|
6189
|
+
})(Action || {});
|
|
6190
|
+
var ReportViewerUpdateSchema = external_exports.object({
|
|
6191
|
+
userId: external_exports.string(),
|
|
6192
|
+
action: external_exports.nativeEnum(Action)
|
|
6193
|
+
});
|
|
6171
6194
|
var TenantUpdateSchema = TenantSchema.pick({
|
|
6172
6195
|
reportUrl: true,
|
|
6173
|
-
reportViewers: true,
|
|
6174
6196
|
preferences: true
|
|
6175
6197
|
}).partial();
|
|
6176
6198
|
|
|
@@ -6203,6 +6225,10 @@ var Endpoints10 = {
|
|
|
6203
6225
|
Members: {
|
|
6204
6226
|
uri: "/tenants/:tenantId/members",
|
|
6205
6227
|
method: "GET"
|
|
6228
|
+
},
|
|
6229
|
+
UpdateReportViewers: {
|
|
6230
|
+
uri: "/tenants/:tenantId/report-viewers",
|
|
6231
|
+
method: "PUT"
|
|
6206
6232
|
}
|
|
6207
6233
|
};
|
|
6208
6234
|
|