shred-api-client 2.0.10 → 2.0.12
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.mts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -251,6 +251,7 @@ declare const ProductSchema: z.ZodObject<{
|
|
|
251
251
|
description: string;
|
|
252
252
|
subtitle: string;
|
|
253
253
|
}>, "many">;
|
|
254
|
+
percentOff: z.ZodDefault<z.ZodNumber>;
|
|
254
255
|
metadata: z.ZodAny;
|
|
255
256
|
plans: z.ZodArray<z.ZodObject<{
|
|
256
257
|
id: z.ZodString;
|
|
@@ -281,6 +282,7 @@ declare const ProductSchema: z.ZodObject<{
|
|
|
281
282
|
description: string;
|
|
282
283
|
subtitle: string;
|
|
283
284
|
}[];
|
|
285
|
+
percentOff: number;
|
|
284
286
|
plans: {
|
|
285
287
|
id: string;
|
|
286
288
|
metadata: Record<string, string>;
|
|
@@ -306,6 +308,7 @@ declare const ProductSchema: z.ZodObject<{
|
|
|
306
308
|
subscriptionItemId: string;
|
|
307
309
|
}[];
|
|
308
310
|
metadata?: any;
|
|
311
|
+
percentOff?: number | undefined;
|
|
309
312
|
}>;
|
|
310
313
|
declare const ChargeSchema: z.ZodObject<{
|
|
311
314
|
id: z.ZodNumber;
|
|
@@ -360,6 +363,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
360
363
|
description: string;
|
|
361
364
|
subtitle: string;
|
|
362
365
|
}>, "many">;
|
|
366
|
+
percentOff: z.ZodDefault<z.ZodNumber>;
|
|
363
367
|
metadata: z.ZodAny;
|
|
364
368
|
plans: z.ZodArray<z.ZodObject<{
|
|
365
369
|
id: z.ZodString;
|
|
@@ -390,6 +394,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
390
394
|
description: string;
|
|
391
395
|
subtitle: string;
|
|
392
396
|
}[];
|
|
397
|
+
percentOff: number;
|
|
393
398
|
plans: {
|
|
394
399
|
id: string;
|
|
395
400
|
metadata: Record<string, string>;
|
|
@@ -415,6 +420,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
415
420
|
subscriptionItemId: string;
|
|
416
421
|
}[];
|
|
417
422
|
metadata?: any;
|
|
423
|
+
percentOff?: number | undefined;
|
|
418
424
|
}>;
|
|
419
425
|
type: z.ZodOptional<z.ZodNativeEnum<typeof Type>>;
|
|
420
426
|
plan: z.ZodOptional<z.ZodObject<{
|
|
@@ -449,6 +455,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
449
455
|
description: string;
|
|
450
456
|
subtitle: string;
|
|
451
457
|
}[];
|
|
458
|
+
percentOff: number;
|
|
452
459
|
plans: {
|
|
453
460
|
id: string;
|
|
454
461
|
metadata: Record<string, string>;
|
|
@@ -493,6 +500,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
493
500
|
subscriptionItemId: string;
|
|
494
501
|
}[];
|
|
495
502
|
metadata?: any;
|
|
503
|
+
percentOff?: number | undefined;
|
|
496
504
|
};
|
|
497
505
|
type?: Type | undefined;
|
|
498
506
|
startDate?: number | undefined;
|
|
@@ -903,6 +911,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
903
911
|
description: string;
|
|
904
912
|
subtitle: string;
|
|
905
913
|
}>, "many">;
|
|
914
|
+
percentOff: z.ZodDefault<z.ZodNumber>;
|
|
906
915
|
metadata: z.ZodAny;
|
|
907
916
|
plans: z.ZodArray<z.ZodObject<{
|
|
908
917
|
id: z.ZodString;
|
|
@@ -933,6 +942,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
933
942
|
description: string;
|
|
934
943
|
subtitle: string;
|
|
935
944
|
}[];
|
|
945
|
+
percentOff: number;
|
|
936
946
|
plans: {
|
|
937
947
|
id: string;
|
|
938
948
|
metadata: Record<string, string>;
|
|
@@ -958,6 +968,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
958
968
|
subscriptionItemId: string;
|
|
959
969
|
}[];
|
|
960
970
|
metadata?: any;
|
|
971
|
+
percentOff?: number | undefined;
|
|
961
972
|
}>;
|
|
962
973
|
type: z.ZodOptional<z.ZodNativeEnum<typeof Type>>;
|
|
963
974
|
plan: z.ZodOptional<z.ZodObject<{
|
|
@@ -992,6 +1003,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
992
1003
|
description: string;
|
|
993
1004
|
subtitle: string;
|
|
994
1005
|
}[];
|
|
1006
|
+
percentOff: number;
|
|
995
1007
|
plans: {
|
|
996
1008
|
id: string;
|
|
997
1009
|
metadata: Record<string, string>;
|
|
@@ -1036,6 +1048,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1036
1048
|
subscriptionItemId: string;
|
|
1037
1049
|
}[];
|
|
1038
1050
|
metadata?: any;
|
|
1051
|
+
percentOff?: number | undefined;
|
|
1039
1052
|
};
|
|
1040
1053
|
type?: Type | undefined;
|
|
1041
1054
|
startDate?: number | undefined;
|
|
@@ -1084,6 +1097,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1084
1097
|
description: string;
|
|
1085
1098
|
subtitle: string;
|
|
1086
1099
|
}[];
|
|
1100
|
+
percentOff: number;
|
|
1087
1101
|
plans: {
|
|
1088
1102
|
id: string;
|
|
1089
1103
|
metadata: Record<string, string>;
|
|
@@ -1150,6 +1164,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1150
1164
|
subscriptionItemId: string;
|
|
1151
1165
|
}[];
|
|
1152
1166
|
metadata?: any;
|
|
1167
|
+
percentOff?: number | undefined;
|
|
1153
1168
|
};
|
|
1154
1169
|
type?: Type | undefined;
|
|
1155
1170
|
startDate?: number | undefined;
|
|
@@ -1511,6 +1526,7 @@ type Project = z.infer<typeof ProjectSchema>;
|
|
|
1511
1526
|
type TimelineItem = z.infer<typeof TimelineItemSchema>;
|
|
1512
1527
|
|
|
1513
1528
|
interface IAPI$4 {
|
|
1529
|
+
reorder: (context: Context, projectId: string, position: number) => Promise<boolean>;
|
|
1514
1530
|
find: (context: Context, projectId: string) => Promise<Project>;
|
|
1515
1531
|
create: (context: Context, data: ProjectCreation) => Promise<Project>;
|
|
1516
1532
|
review: (context: Context, projectId: string, revision: string) => Promise<boolean>;
|
|
@@ -1529,6 +1545,10 @@ interface IAPI$4 {
|
|
|
1529
1545
|
};
|
|
1530
1546
|
}
|
|
1531
1547
|
declare const Endpoints$3: {
|
|
1548
|
+
Reorder: {
|
|
1549
|
+
uri: string;
|
|
1550
|
+
method: string;
|
|
1551
|
+
};
|
|
1532
1552
|
List: {
|
|
1533
1553
|
uri: string;
|
|
1534
1554
|
method: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -251,6 +251,7 @@ declare const ProductSchema: z.ZodObject<{
|
|
|
251
251
|
description: string;
|
|
252
252
|
subtitle: string;
|
|
253
253
|
}>, "many">;
|
|
254
|
+
percentOff: z.ZodDefault<z.ZodNumber>;
|
|
254
255
|
metadata: z.ZodAny;
|
|
255
256
|
plans: z.ZodArray<z.ZodObject<{
|
|
256
257
|
id: z.ZodString;
|
|
@@ -281,6 +282,7 @@ declare const ProductSchema: z.ZodObject<{
|
|
|
281
282
|
description: string;
|
|
282
283
|
subtitle: string;
|
|
283
284
|
}[];
|
|
285
|
+
percentOff: number;
|
|
284
286
|
plans: {
|
|
285
287
|
id: string;
|
|
286
288
|
metadata: Record<string, string>;
|
|
@@ -306,6 +308,7 @@ declare const ProductSchema: z.ZodObject<{
|
|
|
306
308
|
subscriptionItemId: string;
|
|
307
309
|
}[];
|
|
308
310
|
metadata?: any;
|
|
311
|
+
percentOff?: number | undefined;
|
|
309
312
|
}>;
|
|
310
313
|
declare const ChargeSchema: z.ZodObject<{
|
|
311
314
|
id: z.ZodNumber;
|
|
@@ -360,6 +363,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
360
363
|
description: string;
|
|
361
364
|
subtitle: string;
|
|
362
365
|
}>, "many">;
|
|
366
|
+
percentOff: z.ZodDefault<z.ZodNumber>;
|
|
363
367
|
metadata: z.ZodAny;
|
|
364
368
|
plans: z.ZodArray<z.ZodObject<{
|
|
365
369
|
id: z.ZodString;
|
|
@@ -390,6 +394,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
390
394
|
description: string;
|
|
391
395
|
subtitle: string;
|
|
392
396
|
}[];
|
|
397
|
+
percentOff: number;
|
|
393
398
|
plans: {
|
|
394
399
|
id: string;
|
|
395
400
|
metadata: Record<string, string>;
|
|
@@ -415,6 +420,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
415
420
|
subscriptionItemId: string;
|
|
416
421
|
}[];
|
|
417
422
|
metadata?: any;
|
|
423
|
+
percentOff?: number | undefined;
|
|
418
424
|
}>;
|
|
419
425
|
type: z.ZodOptional<z.ZodNativeEnum<typeof Type>>;
|
|
420
426
|
plan: z.ZodOptional<z.ZodObject<{
|
|
@@ -449,6 +455,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
449
455
|
description: string;
|
|
450
456
|
subtitle: string;
|
|
451
457
|
}[];
|
|
458
|
+
percentOff: number;
|
|
452
459
|
plans: {
|
|
453
460
|
id: string;
|
|
454
461
|
metadata: Record<string, string>;
|
|
@@ -493,6 +500,7 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
493
500
|
subscriptionItemId: string;
|
|
494
501
|
}[];
|
|
495
502
|
metadata?: any;
|
|
503
|
+
percentOff?: number | undefined;
|
|
496
504
|
};
|
|
497
505
|
type?: Type | undefined;
|
|
498
506
|
startDate?: number | undefined;
|
|
@@ -903,6 +911,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
903
911
|
description: string;
|
|
904
912
|
subtitle: string;
|
|
905
913
|
}>, "many">;
|
|
914
|
+
percentOff: z.ZodDefault<z.ZodNumber>;
|
|
906
915
|
metadata: z.ZodAny;
|
|
907
916
|
plans: z.ZodArray<z.ZodObject<{
|
|
908
917
|
id: z.ZodString;
|
|
@@ -933,6 +942,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
933
942
|
description: string;
|
|
934
943
|
subtitle: string;
|
|
935
944
|
}[];
|
|
945
|
+
percentOff: number;
|
|
936
946
|
plans: {
|
|
937
947
|
id: string;
|
|
938
948
|
metadata: Record<string, string>;
|
|
@@ -958,6 +968,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
958
968
|
subscriptionItemId: string;
|
|
959
969
|
}[];
|
|
960
970
|
metadata?: any;
|
|
971
|
+
percentOff?: number | undefined;
|
|
961
972
|
}>;
|
|
962
973
|
type: z.ZodOptional<z.ZodNativeEnum<typeof Type>>;
|
|
963
974
|
plan: z.ZodOptional<z.ZodObject<{
|
|
@@ -992,6 +1003,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
992
1003
|
description: string;
|
|
993
1004
|
subtitle: string;
|
|
994
1005
|
}[];
|
|
1006
|
+
percentOff: number;
|
|
995
1007
|
plans: {
|
|
996
1008
|
id: string;
|
|
997
1009
|
metadata: Record<string, string>;
|
|
@@ -1036,6 +1048,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1036
1048
|
subscriptionItemId: string;
|
|
1037
1049
|
}[];
|
|
1038
1050
|
metadata?: any;
|
|
1051
|
+
percentOff?: number | undefined;
|
|
1039
1052
|
};
|
|
1040
1053
|
type?: Type | undefined;
|
|
1041
1054
|
startDate?: number | undefined;
|
|
@@ -1084,6 +1097,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1084
1097
|
description: string;
|
|
1085
1098
|
subtitle: string;
|
|
1086
1099
|
}[];
|
|
1100
|
+
percentOff: number;
|
|
1087
1101
|
plans: {
|
|
1088
1102
|
id: string;
|
|
1089
1103
|
metadata: Record<string, string>;
|
|
@@ -1150,6 +1164,7 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1150
1164
|
subscriptionItemId: string;
|
|
1151
1165
|
}[];
|
|
1152
1166
|
metadata?: any;
|
|
1167
|
+
percentOff?: number | undefined;
|
|
1153
1168
|
};
|
|
1154
1169
|
type?: Type | undefined;
|
|
1155
1170
|
startDate?: number | undefined;
|
|
@@ -1511,6 +1526,7 @@ type Project = z.infer<typeof ProjectSchema>;
|
|
|
1511
1526
|
type TimelineItem = z.infer<typeof TimelineItemSchema>;
|
|
1512
1527
|
|
|
1513
1528
|
interface IAPI$4 {
|
|
1529
|
+
reorder: (context: Context, projectId: string, position: number) => Promise<boolean>;
|
|
1514
1530
|
find: (context: Context, projectId: string) => Promise<Project>;
|
|
1515
1531
|
create: (context: Context, data: ProjectCreation) => Promise<Project>;
|
|
1516
1532
|
review: (context: Context, projectId: string, revision: string) => Promise<boolean>;
|
|
@@ -1529,6 +1545,10 @@ interface IAPI$4 {
|
|
|
1529
1545
|
};
|
|
1530
1546
|
}
|
|
1531
1547
|
declare const Endpoints$3: {
|
|
1548
|
+
Reorder: {
|
|
1549
|
+
uri: string;
|
|
1550
|
+
method: string;
|
|
1551
|
+
};
|
|
1532
1552
|
List: {
|
|
1533
1553
|
uri: string;
|
|
1534
1554
|
method: string;
|
package/dist/index.js
CHANGED
|
@@ -960,6 +960,7 @@ var ProjectSchema = import_zod4.z.object({
|
|
|
960
960
|
|
|
961
961
|
// src/model/project/Project.api.ts
|
|
962
962
|
var Endpoints3 = {
|
|
963
|
+
Reorder: { uri: "/projects/reorder/", method: "POST" },
|
|
963
964
|
List: { uri: "/projects/list", method: "GET" },
|
|
964
965
|
GetNext: { uri: "/projects/:userId/next", method: "GET" },
|
|
965
966
|
CreateProject: { uri: "/projects/create", method: "POST" },
|
|
@@ -1002,6 +1003,17 @@ var ProjectAPI = class {
|
|
|
1002
1003
|
this.env = env;
|
|
1003
1004
|
this.clientHTTP = new HTTPClient();
|
|
1004
1005
|
}
|
|
1006
|
+
async reorder(ctx, projectId, position) {
|
|
1007
|
+
const endpointData = Endpoints3.Reorder;
|
|
1008
|
+
const data = await this.clientHTTP.makeRequest(
|
|
1009
|
+
this.env,
|
|
1010
|
+
endpointData.uri,
|
|
1011
|
+
endpointData.method,
|
|
1012
|
+
{ projectId, position },
|
|
1013
|
+
ctx
|
|
1014
|
+
);
|
|
1015
|
+
return data.success;
|
|
1016
|
+
}
|
|
1005
1017
|
async getNext(ctx, userId) {
|
|
1006
1018
|
const endpointData = Endpoints3.GetNext;
|
|
1007
1019
|
const endpoint = endpointData.uri.replace(":userId", userId);
|
|
@@ -1530,6 +1542,7 @@ var ProductSchema = import_zod8.z.object({
|
|
|
1530
1542
|
id: import_zod8.z.string(),
|
|
1531
1543
|
name: import_zod8.z.string(),
|
|
1532
1544
|
descriptions: import_zod8.z.array(DescriptionSchema),
|
|
1545
|
+
percentOff: import_zod8.z.number().default(0),
|
|
1533
1546
|
metadata: import_zod8.z.any(),
|
|
1534
1547
|
plans: import_zod8.z.array(PlanSchema)
|
|
1535
1548
|
});
|