shred-api-client 2.6.2-rc.4 → 2.6.3
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 +55 -162
- package/dist/index.js +32 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1540,154 +1540,7 @@ declare const ReportViewerUpdateSchema: z.ZodObject<{
|
|
|
1540
1540
|
userId: string;
|
|
1541
1541
|
action: Action;
|
|
1542
1542
|
}>;
|
|
1543
|
-
declare const TenantUpdateSchema: z.ZodObject<{
|
|
1544
|
-
preferences: z.ZodOptional<z.ZodObject<{
|
|
1545
|
-
iconUrl: z.ZodString;
|
|
1546
|
-
logoUrl: z.ZodString;
|
|
1547
|
-
primaryColor: z.ZodString;
|
|
1548
|
-
secondaryColor: z.ZodString;
|
|
1549
|
-
guidelinesUrl: z.ZodOptional<z.ZodString>;
|
|
1550
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1551
|
-
industry: z.ZodOptional<z.ZodString>;
|
|
1552
|
-
assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1553
|
-
assetId: z.ZodString;
|
|
1554
|
-
fileName: z.ZodString;
|
|
1555
|
-
extension: z.ZodString;
|
|
1556
|
-
fileSize: z.ZodNumber;
|
|
1557
|
-
assetUrl: z.ZodString;
|
|
1558
|
-
thumbnailUrl: z.ZodString;
|
|
1559
|
-
type: z.ZodString;
|
|
1560
|
-
duration: z.ZodOptional<z.ZodNumber>;
|
|
1561
|
-
progress: z.ZodOptional<z.ZodNumber>;
|
|
1562
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1563
|
-
authorId: z.ZodString;
|
|
1564
|
-
uploadedAt: z.ZodNumber;
|
|
1565
|
-
}, "strip", z.ZodTypeAny, {
|
|
1566
|
-
type: string;
|
|
1567
|
-
assetId: string;
|
|
1568
|
-
fileName: string;
|
|
1569
|
-
extension: string;
|
|
1570
|
-
fileSize: number;
|
|
1571
|
-
assetUrl: string;
|
|
1572
|
-
thumbnailUrl: string;
|
|
1573
|
-
authorId: string;
|
|
1574
|
-
uploadedAt: number;
|
|
1575
|
-
error?: string | undefined;
|
|
1576
|
-
duration?: number | undefined;
|
|
1577
|
-
progress?: number | undefined;
|
|
1578
|
-
}, {
|
|
1579
|
-
type: string;
|
|
1580
|
-
assetId: string;
|
|
1581
|
-
fileName: string;
|
|
1582
|
-
extension: string;
|
|
1583
|
-
fileSize: number;
|
|
1584
|
-
assetUrl: string;
|
|
1585
|
-
thumbnailUrl: string;
|
|
1586
|
-
authorId: string;
|
|
1587
|
-
uploadedAt: number;
|
|
1588
|
-
error?: string | undefined;
|
|
1589
|
-
duration?: number | undefined;
|
|
1590
|
-
progress?: number | undefined;
|
|
1591
|
-
}>, "many">>;
|
|
1592
|
-
}, "strip", z.ZodTypeAny, {
|
|
1593
|
-
iconUrl: string;
|
|
1594
|
-
logoUrl: string;
|
|
1595
|
-
primaryColor: string;
|
|
1596
|
-
secondaryColor: string;
|
|
1597
|
-
description?: string | undefined;
|
|
1598
|
-
guidelinesUrl?: string | undefined;
|
|
1599
|
-
industry?: string | undefined;
|
|
1600
|
-
assets?: {
|
|
1601
|
-
type: string;
|
|
1602
|
-
assetId: string;
|
|
1603
|
-
fileName: string;
|
|
1604
|
-
extension: string;
|
|
1605
|
-
fileSize: number;
|
|
1606
|
-
assetUrl: string;
|
|
1607
|
-
thumbnailUrl: string;
|
|
1608
|
-
authorId: string;
|
|
1609
|
-
uploadedAt: number;
|
|
1610
|
-
error?: string | undefined;
|
|
1611
|
-
duration?: number | undefined;
|
|
1612
|
-
progress?: number | undefined;
|
|
1613
|
-
}[] | undefined;
|
|
1614
|
-
}, {
|
|
1615
|
-
iconUrl: string;
|
|
1616
|
-
logoUrl: string;
|
|
1617
|
-
primaryColor: string;
|
|
1618
|
-
secondaryColor: string;
|
|
1619
|
-
description?: string | undefined;
|
|
1620
|
-
guidelinesUrl?: string | undefined;
|
|
1621
|
-
industry?: string | undefined;
|
|
1622
|
-
assets?: {
|
|
1623
|
-
type: string;
|
|
1624
|
-
assetId: string;
|
|
1625
|
-
fileName: string;
|
|
1626
|
-
extension: string;
|
|
1627
|
-
fileSize: number;
|
|
1628
|
-
assetUrl: string;
|
|
1629
|
-
thumbnailUrl: string;
|
|
1630
|
-
authorId: string;
|
|
1631
|
-
uploadedAt: number;
|
|
1632
|
-
error?: string | undefined;
|
|
1633
|
-
duration?: number | undefined;
|
|
1634
|
-
progress?: number | undefined;
|
|
1635
|
-
}[] | undefined;
|
|
1636
|
-
}>>;
|
|
1637
|
-
reportUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1638
|
-
}, "strip", z.ZodTypeAny, {
|
|
1639
|
-
preferences?: {
|
|
1640
|
-
iconUrl: string;
|
|
1641
|
-
logoUrl: string;
|
|
1642
|
-
primaryColor: string;
|
|
1643
|
-
secondaryColor: string;
|
|
1644
|
-
description?: string | undefined;
|
|
1645
|
-
guidelinesUrl?: string | undefined;
|
|
1646
|
-
industry?: string | undefined;
|
|
1647
|
-
assets?: {
|
|
1648
|
-
type: string;
|
|
1649
|
-
assetId: string;
|
|
1650
|
-
fileName: string;
|
|
1651
|
-
extension: string;
|
|
1652
|
-
fileSize: number;
|
|
1653
|
-
assetUrl: string;
|
|
1654
|
-
thumbnailUrl: string;
|
|
1655
|
-
authorId: string;
|
|
1656
|
-
uploadedAt: number;
|
|
1657
|
-
error?: string | undefined;
|
|
1658
|
-
duration?: number | undefined;
|
|
1659
|
-
progress?: number | undefined;
|
|
1660
|
-
}[] | undefined;
|
|
1661
|
-
} | undefined;
|
|
1662
|
-
reportUrl?: string | undefined;
|
|
1663
|
-
}, {
|
|
1664
|
-
preferences?: {
|
|
1665
|
-
iconUrl: string;
|
|
1666
|
-
logoUrl: string;
|
|
1667
|
-
primaryColor: string;
|
|
1668
|
-
secondaryColor: string;
|
|
1669
|
-
description?: string | undefined;
|
|
1670
|
-
guidelinesUrl?: string | undefined;
|
|
1671
|
-
industry?: string | undefined;
|
|
1672
|
-
assets?: {
|
|
1673
|
-
type: string;
|
|
1674
|
-
assetId: string;
|
|
1675
|
-
fileName: string;
|
|
1676
|
-
extension: string;
|
|
1677
|
-
fileSize: number;
|
|
1678
|
-
assetUrl: string;
|
|
1679
|
-
thumbnailUrl: string;
|
|
1680
|
-
authorId: string;
|
|
1681
|
-
uploadedAt: number;
|
|
1682
|
-
error?: string | undefined;
|
|
1683
|
-
duration?: number | undefined;
|
|
1684
|
-
progress?: number | undefined;
|
|
1685
|
-
}[] | undefined;
|
|
1686
|
-
} | undefined;
|
|
1687
|
-
reportUrl?: string | undefined;
|
|
1688
|
-
}>;
|
|
1689
1543
|
type ReportViewerUpdate = z.infer<typeof ReportViewerUpdateSchema>;
|
|
1690
|
-
type TenantUpdate = z.infer<typeof TenantUpdateSchema>;
|
|
1691
1544
|
type Tenant = z.infer<typeof TenantSchema>;
|
|
1692
1545
|
type Member = z.infer<typeof MemberSchema>;
|
|
1693
1546
|
type Preferences = z.infer<typeof PreferencesSchema>;
|
|
@@ -1698,7 +1551,7 @@ interface IAPI$9 {
|
|
|
1698
1551
|
list: (context: Context) => Promise<Tenant[]>;
|
|
1699
1552
|
getTenant: (context: Context, tenantId?: string) => Promise<Tenant | null>;
|
|
1700
1553
|
getMembers: (context: Context, tenantId: string) => Promise<Member[]>;
|
|
1701
|
-
update: (tenantId: string, data:
|
|
1554
|
+
update: (tenantId: string, data: Pick<Tenant, "preferences">, context: Context) => Promise<boolean>;
|
|
1702
1555
|
updateReportViewers: (tenantId: string, reportViewerUpdate: ReportViewerUpdate, context: Context) => Promise<boolean>;
|
|
1703
1556
|
}
|
|
1704
1557
|
declare const Endpoints$8: {
|
|
@@ -1745,10 +1598,8 @@ declare const index$a_PreferencesSchema: typeof PreferencesSchema;
|
|
|
1745
1598
|
type index$a_ReportViewerUpdate = ReportViewerUpdate;
|
|
1746
1599
|
declare const index$a_ReportViewerUpdateSchema: typeof ReportViewerUpdateSchema;
|
|
1747
1600
|
declare const index$a_TenantSchema: typeof TenantSchema;
|
|
1748
|
-
type index$a_TenantUpdate = TenantUpdate;
|
|
1749
|
-
declare const index$a_TenantUpdateSchema: typeof TenantUpdateSchema;
|
|
1750
1601
|
declare namespace index$a {
|
|
1751
|
-
export { index$a_Action as Action, Endpoints$8 as Endpoints, type Tenant as Entity, type IAPI$9 as IAPI, type index$a_Member as Member, index$a_MemberSchema as MemberSchema, type index$a_Preferences as Preferences, index$a_PreferencesSchema as PreferencesSchema, type index$a_ReportViewerUpdate as ReportViewerUpdate, index$a_ReportViewerUpdateSchema as ReportViewerUpdateSchema, index$a_TenantSchema as TenantSchema
|
|
1602
|
+
export { index$a_Action as Action, Endpoints$8 as Endpoints, type Tenant as Entity, type IAPI$9 as IAPI, type index$a_Member as Member, index$a_MemberSchema as MemberSchema, type index$a_Preferences as Preferences, index$a_PreferencesSchema as PreferencesSchema, type index$a_ReportViewerUpdate as ReportViewerUpdate, index$a_ReportViewerUpdateSchema as ReportViewerUpdateSchema, index$a_TenantSchema as TenantSchema };
|
|
1752
1603
|
}
|
|
1753
1604
|
|
|
1754
1605
|
declare const TrackParamSchema: z.ZodObject<{
|
|
@@ -1864,6 +1715,20 @@ type Style = {
|
|
|
1864
1715
|
value: CaptionStyle;
|
|
1865
1716
|
label: string;
|
|
1866
1717
|
};
|
|
1718
|
+
declare enum InteractionType {
|
|
1719
|
+
VIDEO_PLAYED = "video_played",
|
|
1720
|
+
DOWNLOADED = "downloaded"
|
|
1721
|
+
}
|
|
1722
|
+
declare const InteractionSchema: z.ZodObject<{
|
|
1723
|
+
type: z.ZodNativeEnum<typeof InteractionType>;
|
|
1724
|
+
timestamp: z.ZodNumber;
|
|
1725
|
+
}, "strip", z.ZodTypeAny, {
|
|
1726
|
+
type: InteractionType;
|
|
1727
|
+
timestamp: number;
|
|
1728
|
+
}, {
|
|
1729
|
+
type: InteractionType;
|
|
1730
|
+
timestamp: number;
|
|
1731
|
+
}>;
|
|
1867
1732
|
declare const TimelineItemSchema: z.ZodObject<{
|
|
1868
1733
|
status: z.ZodNativeEnum<typeof Status$1>;
|
|
1869
1734
|
title: z.ZodString;
|
|
@@ -1927,7 +1792,7 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1927
1792
|
finalVideoId: z.ZodOptional<z.ZodString>;
|
|
1928
1793
|
thumbnailUrl: z.ZodOptional<z.ZodString>;
|
|
1929
1794
|
modified: z.ZodNumber;
|
|
1930
|
-
feedback: z.ZodOptional<z.ZodObject<{
|
|
1795
|
+
feedback: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1931
1796
|
criteria: z.ZodArray<z.ZodObject<{
|
|
1932
1797
|
id: z.ZodString;
|
|
1933
1798
|
label: z.ZodString;
|
|
@@ -1961,7 +1826,7 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1961
1826
|
comment?: string | undefined;
|
|
1962
1827
|
}[];
|
|
1963
1828
|
comment?: string | undefined;
|
|
1964
|
-
}
|
|
1829
|
+
}>>>;
|
|
1965
1830
|
captionSuggestion: z.ZodOptional<z.ZodString>;
|
|
1966
1831
|
editorId: z.ZodOptional<z.ZodString>;
|
|
1967
1832
|
userId: z.ZodString;
|
|
@@ -2026,6 +1891,16 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
2026
1891
|
description: string;
|
|
2027
1892
|
timestamp: number;
|
|
2028
1893
|
}>, "many">;
|
|
1894
|
+
interactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1895
|
+
type: z.ZodNativeEnum<typeof InteractionType>;
|
|
1896
|
+
timestamp: z.ZodNumber;
|
|
1897
|
+
}, "strip", z.ZodTypeAny, {
|
|
1898
|
+
type: InteractionType;
|
|
1899
|
+
timestamp: number;
|
|
1900
|
+
}, {
|
|
1901
|
+
type: InteractionType;
|
|
1902
|
+
timestamp: number;
|
|
1903
|
+
}>, "many">>;
|
|
2029
1904
|
submitTimestamp: z.ZodNumber;
|
|
2030
1905
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
2031
1906
|
status: z.ZodNativeEnum<typeof Status$1>;
|
|
@@ -2073,9 +1948,13 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
2073
1948
|
comment?: string | undefined;
|
|
2074
1949
|
}[];
|
|
2075
1950
|
comment?: string | undefined;
|
|
2076
|
-
} | undefined;
|
|
1951
|
+
} | null | undefined;
|
|
2077
1952
|
captionSuggestion?: string | undefined;
|
|
2078
1953
|
isFree?: boolean | undefined;
|
|
1954
|
+
interactions?: {
|
|
1955
|
+
type: InteractionType;
|
|
1956
|
+
timestamp: number;
|
|
1957
|
+
}[] | undefined;
|
|
2079
1958
|
}, {
|
|
2080
1959
|
id: string;
|
|
2081
1960
|
userId: string;
|
|
@@ -2120,9 +1999,13 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
2120
1999
|
comment?: string | undefined;
|
|
2121
2000
|
}[];
|
|
2122
2001
|
comment?: string | undefined;
|
|
2123
|
-
} | undefined;
|
|
2002
|
+
} | null | undefined;
|
|
2124
2003
|
captionSuggestion?: string | undefined;
|
|
2125
2004
|
isFree?: boolean | undefined;
|
|
2005
|
+
interactions?: {
|
|
2006
|
+
type: InteractionType;
|
|
2007
|
+
timestamp: number;
|
|
2008
|
+
}[] | undefined;
|
|
2126
2009
|
}>;
|
|
2127
2010
|
type ProjectCreation = Pick<Project, "title" | "instructions" | "captionStyle" | "assets">;
|
|
2128
2011
|
type SendToApproval = {
|
|
@@ -2133,10 +2016,11 @@ type SendToApproval = {
|
|
|
2133
2016
|
type Approve = {
|
|
2134
2017
|
scheduleTime?: number;
|
|
2135
2018
|
captionSuggestion: string;
|
|
2136
|
-
feedback?: Feedback;
|
|
2019
|
+
feedback?: Feedback | null;
|
|
2137
2020
|
};
|
|
2138
2021
|
type Project = z.infer<typeof ProjectSchema>;
|
|
2139
2022
|
type TimelineItem = z.infer<typeof TimelineItemSchema>;
|
|
2023
|
+
type Interaction = z.infer<typeof InteractionSchema>;
|
|
2140
2024
|
type Feedback = z.infer<typeof FeedbackSchema>;
|
|
2141
2025
|
|
|
2142
2026
|
interface IAPI$6 {
|
|
@@ -2155,6 +2039,7 @@ interface IAPI$6 {
|
|
|
2155
2039
|
rollback: (context: Context, projectId: string) => Promise<boolean>;
|
|
2156
2040
|
getNext: (context: Context, userId: string) => Promise<Project | null>;
|
|
2157
2041
|
getUserHistory: (context: Context, userId: string) => Promise<APIResponse<Project>>;
|
|
2042
|
+
interact: (context: Context, projectId: string, type: InteractionType) => Promise<boolean>;
|
|
2158
2043
|
getPoolSize(context: Context): Promise<number>;
|
|
2159
2044
|
permissions: {
|
|
2160
2045
|
isEligibleForFreeProject(context: Context): Promise<boolean>;
|
|
@@ -2233,6 +2118,10 @@ declare const Endpoints$5: {
|
|
|
2233
2118
|
uri: string;
|
|
2234
2119
|
method: string;
|
|
2235
2120
|
};
|
|
2121
|
+
Interact: {
|
|
2122
|
+
uri: string;
|
|
2123
|
+
method: string;
|
|
2124
|
+
};
|
|
2236
2125
|
};
|
|
2237
2126
|
|
|
2238
2127
|
type StatusConfigType = {
|
|
@@ -2272,6 +2161,10 @@ type index$7_CaptionStyle = CaptionStyle;
|
|
|
2272
2161
|
declare const index$7_CaptionStyle: typeof CaptionStyle;
|
|
2273
2162
|
type index$7_Feedback = Feedback;
|
|
2274
2163
|
declare const index$7_FeedbackSchema: typeof FeedbackSchema;
|
|
2164
|
+
type index$7_Interaction = Interaction;
|
|
2165
|
+
declare const index$7_InteractionSchema: typeof InteractionSchema;
|
|
2166
|
+
type index$7_InteractionType = InteractionType;
|
|
2167
|
+
declare const index$7_InteractionType: typeof InteractionType;
|
|
2275
2168
|
type index$7_ProjectCreation = ProjectCreation;
|
|
2276
2169
|
declare const index$7_ProjectSchema: typeof ProjectSchema;
|
|
2277
2170
|
type index$7_SendToApproval = SendToApproval;
|
|
@@ -2282,7 +2175,7 @@ declare const index$7_Styles: typeof Styles;
|
|
|
2282
2175
|
type index$7_TimelineItem = TimelineItem;
|
|
2283
2176
|
declare const index$7_TimelineItemSchema: typeof TimelineItemSchema;
|
|
2284
2177
|
declare namespace index$7 {
|
|
2285
|
-
export { type index$7_Approve as Approve, index$7_CaptionStyle as CaptionStyle, Endpoints$5 as Endpoints, type Project as Entity, type index$7_Feedback as Feedback, index$7_FeedbackSchema as FeedbackSchema, type IAPI$6 as IAPI, type index$7_ProjectCreation as ProjectCreation, index$7_ProjectSchema as ProjectSchema, type index$7_SendToApproval as SendToApproval, Status$1 as Status, index$7_StatusConfig as StatusConfig, type index$7_StatusConfigType as StatusConfigType, type index$7_Style as Style, index$7_Styles as Styles, type index$7_TimelineItem as TimelineItem, index$7_TimelineItemSchema as TimelineItemSchema };
|
|
2178
|
+
export { type index$7_Approve as Approve, index$7_CaptionStyle as CaptionStyle, Endpoints$5 as Endpoints, type Project as Entity, type index$7_Feedback as Feedback, index$7_FeedbackSchema as FeedbackSchema, type IAPI$6 as IAPI, type index$7_Interaction as Interaction, index$7_InteractionSchema as InteractionSchema, index$7_InteractionType as InteractionType, type index$7_ProjectCreation as ProjectCreation, index$7_ProjectSchema as ProjectSchema, type index$7_SendToApproval as SendToApproval, Status$1 as Status, index$7_StatusConfig as StatusConfig, type index$7_StatusConfigType as StatusConfigType, type index$7_Style as Style, index$7_Styles as Styles, type index$7_TimelineItem as TimelineItem, index$7_TimelineItemSchema as TimelineItemSchema };
|
|
2286
2179
|
}
|
|
2287
2180
|
|
|
2288
2181
|
declare const DailyMilestoneSchema: z.ZodObject<{
|
|
@@ -2479,7 +2372,7 @@ declare const NotificationItemSchema: z.ZodObject<{
|
|
|
2479
2372
|
status: z.ZodEnum<["failed", "delivered", "deleted"]>;
|
|
2480
2373
|
deliveredAt: z.ZodNumber;
|
|
2481
2374
|
openedAt: z.ZodOptional<z.ZodNumber>;
|
|
2482
|
-
deletedAt: z.ZodOptional<z.
|
|
2375
|
+
deletedAt: z.ZodOptional<z.ZodNumber>;
|
|
2483
2376
|
cta: z.ZodOptional<z.ZodObject<{
|
|
2484
2377
|
label: z.ZodString;
|
|
2485
2378
|
url: z.ZodString;
|
|
@@ -2503,7 +2396,7 @@ declare const NotificationItemSchema: z.ZodObject<{
|
|
|
2503
2396
|
triggerId?: string | undefined;
|
|
2504
2397
|
type?: NotificationType | undefined;
|
|
2505
2398
|
openedAt?: number | undefined;
|
|
2506
|
-
deletedAt?: number |
|
|
2399
|
+
deletedAt?: number | undefined;
|
|
2507
2400
|
cta?: {
|
|
2508
2401
|
label: string;
|
|
2509
2402
|
url: string;
|
|
@@ -2520,7 +2413,7 @@ declare const NotificationItemSchema: z.ZodObject<{
|
|
|
2520
2413
|
triggerId?: string | undefined;
|
|
2521
2414
|
type?: NotificationType | undefined;
|
|
2522
2415
|
openedAt?: number | undefined;
|
|
2523
|
-
deletedAt?: number |
|
|
2416
|
+
deletedAt?: number | undefined;
|
|
2524
2417
|
cta?: {
|
|
2525
2418
|
label: string;
|
|
2526
2419
|
url: string;
|
|
@@ -2537,7 +2430,7 @@ declare const NotificationDetailSchema: z.ZodObject<Pick<{
|
|
|
2537
2430
|
status: z.ZodEnum<["failed", "delivered", "deleted"]>;
|
|
2538
2431
|
deliveredAt: z.ZodNumber;
|
|
2539
2432
|
openedAt: z.ZodOptional<z.ZodNumber>;
|
|
2540
|
-
deletedAt: z.ZodOptional<z.
|
|
2433
|
+
deletedAt: z.ZodOptional<z.ZodNumber>;
|
|
2541
2434
|
cta: z.ZodOptional<z.ZodObject<{
|
|
2542
2435
|
label: z.ZodString;
|
|
2543
2436
|
url: z.ZodString;
|
|
@@ -2678,7 +2571,7 @@ declare const TriggerSchema: z.ZodObject<{
|
|
|
2678
2571
|
status: z.ZodEnum<["failed", "delivered", "deleted"]>;
|
|
2679
2572
|
deliveredAt: z.ZodNumber;
|
|
2680
2573
|
openedAt: z.ZodOptional<z.ZodNumber>;
|
|
2681
|
-
deletedAt: z.ZodOptional<z.
|
|
2574
|
+
deletedAt: z.ZodOptional<z.ZodNumber>;
|
|
2682
2575
|
cta: z.ZodOptional<z.ZodObject<{
|
|
2683
2576
|
label: z.ZodString;
|
|
2684
2577
|
url: z.ZodString;
|
package/dist/index.js
CHANGED
|
@@ -4292,7 +4292,7 @@ var NotificationItemSchema = external_exports.object({
|
|
|
4292
4292
|
status: external_exports.enum(["failed", "delivered", "deleted"]),
|
|
4293
4293
|
deliveredAt: external_exports.number(),
|
|
4294
4294
|
openedAt: external_exports.number().optional(),
|
|
4295
|
-
deletedAt: external_exports.number().
|
|
4295
|
+
deletedAt: external_exports.number().optional(),
|
|
4296
4296
|
cta: external_exports.object({ label: external_exports.string(), url: external_exports.string().url() }).optional(),
|
|
4297
4297
|
metadata: external_exports.record(external_exports.string(), external_exports.union([external_exports.string(), external_exports.number()])),
|
|
4298
4298
|
error: external_exports.string().optional()
|
|
@@ -4775,7 +4775,8 @@ var TenantAPI = class {
|
|
|
4775
4775
|
}
|
|
4776
4776
|
async updateReportViewers(tenantId, reportViewerUpdate, context) {
|
|
4777
4777
|
const endpointInfo = tenant_exports.Endpoints.UpdateReportViewers;
|
|
4778
|
-
const
|
|
4778
|
+
const endpointData = tenant_exports.Endpoints.UpdateReportViewers;
|
|
4779
|
+
const endpoint = endpointData.uri.replace(":tenantId", tenantId);
|
|
4779
4780
|
const data = await this.clientHTTP.makeRequest(
|
|
4780
4781
|
this.env,
|
|
4781
4782
|
`${endpoint}`,
|
|
@@ -5051,6 +5052,8 @@ __export(project_exports, {
|
|
|
5051
5052
|
CaptionStyle: () => CaptionStyle,
|
|
5052
5053
|
Endpoints: () => Endpoints3,
|
|
5053
5054
|
FeedbackSchema: () => FeedbackSchema,
|
|
5055
|
+
InteractionSchema: () => InteractionSchema,
|
|
5056
|
+
InteractionType: () => InteractionType,
|
|
5054
5057
|
ProjectSchema: () => ProjectSchema,
|
|
5055
5058
|
Status: () => Status2,
|
|
5056
5059
|
StatusConfig: () => StatusConfig,
|
|
@@ -5109,6 +5112,15 @@ var Styles = [
|
|
|
5109
5112
|
{ value: 3 /* TWO_LINES_EMOJIS */, label: "Two Lines + Emojis" },
|
|
5110
5113
|
{ value: 4 /* HOME_HIGHLIGHT */, label: "Home Tour" }
|
|
5111
5114
|
];
|
|
5115
|
+
var InteractionType = /* @__PURE__ */ ((InteractionType2) => {
|
|
5116
|
+
InteractionType2["VIDEO_PLAYED"] = "video_played";
|
|
5117
|
+
InteractionType2["DOWNLOADED"] = "downloaded";
|
|
5118
|
+
return InteractionType2;
|
|
5119
|
+
})(InteractionType || {});
|
|
5120
|
+
var InteractionSchema = external_exports.object({
|
|
5121
|
+
type: external_exports.nativeEnum(InteractionType),
|
|
5122
|
+
timestamp: external_exports.number()
|
|
5123
|
+
});
|
|
5112
5124
|
var TimelineItemSchema = external_exports.object({
|
|
5113
5125
|
status: external_exports.nativeEnum(Status2),
|
|
5114
5126
|
title: external_exports.string(),
|
|
@@ -5136,7 +5148,7 @@ var ProjectSchema = external_exports.object({
|
|
|
5136
5148
|
finalVideoId: external_exports.string().optional(),
|
|
5137
5149
|
thumbnailUrl: external_exports.string().optional(),
|
|
5138
5150
|
modified: external_exports.number(),
|
|
5139
|
-
feedback: FeedbackSchema.optional(),
|
|
5151
|
+
feedback: FeedbackSchema.nullable().optional(),
|
|
5140
5152
|
captionSuggestion: external_exports.string().optional(),
|
|
5141
5153
|
editorId: external_exports.string().optional(),
|
|
5142
5154
|
userId: external_exports.string(),
|
|
@@ -5144,6 +5156,7 @@ var ProjectSchema = external_exports.object({
|
|
|
5144
5156
|
expirationTimestamp: external_exports.number(),
|
|
5145
5157
|
isFree: external_exports.boolean().optional(),
|
|
5146
5158
|
timeline: external_exports.array(TimelineItemSchema),
|
|
5159
|
+
interactions: external_exports.array(InteractionSchema).optional(),
|
|
5147
5160
|
submitTimestamp: external_exports.number(),
|
|
5148
5161
|
tenantId: external_exports.string().optional(),
|
|
5149
5162
|
status: external_exports.nativeEnum(Status2)
|
|
@@ -5174,7 +5187,8 @@ var Endpoints3 = {
|
|
|
5174
5187
|
Deny: { uri: "/projects/:projectId/deny/", method: "POST" },
|
|
5175
5188
|
Assign: { uri: "/projects/:projectId/assign/", method: "POST" },
|
|
5176
5189
|
GetUserHistory: { uri: "/projects/user/:userId/history/", method: "GET" },
|
|
5177
|
-
GetPoolSize: { uri: "/projects/pool/size/", method: "GET" }
|
|
5190
|
+
GetPoolSize: { uri: "/projects/pool/size/", method: "GET" },
|
|
5191
|
+
Interact: { uri: "/projects/:projectId/interactions/", method: "POST" }
|
|
5178
5192
|
};
|
|
5179
5193
|
|
|
5180
5194
|
// src/model/project/StatusConfig.ts
|
|
@@ -5569,6 +5583,18 @@ var ProjectAPI = class {
|
|
|
5569
5583
|
);
|
|
5570
5584
|
return data.success;
|
|
5571
5585
|
}
|
|
5586
|
+
async interact(ctx, projectId, type) {
|
|
5587
|
+
const endpointData = Endpoints3.Interact;
|
|
5588
|
+
const endpoint = endpointData.uri.replace(":projectId", projectId);
|
|
5589
|
+
const data = await this.clientHTTP.makeRequest(
|
|
5590
|
+
this.env,
|
|
5591
|
+
endpoint,
|
|
5592
|
+
endpointData.method,
|
|
5593
|
+
{ type },
|
|
5594
|
+
ctx
|
|
5595
|
+
);
|
|
5596
|
+
return data.success;
|
|
5597
|
+
}
|
|
5572
5598
|
async start(context) {
|
|
5573
5599
|
const endpointData = Endpoints3.StartEdition;
|
|
5574
5600
|
const data = await this.clientHTTP.makeRequest(
|
|
@@ -6075,8 +6101,7 @@ __export(tenant_exports, {
|
|
|
6075
6101
|
MemberSchema: () => MemberSchema,
|
|
6076
6102
|
PreferencesSchema: () => PreferencesSchema,
|
|
6077
6103
|
ReportViewerUpdateSchema: () => ReportViewerUpdateSchema,
|
|
6078
|
-
TenantSchema: () => TenantSchema
|
|
6079
|
-
TenantUpdateSchema: () => TenantUpdateSchema
|
|
6104
|
+
TenantSchema: () => TenantSchema
|
|
6080
6105
|
});
|
|
6081
6106
|
|
|
6082
6107
|
// src/model/subscription/Subscription.schema.ts
|
|
@@ -6173,7 +6198,7 @@ var TenantSchema = external_exports.object({
|
|
|
6173
6198
|
subscription: external_exports.optional(external_exports.lazy(() => SubscriptionSchema)),
|
|
6174
6199
|
totalSubscriptions: external_exports.number().optional(),
|
|
6175
6200
|
totalUsers: external_exports.number().optional(),
|
|
6176
|
-
reportUrl: external_exports.string().
|
|
6201
|
+
reportUrl: external_exports.string().optional(),
|
|
6177
6202
|
reportViewers: external_exports.array(external_exports.string()).optional()
|
|
6178
6203
|
});
|
|
6179
6204
|
var MemberSchema = external_exports.object({
|
|
@@ -6191,10 +6216,6 @@ var ReportViewerUpdateSchema = external_exports.object({
|
|
|
6191
6216
|
userId: external_exports.string(),
|
|
6192
6217
|
action: external_exports.nativeEnum(Action)
|
|
6193
6218
|
});
|
|
6194
|
-
var TenantUpdateSchema = TenantSchema.pick({
|
|
6195
|
-
reportUrl: true,
|
|
6196
|
-
preferences: true
|
|
6197
|
-
}).partial();
|
|
6198
6219
|
|
|
6199
6220
|
// src/model/tenant/Tenant.api.ts
|
|
6200
6221
|
var Endpoints10 = {
|