shred-api-client 2.8.1 → 2.9.1

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
@@ -197,7 +197,7 @@ type Context = {
197
197
  requestId?: string;
198
198
  };
199
199
 
200
- interface IAPI$c {
200
+ interface IAPI$d {
201
201
  getPrompt: (c: Context) => Promise<Prompt>;
202
202
  addScript: (c: Context, script: Partial<Script>) => Promise<Script>;
203
203
  deleteScript: (c: Context, id: string) => Promise<boolean>;
@@ -205,7 +205,7 @@ interface IAPI$c {
205
205
  generateScript: (c: Context, data: ScriptIARequest) => Promise<string>;
206
206
  updateScript: (c: Context, id: string, script: Partial<Script>) => Promise<boolean>;
207
207
  }
208
- declare const Endpoints$b: {
208
+ declare const Endpoints$c: {
209
209
  GetPrompt: {
210
210
  uri: string;
211
211
  method: string;
@@ -240,7 +240,7 @@ type index$f_ScriptIARequest = ScriptIARequest;
240
240
  declare const index$f_ScriptIARequestSchema: typeof ScriptIARequestSchema;
241
241
  declare const index$f_ScriptSchema: typeof ScriptSchema;
242
242
  declare namespace index$f {
243
- export { type index$f_Category as Category, index$f_CategorySchema as CategorySchema, Endpoints$b as Endpoints, type Prompt as Entity, type IAPI$c as IAPI, index$f_PromptSchema as PromptSchema, type index$f_Script as Script, type index$f_ScriptIARequest as ScriptIARequest, index$f_ScriptIARequestSchema as ScriptIARequestSchema, index$f_ScriptSchema as ScriptSchema };
243
+ export { type index$f_Category as Category, index$f_CategorySchema as CategorySchema, Endpoints$c as Endpoints, type Prompt as Entity, type IAPI$d as IAPI, index$f_PromptSchema as PromptSchema, type index$f_Script as Script, type index$f_ScriptIARequest as ScriptIARequest, index$f_ScriptIARequestSchema as ScriptIARequestSchema, index$f_ScriptSchema as ScriptSchema };
244
244
  }
245
245
 
246
246
  declare enum Type {
@@ -595,7 +595,7 @@ type Plan = z.infer<typeof PlanSchema>;
595
595
  type Product = z.infer<typeof ProductSchema>;
596
596
  type PromoCode = z.infer<typeof PromoCodeSchema>;
597
597
 
598
- interface IAPI$b {
598
+ interface IAPI$c {
599
599
  getCharges: (ctx: Context) => Promise<Charge[]>;
600
600
  getPortalUrl: (ctx: Context) => Promise<string>;
601
601
  getSubscription: (context: Context, userId?: string) => Promise<Subscription | null>;
@@ -609,7 +609,7 @@ interface IAPI$b {
609
609
  getSubscriptionsSummary: (ctx: Context) => Promise<SubscriptionSummary[]>;
610
610
  listPromoCodes: (ctx: Context) => Promise<PromoCode[]>;
611
611
  }
612
- declare const Endpoints$a: {
612
+ declare const Endpoints$b: {
613
613
  GetPortal: {
614
614
  uri: string;
615
615
  method: string;
@@ -680,10 +680,10 @@ declare const index$e_SubscriptionTypeSchema: typeof SubscriptionTypeSchema;
680
680
  type index$e_Type = Type;
681
681
  declare const index$e_Type: typeof Type;
682
682
  declare namespace index$e {
683
- export { type index$e_Charge as Charge, index$e_ChargeSchema as ChargeSchema, Endpoints$a as Endpoints, type Subscription as Entity, type IAPI$b as IAPI, type index$e_Plan as Plan, index$e_PlanSchema as PlanSchema, type index$e_Product as Product, index$e_ProductSchema as ProductSchema, type index$e_PromoCode as PromoCode, index$e_SubscriptionSchema as SubscriptionSchema, index$e_SubscriptionTypeSchema as SubscriptionTypeSchema, type SubscriptionSummary as Summary, index$e_Type as Type };
683
+ export { type index$e_Charge as Charge, index$e_ChargeSchema as ChargeSchema, Endpoints$b as Endpoints, type Subscription as Entity, type IAPI$c as IAPI, type index$e_Plan as Plan, index$e_PlanSchema as PlanSchema, type index$e_Product as Product, index$e_ProductSchema as ProductSchema, type index$e_PromoCode as PromoCode, index$e_SubscriptionSchema as SubscriptionSchema, index$e_SubscriptionTypeSchema as SubscriptionTypeSchema, type SubscriptionSummary as Summary, index$e_Type as Type };
684
684
  }
685
685
 
686
- declare enum Role {
686
+ declare enum Role$1 {
687
687
  USER = "User",
688
688
  EDITOR = "Editor",
689
689
  QA = "QA",
@@ -777,13 +777,13 @@ declare const UserSchema: z.ZodObject<{
777
777
  }>>;
778
778
  experienceId: z.ZodOptional<z.ZodString>;
779
779
  customerId: z.ZodString;
780
- role: z.ZodNativeEnum<typeof Role>;
780
+ role: z.ZodNativeEnum<typeof Role$1>;
781
781
  }, "strip", z.ZodTypeAny, {
782
782
  email: string;
783
783
  id: string;
784
784
  name: string;
785
785
  customerId: string;
786
- role: Role;
786
+ role: Role$1;
787
787
  timezone?: string | undefined;
788
788
  tenantId?: string | undefined;
789
789
  preferences?: {
@@ -811,7 +811,7 @@ declare const UserSchema: z.ZodObject<{
811
811
  id: string;
812
812
  name: string;
813
813
  customerId: string;
814
- role: Role;
814
+ role: Role$1;
815
815
  timezone?: string | undefined;
816
816
  tenantId?: string | undefined;
817
817
  preferences?: {
@@ -842,7 +842,7 @@ type Create$1 = Pick<User, "name" | "email"> & {
842
842
  password?: string;
843
843
  passwordConfirmation?: string;
844
844
  invitationCode?: string;
845
- role?: Role;
845
+ role?: Role$1;
846
846
  industries?: string[];
847
847
  };
848
848
 
@@ -882,7 +882,7 @@ declare namespace index$d {
882
882
  export type { index$d_APIResponse as APIResponse, index$d_QueryFilterOp as QueryFilterOp, index$d_QueryOptions as QueryOptions, index$d_QueryOrderBy as QueryOrderBy, index$d_QueryWhere as QueryWhere };
883
883
  }
884
884
 
885
- interface IAPI$a {
885
+ interface IAPI$b {
886
886
  getUserInfo: (context: Context) => Promise<User>;
887
887
  isEmailAvaliable: (email: string) => Promise<boolean>;
888
888
  sendValidationCode: (email: string) => Promise<boolean>;
@@ -899,7 +899,7 @@ interface IAPI$a {
899
899
  search: (ctx: Context, query: QueryOptions<User>) => Promise<APIResponse<User>>;
900
900
  createUser: (data: Create$1) => Promise<User>;
901
901
  }
902
- declare const Endpoints$9: {
902
+ declare const Endpoints$a: {
903
903
  ChangeEmail: {
904
904
  uri: string;
905
905
  method: string;
@@ -966,13 +966,11 @@ declare const Endpoints$9: {
966
966
  };
967
967
  };
968
968
 
969
- type index$c_Role = Role;
970
- declare const index$c_Role: typeof Role;
971
969
  type index$c_System = System;
972
970
  declare const index$c_System: typeof System;
973
971
  declare const index$c_UserSchema: typeof UserSchema;
974
972
  declare namespace index$c {
975
- export { type Create$1 as Create, Endpoints$9 as Endpoints, type User as Entity, type IAPI$a as IAPI, type Preferences$1 as Preferences, PreferencesSchema$1 as PreferencesSchema, index$c_Role as Role, index$c_System as System, type Update$1 as Update, index$c_UserSchema as UserSchema };
973
+ export { type Create$1 as Create, Endpoints$a as Endpoints, type User as Entity, type IAPI$b as IAPI, type Preferences$1 as Preferences, PreferencesSchema$1 as PreferencesSchema, Role$1 as Role, index$c_System as System, type Update$1 as Update, index$c_UserSchema as UserSchema };
976
974
  }
977
975
 
978
976
  declare const PreferencesSchema: z.ZodObject<{
@@ -1714,7 +1712,7 @@ type Tenant = z.infer<typeof TenantSchema>;
1714
1712
  type Member = z.infer<typeof MemberSchema>;
1715
1713
  type Preferences = z.infer<typeof PreferencesSchema>;
1716
1714
 
1717
- interface IAPI$9 {
1715
+ interface IAPI$a {
1718
1716
  getByInviteCode: (code: string, context?: Context) => Promise<Tenant | null>;
1719
1717
  create: (tenant: Tenant, context: Context) => Promise<boolean>;
1720
1718
  list: (context: Context) => Promise<Tenant[]>;
@@ -1724,7 +1722,7 @@ interface IAPI$9 {
1724
1722
  updateReportViewers: (tenantId: string, reportViewerUpdate: ReportViewerUpdate, context: Context) => Promise<boolean>;
1725
1723
  updateMembers: (tenantId: string, memberUpdate: MemberUpdate, context: Context) => Promise<boolean>;
1726
1724
  }
1727
- declare const Endpoints$8: {
1725
+ declare const Endpoints$9: {
1728
1726
  GetByInviteCode: {
1729
1727
  uri: string;
1730
1728
  method: string;
@@ -1775,7 +1773,7 @@ declare const index$b_TenantSchema: typeof TenantSchema;
1775
1773
  type index$b_TenantUpdate = TenantUpdate;
1776
1774
  declare const index$b_TenantUpdateSchema: typeof TenantUpdateSchema;
1777
1775
  declare namespace index$b {
1778
- export { Action$1 as Action, Endpoints$8 as Endpoints, type Tenant as Entity, type IAPI$9 as IAPI, type index$b_Member as Member, index$b_MemberSchema as MemberSchema, type index$b_MemberUpdate as MemberUpdate, index$b_MemberUpdateSchema as MemberUpdateSchema, type index$b_Preferences as Preferences, index$b_PreferencesSchema as PreferencesSchema, type index$b_ReportViewerUpdate as ReportViewerUpdate, index$b_ReportViewerUpdateSchema as ReportViewerUpdateSchema, index$b_TenantSchema as TenantSchema, type index$b_TenantUpdate as TenantUpdate, index$b_TenantUpdateSchema as TenantUpdateSchema };
1776
+ export { Action$1 as Action, Endpoints$9 as Endpoints, type Tenant as Entity, type IAPI$a as IAPI, type index$b_Member as Member, index$b_MemberSchema as MemberSchema, type index$b_MemberUpdate as MemberUpdate, index$b_MemberUpdateSchema as MemberUpdateSchema, type index$b_Preferences as Preferences, index$b_PreferencesSchema as PreferencesSchema, type index$b_ReportViewerUpdate as ReportViewerUpdate, index$b_ReportViewerUpdateSchema as ReportViewerUpdateSchema, index$b_TenantSchema as TenantSchema, type index$b_TenantUpdate as TenantUpdate, index$b_TenantUpdateSchema as TenantUpdateSchema };
1779
1777
  }
1780
1778
 
1781
1779
  declare const TrackParamSchema: z.ZodObject<{
@@ -1822,10 +1820,10 @@ declare const TrackSchema: z.ZodObject<{
1822
1820
  type Track = z.infer<typeof TrackSchema>;
1823
1821
  type TrackParam = z.infer<typeof TrackParamSchema>;
1824
1822
 
1825
- interface IAPI$8 {
1823
+ interface IAPI$9 {
1826
1824
  send: (t: Track) => Promise<boolean>;
1827
1825
  }
1828
- declare const Endpoints$7: {
1826
+ declare const Endpoints$8: {
1829
1827
  Track: {
1830
1828
  uri: string;
1831
1829
  method: string;
@@ -1836,7 +1834,7 @@ type index$a_TrackParam = TrackParam;
1836
1834
  declare const index$a_TrackParamSchema: typeof TrackParamSchema;
1837
1835
  declare const index$a_TrackSchema: typeof TrackSchema;
1838
1836
  declare namespace index$a {
1839
- export { Endpoints$7 as Endpoints, type Track as Entity, type IAPI$8 as IAPI, type index$a_TrackParam as TrackParam, index$a_TrackParamSchema as TrackParamSchema, index$a_TrackSchema as TrackSchema };
1837
+ export { Endpoints$8 as Endpoints, type Track as Entity, type IAPI$9 as IAPI, type index$a_TrackParam as TrackParam, index$a_TrackParamSchema as TrackParamSchema, index$a_TrackSchema as TrackSchema };
1840
1838
  }
1841
1839
 
1842
1840
  declare const EmailSchema: z.ZodObject<{
@@ -1854,10 +1852,10 @@ declare const EmailSchema: z.ZodObject<{
1854
1852
  }>;
1855
1853
  type Email = z.infer<typeof EmailSchema>;
1856
1854
 
1857
- interface IAPI$7 {
1855
+ interface IAPI$8 {
1858
1856
  send: (email: Email, ctx?: Context) => Promise<boolean>;
1859
1857
  }
1860
- declare const Endpoints$6: {
1858
+ declare const Endpoints$7: {
1861
1859
  SendEmail: {
1862
1860
  uri: string;
1863
1861
  method: string;
@@ -1866,7 +1864,7 @@ declare const Endpoints$6: {
1866
1864
 
1867
1865
  declare const index$9_EmailSchema: typeof EmailSchema;
1868
1866
  declare namespace index$9 {
1869
- export { index$9_EmailSchema as EmailSchema, Endpoints$6 as Endpoints, type Email as Entity, type IAPI$7 as IAPI };
1867
+ export { index$9_EmailSchema as EmailSchema, Endpoints$7 as Endpoints, type Email as Entity, type IAPI$8 as IAPI };
1870
1868
  }
1871
1869
 
1872
1870
  declare enum Status$1 {
@@ -2200,7 +2198,7 @@ type TimelineItem = z.infer<typeof TimelineItemSchema>;
2200
2198
  type Interaction = z.infer<typeof InteractionSchema>;
2201
2199
  type Feedback = z.infer<typeof FeedbackSchema>;
2202
2200
 
2203
- interface IAPI$6 {
2201
+ interface IAPI$7 {
2204
2202
  reorder: (context: Context, projectId: string, position: number) => Promise<boolean>;
2205
2203
  find: (context: Context, projectId: string) => Promise<Project>;
2206
2204
  create: (context: Context, data: ProjectCreation) => Promise<Project>;
@@ -2222,7 +2220,7 @@ interface IAPI$6 {
2222
2220
  isEligibleForFreeProject(context: Context): Promise<boolean>;
2223
2221
  };
2224
2222
  }
2225
- declare const Endpoints$5: {
2223
+ declare const Endpoints$6: {
2226
2224
  Reorder: {
2227
2225
  uri: string;
2228
2226
  method: string;
@@ -2352,7 +2350,7 @@ declare const index$8_Styles: typeof Styles;
2352
2350
  type index$8_TimelineItem = TimelineItem;
2353
2351
  declare const index$8_TimelineItemSchema: typeof TimelineItemSchema;
2354
2352
  declare namespace index$8 {
2355
- export { type index$8_Approve as Approve, index$8_CaptionStyle as CaptionStyle, Endpoints$5 as Endpoints, type Project as Entity, type index$8_Feedback as Feedback, index$8_FeedbackSchema as FeedbackSchema, type IAPI$6 as IAPI, type index$8_Interaction as Interaction, index$8_InteractionSchema as InteractionSchema, index$8_InteractionType as InteractionType, type index$8_ProjectCreation as ProjectCreation, index$8_ProjectSchema as ProjectSchema, type index$8_SendToApproval as SendToApproval, Status$1 as Status, index$8_StatusConfig as StatusConfig, type index$8_StatusConfigType as StatusConfigType, type index$8_Style as Style, index$8_Styles as Styles, type index$8_TimelineItem as TimelineItem, index$8_TimelineItemSchema as TimelineItemSchema };
2353
+ export { type index$8_Approve as Approve, index$8_CaptionStyle as CaptionStyle, Endpoints$6 as Endpoints, type Project as Entity, type index$8_Feedback as Feedback, index$8_FeedbackSchema as FeedbackSchema, type IAPI$7 as IAPI, type index$8_Interaction as Interaction, index$8_InteractionSchema as InteractionSchema, index$8_InteractionType as InteractionType, type index$8_ProjectCreation as ProjectCreation, index$8_ProjectSchema as ProjectSchema, type index$8_SendToApproval as SendToApproval, Status$1 as Status, index$8_StatusConfig as StatusConfig, type index$8_StatusConfigType as StatusConfigType, type index$8_Style as Style, index$8_Styles as Styles, type index$8_TimelineItem as TimelineItem, index$8_TimelineItemSchema as TimelineItemSchema };
2356
2354
  }
2357
2355
 
2358
2356
  declare const DailyMilestoneSchema: z.ZodObject<{
@@ -2424,11 +2422,11 @@ declare const GoalSchema: z.ZodObject<{
2424
2422
  type DailyMilestone = z.infer<typeof DailyMilestoneSchema>;
2425
2423
  type Goal = z.infer<typeof GoalSchema>;
2426
2424
 
2427
- interface IAPI$5 {
2425
+ interface IAPI$6 {
2428
2426
  getGoals: (context: Context) => Promise<Goal[]>;
2429
2427
  getEditorGoals: (context: Context, editorId: string) => Promise<Goal[]>;
2430
2428
  }
2431
- declare const Endpoints$4: {
2429
+ declare const Endpoints$5: {
2432
2430
  GetGoals: {
2433
2431
  uri: string;
2434
2432
  method: string;
@@ -2443,7 +2441,7 @@ type index$7_DailyMilestone = DailyMilestone;
2443
2441
  declare const index$7_DailyMilestoneSchema: typeof DailyMilestoneSchema;
2444
2442
  declare const index$7_GoalSchema: typeof GoalSchema;
2445
2443
  declare namespace index$7 {
2446
- export { type index$7_DailyMilestone as DailyMilestone, index$7_DailyMilestoneSchema as DailyMilestoneSchema, Endpoints$4 as Endpoints, type Goal as Entity, index$7_GoalSchema as GoalSchema, type IAPI$5 as IAPI };
2444
+ export { type index$7_DailyMilestone as DailyMilestone, index$7_DailyMilestoneSchema as DailyMilestoneSchema, Endpoints$5 as Endpoints, type Goal as Entity, index$7_GoalSchema as GoalSchema, type IAPI$6 as IAPI };
2447
2445
  }
2448
2446
 
2449
2447
  declare const EditorSchema: z.ZodObject<{
@@ -2476,11 +2474,11 @@ declare const EditorSchema: z.ZodObject<{
2476
2474
  }>;
2477
2475
  type Editor = z.infer<typeof EditorSchema>;
2478
2476
 
2479
- interface IAPI$4 {
2477
+ interface IAPI$5 {
2480
2478
  getAll(context: Context): Promise<Editor[]>;
2481
2479
  getById(context: Context, editorId: string): Promise<Editor>;
2482
2480
  }
2483
- declare const Endpoints$3: {
2481
+ declare const Endpoints$4: {
2484
2482
  GetAll: {
2485
2483
  uri: string;
2486
2484
  method: string;
@@ -2493,7 +2491,7 @@ declare const Endpoints$3: {
2493
2491
 
2494
2492
  declare const index$6_EditorSchema: typeof EditorSchema;
2495
2493
  declare namespace index$6 {
2496
- export { index$6_EditorSchema as EditorSchema, Endpoints$3 as Endpoints, type Editor as Entity, type IAPI$4 as IAPI };
2494
+ export { index$6_EditorSchema as EditorSchema, Endpoints$4 as Endpoints, type Editor as Entity, type IAPI$5 as IAPI };
2497
2495
  }
2498
2496
 
2499
2497
  declare enum Frequency {
@@ -2994,7 +2992,7 @@ type RecurrenceRule = z.infer<typeof RecurrenceRuleSchema>;
2994
2992
  type History = z.infer<typeof HistorySchema>;
2995
2993
  type Criteria = z.infer<typeof CriteriaSchema>;
2996
2994
 
2997
- interface IAPI$3 {
2995
+ interface IAPI$4 {
2998
2996
  getTriggers: (ctx: Context) => Promise<APIResponse<Trigger>>;
2999
2997
  createTrigger: (ctx: Context, t: Trigger) => Promise<Trigger>;
3000
2998
  deleteTrigger: (ctx: Context, triggerId: string) => Promise<boolean>;
@@ -3004,7 +3002,7 @@ interface IAPI$3 {
3004
3002
  markAsRead: (ctx: Context, id: string) => Promise<boolean>;
3005
3003
  clearNotifications: (ctx: Context) => Promise<boolean>;
3006
3004
  }
3007
- declare const Endpoints$2: {
3005
+ declare const Endpoints$3: {
3008
3006
  Create: {
3009
3007
  uri: string;
3010
3008
  method: string;
@@ -3064,10 +3062,10 @@ declare const index$5_TriggerSchema: typeof TriggerSchema;
3064
3062
  type index$5_WeekDay = WeekDay;
3065
3063
  declare const index$5_WeekDay: typeof WeekDay;
3066
3064
  declare namespace index$5 {
3067
- export { type index$5_Criteria as Criteria, index$5_CriteriaSchema as CriteriaSchema, index$5_CriteriaType as CriteriaType, Endpoints$2 as Endpoints, index$5_Frequency as Frequency, type index$5_History as History, index$5_HistorySchema as HistorySchema, type IAPI$3 as IAPI, type index$5_NotificationDetail as NotificationDetail, index$5_NotificationDetailSchema as NotificationDetailSchema, type index$5_NotificationItem as NotificationItem, index$5_NotificationItemSchema as NotificationItemSchema, index$5_NotificationType as NotificationType, type index$5_RecurrenceRule as RecurrenceRule, index$5_RecurrenceRuleSchema as RecurrenceRuleSchema, index$5_Status as Status, index$5_TransportType as TransportType, type index$5_Trigger as Trigger, index$5_TriggerSchema as TriggerSchema, index$5_WeekDay as WeekDay };
3065
+ export { type index$5_Criteria as Criteria, index$5_CriteriaSchema as CriteriaSchema, index$5_CriteriaType as CriteriaType, Endpoints$3 as Endpoints, index$5_Frequency as Frequency, type index$5_History as History, index$5_HistorySchema as HistorySchema, type IAPI$4 as IAPI, type index$5_NotificationDetail as NotificationDetail, index$5_NotificationDetailSchema as NotificationDetailSchema, type index$5_NotificationItem as NotificationItem, index$5_NotificationItemSchema as NotificationItemSchema, index$5_NotificationType as NotificationType, type index$5_RecurrenceRule as RecurrenceRule, index$5_RecurrenceRuleSchema as RecurrenceRuleSchema, index$5_Status as Status, index$5_TransportType as TransportType, type index$5_Trigger as Trigger, index$5_TriggerSchema as TriggerSchema, index$5_WeekDay as WeekDay };
3068
3066
  }
3069
3067
 
3070
- interface IAPI$2 {
3068
+ interface IAPI$3 {
3071
3069
  version: () => Promise<string>;
3072
3070
  }
3073
3071
 
@@ -3211,13 +3209,13 @@ declare const NoteSchema: z.ZodObject<{
3211
3209
  type Note = z.infer<typeof NoteSchema>;
3212
3210
  type NoteHistory = z.infer<typeof NoteHistorySchema>;
3213
3211
 
3214
- interface IAPI$1 {
3212
+ interface IAPI$2 {
3215
3213
  list: (c: Context, userId: string) => Promise<Note[]>;
3216
3214
  add: (c: Context, note: Partial<Note>) => Promise<Note>;
3217
3215
  update: (c: Context, id: string, script: Partial<Note>) => Promise<Note>;
3218
3216
  delete: (c: Context, id: string) => Promise<boolean>;
3219
3217
  }
3220
- declare const Endpoints$1: {
3218
+ declare const Endpoints$2: {
3221
3219
  GetNotes: {
3222
3220
  uri: string;
3223
3221
  method: string;
@@ -3240,7 +3238,7 @@ type index$4_NoteHistory = NoteHistory;
3240
3238
  declare const index$4_NoteHistorySchema: typeof NoteHistorySchema;
3241
3239
  declare const index$4_NoteSchema: typeof NoteSchema;
3242
3240
  declare namespace index$4 {
3243
- export { Endpoints$1 as Endpoints, type Note as Entity, type IAPI$1 as IAPI, type index$4_NoteHistory as NoteHistory, index$4_NoteHistorySchema as NoteHistorySchema, index$4_NoteSchema as NoteSchema };
3241
+ export { Endpoints$2 as Endpoints, type Note as Entity, type IAPI$2 as IAPI, type index$4_NoteHistory as NoteHistory, index$4_NoteHistorySchema as NoteHistorySchema, index$4_NoteSchema as NoteSchema };
3244
3242
  }
3245
3243
 
3246
3244
  declare const SpecialOfferSchema: z.ZodObject<{
@@ -3348,7 +3346,7 @@ type UserOfferDetails = z.infer<typeof UserOfferDetailsSchema>;
3348
3346
  type Create = z.infer<typeof CreateSpecialOfferSchema>;
3349
3347
  type Update = z.infer<typeof UpdateSpecialOfferSchema>;
3350
3348
 
3351
- interface IAPI {
3349
+ interface IAPI$1 {
3352
3350
  list: (ctx: Context) => Promise<SpecialOffer[]>;
3353
3351
  getActive: (ctx: Context) => Promise<SpecialOffer | null>;
3354
3352
  create: (ctx: Context, data: Create) => Promise<SpecialOffer>;
@@ -3358,7 +3356,7 @@ interface IAPI {
3358
3356
  getMyOffer: (ctx: Context) => Promise<UserOfferDetails | null>;
3359
3357
  claim: (ctx: Context, callbackUrl?: string) => Promise<string>;
3360
3358
  }
3361
- declare const Endpoints: {
3359
+ declare const Endpoints$1: {
3362
3360
  List: {
3363
3361
  uri: string;
3364
3362
  method: string;
@@ -3395,120 +3393,13 @@ declare const Endpoints: {
3395
3393
 
3396
3394
  type index$3_Create = Create;
3397
3395
  declare const index$3_CreateSpecialOfferSchema: typeof CreateSpecialOfferSchema;
3398
- declare const index$3_Endpoints: typeof Endpoints;
3399
- type index$3_IAPI = IAPI;
3400
3396
  declare const index$3_SpecialOfferSchema: typeof SpecialOfferSchema;
3401
3397
  type index$3_Update = Update;
3402
3398
  declare const index$3_UpdateSpecialOfferSchema: typeof UpdateSpecialOfferSchema;
3403
3399
  type index$3_UserOfferDetails = UserOfferDetails;
3404
3400
  declare const index$3_UserOfferDetailsSchema: typeof UserOfferDetailsSchema;
3405
3401
  declare namespace index$3 {
3406
- export { type index$3_Create as Create, index$3_CreateSpecialOfferSchema as CreateSpecialOfferSchema, index$3_Endpoints as Endpoints, type SpecialOffer as Entity, type index$3_IAPI as IAPI, index$3_SpecialOfferSchema as SpecialOfferSchema, type index$3_Update as Update, index$3_UpdateSpecialOfferSchema as UpdateSpecialOfferSchema, type index$3_UserOfferDetails as UserOfferDetails, index$3_UserOfferDetailsSchema as UserOfferDetailsSchema };
3407
- }
3408
-
3409
- declare class ShredAPI {
3410
- user: IAPI$a;
3411
- goal: IAPI$5;
3412
- editor: IAPI$4;
3413
- subscription: IAPI$b;
3414
- prompt: IAPI$c;
3415
- pushNotification: IAPI$3;
3416
- email: IAPI$7;
3417
- tenant: IAPI$9;
3418
- app: IAPI$2;
3419
- project: IAPI$6;
3420
- track: IAPI$8;
3421
- note: IAPI$1;
3422
- specialOffer: IAPI;
3423
- constructor(env: Environment);
3424
- }
3425
-
3426
- declare class ShredException extends Error {
3427
- status: number;
3428
- constructor(message: string, status: number);
3429
- }
3430
-
3431
- declare class ConflictException extends ShredException {
3432
- constructor(message: string);
3433
- }
3434
-
3435
- declare class InvalidArgumentException extends ShredException {
3436
- constructor(message: string);
3437
- }
3438
-
3439
- declare class ResourceNotFoundException extends ShredException {
3440
- constructor(message: string);
3441
- }
3442
-
3443
- declare class UnauthorizedException extends ShredException {
3444
- constructor(message: string);
3445
- }
3446
-
3447
- declare class ForbiddenException extends ShredException {
3448
- constructor(message: string);
3449
- }
3450
-
3451
- type index$2_ConflictException = ConflictException;
3452
- declare const index$2_ConflictException: typeof ConflictException;
3453
- type index$2_ForbiddenException = ForbiddenException;
3454
- declare const index$2_ForbiddenException: typeof ForbiddenException;
3455
- type index$2_InvalidArgumentException = InvalidArgumentException;
3456
- declare const index$2_InvalidArgumentException: typeof InvalidArgumentException;
3457
- type index$2_ResourceNotFoundException = ResourceNotFoundException;
3458
- declare const index$2_ResourceNotFoundException: typeof ResourceNotFoundException;
3459
- type index$2_ShredException = ShredException;
3460
- declare const index$2_ShredException: typeof ShredException;
3461
- type index$2_UnauthorizedException = UnauthorizedException;
3462
- declare const index$2_UnauthorizedException: typeof UnauthorizedException;
3463
- declare namespace index$2 {
3464
- export { index$2_ConflictException as ConflictException, index$2_ForbiddenException as ForbiddenException, index$2_InvalidArgumentException as InvalidArgumentException, index$2_ResourceNotFoundException as ResourceNotFoundException, index$2_ShredException as ShredException, index$2_UnauthorizedException as UnauthorizedException };
3465
- }
3466
-
3467
- declare const AssetSchema: z.ZodObject<{
3468
- assetId: z.ZodString;
3469
- fileName: z.ZodString;
3470
- extension: z.ZodString;
3471
- fileSize: z.ZodNumber;
3472
- assetUrl: z.ZodString;
3473
- thumbnailUrl: z.ZodString;
3474
- type: z.ZodString;
3475
- duration: z.ZodOptional<z.ZodNumber>;
3476
- progress: z.ZodOptional<z.ZodNumber>;
3477
- error: z.ZodOptional<z.ZodString>;
3478
- authorId: z.ZodString;
3479
- uploadedAt: z.ZodNumber;
3480
- }, "strip", z.ZodTypeAny, {
3481
- type: string;
3482
- assetId: string;
3483
- fileName: string;
3484
- extension: string;
3485
- fileSize: number;
3486
- assetUrl: string;
3487
- thumbnailUrl: string;
3488
- authorId: string;
3489
- uploadedAt: number;
3490
- error?: string | undefined;
3491
- duration?: number | undefined;
3492
- progress?: number | undefined;
3493
- }, {
3494
- type: string;
3495
- assetId: string;
3496
- fileName: string;
3497
- extension: string;
3498
- fileSize: number;
3499
- assetUrl: string;
3500
- thumbnailUrl: string;
3501
- authorId: string;
3502
- uploadedAt: number;
3503
- error?: string | undefined;
3504
- duration?: number | undefined;
3505
- progress?: number | undefined;
3506
- }>;
3507
- type Asset = z.infer<typeof AssetSchema>;
3508
-
3509
- declare const index$1_AssetSchema: typeof AssetSchema;
3510
- declare namespace index$1 {
3511
- export { index$1_AssetSchema as AssetSchema, type Asset as Entity };
3402
+ export { type index$3_Create as Create, index$3_CreateSpecialOfferSchema as CreateSpecialOfferSchema, Endpoints$1 as Endpoints, type SpecialOffer as Entity, type IAPI$1 as IAPI, index$3_SpecialOfferSchema as SpecialOfferSchema, type index$3_Update as Update, index$3_UpdateSpecialOfferSchema as UpdateSpecialOfferSchema, type index$3_UserOfferDetails as UserOfferDetails, index$3_UserOfferDetailsSchema as UserOfferDetailsSchema };
3512
3403
  }
3513
3404
 
3514
3405
  /**
@@ -3622,16 +3513,311 @@ declare const ActionCatalog: Record<Action, ActionMeta>;
3622
3513
  /** The catalog as a flat list of `{ key, label, group }` — e.g. for `GET /actions`. */
3623
3514
  declare function listActionCatalog(): ActionCatalogEntry[];
3624
3515
 
3625
- type index_Action = Action;
3626
- declare const index_ActionCatalog: typeof ActionCatalog;
3627
- type index_ActionCatalogEntry = ActionCatalogEntry;
3628
- type index_ActionGroup = ActionGroup;
3629
- type index_ActionMeta = ActionMeta;
3630
- declare const index_Actions: typeof Actions;
3631
- type index_Scope = Scope;
3632
- declare const index_listActionCatalog: typeof listActionCatalog;
3516
+ declare const RoleSchema: z.ZodObject<{
3517
+ id: z.ZodString;
3518
+ name: z.ZodString;
3519
+ actions: z.ZodArray<z.ZodString, "many">;
3520
+ }, "strip", z.ZodTypeAny, {
3521
+ id: string;
3522
+ name: string;
3523
+ actions: string[];
3524
+ }, {
3525
+ id: string;
3526
+ name: string;
3527
+ actions: string[];
3528
+ }>;
3529
+ type Role = z.infer<typeof RoleSchema>;
3530
+
3531
+ declare const ScopeSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3532
+ type: z.ZodLiteral<"global">;
3533
+ }, "strip", z.ZodTypeAny, {
3534
+ type: "global";
3535
+ }, {
3536
+ type: "global";
3537
+ }>, z.ZodObject<{
3538
+ type: z.ZodLiteral<"tenant">;
3539
+ id: z.ZodString;
3540
+ }, "strip", z.ZodTypeAny, {
3541
+ id: string;
3542
+ type: "tenant";
3543
+ }, {
3544
+ id: string;
3545
+ type: "tenant";
3546
+ }>]>;
3547
+ declare const RoleGrantSchema: z.ZodObject<{
3548
+ roleId: z.ZodString;
3549
+ scope: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3550
+ type: z.ZodLiteral<"global">;
3551
+ }, "strip", z.ZodTypeAny, {
3552
+ type: "global";
3553
+ }, {
3554
+ type: "global";
3555
+ }>, z.ZodObject<{
3556
+ type: z.ZodLiteral<"tenant">;
3557
+ id: z.ZodString;
3558
+ }, "strip", z.ZodTypeAny, {
3559
+ id: string;
3560
+ type: "tenant";
3561
+ }, {
3562
+ id: string;
3563
+ type: "tenant";
3564
+ }>]>;
3565
+ }, "strip", z.ZodTypeAny, {
3566
+ roleId: string;
3567
+ scope: {
3568
+ type: "global";
3569
+ } | {
3570
+ id: string;
3571
+ type: "tenant";
3572
+ };
3573
+ }, {
3574
+ roleId: string;
3575
+ scope: {
3576
+ type: "global";
3577
+ } | {
3578
+ id: string;
3579
+ type: "tenant";
3580
+ };
3581
+ }>;
3582
+ declare const RoleAssignmentSchema: z.ZodObject<{
3583
+ id: z.ZodString;
3584
+ roles: z.ZodArray<z.ZodObject<{
3585
+ roleId: z.ZodString;
3586
+ scope: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3587
+ type: z.ZodLiteral<"global">;
3588
+ }, "strip", z.ZodTypeAny, {
3589
+ type: "global";
3590
+ }, {
3591
+ type: "global";
3592
+ }>, z.ZodObject<{
3593
+ type: z.ZodLiteral<"tenant">;
3594
+ id: z.ZodString;
3595
+ }, "strip", z.ZodTypeAny, {
3596
+ id: string;
3597
+ type: "tenant";
3598
+ }, {
3599
+ id: string;
3600
+ type: "tenant";
3601
+ }>]>;
3602
+ }, "strip", z.ZodTypeAny, {
3603
+ roleId: string;
3604
+ scope: {
3605
+ type: "global";
3606
+ } | {
3607
+ id: string;
3608
+ type: "tenant";
3609
+ };
3610
+ }, {
3611
+ roleId: string;
3612
+ scope: {
3613
+ type: "global";
3614
+ } | {
3615
+ id: string;
3616
+ type: "tenant";
3617
+ };
3618
+ }>, "many">;
3619
+ }, "strip", z.ZodTypeAny, {
3620
+ id: string;
3621
+ roles: {
3622
+ roleId: string;
3623
+ scope: {
3624
+ type: "global";
3625
+ } | {
3626
+ id: string;
3627
+ type: "tenant";
3628
+ };
3629
+ }[];
3630
+ }, {
3631
+ id: string;
3632
+ roles: {
3633
+ roleId: string;
3634
+ scope: {
3635
+ type: "global";
3636
+ } | {
3637
+ id: string;
3638
+ type: "tenant";
3639
+ };
3640
+ }[];
3641
+ }>;
3642
+ type RoleGrant = z.infer<typeof RoleGrantSchema>;
3643
+ type RoleAssignment = z.infer<typeof RoleAssignmentSchema>;
3644
+
3645
+ type CreateRoleInput = Omit<Role, "id">;
3646
+ type UpdateRoleInput = Partial<Omit<Role, "id">>;
3647
+ type AssignRoleInput = RoleGrant;
3648
+ interface IAPI {
3649
+ getActions: (c: Context) => Promise<ActionCatalogEntry[]>;
3650
+ listRoles: (c: Context) => Promise<Role[]>;
3651
+ createRole: (c: Context, input: CreateRoleInput) => Promise<Role>;
3652
+ updateRole: (c: Context, roleId: string, input: UpdateRoleInput) => Promise<Role>;
3653
+ deleteRole: (c: Context, roleId: string) => Promise<boolean>;
3654
+ getAssignments: (c: Context, uid: string) => Promise<RoleAssignment | null>;
3655
+ assign: (c: Context, uid: string, input: AssignRoleInput) => Promise<RoleAssignment>;
3656
+ unassign: (c: Context, uid: string, input: AssignRoleInput) => Promise<RoleAssignment>;
3657
+ }
3658
+ declare const Endpoints: {
3659
+ GetActions: {
3660
+ uri: string;
3661
+ method: string;
3662
+ };
3663
+ ListRoles: {
3664
+ uri: string;
3665
+ method: string;
3666
+ };
3667
+ CreateRole: {
3668
+ uri: string;
3669
+ method: string;
3670
+ };
3671
+ UpdateRole: {
3672
+ uri: string;
3673
+ method: string;
3674
+ };
3675
+ DeleteRole: {
3676
+ uri: string;
3677
+ method: string;
3678
+ };
3679
+ GetAssignments: {
3680
+ uri: string;
3681
+ method: string;
3682
+ };
3683
+ Assign: {
3684
+ uri: string;
3685
+ method: string;
3686
+ };
3687
+ Unassign: {
3688
+ uri: string;
3689
+ method: string;
3690
+ };
3691
+ };
3692
+
3693
+ type index$2_Action = Action;
3694
+ declare const index$2_ActionCatalog: typeof ActionCatalog;
3695
+ type index$2_ActionCatalogEntry = ActionCatalogEntry;
3696
+ type index$2_ActionGroup = ActionGroup;
3697
+ type index$2_ActionMeta = ActionMeta;
3698
+ declare const index$2_Actions: typeof Actions;
3699
+ type index$2_AssignRoleInput = AssignRoleInput;
3700
+ type index$2_CreateRoleInput = CreateRoleInput;
3701
+ declare const index$2_Endpoints: typeof Endpoints;
3702
+ type index$2_IAPI = IAPI;
3703
+ type index$2_Role = Role;
3704
+ type index$2_RoleAssignment = RoleAssignment;
3705
+ declare const index$2_RoleAssignmentSchema: typeof RoleAssignmentSchema;
3706
+ type index$2_RoleGrant = RoleGrant;
3707
+ declare const index$2_RoleGrantSchema: typeof RoleGrantSchema;
3708
+ declare const index$2_RoleSchema: typeof RoleSchema;
3709
+ type index$2_Scope = Scope;
3710
+ declare const index$2_ScopeSchema: typeof ScopeSchema;
3711
+ type index$2_UpdateRoleInput = UpdateRoleInput;
3712
+ declare const index$2_listActionCatalog: typeof listActionCatalog;
3713
+ declare namespace index$2 {
3714
+ export { type index$2_Action as Action, index$2_ActionCatalog as ActionCatalog, type index$2_ActionCatalogEntry as ActionCatalogEntry, type index$2_ActionGroup as ActionGroup, type index$2_ActionMeta as ActionMeta, index$2_Actions as Actions, type index$2_AssignRoleInput as AssignRoleInput, type index$2_CreateRoleInput as CreateRoleInput, index$2_Endpoints as Endpoints, type index$2_IAPI as IAPI, type index$2_Role as Role, type index$2_RoleAssignment as RoleAssignment, index$2_RoleAssignmentSchema as RoleAssignmentSchema, type index$2_RoleGrant as RoleGrant, index$2_RoleGrantSchema as RoleGrantSchema, index$2_RoleSchema as RoleSchema, type index$2_Scope as Scope, index$2_ScopeSchema as ScopeSchema, type index$2_UpdateRoleInput as UpdateRoleInput, index$2_listActionCatalog as listActionCatalog };
3715
+ }
3716
+
3717
+ declare class ShredAPI {
3718
+ user: IAPI$b;
3719
+ goal: IAPI$6;
3720
+ editor: IAPI$5;
3721
+ subscription: IAPI$c;
3722
+ prompt: IAPI$d;
3723
+ pushNotification: IAPI$4;
3724
+ email: IAPI$8;
3725
+ tenant: IAPI$a;
3726
+ app: IAPI$3;
3727
+ project: IAPI$7;
3728
+ track: IAPI$9;
3729
+ note: IAPI$2;
3730
+ specialOffer: IAPI$1;
3731
+ rbac: IAPI;
3732
+ constructor(env: Environment);
3733
+ }
3734
+
3735
+ declare class ShredException extends Error {
3736
+ status: number;
3737
+ constructor(message: string, status: number);
3738
+ }
3739
+
3740
+ declare class ConflictException extends ShredException {
3741
+ constructor(message: string);
3742
+ }
3743
+
3744
+ declare class InvalidArgumentException extends ShredException {
3745
+ constructor(message: string);
3746
+ }
3747
+
3748
+ declare class ResourceNotFoundException extends ShredException {
3749
+ constructor(message: string);
3750
+ }
3751
+
3752
+ declare class UnauthorizedException extends ShredException {
3753
+ constructor(message: string);
3754
+ }
3755
+
3756
+ declare class ForbiddenException extends ShredException {
3757
+ constructor(message: string);
3758
+ }
3759
+
3760
+ type index$1_ConflictException = ConflictException;
3761
+ declare const index$1_ConflictException: typeof ConflictException;
3762
+ type index$1_ForbiddenException = ForbiddenException;
3763
+ declare const index$1_ForbiddenException: typeof ForbiddenException;
3764
+ type index$1_InvalidArgumentException = InvalidArgumentException;
3765
+ declare const index$1_InvalidArgumentException: typeof InvalidArgumentException;
3766
+ type index$1_ResourceNotFoundException = ResourceNotFoundException;
3767
+ declare const index$1_ResourceNotFoundException: typeof ResourceNotFoundException;
3768
+ type index$1_ShredException = ShredException;
3769
+ declare const index$1_ShredException: typeof ShredException;
3770
+ type index$1_UnauthorizedException = UnauthorizedException;
3771
+ declare const index$1_UnauthorizedException: typeof UnauthorizedException;
3772
+ declare namespace index$1 {
3773
+ export { index$1_ConflictException as ConflictException, index$1_ForbiddenException as ForbiddenException, index$1_InvalidArgumentException as InvalidArgumentException, index$1_ResourceNotFoundException as ResourceNotFoundException, index$1_ShredException as ShredException, index$1_UnauthorizedException as UnauthorizedException };
3774
+ }
3775
+
3776
+ declare const AssetSchema: z.ZodObject<{
3777
+ assetId: z.ZodString;
3778
+ fileName: z.ZodString;
3779
+ extension: z.ZodString;
3780
+ fileSize: z.ZodNumber;
3781
+ assetUrl: z.ZodString;
3782
+ thumbnailUrl: z.ZodString;
3783
+ type: z.ZodString;
3784
+ duration: z.ZodOptional<z.ZodNumber>;
3785
+ progress: z.ZodOptional<z.ZodNumber>;
3786
+ error: z.ZodOptional<z.ZodString>;
3787
+ authorId: z.ZodString;
3788
+ uploadedAt: z.ZodNumber;
3789
+ }, "strip", z.ZodTypeAny, {
3790
+ type: string;
3791
+ assetId: string;
3792
+ fileName: string;
3793
+ extension: string;
3794
+ fileSize: number;
3795
+ assetUrl: string;
3796
+ thumbnailUrl: string;
3797
+ authorId: string;
3798
+ uploadedAt: number;
3799
+ error?: string | undefined;
3800
+ duration?: number | undefined;
3801
+ progress?: number | undefined;
3802
+ }, {
3803
+ type: string;
3804
+ assetId: string;
3805
+ fileName: string;
3806
+ extension: string;
3807
+ fileSize: number;
3808
+ assetUrl: string;
3809
+ thumbnailUrl: string;
3810
+ authorId: string;
3811
+ uploadedAt: number;
3812
+ error?: string | undefined;
3813
+ duration?: number | undefined;
3814
+ progress?: number | undefined;
3815
+ }>;
3816
+ type Asset = z.infer<typeof AssetSchema>;
3817
+
3818
+ declare const index_AssetSchema: typeof AssetSchema;
3633
3819
  declare namespace index {
3634
- export { type index_Action as Action, index_ActionCatalog as ActionCatalog, type index_ActionCatalogEntry as ActionCatalogEntry, type index_ActionGroup as ActionGroup, type index_ActionMeta as ActionMeta, index_Actions as Actions, type index_Scope as Scope, index_listActionCatalog as listActionCatalog };
3820
+ export { index_AssetSchema as AssetSchema, type Asset as Entity };
3635
3821
  }
3636
3822
 
3637
- export { index$1 as Asset, index$d as Core, index$6 as Editor, index$9 as Email, index$2 as Exceptions, index$7 as Goal, index$4 as Note, index$5 as Notification, index$8 as Project, index$f as Prompt, index as RBAC, ShredAPI, index$3 as SpecialOffer, index$e as Subscription, index$b as Tenant, index$a as Track, index$c as User, ShredAPI as default };
3823
+ export { index as Asset, index$d as Core, index$6 as Editor, index$9 as Email, index$1 as Exceptions, index$7 as Goal, index$4 as Note, index$5 as Notification, index$8 as Project, index$f as Prompt, index$2 as RBAC, ShredAPI, index$3 as SpecialOffer, index$e as Subscription, index$b as Tenant, index$a as Track, index$c as User, ShredAPI as default };