shred-api-client 2.11.0 → 2.11.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.ts +64 -1
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4165,7 +4165,60 @@ declare const SetShredUSessionRecordingSchema: z.ZodObject<{
|
|
|
4165
4165
|
recordingDurationSeconds: number;
|
|
4166
4166
|
recordingThumbnailUrl?: string | undefined;
|
|
4167
4167
|
}>;
|
|
4168
|
+
declare const ShredUStageRuleSchema: z.ZodObject<{
|
|
4169
|
+
id: z.ZodString;
|
|
4170
|
+
label: z.ZodString;
|
|
4171
|
+
/** How long before the session starts this goes out. 0 means at start. */
|
|
4172
|
+
leadMs: z.ZodNumber;
|
|
4173
|
+
transport: z.ZodNativeEnum<typeof TransportType>;
|
|
4174
|
+
}, "strip", z.ZodTypeAny, {
|
|
4175
|
+
id: string;
|
|
4176
|
+
label: string;
|
|
4177
|
+
leadMs: number;
|
|
4178
|
+
transport: TransportType;
|
|
4179
|
+
}, {
|
|
4180
|
+
id: string;
|
|
4181
|
+
label: string;
|
|
4182
|
+
leadMs: number;
|
|
4183
|
+
transport: TransportType;
|
|
4184
|
+
}>;
|
|
4185
|
+
declare const ShredUDispatchRulesSchema: z.ZodObject<{
|
|
4186
|
+
/** Furthest ahead first, the order they fire in. */
|
|
4187
|
+
stages: z.ZodArray<z.ZodObject<{
|
|
4188
|
+
id: z.ZodString;
|
|
4189
|
+
label: z.ZodString;
|
|
4190
|
+
/** How long before the session starts this goes out. 0 means at start. */
|
|
4191
|
+
leadMs: z.ZodNumber;
|
|
4192
|
+
transport: z.ZodNativeEnum<typeof TransportType>;
|
|
4193
|
+
}, "strip", z.ZodTypeAny, {
|
|
4194
|
+
id: string;
|
|
4195
|
+
label: string;
|
|
4196
|
+
leadMs: number;
|
|
4197
|
+
transport: TransportType;
|
|
4198
|
+
}, {
|
|
4199
|
+
id: string;
|
|
4200
|
+
label: string;
|
|
4201
|
+
leadMs: number;
|
|
4202
|
+
transport: TransportType;
|
|
4203
|
+
}>, "many">;
|
|
4204
|
+
}, "strip", z.ZodTypeAny, {
|
|
4205
|
+
stages: {
|
|
4206
|
+
id: string;
|
|
4207
|
+
label: string;
|
|
4208
|
+
leadMs: number;
|
|
4209
|
+
transport: TransportType;
|
|
4210
|
+
}[];
|
|
4211
|
+
}, {
|
|
4212
|
+
stages: {
|
|
4213
|
+
id: string;
|
|
4214
|
+
label: string;
|
|
4215
|
+
leadMs: number;
|
|
4216
|
+
transport: TransportType;
|
|
4217
|
+
}[];
|
|
4218
|
+
}>;
|
|
4168
4219
|
type SessionAsset = z.infer<typeof SessionAssetSchema>;
|
|
4220
|
+
type ShredUStageRule = z.infer<typeof ShredUStageRuleSchema>;
|
|
4221
|
+
type ShredUDispatchRules = z.infer<typeof ShredUDispatchRulesSchema>;
|
|
4169
4222
|
type Brief = z.infer<typeof ShredUBriefSchema>;
|
|
4170
4223
|
type ShredUSessionStatus = z.infer<typeof ShredUSessionStatusSchema>;
|
|
4171
4224
|
type ShredUSession = z.infer<typeof ShredUSessionSchema>;
|
|
@@ -4187,6 +4240,8 @@ interface IAPI$2 {
|
|
|
4187
4240
|
cancel: (ctx: Context, id: string) => Promise<void>;
|
|
4188
4241
|
setRecording: (ctx: Context, id: string, data: SetRecording) => Promise<void>;
|
|
4189
4242
|
previewEmail: (ctx: Context, data: PreviewEmail) => Promise<void>;
|
|
4243
|
+
/** The lead times the dispatch job runs on. Static: fetch once, not per keystroke. */
|
|
4244
|
+
getDispatchRules: (ctx: Context) => Promise<ShredUDispatchRules>;
|
|
4190
4245
|
}
|
|
4191
4246
|
declare const Endpoints$2: {
|
|
4192
4247
|
List: {
|
|
@@ -4229,6 +4284,10 @@ declare const Endpoints$2: {
|
|
|
4229
4284
|
uri: string;
|
|
4230
4285
|
method: string;
|
|
4231
4286
|
};
|
|
4287
|
+
GetDispatchRules: {
|
|
4288
|
+
uri: string;
|
|
4289
|
+
method: string;
|
|
4290
|
+
};
|
|
4232
4291
|
};
|
|
4233
4292
|
|
|
4234
4293
|
type index$4_Brief = Brief;
|
|
@@ -4243,16 +4302,20 @@ declare const index$4_SessionAssetSchema: typeof SessionAssetSchema;
|
|
|
4243
4302
|
type index$4_SetRecording = SetRecording;
|
|
4244
4303
|
declare const index$4_SetShredUSessionRecordingSchema: typeof SetShredUSessionRecordingSchema;
|
|
4245
4304
|
declare const index$4_ShredUBriefSchema: typeof ShredUBriefSchema;
|
|
4305
|
+
type index$4_ShredUDispatchRules = ShredUDispatchRules;
|
|
4306
|
+
declare const index$4_ShredUDispatchRulesSchema: typeof ShredUDispatchRulesSchema;
|
|
4246
4307
|
declare const index$4_ShredUJoinSchema: typeof ShredUJoinSchema;
|
|
4247
4308
|
type index$4_ShredUSessionCustomer = ShredUSessionCustomer;
|
|
4248
4309
|
declare const index$4_ShredUSessionCustomerSchema: typeof ShredUSessionCustomerSchema;
|
|
4249
4310
|
declare const index$4_ShredUSessionSchema: typeof ShredUSessionSchema;
|
|
4250
4311
|
type index$4_ShredUSessionStatus = ShredUSessionStatus;
|
|
4251
4312
|
declare const index$4_ShredUSessionStatusSchema: typeof ShredUSessionStatusSchema;
|
|
4313
|
+
type index$4_ShredUStageRule = ShredUStageRule;
|
|
4314
|
+
declare const index$4_ShredUStageRuleSchema: typeof ShredUStageRuleSchema;
|
|
4252
4315
|
type index$4_Update = Update;
|
|
4253
4316
|
declare const index$4_UpdateShredUSessionSchema: typeof UpdateShredUSessionSchema;
|
|
4254
4317
|
declare namespace index$4 {
|
|
4255
|
-
export { type index$4_Brief as Brief, type index$4_Create as Create, index$4_CreateShredUBriefSchema as CreateShredUBriefSchema, index$4_CreateShredUSessionSchema as CreateShredUSessionSchema, Endpoints$2 as Endpoints, type ShredUSession as Entity, type IAPI$2 as IAPI, type index$4_Join as Join, type index$4_PreviewEmail as PreviewEmail, index$4_PreviewShredUEmailSchema as PreviewShredUEmailSchema, type index$4_SessionAsset as SessionAsset, index$4_SessionAssetSchema as SessionAssetSchema, type index$4_SetRecording as SetRecording, index$4_SetShredUSessionRecordingSchema as SetShredUSessionRecordingSchema, index$4_ShredUBriefSchema as ShredUBriefSchema, index$4_ShredUJoinSchema as ShredUJoinSchema, type index$4_ShredUSessionCustomer as ShredUSessionCustomer, index$4_ShredUSessionCustomerSchema as ShredUSessionCustomerSchema, index$4_ShredUSessionSchema as ShredUSessionSchema, type index$4_ShredUSessionStatus as ShredUSessionStatus, index$4_ShredUSessionStatusSchema as ShredUSessionStatusSchema, type index$4_Update as Update, index$4_UpdateShredUSessionSchema as UpdateShredUSessionSchema };
|
|
4318
|
+
export { type index$4_Brief as Brief, type index$4_Create as Create, index$4_CreateShredUBriefSchema as CreateShredUBriefSchema, index$4_CreateShredUSessionSchema as CreateShredUSessionSchema, Endpoints$2 as Endpoints, type ShredUSession as Entity, type IAPI$2 as IAPI, type index$4_Join as Join, type index$4_PreviewEmail as PreviewEmail, index$4_PreviewShredUEmailSchema as PreviewShredUEmailSchema, type index$4_SessionAsset as SessionAsset, index$4_SessionAssetSchema as SessionAssetSchema, type index$4_SetRecording as SetRecording, index$4_SetShredUSessionRecordingSchema as SetShredUSessionRecordingSchema, index$4_ShredUBriefSchema as ShredUBriefSchema, type index$4_ShredUDispatchRules as ShredUDispatchRules, index$4_ShredUDispatchRulesSchema as ShredUDispatchRulesSchema, index$4_ShredUJoinSchema as ShredUJoinSchema, type index$4_ShredUSessionCustomer as ShredUSessionCustomer, index$4_ShredUSessionCustomerSchema as ShredUSessionCustomerSchema, index$4_ShredUSessionSchema as ShredUSessionSchema, type index$4_ShredUSessionStatus as ShredUSessionStatus, index$4_ShredUSessionStatusSchema as ShredUSessionStatusSchema, type index$4_ShredUStageRule as ShredUStageRule, index$4_ShredUStageRuleSchema as ShredUStageRuleSchema, type index$4_Update as Update, index$4_UpdateShredUSessionSchema as UpdateShredUSessionSchema };
|
|
4256
4319
|
}
|
|
4257
4320
|
|
|
4258
4321
|
/** The metrics served today. The list grows, so it never gates parsing — see ScoreMetricSchema. */
|
package/dist/index.js
CHANGED
|
@@ -6114,6 +6114,10 @@ var Endpoints9 = {
|
|
|
6114
6114
|
PreviewEmail: {
|
|
6115
6115
|
uri: "/shredu/sessions/preview-email",
|
|
6116
6116
|
method: "POST"
|
|
6117
|
+
},
|
|
6118
|
+
GetDispatchRules: {
|
|
6119
|
+
uri: "/shredu/dispatch-rules",
|
|
6120
|
+
method: "GET"
|
|
6117
6121
|
}
|
|
6118
6122
|
};
|
|
6119
6123
|
|
|
@@ -6197,6 +6201,17 @@ var SetShredUSessionRecordingSchema = external_exports.object({
|
|
|
6197
6201
|
recordingThumbnailUrl: external_exports.string().url().optional(),
|
|
6198
6202
|
recordingDurationSeconds: external_exports.number().int().positive()
|
|
6199
6203
|
});
|
|
6204
|
+
var ShredUStageRuleSchema = external_exports.object({
|
|
6205
|
+
id: external_exports.string(),
|
|
6206
|
+
label: external_exports.string(),
|
|
6207
|
+
/** How long before the session starts this goes out. 0 means at start. */
|
|
6208
|
+
leadMs: external_exports.number(),
|
|
6209
|
+
transport: external_exports.nativeEnum(TransportType)
|
|
6210
|
+
});
|
|
6211
|
+
var ShredUDispatchRulesSchema = external_exports.object({
|
|
6212
|
+
/** Furthest ahead first, the order they fire in. */
|
|
6213
|
+
stages: external_exports.array(ShredUStageRuleSchema)
|
|
6214
|
+
});
|
|
6200
6215
|
|
|
6201
6216
|
// src/api/ShredU.api.ts
|
|
6202
6217
|
var ShredUAPI = class {
|
|
@@ -6244,6 +6259,10 @@ var ShredUAPI = class {
|
|
|
6244
6259
|
const { uri, method } = Endpoints9.PreviewEmail;
|
|
6245
6260
|
await this.clientHTTP.makeRequest(this.env, uri, method, data, ctx);
|
|
6246
6261
|
}
|
|
6262
|
+
async getDispatchRules(ctx) {
|
|
6263
|
+
const { uri, method } = Endpoints9.GetDispatchRules;
|
|
6264
|
+
return this.clientHTTP.makeRequest(this.env, uri, method, null, ctx, ShredUDispatchRulesSchema);
|
|
6265
|
+
}
|
|
6247
6266
|
};
|
|
6248
6267
|
var ShredU_api_default = ShredUAPI;
|
|
6249
6268
|
|
|
@@ -7113,10 +7132,12 @@ __export(shredu_exports, {
|
|
|
7113
7132
|
SessionAssetSchema: () => SessionAssetSchema,
|
|
7114
7133
|
SetShredUSessionRecordingSchema: () => SetShredUSessionRecordingSchema,
|
|
7115
7134
|
ShredUBriefSchema: () => ShredUBriefSchema,
|
|
7135
|
+
ShredUDispatchRulesSchema: () => ShredUDispatchRulesSchema,
|
|
7116
7136
|
ShredUJoinSchema: () => ShredUJoinSchema,
|
|
7117
7137
|
ShredUSessionCustomerSchema: () => ShredUSessionCustomerSchema,
|
|
7118
7138
|
ShredUSessionSchema: () => ShredUSessionSchema,
|
|
7119
7139
|
ShredUSessionStatusSchema: () => ShredUSessionStatusSchema,
|
|
7140
|
+
ShredUStageRuleSchema: () => ShredUStageRuleSchema,
|
|
7120
7141
|
UpdateShredUSessionSchema: () => UpdateShredUSessionSchema
|
|
7121
7142
|
});
|
|
7122
7143
|
|