shred-api-client 2.10.4 → 2.10.6

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<{
@@ -4129,6 +4145,13 @@ declare const PreviewShredUEmailSchema: z.ZodObject<{
4129
4145
  } | undefined;
4130
4146
  sessionId?: string | undefined;
4131
4147
  }>;
4148
+ declare const ShredUJoinSchema: z.ZodObject<{
4149
+ url: z.ZodString;
4150
+ }, "strip", z.ZodTypeAny, {
4151
+ url: string;
4152
+ }, {
4153
+ url: string;
4154
+ }>;
4132
4155
  declare const SetShredUSessionRecordingSchema: z.ZodObject<{
4133
4156
  recordingUrl: z.ZodString;
4134
4157
  recordingThumbnailUrl: z.ZodOptional<z.ZodString>;
@@ -4147,6 +4170,7 @@ type Brief = z.infer<typeof ShredUBriefSchema>;
4147
4170
  type ShredUSessionStatus = z.infer<typeof ShredUSessionStatusSchema>;
4148
4171
  type ShredUSession = z.infer<typeof ShredUSessionSchema>;
4149
4172
  type ShredUSessionCustomer = z.infer<typeof ShredUSessionCustomerSchema>;
4173
+ type Join = z.infer<typeof ShredUJoinSchema>;
4150
4174
  type Create = z.infer<typeof CreateShredUSessionSchema>;
4151
4175
  type Update = z.infer<typeof UpdateShredUSessionSchema>;
4152
4176
  type SetRecording = z.infer<typeof SetShredUSessionRecordingSchema>;
@@ -4157,6 +4181,7 @@ interface IAPI$1 {
4157
4181
  getUpcoming: (ctx: Context) => Promise<ShredUSessionCustomer[]>;
4158
4182
  getLibrary: (ctx: Context) => Promise<ShredUSessionCustomer[]>;
4159
4183
  get: (ctx: Context, id: string) => Promise<ShredUSessionCustomer>;
4184
+ join: (ctx: Context, id: string) => Promise<Join>;
4160
4185
  create: (ctx: Context, data: Create) => Promise<ShredUSession>;
4161
4186
  update: (ctx: Context, id: string, data: Update) => Promise<void>;
4162
4187
  cancel: (ctx: Context, id: string) => Promise<void>;
@@ -4180,6 +4205,10 @@ declare const Endpoints$1: {
4180
4205
  uri: string;
4181
4206
  method: string;
4182
4207
  };
4208
+ Join: {
4209
+ uri: string;
4210
+ method: string;
4211
+ };
4183
4212
  Create: {
4184
4213
  uri: string;
4185
4214
  method: string;
@@ -4206,6 +4235,7 @@ type index$3_Brief = Brief;
4206
4235
  type index$3_Create = Create;
4207
4236
  declare const index$3_CreateShredUBriefSchema: typeof CreateShredUBriefSchema;
4208
4237
  declare const index$3_CreateShredUSessionSchema: typeof CreateShredUSessionSchema;
4238
+ type index$3_Join = Join;
4209
4239
  type index$3_PreviewEmail = PreviewEmail;
4210
4240
  declare const index$3_PreviewShredUEmailSchema: typeof PreviewShredUEmailSchema;
4211
4241
  type index$3_SessionAsset = SessionAsset;
@@ -4213,6 +4243,7 @@ declare const index$3_SessionAssetSchema: typeof SessionAssetSchema;
4213
4243
  type index$3_SetRecording = SetRecording;
4214
4244
  declare const index$3_SetShredUSessionRecordingSchema: typeof SetShredUSessionRecordingSchema;
4215
4245
  declare const index$3_ShredUBriefSchema: typeof ShredUBriefSchema;
4246
+ declare const index$3_ShredUJoinSchema: typeof ShredUJoinSchema;
4216
4247
  type index$3_ShredUSessionCustomer = ShredUSessionCustomer;
4217
4248
  declare const index$3_ShredUSessionCustomerSchema: typeof ShredUSessionCustomerSchema;
4218
4249
  declare const index$3_ShredUSessionSchema: typeof ShredUSessionSchema;
@@ -4221,7 +4252,7 @@ declare const index$3_ShredUSessionStatusSchema: typeof ShredUSessionStatusSchem
4221
4252
  type index$3_Update = Update;
4222
4253
  declare const index$3_UpdateShredUSessionSchema: typeof UpdateShredUSessionSchema;
4223
4254
  declare namespace index$3 {
4224
- export { type index$3_Brief as Brief, type index$3_Create as Create, index$3_CreateShredUBriefSchema as CreateShredUBriefSchema, index$3_CreateShredUSessionSchema as CreateShredUSessionSchema, Endpoints$1 as Endpoints, type ShredUSession as Entity, type IAPI$1 as IAPI, type index$3_PreviewEmail as PreviewEmail, index$3_PreviewShredUEmailSchema as PreviewShredUEmailSchema, type index$3_SessionAsset as SessionAsset, index$3_SessionAssetSchema as SessionAssetSchema, type index$3_SetRecording as SetRecording, index$3_SetShredUSessionRecordingSchema as SetShredUSessionRecordingSchema, index$3_ShredUBriefSchema as ShredUBriefSchema, type index$3_ShredUSessionCustomer as ShredUSessionCustomer, index$3_ShredUSessionCustomerSchema as ShredUSessionCustomerSchema, index$3_ShredUSessionSchema as ShredUSessionSchema, type index$3_ShredUSessionStatus as ShredUSessionStatus, index$3_ShredUSessionStatusSchema as ShredUSessionStatusSchema, type index$3_Update as Update, index$3_UpdateShredUSessionSchema as UpdateShredUSessionSchema };
4255
+ export { type index$3_Brief as Brief, type index$3_Create as Create, index$3_CreateShredUBriefSchema as CreateShredUBriefSchema, index$3_CreateShredUSessionSchema as CreateShredUSessionSchema, Endpoints$1 as Endpoints, type ShredUSession as Entity, type IAPI$1 as IAPI, type index$3_Join as Join, type index$3_PreviewEmail as PreviewEmail, index$3_PreviewShredUEmailSchema as PreviewShredUEmailSchema, type index$3_SessionAsset as SessionAsset, index$3_SessionAssetSchema as SessionAssetSchema, type index$3_SetRecording as SetRecording, index$3_SetShredUSessionRecordingSchema as SetShredUSessionRecordingSchema, index$3_ShredUBriefSchema as ShredUBriefSchema, index$3_ShredUJoinSchema as ShredUJoinSchema, type index$3_ShredUSessionCustomer as ShredUSessionCustomer, index$3_ShredUSessionCustomerSchema as ShredUSessionCustomerSchema, index$3_ShredUSessionSchema as ShredUSessionSchema, type index$3_ShredUSessionStatus as ShredUSessionStatus, index$3_ShredUSessionStatusSchema as ShredUSessionStatusSchema, type index$3_Update as Update, index$3_UpdateShredUSessionSchema as UpdateShredUSessionSchema };
4225
4256
  }
4226
4257
 
4227
4258
  /**
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);
@@ -6075,6 +6090,10 @@ var Endpoints9 = {
6075
6090
  uri: "/shredu/sessions/:id",
6076
6091
  method: "GET"
6077
6092
  },
6093
+ Join: {
6094
+ uri: "/shredu/sessions/:id/join",
6095
+ method: "POST"
6096
+ },
6078
6097
  Create: {
6079
6098
  uri: "/shredu/sessions",
6080
6099
  method: "POST"
@@ -6169,6 +6188,9 @@ var PreviewShredUEmailSchema = external_exports.object({
6169
6188
  timezone: external_exports.string().min(1),
6170
6189
  brief: CreateShredUBriefSchema.optional()
6171
6190
  });
6191
+ var ShredUJoinSchema = external_exports.object({
6192
+ url: external_exports.string()
6193
+ });
6172
6194
  var SetShredUSessionRecordingSchema = external_exports.object({
6173
6195
  recordingUrl: external_exports.string().url(),
6174
6196
  recordingThumbnailUrl: external_exports.string().url().optional(),
@@ -6197,6 +6219,10 @@ var ShredUAPI = class {
6197
6219
  const { uri, method } = Endpoints9.Get;
6198
6220
  return this.clientHTTP.makeRequest(this.env, uri.replace(":id", id), method, null, ctx, ShredUSessionCustomerSchema);
6199
6221
  }
6222
+ async join(ctx, id) {
6223
+ const { uri, method } = Endpoints9.Join;
6224
+ return this.clientHTTP.makeRequest(this.env, uri.replace(":id", id), method, null, ctx, ShredUJoinSchema);
6225
+ }
6200
6226
  async create(ctx, data) {
6201
6227
  const { uri, method } = Endpoints9.Create;
6202
6228
  return this.clientHTTP.makeRequest(this.env, uri, method, data, ctx, ShredUSessionSchema);
@@ -7008,6 +7034,7 @@ __export(shredu_exports, {
7008
7034
  SessionAssetSchema: () => SessionAssetSchema,
7009
7035
  SetShredUSessionRecordingSchema: () => SetShredUSessionRecordingSchema,
7010
7036
  ShredUBriefSchema: () => ShredUBriefSchema,
7037
+ ShredUJoinSchema: () => ShredUJoinSchema,
7011
7038
  ShredUSessionCustomerSchema: () => ShredUSessionCustomerSchema,
7012
7039
  ShredUSessionSchema: () => ShredUSessionSchema,
7013
7040
  ShredUSessionStatusSchema: () => ShredUSessionStatusSchema,