shred-api-client 2.10.4 → 2.10.5

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
@@ -2246,7 +2246,15 @@ type Approve = {
2246
2246
  captionSuggestion: string;
2247
2247
  feedback?: Feedback | null;
2248
2248
  };
2249
+ declare const StreamTicketSchema: z.ZodObject<{
2250
+ ticket: z.ZodString;
2251
+ }, "strip", z.ZodTypeAny, {
2252
+ ticket: string;
2253
+ }, {
2254
+ ticket: string;
2255
+ }>;
2249
2256
  type Project = z.infer<typeof ProjectSchema>;
2257
+ type StreamTicket = z.infer<typeof StreamTicketSchema>;
2250
2258
  type TimelineItem = z.infer<typeof TimelineItemSchema>;
2251
2259
  type Interaction = z.infer<typeof InteractionSchema>;
2252
2260
  type Feedback = z.infer<typeof FeedbackSchema>;
@@ -2254,6 +2262,8 @@ type Rating = z.infer<typeof RatingSchema>;
2254
2262
  type RatingInput = Pick<Rating, "score" | "tags" | "comment">;
2255
2263
 
2256
2264
  interface IAPI$8 {
2265
+ /** Single-use credential for the SSE stream, which cannot carry a header. */
2266
+ streamTicket: (context: Context) => Promise<string>;
2257
2267
  reorder: (context: Context, projectId: string, position: number) => Promise<boolean>;
2258
2268
  find: (context: Context, projectId: string) => Promise<Project>;
2259
2269
  create: (context: Context, data: ProjectCreation) => Promise<Project>;
@@ -2284,6 +2294,10 @@ declare const Endpoints$7: {
2284
2294
  uri: string;
2285
2295
  method: string;
2286
2296
  };
2297
+ StreamTicket: {
2298
+ uri: string;
2299
+ method: string;
2300
+ };
2287
2301
  List: {
2288
2302
  uri: string;
2289
2303
  method: string;
@@ -2425,12 +2439,14 @@ declare const index$9_RatingTag: typeof RatingTag;
2425
2439
  type index$9_SendToApproval = SendToApproval;
2426
2440
  declare const index$9_StatusConfig: typeof StatusConfig;
2427
2441
  type index$9_StatusConfigType = StatusConfigType;
2442
+ type index$9_StreamTicket = StreamTicket;
2443
+ declare const index$9_StreamTicketSchema: typeof StreamTicketSchema;
2428
2444
  type index$9_Style = Style;
2429
2445
  declare const index$9_Styles: typeof Styles;
2430
2446
  type index$9_TimelineItem = TimelineItem;
2431
2447
  declare const index$9_TimelineItemSchema: typeof TimelineItemSchema;
2432
2448
  declare namespace index$9 {
2433
- export { type index$9_Approve as Approve, index$9_CaptionStyle as CaptionStyle, Endpoints$7 as Endpoints, type Project as Entity, type index$9_Feedback as Feedback, index$9_FeedbackSchema as FeedbackSchema, type IAPI$8 as IAPI, type index$9_Interaction as Interaction, index$9_InteractionSchema as InteractionSchema, index$9_InteractionType as InteractionType, type index$9_ProjectCreation as ProjectCreation, index$9_ProjectSchema as ProjectSchema, type index$9_Rating as Rating, type index$9_RatingInput as RatingInput, index$9_RatingSchema as RatingSchema, index$9_RatingTag as RatingTag, type index$9_SendToApproval as SendToApproval, Status$1 as Status, index$9_StatusConfig as StatusConfig, type index$9_StatusConfigType as StatusConfigType, type index$9_Style as Style, index$9_Styles as Styles, type index$9_TimelineItem as TimelineItem, index$9_TimelineItemSchema as TimelineItemSchema };
2449
+ export { type index$9_Approve as Approve, index$9_CaptionStyle as CaptionStyle, Endpoints$7 as Endpoints, type Project as Entity, type index$9_Feedback as Feedback, index$9_FeedbackSchema as FeedbackSchema, type IAPI$8 as IAPI, type index$9_Interaction as Interaction, index$9_InteractionSchema as InteractionSchema, index$9_InteractionType as InteractionType, type index$9_ProjectCreation as ProjectCreation, index$9_ProjectSchema as ProjectSchema, type index$9_Rating as Rating, type index$9_RatingInput as RatingInput, index$9_RatingSchema as RatingSchema, index$9_RatingTag as RatingTag, type index$9_SendToApproval as SendToApproval, Status$1 as Status, index$9_StatusConfig as StatusConfig, type index$9_StatusConfigType as StatusConfigType, type index$9_StreamTicket as StreamTicket, index$9_StreamTicketSchema as StreamTicketSchema, type index$9_Style as Style, index$9_Styles as Styles, type index$9_TimelineItem as TimelineItem, index$9_TimelineItemSchema as TimelineItemSchema };
2434
2450
  }
2435
2451
 
2436
2452
  declare const DailyMilestoneSchema: z.ZodObject<{
package/dist/index.js CHANGED
@@ -5060,6 +5060,7 @@ __export(project_exports, {
5060
5060
  RatingTag: () => RatingTag,
5061
5061
  Status: () => Status2,
5062
5062
  StatusConfig: () => StatusConfig,
5063
+ StreamTicketSchema: () => StreamTicketSchema,
5063
5064
  Styles: () => Styles,
5064
5065
  TimelineItemSchema: () => TimelineItemSchema
5065
5066
  });
@@ -5184,10 +5185,12 @@ var ProjectSchema = external_exports.object({
5184
5185
  tenantId: external_exports.string().optional(),
5185
5186
  status: external_exports.nativeEnum(Status2)
5186
5187
  });
5188
+ var StreamTicketSchema = external_exports.object({ ticket: external_exports.string().min(1) });
5187
5189
 
5188
5190
  // src/model/project/Project.api.ts
5189
5191
  var Endpoints3 = {
5190
5192
  Reorder: { uri: "/projects/reorder/", method: "POST" },
5193
+ StreamTicket: { uri: "/projects/stream/ticket/", method: "POST" },
5191
5194
  List: { uri: "/projects/list", method: "GET" },
5192
5195
  Mine: { uri: "/projects/mine", method: "GET" },
5193
5196
  Assigned: { uri: "/projects/assigned", method: "GET" },
@@ -5550,6 +5553,18 @@ var ProjectAPI = class {
5550
5553
  );
5551
5554
  return data.success;
5552
5555
  }
5556
+ async streamTicket(ctx) {
5557
+ const endpointData = Endpoints3.StreamTicket;
5558
+ const data = await this.clientHTTP.makeRequest(
5559
+ this.env,
5560
+ endpointData.uri,
5561
+ endpointData.method,
5562
+ null,
5563
+ ctx,
5564
+ StreamTicketSchema
5565
+ );
5566
+ return data.ticket;
5567
+ }
5553
5568
  async cancel(ctx, projectId) {
5554
5569
  const endpointData = Endpoints3.Cancel;
5555
5570
  const endpoint = endpointData.uri.replace(":projectId", projectId);