shred-api-client 2.6.4 → 2.6.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 +164 -4
- package/dist/index.js +13 -7
- 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>;
|
|
@@ -1511,24 +1519,27 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1511
1519
|
reportViewers?: string[] | undefined;
|
|
1512
1520
|
}>;
|
|
1513
1521
|
declare const MemberSchema: z.ZodObject<{
|
|
1522
|
+
id: z.ZodString;
|
|
1514
1523
|
name: z.ZodString;
|
|
1515
1524
|
email: z.ZodString;
|
|
1516
1525
|
pictureUrl: z.ZodString;
|
|
1517
1526
|
isActive: z.ZodBoolean;
|
|
1518
1527
|
}, "strip", z.ZodTypeAny, {
|
|
1519
1528
|
email: string;
|
|
1529
|
+
id: string;
|
|
1520
1530
|
pictureUrl: string;
|
|
1521
1531
|
name: string;
|
|
1522
1532
|
isActive: boolean;
|
|
1523
1533
|
}, {
|
|
1524
1534
|
email: string;
|
|
1535
|
+
id: string;
|
|
1525
1536
|
pictureUrl: string;
|
|
1526
1537
|
name: string;
|
|
1527
1538
|
isActive: boolean;
|
|
1528
1539
|
}>;
|
|
1529
1540
|
declare enum Action {
|
|
1530
|
-
ADD = "
|
|
1531
|
-
REMOVE = "
|
|
1541
|
+
ADD = "ADD",
|
|
1542
|
+
REMOVE = "REMOVE"
|
|
1532
1543
|
}
|
|
1533
1544
|
declare const ReportViewerUpdateSchema: z.ZodObject<{
|
|
1534
1545
|
userId: z.ZodString;
|
|
@@ -1540,7 +1551,154 @@ declare const ReportViewerUpdateSchema: z.ZodObject<{
|
|
|
1540
1551
|
userId: string;
|
|
1541
1552
|
action: Action;
|
|
1542
1553
|
}>;
|
|
1554
|
+
declare const TenantUpdateSchema: z.ZodObject<{
|
|
1555
|
+
preferences: z.ZodOptional<z.ZodObject<{
|
|
1556
|
+
iconUrl: z.ZodString;
|
|
1557
|
+
logoUrl: z.ZodString;
|
|
1558
|
+
primaryColor: z.ZodString;
|
|
1559
|
+
secondaryColor: z.ZodString;
|
|
1560
|
+
guidelinesUrl: z.ZodOptional<z.ZodString>;
|
|
1561
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1562
|
+
industry: z.ZodOptional<z.ZodString>;
|
|
1563
|
+
assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1564
|
+
assetId: z.ZodString;
|
|
1565
|
+
fileName: z.ZodString;
|
|
1566
|
+
extension: z.ZodString;
|
|
1567
|
+
fileSize: z.ZodNumber;
|
|
1568
|
+
assetUrl: z.ZodString;
|
|
1569
|
+
thumbnailUrl: z.ZodString;
|
|
1570
|
+
type: z.ZodString;
|
|
1571
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
1572
|
+
progress: z.ZodOptional<z.ZodNumber>;
|
|
1573
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1574
|
+
authorId: z.ZodString;
|
|
1575
|
+
uploadedAt: z.ZodNumber;
|
|
1576
|
+
}, "strip", z.ZodTypeAny, {
|
|
1577
|
+
type: string;
|
|
1578
|
+
assetId: string;
|
|
1579
|
+
fileName: string;
|
|
1580
|
+
extension: string;
|
|
1581
|
+
fileSize: number;
|
|
1582
|
+
assetUrl: string;
|
|
1583
|
+
thumbnailUrl: string;
|
|
1584
|
+
authorId: string;
|
|
1585
|
+
uploadedAt: number;
|
|
1586
|
+
error?: string | undefined;
|
|
1587
|
+
duration?: number | undefined;
|
|
1588
|
+
progress?: number | undefined;
|
|
1589
|
+
}, {
|
|
1590
|
+
type: string;
|
|
1591
|
+
assetId: string;
|
|
1592
|
+
fileName: string;
|
|
1593
|
+
extension: string;
|
|
1594
|
+
fileSize: number;
|
|
1595
|
+
assetUrl: string;
|
|
1596
|
+
thumbnailUrl: string;
|
|
1597
|
+
authorId: string;
|
|
1598
|
+
uploadedAt: number;
|
|
1599
|
+
error?: string | undefined;
|
|
1600
|
+
duration?: number | undefined;
|
|
1601
|
+
progress?: number | undefined;
|
|
1602
|
+
}>, "many">>;
|
|
1603
|
+
}, "strip", z.ZodTypeAny, {
|
|
1604
|
+
iconUrl: string;
|
|
1605
|
+
logoUrl: string;
|
|
1606
|
+
primaryColor: string;
|
|
1607
|
+
secondaryColor: string;
|
|
1608
|
+
description?: string | undefined;
|
|
1609
|
+
guidelinesUrl?: string | undefined;
|
|
1610
|
+
industry?: string | undefined;
|
|
1611
|
+
assets?: {
|
|
1612
|
+
type: string;
|
|
1613
|
+
assetId: string;
|
|
1614
|
+
fileName: string;
|
|
1615
|
+
extension: string;
|
|
1616
|
+
fileSize: number;
|
|
1617
|
+
assetUrl: string;
|
|
1618
|
+
thumbnailUrl: string;
|
|
1619
|
+
authorId: string;
|
|
1620
|
+
uploadedAt: number;
|
|
1621
|
+
error?: string | undefined;
|
|
1622
|
+
duration?: number | undefined;
|
|
1623
|
+
progress?: number | undefined;
|
|
1624
|
+
}[] | undefined;
|
|
1625
|
+
}, {
|
|
1626
|
+
iconUrl: string;
|
|
1627
|
+
logoUrl: string;
|
|
1628
|
+
primaryColor: string;
|
|
1629
|
+
secondaryColor: string;
|
|
1630
|
+
description?: string | undefined;
|
|
1631
|
+
guidelinesUrl?: string | undefined;
|
|
1632
|
+
industry?: string | undefined;
|
|
1633
|
+
assets?: {
|
|
1634
|
+
type: string;
|
|
1635
|
+
assetId: string;
|
|
1636
|
+
fileName: string;
|
|
1637
|
+
extension: string;
|
|
1638
|
+
fileSize: number;
|
|
1639
|
+
assetUrl: string;
|
|
1640
|
+
thumbnailUrl: string;
|
|
1641
|
+
authorId: string;
|
|
1642
|
+
uploadedAt: number;
|
|
1643
|
+
error?: string | undefined;
|
|
1644
|
+
duration?: number | undefined;
|
|
1645
|
+
progress?: number | undefined;
|
|
1646
|
+
}[] | undefined;
|
|
1647
|
+
}>>;
|
|
1648
|
+
reportUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1649
|
+
}, "strip", z.ZodTypeAny, {
|
|
1650
|
+
preferences?: {
|
|
1651
|
+
iconUrl: string;
|
|
1652
|
+
logoUrl: string;
|
|
1653
|
+
primaryColor: string;
|
|
1654
|
+
secondaryColor: string;
|
|
1655
|
+
description?: string | undefined;
|
|
1656
|
+
guidelinesUrl?: string | undefined;
|
|
1657
|
+
industry?: string | undefined;
|
|
1658
|
+
assets?: {
|
|
1659
|
+
type: string;
|
|
1660
|
+
assetId: string;
|
|
1661
|
+
fileName: string;
|
|
1662
|
+
extension: string;
|
|
1663
|
+
fileSize: number;
|
|
1664
|
+
assetUrl: string;
|
|
1665
|
+
thumbnailUrl: string;
|
|
1666
|
+
authorId: string;
|
|
1667
|
+
uploadedAt: number;
|
|
1668
|
+
error?: string | undefined;
|
|
1669
|
+
duration?: number | undefined;
|
|
1670
|
+
progress?: number | undefined;
|
|
1671
|
+
}[] | undefined;
|
|
1672
|
+
} | undefined;
|
|
1673
|
+
reportUrl?: string | undefined;
|
|
1674
|
+
}, {
|
|
1675
|
+
preferences?: {
|
|
1676
|
+
iconUrl: string;
|
|
1677
|
+
logoUrl: string;
|
|
1678
|
+
primaryColor: string;
|
|
1679
|
+
secondaryColor: string;
|
|
1680
|
+
description?: string | undefined;
|
|
1681
|
+
guidelinesUrl?: string | undefined;
|
|
1682
|
+
industry?: string | undefined;
|
|
1683
|
+
assets?: {
|
|
1684
|
+
type: string;
|
|
1685
|
+
assetId: string;
|
|
1686
|
+
fileName: string;
|
|
1687
|
+
extension: string;
|
|
1688
|
+
fileSize: number;
|
|
1689
|
+
assetUrl: string;
|
|
1690
|
+
thumbnailUrl: string;
|
|
1691
|
+
authorId: string;
|
|
1692
|
+
uploadedAt: number;
|
|
1693
|
+
error?: string | undefined;
|
|
1694
|
+
duration?: number | undefined;
|
|
1695
|
+
progress?: number | undefined;
|
|
1696
|
+
}[] | undefined;
|
|
1697
|
+
} | undefined;
|
|
1698
|
+
reportUrl?: string | undefined;
|
|
1699
|
+
}>;
|
|
1543
1700
|
type ReportViewerUpdate = z.infer<typeof ReportViewerUpdateSchema>;
|
|
1701
|
+
type TenantUpdate = z.infer<typeof TenantUpdateSchema>;
|
|
1544
1702
|
type Tenant = z.infer<typeof TenantSchema>;
|
|
1545
1703
|
type Member = z.infer<typeof MemberSchema>;
|
|
1546
1704
|
type Preferences = z.infer<typeof PreferencesSchema>;
|
|
@@ -1551,7 +1709,7 @@ interface IAPI$9 {
|
|
|
1551
1709
|
list: (context: Context) => Promise<Tenant[]>;
|
|
1552
1710
|
getTenant: (context: Context, tenantId?: string) => Promise<Tenant | null>;
|
|
1553
1711
|
getMembers: (context: Context, tenantId: string) => Promise<Member[]>;
|
|
1554
|
-
update: (tenantId: string, data:
|
|
1712
|
+
update: (tenantId: string, data: TenantUpdate, context: Context) => Promise<boolean>;
|
|
1555
1713
|
updateReportViewers: (tenantId: string, reportViewerUpdate: ReportViewerUpdate, context: Context) => Promise<boolean>;
|
|
1556
1714
|
}
|
|
1557
1715
|
declare const Endpoints$8: {
|
|
@@ -1598,8 +1756,10 @@ declare const index$a_PreferencesSchema: typeof PreferencesSchema;
|
|
|
1598
1756
|
type index$a_ReportViewerUpdate = ReportViewerUpdate;
|
|
1599
1757
|
declare const index$a_ReportViewerUpdateSchema: typeof ReportViewerUpdateSchema;
|
|
1600
1758
|
declare const index$a_TenantSchema: typeof TenantSchema;
|
|
1759
|
+
type index$a_TenantUpdate = TenantUpdate;
|
|
1760
|
+
declare const index$a_TenantUpdateSchema: typeof TenantUpdateSchema;
|
|
1601
1761
|
declare namespace index$a {
|
|
1602
|
-
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 };
|
|
1762
|
+
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 };
|
|
1603
1763
|
}
|
|
1604
1764
|
|
|
1605
1765
|
declare const TrackParamSchema: z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -4775,13 +4775,12 @@ var TenantAPI = class {
|
|
|
4775
4775
|
}
|
|
4776
4776
|
async updateReportViewers(tenantId, reportViewerUpdate, context) {
|
|
4777
4777
|
const endpointInfo = tenant_exports.Endpoints.UpdateReportViewers;
|
|
4778
|
-
const
|
|
4779
|
-
const endpoint = endpointData.uri.replace(":tenantId", tenantId);
|
|
4778
|
+
const endpoint = endpointInfo.uri.replace(":tenantId", tenantId);
|
|
4780
4779
|
const data = await this.clientHTTP.makeRequest(
|
|
4781
4780
|
this.env,
|
|
4782
4781
|
`${endpoint}`,
|
|
4783
4782
|
endpointInfo.method,
|
|
4784
|
-
|
|
4783
|
+
reportViewerUpdate,
|
|
4785
4784
|
context
|
|
4786
4785
|
);
|
|
4787
4786
|
return data;
|
|
@@ -6102,7 +6101,8 @@ __export(tenant_exports, {
|
|
|
6102
6101
|
MemberSchema: () => MemberSchema,
|
|
6103
6102
|
PreferencesSchema: () => PreferencesSchema,
|
|
6104
6103
|
ReportViewerUpdateSchema: () => ReportViewerUpdateSchema,
|
|
6105
|
-
TenantSchema: () => TenantSchema
|
|
6104
|
+
TenantSchema: () => TenantSchema,
|
|
6105
|
+
TenantUpdateSchema: () => TenantUpdateSchema
|
|
6106
6106
|
});
|
|
6107
6107
|
|
|
6108
6108
|
// src/model/subscription/Subscription.schema.ts
|
|
@@ -6152,6 +6152,7 @@ var SubscriptionSchema = external_exports.object({
|
|
|
6152
6152
|
currentPeriodStart: external_exports.number().optional(),
|
|
6153
6153
|
currentPeriodEnd: external_exports.number().optional(),
|
|
6154
6154
|
paymentMethodId: external_exports.string().optional(),
|
|
6155
|
+
isExternal: external_exports.boolean().optional().default(false),
|
|
6155
6156
|
product: ProductSchema,
|
|
6156
6157
|
type: external_exports.nativeEnum(Type).optional(),
|
|
6157
6158
|
plan: PlanSchema.optional()
|
|
@@ -6199,24 +6200,29 @@ var TenantSchema = external_exports.object({
|
|
|
6199
6200
|
subscription: external_exports.optional(external_exports.lazy(() => SubscriptionSchema)),
|
|
6200
6201
|
totalSubscriptions: external_exports.number().optional(),
|
|
6201
6202
|
totalUsers: external_exports.number().optional(),
|
|
6202
|
-
reportUrl: external_exports.string().optional(),
|
|
6203
|
+
reportUrl: external_exports.string().url().optional(),
|
|
6203
6204
|
reportViewers: external_exports.array(external_exports.string()).optional()
|
|
6204
6205
|
});
|
|
6205
6206
|
var MemberSchema = external_exports.object({
|
|
6207
|
+
id: external_exports.string(),
|
|
6206
6208
|
name: external_exports.string(),
|
|
6207
6209
|
email: external_exports.string(),
|
|
6208
6210
|
pictureUrl: external_exports.string(),
|
|
6209
6211
|
isActive: external_exports.boolean()
|
|
6210
6212
|
});
|
|
6211
6213
|
var Action = /* @__PURE__ */ ((Action2) => {
|
|
6212
|
-
Action2["ADD"] = "
|
|
6213
|
-
Action2["REMOVE"] = "
|
|
6214
|
+
Action2["ADD"] = "ADD";
|
|
6215
|
+
Action2["REMOVE"] = "REMOVE";
|
|
6214
6216
|
return Action2;
|
|
6215
6217
|
})(Action || {});
|
|
6216
6218
|
var ReportViewerUpdateSchema = external_exports.object({
|
|
6217
6219
|
userId: external_exports.string(),
|
|
6218
6220
|
action: external_exports.nativeEnum(Action)
|
|
6219
6221
|
});
|
|
6222
|
+
var TenantUpdateSchema = TenantSchema.pick({
|
|
6223
|
+
reportUrl: true,
|
|
6224
|
+
preferences: true
|
|
6225
|
+
}).partial();
|
|
6220
6226
|
|
|
6221
6227
|
// src/model/tenant/Tenant.api.ts
|
|
6222
6228
|
var Endpoints10 = {
|