shred-api-client 2.9.8 → 2.9.10
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 +32 -3
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1940,8 +1940,19 @@ declare const FeedbackSchema: z.ZodObject<{
|
|
|
1940
1940
|
}[];
|
|
1941
1941
|
comment?: string | undefined;
|
|
1942
1942
|
}>;
|
|
1943
|
+
declare enum RatingTag {
|
|
1944
|
+
GREAT_EDITING = "great_editing",
|
|
1945
|
+
FAST_TURNAROUND = "fast_turnaround",
|
|
1946
|
+
MATCHED_MY_STYLE = "matched_my_style",
|
|
1947
|
+
CLEAR_AUDIO = "clear_audio",
|
|
1948
|
+
POOR_EDITING = "poor_editing",
|
|
1949
|
+
SLOW_TURNAROUND = "slow_turnaround",
|
|
1950
|
+
OFF_MY_STYLE = "off_my_style",
|
|
1951
|
+
AUDIO_ISSUES = "audio_issues"
|
|
1952
|
+
}
|
|
1943
1953
|
declare const RatingSchema: z.ZodObject<{
|
|
1944
1954
|
score: z.ZodNumber;
|
|
1955
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof RatingTag>, "many">>;
|
|
1945
1956
|
comment: z.ZodOptional<z.ZodString>;
|
|
1946
1957
|
timestamp: z.ZodNumber;
|
|
1947
1958
|
deliveryIndex: z.ZodNumber;
|
|
@@ -1949,11 +1960,13 @@ declare const RatingSchema: z.ZodObject<{
|
|
|
1949
1960
|
timestamp: number;
|
|
1950
1961
|
score: number;
|
|
1951
1962
|
deliveryIndex: number;
|
|
1963
|
+
tags?: RatingTag[] | undefined;
|
|
1952
1964
|
comment?: string | undefined;
|
|
1953
1965
|
}, {
|
|
1954
1966
|
timestamp: number;
|
|
1955
1967
|
score: number;
|
|
1956
1968
|
deliveryIndex: number;
|
|
1969
|
+
tags?: RatingTag[] | undefined;
|
|
1957
1970
|
comment?: string | undefined;
|
|
1958
1971
|
}>;
|
|
1959
1972
|
declare const ProjectSchema: z.ZodObject<{
|
|
@@ -2076,6 +2089,7 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
2076
2089
|
}>, "many">>;
|
|
2077
2090
|
ratings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2078
2091
|
score: z.ZodNumber;
|
|
2092
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof RatingTag>, "many">>;
|
|
2079
2093
|
comment: z.ZodOptional<z.ZodString>;
|
|
2080
2094
|
timestamp: z.ZodNumber;
|
|
2081
2095
|
deliveryIndex: z.ZodNumber;
|
|
@@ -2083,11 +2097,13 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
2083
2097
|
timestamp: number;
|
|
2084
2098
|
score: number;
|
|
2085
2099
|
deliveryIndex: number;
|
|
2100
|
+
tags?: RatingTag[] | undefined;
|
|
2086
2101
|
comment?: string | undefined;
|
|
2087
2102
|
}, {
|
|
2088
2103
|
timestamp: number;
|
|
2089
2104
|
score: number;
|
|
2090
2105
|
deliveryIndex: number;
|
|
2106
|
+
tags?: RatingTag[] | undefined;
|
|
2091
2107
|
comment?: string | undefined;
|
|
2092
2108
|
}>, "many">>;
|
|
2093
2109
|
submitTimestamp: z.ZodNumber;
|
|
@@ -2148,6 +2164,7 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
2148
2164
|
timestamp: number;
|
|
2149
2165
|
score: number;
|
|
2150
2166
|
deliveryIndex: number;
|
|
2167
|
+
tags?: RatingTag[] | undefined;
|
|
2151
2168
|
comment?: string | undefined;
|
|
2152
2169
|
}[] | undefined;
|
|
2153
2170
|
}, {
|
|
@@ -2205,6 +2222,7 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
2205
2222
|
timestamp: number;
|
|
2206
2223
|
score: number;
|
|
2207
2224
|
deliveryIndex: number;
|
|
2225
|
+
tags?: RatingTag[] | undefined;
|
|
2208
2226
|
comment?: string | undefined;
|
|
2209
2227
|
}[] | undefined;
|
|
2210
2228
|
}>;
|
|
@@ -2224,7 +2242,7 @@ type TimelineItem = z.infer<typeof TimelineItemSchema>;
|
|
|
2224
2242
|
type Interaction = z.infer<typeof InteractionSchema>;
|
|
2225
2243
|
type Feedback = z.infer<typeof FeedbackSchema>;
|
|
2226
2244
|
type Rating = z.infer<typeof RatingSchema>;
|
|
2227
|
-
type RatingInput = Pick<Rating, "score" | "comment">;
|
|
2245
|
+
type RatingInput = Pick<Rating, "score" | "tags" | "comment">;
|
|
2228
2246
|
|
|
2229
2247
|
interface IAPI$7 {
|
|
2230
2248
|
reorder: (context: Context, projectId: string, position: number) => Promise<boolean>;
|
|
@@ -2393,6 +2411,8 @@ declare const index$8_ProjectSchema: typeof ProjectSchema;
|
|
|
2393
2411
|
type index$8_Rating = Rating;
|
|
2394
2412
|
type index$8_RatingInput = RatingInput;
|
|
2395
2413
|
declare const index$8_RatingSchema: typeof RatingSchema;
|
|
2414
|
+
type index$8_RatingTag = RatingTag;
|
|
2415
|
+
declare const index$8_RatingTag: typeof RatingTag;
|
|
2396
2416
|
type index$8_SendToApproval = SendToApproval;
|
|
2397
2417
|
declare const index$8_StatusConfig: typeof StatusConfig;
|
|
2398
2418
|
type index$8_StatusConfigType = StatusConfigType;
|
|
@@ -2401,7 +2421,7 @@ declare const index$8_Styles: typeof Styles;
|
|
|
2401
2421
|
type index$8_TimelineItem = TimelineItem;
|
|
2402
2422
|
declare const index$8_TimelineItemSchema: typeof TimelineItemSchema;
|
|
2403
2423
|
declare namespace index$8 {
|
|
2404
|
-
export { type index$8_Approve as Approve, index$8_CaptionStyle as CaptionStyle, Endpoints$6 as Endpoints, type Project as Entity, type index$8_Feedback as Feedback, index$8_FeedbackSchema as FeedbackSchema, type IAPI$7 as IAPI, type index$8_Interaction as Interaction, index$8_InteractionSchema as InteractionSchema, index$8_InteractionType as InteractionType, type index$8_ProjectCreation as ProjectCreation, index$8_ProjectSchema as ProjectSchema, type index$8_Rating as Rating, type index$8_RatingInput as RatingInput, index$8_RatingSchema as RatingSchema, type index$8_SendToApproval as SendToApproval, Status$1 as Status, index$8_StatusConfig as StatusConfig, type index$8_StatusConfigType as StatusConfigType, type index$8_Style as Style, index$8_Styles as Styles, type index$8_TimelineItem as TimelineItem, index$8_TimelineItemSchema as TimelineItemSchema };
|
|
2424
|
+
export { type index$8_Approve as Approve, index$8_CaptionStyle as CaptionStyle, Endpoints$6 as Endpoints, type Project as Entity, type index$8_Feedback as Feedback, index$8_FeedbackSchema as FeedbackSchema, type IAPI$7 as IAPI, type index$8_Interaction as Interaction, index$8_InteractionSchema as InteractionSchema, index$8_InteractionType as InteractionType, type index$8_ProjectCreation as ProjectCreation, index$8_ProjectSchema as ProjectSchema, type index$8_Rating as Rating, type index$8_RatingInput as RatingInput, index$8_RatingSchema as RatingSchema, index$8_RatingTag as RatingTag, type index$8_SendToApproval as SendToApproval, Status$1 as Status, index$8_StatusConfig as StatusConfig, type index$8_StatusConfigType as StatusConfigType, type index$8_Style as Style, index$8_Styles as Styles, type index$8_TimelineItem as TimelineItem, index$8_TimelineItemSchema as TimelineItemSchema };
|
|
2405
2425
|
}
|
|
2406
2426
|
|
|
2407
2427
|
declare const DailyMilestoneSchema: z.ZodObject<{
|
|
@@ -3302,6 +3322,7 @@ declare const SpecialOfferSchema: z.ZodObject<{
|
|
|
3302
3322
|
description: z.ZodString;
|
|
3303
3323
|
ctaLabel: z.ZodString;
|
|
3304
3324
|
enabled: z.ZodBoolean;
|
|
3325
|
+
tenantIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3305
3326
|
}, "strip", z.ZodTypeAny, {
|
|
3306
3327
|
id: string;
|
|
3307
3328
|
title: string;
|
|
@@ -3312,6 +3333,7 @@ declare const SpecialOfferSchema: z.ZodObject<{
|
|
|
3312
3333
|
couponId: string;
|
|
3313
3334
|
ctaLabel: string;
|
|
3314
3335
|
enabled: boolean;
|
|
3336
|
+
tenantIds?: string[] | undefined;
|
|
3315
3337
|
}, {
|
|
3316
3338
|
id: string;
|
|
3317
3339
|
title: string;
|
|
@@ -3322,6 +3344,7 @@ declare const SpecialOfferSchema: z.ZodObject<{
|
|
|
3322
3344
|
couponId: string;
|
|
3323
3345
|
ctaLabel: string;
|
|
3324
3346
|
enabled: boolean;
|
|
3347
|
+
tenantIds?: string[] | undefined;
|
|
3325
3348
|
}>;
|
|
3326
3349
|
declare const UserOfferDetailsSchema: z.ZodObject<{
|
|
3327
3350
|
offerId: z.ZodString;
|
|
@@ -3350,6 +3373,7 @@ declare const CreateSpecialOfferSchema: z.ZodObject<{
|
|
|
3350
3373
|
title: z.ZodString;
|
|
3351
3374
|
description: z.ZodString;
|
|
3352
3375
|
ctaLabel: z.ZodString;
|
|
3376
|
+
tenantIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3353
3377
|
}, "strip", z.ZodTypeAny, {
|
|
3354
3378
|
title: string;
|
|
3355
3379
|
description: string;
|
|
@@ -3357,6 +3381,7 @@ declare const CreateSpecialOfferSchema: z.ZodObject<{
|
|
|
3357
3381
|
planId: string;
|
|
3358
3382
|
couponId: string;
|
|
3359
3383
|
ctaLabel: string;
|
|
3384
|
+
tenantIds?: string[] | undefined;
|
|
3360
3385
|
freeProjectsAllowed?: number | undefined;
|
|
3361
3386
|
}, {
|
|
3362
3387
|
title: string;
|
|
@@ -3365,6 +3390,7 @@ declare const CreateSpecialOfferSchema: z.ZodObject<{
|
|
|
3365
3390
|
planId: string;
|
|
3366
3391
|
couponId: string;
|
|
3367
3392
|
ctaLabel: string;
|
|
3393
|
+
tenantIds?: string[] | undefined;
|
|
3368
3394
|
freeProjectsAllowed?: number | undefined;
|
|
3369
3395
|
}>;
|
|
3370
3396
|
declare const UpdateSpecialOfferSchema: z.ZodObject<{
|
|
@@ -3375,9 +3401,11 @@ declare const UpdateSpecialOfferSchema: z.ZodObject<{
|
|
|
3375
3401
|
title: z.ZodOptional<z.ZodString>;
|
|
3376
3402
|
description: z.ZodOptional<z.ZodString>;
|
|
3377
3403
|
ctaLabel: z.ZodOptional<z.ZodString>;
|
|
3404
|
+
tenantIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3378
3405
|
}, "strip", z.ZodTypeAny, {
|
|
3379
3406
|
title?: string | undefined;
|
|
3380
3407
|
description?: string | undefined;
|
|
3408
|
+
tenantIds?: string[] | undefined;
|
|
3381
3409
|
freeProjectsAllowed?: number | undefined;
|
|
3382
3410
|
windowHours?: number | undefined;
|
|
3383
3411
|
planId?: string | undefined;
|
|
@@ -3386,6 +3414,7 @@ declare const UpdateSpecialOfferSchema: z.ZodObject<{
|
|
|
3386
3414
|
}, {
|
|
3387
3415
|
title?: string | undefined;
|
|
3388
3416
|
description?: string | undefined;
|
|
3417
|
+
tenantIds?: string[] | undefined;
|
|
3389
3418
|
freeProjectsAllowed?: number | undefined;
|
|
3390
3419
|
windowHours?: number | undefined;
|
|
3391
3420
|
planId?: string | undefined;
|
|
@@ -3399,7 +3428,7 @@ type Update = z.infer<typeof UpdateSpecialOfferSchema>;
|
|
|
3399
3428
|
|
|
3400
3429
|
interface IAPI$1 {
|
|
3401
3430
|
list: (ctx: Context) => Promise<SpecialOffer[]>;
|
|
3402
|
-
getActive: (ctx: Context) => Promise<SpecialOffer
|
|
3431
|
+
getActive: (ctx: Context) => Promise<SpecialOffer[]>;
|
|
3403
3432
|
create: (ctx: Context, data: Create) => Promise<SpecialOffer>;
|
|
3404
3433
|
update: (ctx: Context, id: string, data: Update) => Promise<void>;
|
|
3405
3434
|
enable: (ctx: Context, id: string) => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -5056,6 +5056,7 @@ __export(project_exports, {
|
|
|
5056
5056
|
InteractionType: () => InteractionType,
|
|
5057
5057
|
ProjectSchema: () => ProjectSchema,
|
|
5058
5058
|
RatingSchema: () => RatingSchema,
|
|
5059
|
+
RatingTag: () => RatingTag,
|
|
5059
5060
|
Status: () => Status2,
|
|
5060
5061
|
StatusConfig: () => StatusConfig,
|
|
5061
5062
|
Styles: () => Styles,
|
|
@@ -5141,8 +5142,20 @@ var FeedbackSchema = external_exports.object({
|
|
|
5141
5142
|
),
|
|
5142
5143
|
comment: external_exports.string().optional()
|
|
5143
5144
|
});
|
|
5145
|
+
var RatingTag = /* @__PURE__ */ ((RatingTag2) => {
|
|
5146
|
+
RatingTag2["GREAT_EDITING"] = "great_editing";
|
|
5147
|
+
RatingTag2["FAST_TURNAROUND"] = "fast_turnaround";
|
|
5148
|
+
RatingTag2["MATCHED_MY_STYLE"] = "matched_my_style";
|
|
5149
|
+
RatingTag2["CLEAR_AUDIO"] = "clear_audio";
|
|
5150
|
+
RatingTag2["POOR_EDITING"] = "poor_editing";
|
|
5151
|
+
RatingTag2["SLOW_TURNAROUND"] = "slow_turnaround";
|
|
5152
|
+
RatingTag2["OFF_MY_STYLE"] = "off_my_style";
|
|
5153
|
+
RatingTag2["AUDIO_ISSUES"] = "audio_issues";
|
|
5154
|
+
return RatingTag2;
|
|
5155
|
+
})(RatingTag || {});
|
|
5144
5156
|
var RatingSchema = external_exports.object({
|
|
5145
5157
|
score: external_exports.number().int().min(1).max(5),
|
|
5158
|
+
tags: external_exports.array(external_exports.nativeEnum(RatingTag)).max(8).optional(),
|
|
5146
5159
|
comment: external_exports.string().max(500).optional(),
|
|
5147
5160
|
timestamp: external_exports.number(),
|
|
5148
5161
|
deliveryIndex: external_exports.number().int().min(0)
|
|
@@ -5970,7 +5983,8 @@ var SpecialOfferSchema = external_exports.object({
|
|
|
5970
5983
|
title: external_exports.string(),
|
|
5971
5984
|
description: external_exports.string(),
|
|
5972
5985
|
ctaLabel: external_exports.string(),
|
|
5973
|
-
enabled: external_exports.boolean()
|
|
5986
|
+
enabled: external_exports.boolean(),
|
|
5987
|
+
tenantIds: external_exports.array(external_exports.string()).optional()
|
|
5974
5988
|
});
|
|
5975
5989
|
var UserOfferDetailsSchema = external_exports.object({
|
|
5976
5990
|
offerId: external_exports.string(),
|
|
@@ -5986,7 +6000,8 @@ var CreateSpecialOfferSchema = external_exports.object({
|
|
|
5986
6000
|
couponId: external_exports.string().min(1),
|
|
5987
6001
|
title: external_exports.string().min(1),
|
|
5988
6002
|
description: external_exports.string().min(1),
|
|
5989
|
-
ctaLabel: external_exports.string().min(1)
|
|
6003
|
+
ctaLabel: external_exports.string().min(1),
|
|
6004
|
+
tenantIds: external_exports.array(external_exports.string().min(1)).optional()
|
|
5990
6005
|
});
|
|
5991
6006
|
var UpdateSpecialOfferSchema = external_exports.object({
|
|
5992
6007
|
freeProjectsAllowed: external_exports.number().int().positive().optional(),
|
|
@@ -5995,7 +6010,8 @@ var UpdateSpecialOfferSchema = external_exports.object({
|
|
|
5995
6010
|
couponId: external_exports.string().min(1).optional(),
|
|
5996
6011
|
title: external_exports.string().min(1).optional(),
|
|
5997
6012
|
description: external_exports.string().min(1).optional(),
|
|
5998
|
-
ctaLabel: external_exports.string().min(1).optional()
|
|
6013
|
+
ctaLabel: external_exports.string().min(1).optional(),
|
|
6014
|
+
tenantIds: external_exports.array(external_exports.string().min(1)).optional()
|
|
5999
6015
|
});
|
|
6000
6016
|
|
|
6001
6017
|
// src/api/SpecialOffer.api.ts
|
|
@@ -6010,7 +6026,7 @@ var SpecialOfferAPI = class {
|
|
|
6010
6026
|
}
|
|
6011
6027
|
async getActive(ctx) {
|
|
6012
6028
|
const { uri, method } = Endpoints8.GetActive;
|
|
6013
|
-
return this.clientHTTP.makeRequest(this.env, uri, method, null, ctx,
|
|
6029
|
+
return this.clientHTTP.makeRequest(this.env, uri, method, null, ctx, external_exports.array(SpecialOfferSchema));
|
|
6014
6030
|
}
|
|
6015
6031
|
async create(ctx, data) {
|
|
6016
6032
|
const { uri, method } = Endpoints8.Create;
|