shred-api-client 2.4.14 → 2.4.15

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 CHANGED
@@ -1362,6 +1362,8 @@ declare const TenantSchema: z.ZodObject<{
1362
1362
  }>>>;
1363
1363
  totalSubscriptions: z.ZodOptional<z.ZodNumber>;
1364
1364
  totalUsers: z.ZodOptional<z.ZodNumber>;
1365
+ reportUrl: z.ZodOptional<z.ZodString>;
1366
+ reportViewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1365
1367
  }, "strip", z.ZodTypeAny, {
1366
1368
  id: string;
1367
1369
  name: string;
@@ -1438,6 +1440,8 @@ declare const TenantSchema: z.ZodObject<{
1438
1440
  } | undefined;
1439
1441
  totalSubscriptions?: number | undefined;
1440
1442
  totalUsers?: number | undefined;
1443
+ reportUrl?: string | undefined;
1444
+ reportViewers?: string[] | undefined;
1441
1445
  }, {
1442
1446
  id: string;
1443
1447
  name: string;
@@ -1514,6 +1518,8 @@ declare const TenantSchema: z.ZodObject<{
1514
1518
  } | undefined;
1515
1519
  totalSubscriptions?: number | undefined;
1516
1520
  totalUsers?: number | undefined;
1521
+ reportUrl?: string | undefined;
1522
+ reportViewers?: string[] | undefined;
1517
1523
  }>;
1518
1524
  declare const MemberSchema: z.ZodObject<{
1519
1525
  name: z.ZodString;
@@ -1531,6 +1537,21 @@ declare const MemberSchema: z.ZodObject<{
1531
1537
  name: string;
1532
1538
  isActive: boolean;
1533
1539
  }>;
1540
+ declare enum Action {
1541
+ ADD = "add",
1542
+ REMOVE = "remove"
1543
+ }
1544
+ declare const ReportViewerUpdateSchema: z.ZodObject<{
1545
+ userId: z.ZodString;
1546
+ action: z.ZodNativeEnum<typeof Action>;
1547
+ }, "strip", z.ZodTypeAny, {
1548
+ userId: string;
1549
+ action: Action;
1550
+ }, {
1551
+ userId: string;
1552
+ action: Action;
1553
+ }>;
1554
+ type ReportViewerUpdate = z.infer<typeof ReportViewerUpdateSchema>;
1534
1555
  type Tenant = z.infer<typeof TenantSchema>;
1535
1556
  type Member = z.infer<typeof MemberSchema>;
1536
1557
  type Preferences = z.infer<typeof PreferencesSchema>;
@@ -1542,6 +1563,7 @@ interface IAPI$7 {
1542
1563
  getTenant: (context: Context, tenantId?: string) => Promise<Tenant | null>;
1543
1564
  getMembers: (context: Context, tenantId: string) => Promise<Member[]>;
1544
1565
  update: (tenantId: string, data: Pick<Tenant, "preferences">, context: Context) => Promise<boolean>;
1566
+ updateReportViewers: (tenantId: string, reportViewerUpdate: ReportViewerUpdate, context: Context) => Promise<boolean>;
1545
1567
  }
1546
1568
  declare const Endpoints$6: {
1547
1569
  GetByInviteCode: {
@@ -1572,15 +1594,23 @@ declare const Endpoints$6: {
1572
1594
  uri: string;
1573
1595
  method: string;
1574
1596
  };
1597
+ UpdateReportViewers: {
1598
+ uri: string;
1599
+ method: string;
1600
+ };
1575
1601
  };
1576
1602
 
1603
+ type index$8_Action = Action;
1604
+ declare const index$8_Action: typeof Action;
1577
1605
  type index$8_Member = Member;
1578
1606
  declare const index$8_MemberSchema: typeof MemberSchema;
1579
1607
  type index$8_Preferences = Preferences;
1580
1608
  declare const index$8_PreferencesSchema: typeof PreferencesSchema;
1609
+ type index$8_ReportViewerUpdate = ReportViewerUpdate;
1610
+ declare const index$8_ReportViewerUpdateSchema: typeof ReportViewerUpdateSchema;
1581
1611
  declare const index$8_TenantSchema: typeof TenantSchema;
1582
1612
  declare namespace index$8 {
1583
- export { Endpoints$6 as Endpoints, type Tenant as Entity, type IAPI$7 as IAPI, type index$8_Member as Member, index$8_MemberSchema as MemberSchema, type index$8_Preferences as Preferences, index$8_PreferencesSchema as PreferencesSchema, index$8_TenantSchema as TenantSchema };
1613
+ export { index$8_Action as Action, Endpoints$6 as Endpoints, type Tenant as Entity, type IAPI$7 as IAPI, type index$8_Member as Member, index$8_MemberSchema as MemberSchema, type index$8_Preferences as Preferences, index$8_PreferencesSchema as PreferencesSchema, type index$8_ReportViewerUpdate as ReportViewerUpdate, index$8_ReportViewerUpdateSchema as ReportViewerUpdateSchema, index$8_TenantSchema as TenantSchema };
1584
1614
  }
1585
1615
 
1586
1616
  declare const TrackParamSchema: z.ZodObject<{
@@ -1609,16 +1639,16 @@ declare const TrackSchema: z.ZodObject<{
1609
1639
  }>, "many">>;
1610
1640
  }, "strip", z.ZodTypeAny, {
1611
1641
  label: string;
1612
- category: string;
1613
1642
  action: string;
1643
+ category: string;
1614
1644
  params?: {
1615
1645
  value: string | number;
1616
1646
  name: string;
1617
1647
  }[] | undefined;
1618
1648
  }, {
1619
1649
  label: string;
1620
- category: string;
1621
1650
  action: string;
1651
+ category: string;
1622
1652
  params?: {
1623
1653
  value: string | number;
1624
1654
  name: string;
package/dist/index.js CHANGED
@@ -4720,6 +4720,19 @@ var TenantAPI = class {
4720
4720
  );
4721
4721
  return data;
4722
4722
  }
4723
+ async updateReportViewers(tenantId, reportViewerUpdate, context) {
4724
+ const endpointInfo = tenant_exports.Endpoints.UpdateReportViewers;
4725
+ const endpointData = tenant_exports.Endpoints.UpdateReportViewers;
4726
+ const endpoint = endpointData.uri.replace(":tenantId", tenantId);
4727
+ const data = await this.clientHTTP.makeRequest(
4728
+ this.env,
4729
+ `${endpoint}`,
4730
+ endpointInfo.method,
4731
+ { data: reportViewerUpdate, context },
4732
+ context
4733
+ );
4734
+ return data;
4735
+ }
4723
4736
  };
4724
4737
  var Tenant_api_default = TenantAPI;
4725
4738
 
@@ -5894,9 +5907,11 @@ var Endpoints7 = {
5894
5907
  // src/model/tenant/index.ts
5895
5908
  var tenant_exports = {};
5896
5909
  __export(tenant_exports, {
5910
+ Action: () => Action,
5897
5911
  Endpoints: () => Endpoints8,
5898
5912
  MemberSchema: () => MemberSchema,
5899
5913
  PreferencesSchema: () => PreferencesSchema,
5914
+ ReportViewerUpdateSchema: () => ReportViewerUpdateSchema,
5900
5915
  TenantSchema: () => TenantSchema
5901
5916
  });
5902
5917
 
@@ -5996,7 +6011,9 @@ var TenantSchema = external_exports.object({
5996
6011
  useOwnScripts: external_exports.boolean().optional(),
5997
6012
  subscription: external_exports.optional(external_exports.lazy(() => SubscriptionSchema)),
5998
6013
  totalSubscriptions: external_exports.number().optional(),
5999
- totalUsers: external_exports.number().optional()
6014
+ totalUsers: external_exports.number().optional(),
6015
+ reportUrl: external_exports.string().optional(),
6016
+ reportViewers: external_exports.array(external_exports.string()).optional()
6000
6017
  });
6001
6018
  var MemberSchema = external_exports.object({
6002
6019
  name: external_exports.string(),
@@ -6004,6 +6021,15 @@ var MemberSchema = external_exports.object({
6004
6021
  pictureUrl: external_exports.string(),
6005
6022
  isActive: external_exports.boolean()
6006
6023
  });
6024
+ var Action = /* @__PURE__ */ ((Action2) => {
6025
+ Action2["ADD"] = "add";
6026
+ Action2["REMOVE"] = "remove";
6027
+ return Action2;
6028
+ })(Action || {});
6029
+ var ReportViewerUpdateSchema = external_exports.object({
6030
+ userId: external_exports.string(),
6031
+ action: external_exports.nativeEnum(Action)
6032
+ });
6007
6033
 
6008
6034
  // src/model/tenant/Tenant.api.ts
6009
6035
  var Endpoints8 = {
@@ -6034,6 +6060,10 @@ var Endpoints8 = {
6034
6060
  Members: {
6035
6061
  uri: "/tenants/:tenantId/members",
6036
6062
  method: "GET"
6063
+ },
6064
+ UpdateReportViewers: {
6065
+ uri: "/tenants/:tenantId/report-viewers",
6066
+ method: "PUT"
6037
6067
  }
6038
6068
  };
6039
6069