shred-api-client 2.3.9 → 2.4.1-rc.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
@@ -2,6 +2,22 @@ import { z } from 'zod/v3';
2
2
 
3
3
  type Environment = "prod" | "staging" | "local";
4
4
 
5
+ declare const ScriptIARequestSchema: z.ZodObject<{
6
+ prompt: z.ZodString;
7
+ keywords: z.ZodString;
8
+ tone: z.ZodString;
9
+ length: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ length: string;
12
+ prompt: string;
13
+ keywords: string;
14
+ tone: string;
15
+ }, {
16
+ length: string;
17
+ prompt: string;
18
+ keywords: string;
19
+ tone: string;
20
+ }>;
5
21
  declare const ScriptSchema: z.ZodObject<{
6
22
  id: z.ZodString;
7
23
  title: z.ZodString;
@@ -174,6 +190,7 @@ declare const PromptSchema: z.ZodObject<{
174
190
  type Script = z.infer<typeof ScriptSchema>;
175
191
  type Category = z.infer<typeof CategorySchema>;
176
192
  type Prompt = z.infer<typeof PromptSchema>;
193
+ type ScriptIARequest = z.infer<typeof ScriptIARequestSchema>;
177
194
 
178
195
  type Context = {
179
196
  token: string;
@@ -185,6 +202,7 @@ interface IAPI$a {
185
202
  addScript: (c: Context, script: Partial<Script>) => Promise<Script>;
186
203
  deleteScript: (c: Context, id: string) => Promise<boolean>;
187
204
  getScripts: (c: Context) => Promise<Script[]>;
205
+ generateScript: (c: Context, data: ScriptIARequest) => Promise<string>;
188
206
  updateScript: (c: Context, id: string, script: Partial<Script>) => Promise<boolean>;
189
207
  }
190
208
  declare const Endpoints$9: {
@@ -204,6 +222,10 @@ declare const Endpoints$9: {
204
222
  uri: string;
205
223
  method: string;
206
224
  };
225
+ GenerateScript: {
226
+ uri: string;
227
+ method: string;
228
+ };
207
229
  UpdateScript: {
208
230
  uri: string;
209
231
  method: string;
@@ -214,9 +236,11 @@ type index$c_Category = Category;
214
236
  declare const index$c_CategorySchema: typeof CategorySchema;
215
237
  declare const index$c_PromptSchema: typeof PromptSchema;
216
238
  type index$c_Script = Script;
239
+ type index$c_ScriptIARequest = ScriptIARequest;
240
+ declare const index$c_ScriptIARequestSchema: typeof ScriptIARequestSchema;
217
241
  declare const index$c_ScriptSchema: typeof ScriptSchema;
218
242
  declare namespace index$c {
219
- 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, index$c_ScriptSchema as ScriptSchema };
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 };
220
244
  }
221
245
 
222
246
  declare enum Type {
@@ -1685,6 +1709,7 @@ declare const ProjectSchema: z.ZodObject<{
1685
1709
  }[];
1686
1710
  comment?: string | undefined;
1687
1711
  }>>;
1712
+ isFeedbackEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1688
1713
  captionSuggestion: z.ZodOptional<z.ZodString>;
1689
1714
  editorId: z.ZodOptional<z.ZodString>;
1690
1715
  userId: z.ZodString;
@@ -1786,6 +1811,7 @@ declare const ProjectSchema: z.ZodObject<{
1786
1811
  duration?: number | undefined;
1787
1812
  progress?: number | undefined;
1788
1813
  }[] | undefined;
1814
+ isFeedbackEnabled?: boolean | undefined;
1789
1815
  editorId?: string | undefined;
1790
1816
  finalVideoId?: string | undefined;
1791
1817
  feedback?: {
@@ -1833,6 +1859,7 @@ declare const ProjectSchema: z.ZodObject<{
1833
1859
  duration?: number | undefined;
1834
1860
  progress?: number | undefined;
1835
1861
  }[] | undefined;
1862
+ isFeedbackEnabled?: boolean | undefined;
1836
1863
  editorId?: string | undefined;
1837
1864
  finalVideoId?: string | undefined;
1838
1865
  feedback?: {
package/dist/index.js CHANGED
@@ -4405,6 +4405,17 @@ var PromptAPI = class {
4405
4405
  this.env = env;
4406
4406
  this.clientHTTP = new HTTPClient();
4407
4407
  }
4408
+ async generateScript(ctx, body) {
4409
+ const endpointInfo = prompt_exports.Endpoints.GenerateScript;
4410
+ const data = await this.clientHTTP.makeRequest(
4411
+ this.env,
4412
+ endpointInfo.uri,
4413
+ endpointInfo.method,
4414
+ body,
4415
+ ctx
4416
+ );
4417
+ return data.result;
4418
+ }
4408
4419
  async getPrompt(context) {
4409
4420
  const endpointInfo = prompt_exports.Endpoints.GetPrompt;
4410
4421
  const data = await this.clientHTTP.makeRequest(
@@ -5021,6 +5032,7 @@ var ProjectSchema = external_exports.object({
5021
5032
  thumbnailUrl: external_exports.string().optional(),
5022
5033
  modified: external_exports.number(),
5023
5034
  feedback: FeedbackSchema.optional(),
5035
+ isFeedbackEnabled: external_exports.boolean().default(true).optional(),
5024
5036
  captionSuggestion: external_exports.string().optional(),
5025
5037
  editorId: external_exports.string().optional(),
5026
5038
  userId: external_exports.string(),
@@ -5753,10 +5765,17 @@ __export(prompt_exports, {
5753
5765
  CategorySchema: () => CategorySchema,
5754
5766
  Endpoints: () => Endpoints7,
5755
5767
  PromptSchema: () => PromptSchema,
5768
+ ScriptIARequestSchema: () => ScriptIARequestSchema,
5756
5769
  ScriptSchema: () => ScriptSchema
5757
5770
  });
5758
5771
 
5759
5772
  // src/model/prompt/Prompt.schema.ts
5773
+ var ScriptIARequestSchema = external_exports.object({
5774
+ prompt: external_exports.string(),
5775
+ keywords: external_exports.string(),
5776
+ tone: external_exports.string(),
5777
+ length: external_exports.string()
5778
+ });
5760
5779
  var ScriptSchema = external_exports.object({
5761
5780
  id: external_exports.string(),
5762
5781
  title: external_exports.string(),
@@ -5797,6 +5816,10 @@ var Endpoints7 = {
5797
5816
  uri: "/prompts/script/list/",
5798
5817
  method: "GET"
5799
5818
  },
5819
+ GenerateScript: {
5820
+ uri: "/prompts/script/generate/",
5821
+ method: "POST"
5822
+ },
5800
5823
  UpdateScript: {
5801
5824
  uri: "/prompts/script/:id/update/",
5802
5825
  method: "PUT"