shred-api-client 2.1.2 → 2.1.4

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.mts CHANGED
@@ -525,6 +525,7 @@ type Product = z.infer<typeof ProductSchema>;
525
525
 
526
526
  interface IAPI$9 {
527
527
  getCharges: (ctx: Context) => Promise<Charge[]>;
528
+ getPortalUrl: (ctx: Context) => Promise<string>;
528
529
  getSubscription: (context: Context, userId?: string) => Promise<Subscription | null>;
529
530
  getProduct: (id: string, context?: Context) => Promise<Product>;
530
531
  getProducts: (ctx?: Context) => Promise<Product[]>;
@@ -535,6 +536,10 @@ interface IAPI$9 {
535
536
  createCheckout: (planId: string | null, ctx: Context) => Promise<string>;
536
537
  }
537
538
  declare const Endpoints$8: {
539
+ GetPortal: {
540
+ uri: string;
541
+ method: string;
542
+ };
538
543
  GetProduct: {
539
544
  uri: string;
540
545
  method: string;
@@ -1359,6 +1364,41 @@ declare const TimelineItemSchema: z.ZodObject<{
1359
1364
  description: string;
1360
1365
  timestamp: number;
1361
1366
  }>;
1367
+ declare const FeedbackSchema: z.ZodObject<{
1368
+ criteria: z.ZodArray<z.ZodObject<{
1369
+ id: z.ZodString;
1370
+ label: z.ZodString;
1371
+ score: z.ZodNumber;
1372
+ comment: z.ZodOptional<z.ZodString>;
1373
+ }, "strip", z.ZodTypeAny, {
1374
+ id: string;
1375
+ label: string;
1376
+ score: number;
1377
+ comment?: string | undefined;
1378
+ }, {
1379
+ id: string;
1380
+ label: string;
1381
+ score: number;
1382
+ comment?: string | undefined;
1383
+ }>, "many">;
1384
+ comment: z.ZodOptional<z.ZodString>;
1385
+ }, "strip", z.ZodTypeAny, {
1386
+ criteria: {
1387
+ id: string;
1388
+ label: string;
1389
+ score: number;
1390
+ comment?: string | undefined;
1391
+ }[];
1392
+ comment?: string | undefined;
1393
+ }, {
1394
+ criteria: {
1395
+ id: string;
1396
+ label: string;
1397
+ score: number;
1398
+ comment?: string | undefined;
1399
+ }[];
1400
+ comment?: string | undefined;
1401
+ }>;
1362
1402
  declare const ProjectSchema: z.ZodObject<{
1363
1403
  id: z.ZodString;
1364
1404
  title: z.ZodString;
@@ -1371,6 +1411,41 @@ declare const ProjectSchema: z.ZodObject<{
1371
1411
  captionSuggestion: z.ZodOptional<z.ZodString>;
1372
1412
  editorId: z.ZodOptional<z.ZodString>;
1373
1413
  userId: z.ZodString;
1414
+ feedback: z.ZodOptional<z.ZodObject<{
1415
+ criteria: z.ZodArray<z.ZodObject<{
1416
+ id: z.ZodString;
1417
+ label: z.ZodString;
1418
+ score: z.ZodNumber;
1419
+ comment: z.ZodOptional<z.ZodString>;
1420
+ }, "strip", z.ZodTypeAny, {
1421
+ id: string;
1422
+ label: string;
1423
+ score: number;
1424
+ comment?: string | undefined;
1425
+ }, {
1426
+ id: string;
1427
+ label: string;
1428
+ score: number;
1429
+ comment?: string | undefined;
1430
+ }>, "many">;
1431
+ comment: z.ZodOptional<z.ZodString>;
1432
+ }, "strip", z.ZodTypeAny, {
1433
+ criteria: {
1434
+ id: string;
1435
+ label: string;
1436
+ score: number;
1437
+ comment?: string | undefined;
1438
+ }[];
1439
+ comment?: string | undefined;
1440
+ }, {
1441
+ criteria: {
1442
+ id: string;
1443
+ label: string;
1444
+ score: number;
1445
+ comment?: string | undefined;
1446
+ }[];
1447
+ comment?: string | undefined;
1448
+ }>>;
1374
1449
  assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1375
1450
  assetId: z.ZodString;
1376
1451
  fileName: z.ZodString;
@@ -1458,6 +1533,15 @@ declare const ProjectSchema: z.ZodObject<{
1458
1533
  thumbnailUrl?: string | undefined;
1459
1534
  finalVideoId?: string | undefined;
1460
1535
  captionSuggestion?: string | undefined;
1536
+ feedback?: {
1537
+ criteria: {
1538
+ id: string;
1539
+ label: string;
1540
+ score: number;
1541
+ comment?: string | undefined;
1542
+ }[];
1543
+ comment?: string | undefined;
1544
+ } | undefined;
1461
1545
  assets?: {
1462
1546
  type: string;
1463
1547
  assetId: string;
@@ -1496,6 +1580,15 @@ declare const ProjectSchema: z.ZodObject<{
1496
1580
  thumbnailUrl?: string | undefined;
1497
1581
  finalVideoId?: string | undefined;
1498
1582
  captionSuggestion?: string | undefined;
1583
+ feedback?: {
1584
+ criteria: {
1585
+ id: string;
1586
+ label: string;
1587
+ score: number;
1588
+ comment?: string | undefined;
1589
+ }[];
1590
+ comment?: string | undefined;
1591
+ } | undefined;
1499
1592
  assets?: {
1500
1593
  type: string;
1501
1594
  assetId: string;
@@ -1524,6 +1617,7 @@ type Approve = {
1524
1617
  };
1525
1618
  type Project = z.infer<typeof ProjectSchema>;
1526
1619
  type TimelineItem = z.infer<typeof TimelineItemSchema>;
1620
+ type Feedback = z.infer<typeof FeedbackSchema>;
1527
1621
 
1528
1622
  interface IAPI$4 {
1529
1623
  reorder: (context: Context, projectId: string, position: number) => Promise<boolean>;
@@ -1619,6 +1713,8 @@ declare const Endpoints$3: {
1619
1713
  type index$5_Approve = Approve;
1620
1714
  type index$5_CaptionStyle = CaptionStyle;
1621
1715
  declare const index$5_CaptionStyle: typeof CaptionStyle;
1716
+ type index$5_Feedback = Feedback;
1717
+ declare const index$5_FeedbackSchema: typeof FeedbackSchema;
1622
1718
  type index$5_ProjectCreation = ProjectCreation;
1623
1719
  declare const index$5_ProjectSchema: typeof ProjectSchema;
1624
1720
  type index$5_SendToApproval = SendToApproval;
@@ -1627,7 +1723,7 @@ declare const index$5_Styles: typeof Styles;
1627
1723
  type index$5_TimelineItem = TimelineItem;
1628
1724
  declare const index$5_TimelineItemSchema: typeof TimelineItemSchema;
1629
1725
  declare namespace index$5 {
1630
- export { type index$5_Approve as Approve, index$5_CaptionStyle as CaptionStyle, Endpoints$3 as Endpoints, type Project as Entity, 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, type index$5_Style as Style, index$5_Styles as Styles, type index$5_TimelineItem as TimelineItem, index$5_TimelineItemSchema as TimelineItemSchema };
1726
+ 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, type index$5_Style as Style, index$5_Styles as Styles, type index$5_TimelineItem as TimelineItem, index$5_TimelineItemSchema as TimelineItemSchema };
1631
1727
  }
1632
1728
 
1633
1729
  declare const DailyMilestoneSchema: z.ZodObject<{
package/dist/index.d.ts CHANGED
@@ -525,6 +525,7 @@ type Product = z.infer<typeof ProductSchema>;
525
525
 
526
526
  interface IAPI$9 {
527
527
  getCharges: (ctx: Context) => Promise<Charge[]>;
528
+ getPortalUrl: (ctx: Context) => Promise<string>;
528
529
  getSubscription: (context: Context, userId?: string) => Promise<Subscription | null>;
529
530
  getProduct: (id: string, context?: Context) => Promise<Product>;
530
531
  getProducts: (ctx?: Context) => Promise<Product[]>;
@@ -535,6 +536,10 @@ interface IAPI$9 {
535
536
  createCheckout: (planId: string | null, ctx: Context) => Promise<string>;
536
537
  }
537
538
  declare const Endpoints$8: {
539
+ GetPortal: {
540
+ uri: string;
541
+ method: string;
542
+ };
538
543
  GetProduct: {
539
544
  uri: string;
540
545
  method: string;
@@ -1359,6 +1364,41 @@ declare const TimelineItemSchema: z.ZodObject<{
1359
1364
  description: string;
1360
1365
  timestamp: number;
1361
1366
  }>;
1367
+ declare const FeedbackSchema: z.ZodObject<{
1368
+ criteria: z.ZodArray<z.ZodObject<{
1369
+ id: z.ZodString;
1370
+ label: z.ZodString;
1371
+ score: z.ZodNumber;
1372
+ comment: z.ZodOptional<z.ZodString>;
1373
+ }, "strip", z.ZodTypeAny, {
1374
+ id: string;
1375
+ label: string;
1376
+ score: number;
1377
+ comment?: string | undefined;
1378
+ }, {
1379
+ id: string;
1380
+ label: string;
1381
+ score: number;
1382
+ comment?: string | undefined;
1383
+ }>, "many">;
1384
+ comment: z.ZodOptional<z.ZodString>;
1385
+ }, "strip", z.ZodTypeAny, {
1386
+ criteria: {
1387
+ id: string;
1388
+ label: string;
1389
+ score: number;
1390
+ comment?: string | undefined;
1391
+ }[];
1392
+ comment?: string | undefined;
1393
+ }, {
1394
+ criteria: {
1395
+ id: string;
1396
+ label: string;
1397
+ score: number;
1398
+ comment?: string | undefined;
1399
+ }[];
1400
+ comment?: string | undefined;
1401
+ }>;
1362
1402
  declare const ProjectSchema: z.ZodObject<{
1363
1403
  id: z.ZodString;
1364
1404
  title: z.ZodString;
@@ -1371,6 +1411,41 @@ declare const ProjectSchema: z.ZodObject<{
1371
1411
  captionSuggestion: z.ZodOptional<z.ZodString>;
1372
1412
  editorId: z.ZodOptional<z.ZodString>;
1373
1413
  userId: z.ZodString;
1414
+ feedback: z.ZodOptional<z.ZodObject<{
1415
+ criteria: z.ZodArray<z.ZodObject<{
1416
+ id: z.ZodString;
1417
+ label: z.ZodString;
1418
+ score: z.ZodNumber;
1419
+ comment: z.ZodOptional<z.ZodString>;
1420
+ }, "strip", z.ZodTypeAny, {
1421
+ id: string;
1422
+ label: string;
1423
+ score: number;
1424
+ comment?: string | undefined;
1425
+ }, {
1426
+ id: string;
1427
+ label: string;
1428
+ score: number;
1429
+ comment?: string | undefined;
1430
+ }>, "many">;
1431
+ comment: z.ZodOptional<z.ZodString>;
1432
+ }, "strip", z.ZodTypeAny, {
1433
+ criteria: {
1434
+ id: string;
1435
+ label: string;
1436
+ score: number;
1437
+ comment?: string | undefined;
1438
+ }[];
1439
+ comment?: string | undefined;
1440
+ }, {
1441
+ criteria: {
1442
+ id: string;
1443
+ label: string;
1444
+ score: number;
1445
+ comment?: string | undefined;
1446
+ }[];
1447
+ comment?: string | undefined;
1448
+ }>>;
1374
1449
  assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1375
1450
  assetId: z.ZodString;
1376
1451
  fileName: z.ZodString;
@@ -1458,6 +1533,15 @@ declare const ProjectSchema: z.ZodObject<{
1458
1533
  thumbnailUrl?: string | undefined;
1459
1534
  finalVideoId?: string | undefined;
1460
1535
  captionSuggestion?: string | undefined;
1536
+ feedback?: {
1537
+ criteria: {
1538
+ id: string;
1539
+ label: string;
1540
+ score: number;
1541
+ comment?: string | undefined;
1542
+ }[];
1543
+ comment?: string | undefined;
1544
+ } | undefined;
1461
1545
  assets?: {
1462
1546
  type: string;
1463
1547
  assetId: string;
@@ -1496,6 +1580,15 @@ declare const ProjectSchema: z.ZodObject<{
1496
1580
  thumbnailUrl?: string | undefined;
1497
1581
  finalVideoId?: string | undefined;
1498
1582
  captionSuggestion?: string | undefined;
1583
+ feedback?: {
1584
+ criteria: {
1585
+ id: string;
1586
+ label: string;
1587
+ score: number;
1588
+ comment?: string | undefined;
1589
+ }[];
1590
+ comment?: string | undefined;
1591
+ } | undefined;
1499
1592
  assets?: {
1500
1593
  type: string;
1501
1594
  assetId: string;
@@ -1524,6 +1617,7 @@ type Approve = {
1524
1617
  };
1525
1618
  type Project = z.infer<typeof ProjectSchema>;
1526
1619
  type TimelineItem = z.infer<typeof TimelineItemSchema>;
1620
+ type Feedback = z.infer<typeof FeedbackSchema>;
1527
1621
 
1528
1622
  interface IAPI$4 {
1529
1623
  reorder: (context: Context, projectId: string, position: number) => Promise<boolean>;
@@ -1619,6 +1713,8 @@ declare const Endpoints$3: {
1619
1713
  type index$5_Approve = Approve;
1620
1714
  type index$5_CaptionStyle = CaptionStyle;
1621
1715
  declare const index$5_CaptionStyle: typeof CaptionStyle;
1716
+ type index$5_Feedback = Feedback;
1717
+ declare const index$5_FeedbackSchema: typeof FeedbackSchema;
1622
1718
  type index$5_ProjectCreation = ProjectCreation;
1623
1719
  declare const index$5_ProjectSchema: typeof ProjectSchema;
1624
1720
  type index$5_SendToApproval = SendToApproval;
@@ -1627,7 +1723,7 @@ declare const index$5_Styles: typeof Styles;
1627
1723
  type index$5_TimelineItem = TimelineItem;
1628
1724
  declare const index$5_TimelineItemSchema: typeof TimelineItemSchema;
1629
1725
  declare namespace index$5 {
1630
- export { type index$5_Approve as Approve, index$5_CaptionStyle as CaptionStyle, Endpoints$3 as Endpoints, type Project as Entity, 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, type index$5_Style as Style, index$5_Styles as Styles, type index$5_TimelineItem as TimelineItem, index$5_TimelineItemSchema as TimelineItemSchema };
1726
+ 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, type index$5_Style as Style, index$5_Styles as Styles, type index$5_TimelineItem as TimelineItem, index$5_TimelineItemSchema as TimelineItemSchema };
1631
1727
  }
1632
1728
 
1633
1729
  declare const DailyMilestoneSchema: z.ZodObject<{
package/dist/index.js CHANGED
@@ -421,6 +421,17 @@ var SubscriptionAPI = class {
421
421
  this.env = env;
422
422
  this.clientHTTP = new HTTPClient();
423
423
  }
424
+ async getPortalUrl(ctx) {
425
+ const endpointInfo = subscription_exports.Endpoints.GetPortal;
426
+ const data = await this.clientHTTP.makeRequest(
427
+ this.env,
428
+ endpointInfo.uri,
429
+ endpointInfo.method,
430
+ null,
431
+ ctx
432
+ );
433
+ return data.url;
434
+ }
424
435
  async updatePlan(ctx, planId) {
425
436
  const endpointInfo = subscription_exports.Endpoints.UpdatePlan;
426
437
  const data = await this.clientHTTP.makeRequest(
@@ -869,6 +880,7 @@ var project_exports = {};
869
880
  __export(project_exports, {
870
881
  CaptionStyle: () => CaptionStyle,
871
882
  Endpoints: () => Endpoints3,
883
+ FeedbackSchema: () => FeedbackSchema,
872
884
  ProjectSchema: () => ProjectSchema,
873
885
  Status: () => Status2,
874
886
  Styles: () => Styles,
@@ -937,6 +949,17 @@ var TimelineItemSchema = import_zod4.z.object({
937
949
  timestamp: import_zod4.z.number(),
938
950
  metadata: import_zod4.z.record(import_zod4.z.any())
939
951
  });
952
+ var FeedbackSchema = import_zod4.z.object({
953
+ criteria: import_zod4.z.array(
954
+ import_zod4.z.object({
955
+ id: import_zod4.z.string(),
956
+ label: import_zod4.z.string(),
957
+ score: import_zod4.z.number().min(0).max(10),
958
+ comment: import_zod4.z.string().optional()
959
+ })
960
+ ),
961
+ comment: import_zod4.z.string().optional()
962
+ });
940
963
  var ProjectSchema = import_zod4.z.object({
941
964
  id: import_zod4.z.string(),
942
965
  title: import_zod4.z.string(),
@@ -949,6 +972,7 @@ var ProjectSchema = import_zod4.z.object({
949
972
  captionSuggestion: import_zod4.z.string().optional(),
950
973
  editorId: import_zod4.z.string().optional(),
951
974
  userId: import_zod4.z.string(),
975
+ feedback: FeedbackSchema.optional(),
952
976
  assets: import_zod4.z.array(AssetSchema).optional(),
953
977
  expirationTimestamp: import_zod4.z.number(),
954
978
  isFree: import_zod4.z.boolean().optional(),
@@ -1713,6 +1737,10 @@ __export(subscription_exports, {
1713
1737
 
1714
1738
  // src/model/subscription/Subscription.api.ts
1715
1739
  var Endpoints10 = {
1740
+ GetPortal: {
1741
+ uri: "/subscriptions/portal/",
1742
+ method: "GET"
1743
+ },
1716
1744
  GetProduct: {
1717
1745
  uri: "/subscriptions/products/public/retrieve/",
1718
1746
  method: "GET"