shred-api-client 2.4.11 → 2.4.13-rc.3
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 +38 -16
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -798,10 +798,15 @@ type QueryOrderBy<T> = {
|
|
|
798
798
|
field: keyof T | "modified";
|
|
799
799
|
direction: "asc" | "desc";
|
|
800
800
|
};
|
|
801
|
+
type QueryFilterOp = "==" | "!=" | ">" | "<" | ">=" | "<=" | "in" | "not-in" | "array-contains" | "array-contains-any" | "between";
|
|
801
802
|
type QueryWhere<T> = {
|
|
802
803
|
field: keyof T | "modified";
|
|
803
|
-
operation:
|
|
804
|
-
value: T[keyof T] | T[keyof T][]
|
|
804
|
+
operation: Exclude<QueryFilterOp, "between">;
|
|
805
|
+
value: T[keyof T] | T[keyof T][];
|
|
806
|
+
} | {
|
|
807
|
+
field: keyof T | "modified";
|
|
808
|
+
operation: "between";
|
|
809
|
+
value: {
|
|
805
810
|
from: number;
|
|
806
811
|
to: number;
|
|
807
812
|
};
|
|
@@ -821,11 +826,12 @@ type APIResponse<T> = {
|
|
|
821
826
|
};
|
|
822
827
|
|
|
823
828
|
type index$a_APIResponse<T> = APIResponse<T>;
|
|
829
|
+
type index$a_QueryFilterOp = QueryFilterOp;
|
|
824
830
|
type index$a_QueryOptions<T> = QueryOptions<T>;
|
|
825
831
|
type index$a_QueryOrderBy<T> = QueryOrderBy<T>;
|
|
826
832
|
type index$a_QueryWhere<T> = QueryWhere<T>;
|
|
827
833
|
declare namespace index$a {
|
|
828
|
-
export type { index$a_APIResponse as APIResponse, index$a_QueryOptions as QueryOptions, index$a_QueryOrderBy as QueryOrderBy, index$a_QueryWhere as QueryWhere };
|
|
834
|
+
export type { index$a_APIResponse as APIResponse, index$a_QueryFilterOp as QueryFilterOp, index$a_QueryOptions as QueryOptions, index$a_QueryOrderBy as QueryOrderBy, index$a_QueryWhere as QueryWhere };
|
|
829
835
|
}
|
|
830
836
|
|
|
831
837
|
interface IAPI$8 {
|
|
@@ -2153,6 +2159,15 @@ declare enum Frequency {
|
|
|
2153
2159
|
WEEKLY = "weekly",
|
|
2154
2160
|
MONTHLY = "monthly"
|
|
2155
2161
|
}
|
|
2162
|
+
declare enum NotificationType {
|
|
2163
|
+
INFO = "info",
|
|
2164
|
+
TIP = "tip",
|
|
2165
|
+
VIDEO_SENT = "video_sent",
|
|
2166
|
+
VIDEO_EDITING_START = "video_start_editing",
|
|
2167
|
+
VIDEO_READY = "video_ready",
|
|
2168
|
+
REVISION_SENT = "revision_sent",
|
|
2169
|
+
REVISION_COMPLETED = "revision_completed"
|
|
2170
|
+
}
|
|
2156
2171
|
declare enum WeekDay {
|
|
2157
2172
|
MONDAY = 1,
|
|
2158
2173
|
TUESDAY = 2,
|
|
@@ -2188,6 +2203,7 @@ declare const NotificationItemSchema: z.ZodObject<{
|
|
|
2188
2203
|
triggerId: z.ZodOptional<z.ZodString>;
|
|
2189
2204
|
title: z.ZodString;
|
|
2190
2205
|
body: z.ZodString;
|
|
2206
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof NotificationType>>;
|
|
2191
2207
|
status: z.ZodEnum<["failed", "delivered", "deleted"]>;
|
|
2192
2208
|
deliveredAt: z.ZodNumber;
|
|
2193
2209
|
openedAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2213,6 +2229,7 @@ declare const NotificationItemSchema: z.ZodObject<{
|
|
|
2213
2229
|
deliveredAt: number;
|
|
2214
2230
|
metadata: Record<string, string | number>;
|
|
2215
2231
|
triggerId?: string | undefined;
|
|
2232
|
+
type?: NotificationType | undefined;
|
|
2216
2233
|
openedAt?: number | undefined;
|
|
2217
2234
|
deletedAt?: number | undefined;
|
|
2218
2235
|
cta?: {
|
|
@@ -2229,6 +2246,7 @@ declare const NotificationItemSchema: z.ZodObject<{
|
|
|
2229
2246
|
deliveredAt: number;
|
|
2230
2247
|
metadata: Record<string, string | number>;
|
|
2231
2248
|
triggerId?: string | undefined;
|
|
2249
|
+
type?: NotificationType | undefined;
|
|
2232
2250
|
openedAt?: number | undefined;
|
|
2233
2251
|
deletedAt?: number | undefined;
|
|
2234
2252
|
cta?: {
|
|
@@ -2243,6 +2261,7 @@ declare const NotificationDetailSchema: z.ZodObject<Pick<{
|
|
|
2243
2261
|
triggerId: z.ZodOptional<z.ZodString>;
|
|
2244
2262
|
title: z.ZodString;
|
|
2245
2263
|
body: z.ZodString;
|
|
2264
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof NotificationType>>;
|
|
2246
2265
|
status: z.ZodEnum<["failed", "delivered", "deleted"]>;
|
|
2247
2266
|
deliveredAt: z.ZodNumber;
|
|
2248
2267
|
openedAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2282,11 +2301,11 @@ declare const CriteriaSchema: z.ZodObject<{
|
|
|
2282
2301
|
type: z.ZodNativeEnum<typeof CriteriaType>;
|
|
2283
2302
|
params: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2284
2303
|
}, "strip", z.ZodTypeAny, {
|
|
2285
|
-
params: Record<string, any>;
|
|
2286
2304
|
type: CriteriaType;
|
|
2287
|
-
}, {
|
|
2288
2305
|
params: Record<string, any>;
|
|
2306
|
+
}, {
|
|
2289
2307
|
type: CriteriaType;
|
|
2308
|
+
params: Record<string, any>;
|
|
2290
2309
|
}>;
|
|
2291
2310
|
declare const HistorySchema: z.ZodObject<{
|
|
2292
2311
|
batchId: z.ZodString;
|
|
@@ -2318,7 +2337,7 @@ declare const HistorySchema: z.ZodObject<{
|
|
|
2318
2337
|
}>, "many">>;
|
|
2319
2338
|
executionTimeDuration: z.ZodOptional<z.ZodNumber>;
|
|
2320
2339
|
}, "strip", z.ZodTypeAny, {
|
|
2321
|
-
status: "
|
|
2340
|
+
status: "info" | "failed" | "success" | "warn";
|
|
2322
2341
|
batchId: string;
|
|
2323
2342
|
executedAt: number;
|
|
2324
2343
|
timezone: string;
|
|
@@ -2333,7 +2352,7 @@ declare const HistorySchema: z.ZodObject<{
|
|
|
2333
2352
|
}[] | undefined;
|
|
2334
2353
|
executionTimeDuration?: number | undefined;
|
|
2335
2354
|
}, {
|
|
2336
|
-
status: "
|
|
2355
|
+
status: "info" | "failed" | "success" | "warn";
|
|
2337
2356
|
batchId: string;
|
|
2338
2357
|
executedAt: number;
|
|
2339
2358
|
timezone: string;
|
|
@@ -2381,6 +2400,7 @@ declare const TriggerSchema: z.ZodObject<{
|
|
|
2381
2400
|
triggerId: z.ZodOptional<z.ZodString>;
|
|
2382
2401
|
title: z.ZodString;
|
|
2383
2402
|
body: z.ZodString;
|
|
2403
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof NotificationType>>;
|
|
2384
2404
|
status: z.ZodEnum<["failed", "delivered", "deleted"]>;
|
|
2385
2405
|
deliveredAt: z.ZodNumber;
|
|
2386
2406
|
openedAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2446,7 +2466,7 @@ declare const TriggerSchema: z.ZodObject<{
|
|
|
2446
2466
|
}>, "many">>;
|
|
2447
2467
|
executionTimeDuration: z.ZodOptional<z.ZodNumber>;
|
|
2448
2468
|
}, "strip", z.ZodTypeAny, {
|
|
2449
|
-
status: "
|
|
2469
|
+
status: "info" | "failed" | "success" | "warn";
|
|
2450
2470
|
batchId: string;
|
|
2451
2471
|
executedAt: number;
|
|
2452
2472
|
timezone: string;
|
|
@@ -2461,7 +2481,7 @@ declare const TriggerSchema: z.ZodObject<{
|
|
|
2461
2481
|
}[] | undefined;
|
|
2462
2482
|
executionTimeDuration?: number | undefined;
|
|
2463
2483
|
}, {
|
|
2464
|
-
status: "
|
|
2484
|
+
status: "info" | "failed" | "success" | "warn";
|
|
2465
2485
|
batchId: string;
|
|
2466
2486
|
executedAt: number;
|
|
2467
2487
|
timezone: string;
|
|
@@ -2507,11 +2527,11 @@ declare const TriggerSchema: z.ZodObject<{
|
|
|
2507
2527
|
type: z.ZodNativeEnum<typeof CriteriaType>;
|
|
2508
2528
|
params: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2509
2529
|
}, "strip", z.ZodTypeAny, {
|
|
2510
|
-
params: Record<string, any>;
|
|
2511
2530
|
type: CriteriaType;
|
|
2512
|
-
}, {
|
|
2513
2531
|
params: Record<string, any>;
|
|
2532
|
+
}, {
|
|
2514
2533
|
type: CriteriaType;
|
|
2534
|
+
params: Record<string, any>;
|
|
2515
2535
|
}>;
|
|
2516
2536
|
nextExecution: z.ZodOptional<z.ZodNumber>;
|
|
2517
2537
|
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2534,12 +2554,12 @@ declare const TriggerSchema: z.ZodObject<{
|
|
|
2534
2554
|
};
|
|
2535
2555
|
timeOfDay: string;
|
|
2536
2556
|
criteria: {
|
|
2537
|
-
params: Record<string, any>;
|
|
2538
2557
|
type: CriteriaType;
|
|
2558
|
+
params: Record<string, any>;
|
|
2539
2559
|
};
|
|
2540
2560
|
timezone?: string | null | undefined;
|
|
2541
2561
|
history?: {
|
|
2542
|
-
status: "
|
|
2562
|
+
status: "info" | "failed" | "success" | "warn";
|
|
2543
2563
|
batchId: string;
|
|
2544
2564
|
executedAt: number;
|
|
2545
2565
|
timezone: string;
|
|
@@ -2585,12 +2605,12 @@ declare const TriggerSchema: z.ZodObject<{
|
|
|
2585
2605
|
};
|
|
2586
2606
|
timeOfDay: string;
|
|
2587
2607
|
criteria: {
|
|
2588
|
-
params: Record<string, any>;
|
|
2589
2608
|
type: CriteriaType;
|
|
2609
|
+
params: Record<string, any>;
|
|
2590
2610
|
};
|
|
2591
2611
|
timezone?: string | null | undefined;
|
|
2592
2612
|
history?: {
|
|
2593
|
-
status: "
|
|
2613
|
+
status: "info" | "failed" | "success" | "warn";
|
|
2594
2614
|
batchId: string;
|
|
2595
2615
|
executedAt: number;
|
|
2596
2616
|
timezone: string;
|
|
@@ -2683,6 +2703,8 @@ type index$3_NotificationDetail = NotificationDetail;
|
|
|
2683
2703
|
declare const index$3_NotificationDetailSchema: typeof NotificationDetailSchema;
|
|
2684
2704
|
type index$3_NotificationItem = NotificationItem;
|
|
2685
2705
|
declare const index$3_NotificationItemSchema: typeof NotificationItemSchema;
|
|
2706
|
+
type index$3_NotificationType = NotificationType;
|
|
2707
|
+
declare const index$3_NotificationType: typeof NotificationType;
|
|
2686
2708
|
type index$3_RecurrenceRule = RecurrenceRule;
|
|
2687
2709
|
declare const index$3_RecurrenceRuleSchema: typeof RecurrenceRuleSchema;
|
|
2688
2710
|
type index$3_Status = Status;
|
|
@@ -2694,7 +2716,7 @@ declare const index$3_TriggerSchema: typeof TriggerSchema;
|
|
|
2694
2716
|
type index$3_WeekDay = WeekDay;
|
|
2695
2717
|
declare const index$3_WeekDay: typeof WeekDay;
|
|
2696
2718
|
declare namespace index$3 {
|
|
2697
|
-
export { type index$3_Criteria as Criteria, index$3_CriteriaSchema as CriteriaSchema, index$3_CriteriaType as CriteriaType, Endpoints$1 as Endpoints, index$3_Frequency as Frequency, type index$3_History as History, index$3_HistorySchema as HistorySchema, type IAPI$2 as IAPI, type index$3_NotificationDetail as NotificationDetail, index$3_NotificationDetailSchema as NotificationDetailSchema, type index$3_NotificationItem as NotificationItem, index$3_NotificationItemSchema as NotificationItemSchema, type index$3_RecurrenceRule as RecurrenceRule, index$3_RecurrenceRuleSchema as RecurrenceRuleSchema, index$3_Status as Status, index$3_TransportType as TransportType, type index$3_Trigger as Trigger, index$3_TriggerSchema as TriggerSchema, index$3_WeekDay as WeekDay };
|
|
2719
|
+
export { type index$3_Criteria as Criteria, index$3_CriteriaSchema as CriteriaSchema, index$3_CriteriaType as CriteriaType, Endpoints$1 as Endpoints, index$3_Frequency as Frequency, type index$3_History as History, index$3_HistorySchema as HistorySchema, type IAPI$2 as IAPI, type index$3_NotificationDetail as NotificationDetail, index$3_NotificationDetailSchema as NotificationDetailSchema, type index$3_NotificationItem as NotificationItem, index$3_NotificationItemSchema as NotificationItemSchema, index$3_NotificationType as NotificationType, type index$3_RecurrenceRule as RecurrenceRule, index$3_RecurrenceRuleSchema as RecurrenceRuleSchema, index$3_Status as Status, index$3_TransportType as TransportType, type index$3_Trigger as Trigger, index$3_TriggerSchema as TriggerSchema, index$3_WeekDay as WeekDay };
|
|
2698
2720
|
}
|
|
2699
2721
|
|
|
2700
2722
|
interface IAPI$1 {
|
package/dist/index.js
CHANGED
|
@@ -121,6 +121,7 @@ __export(notification_exports, {
|
|
|
121
121
|
HistorySchema: () => HistorySchema,
|
|
122
122
|
NotificationDetailSchema: () => NotificationDetailSchema,
|
|
123
123
|
NotificationItemSchema: () => NotificationItemSchema,
|
|
124
|
+
NotificationType: () => NotificationType,
|
|
124
125
|
RecurrenceRuleSchema: () => RecurrenceRuleSchema,
|
|
125
126
|
Status: () => Status,
|
|
126
127
|
TransportType: () => TransportType,
|
|
@@ -4185,6 +4186,16 @@ var Frequency = /* @__PURE__ */ ((Frequency2) => {
|
|
|
4185
4186
|
Frequency2["MONTHLY"] = "monthly";
|
|
4186
4187
|
return Frequency2;
|
|
4187
4188
|
})(Frequency || {});
|
|
4189
|
+
var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
|
|
4190
|
+
NotificationType2["INFO"] = "info";
|
|
4191
|
+
NotificationType2["TIP"] = "tip";
|
|
4192
|
+
NotificationType2["VIDEO_SENT"] = "video_sent";
|
|
4193
|
+
NotificationType2["VIDEO_EDITING_START"] = "video_start_editing";
|
|
4194
|
+
NotificationType2["VIDEO_READY"] = "video_ready";
|
|
4195
|
+
NotificationType2["REVISION_SENT"] = "revision_sent";
|
|
4196
|
+
NotificationType2["REVISION_COMPLETED"] = "revision_completed";
|
|
4197
|
+
return NotificationType2;
|
|
4198
|
+
})(NotificationType || {});
|
|
4188
4199
|
var WeekDay = /* @__PURE__ */ ((WeekDay2) => {
|
|
4189
4200
|
WeekDay2[WeekDay2["MONDAY"] = 1] = "MONDAY";
|
|
4190
4201
|
WeekDay2[WeekDay2["TUESDAY"] = 2] = "TUESDAY";
|
|
@@ -4224,6 +4235,7 @@ var NotificationItemSchema = external_exports.object({
|
|
|
4224
4235
|
triggerId: external_exports.string().optional(),
|
|
4225
4236
|
title: external_exports.string(),
|
|
4226
4237
|
body: external_exports.string(),
|
|
4238
|
+
type: external_exports.nativeEnum(NotificationType).optional(),
|
|
4227
4239
|
status: external_exports.enum(["failed", "delivered", "deleted"]),
|
|
4228
4240
|
deliveredAt: external_exports.number(),
|
|
4229
4241
|
openedAt: external_exports.number().optional(),
|