shred-api-client 2.4.14 → 2.5.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
@@ -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<{
@@ -1362,6 +1325,8 @@ declare const TenantSchema: z.ZodObject<{
1362
1325
  }>>>;
1363
1326
  totalSubscriptions: z.ZodOptional<z.ZodNumber>;
1364
1327
  totalUsers: z.ZodOptional<z.ZodNumber>;
1328
+ reportUrl: z.ZodOptional<z.ZodString>;
1329
+ reportViewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1365
1330
  }, "strip", z.ZodTypeAny, {
1366
1331
  id: string;
1367
1332
  name: string;
@@ -1438,6 +1403,8 @@ declare const TenantSchema: z.ZodObject<{
1438
1403
  } | undefined;
1439
1404
  totalSubscriptions?: number | undefined;
1440
1405
  totalUsers?: number | undefined;
1406
+ reportUrl?: string | undefined;
1407
+ reportViewers?: string[] | undefined;
1441
1408
  }, {
1442
1409
  id: string;
1443
1410
  name: string;
@@ -1514,6 +1481,8 @@ declare const TenantSchema: z.ZodObject<{
1514
1481
  } | undefined;
1515
1482
  totalSubscriptions?: number | undefined;
1516
1483
  totalUsers?: number | undefined;
1484
+ reportUrl?: string | undefined;
1485
+ reportViewers?: string[] | undefined;
1517
1486
  }>;
1518
1487
  declare const MemberSchema: z.ZodObject<{
1519
1488
  name: z.ZodString;
@@ -1531,19 +1500,35 @@ declare const MemberSchema: z.ZodObject<{
1531
1500
  name: string;
1532
1501
  isActive: boolean;
1533
1502
  }>;
1503
+ declare enum Action {
1504
+ ADD = "add",
1505
+ REMOVE = "remove"
1506
+ }
1507
+ declare const ReportViewerUpdateSchema: z.ZodObject<{
1508
+ userId: z.ZodString;
1509
+ action: z.ZodNativeEnum<typeof Action>;
1510
+ }, "strip", z.ZodTypeAny, {
1511
+ userId: string;
1512
+ action: Action;
1513
+ }, {
1514
+ userId: string;
1515
+ action: Action;
1516
+ }>;
1517
+ type ReportViewerUpdate = z.infer<typeof ReportViewerUpdateSchema>;
1534
1518
  type Tenant = z.infer<typeof TenantSchema>;
1535
1519
  type Member = z.infer<typeof MemberSchema>;
1536
1520
  type Preferences = z.infer<typeof PreferencesSchema>;
1537
1521
 
1538
- interface IAPI$7 {
1522
+ interface IAPI$8 {
1539
1523
  getByInviteCode: (code: string, context?: Context) => Promise<Tenant | null>;
1540
1524
  create: (tenant: Tenant, context: Context) => Promise<boolean>;
1541
1525
  list: (context: Context) => Promise<Tenant[]>;
1542
1526
  getTenant: (context: Context, tenantId?: string) => Promise<Tenant | null>;
1543
1527
  getMembers: (context: Context, tenantId: string) => Promise<Member[]>;
1544
1528
  update: (tenantId: string, data: Pick<Tenant, "preferences">, context: Context) => Promise<boolean>;
1529
+ updateReportViewers: (tenantId: string, reportViewerUpdate: ReportViewerUpdate, context: Context) => Promise<boolean>;
1545
1530
  }
1546
- declare const Endpoints$6: {
1531
+ declare const Endpoints$7: {
1547
1532
  GetByInviteCode: {
1548
1533
  uri: string;
1549
1534
  method: string;
@@ -1572,15 +1557,23 @@ declare const Endpoints$6: {
1572
1557
  uri: string;
1573
1558
  method: string;
1574
1559
  };
1560
+ UpdateReportViewers: {
1561
+ uri: string;
1562
+ method: string;
1563
+ };
1575
1564
  };
1576
1565
 
1577
- type index$8_Member = Member;
1578
- declare const index$8_MemberSchema: typeof MemberSchema;
1579
- type index$8_Preferences = Preferences;
1580
- declare const index$8_PreferencesSchema: typeof PreferencesSchema;
1581
- declare const index$8_TenantSchema: typeof TenantSchema;
1582
- 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 };
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 };
1584
1577
  }
1585
1578
 
1586
1579
  declare const TrackParamSchema: z.ZodObject<{
@@ -1609,16 +1602,16 @@ declare const TrackSchema: z.ZodObject<{
1609
1602
  }>, "many">>;
1610
1603
  }, "strip", z.ZodTypeAny, {
1611
1604
  label: string;
1612
- category: string;
1613
1605
  action: string;
1606
+ category: string;
1614
1607
  params?: {
1615
1608
  value: string | number;
1616
1609
  name: string;
1617
1610
  }[] | undefined;
1618
1611
  }, {
1619
1612
  label: string;
1620
- category: string;
1621
1613
  action: string;
1614
+ category: string;
1622
1615
  params?: {
1623
1616
  value: string | number;
1624
1617
  name: string;
@@ -1627,21 +1620,21 @@ declare const TrackSchema: z.ZodObject<{
1627
1620
  type Track = z.infer<typeof TrackSchema>;
1628
1621
  type TrackParam = z.infer<typeof TrackParamSchema>;
1629
1622
 
1630
- interface IAPI$6 {
1623
+ interface IAPI$7 {
1631
1624
  send: (t: Track) => Promise<boolean>;
1632
1625
  }
1633
- declare const Endpoints$5: {
1626
+ declare const Endpoints$6: {
1634
1627
  Track: {
1635
1628
  uri: string;
1636
1629
  method: string;
1637
1630
  };
1638
1631
  };
1639
1632
 
1640
- type index$7_TrackParam = TrackParam;
1641
- declare const index$7_TrackParamSchema: typeof TrackParamSchema;
1642
- declare const index$7_TrackSchema: typeof TrackSchema;
1643
- declare namespace index$7 {
1644
- 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 };
1645
1638
  }
1646
1639
 
1647
1640
  declare const EmailSchema: z.ZodObject<{
@@ -1659,19 +1652,19 @@ declare const EmailSchema: z.ZodObject<{
1659
1652
  }>;
1660
1653
  type Email = z.infer<typeof EmailSchema>;
1661
1654
 
1662
- interface IAPI$5 {
1655
+ interface IAPI$6 {
1663
1656
  send: (email: Email, ctx?: Context) => Promise<boolean>;
1664
1657
  }
1665
- declare const Endpoints$4: {
1658
+ declare const Endpoints$5: {
1666
1659
  SendEmail: {
1667
1660
  uri: string;
1668
1661
  method: string;
1669
1662
  };
1670
1663
  };
1671
1664
 
1672
- declare const index$6_EmailSchema: typeof EmailSchema;
1673
- declare namespace index$6 {
1674
- 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 };
1675
1668
  }
1676
1669
 
1677
1670
  declare enum Status$1 {
@@ -1971,7 +1964,7 @@ type Project = z.infer<typeof ProjectSchema>;
1971
1964
  type TimelineItem = z.infer<typeof TimelineItemSchema>;
1972
1965
  type Feedback = z.infer<typeof FeedbackSchema>;
1973
1966
 
1974
- interface IAPI$4 {
1967
+ interface IAPI$5 {
1975
1968
  reorder: (context: Context, projectId: string, position: number) => Promise<boolean>;
1976
1969
  find: (context: Context, projectId: string) => Promise<Project>;
1977
1970
  create: (context: Context, data: ProjectCreation) => Promise<Project>;
@@ -1992,7 +1985,7 @@ interface IAPI$4 {
1992
1985
  isEligibleForFreeProject(context: Context): Promise<boolean>;
1993
1986
  };
1994
1987
  }
1995
- declare const Endpoints$3: {
1988
+ declare const Endpoints$4: {
1996
1989
  Reorder: {
1997
1990
  uri: string;
1998
1991
  method: string;
@@ -2099,22 +2092,22 @@ type StatusConfigType = {
2099
2092
  };
2100
2093
  declare const StatusConfig: Record<Status$1, StatusConfigType>;
2101
2094
 
2102
- type index$5_Approve = Approve;
2103
- type index$5_CaptionStyle = CaptionStyle;
2104
- declare const index$5_CaptionStyle: typeof CaptionStyle;
2105
- type index$5_Feedback = Feedback;
2106
- declare const index$5_FeedbackSchema: typeof FeedbackSchema;
2107
- type index$5_ProjectCreation = ProjectCreation;
2108
- declare const index$5_ProjectSchema: typeof ProjectSchema;
2109
- type index$5_SendToApproval = SendToApproval;
2110
- declare const index$5_StatusConfig: typeof StatusConfig;
2111
- type index$5_StatusConfigType = StatusConfigType;
2112
- type index$5_Style = Style;
2113
- declare const index$5_Styles: typeof Styles;
2114
- type index$5_TimelineItem = TimelineItem;
2115
- declare const index$5_TimelineItemSchema: typeof TimelineItemSchema;
2116
- declare namespace index$5 {
2117
- 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 };
2118
2111
  }
2119
2112
 
2120
2113
  declare const DailyMilestoneSchema: z.ZodObject<{
@@ -2186,11 +2179,11 @@ declare const GoalSchema: z.ZodObject<{
2186
2179
  type DailyMilestone = z.infer<typeof DailyMilestoneSchema>;
2187
2180
  type Goal = z.infer<typeof GoalSchema>;
2188
2181
 
2189
- interface IAPI$3 {
2182
+ interface IAPI$4 {
2190
2183
  getGoals: (context: Context) => Promise<Goal[]>;
2191
2184
  getEditorGoals: (context: Context, editorId: string) => Promise<Goal[]>;
2192
2185
  }
2193
- declare const Endpoints$2: {
2186
+ declare const Endpoints$3: {
2194
2187
  GetGoals: {
2195
2188
  uri: string;
2196
2189
  method: string;
@@ -2201,11 +2194,11 @@ declare const Endpoints$2: {
2201
2194
  };
2202
2195
  };
2203
2196
 
2204
- type index$4_DailyMilestone = DailyMilestone;
2205
- declare const index$4_DailyMilestoneSchema: typeof DailyMilestoneSchema;
2206
- declare const index$4_GoalSchema: typeof GoalSchema;
2207
- declare namespace index$4 {
2208
- 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 };
2209
2202
  }
2210
2203
 
2211
2204
  declare enum Frequency {
@@ -2706,7 +2699,7 @@ type RecurrenceRule = z.infer<typeof RecurrenceRuleSchema>;
2706
2699
  type History = z.infer<typeof HistorySchema>;
2707
2700
  type Criteria = z.infer<typeof CriteriaSchema>;
2708
2701
 
2709
- interface IAPI$2 {
2702
+ interface IAPI$3 {
2710
2703
  getTriggers: (ctx: Context) => Promise<APIResponse<Trigger>>;
2711
2704
  createTrigger: (ctx: Context, t: Trigger) => Promise<Trigger>;
2712
2705
  deleteTrigger: (ctx: Context, triggerId: string) => Promise<boolean>;
@@ -2716,7 +2709,7 @@ interface IAPI$2 {
2716
2709
  markAsRead: (ctx: Context, id: string) => Promise<boolean>;
2717
2710
  clearNotifications: (ctx: Context) => Promise<boolean>;
2718
2711
  }
2719
- declare const Endpoints$1: {
2712
+ declare const Endpoints$2: {
2720
2713
  Create: {
2721
2714
  uri: string;
2722
2715
  method: string;
@@ -2751,35 +2744,35 @@ declare const Endpoints$1: {
2751
2744
  };
2752
2745
  };
2753
2746
 
2754
- type index$3_Criteria = Criteria;
2755
- declare const index$3_CriteriaSchema: typeof CriteriaSchema;
2756
- type index$3_CriteriaType = CriteriaType;
2757
- declare const index$3_CriteriaType: typeof CriteriaType;
2758
- type index$3_Frequency = Frequency;
2759
- declare const index$3_Frequency: typeof Frequency;
2760
- type index$3_History = History;
2761
- declare const index$3_HistorySchema: typeof HistorySchema;
2762
- type index$3_NotificationDetail = NotificationDetail;
2763
- declare const index$3_NotificationDetailSchema: typeof NotificationDetailSchema;
2764
- type index$3_NotificationItem = NotificationItem;
2765
- declare const index$3_NotificationItemSchema: typeof NotificationItemSchema;
2766
- type index$3_NotificationType = NotificationType;
2767
- declare const index$3_NotificationType: typeof NotificationType;
2768
- type index$3_RecurrenceRule = RecurrenceRule;
2769
- declare const index$3_RecurrenceRuleSchema: typeof RecurrenceRuleSchema;
2770
- type index$3_Status = Status;
2771
- declare const index$3_Status: typeof Status;
2772
- type index$3_TransportType = TransportType;
2773
- declare const index$3_TransportType: typeof TransportType;
2774
- type index$3_Trigger = Trigger;
2775
- declare const index$3_TriggerSchema: typeof TriggerSchema;
2776
- type index$3_WeekDay = WeekDay;
2777
- declare const index$3_WeekDay: typeof WeekDay;
2778
- declare namespace index$3 {
2779
- 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 };
2780
2773
  }
2781
2774
 
2782
- interface IAPI$1 {
2775
+ interface IAPI$2 {
2783
2776
  version: () => Promise<string>;
2784
2777
  }
2785
2778
 
@@ -2923,13 +2916,13 @@ declare const NoteSchema: z.ZodObject<{
2923
2916
  type Note = z.infer<typeof NoteSchema>;
2924
2917
  type NoteHistory = z.infer<typeof NoteHistorySchema>;
2925
2918
 
2926
- interface IAPI {
2919
+ interface IAPI$1 {
2927
2920
  list: (c: Context, userId: string) => Promise<Note[]>;
2928
2921
  add: (c: Context, note: Partial<Note>) => Promise<Note>;
2929
2922
  update: (c: Context, id: string, script: Partial<Note>) => Promise<Note>;
2930
2923
  delete: (c: Context, id: string) => Promise<boolean>;
2931
2924
  }
2932
- declare const Endpoints: {
2925
+ declare const Endpoints$1: {
2933
2926
  GetNotes: {
2934
2927
  uri: string;
2935
2928
  method: string;
@@ -2948,27 +2941,189 @@ declare const Endpoints: {
2948
2941
  };
2949
2942
  };
2950
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;
2951
3103
  declare const index$2_Endpoints: typeof Endpoints;
2952
3104
  type index$2_IAPI = IAPI;
2953
- type index$2_NoteHistory = NoteHistory;
2954
- declare const index$2_NoteHistorySchema: typeof NoteHistorySchema;
2955
- 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;
2956
3110
  declare namespace index$2 {
2957
- 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 };
2958
3112
  }
2959
3113
 
2960
3114
  declare class ShredAPI {
2961
- user: IAPI$8;
2962
- goal: IAPI$3;
2963
- subscription: IAPI$9;
2964
- prompt: IAPI$a;
2965
- pushNotification: IAPI$2;
2966
- email: IAPI$5;
2967
- tenant: IAPI$7;
2968
- app: IAPI$1;
2969
- project: IAPI$4;
2970
- track: IAPI$6;
2971
- 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;
2972
3127
  constructor(env: Environment);
2973
3128
  }
2974
3129
 
@@ -2997,15 +3152,6 @@ declare class ForbiddenException extends ShredException {
2997
3152
  constructor(message: string);
2998
3153
  }
2999
3154
 
3000
- declare const Exceptions: {
3001
- ConflictException: typeof ConflictException;
3002
- InvalidArgumentException: typeof InvalidArgumentException;
3003
- ResourceNotFoundException: typeof ResourceNotFoundException;
3004
- ShredException: typeof ShredException;
3005
- UnauthorizedException: typeof UnauthorizedException;
3006
- ForbiddenException: typeof ForbiddenException;
3007
- };
3008
-
3009
3155
  type index$1_ConflictException = ConflictException;
3010
3156
  declare const index$1_ConflictException: typeof ConflictException;
3011
3157
  type index$1_ForbiddenException = ForbiddenException;
@@ -3019,7 +3165,7 @@ declare const index$1_ShredException: typeof ShredException;
3019
3165
  type index$1_UnauthorizedException = UnauthorizedException;
3020
3166
  declare const index$1_UnauthorizedException: typeof UnauthorizedException;
3021
3167
  declare namespace index$1 {
3022
- 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 };
3023
3169
  }
3024
3170
 
3025
3171
  declare const AssetSchema: z.ZodObject<{
@@ -3069,4 +3215,4 @@ declare namespace index {
3069
3215
  export { index_AssetSchema as AssetSchema, type Asset as Entity };
3070
3216
  }
3071
3217
 
3072
- 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 };