shred-api-client 2.4.13 → 2.4.14-rc.4
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 +30 -10
- package/dist/index.js +30 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1304,6 +1304,8 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1304
1304
|
}>>>;
|
|
1305
1305
|
totalSubscriptions: z.ZodOptional<z.ZodNumber>;
|
|
1306
1306
|
totalUsers: z.ZodOptional<z.ZodNumber>;
|
|
1307
|
+
reportUrl: z.ZodOptional<z.ZodString>;
|
|
1308
|
+
reportViewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1307
1309
|
}, "strip", z.ZodTypeAny, {
|
|
1308
1310
|
id: string;
|
|
1309
1311
|
name: string;
|
|
@@ -1380,6 +1382,8 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1380
1382
|
} | undefined;
|
|
1381
1383
|
totalSubscriptions?: number | undefined;
|
|
1382
1384
|
totalUsers?: number | undefined;
|
|
1385
|
+
reportUrl?: string | undefined;
|
|
1386
|
+
reportViewers?: string[] | undefined;
|
|
1383
1387
|
}, {
|
|
1384
1388
|
id: string;
|
|
1385
1389
|
name: string;
|
|
@@ -1456,6 +1460,8 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1456
1460
|
} | undefined;
|
|
1457
1461
|
totalSubscriptions?: number | undefined;
|
|
1458
1462
|
totalUsers?: number | undefined;
|
|
1463
|
+
reportUrl?: string | undefined;
|
|
1464
|
+
reportViewers?: string[] | undefined;
|
|
1459
1465
|
}>;
|
|
1460
1466
|
declare const MemberSchema: z.ZodObject<{
|
|
1461
1467
|
name: z.ZodString;
|
|
@@ -1473,6 +1479,21 @@ declare const MemberSchema: z.ZodObject<{
|
|
|
1473
1479
|
name: string;
|
|
1474
1480
|
isActive: boolean;
|
|
1475
1481
|
}>;
|
|
1482
|
+
declare enum Action {
|
|
1483
|
+
ADD = "add",
|
|
1484
|
+
REMOVE = "remove"
|
|
1485
|
+
}
|
|
1486
|
+
declare const ReportViewerUpdateSchema: z.ZodObject<{
|
|
1487
|
+
userId: z.ZodString;
|
|
1488
|
+
action: z.ZodNativeEnum<typeof Action>;
|
|
1489
|
+
}, "strip", z.ZodTypeAny, {
|
|
1490
|
+
userId: string;
|
|
1491
|
+
action: Action;
|
|
1492
|
+
}, {
|
|
1493
|
+
userId: string;
|
|
1494
|
+
action: Action;
|
|
1495
|
+
}>;
|
|
1496
|
+
type ReportViewerUpdate = z.infer<typeof ReportViewerUpdateSchema>;
|
|
1476
1497
|
type Tenant = z.infer<typeof TenantSchema>;
|
|
1477
1498
|
type Member = z.infer<typeof MemberSchema>;
|
|
1478
1499
|
type Preferences = z.infer<typeof PreferencesSchema>;
|
|
@@ -1484,6 +1505,7 @@ interface IAPI$7 {
|
|
|
1484
1505
|
getTenant: (context: Context, tenantId?: string) => Promise<Tenant | null>;
|
|
1485
1506
|
getMembers: (context: Context, tenantId: string) => Promise<Member[]>;
|
|
1486
1507
|
update: (tenantId: string, data: Pick<Tenant, "preferences">, context: Context) => Promise<boolean>;
|
|
1508
|
+
updateReportViewers: (tenantId: string, reportViewerUpdate: ReportViewerUpdate, context: Context) => Promise<boolean>;
|
|
1487
1509
|
}
|
|
1488
1510
|
declare const Endpoints$6: {
|
|
1489
1511
|
GetByInviteCode: {
|
|
@@ -1514,6 +1536,10 @@ declare const Endpoints$6: {
|
|
|
1514
1536
|
uri: string;
|
|
1515
1537
|
method: string;
|
|
1516
1538
|
};
|
|
1539
|
+
UpdateReportViewers: {
|
|
1540
|
+
uri: string;
|
|
1541
|
+
method: string;
|
|
1542
|
+
};
|
|
1517
1543
|
};
|
|
1518
1544
|
|
|
1519
1545
|
type index$8_Member = Member;
|
|
@@ -1551,16 +1577,16 @@ declare const TrackSchema: z.ZodObject<{
|
|
|
1551
1577
|
}>, "many">>;
|
|
1552
1578
|
}, "strip", z.ZodTypeAny, {
|
|
1553
1579
|
label: string;
|
|
1554
|
-
category: string;
|
|
1555
1580
|
action: string;
|
|
1581
|
+
category: string;
|
|
1556
1582
|
params?: {
|
|
1557
1583
|
value: string | number;
|
|
1558
1584
|
name: string;
|
|
1559
1585
|
}[] | undefined;
|
|
1560
1586
|
}, {
|
|
1561
1587
|
label: string;
|
|
1562
|
-
category: string;
|
|
1563
1588
|
action: string;
|
|
1589
|
+
category: string;
|
|
1564
1590
|
params?: {
|
|
1565
1591
|
value: string | number;
|
|
1566
1592
|
name: string;
|
|
@@ -2274,12 +2300,11 @@ declare const NotificationDetailSchema: z.ZodObject<Pick<{
|
|
|
2274
2300
|
}>>;
|
|
2275
2301
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2276
2302
|
error: z.ZodOptional<z.ZodString>;
|
|
2277
|
-
}, "userId" | "title" | "body" | "
|
|
2303
|
+
}, "userId" | "title" | "body" | "cta" | "metadata">, "strip", z.ZodTypeAny, {
|
|
2278
2304
|
userId: string;
|
|
2279
2305
|
title: string;
|
|
2280
2306
|
body: string;
|
|
2281
2307
|
metadata: Record<string, string | number>;
|
|
2282
|
-
type?: NotificationType | undefined;
|
|
2283
2308
|
cta?: {
|
|
2284
2309
|
label: string;
|
|
2285
2310
|
url: string;
|
|
@@ -2289,7 +2314,6 @@ declare const NotificationDetailSchema: z.ZodObject<Pick<{
|
|
|
2289
2314
|
title: string;
|
|
2290
2315
|
body: string;
|
|
2291
2316
|
metadata: Record<string, string | number>;
|
|
2292
|
-
type?: NotificationType | undefined;
|
|
2293
2317
|
cta?: {
|
|
2294
2318
|
label: string;
|
|
2295
2319
|
url: string;
|
|
@@ -2415,12 +2439,11 @@ declare const TriggerSchema: z.ZodObject<{
|
|
|
2415
2439
|
}>>;
|
|
2416
2440
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2417
2441
|
error: z.ZodOptional<z.ZodString>;
|
|
2418
|
-
}, "userId" | "title" | "body" | "
|
|
2442
|
+
}, "userId" | "title" | "body" | "cta" | "metadata">, "strip", z.ZodTypeAny, {
|
|
2419
2443
|
userId: string;
|
|
2420
2444
|
title: string;
|
|
2421
2445
|
body: string;
|
|
2422
2446
|
metadata: Record<string, string | number>;
|
|
2423
|
-
type?: NotificationType | undefined;
|
|
2424
2447
|
cta?: {
|
|
2425
2448
|
label: string;
|
|
2426
2449
|
url: string;
|
|
@@ -2430,7 +2453,6 @@ declare const TriggerSchema: z.ZodObject<{
|
|
|
2430
2453
|
title: string;
|
|
2431
2454
|
body: string;
|
|
2432
2455
|
metadata: Record<string, string | number>;
|
|
2433
|
-
type?: NotificationType | undefined;
|
|
2434
2456
|
cta?: {
|
|
2435
2457
|
label: string;
|
|
2436
2458
|
url: string;
|
|
@@ -2547,7 +2569,6 @@ declare const TriggerSchema: z.ZodObject<{
|
|
|
2547
2569
|
title: string;
|
|
2548
2570
|
body: string;
|
|
2549
2571
|
metadata: Record<string, string | number>;
|
|
2550
|
-
type?: NotificationType | undefined;
|
|
2551
2572
|
cta?: {
|
|
2552
2573
|
label: string;
|
|
2553
2574
|
url: string;
|
|
@@ -2599,7 +2620,6 @@ declare const TriggerSchema: z.ZodObject<{
|
|
|
2599
2620
|
title: string;
|
|
2600
2621
|
body: string;
|
|
2601
2622
|
metadata: Record<string, string | number>;
|
|
2602
|
-
type?: NotificationType | undefined;
|
|
2603
2623
|
cta?: {
|
|
2604
2624
|
label: string;
|
|
2605
2625
|
url: string;
|
package/dist/index.js
CHANGED
|
@@ -4249,8 +4249,7 @@ var NotificationDetailSchema = NotificationItemSchema.pick({
|
|
|
4249
4249
|
body: true,
|
|
4250
4250
|
userId: true,
|
|
4251
4251
|
metadata: true,
|
|
4252
|
-
cta: true
|
|
4253
|
-
type: true
|
|
4252
|
+
cta: true
|
|
4254
4253
|
});
|
|
4255
4254
|
var CriteriaSchema = external_exports.object({
|
|
4256
4255
|
type: external_exports.nativeEnum(CriteriaType),
|
|
@@ -4709,6 +4708,19 @@ var TenantAPI = class {
|
|
|
4709
4708
|
);
|
|
4710
4709
|
return data;
|
|
4711
4710
|
}
|
|
4711
|
+
async updateReportViewers(tenantId, reportViewerUpdate, context) {
|
|
4712
|
+
const endpointInfo = tenant_exports.Endpoints.UpdateReportViewers;
|
|
4713
|
+
const endpointData = tenant_exports.Endpoints.UpdateReportViewers;
|
|
4714
|
+
const endpoint = endpointData.uri.replace(":tenantId", tenantId);
|
|
4715
|
+
const data = await this.clientHTTP.makeRequest(
|
|
4716
|
+
this.env,
|
|
4717
|
+
`${endpoint}`,
|
|
4718
|
+
endpointInfo.method,
|
|
4719
|
+
{ tenantId, reportViewerUpdate, context },
|
|
4720
|
+
context
|
|
4721
|
+
);
|
|
4722
|
+
return data;
|
|
4723
|
+
}
|
|
4712
4724
|
};
|
|
4713
4725
|
var Tenant_api_default = TenantAPI;
|
|
4714
4726
|
|
|
@@ -5975,7 +5987,9 @@ var TenantSchema = external_exports.object({
|
|
|
5975
5987
|
useOwnScripts: external_exports.boolean().optional(),
|
|
5976
5988
|
subscription: external_exports.optional(external_exports.lazy(() => SubscriptionSchema)),
|
|
5977
5989
|
totalSubscriptions: external_exports.number().optional(),
|
|
5978
|
-
totalUsers: external_exports.number().optional()
|
|
5990
|
+
totalUsers: external_exports.number().optional(),
|
|
5991
|
+
reportUrl: external_exports.string().optional(),
|
|
5992
|
+
reportViewers: external_exports.array(external_exports.string()).optional()
|
|
5979
5993
|
});
|
|
5980
5994
|
var MemberSchema = external_exports.object({
|
|
5981
5995
|
name: external_exports.string(),
|
|
@@ -5983,6 +5997,15 @@ var MemberSchema = external_exports.object({
|
|
|
5983
5997
|
pictureUrl: external_exports.string(),
|
|
5984
5998
|
isActive: external_exports.boolean()
|
|
5985
5999
|
});
|
|
6000
|
+
var Action = /* @__PURE__ */ ((Action2) => {
|
|
6001
|
+
Action2["ADD"] = "add";
|
|
6002
|
+
Action2["REMOVE"] = "remove";
|
|
6003
|
+
return Action2;
|
|
6004
|
+
})(Action || {});
|
|
6005
|
+
var ReportViewerUpdateSchema = external_exports.object({
|
|
6006
|
+
userId: external_exports.string(),
|
|
6007
|
+
action: external_exports.nativeEnum(Action)
|
|
6008
|
+
});
|
|
5986
6009
|
|
|
5987
6010
|
// src/model/tenant/Tenant.api.ts
|
|
5988
6011
|
var Endpoints8 = {
|
|
@@ -6013,6 +6036,10 @@ var Endpoints8 = {
|
|
|
6013
6036
|
Members: {
|
|
6014
6037
|
uri: "/tenants/:tenantId/members",
|
|
6015
6038
|
method: "GET"
|
|
6039
|
+
},
|
|
6040
|
+
UpdateReportViewers: {
|
|
6041
|
+
uri: "/tenants/:tenantId/report-viewers",
|
|
6042
|
+
method: "PUT"
|
|
6016
6043
|
}
|
|
6017
6044
|
};
|
|
6018
6045
|
|