shred-api-client 2.4.15 → 2.5.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$a {
200
+ interface IAPI$b {
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$a {
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$9: {
208
+ declare const Endpoints$a: {
209
209
  GetPrompt: {
210
210
  uri: string;
211
211
  method: string;
@@ -232,15 +232,15 @@ declare const Endpoints$9: {
232
232
  };
233
233
  };
234
234
 
235
- type index$c_Category = Category;
236
- declare const index$c_CategorySchema: typeof CategorySchema;
237
- declare const index$c_PromptSchema: typeof PromptSchema;
238
- type index$c_Script = Script;
239
- type index$c_ScriptIARequest = ScriptIARequest;
240
- declare const index$c_ScriptIARequestSchema: typeof ScriptIARequestSchema;
241
- declare const index$c_ScriptSchema: typeof ScriptSchema;
242
- declare namespace index$c {
243
- export { type index$c_Category as Category, index$c_CategorySchema as CategorySchema, Endpoints$9 as Endpoints, type Prompt as Entity, type IAPI$a as IAPI, index$c_PromptSchema as PromptSchema, type index$c_Script as Script, type index$c_ScriptIARequest as ScriptIARequest, index$c_ScriptIARequestSchema as ScriptIARequestSchema, index$c_ScriptSchema as ScriptSchema };
235
+ type index$d_Category = Category;
236
+ declare const index$d_CategorySchema: typeof CategorySchema;
237
+ declare const index$d_PromptSchema: typeof PromptSchema;
238
+ type index$d_Script = Script;
239
+ type index$d_ScriptIARequest = ScriptIARequest;
240
+ declare const index$d_ScriptIARequestSchema: typeof ScriptIARequestSchema;
241
+ declare const index$d_ScriptSchema: typeof ScriptSchema;
242
+ declare namespace index$d {
243
+ export { type index$d_Category as Category, index$d_CategorySchema as CategorySchema, Endpoints$a as Endpoints, type Prompt as Entity, type IAPI$b as IAPI, index$d_PromptSchema as PromptSchema, type index$d_Script as Script, type index$d_ScriptIARequest as ScriptIARequest, index$d_ScriptIARequestSchema as ScriptIARequestSchema, index$d_ScriptSchema as ScriptSchema };
244
244
  }
245
245
 
246
246
  declare enum Type {
@@ -270,34 +270,6 @@ declare const PlanSchema: z.ZodObject<{
270
270
  currency: string;
271
271
  subscriptionItemId: string;
272
272
  }>;
273
- declare const SpecialOfferSchema: z.ZodObject<{
274
- id: z.ZodString;
275
- freeProjectsAllowed: z.ZodDefault<z.ZodNumber>;
276
- windowHours: z.ZodNumber;
277
- couponId: z.ZodString;
278
- title: z.ZodString;
279
- description: z.ZodString;
280
- ctaLabel: z.ZodString;
281
- enabled: z.ZodDefault<z.ZodBoolean>;
282
- }, "strip", z.ZodTypeAny, {
283
- id: string;
284
- title: string;
285
- description: string;
286
- freeProjectsAllowed: number;
287
- windowHours: number;
288
- couponId: string;
289
- ctaLabel: string;
290
- enabled: boolean;
291
- }, {
292
- id: string;
293
- title: string;
294
- description: string;
295
- windowHours: number;
296
- couponId: string;
297
- ctaLabel: string;
298
- freeProjectsAllowed?: number | undefined;
299
- enabled?: boolean | undefined;
300
- }>;
301
273
  declare const ProductSchema: z.ZodObject<{
302
274
  id: z.ZodString;
303
275
  name: z.ZodString;
@@ -595,13 +567,12 @@ declare const SubscriptionSummarySchema: z.ZodObject<{
595
567
  productName: string;
596
568
  }>;
597
569
  type Subscription = z.infer<typeof SubscriptionSchema>;
598
- type SpecialOffer = z.infer<typeof SpecialOfferSchema>;
599
570
  type SubscriptionSummary = z.infer<typeof SubscriptionSummarySchema>;
600
571
  type Charge = z.infer<typeof ChargeSchema>;
601
572
  type Plan = z.infer<typeof PlanSchema>;
602
573
  type Product = z.infer<typeof ProductSchema>;
603
574
 
604
- interface IAPI$9 {
575
+ interface IAPI$a {
605
576
  getCharges: (ctx: Context) => Promise<Charge[]>;
606
577
  getPortalUrl: (ctx: Context) => Promise<string>;
607
578
  getSubscription: (context: Context, userId?: string) => Promise<Subscription | null>;
@@ -613,9 +584,8 @@ interface IAPI$9 {
613
584
  updatePlan: (ctx: Context, planId: string) => Promise<boolean>;
614
585
  createCheckout: (planId: string | null, ctx: Context, callbackUrl?: string) => Promise<string>;
615
586
  getSubscriptionsSummary: (ctx: Context) => Promise<SubscriptionSummary[]>;
616
- getSpecialOffer: (ctx: Context) => Promise<SpecialOffer | null>;
617
587
  }
618
- declare const Endpoints$8: {
588
+ declare const Endpoints$9: {
619
589
  GetPortal: {
620
590
  uri: string;
621
591
  method: string;
@@ -628,10 +598,6 @@ declare const Endpoints$8: {
628
598
  uri: string;
629
599
  method: string;
630
600
  };
631
- GetSpecialOffer: {
632
- uri: string;
633
- method: string;
634
- };
635
601
  GetCharges: {
636
602
  uri: string;
637
603
  method: string;
@@ -674,19 +640,18 @@ declare const Endpoints$8: {
674
640
  };
675
641
  };
676
642
 
677
- type index$b_Charge = Charge;
678
- declare const index$b_ChargeSchema: typeof ChargeSchema;
679
- type index$b_Plan = Plan;
680
- declare const index$b_PlanSchema: typeof PlanSchema;
681
- type index$b_Product = Product;
682
- declare const index$b_ProductSchema: typeof ProductSchema;
683
- type index$b_SpecialOffer = SpecialOffer;
684
- declare const index$b_SubscriptionSchema: typeof SubscriptionSchema;
685
- declare const index$b_SubscriptionTypeSchema: typeof SubscriptionTypeSchema;
686
- type index$b_Type = Type;
687
- declare const index$b_Type: typeof Type;
688
- declare namespace index$b {
689
- export { type index$b_Charge as Charge, index$b_ChargeSchema as ChargeSchema, Endpoints$8 as Endpoints, type Subscription as Entity, type IAPI$9 as IAPI, type index$b_Plan as Plan, index$b_PlanSchema as PlanSchema, type index$b_Product as Product, index$b_ProductSchema as ProductSchema, type index$b_SpecialOffer as SpecialOffer, index$b_SubscriptionSchema as SubscriptionSchema, index$b_SubscriptionTypeSchema as SubscriptionTypeSchema, type SubscriptionSummary as Summary, index$b_Type as Type };
643
+ type index$c_Charge = Charge;
644
+ declare const index$c_ChargeSchema: typeof ChargeSchema;
645
+ type index$c_Plan = Plan;
646
+ declare const index$c_PlanSchema: typeof PlanSchema;
647
+ type index$c_Product = Product;
648
+ declare const index$c_ProductSchema: typeof ProductSchema;
649
+ declare const index$c_SubscriptionSchema: typeof SubscriptionSchema;
650
+ declare const index$c_SubscriptionTypeSchema: typeof SubscriptionTypeSchema;
651
+ type index$c_Type = Type;
652
+ declare const index$c_Type: typeof Type;
653
+ declare namespace index$c {
654
+ export { type index$c_Charge as Charge, index$c_ChargeSchema as ChargeSchema, Endpoints$9 as Endpoints, type Subscription as Entity, type IAPI$a as IAPI, type index$c_Plan as Plan, index$c_PlanSchema as PlanSchema, type index$c_Product as Product, index$c_ProductSchema as ProductSchema, index$c_SubscriptionSchema as SubscriptionSchema, index$c_SubscriptionTypeSchema as SubscriptionTypeSchema, type SubscriptionSummary as Summary, index$c_Type as Type };
690
655
  }
691
656
 
692
657
  declare enum Role {
@@ -843,8 +808,8 @@ declare const UserSchema: z.ZodObject<{
843
808
  }>;
844
809
  type User = z.infer<typeof UserSchema>;
845
810
  type Preferences$1 = z.infer<typeof PreferencesSchema$1>;
846
- type Update = Pick<User, "name" | "profession" | "preferences" | "photoUrl" | "fcmToken" | "timezone" | "experienceId">;
847
- type Create = Pick<User, "name" | "email"> & {
811
+ type Update$1 = Pick<User, "name" | "profession" | "preferences" | "photoUrl" | "fcmToken" | "timezone" | "experienceId">;
812
+ type Create$1 = Pick<User, "name" | "email"> & {
848
813
  password?: string;
849
814
  passwordConfirmation?: string;
850
815
  invitationCode?: string;
@@ -879,16 +844,16 @@ type APIResponse<T> = {
879
844
  perPage?: number;
880
845
  };
881
846
 
882
- type index$a_APIResponse<T> = APIResponse<T>;
883
- type index$a_QueryFilterOp = QueryFilterOp;
884
- type index$a_QueryOptions<T> = QueryOptions<T>;
885
- type index$a_QueryOrderBy<T> = QueryOrderBy<T>;
886
- type index$a_QueryWhere<T> = QueryWhere<T>;
887
- declare namespace index$a {
888
- export type { index$a_APIResponse as APIResponse, index$a_QueryFilterOp as QueryFilterOp, index$a_QueryOptions as QueryOptions, index$a_QueryOrderBy as QueryOrderBy, index$a_QueryWhere as QueryWhere };
847
+ type index$b_APIResponse<T> = APIResponse<T>;
848
+ type index$b_QueryFilterOp = QueryFilterOp;
849
+ type index$b_QueryOptions<T> = QueryOptions<T>;
850
+ type index$b_QueryOrderBy<T> = QueryOrderBy<T>;
851
+ type index$b_QueryWhere<T> = QueryWhere<T>;
852
+ declare namespace index$b {
853
+ export type { index$b_APIResponse as APIResponse, index$b_QueryFilterOp as QueryFilterOp, index$b_QueryOptions as QueryOptions, index$b_QueryOrderBy as QueryOrderBy, index$b_QueryWhere as QueryWhere };
889
854
  }
890
855
 
891
- interface IAPI$8 {
856
+ interface IAPI$9 {
892
857
  getUserInfo: (context: Context) => Promise<User>;
893
858
  isEmailAvaliable: (email: string) => Promise<boolean>;
894
859
  sendValidationCode: (email: string) => Promise<boolean>;
@@ -896,16 +861,16 @@ interface IAPI$8 {
896
861
  changePassword: (email: string, pass: string, passConfirm: string, code: number) => Promise<boolean>;
897
862
  changeEmail: (ctx: Context, email: string, code: number) => Promise<boolean>;
898
863
  authenticate: (email: string, password: string, system: System) => Promise<string>;
899
- update: (context: Context, update: Partial<Update>) => Promise<boolean>;
864
+ update: (context: Context, update: Partial<Update$1>) => Promise<boolean>;
900
865
  setup: (context: Context) => Promise<boolean>;
901
866
  getBindedUsers: (ctx: Context) => Promise<User[]>;
902
867
  deleteAccount: (ctx: Context) => Promise<boolean>;
903
868
  getIntegrationToken: (ctx: Context) => Promise<string | null>;
904
869
  createIntegrationToken: (ctx: Context) => Promise<string>;
905
870
  search: (ctx: Context, query: QueryOptions<User>) => Promise<APIResponse<User>>;
906
- createUser: (data: Create) => Promise<User>;
871
+ createUser: (data: Create$1) => Promise<User>;
907
872
  }
908
- declare const Endpoints$7: {
873
+ declare const Endpoints$8: {
909
874
  ChangeEmail: {
910
875
  uri: string;
911
876
  method: string;
@@ -972,15 +937,13 @@ declare const Endpoints$7: {
972
937
  };
973
938
  };
974
939
 
975
- type index$9_Create = Create;
976
- type index$9_Role = Role;
977
- declare const index$9_Role: typeof Role;
978
- type index$9_System = System;
979
- declare const index$9_System: typeof System;
980
- type index$9_Update = Update;
981
- declare const index$9_UserSchema: typeof UserSchema;
982
- declare namespace index$9 {
983
- export { type index$9_Create as Create, Endpoints$7 as Endpoints, type User as Entity, type IAPI$8 as IAPI, type Preferences$1 as Preferences, PreferencesSchema$1 as PreferencesSchema, index$9_Role as Role, index$9_System as System, type index$9_Update as Update, index$9_UserSchema as UserSchema };
940
+ type index$a_Role = Role;
941
+ declare const index$a_Role: typeof Role;
942
+ type index$a_System = System;
943
+ declare const index$a_System: typeof System;
944
+ declare const index$a_UserSchema: typeof UserSchema;
945
+ declare namespace index$a {
946
+ export { type Create$1 as Create, Endpoints$8 as Endpoints, type User as Entity, type IAPI$9 as IAPI, type Preferences$1 as Preferences, PreferencesSchema$1 as PreferencesSchema, index$a_Role as Role, index$a_System as System, type Update$1 as Update, index$a_UserSchema as UserSchema };
984
947
  }
985
948
 
986
949
  declare const PreferencesSchema: z.ZodObject<{
@@ -1556,7 +1519,7 @@ type Tenant = z.infer<typeof TenantSchema>;
1556
1519
  type Member = z.infer<typeof MemberSchema>;
1557
1520
  type Preferences = z.infer<typeof PreferencesSchema>;
1558
1521
 
1559
- interface IAPI$7 {
1522
+ interface IAPI$8 {
1560
1523
  getByInviteCode: (code: string, context?: Context) => Promise<Tenant | null>;
1561
1524
  create: (tenant: Tenant, context: Context) => Promise<boolean>;
1562
1525
  list: (context: Context) => Promise<Tenant[]>;
@@ -1565,7 +1528,7 @@ interface IAPI$7 {
1565
1528
  update: (tenantId: string, data: Pick<Tenant, "preferences">, context: Context) => Promise<boolean>;
1566
1529
  updateReportViewers: (tenantId: string, reportViewerUpdate: ReportViewerUpdate, context: Context) => Promise<boolean>;
1567
1530
  }
1568
- declare const Endpoints$6: {
1531
+ declare const Endpoints$7: {
1569
1532
  GetByInviteCode: {
1570
1533
  uri: string;
1571
1534
  method: string;
@@ -1600,17 +1563,17 @@ declare const Endpoints$6: {
1600
1563
  };
1601
1564
  };
1602
1565
 
1603
- type index$8_Action = Action;
1604
- declare const index$8_Action: typeof Action;
1605
- type index$8_Member = Member;
1606
- declare const index$8_MemberSchema: typeof MemberSchema;
1607
- type index$8_Preferences = Preferences;
1608
- declare const index$8_PreferencesSchema: typeof PreferencesSchema;
1609
- type index$8_ReportViewerUpdate = ReportViewerUpdate;
1610
- declare const index$8_ReportViewerUpdateSchema: typeof ReportViewerUpdateSchema;
1611
- declare const index$8_TenantSchema: typeof TenantSchema;
1612
- declare namespace index$8 {
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 };
1566
+ type index$9_Action = Action;
1567
+ declare const index$9_Action: typeof Action;
1568
+ type index$9_Member = Member;
1569
+ declare const index$9_MemberSchema: typeof MemberSchema;
1570
+ type index$9_Preferences = Preferences;
1571
+ declare const index$9_PreferencesSchema: typeof PreferencesSchema;
1572
+ type index$9_ReportViewerUpdate = ReportViewerUpdate;
1573
+ declare const index$9_ReportViewerUpdateSchema: typeof ReportViewerUpdateSchema;
1574
+ declare const index$9_TenantSchema: typeof TenantSchema;
1575
+ declare namespace index$9 {
1576
+ export { index$9_Action as Action, Endpoints$7 as Endpoints, type Tenant as Entity, type IAPI$8 as IAPI, type index$9_Member as Member, index$9_MemberSchema as MemberSchema, type index$9_Preferences as Preferences, index$9_PreferencesSchema as PreferencesSchema, type index$9_ReportViewerUpdate as ReportViewerUpdate, index$9_ReportViewerUpdateSchema as ReportViewerUpdateSchema, index$9_TenantSchema as TenantSchema };
1614
1577
  }
1615
1578
 
1616
1579
  declare const TrackParamSchema: z.ZodObject<{
@@ -1657,21 +1620,21 @@ declare const TrackSchema: z.ZodObject<{
1657
1620
  type Track = z.infer<typeof TrackSchema>;
1658
1621
  type TrackParam = z.infer<typeof TrackParamSchema>;
1659
1622
 
1660
- interface IAPI$6 {
1623
+ interface IAPI$7 {
1661
1624
  send: (t: Track) => Promise<boolean>;
1662
1625
  }
1663
- declare const Endpoints$5: {
1626
+ declare const Endpoints$6: {
1664
1627
  Track: {
1665
1628
  uri: string;
1666
1629
  method: string;
1667
1630
  };
1668
1631
  };
1669
1632
 
1670
- type index$7_TrackParam = TrackParam;
1671
- declare const index$7_TrackParamSchema: typeof TrackParamSchema;
1672
- declare const index$7_TrackSchema: typeof TrackSchema;
1673
- declare namespace index$7 {
1674
- export { Endpoints$5 as Endpoints, type Track as Entity, type IAPI$6 as IAPI, type index$7_TrackParam as TrackParam, index$7_TrackParamSchema as TrackParamSchema, index$7_TrackSchema as TrackSchema };
1633
+ type index$8_TrackParam = TrackParam;
1634
+ declare const index$8_TrackParamSchema: typeof TrackParamSchema;
1635
+ declare const index$8_TrackSchema: typeof TrackSchema;
1636
+ declare namespace index$8 {
1637
+ export { Endpoints$6 as Endpoints, type Track as Entity, type IAPI$7 as IAPI, type index$8_TrackParam as TrackParam, index$8_TrackParamSchema as TrackParamSchema, index$8_TrackSchema as TrackSchema };
1675
1638
  }
1676
1639
 
1677
1640
  declare const EmailSchema: z.ZodObject<{
@@ -1689,19 +1652,19 @@ declare const EmailSchema: z.ZodObject<{
1689
1652
  }>;
1690
1653
  type Email = z.infer<typeof EmailSchema>;
1691
1654
 
1692
- interface IAPI$5 {
1655
+ interface IAPI$6 {
1693
1656
  send: (email: Email, ctx?: Context) => Promise<boolean>;
1694
1657
  }
1695
- declare const Endpoints$4: {
1658
+ declare const Endpoints$5: {
1696
1659
  SendEmail: {
1697
1660
  uri: string;
1698
1661
  method: string;
1699
1662
  };
1700
1663
  };
1701
1664
 
1702
- declare const index$6_EmailSchema: typeof EmailSchema;
1703
- declare namespace index$6 {
1704
- export { index$6_EmailSchema as EmailSchema, Endpoints$4 as Endpoints, type Email as Entity, type IAPI$5 as IAPI };
1665
+ declare const index$7_EmailSchema: typeof EmailSchema;
1666
+ declare namespace index$7 {
1667
+ export { index$7_EmailSchema as EmailSchema, Endpoints$5 as Endpoints, type Email as Entity, type IAPI$6 as IAPI };
1705
1668
  }
1706
1669
 
1707
1670
  declare enum Status$1 {
@@ -2001,7 +1964,7 @@ type Project = z.infer<typeof ProjectSchema>;
2001
1964
  type TimelineItem = z.infer<typeof TimelineItemSchema>;
2002
1965
  type Feedback = z.infer<typeof FeedbackSchema>;
2003
1966
 
2004
- interface IAPI$4 {
1967
+ interface IAPI$5 {
2005
1968
  reorder: (context: Context, projectId: string, position: number) => Promise<boolean>;
2006
1969
  find: (context: Context, projectId: string) => Promise<Project>;
2007
1970
  create: (context: Context, data: ProjectCreation) => Promise<Project>;
@@ -2022,7 +1985,7 @@ interface IAPI$4 {
2022
1985
  isEligibleForFreeProject(context: Context): Promise<boolean>;
2023
1986
  };
2024
1987
  }
2025
- declare const Endpoints$3: {
1988
+ declare const Endpoints$4: {
2026
1989
  Reorder: {
2027
1990
  uri: string;
2028
1991
  method: string;
@@ -2129,22 +2092,22 @@ type StatusConfigType = {
2129
2092
  };
2130
2093
  declare const StatusConfig: Record<Status$1, StatusConfigType>;
2131
2094
 
2132
- type index$5_Approve = Approve;
2133
- type index$5_CaptionStyle = CaptionStyle;
2134
- declare const index$5_CaptionStyle: typeof CaptionStyle;
2135
- type index$5_Feedback = Feedback;
2136
- declare const index$5_FeedbackSchema: typeof FeedbackSchema;
2137
- type index$5_ProjectCreation = ProjectCreation;
2138
- declare const index$5_ProjectSchema: typeof ProjectSchema;
2139
- type index$5_SendToApproval = SendToApproval;
2140
- declare const index$5_StatusConfig: typeof StatusConfig;
2141
- type index$5_StatusConfigType = StatusConfigType;
2142
- type index$5_Style = Style;
2143
- declare const index$5_Styles: typeof Styles;
2144
- type index$5_TimelineItem = TimelineItem;
2145
- declare const index$5_TimelineItemSchema: typeof TimelineItemSchema;
2146
- declare namespace index$5 {
2147
- export { type index$5_Approve as Approve, index$5_CaptionStyle as CaptionStyle, Endpoints$3 as Endpoints, type Project as Entity, type index$5_Feedback as Feedback, index$5_FeedbackSchema as FeedbackSchema, type IAPI$4 as IAPI, type index$5_ProjectCreation as ProjectCreation, index$5_ProjectSchema as ProjectSchema, type index$5_SendToApproval as SendToApproval, Status$1 as Status, index$5_StatusConfig as StatusConfig, type index$5_StatusConfigType as StatusConfigType, type index$5_Style as Style, index$5_Styles as Styles, type index$5_TimelineItem as TimelineItem, index$5_TimelineItemSchema as TimelineItemSchema };
2095
+ type index$6_Approve = Approve;
2096
+ type index$6_CaptionStyle = CaptionStyle;
2097
+ declare const index$6_CaptionStyle: typeof CaptionStyle;
2098
+ type index$6_Feedback = Feedback;
2099
+ declare const index$6_FeedbackSchema: typeof FeedbackSchema;
2100
+ type index$6_ProjectCreation = ProjectCreation;
2101
+ declare const index$6_ProjectSchema: typeof ProjectSchema;
2102
+ type index$6_SendToApproval = SendToApproval;
2103
+ declare const index$6_StatusConfig: typeof StatusConfig;
2104
+ type index$6_StatusConfigType = StatusConfigType;
2105
+ type index$6_Style = Style;
2106
+ declare const index$6_Styles: typeof Styles;
2107
+ type index$6_TimelineItem = TimelineItem;
2108
+ declare const index$6_TimelineItemSchema: typeof TimelineItemSchema;
2109
+ declare namespace index$6 {
2110
+ export { type index$6_Approve as Approve, index$6_CaptionStyle as CaptionStyle, Endpoints$4 as Endpoints, type Project as Entity, type index$6_Feedback as Feedback, index$6_FeedbackSchema as FeedbackSchema, type IAPI$5 as IAPI, type index$6_ProjectCreation as ProjectCreation, index$6_ProjectSchema as ProjectSchema, type index$6_SendToApproval as SendToApproval, Status$1 as Status, index$6_StatusConfig as StatusConfig, type index$6_StatusConfigType as StatusConfigType, type index$6_Style as Style, index$6_Styles as Styles, type index$6_TimelineItem as TimelineItem, index$6_TimelineItemSchema as TimelineItemSchema };
2148
2111
  }
2149
2112
 
2150
2113
  declare const DailyMilestoneSchema: z.ZodObject<{
@@ -2216,11 +2179,11 @@ declare const GoalSchema: z.ZodObject<{
2216
2179
  type DailyMilestone = z.infer<typeof DailyMilestoneSchema>;
2217
2180
  type Goal = z.infer<typeof GoalSchema>;
2218
2181
 
2219
- interface IAPI$3 {
2182
+ interface IAPI$4 {
2220
2183
  getGoals: (context: Context) => Promise<Goal[]>;
2221
2184
  getEditorGoals: (context: Context, editorId: string) => Promise<Goal[]>;
2222
2185
  }
2223
- declare const Endpoints$2: {
2186
+ declare const Endpoints$3: {
2224
2187
  GetGoals: {
2225
2188
  uri: string;
2226
2189
  method: string;
@@ -2231,11 +2194,11 @@ declare const Endpoints$2: {
2231
2194
  };
2232
2195
  };
2233
2196
 
2234
- type index$4_DailyMilestone = DailyMilestone;
2235
- declare const index$4_DailyMilestoneSchema: typeof DailyMilestoneSchema;
2236
- declare const index$4_GoalSchema: typeof GoalSchema;
2237
- declare namespace index$4 {
2238
- export { type index$4_DailyMilestone as DailyMilestone, index$4_DailyMilestoneSchema as DailyMilestoneSchema, Endpoints$2 as Endpoints, type Goal as Entity, index$4_GoalSchema as GoalSchema, type IAPI$3 as IAPI };
2197
+ type index$5_DailyMilestone = DailyMilestone;
2198
+ declare const index$5_DailyMilestoneSchema: typeof DailyMilestoneSchema;
2199
+ declare const index$5_GoalSchema: typeof GoalSchema;
2200
+ declare namespace index$5 {
2201
+ export { type index$5_DailyMilestone as DailyMilestone, index$5_DailyMilestoneSchema as DailyMilestoneSchema, Endpoints$3 as Endpoints, type Goal as Entity, index$5_GoalSchema as GoalSchema, type IAPI$4 as IAPI };
2239
2202
  }
2240
2203
 
2241
2204
  declare enum Frequency {
@@ -2736,7 +2699,7 @@ type RecurrenceRule = z.infer<typeof RecurrenceRuleSchema>;
2736
2699
  type History = z.infer<typeof HistorySchema>;
2737
2700
  type Criteria = z.infer<typeof CriteriaSchema>;
2738
2701
 
2739
- interface IAPI$2 {
2702
+ interface IAPI$3 {
2740
2703
  getTriggers: (ctx: Context) => Promise<APIResponse<Trigger>>;
2741
2704
  createTrigger: (ctx: Context, t: Trigger) => Promise<Trigger>;
2742
2705
  deleteTrigger: (ctx: Context, triggerId: string) => Promise<boolean>;
@@ -2746,7 +2709,7 @@ interface IAPI$2 {
2746
2709
  markAsRead: (ctx: Context, id: string) => Promise<boolean>;
2747
2710
  clearNotifications: (ctx: Context) => Promise<boolean>;
2748
2711
  }
2749
- declare const Endpoints$1: {
2712
+ declare const Endpoints$2: {
2750
2713
  Create: {
2751
2714
  uri: string;
2752
2715
  method: string;
@@ -2781,35 +2744,35 @@ declare const Endpoints$1: {
2781
2744
  };
2782
2745
  };
2783
2746
 
2784
- type index$3_Criteria = Criteria;
2785
- declare const index$3_CriteriaSchema: typeof CriteriaSchema;
2786
- type index$3_CriteriaType = CriteriaType;
2787
- declare const index$3_CriteriaType: typeof CriteriaType;
2788
- type index$3_Frequency = Frequency;
2789
- declare const index$3_Frequency: typeof Frequency;
2790
- type index$3_History = History;
2791
- declare const index$3_HistorySchema: typeof HistorySchema;
2792
- type index$3_NotificationDetail = NotificationDetail;
2793
- declare const index$3_NotificationDetailSchema: typeof NotificationDetailSchema;
2794
- type index$3_NotificationItem = NotificationItem;
2795
- declare const index$3_NotificationItemSchema: typeof NotificationItemSchema;
2796
- type index$3_NotificationType = NotificationType;
2797
- declare const index$3_NotificationType: typeof NotificationType;
2798
- type index$3_RecurrenceRule = RecurrenceRule;
2799
- declare const index$3_RecurrenceRuleSchema: typeof RecurrenceRuleSchema;
2800
- type index$3_Status = Status;
2801
- declare const index$3_Status: typeof Status;
2802
- type index$3_TransportType = TransportType;
2803
- declare const index$3_TransportType: typeof TransportType;
2804
- type index$3_Trigger = Trigger;
2805
- declare const index$3_TriggerSchema: typeof TriggerSchema;
2806
- type index$3_WeekDay = WeekDay;
2807
- declare const index$3_WeekDay: typeof WeekDay;
2808
- declare namespace index$3 {
2809
- export { type index$3_Criteria as Criteria, index$3_CriteriaSchema as CriteriaSchema, index$3_CriteriaType as CriteriaType, Endpoints$1 as Endpoints, index$3_Frequency as Frequency, type index$3_History as History, index$3_HistorySchema as HistorySchema, type IAPI$2 as IAPI, type index$3_NotificationDetail as NotificationDetail, index$3_NotificationDetailSchema as NotificationDetailSchema, type index$3_NotificationItem as NotificationItem, index$3_NotificationItemSchema as NotificationItemSchema, index$3_NotificationType as NotificationType, type index$3_RecurrenceRule as RecurrenceRule, index$3_RecurrenceRuleSchema as RecurrenceRuleSchema, index$3_Status as Status, index$3_TransportType as TransportType, type index$3_Trigger as Trigger, index$3_TriggerSchema as TriggerSchema, index$3_WeekDay as WeekDay };
2747
+ type index$4_Criteria = Criteria;
2748
+ declare const index$4_CriteriaSchema: typeof CriteriaSchema;
2749
+ type index$4_CriteriaType = CriteriaType;
2750
+ declare const index$4_CriteriaType: typeof CriteriaType;
2751
+ type index$4_Frequency = Frequency;
2752
+ declare const index$4_Frequency: typeof Frequency;
2753
+ type index$4_History = History;
2754
+ declare const index$4_HistorySchema: typeof HistorySchema;
2755
+ type index$4_NotificationDetail = NotificationDetail;
2756
+ declare const index$4_NotificationDetailSchema: typeof NotificationDetailSchema;
2757
+ type index$4_NotificationItem = NotificationItem;
2758
+ declare const index$4_NotificationItemSchema: typeof NotificationItemSchema;
2759
+ type index$4_NotificationType = NotificationType;
2760
+ declare const index$4_NotificationType: typeof NotificationType;
2761
+ type index$4_RecurrenceRule = RecurrenceRule;
2762
+ declare const index$4_RecurrenceRuleSchema: typeof RecurrenceRuleSchema;
2763
+ type index$4_Status = Status;
2764
+ declare const index$4_Status: typeof Status;
2765
+ type index$4_TransportType = TransportType;
2766
+ declare const index$4_TransportType: typeof TransportType;
2767
+ type index$4_Trigger = Trigger;
2768
+ declare const index$4_TriggerSchema: typeof TriggerSchema;
2769
+ type index$4_WeekDay = WeekDay;
2770
+ declare const index$4_WeekDay: typeof WeekDay;
2771
+ declare namespace index$4 {
2772
+ export { type index$4_Criteria as Criteria, index$4_CriteriaSchema as CriteriaSchema, index$4_CriteriaType as CriteriaType, Endpoints$2 as Endpoints, index$4_Frequency as Frequency, type index$4_History as History, index$4_HistorySchema as HistorySchema, type IAPI$3 as IAPI, type index$4_NotificationDetail as NotificationDetail, index$4_NotificationDetailSchema as NotificationDetailSchema, type index$4_NotificationItem as NotificationItem, index$4_NotificationItemSchema as NotificationItemSchema, index$4_NotificationType as NotificationType, type index$4_RecurrenceRule as RecurrenceRule, index$4_RecurrenceRuleSchema as RecurrenceRuleSchema, index$4_Status as Status, index$4_TransportType as TransportType, type index$4_Trigger as Trigger, index$4_TriggerSchema as TriggerSchema, index$4_WeekDay as WeekDay };
2810
2773
  }
2811
2774
 
2812
- interface IAPI$1 {
2775
+ interface IAPI$2 {
2813
2776
  version: () => Promise<string>;
2814
2777
  }
2815
2778
 
@@ -2953,13 +2916,13 @@ declare const NoteSchema: z.ZodObject<{
2953
2916
  type Note = z.infer<typeof NoteSchema>;
2954
2917
  type NoteHistory = z.infer<typeof NoteHistorySchema>;
2955
2918
 
2956
- interface IAPI {
2919
+ interface IAPI$1 {
2957
2920
  list: (c: Context, userId: string) => Promise<Note[]>;
2958
2921
  add: (c: Context, note: Partial<Note>) => Promise<Note>;
2959
2922
  update: (c: Context, id: string, script: Partial<Note>) => Promise<Note>;
2960
2923
  delete: (c: Context, id: string) => Promise<boolean>;
2961
2924
  }
2962
- declare const Endpoints: {
2925
+ declare const Endpoints$1: {
2963
2926
  GetNotes: {
2964
2927
  uri: string;
2965
2928
  method: string;
@@ -2978,27 +2941,189 @@ declare const Endpoints: {
2978
2941
  };
2979
2942
  };
2980
2943
 
2944
+ type index$3_NoteHistory = NoteHistory;
2945
+ declare const index$3_NoteHistorySchema: typeof NoteHistorySchema;
2946
+ declare const index$3_NoteSchema: typeof NoteSchema;
2947
+ declare namespace index$3 {
2948
+ export { Endpoints$1 as Endpoints, type Note as Entity, type IAPI$1 as IAPI, type index$3_NoteHistory as NoteHistory, index$3_NoteHistorySchema as NoteHistorySchema, index$3_NoteSchema as NoteSchema };
2949
+ }
2950
+
2951
+ declare const SpecialOfferSchema: z.ZodObject<{
2952
+ id: z.ZodString;
2953
+ freeProjectsAllowed: z.ZodNumber;
2954
+ windowHours: z.ZodNumber;
2955
+ planId: z.ZodString;
2956
+ couponId: z.ZodString;
2957
+ title: z.ZodString;
2958
+ description: z.ZodString;
2959
+ ctaLabel: z.ZodString;
2960
+ enabled: z.ZodBoolean;
2961
+ }, "strip", z.ZodTypeAny, {
2962
+ id: string;
2963
+ title: string;
2964
+ description: string;
2965
+ freeProjectsAllowed: number;
2966
+ windowHours: number;
2967
+ planId: string;
2968
+ couponId: string;
2969
+ ctaLabel: string;
2970
+ enabled: boolean;
2971
+ }, {
2972
+ id: string;
2973
+ title: string;
2974
+ description: string;
2975
+ freeProjectsAllowed: number;
2976
+ windowHours: number;
2977
+ planId: string;
2978
+ couponId: string;
2979
+ ctaLabel: string;
2980
+ enabled: boolean;
2981
+ }>;
2982
+ declare const UserOfferDetailsSchema: z.ZodObject<{
2983
+ offerId: z.ZodString;
2984
+ expiresAt: z.ZodNumber;
2985
+ title: z.ZodString;
2986
+ description: z.ZodString;
2987
+ ctaLabel: z.ZodString;
2988
+ }, "strip", z.ZodTypeAny, {
2989
+ title: string;
2990
+ description: string;
2991
+ expiresAt: number;
2992
+ ctaLabel: string;
2993
+ offerId: string;
2994
+ }, {
2995
+ title: string;
2996
+ description: string;
2997
+ expiresAt: number;
2998
+ ctaLabel: string;
2999
+ offerId: string;
3000
+ }>;
3001
+ declare const CreateSpecialOfferSchema: z.ZodObject<{
3002
+ freeProjectsAllowed: z.ZodOptional<z.ZodNumber>;
3003
+ windowHours: z.ZodNumber;
3004
+ planId: z.ZodString;
3005
+ couponId: z.ZodString;
3006
+ title: z.ZodString;
3007
+ description: z.ZodString;
3008
+ ctaLabel: z.ZodString;
3009
+ }, "strip", z.ZodTypeAny, {
3010
+ title: string;
3011
+ description: string;
3012
+ windowHours: number;
3013
+ planId: string;
3014
+ couponId: string;
3015
+ ctaLabel: string;
3016
+ freeProjectsAllowed?: number | undefined;
3017
+ }, {
3018
+ title: string;
3019
+ description: string;
3020
+ windowHours: number;
3021
+ planId: string;
3022
+ couponId: string;
3023
+ ctaLabel: string;
3024
+ freeProjectsAllowed?: number | undefined;
3025
+ }>;
3026
+ declare const UpdateSpecialOfferSchema: z.ZodObject<{
3027
+ freeProjectsAllowed: z.ZodOptional<z.ZodNumber>;
3028
+ windowHours: z.ZodOptional<z.ZodNumber>;
3029
+ planId: z.ZodOptional<z.ZodString>;
3030
+ couponId: z.ZodOptional<z.ZodString>;
3031
+ title: z.ZodOptional<z.ZodString>;
3032
+ description: z.ZodOptional<z.ZodString>;
3033
+ ctaLabel: z.ZodOptional<z.ZodString>;
3034
+ }, "strip", z.ZodTypeAny, {
3035
+ title?: string | undefined;
3036
+ description?: string | undefined;
3037
+ freeProjectsAllowed?: number | undefined;
3038
+ windowHours?: number | undefined;
3039
+ planId?: string | undefined;
3040
+ couponId?: string | undefined;
3041
+ ctaLabel?: string | undefined;
3042
+ }, {
3043
+ title?: string | undefined;
3044
+ description?: string | undefined;
3045
+ freeProjectsAllowed?: number | undefined;
3046
+ windowHours?: number | undefined;
3047
+ planId?: string | undefined;
3048
+ couponId?: string | undefined;
3049
+ ctaLabel?: string | undefined;
3050
+ }>;
3051
+ type SpecialOffer = z.infer<typeof SpecialOfferSchema>;
3052
+ type UserOfferDetails = z.infer<typeof UserOfferDetailsSchema>;
3053
+ type Create = z.infer<typeof CreateSpecialOfferSchema>;
3054
+ type Update = z.infer<typeof UpdateSpecialOfferSchema>;
3055
+
3056
+ interface IAPI {
3057
+ list: (ctx: Context) => Promise<SpecialOffer[]>;
3058
+ getActive: (ctx: Context) => Promise<SpecialOffer | null>;
3059
+ create: (ctx: Context, data: Create) => Promise<SpecialOffer>;
3060
+ update: (ctx: Context, id: string, data: Update) => Promise<void>;
3061
+ enable: (ctx: Context, id: string) => Promise<void>;
3062
+ disable: (ctx: Context, id: string) => Promise<void>;
3063
+ getMyOffer: (ctx: Context) => Promise<UserOfferDetails | null>;
3064
+ claim: (ctx: Context, callbackUrl?: string) => Promise<string>;
3065
+ }
3066
+ declare const Endpoints: {
3067
+ List: {
3068
+ uri: string;
3069
+ method: string;
3070
+ };
3071
+ GetActive: {
3072
+ uri: string;
3073
+ method: string;
3074
+ };
3075
+ Create: {
3076
+ uri: string;
3077
+ method: string;
3078
+ };
3079
+ Update: {
3080
+ uri: string;
3081
+ method: string;
3082
+ };
3083
+ Enable: {
3084
+ uri: string;
3085
+ method: string;
3086
+ };
3087
+ Disable: {
3088
+ uri: string;
3089
+ method: string;
3090
+ };
3091
+ GetMyOffer: {
3092
+ uri: string;
3093
+ method: string;
3094
+ };
3095
+ Claim: {
3096
+ uri: string;
3097
+ method: string;
3098
+ };
3099
+ };
3100
+
3101
+ type index$2_Create = Create;
3102
+ declare const index$2_CreateSpecialOfferSchema: typeof CreateSpecialOfferSchema;
2981
3103
  declare const index$2_Endpoints: typeof Endpoints;
2982
3104
  type index$2_IAPI = IAPI;
2983
- type index$2_NoteHistory = NoteHistory;
2984
- declare const index$2_NoteHistorySchema: typeof NoteHistorySchema;
2985
- declare const index$2_NoteSchema: typeof NoteSchema;
3105
+ declare const index$2_SpecialOfferSchema: typeof SpecialOfferSchema;
3106
+ type index$2_Update = Update;
3107
+ declare const index$2_UpdateSpecialOfferSchema: typeof UpdateSpecialOfferSchema;
3108
+ type index$2_UserOfferDetails = UserOfferDetails;
3109
+ declare const index$2_UserOfferDetailsSchema: typeof UserOfferDetailsSchema;
2986
3110
  declare namespace index$2 {
2987
- export { index$2_Endpoints as Endpoints, type Note as Entity, type index$2_IAPI as IAPI, type index$2_NoteHistory as NoteHistory, index$2_NoteHistorySchema as NoteHistorySchema, index$2_NoteSchema as NoteSchema };
3111
+ export { type index$2_Create as Create, index$2_CreateSpecialOfferSchema as CreateSpecialOfferSchema, index$2_Endpoints as Endpoints, type SpecialOffer as Entity, type index$2_IAPI as IAPI, index$2_SpecialOfferSchema as SpecialOfferSchema, type index$2_Update as Update, index$2_UpdateSpecialOfferSchema as UpdateSpecialOfferSchema, type index$2_UserOfferDetails as UserOfferDetails, index$2_UserOfferDetailsSchema as UserOfferDetailsSchema };
2988
3112
  }
2989
3113
 
2990
3114
  declare class ShredAPI {
2991
- user: IAPI$8;
2992
- goal: IAPI$3;
2993
- subscription: IAPI$9;
2994
- prompt: IAPI$a;
2995
- pushNotification: IAPI$2;
2996
- email: IAPI$5;
2997
- tenant: IAPI$7;
2998
- app: IAPI$1;
2999
- project: IAPI$4;
3000
- track: IAPI$6;
3001
- note: IAPI;
3115
+ user: IAPI$9;
3116
+ goal: IAPI$4;
3117
+ subscription: IAPI$a;
3118
+ prompt: IAPI$b;
3119
+ pushNotification: IAPI$3;
3120
+ email: IAPI$6;
3121
+ tenant: IAPI$8;
3122
+ app: IAPI$2;
3123
+ project: IAPI$5;
3124
+ track: IAPI$7;
3125
+ note: IAPI$1;
3126
+ specialOffer: IAPI;
3002
3127
  constructor(env: Environment);
3003
3128
  }
3004
3129
 
@@ -3027,15 +3152,6 @@ declare class ForbiddenException extends ShredException {
3027
3152
  constructor(message: string);
3028
3153
  }
3029
3154
 
3030
- declare const Exceptions: {
3031
- ConflictException: typeof ConflictException;
3032
- InvalidArgumentException: typeof InvalidArgumentException;
3033
- ResourceNotFoundException: typeof ResourceNotFoundException;
3034
- ShredException: typeof ShredException;
3035
- UnauthorizedException: typeof UnauthorizedException;
3036
- ForbiddenException: typeof ForbiddenException;
3037
- };
3038
-
3039
3155
  type index$1_ConflictException = ConflictException;
3040
3156
  declare const index$1_ConflictException: typeof ConflictException;
3041
3157
  type index$1_ForbiddenException = ForbiddenException;
@@ -3049,7 +3165,7 @@ declare const index$1_ShredException: typeof ShredException;
3049
3165
  type index$1_UnauthorizedException = UnauthorizedException;
3050
3166
  declare const index$1_UnauthorizedException: typeof UnauthorizedException;
3051
3167
  declare namespace index$1 {
3052
- 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, Exceptions as default };
3168
+ 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 };
3053
3169
  }
3054
3170
 
3055
3171
  declare const AssetSchema: z.ZodObject<{
@@ -3099,4 +3215,4 @@ declare namespace index {
3099
3215
  export { index_AssetSchema as AssetSchema, type Asset as Entity };
3100
3216
  }
3101
3217
 
3102
- export { index as Asset, index$a as Core, index$6 as Email, index$1 as Exceptions, index$4 as Goal, index$2 as Note, index$3 as Notification, index$5 as Project, index$c as Prompt, ShredAPI, index$b as Subscription, index$8 as Tenant, index$7 as Track, index$9 as User, ShredAPI as default };
3218
+ export { index as Asset, index$b as Core, index$7 as Email, index$1 as Exceptions, index$5 as Goal, index$3 as Note, index$4 as Notification, index$6 as Project, index$d as Prompt, ShredAPI, index$2 as SpecialOffer, index$c as Subscription, index$9 as Tenant, index$8 as Track, index$a as User, ShredAPI as default };