controlresell 2.9.0 → 2.9.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/package.json +2 -2
- package/src/com/controlresell/api/responses/ErrorResponse.d.ts +16 -0
- package/src/com/controlresell/api/responses/ErrorResponse.d.ts.map +1 -0
- package/src/com/controlresell/api/responses/ErrorResponse.js +7 -0
- package/src/com/controlresell/api/responses/ErrorResponse.js.map +1 -0
- package/src/com/controlresell/api/responses/ErrorResponse.ts +8 -0
- package/src/com/controlresell/api/responses/items/ItemAction.d.ts +4 -0
- package/src/com/controlresell/api/responses/items/ItemAction.d.ts.map +1 -0
- package/src/com/controlresell/api/responses/items/ItemAction.js +5 -0
- package/src/com/controlresell/api/responses/items/ItemAction.js.map +1 -0
- package/src/com/controlresell/api/responses/items/ItemAction.ts +6 -0
- package/src/com/controlresell/{inventory/models → api/responses}/items/ItemsWithFilters.d.ts +30 -144
- package/src/com/controlresell/{inventory/models → api/responses}/items/ItemsWithFilters.d.ts.map +1 -1
- package/src/com/controlresell/{inventory/models → api/responses}/items/ItemsWithFilters.js +2 -2
- package/src/com/controlresell/api/responses/items/ItemsWithFilters.js.map +1 -0
- package/src/com/controlresell/{inventory/models → api/responses}/items/ItemsWithFilters.ts +2 -2
- package/src/com/controlresell/api/responses/items/ListedItem.d.ts +1995 -0
- package/src/com/controlresell/api/responses/items/ListedItem.d.ts.map +1 -0
- package/src/com/controlresell/api/responses/items/ListedItem.js +42 -0
- package/src/com/controlresell/api/responses/items/ListedItem.js.map +1 -0
- package/src/com/controlresell/api/responses/items/ListedItem.ts +43 -0
- package/src/com/controlresell/api/responses/quizresponses/QuizResponseBaseResponse.d.ts +3 -3
- package/src/com/controlresell/api/responses/quizresponses/QuizResponseBaseResponse.js +1 -1
- package/src/com/controlresell/api/responses/quizresponses/QuizResponseBaseResponse.js.map +1 -1
- package/src/com/controlresell/api/responses/quizresponses/QuizResponseBaseResponse.ts +1 -1
- package/src/com/controlresell/api/responses/subscriptions/SubscriptionStatus.d.ts +158 -18
- package/src/com/controlresell/api/responses/subscriptions/SubscriptionStatus.d.ts.map +1 -1
- package/src/com/controlresell/api/responses/subscriptions/SubscriptionStatus.js +2 -1
- package/src/com/controlresell/api/responses/subscriptions/SubscriptionStatus.js.map +1 -1
- package/src/com/controlresell/api/responses/subscriptions/SubscriptionStatus.ts +2 -1
- package/src/com/controlresell/subscriptions/api/CreateSubscriptionHistoryPayload.d.ts +109 -9
- package/src/com/controlresell/subscriptions/api/CreateSubscriptionHistoryPayload.d.ts.map +1 -1
- package/src/com/controlresell/subscriptions/api/CreateSubscriptionHistoryPayload.js +6 -3
- package/src/com/controlresell/subscriptions/api/CreateSubscriptionHistoryPayload.js.map +1 -1
- package/src/com/controlresell/subscriptions/api/CreateSubscriptionHistoryPayload.ts +6 -3
- package/src/com/controlresell/subscriptions/models/CancellationReason.d.ts +4 -0
- package/src/com/controlresell/subscriptions/models/CancellationReason.d.ts.map +1 -0
- package/src/com/controlresell/subscriptions/models/CancellationReason.js +5 -0
- package/src/com/controlresell/subscriptions/models/CancellationReason.js.map +1 -0
- package/src/com/controlresell/subscriptions/models/CancellationReason.ts +6 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistory.d.ts +109 -9
- package/src/com/controlresell/subscriptions/models/SubscriptionHistory.d.ts.map +1 -1
- package/src/com/controlresell/subscriptions/models/SubscriptionHistory.js +6 -3
- package/src/com/controlresell/subscriptions/models/SubscriptionHistory.js.map +1 -1
- package/src/com/controlresell/subscriptions/models/SubscriptionHistory.ts +6 -3
- package/src/com/controlresell/subscriptions/models/SubscriptionHistoryMetadata.d.ts +132 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistoryMetadata.d.ts.map +1 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistoryMetadata.js +33 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistoryMetadata.js.map +1 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistoryMetadata.ts +42 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistorySource.d.ts +4 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistorySource.d.ts.map +1 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistorySource.js +5 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistorySource.js.map +1 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistorySource.ts +6 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistoryType.d.ts +4 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistoryType.d.ts.map +1 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistoryType.js +5 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistoryType.js.map +1 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionHistoryType.ts +6 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionState.d.ts +4 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionState.d.ts.map +1 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionState.js +5 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionState.js.map +1 -0
- package/src/com/controlresell/subscriptions/models/SubscriptionState.ts +6 -0
- package/src/index.d.ts +9 -1
- package/src/index.d.ts.map +1 -1
- package/src/index.js +9 -1
- package/src/index.js.map +1 -1
- package/src/index.ts +9 -1
- package/src/com/controlresell/inventory/models/items/ItemsWithFilters.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListedItem.d.ts","sourceRoot":"","sources":["ListedItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AASrB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
import { ItemLabelSchema } from "../../../inventory/models/items/labels/ItemLabel";
|
|
5
|
+
import { ItemFieldSchema } from "../../../inventory/models/items/fields/ItemField";
|
|
6
|
+
import { ItemHistorySchema } from "../../../inventory/models/items/history/ItemHistory";
|
|
7
|
+
import { ItemOnPlatformSchema } from "../../../inventory/models/items/platforms/ItemOnPlatform";
|
|
8
|
+
import { ItemActionSchema } from "./ItemAction";
|
|
9
|
+
export const ListedItemSchema = z.object({
|
|
10
|
+
id: z.number(),
|
|
11
|
+
userId: z.number(),
|
|
12
|
+
name: z.string(),
|
|
13
|
+
sku: z.string().nullish(),
|
|
14
|
+
description: z.string().nullish(),
|
|
15
|
+
files: z.array(ItemFileSchema).nullish(),
|
|
16
|
+
categoryId: z.number().nullish(),
|
|
17
|
+
brandId: z.number().nullish(),
|
|
18
|
+
sex: z.string().nullish(),
|
|
19
|
+
state: z.number().nullish(),
|
|
20
|
+
sizeId: z.number().nullish(),
|
|
21
|
+
purchasePrice: z.number().nullish(),
|
|
22
|
+
purchaseDate: z.coerce.date().nullish(),
|
|
23
|
+
purchasePlaceId: z.number().nullish(),
|
|
24
|
+
sold: z.boolean(),
|
|
25
|
+
purchased: z.boolean().nullish(),
|
|
26
|
+
sellingPrice: z.number().nullish(),
|
|
27
|
+
sellingDate: z.coerce.date().nullish(),
|
|
28
|
+
sellingPlaceId: z.number().nullish(),
|
|
29
|
+
estimatedPrice: z.number().nullish(),
|
|
30
|
+
fees: z.array(FeeSchema).nullish(),
|
|
31
|
+
feesSum: z.number().nullish(),
|
|
32
|
+
labels: z.array(ItemLabelSchema).nullish(),
|
|
33
|
+
colorIds: z.array(z.number()).nullish(),
|
|
34
|
+
packageSizeId: z.number().nullish(),
|
|
35
|
+
fields: z.array(ItemFieldSchema).nullish(),
|
|
36
|
+
lastHistory: ItemHistorySchema.nullish(),
|
|
37
|
+
platforms: z.array(ItemOnPlatformSchema).nullish(),
|
|
38
|
+
actions: z.array(ItemActionSchema),
|
|
39
|
+
createdAt: z.coerce.date(),
|
|
40
|
+
updatedAt: z.coerce.date()
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=ListedItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListedItem.js","sourceRoot":"","sources":["ListedItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AACrB,OAAO,EAAC,cAAc,EAAC,MAAM,gDAAgD,CAAA;AAC7E,OAAO,EAAC,SAAS,EAAC,MAAM,oCAAoC,CAAA;AAC5D,OAAO,EAAC,eAAe,EAAC,MAAM,kDAAkD,CAAA;AAChF,OAAO,EAAC,eAAe,EAAC,MAAM,kDAAkD,CAAA;AAChF,OAAO,EAAC,iBAAiB,EAAC,MAAM,qDAAqD,CAAA;AACrF,OAAO,EAAC,oBAAoB,EAAC,MAAM,0DAA0D,CAAA;AAC7F,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAA;AAE7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACzB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACjC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,OAAO,EAAE;IACxC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAChC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC7B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACzB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC3B,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C,CAAC,MAAM,CAAC,IAAI,EAAE;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE;CAC7B,CAAC,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
import {ItemFileSchema} from "../../../inventory/models/items/files/ItemFile"
|
|
3
|
+
import {FeeSchema} from "../../../inventory/models/fees/Fee"
|
|
4
|
+
import {ItemLabelSchema} from "../../../inventory/models/items/labels/ItemLabel"
|
|
5
|
+
import {ItemFieldSchema} from "../../../inventory/models/items/fields/ItemField"
|
|
6
|
+
import {ItemHistorySchema} from "../../../inventory/models/items/history/ItemHistory"
|
|
7
|
+
import {ItemOnPlatformSchema} from "../../../inventory/models/items/platforms/ItemOnPlatform"
|
|
8
|
+
import {ItemActionSchema} from "./ItemAction"
|
|
9
|
+
|
|
10
|
+
export const ListedItemSchema = z.object({
|
|
11
|
+
id: z.number(),
|
|
12
|
+
userId: z.number(),
|
|
13
|
+
name: z.string(),
|
|
14
|
+
sku: z.string().nullish(),
|
|
15
|
+
description: z.string().nullish(),
|
|
16
|
+
files: z.array(ItemFileSchema).nullish(),
|
|
17
|
+
categoryId: z.number().nullish(),
|
|
18
|
+
brandId: z.number().nullish(),
|
|
19
|
+
sex: z.string().nullish(),
|
|
20
|
+
state: z.number().nullish(),
|
|
21
|
+
sizeId: z.number().nullish(),
|
|
22
|
+
purchasePrice: z.number().nullish(),
|
|
23
|
+
purchaseDate: z.coerce.date().nullish(),
|
|
24
|
+
purchasePlaceId: z.number().nullish(),
|
|
25
|
+
sold: z.boolean(),
|
|
26
|
+
purchased: z.boolean().nullish(),
|
|
27
|
+
sellingPrice: z.number().nullish(),
|
|
28
|
+
sellingDate: z.coerce.date().nullish(),
|
|
29
|
+
sellingPlaceId: z.number().nullish(),
|
|
30
|
+
estimatedPrice: z.number().nullish(),
|
|
31
|
+
fees: z.array(FeeSchema).nullish(),
|
|
32
|
+
feesSum: z.number().nullish(),
|
|
33
|
+
labels: z.array(ItemLabelSchema).nullish(),
|
|
34
|
+
colorIds: z.array(z.number()).nullish(),
|
|
35
|
+
packageSizeId: z.number().nullish(),
|
|
36
|
+
fields: z.array(ItemFieldSchema).nullish(),
|
|
37
|
+
lastHistory: ItemHistorySchema.nullish(),
|
|
38
|
+
platforms: z.array(ItemOnPlatformSchema).nullish(),
|
|
39
|
+
actions: z.array(ItemActionSchema),
|
|
40
|
+
createdAt: z.coerce.date(),
|
|
41
|
+
updatedAt: z.coerce.date()
|
|
42
|
+
})
|
|
43
|
+
export type ListedItem = z.infer<typeof ListedItemSchema>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const QuizResponseBaseResponseSchema: z.ZodObject<{
|
|
3
3
|
id: z.ZodNumber;
|
|
4
|
-
|
|
4
|
+
userId: z.ZodNumber;
|
|
5
5
|
monthlySalesVolume: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
6
|
favoriteCategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
7
|
discoverySource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
8
|
createdAt: z.ZodDate;
|
|
9
9
|
updatedAt: z.ZodDate;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
userId: number;
|
|
11
12
|
id: number;
|
|
12
13
|
updatedAt: Date;
|
|
13
14
|
createdAt: Date;
|
|
14
|
-
user_id: number;
|
|
15
15
|
monthlySalesVolume?: string | null | undefined;
|
|
16
16
|
favoriteCategory?: string | null | undefined;
|
|
17
17
|
discoverySource?: string | null | undefined;
|
|
18
18
|
}, {
|
|
19
|
+
userId: number;
|
|
19
20
|
id: number;
|
|
20
21
|
updatedAt: Date;
|
|
21
22
|
createdAt: Date;
|
|
22
|
-
user_id: number;
|
|
23
23
|
monthlySalesVolume?: string | null | undefined;
|
|
24
24
|
favoriteCategory?: string | null | undefined;
|
|
25
25
|
discoverySource?: string | null | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export const QuizResponseBaseResponseSchema = z.object({
|
|
3
3
|
id: z.number(),
|
|
4
|
-
|
|
4
|
+
userId: z.number(),
|
|
5
5
|
monthlySalesVolume: z.string().nullish(),
|
|
6
6
|
favoriteCategory: z.string().nullish(),
|
|
7
7
|
discoverySource: z.string().nullish(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuizResponseBaseResponse.js","sourceRoot":"","sources":["QuizResponseBaseResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,
|
|
1
|
+
{"version":3,"file":"QuizResponseBaseResponse.js","sourceRoot":"","sources":["QuizResponseBaseResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACxC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACtC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACrC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE;CAC7B,CAAC,CAAA"}
|
|
@@ -2,7 +2,7 @@ import {z} from "zod"
|
|
|
2
2
|
|
|
3
3
|
export const QuizResponseBaseResponseSchema = z.object({
|
|
4
4
|
id: z.number(),
|
|
5
|
-
|
|
5
|
+
userId: z.number(),
|
|
6
6
|
monthlySalesVolume: z.string().nullish(),
|
|
7
7
|
favoriteCategory: z.string().nullish(),
|
|
8
8
|
discoverySource: z.string().nullish(),
|
|
@@ -1,78 +1,218 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const SubscriptionStatusSchema: z.ZodObject<{
|
|
3
|
-
state: z.
|
|
3
|
+
state: z.ZodEnum<["NONE", "TRIAL", "TRIAL_ENDED", "ACTIVE", "CANCELING", "GRACE_PERIOD", "EXPIRED"]>;
|
|
4
4
|
isEligibleToTrial: z.ZodBoolean;
|
|
5
5
|
trialDaysRemaining: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6
6
|
history: z.ZodArray<z.ZodObject<{
|
|
7
7
|
id: z.ZodString;
|
|
8
8
|
userId: z.ZodNumber;
|
|
9
|
-
type: z.
|
|
9
|
+
type: z.ZodEnum<["TRIAL_STARTED", "TRIAL_UPGRADED", "TRIAL_EXPIRED", "LEVEL_ADDED", "LEVEL_REMOVED", "MULTIPLIER_CHANGED", "SUBSCRIPTION_PAUSED", "SUBSCRIPTION_RESUMED", "SUBSCRIPTION_CANCELED", "PAYMENT_SUCCEEDED", "PAYMENT_FAILED"]>;
|
|
10
10
|
levelId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
11
11
|
levelName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
12
|
multiplierBefore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
13
13
|
multiplierAfter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
14
|
-
source: z.
|
|
15
|
-
metadata: z.ZodOptional<z.ZodNullable<z.
|
|
14
|
+
source: z.ZodEnum<["STRIPE_WEBHOOK", "MANUAL_SYNC", "USER_ACTION"]>;
|
|
15
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
16
|
+
reason: z.ZodEnum<["USER_REQUESTED", "PAYMENT_FAILED", "DOWNGRADED", "SWITCHED_PLAN", "OTHER"]>;
|
|
17
|
+
comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
type: z.ZodLiteral<"Cancellation">;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
type: "Cancellation";
|
|
21
|
+
reason: "USER_REQUESTED" | "PAYMENT_FAILED" | "DOWNGRADED" | "SWITCHED_PLAN" | "OTHER";
|
|
22
|
+
comment?: string | null | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
type: "Cancellation";
|
|
25
|
+
reason: "USER_REQUESTED" | "PAYMENT_FAILED" | "DOWNGRADED" | "SWITCHED_PLAN" | "OTHER";
|
|
26
|
+
comment?: string | null | undefined;
|
|
27
|
+
}>, z.ZodObject<{
|
|
28
|
+
amount: z.ZodNumber;
|
|
29
|
+
currency: z.ZodString;
|
|
30
|
+
interval: z.ZodString;
|
|
31
|
+
priceId: z.ZodString;
|
|
32
|
+
type: z.ZodLiteral<"PriceChange">;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
type: "PriceChange";
|
|
35
|
+
currency: string;
|
|
36
|
+
amount: number;
|
|
37
|
+
interval: string;
|
|
38
|
+
priceId: string;
|
|
39
|
+
}, {
|
|
40
|
+
type: "PriceChange";
|
|
41
|
+
currency: string;
|
|
42
|
+
amount: number;
|
|
43
|
+
interval: string;
|
|
44
|
+
priceId: string;
|
|
45
|
+
}>, z.ZodObject<{
|
|
46
|
+
eventId: z.ZodString;
|
|
47
|
+
subscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
|
+
invoiceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
+
type: z.ZodLiteral<"StripeEvent">;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
type: "StripeEvent";
|
|
52
|
+
eventId: string;
|
|
53
|
+
subscriptionId?: string | null | undefined;
|
|
54
|
+
invoiceId?: string | null | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
type: "StripeEvent";
|
|
57
|
+
eventId: string;
|
|
58
|
+
subscriptionId?: string | null | undefined;
|
|
59
|
+
invoiceId?: string | null | undefined;
|
|
60
|
+
}>, z.ZodObject<{
|
|
61
|
+
startDate: z.ZodDate;
|
|
62
|
+
endDate: z.ZodDate;
|
|
63
|
+
convertedToPaid: z.ZodBoolean;
|
|
64
|
+
type: z.ZodLiteral<"Trial">;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
type: "Trial";
|
|
67
|
+
startDate: Date;
|
|
68
|
+
endDate: Date;
|
|
69
|
+
convertedToPaid: boolean;
|
|
70
|
+
}, {
|
|
71
|
+
type: "Trial";
|
|
72
|
+
startDate: Date;
|
|
73
|
+
endDate: Date;
|
|
74
|
+
convertedToPaid: boolean;
|
|
75
|
+
}>]>>>;
|
|
16
76
|
createdAt: z.ZodDate;
|
|
17
77
|
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
78
|
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
type: "PAYMENT_FAILED" | "TRIAL_STARTED" | "TRIAL_UPGRADED" | "TRIAL_EXPIRED" | "LEVEL_ADDED" | "LEVEL_REMOVED" | "MULTIPLIER_CHANGED" | "SUBSCRIPTION_PAUSED" | "SUBSCRIPTION_RESUMED" | "SUBSCRIPTION_CANCELED" | "PAYMENT_SUCCEEDED";
|
|
19
80
|
userId: number;
|
|
20
81
|
id: string;
|
|
21
82
|
createdAt: Date;
|
|
22
|
-
|
|
23
|
-
metadata?:
|
|
83
|
+
source: "STRIPE_WEBHOOK" | "MANUAL_SYNC" | "USER_ACTION";
|
|
84
|
+
metadata?: {
|
|
85
|
+
type: "Cancellation";
|
|
86
|
+
reason: "USER_REQUESTED" | "PAYMENT_FAILED" | "DOWNGRADED" | "SWITCHED_PLAN" | "OTHER";
|
|
87
|
+
comment?: string | null | undefined;
|
|
88
|
+
} | {
|
|
89
|
+
type: "PriceChange";
|
|
90
|
+
currency: string;
|
|
91
|
+
amount: number;
|
|
92
|
+
interval: string;
|
|
93
|
+
priceId: string;
|
|
94
|
+
} | {
|
|
95
|
+
type: "StripeEvent";
|
|
96
|
+
eventId: string;
|
|
97
|
+
subscriptionId?: string | null | undefined;
|
|
98
|
+
invoiceId?: string | null | undefined;
|
|
99
|
+
} | {
|
|
100
|
+
type: "Trial";
|
|
101
|
+
startDate: Date;
|
|
102
|
+
endDate: Date;
|
|
103
|
+
convertedToPaid: boolean;
|
|
104
|
+
} | null | undefined;
|
|
24
105
|
requestId?: string | null | undefined;
|
|
25
106
|
levelId?: number | null | undefined;
|
|
26
107
|
levelName?: string | null | undefined;
|
|
27
108
|
multiplierBefore?: number | null | undefined;
|
|
28
109
|
multiplierAfter?: number | null | undefined;
|
|
29
|
-
source?: unknown;
|
|
30
110
|
}, {
|
|
111
|
+
type: "PAYMENT_FAILED" | "TRIAL_STARTED" | "TRIAL_UPGRADED" | "TRIAL_EXPIRED" | "LEVEL_ADDED" | "LEVEL_REMOVED" | "MULTIPLIER_CHANGED" | "SUBSCRIPTION_PAUSED" | "SUBSCRIPTION_RESUMED" | "SUBSCRIPTION_CANCELED" | "PAYMENT_SUCCEEDED";
|
|
31
112
|
userId: number;
|
|
32
113
|
id: string;
|
|
33
114
|
createdAt: Date;
|
|
34
|
-
|
|
35
|
-
metadata?:
|
|
115
|
+
source: "STRIPE_WEBHOOK" | "MANUAL_SYNC" | "USER_ACTION";
|
|
116
|
+
metadata?: {
|
|
117
|
+
type: "Cancellation";
|
|
118
|
+
reason: "USER_REQUESTED" | "PAYMENT_FAILED" | "DOWNGRADED" | "SWITCHED_PLAN" | "OTHER";
|
|
119
|
+
comment?: string | null | undefined;
|
|
120
|
+
} | {
|
|
121
|
+
type: "PriceChange";
|
|
122
|
+
currency: string;
|
|
123
|
+
amount: number;
|
|
124
|
+
interval: string;
|
|
125
|
+
priceId: string;
|
|
126
|
+
} | {
|
|
127
|
+
type: "StripeEvent";
|
|
128
|
+
eventId: string;
|
|
129
|
+
subscriptionId?: string | null | undefined;
|
|
130
|
+
invoiceId?: string | null | undefined;
|
|
131
|
+
} | {
|
|
132
|
+
type: "Trial";
|
|
133
|
+
startDate: Date;
|
|
134
|
+
endDate: Date;
|
|
135
|
+
convertedToPaid: boolean;
|
|
136
|
+
} | null | undefined;
|
|
36
137
|
requestId?: string | null | undefined;
|
|
37
138
|
levelId?: number | null | undefined;
|
|
38
139
|
levelName?: string | null | undefined;
|
|
39
140
|
multiplierBefore?: number | null | undefined;
|
|
40
141
|
multiplierAfter?: number | null | undefined;
|
|
41
|
-
source?: unknown;
|
|
42
142
|
}>, "many">;
|
|
43
143
|
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
state: "NONE" | "ACTIVE" | "TRIAL" | "TRIAL_ENDED" | "CANCELING" | "GRACE_PERIOD" | "EXPIRED";
|
|
44
145
|
isEligibleToTrial: boolean;
|
|
45
146
|
history: {
|
|
147
|
+
type: "PAYMENT_FAILED" | "TRIAL_STARTED" | "TRIAL_UPGRADED" | "TRIAL_EXPIRED" | "LEVEL_ADDED" | "LEVEL_REMOVED" | "MULTIPLIER_CHANGED" | "SUBSCRIPTION_PAUSED" | "SUBSCRIPTION_RESUMED" | "SUBSCRIPTION_CANCELED" | "PAYMENT_SUCCEEDED";
|
|
46
148
|
userId: number;
|
|
47
149
|
id: string;
|
|
48
150
|
createdAt: Date;
|
|
49
|
-
|
|
50
|
-
metadata?:
|
|
151
|
+
source: "STRIPE_WEBHOOK" | "MANUAL_SYNC" | "USER_ACTION";
|
|
152
|
+
metadata?: {
|
|
153
|
+
type: "Cancellation";
|
|
154
|
+
reason: "USER_REQUESTED" | "PAYMENT_FAILED" | "DOWNGRADED" | "SWITCHED_PLAN" | "OTHER";
|
|
155
|
+
comment?: string | null | undefined;
|
|
156
|
+
} | {
|
|
157
|
+
type: "PriceChange";
|
|
158
|
+
currency: string;
|
|
159
|
+
amount: number;
|
|
160
|
+
interval: string;
|
|
161
|
+
priceId: string;
|
|
162
|
+
} | {
|
|
163
|
+
type: "StripeEvent";
|
|
164
|
+
eventId: string;
|
|
165
|
+
subscriptionId?: string | null | undefined;
|
|
166
|
+
invoiceId?: string | null | undefined;
|
|
167
|
+
} | {
|
|
168
|
+
type: "Trial";
|
|
169
|
+
startDate: Date;
|
|
170
|
+
endDate: Date;
|
|
171
|
+
convertedToPaid: boolean;
|
|
172
|
+
} | null | undefined;
|
|
51
173
|
requestId?: string | null | undefined;
|
|
52
174
|
levelId?: number | null | undefined;
|
|
53
175
|
levelName?: string | null | undefined;
|
|
54
176
|
multiplierBefore?: number | null | undefined;
|
|
55
177
|
multiplierAfter?: number | null | undefined;
|
|
56
|
-
source?: unknown;
|
|
57
178
|
}[];
|
|
58
|
-
state?: unknown;
|
|
59
179
|
trialDaysRemaining?: number | null | undefined;
|
|
60
180
|
}, {
|
|
181
|
+
state: "NONE" | "ACTIVE" | "TRIAL" | "TRIAL_ENDED" | "CANCELING" | "GRACE_PERIOD" | "EXPIRED";
|
|
61
182
|
isEligibleToTrial: boolean;
|
|
62
183
|
history: {
|
|
184
|
+
type: "PAYMENT_FAILED" | "TRIAL_STARTED" | "TRIAL_UPGRADED" | "TRIAL_EXPIRED" | "LEVEL_ADDED" | "LEVEL_REMOVED" | "MULTIPLIER_CHANGED" | "SUBSCRIPTION_PAUSED" | "SUBSCRIPTION_RESUMED" | "SUBSCRIPTION_CANCELED" | "PAYMENT_SUCCEEDED";
|
|
63
185
|
userId: number;
|
|
64
186
|
id: string;
|
|
65
187
|
createdAt: Date;
|
|
66
|
-
|
|
67
|
-
metadata?:
|
|
188
|
+
source: "STRIPE_WEBHOOK" | "MANUAL_SYNC" | "USER_ACTION";
|
|
189
|
+
metadata?: {
|
|
190
|
+
type: "Cancellation";
|
|
191
|
+
reason: "USER_REQUESTED" | "PAYMENT_FAILED" | "DOWNGRADED" | "SWITCHED_PLAN" | "OTHER";
|
|
192
|
+
comment?: string | null | undefined;
|
|
193
|
+
} | {
|
|
194
|
+
type: "PriceChange";
|
|
195
|
+
currency: string;
|
|
196
|
+
amount: number;
|
|
197
|
+
interval: string;
|
|
198
|
+
priceId: string;
|
|
199
|
+
} | {
|
|
200
|
+
type: "StripeEvent";
|
|
201
|
+
eventId: string;
|
|
202
|
+
subscriptionId?: string | null | undefined;
|
|
203
|
+
invoiceId?: string | null | undefined;
|
|
204
|
+
} | {
|
|
205
|
+
type: "Trial";
|
|
206
|
+
startDate: Date;
|
|
207
|
+
endDate: Date;
|
|
208
|
+
convertedToPaid: boolean;
|
|
209
|
+
} | null | undefined;
|
|
68
210
|
requestId?: string | null | undefined;
|
|
69
211
|
levelId?: number | null | undefined;
|
|
70
212
|
levelName?: string | null | undefined;
|
|
71
213
|
multiplierBefore?: number | null | undefined;
|
|
72
214
|
multiplierAfter?: number | null | undefined;
|
|
73
|
-
source?: unknown;
|
|
74
215
|
}[];
|
|
75
|
-
state?: unknown;
|
|
76
216
|
trialDaysRemaining?: number | null | undefined;
|
|
77
217
|
}>;
|
|
78
218
|
export type SubscriptionStatus = z.infer<typeof SubscriptionStatusSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriptionStatus.d.ts","sourceRoot":"","sources":["SubscriptionStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"SubscriptionStatus.d.ts","sourceRoot":"","sources":["SubscriptionStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAIrB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKnC,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { SubscriptionStateSchema } from "../../../subscriptions/models/SubscriptionState";
|
|
2
3
|
import { SubscriptionHistorySchema } from "../../../subscriptions/models/SubscriptionHistory";
|
|
3
4
|
export const SubscriptionStatusSchema = z.object({
|
|
4
|
-
state:
|
|
5
|
+
state: SubscriptionStateSchema,
|
|
5
6
|
isEligibleToTrial: z.boolean(),
|
|
6
7
|
trialDaysRemaining: z.number().int().nullish(),
|
|
7
8
|
history: z.array(SubscriptionHistorySchema)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriptionStatus.js","sourceRoot":"","sources":["SubscriptionStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AACrB,OAAO,EAAC,yBAAyB,EAAC,MAAM,mDAAmD,CAAA;AAE3F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"SubscriptionStatus.js","sourceRoot":"","sources":["SubscriptionStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AACrB,OAAO,EAAC,uBAAuB,EAAC,MAAM,iDAAiD,CAAA;AACvF,OAAO,EAAC,yBAAyB,EAAC,MAAM,mDAAmD,CAAA;AAE3F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,uBAAuB;IAC9B,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE;IAC9B,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;IAC9C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,yBAAyB,CAAC;CAC9C,CAAC,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {z} from "zod"
|
|
2
|
+
import {SubscriptionStateSchema} from "../../../subscriptions/models/SubscriptionState"
|
|
2
3
|
import {SubscriptionHistorySchema} from "../../../subscriptions/models/SubscriptionHistory"
|
|
3
4
|
|
|
4
5
|
export const SubscriptionStatusSchema = z.object({
|
|
5
|
-
state:
|
|
6
|
+
state: SubscriptionStateSchema,
|
|
6
7
|
isEligibleToTrial: z.boolean(),
|
|
7
8
|
trialDaysRemaining: z.number().int().nullish(),
|
|
8
9
|
history: z.array(SubscriptionHistorySchema)
|
|
@@ -1,28 +1,128 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const CreateSubscriptionHistoryPayloadSchema: z.ZodObject<{
|
|
3
|
-
type: z.
|
|
3
|
+
type: z.ZodEnum<["TRIAL_STARTED", "TRIAL_UPGRADED", "TRIAL_EXPIRED", "LEVEL_ADDED", "LEVEL_REMOVED", "MULTIPLIER_CHANGED", "SUBSCRIPTION_PAUSED", "SUBSCRIPTION_RESUMED", "SUBSCRIPTION_CANCELED", "PAYMENT_SUCCEEDED", "PAYMENT_FAILED"]>;
|
|
4
4
|
levelId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5
5
|
levelName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
6
|
multiplierBefore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
7
7
|
multiplierAfter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
8
|
-
source: z.
|
|
9
|
-
metadata: z.ZodOptional<z.ZodNullable<z.
|
|
8
|
+
source: z.ZodEnum<["STRIPE_WEBHOOK", "MANUAL_SYNC", "USER_ACTION"]>;
|
|
9
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
10
|
+
reason: z.ZodEnum<["USER_REQUESTED", "PAYMENT_FAILED", "DOWNGRADED", "SWITCHED_PLAN", "OTHER"]>;
|
|
11
|
+
comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
|
+
type: z.ZodLiteral<"Cancellation">;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
type: "Cancellation";
|
|
15
|
+
reason: "USER_REQUESTED" | "PAYMENT_FAILED" | "DOWNGRADED" | "SWITCHED_PLAN" | "OTHER";
|
|
16
|
+
comment?: string | null | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
type: "Cancellation";
|
|
19
|
+
reason: "USER_REQUESTED" | "PAYMENT_FAILED" | "DOWNGRADED" | "SWITCHED_PLAN" | "OTHER";
|
|
20
|
+
comment?: string | null | undefined;
|
|
21
|
+
}>, z.ZodObject<{
|
|
22
|
+
amount: z.ZodNumber;
|
|
23
|
+
currency: z.ZodString;
|
|
24
|
+
interval: z.ZodString;
|
|
25
|
+
priceId: z.ZodString;
|
|
26
|
+
type: z.ZodLiteral<"PriceChange">;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
type: "PriceChange";
|
|
29
|
+
currency: string;
|
|
30
|
+
amount: number;
|
|
31
|
+
interval: string;
|
|
32
|
+
priceId: string;
|
|
33
|
+
}, {
|
|
34
|
+
type: "PriceChange";
|
|
35
|
+
currency: string;
|
|
36
|
+
amount: number;
|
|
37
|
+
interval: string;
|
|
38
|
+
priceId: string;
|
|
39
|
+
}>, z.ZodObject<{
|
|
40
|
+
eventId: z.ZodString;
|
|
41
|
+
subscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
|
+
invoiceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
|
+
type: z.ZodLiteral<"StripeEvent">;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
type: "StripeEvent";
|
|
46
|
+
eventId: string;
|
|
47
|
+
subscriptionId?: string | null | undefined;
|
|
48
|
+
invoiceId?: string | null | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
type: "StripeEvent";
|
|
51
|
+
eventId: string;
|
|
52
|
+
subscriptionId?: string | null | undefined;
|
|
53
|
+
invoiceId?: string | null | undefined;
|
|
54
|
+
}>, z.ZodObject<{
|
|
55
|
+
startDate: z.ZodDate;
|
|
56
|
+
endDate: z.ZodDate;
|
|
57
|
+
convertedToPaid: z.ZodBoolean;
|
|
58
|
+
type: z.ZodLiteral<"Trial">;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
type: "Trial";
|
|
61
|
+
startDate: Date;
|
|
62
|
+
endDate: Date;
|
|
63
|
+
convertedToPaid: boolean;
|
|
64
|
+
}, {
|
|
65
|
+
type: "Trial";
|
|
66
|
+
startDate: Date;
|
|
67
|
+
endDate: Date;
|
|
68
|
+
convertedToPaid: boolean;
|
|
69
|
+
}>]>>>;
|
|
10
70
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
type
|
|
12
|
-
|
|
71
|
+
type: "PAYMENT_FAILED" | "TRIAL_STARTED" | "TRIAL_UPGRADED" | "TRIAL_EXPIRED" | "LEVEL_ADDED" | "LEVEL_REMOVED" | "MULTIPLIER_CHANGED" | "SUBSCRIPTION_PAUSED" | "SUBSCRIPTION_RESUMED" | "SUBSCRIPTION_CANCELED" | "PAYMENT_SUCCEEDED";
|
|
72
|
+
source: "STRIPE_WEBHOOK" | "MANUAL_SYNC" | "USER_ACTION";
|
|
73
|
+
metadata?: {
|
|
74
|
+
type: "Cancellation";
|
|
75
|
+
reason: "USER_REQUESTED" | "PAYMENT_FAILED" | "DOWNGRADED" | "SWITCHED_PLAN" | "OTHER";
|
|
76
|
+
comment?: string | null | undefined;
|
|
77
|
+
} | {
|
|
78
|
+
type: "PriceChange";
|
|
79
|
+
currency: string;
|
|
80
|
+
amount: number;
|
|
81
|
+
interval: string;
|
|
82
|
+
priceId: string;
|
|
83
|
+
} | {
|
|
84
|
+
type: "StripeEvent";
|
|
85
|
+
eventId: string;
|
|
86
|
+
subscriptionId?: string | null | undefined;
|
|
87
|
+
invoiceId?: string | null | undefined;
|
|
88
|
+
} | {
|
|
89
|
+
type: "Trial";
|
|
90
|
+
startDate: Date;
|
|
91
|
+
endDate: Date;
|
|
92
|
+
convertedToPaid: boolean;
|
|
93
|
+
} | null | undefined;
|
|
13
94
|
levelId?: number | null | undefined;
|
|
14
95
|
levelName?: string | null | undefined;
|
|
15
96
|
multiplierBefore?: number | null | undefined;
|
|
16
97
|
multiplierAfter?: number | null | undefined;
|
|
17
|
-
source?: unknown;
|
|
18
98
|
}, {
|
|
19
|
-
type
|
|
20
|
-
|
|
99
|
+
type: "PAYMENT_FAILED" | "TRIAL_STARTED" | "TRIAL_UPGRADED" | "TRIAL_EXPIRED" | "LEVEL_ADDED" | "LEVEL_REMOVED" | "MULTIPLIER_CHANGED" | "SUBSCRIPTION_PAUSED" | "SUBSCRIPTION_RESUMED" | "SUBSCRIPTION_CANCELED" | "PAYMENT_SUCCEEDED";
|
|
100
|
+
source: "STRIPE_WEBHOOK" | "MANUAL_SYNC" | "USER_ACTION";
|
|
101
|
+
metadata?: {
|
|
102
|
+
type: "Cancellation";
|
|
103
|
+
reason: "USER_REQUESTED" | "PAYMENT_FAILED" | "DOWNGRADED" | "SWITCHED_PLAN" | "OTHER";
|
|
104
|
+
comment?: string | null | undefined;
|
|
105
|
+
} | {
|
|
106
|
+
type: "PriceChange";
|
|
107
|
+
currency: string;
|
|
108
|
+
amount: number;
|
|
109
|
+
interval: string;
|
|
110
|
+
priceId: string;
|
|
111
|
+
} | {
|
|
112
|
+
type: "StripeEvent";
|
|
113
|
+
eventId: string;
|
|
114
|
+
subscriptionId?: string | null | undefined;
|
|
115
|
+
invoiceId?: string | null | undefined;
|
|
116
|
+
} | {
|
|
117
|
+
type: "Trial";
|
|
118
|
+
startDate: Date;
|
|
119
|
+
endDate: Date;
|
|
120
|
+
convertedToPaid: boolean;
|
|
121
|
+
} | null | undefined;
|
|
21
122
|
levelId?: number | null | undefined;
|
|
22
123
|
levelName?: string | null | undefined;
|
|
23
124
|
multiplierBefore?: number | null | undefined;
|
|
24
125
|
multiplierAfter?: number | null | undefined;
|
|
25
|
-
source?: unknown;
|
|
26
126
|
}>;
|
|
27
127
|
export type CreateSubscriptionHistoryPayload = z.infer<typeof CreateSubscriptionHistoryPayloadSchema>;
|
|
28
128
|
//# sourceMappingURL=CreateSubscriptionHistoryPayload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateSubscriptionHistoryPayload.d.ts","sourceRoot":"","sources":["CreateSubscriptionHistoryPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"CreateSubscriptionHistoryPayload.d.ts","sourceRoot":"","sources":["CreateSubscriptionHistoryPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAKrB,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQjD,CAAA;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAA"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { SubscriptionHistoryTypeSchema } from "../models/SubscriptionHistoryType";
|
|
3
|
+
import { SubscriptionHistorySourceSchema } from "../models/SubscriptionHistorySource";
|
|
4
|
+
import { SubscriptionHistoryMetadataSchema } from "../models/SubscriptionHistoryMetadata";
|
|
2
5
|
export const CreateSubscriptionHistoryPayloadSchema = z.object({
|
|
3
|
-
type:
|
|
6
|
+
type: SubscriptionHistoryTypeSchema,
|
|
4
7
|
levelId: z.number().nullish(),
|
|
5
8
|
levelName: z.string().nullish(),
|
|
6
9
|
multiplierBefore: z.number().int().nullish(),
|
|
7
10
|
multiplierAfter: z.number().int().nullish(),
|
|
8
|
-
source:
|
|
9
|
-
metadata:
|
|
11
|
+
source: SubscriptionHistorySourceSchema,
|
|
12
|
+
metadata: SubscriptionHistoryMetadataSchema.nullish()
|
|
10
13
|
});
|
|
11
14
|
//# sourceMappingURL=CreateSubscriptionHistoryPayload.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateSubscriptionHistoryPayload.js","sourceRoot":"","sources":["CreateSubscriptionHistoryPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"CreateSubscriptionHistoryPayload.js","sourceRoot":"","sources":["CreateSubscriptionHistoryPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AACrB,OAAO,EAAC,6BAA6B,EAAC,MAAM,mCAAmC,CAAA;AAC/E,OAAO,EAAC,+BAA+B,EAAC,MAAM,qCAAqC,CAAA;AACnF,OAAO,EAAC,iCAAiC,EAAC,MAAM,uCAAuC,CAAA;AAEvF,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,IAAI,EAAE,6BAA6B;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC7B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC/B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;IAC5C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;IAC3C,MAAM,EAAE,+BAA+B;IACvC,QAAQ,EAAE,iCAAiC,CAAC,OAAO,EAAE;CACxD,CAAC,CAAA"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {z} from "zod"
|
|
2
|
+
import {SubscriptionHistoryTypeSchema} from "../models/SubscriptionHistoryType"
|
|
3
|
+
import {SubscriptionHistorySourceSchema} from "../models/SubscriptionHistorySource"
|
|
4
|
+
import {SubscriptionHistoryMetadataSchema} from "../models/SubscriptionHistoryMetadata"
|
|
2
5
|
|
|
3
6
|
export const CreateSubscriptionHistoryPayloadSchema = z.object({
|
|
4
|
-
type:
|
|
7
|
+
type: SubscriptionHistoryTypeSchema,
|
|
5
8
|
levelId: z.number().nullish(),
|
|
6
9
|
levelName: z.string().nullish(),
|
|
7
10
|
multiplierBefore: z.number().int().nullish(),
|
|
8
11
|
multiplierAfter: z.number().int().nullish(),
|
|
9
|
-
source:
|
|
10
|
-
metadata:
|
|
12
|
+
source: SubscriptionHistorySourceSchema,
|
|
13
|
+
metadata: SubscriptionHistoryMetadataSchema.nullish()
|
|
11
14
|
})
|
|
12
15
|
export type CreateSubscriptionHistoryPayload = z.infer<typeof CreateSubscriptionHistoryPayloadSchema>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CancellationReasonSchema: z.ZodEnum<["USER_REQUESTED", "PAYMENT_FAILED", "DOWNGRADED", "SWITCHED_PLAN", "OTHER"]>;
|
|
3
|
+
export type CancellationReason = z.infer<typeof CancellationReasonSchema>;
|
|
4
|
+
//# sourceMappingURL=CancellationReason.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CancellationReason.d.ts","sourceRoot":"","sources":["CancellationReason.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,eAAO,MAAM,wBAAwB,yFAEnC,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CancellationReason.js","sourceRoot":"","sources":["CancellationReason.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3C,gBAAgB,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,OAAO;CAC7E,CAAC,CAAA"}
|