shred-api-client 2.6.5 → 2.7.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 +27 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -382,6 +382,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
382
382
|
currentPeriodStart: z.ZodOptional<z.ZodNumber>;
|
|
383
383
|
currentPeriodEnd: z.ZodOptional<z.ZodNumber>;
|
|
384
384
|
paymentMethodId: z.ZodOptional<z.ZodString>;
|
|
385
|
+
isExternal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
385
386
|
product: z.ZodObject<{
|
|
386
387
|
id: z.ZodString;
|
|
387
388
|
name: z.ZodString;
|
|
@@ -480,6 +481,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
480
481
|
}, "strip", z.ZodTypeAny, {
|
|
481
482
|
id: string;
|
|
482
483
|
status: string;
|
|
484
|
+
isExternal: boolean;
|
|
483
485
|
product: {
|
|
484
486
|
id: string;
|
|
485
487
|
name: string;
|
|
@@ -541,6 +543,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
541
543
|
currentPeriodStart?: number | undefined;
|
|
542
544
|
currentPeriodEnd?: number | undefined;
|
|
543
545
|
paymentMethodId?: string | undefined;
|
|
546
|
+
isExternal?: boolean | undefined;
|
|
544
547
|
plan?: {
|
|
545
548
|
id: string;
|
|
546
549
|
metadata: Record<string, string>;
|
|
@@ -1181,6 +1184,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1181
1184
|
currentPeriodStart: z.ZodOptional<z.ZodNumber>;
|
|
1182
1185
|
currentPeriodEnd: z.ZodOptional<z.ZodNumber>;
|
|
1183
1186
|
paymentMethodId: z.ZodOptional<z.ZodString>;
|
|
1187
|
+
isExternal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1184
1188
|
product: z.ZodObject<{
|
|
1185
1189
|
id: z.ZodString;
|
|
1186
1190
|
name: z.ZodString;
|
|
@@ -1279,6 +1283,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1279
1283
|
}, "strip", z.ZodTypeAny, {
|
|
1280
1284
|
id: string;
|
|
1281
1285
|
status: string;
|
|
1286
|
+
isExternal: boolean;
|
|
1282
1287
|
product: {
|
|
1283
1288
|
id: string;
|
|
1284
1289
|
name: string;
|
|
@@ -1340,6 +1345,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1340
1345
|
currentPeriodStart?: number | undefined;
|
|
1341
1346
|
currentPeriodEnd?: number | undefined;
|
|
1342
1347
|
paymentMethodId?: string | undefined;
|
|
1348
|
+
isExternal?: boolean | undefined;
|
|
1343
1349
|
plan?: {
|
|
1344
1350
|
id: string;
|
|
1345
1351
|
metadata: Record<string, string>;
|
|
@@ -1393,6 +1399,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1393
1399
|
subscription?: {
|
|
1394
1400
|
id: string;
|
|
1395
1401
|
status: string;
|
|
1402
|
+
isExternal: boolean;
|
|
1396
1403
|
product: {
|
|
1397
1404
|
id: string;
|
|
1398
1405
|
name: string;
|
|
@@ -1496,6 +1503,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1496
1503
|
currentPeriodStart?: number | undefined;
|
|
1497
1504
|
currentPeriodEnd?: number | undefined;
|
|
1498
1505
|
paymentMethodId?: string | undefined;
|
|
1506
|
+
isExternal?: boolean | undefined;
|
|
1499
1507
|
plan?: {
|
|
1500
1508
|
id: string;
|
|
1501
1509
|
metadata: Record<string, string>;
|
|
@@ -1543,6 +1551,16 @@ declare const ReportViewerUpdateSchema: z.ZodObject<{
|
|
|
1543
1551
|
userId: string;
|
|
1544
1552
|
action: Action;
|
|
1545
1553
|
}>;
|
|
1554
|
+
declare const MemberUpdateSchema: z.ZodObject<{
|
|
1555
|
+
userIds: z.ZodArray<z.ZodString, "many">;
|
|
1556
|
+
action: z.ZodNativeEnum<typeof Action>;
|
|
1557
|
+
}, "strip", z.ZodTypeAny, {
|
|
1558
|
+
action: Action;
|
|
1559
|
+
userIds: string[];
|
|
1560
|
+
}, {
|
|
1561
|
+
action: Action;
|
|
1562
|
+
userIds: string[];
|
|
1563
|
+
}>;
|
|
1546
1564
|
declare const TenantUpdateSchema: z.ZodObject<{
|
|
1547
1565
|
preferences: z.ZodOptional<z.ZodObject<{
|
|
1548
1566
|
iconUrl: z.ZodString;
|
|
@@ -1690,6 +1708,7 @@ declare const TenantUpdateSchema: z.ZodObject<{
|
|
|
1690
1708
|
reportUrl?: string | undefined;
|
|
1691
1709
|
}>;
|
|
1692
1710
|
type ReportViewerUpdate = z.infer<typeof ReportViewerUpdateSchema>;
|
|
1711
|
+
type MemberUpdate = z.infer<typeof MemberUpdateSchema>;
|
|
1693
1712
|
type TenantUpdate = z.infer<typeof TenantUpdateSchema>;
|
|
1694
1713
|
type Tenant = z.infer<typeof TenantSchema>;
|
|
1695
1714
|
type Member = z.infer<typeof MemberSchema>;
|
|
@@ -1703,6 +1722,7 @@ interface IAPI$9 {
|
|
|
1703
1722
|
getMembers: (context: Context, tenantId: string) => Promise<Member[]>;
|
|
1704
1723
|
update: (tenantId: string, data: TenantUpdate, context: Context) => Promise<boolean>;
|
|
1705
1724
|
updateReportViewers: (tenantId: string, reportViewerUpdate: ReportViewerUpdate, context: Context) => Promise<boolean>;
|
|
1725
|
+
updateMembers: (tenantId: string, memberUpdate: MemberUpdate, context: Context) => Promise<boolean>;
|
|
1706
1726
|
}
|
|
1707
1727
|
declare const Endpoints$8: {
|
|
1708
1728
|
GetByInviteCode: {
|
|
@@ -1737,12 +1757,18 @@ declare const Endpoints$8: {
|
|
|
1737
1757
|
uri: string;
|
|
1738
1758
|
method: string;
|
|
1739
1759
|
};
|
|
1760
|
+
UpdateMembers: {
|
|
1761
|
+
uri: string;
|
|
1762
|
+
method: string;
|
|
1763
|
+
};
|
|
1740
1764
|
};
|
|
1741
1765
|
|
|
1742
1766
|
type index$a_Action = Action;
|
|
1743
1767
|
declare const index$a_Action: typeof Action;
|
|
1744
1768
|
type index$a_Member = Member;
|
|
1745
1769
|
declare const index$a_MemberSchema: typeof MemberSchema;
|
|
1770
|
+
type index$a_MemberUpdate = MemberUpdate;
|
|
1771
|
+
declare const index$a_MemberUpdateSchema: typeof MemberUpdateSchema;
|
|
1746
1772
|
type index$a_Preferences = Preferences;
|
|
1747
1773
|
declare const index$a_PreferencesSchema: typeof PreferencesSchema;
|
|
1748
1774
|
type index$a_ReportViewerUpdate = ReportViewerUpdate;
|
|
@@ -1751,7 +1777,7 @@ declare const index$a_TenantSchema: typeof TenantSchema;
|
|
|
1751
1777
|
type index$a_TenantUpdate = TenantUpdate;
|
|
1752
1778
|
declare const index$a_TenantUpdateSchema: typeof TenantUpdateSchema;
|
|
1753
1779
|
declare namespace index$a {
|
|
1754
|
-
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 };
|
|
1780
|
+
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_MemberUpdate as MemberUpdate, index$a_MemberUpdateSchema as MemberUpdateSchema, 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 };
|
|
1755
1781
|
}
|
|
1756
1782
|
|
|
1757
1783
|
declare const TrackParamSchema: z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -4785,6 +4785,18 @@ var TenantAPI = class {
|
|
|
4785
4785
|
);
|
|
4786
4786
|
return data;
|
|
4787
4787
|
}
|
|
4788
|
+
async updateMembers(tenantId, memberUpdate, context) {
|
|
4789
|
+
const endpointInfo = tenant_exports.Endpoints.UpdateMembers;
|
|
4790
|
+
const endpoint = endpointInfo.uri.replace(":tenantId", tenantId);
|
|
4791
|
+
const data = await this.clientHTTP.makeRequest(
|
|
4792
|
+
this.env,
|
|
4793
|
+
`${endpoint}`,
|
|
4794
|
+
endpointInfo.method,
|
|
4795
|
+
memberUpdate,
|
|
4796
|
+
context
|
|
4797
|
+
);
|
|
4798
|
+
return data;
|
|
4799
|
+
}
|
|
4788
4800
|
};
|
|
4789
4801
|
var Tenant_api_default = TenantAPI;
|
|
4790
4802
|
|
|
@@ -6099,6 +6111,7 @@ __export(tenant_exports, {
|
|
|
6099
6111
|
Action: () => Action,
|
|
6100
6112
|
Endpoints: () => Endpoints10,
|
|
6101
6113
|
MemberSchema: () => MemberSchema,
|
|
6114
|
+
MemberUpdateSchema: () => MemberUpdateSchema,
|
|
6102
6115
|
PreferencesSchema: () => PreferencesSchema,
|
|
6103
6116
|
ReportViewerUpdateSchema: () => ReportViewerUpdateSchema,
|
|
6104
6117
|
TenantSchema: () => TenantSchema,
|
|
@@ -6152,6 +6165,7 @@ var SubscriptionSchema = external_exports.object({
|
|
|
6152
6165
|
currentPeriodStart: external_exports.number().optional(),
|
|
6153
6166
|
currentPeriodEnd: external_exports.number().optional(),
|
|
6154
6167
|
paymentMethodId: external_exports.string().optional(),
|
|
6168
|
+
isExternal: external_exports.boolean().optional().default(false),
|
|
6155
6169
|
product: ProductSchema,
|
|
6156
6170
|
type: external_exports.nativeEnum(Type).optional(),
|
|
6157
6171
|
plan: PlanSchema.optional()
|
|
@@ -6218,6 +6232,10 @@ var ReportViewerUpdateSchema = external_exports.object({
|
|
|
6218
6232
|
userId: external_exports.string(),
|
|
6219
6233
|
action: external_exports.nativeEnum(Action)
|
|
6220
6234
|
});
|
|
6235
|
+
var MemberUpdateSchema = external_exports.object({
|
|
6236
|
+
userIds: external_exports.array(external_exports.string()),
|
|
6237
|
+
action: external_exports.nativeEnum(Action)
|
|
6238
|
+
});
|
|
6221
6239
|
var TenantUpdateSchema = TenantSchema.pick({
|
|
6222
6240
|
reportUrl: true,
|
|
6223
6241
|
preferences: true
|
|
@@ -6256,6 +6274,10 @@ var Endpoints10 = {
|
|
|
6256
6274
|
UpdateReportViewers: {
|
|
6257
6275
|
uri: "/tenants/:tenantId/report-viewers",
|
|
6258
6276
|
method: "PUT"
|
|
6277
|
+
},
|
|
6278
|
+
UpdateMembers: {
|
|
6279
|
+
uri: "/tenants/:tenantId/members",
|
|
6280
|
+
method: "PUT"
|
|
6259
6281
|
}
|
|
6260
6282
|
};
|
|
6261
6283
|
|