shred-api-client 2.0.15 → 2.1.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.mts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +17 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1369,7 +1369,7 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1369
1369
|
thumbnailUrl: z.ZodOptional<z.ZodString>;
|
|
1370
1370
|
modified: z.ZodNumber;
|
|
1371
1371
|
captionSuggestion: z.ZodOptional<z.ZodString>;
|
|
1372
|
-
editorId: z.ZodString
|
|
1372
|
+
editorId: z.ZodOptional<z.ZodString>;
|
|
1373
1373
|
userId: z.ZodString;
|
|
1374
1374
|
assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1375
1375
|
assetId: z.ZodString;
|
|
@@ -1441,7 +1441,6 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1441
1441
|
title: string;
|
|
1442
1442
|
status: Status$1;
|
|
1443
1443
|
modified: number;
|
|
1444
|
-
editorId: string;
|
|
1445
1444
|
instructions: string;
|
|
1446
1445
|
submitMonth: string;
|
|
1447
1446
|
captionStyle: CaptionStyle;
|
|
@@ -1455,6 +1454,7 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1455
1454
|
}[];
|
|
1456
1455
|
submitTimestamp: number;
|
|
1457
1456
|
tenantId?: string | undefined;
|
|
1457
|
+
editorId?: string | undefined;
|
|
1458
1458
|
thumbnailUrl?: string | undefined;
|
|
1459
1459
|
finalVideoId?: string | undefined;
|
|
1460
1460
|
captionSuggestion?: string | undefined;
|
|
@@ -1479,7 +1479,6 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1479
1479
|
title: string;
|
|
1480
1480
|
status: Status$1;
|
|
1481
1481
|
modified: number;
|
|
1482
|
-
editorId: string;
|
|
1483
1482
|
instructions: string;
|
|
1484
1483
|
submitMonth: string;
|
|
1485
1484
|
captionStyle: CaptionStyle;
|
|
@@ -1493,6 +1492,7 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1493
1492
|
}[];
|
|
1494
1493
|
submitTimestamp: number;
|
|
1495
1494
|
tenantId?: string | undefined;
|
|
1495
|
+
editorId?: string | undefined;
|
|
1496
1496
|
thumbnailUrl?: string | undefined;
|
|
1497
1497
|
finalVideoId?: string | undefined;
|
|
1498
1498
|
captionSuggestion?: string | undefined;
|
|
@@ -1532,7 +1532,7 @@ interface IAPI$4 {
|
|
|
1532
1532
|
review: (context: Context, projectId: string, revision: string) => Promise<boolean>;
|
|
1533
1533
|
cancel: (context: Context, projectId: string) => Promise<boolean>;
|
|
1534
1534
|
list: (context: Context, query: QueryOptions<Project>) => Promise<Project[]>;
|
|
1535
|
-
start: (context: Context
|
|
1535
|
+
start: (context: Context) => Promise<boolean>;
|
|
1536
1536
|
sendToApproval: (context: Context, projectId: string, data: SendToApproval) => Promise<boolean>;
|
|
1537
1537
|
approve: (context: Context, projectId: string, data: Approve) => Promise<boolean>;
|
|
1538
1538
|
deny: (context: Context, projectId: string, denyFeedback: string, categories?: string[]) => Promise<boolean>;
|
|
@@ -1540,6 +1540,7 @@ interface IAPI$4 {
|
|
|
1540
1540
|
rollback: (context: Context, projectId: string) => Promise<boolean>;
|
|
1541
1541
|
getNext: (context: Context, userId: string) => Promise<Project | null>;
|
|
1542
1542
|
getUserHistory: (context: Context, userId: string) => Promise<APIResponse<Project>>;
|
|
1543
|
+
getPoolSize(context: Context): Promise<number>;
|
|
1543
1544
|
permissions: {
|
|
1544
1545
|
isEligibleForFreeProject(context: Context): Promise<boolean>;
|
|
1545
1546
|
};
|
|
@@ -1609,6 +1610,10 @@ declare const Endpoints$3: {
|
|
|
1609
1610
|
uri: string;
|
|
1610
1611
|
method: string;
|
|
1611
1612
|
};
|
|
1613
|
+
GetPoolSize: {
|
|
1614
|
+
uri: string;
|
|
1615
|
+
method: string;
|
|
1616
|
+
};
|
|
1612
1617
|
};
|
|
1613
1618
|
|
|
1614
1619
|
type index$5_Approve = Approve;
|
package/dist/index.d.ts
CHANGED
|
@@ -1369,7 +1369,7 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1369
1369
|
thumbnailUrl: z.ZodOptional<z.ZodString>;
|
|
1370
1370
|
modified: z.ZodNumber;
|
|
1371
1371
|
captionSuggestion: z.ZodOptional<z.ZodString>;
|
|
1372
|
-
editorId: z.ZodString
|
|
1372
|
+
editorId: z.ZodOptional<z.ZodString>;
|
|
1373
1373
|
userId: z.ZodString;
|
|
1374
1374
|
assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1375
1375
|
assetId: z.ZodString;
|
|
@@ -1441,7 +1441,6 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1441
1441
|
title: string;
|
|
1442
1442
|
status: Status$1;
|
|
1443
1443
|
modified: number;
|
|
1444
|
-
editorId: string;
|
|
1445
1444
|
instructions: string;
|
|
1446
1445
|
submitMonth: string;
|
|
1447
1446
|
captionStyle: CaptionStyle;
|
|
@@ -1455,6 +1454,7 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1455
1454
|
}[];
|
|
1456
1455
|
submitTimestamp: number;
|
|
1457
1456
|
tenantId?: string | undefined;
|
|
1457
|
+
editorId?: string | undefined;
|
|
1458
1458
|
thumbnailUrl?: string | undefined;
|
|
1459
1459
|
finalVideoId?: string | undefined;
|
|
1460
1460
|
captionSuggestion?: string | undefined;
|
|
@@ -1479,7 +1479,6 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1479
1479
|
title: string;
|
|
1480
1480
|
status: Status$1;
|
|
1481
1481
|
modified: number;
|
|
1482
|
-
editorId: string;
|
|
1483
1482
|
instructions: string;
|
|
1484
1483
|
submitMonth: string;
|
|
1485
1484
|
captionStyle: CaptionStyle;
|
|
@@ -1493,6 +1492,7 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1493
1492
|
}[];
|
|
1494
1493
|
submitTimestamp: number;
|
|
1495
1494
|
tenantId?: string | undefined;
|
|
1495
|
+
editorId?: string | undefined;
|
|
1496
1496
|
thumbnailUrl?: string | undefined;
|
|
1497
1497
|
finalVideoId?: string | undefined;
|
|
1498
1498
|
captionSuggestion?: string | undefined;
|
|
@@ -1532,7 +1532,7 @@ interface IAPI$4 {
|
|
|
1532
1532
|
review: (context: Context, projectId: string, revision: string) => Promise<boolean>;
|
|
1533
1533
|
cancel: (context: Context, projectId: string) => Promise<boolean>;
|
|
1534
1534
|
list: (context: Context, query: QueryOptions<Project>) => Promise<Project[]>;
|
|
1535
|
-
start: (context: Context
|
|
1535
|
+
start: (context: Context) => Promise<boolean>;
|
|
1536
1536
|
sendToApproval: (context: Context, projectId: string, data: SendToApproval) => Promise<boolean>;
|
|
1537
1537
|
approve: (context: Context, projectId: string, data: Approve) => Promise<boolean>;
|
|
1538
1538
|
deny: (context: Context, projectId: string, denyFeedback: string, categories?: string[]) => Promise<boolean>;
|
|
@@ -1540,6 +1540,7 @@ interface IAPI$4 {
|
|
|
1540
1540
|
rollback: (context: Context, projectId: string) => Promise<boolean>;
|
|
1541
1541
|
getNext: (context: Context, userId: string) => Promise<Project | null>;
|
|
1542
1542
|
getUserHistory: (context: Context, userId: string) => Promise<APIResponse<Project>>;
|
|
1543
|
+
getPoolSize(context: Context): Promise<number>;
|
|
1543
1544
|
permissions: {
|
|
1544
1545
|
isEligibleForFreeProject(context: Context): Promise<boolean>;
|
|
1545
1546
|
};
|
|
@@ -1609,6 +1610,10 @@ declare const Endpoints$3: {
|
|
|
1609
1610
|
uri: string;
|
|
1610
1611
|
method: string;
|
|
1611
1612
|
};
|
|
1613
|
+
GetPoolSize: {
|
|
1614
|
+
uri: string;
|
|
1615
|
+
method: string;
|
|
1616
|
+
};
|
|
1612
1617
|
};
|
|
1613
1618
|
|
|
1614
1619
|
type index$5_Approve = Approve;
|
package/dist/index.js
CHANGED
|
@@ -947,7 +947,7 @@ var ProjectSchema = import_zod4.z.object({
|
|
|
947
947
|
thumbnailUrl: import_zod4.z.string().optional(),
|
|
948
948
|
modified: import_zod4.z.number(),
|
|
949
949
|
captionSuggestion: import_zod4.z.string().optional(),
|
|
950
|
-
editorId: import_zod4.z.string(),
|
|
950
|
+
editorId: import_zod4.z.string().optional(),
|
|
951
951
|
userId: import_zod4.z.string(),
|
|
952
952
|
assets: import_zod4.z.array(AssetSchema).optional(),
|
|
953
953
|
expirationTimestamp: import_zod4.z.number(),
|
|
@@ -968,7 +968,7 @@ var Endpoints3 = {
|
|
|
968
968
|
GetGoals: { uri: `/projects/goals/list/`, method: "GET" },
|
|
969
969
|
Review: { uri: "/projects/:projectId/review/", method: "POST" },
|
|
970
970
|
Cancel: { uri: "/projects/:projectId/cancel/", method: "DELETE" },
|
|
971
|
-
StartEdition: { uri: "/projects
|
|
971
|
+
StartEdition: { uri: "/projects/start/", method: "PUT" },
|
|
972
972
|
SendToApproval: {
|
|
973
973
|
uri: "/projects/:projectId/sendToApproval/",
|
|
974
974
|
method: "PUT"
|
|
@@ -981,7 +981,8 @@ var Endpoints3 = {
|
|
|
981
981
|
Unschedule: { uri: "/projects/:projectId/unschedule/", method: "POST" },
|
|
982
982
|
Rollback: { uri: "/projects/:projectId/rollback/", method: "POST" },
|
|
983
983
|
Deny: { uri: "/projects/:projectId/deny/", method: "POST" },
|
|
984
|
-
GetUserHistory: { uri: "/projects/user/:userId/history/", method: "GET" }
|
|
984
|
+
GetUserHistory: { uri: "/projects/user/:userId/history/", method: "GET" },
|
|
985
|
+
GetPoolSize: { uri: "/projects/pool/size/", method: "GET" }
|
|
985
986
|
};
|
|
986
987
|
|
|
987
988
|
// src/api/Project.api.ts
|
|
@@ -1003,6 +1004,17 @@ var ProjectAPI = class {
|
|
|
1003
1004
|
this.env = env;
|
|
1004
1005
|
this.clientHTTP = new HTTPClient();
|
|
1005
1006
|
}
|
|
1007
|
+
async getPoolSize(context) {
|
|
1008
|
+
const endpointData = Endpoints3.GetPoolSize;
|
|
1009
|
+
const data = await this.clientHTTP.makeRequest(
|
|
1010
|
+
this.env,
|
|
1011
|
+
endpointData.uri,
|
|
1012
|
+
endpointData.method,
|
|
1013
|
+
null,
|
|
1014
|
+
context
|
|
1015
|
+
);
|
|
1016
|
+
return data.size;
|
|
1017
|
+
}
|
|
1006
1018
|
async reorder(ctx, projectId, position) {
|
|
1007
1019
|
const endpointData = Endpoints3.Reorder;
|
|
1008
1020
|
const data = await this.clientHTTP.makeRequest(
|
|
@@ -1133,12 +1145,11 @@ var ProjectAPI = class {
|
|
|
1133
1145
|
);
|
|
1134
1146
|
return data.success;
|
|
1135
1147
|
}
|
|
1136
|
-
async start(context
|
|
1148
|
+
async start(context) {
|
|
1137
1149
|
const endpointData = Endpoints3.StartEdition;
|
|
1138
|
-
const endpoint = endpointData.uri.replace(":projectId", projectId);
|
|
1139
1150
|
const data = await this.clientHTTP.makeRequest(
|
|
1140
1151
|
this.env,
|
|
1141
|
-
|
|
1152
|
+
endpointData.uri,
|
|
1142
1153
|
endpointData.method,
|
|
1143
1154
|
null,
|
|
1144
1155
|
context
|