shred-api-client 2.6.6 → 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 CHANGED
@@ -1551,6 +1551,16 @@ declare const ReportViewerUpdateSchema: z.ZodObject<{
1551
1551
  userId: string;
1552
1552
  action: Action;
1553
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
+ }>;
1554
1564
  declare const TenantUpdateSchema: z.ZodObject<{
1555
1565
  preferences: z.ZodOptional<z.ZodObject<{
1556
1566
  iconUrl: z.ZodString;
@@ -1698,6 +1708,7 @@ declare const TenantUpdateSchema: z.ZodObject<{
1698
1708
  reportUrl?: string | undefined;
1699
1709
  }>;
1700
1710
  type ReportViewerUpdate = z.infer<typeof ReportViewerUpdateSchema>;
1711
+ type MemberUpdate = z.infer<typeof MemberUpdateSchema>;
1701
1712
  type TenantUpdate = z.infer<typeof TenantUpdateSchema>;
1702
1713
  type Tenant = z.infer<typeof TenantSchema>;
1703
1714
  type Member = z.infer<typeof MemberSchema>;
@@ -1711,6 +1722,7 @@ interface IAPI$9 {
1711
1722
  getMembers: (context: Context, tenantId: string) => Promise<Member[]>;
1712
1723
  update: (tenantId: string, data: TenantUpdate, context: Context) => Promise<boolean>;
1713
1724
  updateReportViewers: (tenantId: string, reportViewerUpdate: ReportViewerUpdate, context: Context) => Promise<boolean>;
1725
+ updateMembers: (tenantId: string, memberUpdate: MemberUpdate, context: Context) => Promise<boolean>;
1714
1726
  }
1715
1727
  declare const Endpoints$8: {
1716
1728
  GetByInviteCode: {
@@ -1745,12 +1757,18 @@ declare const Endpoints$8: {
1745
1757
  uri: string;
1746
1758
  method: string;
1747
1759
  };
1760
+ UpdateMembers: {
1761
+ uri: string;
1762
+ method: string;
1763
+ };
1748
1764
  };
1749
1765
 
1750
1766
  type index$a_Action = Action;
1751
1767
  declare const index$a_Action: typeof Action;
1752
1768
  type index$a_Member = Member;
1753
1769
  declare const index$a_MemberSchema: typeof MemberSchema;
1770
+ type index$a_MemberUpdate = MemberUpdate;
1771
+ declare const index$a_MemberUpdateSchema: typeof MemberUpdateSchema;
1754
1772
  type index$a_Preferences = Preferences;
1755
1773
  declare const index$a_PreferencesSchema: typeof PreferencesSchema;
1756
1774
  type index$a_ReportViewerUpdate = ReportViewerUpdate;
@@ -1759,7 +1777,7 @@ declare const index$a_TenantSchema: typeof TenantSchema;
1759
1777
  type index$a_TenantUpdate = TenantUpdate;
1760
1778
  declare const index$a_TenantUpdateSchema: typeof TenantUpdateSchema;
1761
1779
  declare namespace index$a {
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 };
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 };
1763
1781
  }
1764
1782
 
1765
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,
@@ -6219,6 +6232,10 @@ var ReportViewerUpdateSchema = external_exports.object({
6219
6232
  userId: external_exports.string(),
6220
6233
  action: external_exports.nativeEnum(Action)
6221
6234
  });
6235
+ var MemberUpdateSchema = external_exports.object({
6236
+ userIds: external_exports.array(external_exports.string()),
6237
+ action: external_exports.nativeEnum(Action)
6238
+ });
6222
6239
  var TenantUpdateSchema = TenantSchema.pick({
6223
6240
  reportUrl: true,
6224
6241
  preferences: true
@@ -6257,6 +6274,10 @@ var Endpoints10 = {
6257
6274
  UpdateReportViewers: {
6258
6275
  uri: "/tenants/:tenantId/report-viewers",
6259
6276
  method: "PUT"
6277
+ },
6278
+ UpdateMembers: {
6279
+ uri: "/tenants/:tenantId/members",
6280
+ method: "PUT"
6260
6281
  }
6261
6282
  };
6262
6283