shred-api-client 2.4.1-rc.0 → 2.4.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 +23 -4
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -550,7 +550,24 @@ declare const SubscriptionSchema: z.ZodObject<{
|
|
|
550
550
|
subscriptionItemId: string;
|
|
551
551
|
} | undefined;
|
|
552
552
|
}>;
|
|
553
|
+
declare const SubscriptionSummarySchema: z.ZodObject<{
|
|
554
|
+
tenantId: z.ZodBoolean;
|
|
555
|
+
productId: z.ZodString;
|
|
556
|
+
productName: z.ZodString;
|
|
557
|
+
email: z.ZodString;
|
|
558
|
+
}, "strip", z.ZodTypeAny, {
|
|
559
|
+
email: string;
|
|
560
|
+
tenantId: boolean;
|
|
561
|
+
productId: string;
|
|
562
|
+
productName: string;
|
|
563
|
+
}, {
|
|
564
|
+
email: string;
|
|
565
|
+
tenantId: boolean;
|
|
566
|
+
productId: string;
|
|
567
|
+
productName: string;
|
|
568
|
+
}>;
|
|
553
569
|
type Subscription = z.infer<typeof SubscriptionSchema>;
|
|
570
|
+
type SubscriptionSummary = z.infer<typeof SubscriptionSummarySchema>;
|
|
554
571
|
type Charge = z.infer<typeof ChargeSchema>;
|
|
555
572
|
type Plan = z.infer<typeof PlanSchema>;
|
|
556
573
|
type Product = z.infer<typeof ProductSchema>;
|
|
@@ -566,6 +583,7 @@ interface IAPI$9 {
|
|
|
566
583
|
resume: (ctx: Context) => Promise<boolean>;
|
|
567
584
|
updatePlan: (ctx: Context, planId: string) => Promise<boolean>;
|
|
568
585
|
createCheckout: (planId: string | null, ctx: Context) => Promise<string>;
|
|
586
|
+
getSubscriptionsSummary: (ctx: Context) => Promise<SubscriptionSummary[]>;
|
|
569
587
|
}
|
|
570
588
|
declare const Endpoints$8: {
|
|
571
589
|
GetPortal: {
|
|
@@ -616,6 +634,10 @@ declare const Endpoints$8: {
|
|
|
616
634
|
uri: string;
|
|
617
635
|
method: string;
|
|
618
636
|
};
|
|
637
|
+
GetSubscriptionSummary: {
|
|
638
|
+
uri: string;
|
|
639
|
+
method: string;
|
|
640
|
+
};
|
|
619
641
|
};
|
|
620
642
|
|
|
621
643
|
type index$b_Charge = Charge;
|
|
@@ -629,7 +651,7 @@ declare const index$b_SubscriptionTypeSchema: typeof SubscriptionTypeSchema;
|
|
|
629
651
|
type index$b_Type = Type;
|
|
630
652
|
declare const index$b_Type: typeof Type;
|
|
631
653
|
declare namespace index$b {
|
|
632
|
-
export { type index$b_Charge as Charge, index$b_ChargeSchema as ChargeSchema, Endpoints$8 as Endpoints, type Subscription as Entity, type IAPI$9 as IAPI, type index$b_Plan as Plan, index$b_PlanSchema as PlanSchema, type index$b_Product as Product, index$b_ProductSchema as ProductSchema, index$b_SubscriptionSchema as SubscriptionSchema, index$b_SubscriptionTypeSchema as SubscriptionTypeSchema, index$b_Type as Type };
|
|
654
|
+
export { type index$b_Charge as Charge, index$b_ChargeSchema as ChargeSchema, Endpoints$8 as Endpoints, type Subscription as Entity, type IAPI$9 as IAPI, type index$b_Plan as Plan, index$b_PlanSchema as PlanSchema, type index$b_Product as Product, index$b_ProductSchema as ProductSchema, index$b_SubscriptionSchema as SubscriptionSchema, index$b_SubscriptionTypeSchema as SubscriptionTypeSchema, type SubscriptionSummary as Summary, index$b_Type as Type };
|
|
633
655
|
}
|
|
634
656
|
|
|
635
657
|
declare enum Role {
|
|
@@ -1709,7 +1731,6 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1709
1731
|
}[];
|
|
1710
1732
|
comment?: string | undefined;
|
|
1711
1733
|
}>>;
|
|
1712
|
-
isFeedbackEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
1713
1734
|
captionSuggestion: z.ZodOptional<z.ZodString>;
|
|
1714
1735
|
editorId: z.ZodOptional<z.ZodString>;
|
|
1715
1736
|
userId: z.ZodString;
|
|
@@ -1811,7 +1832,6 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1811
1832
|
duration?: number | undefined;
|
|
1812
1833
|
progress?: number | undefined;
|
|
1813
1834
|
}[] | undefined;
|
|
1814
|
-
isFeedbackEnabled?: boolean | undefined;
|
|
1815
1835
|
editorId?: string | undefined;
|
|
1816
1836
|
finalVideoId?: string | undefined;
|
|
1817
1837
|
feedback?: {
|
|
@@ -1859,7 +1879,6 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1859
1879
|
duration?: number | undefined;
|
|
1860
1880
|
progress?: number | undefined;
|
|
1861
1881
|
}[] | undefined;
|
|
1862
|
-
isFeedbackEnabled?: boolean | undefined;
|
|
1863
1882
|
editorId?: string | undefined;
|
|
1864
1883
|
finalVideoId?: string | undefined;
|
|
1865
1884
|
feedback?: {
|
package/dist/index.js
CHANGED
|
@@ -4589,6 +4589,17 @@ var SubscriptionAPI = class {
|
|
|
4589
4589
|
);
|
|
4590
4590
|
return data;
|
|
4591
4591
|
}
|
|
4592
|
+
async getSubscriptionsSummary(ctx) {
|
|
4593
|
+
const endpointInfo = subscription_exports.Endpoints.GetSubscriptionSummary;
|
|
4594
|
+
const data = await this.clientHTTP.makeRequest(
|
|
4595
|
+
this.env,
|
|
4596
|
+
endpointInfo.uri,
|
|
4597
|
+
endpointInfo.method,
|
|
4598
|
+
null,
|
|
4599
|
+
ctx
|
|
4600
|
+
);
|
|
4601
|
+
return data.url;
|
|
4602
|
+
}
|
|
4592
4603
|
async createCheckout(planId, ctx) {
|
|
4593
4604
|
const endpointInfo = subscription_exports.Endpoints.Checkout;
|
|
4594
4605
|
const data = await this.clientHTTP.makeRequest(
|
|
@@ -5032,7 +5043,6 @@ var ProjectSchema = external_exports.object({
|
|
|
5032
5043
|
thumbnailUrl: external_exports.string().optional(),
|
|
5033
5044
|
modified: external_exports.number(),
|
|
5034
5045
|
feedback: FeedbackSchema.optional(),
|
|
5035
|
-
isFeedbackEnabled: external_exports.boolean().default(true).optional(),
|
|
5036
5046
|
captionSuggestion: external_exports.string().optional(),
|
|
5037
5047
|
editorId: external_exports.string().optional(),
|
|
5038
5048
|
userId: external_exports.string(),
|
|
@@ -5886,6 +5896,12 @@ var SubscriptionSchema = external_exports.object({
|
|
|
5886
5896
|
type: external_exports.nativeEnum(Type).optional(),
|
|
5887
5897
|
plan: PlanSchema.optional()
|
|
5888
5898
|
});
|
|
5899
|
+
var SubscriptionSummarySchema = external_exports.object({
|
|
5900
|
+
tenantId: external_exports.boolean(),
|
|
5901
|
+
productId: external_exports.string(),
|
|
5902
|
+
productName: external_exports.string(),
|
|
5903
|
+
email: external_exports.string()
|
|
5904
|
+
});
|
|
5889
5905
|
|
|
5890
5906
|
// src/model/tenant/Tenant.schema.ts
|
|
5891
5907
|
var PreferencesSchema = external_exports.object({
|
|
@@ -6089,6 +6105,10 @@ var Endpoints10 = {
|
|
|
6089
6105
|
UpdatePlan: {
|
|
6090
6106
|
uri: "/subscriptions/plan/update/",
|
|
6091
6107
|
method: "PUT"
|
|
6108
|
+
},
|
|
6109
|
+
GetSubscriptionSummary: {
|
|
6110
|
+
uri: "/subscriptions/summary/list/",
|
|
6111
|
+
method: "GET"
|
|
6092
6112
|
}
|
|
6093
6113
|
};
|
|
6094
6114
|
|