@fantastic.dev/better-stripe 0.4.0 → 0.6.0
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/CHANGELOG.md +61 -0
- package/MIGRATION.md +135 -0
- package/README.md +23 -2
- package/dist/client/billing/checkout.d.ts.map +1 -1
- package/dist/client/billing/checkout.js +22 -8
- package/dist/client/billing/checkout.js.map +1 -1
- package/dist/client/billing/subscriptionRouting.d.ts +24 -0
- package/dist/client/billing/subscriptionRouting.d.ts.map +1 -0
- package/dist/client/billing/subscriptionRouting.js +19 -0
- package/dist/client/billing/subscriptionRouting.js.map +1 -0
- package/dist/client/billing/subscriptions.d.ts +6 -6
- package/dist/client/billing/subscriptions.d.ts.map +1 -1
- package/dist/client/billing/subscriptions.js +31 -12
- package/dist/client/billing/subscriptions.js.map +1 -1
- package/dist/client/connect/disputes.js.map +1 -1
- package/dist/client/constants.js +1 -1
- package/dist/client/core/accountLinks.d.ts +1 -0
- package/dist/client/core/accountLinks.d.ts.map +1 -1
- package/dist/client/core/accountLinks.js +0 -6
- package/dist/client/core/accountLinks.js.map +1 -1
- package/dist/client/core/accountStatus.d.ts.map +1 -1
- package/dist/client/core/accountStatus.js +23 -8
- package/dist/client/core/accountStatus.js.map +1 -1
- package/dist/client/index.d.ts +5 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/types/documents.d.ts +1 -0
- package/dist/client/types/documents.d.ts.map +1 -1
- package/dist/client/types/events.d.ts +2 -1
- package/dist/client/types/events.d.ts.map +1 -1
- package/dist/client/types/options.d.ts +7 -0
- package/dist/client/types/options.d.ts.map +1 -1
- package/dist/client/utils/stripeDashboardUrl.d.ts.map +1 -1
- package/dist/client/utils/webhookEndpoints.d.ts.map +1 -1
- package/dist/client/webhooks/handler.d.ts.map +1 -1
- package/dist/client/webhooks/handler.js +35 -1
- package/dist/client/webhooks/handler.js.map +1 -1
- package/dist/client/webhooks/hooks.d.ts +1 -1
- package/dist/client/webhooks/hooks.d.ts.map +1 -1
- package/dist/client/webhooks/hooks.js +5 -1
- package/dist/client/webhooks/hooks.js.map +1 -1
- package/dist/client/webhooks/processors.d.ts.map +1 -1
- package/dist/client/webhooks/processors.js +12 -2
- package/dist/client/webhooks/processors.js.map +1 -1
- package/dist/client/webhooks/v2.d.ts.map +1 -1
- package/dist/client/webhooks/v2.js +11 -3
- package/dist/client/webhooks/v2.js.map +1 -1
- package/dist/component/_generated/component.d.ts +8 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/_generated/server.d.ts +7 -1
- package/dist/component/_generated/server.d.ts.map +1 -1
- package/dist/component/_generated/server.js +2 -1
- package/dist/component/_generated/server.js.map +1 -1
- package/dist/component/billing/mutations.d.ts +29 -28
- package/dist/component/billing/mutations.d.ts.map +1 -1
- package/dist/component/billing/mutations.js +1 -0
- package/dist/component/billing/mutations.js.map +1 -1
- package/dist/component/billing/queries.d.ts +138 -131
- package/dist/component/billing/queries.d.ts.map +1 -1
- package/dist/component/billing/schema.d.ts +67 -65
- package/dist/component/billing/schema.d.ts.map +1 -1
- package/dist/component/billing/validators.d.ts +94 -91
- package/dist/component/billing/validators.d.ts.map +1 -1
- package/dist/component/billing/validators.js +1 -0
- package/dist/component/billing/validators.js.map +1 -1
- package/dist/component/connect/mutations.d.ts +37 -37
- package/dist/component/connect/queries.d.ts +115 -115
- package/dist/component/connect/queries.d.ts.map +1 -1
- package/dist/component/connect/queries.js +34 -71
- package/dist/component/connect/queries.js.map +1 -1
- package/dist/component/connect/schema.d.ts +73 -73
- package/dist/component/connect/validators.d.ts +119 -119
- package/dist/component/connect/validators.d.ts.map +1 -1
- package/dist/component/convex.config.d.ts +1 -0
- package/dist/component/convex.config.d.ts.map +1 -1
- package/dist/component/convex.config.js +2 -1
- package/dist/component/convex.config.js.map +1 -1
- package/dist/component/core/mutations.d.ts +12 -12
- package/dist/component/core/queries.d.ts +34 -34
- package/dist/component/core/schema.d.ts +11 -11
- package/dist/component/core/validators.d.ts +14 -14
- package/dist/component/core/validators.d.ts.map +1 -1
- package/dist/component/lib/fees.d.ts +12 -12
- package/dist/component/lib/fees.d.ts.map +1 -1
- package/dist/component/lib/fees.js +1 -1
- package/dist/component/lib/reversals.js.map +1 -1
- package/dist/component/products/mutations.d.ts +7 -7
- package/dist/component/products/queries.d.ts +33 -33
- package/dist/component/products/schema.d.ts +15 -15
- package/dist/component/products/validators.d.ts +16 -16
- package/dist/component/products/validators.d.ts.map +1 -1
- package/dist/component/schema.d.ts +173 -171
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/webhooks/mutations.d.ts +3 -3
- package/dist/component/webhooks/queries.d.ts +12 -12
- package/dist/component/webhooks/schema.d.ts +7 -7
- package/dist/component/webhooks/validators.d.ts +10 -10
- package/dist/component/webhooks/validators.d.ts.map +1 -1
- package/dist/react/components/AccountCreateCard.js.map +1 -1
- package/dist/react/components/BuyerBillingView.js +1 -1
- package/dist/react/components/CheckoutSessionProviderWithKey.d.ts +1 -1
- package/dist/react/components/DisputeDetail.js +1 -1
- package/dist/react/components/DisputesList.js +1 -1
- package/dist/react/components/EarningsSummary.js +1 -1
- package/dist/react/components/EmbeddedCheckout.d.ts.map +1 -1
- package/dist/react/components/EmbeddedCheckout.js +1 -1
- package/dist/react/components/EmbeddedCheckout.js.map +1 -1
- package/dist/react/components/PayoutSchedule.js +1 -1
- package/dist/react/components/SplitBreakdown.js +1 -1
- package/dist/react/components/StripeProvider.d.ts +1 -1
- package/dist/react/components/StripeProviderWithKey.d.ts +1 -1
- package/dist/react/hooks/useAccount.d.ts.map +1 -1
- package/dist/react/hooks/useAccountOnboarding.d.ts.map +1 -1
- package/dist/react/hooks/useCheckout.d.ts.map +1 -1
- package/dist/react/hooks/useDisputeWithCountdown.d.ts.map +1 -1
- package/dist/react/hooks/useDisputes.d.ts.map +1 -1
- package/dist/react/hooks/useEarnings.d.ts.map +1 -1
- package/dist/react/hooks/useInvoices.d.ts.map +1 -1
- package/dist/react/hooks/usePaymentMethodActions.js.map +1 -1
- package/dist/react/hooks/usePaymentMethods.d.ts.map +1 -1
- package/dist/react/hooks/usePrices.d.ts.map +1 -1
- package/dist/react/hooks/useProducts.d.ts.map +1 -1
- package/dist/react/hooks/useSplitBreakdown.d.ts.map +1 -1
- package/dist/react/hooks/useSubscription.d.ts.map +1 -1
- package/dist/react/hooks/useSubscriptions.d.ts.map +1 -1
- package/dist/react/lib/stripe-element-styles.d.ts.map +1 -1
- package/dist/react/lib/stripe-element-styles.js.map +1 -1
- package/package.json +25 -23
- package/src/client/billing/checkout.test.ts +62 -14
- package/src/client/billing/checkout.ts +26 -10
- package/src/client/billing/subscriptionRouting.ts +25 -0
- package/src/client/billing/subscriptions.test.ts +90 -28
- package/src/client/billing/subscriptions.ts +53 -18
- package/src/client/constants.ts +1 -1
- package/src/client/core/accountLinks.test.ts +20 -13
- package/src/client/core/accountLinks.ts +2 -10
- package/src/client/core/accountStatus.test.ts +67 -0
- package/src/client/core/accountStatus.ts +30 -13
- package/src/client/helpers.test.ts +2 -2
- package/src/client/index.ts +49 -44
- package/src/client/stripe-version.test.ts +47 -0
- package/src/client/types/documents.ts +1 -0
- package/src/client/types/events.ts +2 -1
- package/src/client/types/options.ts +7 -0
- package/src/client/webhooks/handler.ts +38 -1
- package/src/client/webhooks/hooks.ts +3 -0
- package/src/client/webhooks/processors.test.ts +201 -40
- package/src/client/webhooks/processors.ts +21 -17
- package/src/client/webhooks/retry.integration.test.ts +196 -0
- package/src/client/webhooks/v2.test.ts +36 -0
- package/src/client/webhooks/v2.ts +14 -4
- package/src/component/_generated/component.ts +15 -28
- package/src/component/_generated/server.ts +9 -2
- package/src/component/billing/mutations.ts +1 -0
- package/src/component/billing/validators.ts +1 -0
- package/src/component/config-queries.test.ts +8 -4
- package/src/component/connect/queries.ts +31 -66
- package/src/component/convex.config.ts +2 -1
- package/src/component/earnings-totals.test.ts +27 -1
- package/src/component/lib/fees.ts +1 -1
- package/src/react/components/EmbeddedCheckout.render.test.tsx +57 -0
- package/src/react/components/EmbeddedCheckout.tsx +1 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const component: import("convex/server").ComponentDefinition<any, {
|
|
2
2
|
readonly STRIPE_SECRET_KEY: import("convex/values").VString<string, "required">;
|
|
3
|
+
readonly STRIPE_PUBLISHABLE_KEY: import("convex/values").VString<string | undefined, "optional">;
|
|
3
4
|
}>;
|
|
4
5
|
export default component;
|
|
5
6
|
//# sourceMappingURL=convex.config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convex.config.d.ts","sourceRoot":"","sources":["../../src/component/convex.config.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"convex.config.d.ts","sourceRoot":"","sources":["../../src/component/convex.config.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,SAAS;;;EAab,CAAC;eACY,SAAS"}
|
|
@@ -2,7 +2,7 @@ import { defineComponent } from "convex/server";
|
|
|
2
2
|
import { v } from "convex/values";
|
|
3
3
|
const component = defineComponent("betterStripe", {
|
|
4
4
|
env: {
|
|
5
|
-
//
|
|
5
|
+
// Server-side credentials used by core/queries.ts: getStripeMode.
|
|
6
6
|
// Declared as required so Convex validates its presence at push time; the
|
|
7
7
|
// installing app wires it in via
|
|
8
8
|
// `app.use(betterStripe, { env: { STRIPE_SECRET_KEY: app.env.STRIPE_SECRET_KEY } })`.
|
|
@@ -11,6 +11,7 @@ const component = defineComponent("betterStripe", {
|
|
|
11
11
|
// here: they are read by the app layer (registerRoutes) directly from the
|
|
12
12
|
// deployment env, never by the component.
|
|
13
13
|
STRIPE_SECRET_KEY: v.string(),
|
|
14
|
+
STRIPE_PUBLISHABLE_KEY: v.optional(v.string()),
|
|
14
15
|
},
|
|
15
16
|
});
|
|
16
17
|
export default component;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convex.config.js","sourceRoot":"","sources":["../../src/component/convex.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,MAAM,SAAS,GAAG,eAAe,CAAC,cAAc,EAAE;IAChD,GAAG,EAAE;QACH,
|
|
1
|
+
{"version":3,"file":"convex.config.js","sourceRoot":"","sources":["../../src/component/convex.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,MAAM,SAAS,GAAG,eAAe,CAAC,cAAc,EAAE;IAChD,GAAG,EAAE;QACH,kEAAkE;QAClE,0EAA0E;QAC1E,iCAAiC;QACjC,sFAAsF;QACtF,EAAE;QACF,+EAA+E;QAC/E,0EAA0E;QAC1E,0CAA0C;QAC1C,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;QAC7B,sBAAsB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KAC/C;CACF,CAAC,CAAC;AACH,eAAe,SAAS,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { TableNames } from "../_generated/dataModel";
|
|
2
2
|
export declare const upsertAccount: import("convex/server").RegisteredMutation<"public", {
|
|
3
|
-
requirements?: any;
|
|
4
|
-
configuration?: any;
|
|
5
|
-
metadata?: any;
|
|
6
|
-
orgId?: string | undefined;
|
|
7
3
|
appliedConfigurations?: ("customer" | "merchant" | "recipient")[] | undefined;
|
|
8
4
|
capabilities?: any;
|
|
5
|
+
configuration?: any;
|
|
9
6
|
country?: string | undefined;
|
|
10
7
|
email?: string | undefined;
|
|
8
|
+
metadata?: any;
|
|
11
9
|
missingRequirements?: string[] | undefined;
|
|
12
10
|
name?: string | undefined;
|
|
13
|
-
onboardingStatus?: "complete" | "
|
|
14
|
-
|
|
11
|
+
onboardingStatus?: "complete" | "in_progress" | "pending" | "restricted" | undefined;
|
|
12
|
+
orgId?: string | undefined;
|
|
13
|
+
requirements?: any;
|
|
15
14
|
stripeAccountId: string;
|
|
15
|
+
userId: string;
|
|
16
16
|
}, Promise<null>>;
|
|
17
17
|
/**
|
|
18
18
|
* Set (or clear, with `null`) the per-store statement-descriptor suffix on an
|
|
@@ -31,19 +31,19 @@ export declare const deleteAccountByStripeId: import("convex/server").Registered
|
|
|
31
31
|
stripeAccountId: string;
|
|
32
32
|
}, Promise<boolean>>;
|
|
33
33
|
export declare const upsertAccountInternal: import("convex/server").RegisteredMutation<"public", {
|
|
34
|
-
requirements?: any;
|
|
35
|
-
configuration?: any;
|
|
36
|
-
metadata?: any;
|
|
37
|
-
orgId?: string | undefined;
|
|
38
34
|
appliedConfigurations?: ("customer" | "merchant" | "recipient")[] | undefined;
|
|
39
35
|
capabilities?: any;
|
|
36
|
+
configuration?: any;
|
|
40
37
|
country?: string | undefined;
|
|
41
38
|
email?: string | undefined;
|
|
39
|
+
metadata?: any;
|
|
42
40
|
missingRequirements?: string[] | undefined;
|
|
43
41
|
name?: string | undefined;
|
|
44
|
-
|
|
42
|
+
onboardingStatus: "complete" | "in_progress" | "pending" | "restricted";
|
|
43
|
+
orgId?: string | undefined;
|
|
44
|
+
requirements?: any;
|
|
45
45
|
stripeAccountId: string;
|
|
46
|
-
|
|
46
|
+
userId: string;
|
|
47
47
|
}, Promise<null>>;
|
|
48
48
|
export declare const clearAllTables: import("convex/server").RegisteredMutation<"public", {}, Promise<{
|
|
49
49
|
cleared: number;
|
|
@@ -1,87 +1,87 @@
|
|
|
1
1
|
export declare const getAccount: import("convex/server").RegisteredQuery<"public", {
|
|
2
2
|
accountId: import("convex/values").GenericId<"accounts">;
|
|
3
3
|
}, Promise<{
|
|
4
|
-
_id: import("convex/values").GenericId<"accounts">;
|
|
5
4
|
_creationTime: number;
|
|
6
|
-
|
|
7
|
-
configuration?: any;
|
|
8
|
-
metadata?: any;
|
|
9
|
-
orgId?: string | undefined;
|
|
10
|
-
statementDescriptor?: string | undefined;
|
|
5
|
+
_id: import("convex/values").GenericId<"accounts">;
|
|
11
6
|
appliedConfigurations?: ("customer" | "merchant" | "recipient")[] | undefined;
|
|
12
7
|
capabilities?: any;
|
|
8
|
+
configuration?: any;
|
|
13
9
|
country?: string | undefined;
|
|
14
10
|
email?: string | undefined;
|
|
11
|
+
metadata?: any;
|
|
15
12
|
missingRequirements?: string[] | undefined;
|
|
16
13
|
name?: string | undefined;
|
|
17
|
-
|
|
14
|
+
onboardingStatus: "complete" | "in_progress" | "pending" | "restricted";
|
|
15
|
+
orgId?: string | undefined;
|
|
16
|
+
requirements?: any;
|
|
17
|
+
statementDescriptor?: string | undefined;
|
|
18
18
|
stripeAccountId: string;
|
|
19
|
-
|
|
19
|
+
userId: string;
|
|
20
20
|
} | null>>;
|
|
21
21
|
export declare const getAccountByStripeId: import("convex/server").RegisteredQuery<"public", {
|
|
22
22
|
stripeAccountId: string;
|
|
23
23
|
}, Promise<{
|
|
24
|
-
_id: import("convex/values").GenericId<"accounts">;
|
|
25
24
|
_creationTime: number;
|
|
26
|
-
|
|
27
|
-
configuration?: any;
|
|
28
|
-
metadata?: any;
|
|
29
|
-
orgId?: string | undefined;
|
|
30
|
-
statementDescriptor?: string | undefined;
|
|
25
|
+
_id: import("convex/values").GenericId<"accounts">;
|
|
31
26
|
appliedConfigurations?: ("customer" | "merchant" | "recipient")[] | undefined;
|
|
32
27
|
capabilities?: any;
|
|
28
|
+
configuration?: any;
|
|
33
29
|
country?: string | undefined;
|
|
34
30
|
email?: string | undefined;
|
|
31
|
+
metadata?: any;
|
|
35
32
|
missingRequirements?: string[] | undefined;
|
|
36
33
|
name?: string | undefined;
|
|
37
|
-
|
|
34
|
+
onboardingStatus: "complete" | "in_progress" | "pending" | "restricted";
|
|
35
|
+
orgId?: string | undefined;
|
|
36
|
+
requirements?: any;
|
|
37
|
+
statementDescriptor?: string | undefined;
|
|
38
38
|
stripeAccountId: string;
|
|
39
|
-
|
|
39
|
+
userId: string;
|
|
40
40
|
} | null>>;
|
|
41
41
|
export declare const getAccountByUserId: import("convex/server").RegisteredQuery<"public", {
|
|
42
42
|
userId: string;
|
|
43
43
|
}, Promise<{
|
|
44
|
-
_id: import("convex/values").GenericId<"accounts">;
|
|
45
44
|
_creationTime: number;
|
|
46
|
-
|
|
47
|
-
configuration?: any;
|
|
48
|
-
metadata?: any;
|
|
49
|
-
orgId?: string | undefined;
|
|
50
|
-
statementDescriptor?: string | undefined;
|
|
45
|
+
_id: import("convex/values").GenericId<"accounts">;
|
|
51
46
|
appliedConfigurations?: ("customer" | "merchant" | "recipient")[] | undefined;
|
|
52
47
|
capabilities?: any;
|
|
48
|
+
configuration?: any;
|
|
53
49
|
country?: string | undefined;
|
|
54
50
|
email?: string | undefined;
|
|
51
|
+
metadata?: any;
|
|
55
52
|
missingRequirements?: string[] | undefined;
|
|
56
53
|
name?: string | undefined;
|
|
57
|
-
|
|
54
|
+
onboardingStatus: "complete" | "in_progress" | "pending" | "restricted";
|
|
55
|
+
orgId?: string | undefined;
|
|
56
|
+
requirements?: any;
|
|
57
|
+
statementDescriptor?: string | undefined;
|
|
58
58
|
stripeAccountId: string;
|
|
59
|
-
|
|
59
|
+
userId: string;
|
|
60
60
|
} | null>>;
|
|
61
61
|
export declare const getAccountByOrgId: import("convex/server").RegisteredQuery<"public", {
|
|
62
62
|
orgId: string;
|
|
63
63
|
}, Promise<{
|
|
64
|
-
_id: import("convex/values").GenericId<"accounts">;
|
|
65
64
|
_creationTime: number;
|
|
66
|
-
|
|
67
|
-
configuration?: any;
|
|
68
|
-
metadata?: any;
|
|
69
|
-
orgId?: string | undefined;
|
|
70
|
-
statementDescriptor?: string | undefined;
|
|
65
|
+
_id: import("convex/values").GenericId<"accounts">;
|
|
71
66
|
appliedConfigurations?: ("customer" | "merchant" | "recipient")[] | undefined;
|
|
72
67
|
capabilities?: any;
|
|
68
|
+
configuration?: any;
|
|
73
69
|
country?: string | undefined;
|
|
74
70
|
email?: string | undefined;
|
|
71
|
+
metadata?: any;
|
|
75
72
|
missingRequirements?: string[] | undefined;
|
|
76
73
|
name?: string | undefined;
|
|
77
|
-
|
|
74
|
+
onboardingStatus: "complete" | "in_progress" | "pending" | "restricted";
|
|
75
|
+
orgId?: string | undefined;
|
|
76
|
+
requirements?: any;
|
|
77
|
+
statementDescriptor?: string | undefined;
|
|
78
78
|
stripeAccountId: string;
|
|
79
|
-
|
|
79
|
+
userId: string;
|
|
80
80
|
} | null>>;
|
|
81
81
|
export declare const getAccountOnboardingStatus: import("convex/server").RegisteredQuery<"public", {
|
|
82
82
|
accountId: import("convex/values").GenericId<"accounts">;
|
|
83
83
|
}, Promise<{
|
|
84
|
-
onboardingStatus: "complete" | "
|
|
84
|
+
onboardingStatus: "complete" | "in_progress" | "pending" | "restricted";
|
|
85
85
|
isReady: boolean;
|
|
86
86
|
missingRequirements: string[];
|
|
87
87
|
capabilities: any;
|
|
@@ -91,5 +91,5 @@ export declare const getAccountOnboardingStatus: import("convex/server").Registe
|
|
|
91
91
|
* This is a public, non-auth-gated query so the frontend can load it.
|
|
92
92
|
*/
|
|
93
93
|
export declare const getPublishableKey: import("convex/server").RegisteredQuery<"public", {}, Promise<string | null>>;
|
|
94
|
-
export declare const getStripeMode: import("convex/server").RegisteredQuery<"public", {}, Promise<"
|
|
94
|
+
export declare const getStripeMode: import("convex/server").RegisteredQuery<"public", {}, Promise<"live" | "test">>;
|
|
95
95
|
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
* Each account maps a Stripe V2 account to a user/org in the host app.
|
|
4
4
|
*/
|
|
5
5
|
export declare const accountsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
6
|
-
requirements?: any;
|
|
7
|
-
configuration?: any;
|
|
8
|
-
metadata?: any;
|
|
9
|
-
orgId?: string | undefined;
|
|
10
|
-
statementDescriptor?: string | undefined;
|
|
11
6
|
appliedConfigurations?: ("customer" | "merchant" | "recipient")[] | undefined;
|
|
12
7
|
capabilities?: any;
|
|
8
|
+
configuration?: any;
|
|
13
9
|
country?: string | undefined;
|
|
14
10
|
email?: string | undefined;
|
|
11
|
+
metadata?: any;
|
|
15
12
|
missingRequirements?: string[] | undefined;
|
|
16
13
|
name?: string | undefined;
|
|
17
|
-
|
|
14
|
+
onboardingStatus: "complete" | "in_progress" | "pending" | "restricted";
|
|
15
|
+
orgId?: string | undefined;
|
|
16
|
+
requirements?: any;
|
|
17
|
+
statementDescriptor?: string | undefined;
|
|
18
18
|
stripeAccountId: string;
|
|
19
|
-
|
|
19
|
+
userId: string;
|
|
20
20
|
}, {
|
|
21
21
|
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
22
22
|
userId: import("convex/values").VString<string, "required">;
|
|
@@ -28,14 +28,14 @@ export declare const accountsTable: import("convex/server").TableDefinition<impo
|
|
|
28
28
|
requirements: import("convex/values").VAny<any, "optional", string>;
|
|
29
29
|
configuration: import("convex/values").VAny<any, "optional", string>;
|
|
30
30
|
appliedConfigurations: import("convex/values").VArray<("customer" | "merchant" | "recipient")[] | undefined, import("convex/values").VUnion<"customer" | "merchant" | "recipient", [import("convex/values").VLiteral<"customer", "required">, import("convex/values").VLiteral<"merchant", "required">, import("convex/values").VLiteral<"recipient", "required">], "required", never>, "optional">;
|
|
31
|
-
onboardingStatus: import("convex/values").VUnion<"complete" | "
|
|
31
|
+
onboardingStatus: import("convex/values").VUnion<"complete" | "in_progress" | "pending" | "restricted", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"in_progress", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"restricted", "required">], "required", never>;
|
|
32
32
|
missingRequirements: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
33
33
|
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
34
34
|
statementDescriptor: import("convex/values").VString<string | undefined, "optional">;
|
|
35
|
-
}, "required", "
|
|
35
|
+
}, "required", "appliedConfigurations" | "capabilities" | "configuration" | "country" | "email" | "metadata" | "missingRequirements" | "name" | "onboardingStatus" | "orgId" | "requirements" | "statementDescriptor" | "stripeAccountId" | "userId" | `capabilities.${string}` | `configuration.${string}` | `metadata.${string}` | `requirements.${string}`>, {
|
|
36
|
+
by_onboarding_status: ["onboardingStatus", "_creationTime"];
|
|
37
|
+
by_org_id: ["orgId", "_creationTime"];
|
|
36
38
|
by_stripe_account_id: ["stripeAccountId", "_creationTime"];
|
|
37
39
|
by_user_id: ["userId", "_creationTime"];
|
|
38
|
-
by_org_id: ["orgId", "_creationTime"];
|
|
39
|
-
by_onboarding_status: ["onboardingStatus", "_creationTime"];
|
|
40
40
|
}, {}, {}>;
|
|
41
41
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -2,9 +2,9 @@ import { type Infer } from "convex/values";
|
|
|
2
2
|
export declare const appliedConfigurationValidator: import("convex/values").VUnion<"customer" | "merchant" | "recipient", [import("convex/values").VLiteral<"customer", "required">, import("convex/values").VLiteral<"merchant", "required">, import("convex/values").VLiteral<"recipient", "required">], "required", never>;
|
|
3
3
|
export type AppliedConfiguration = Infer<typeof appliedConfigurationValidator>;
|
|
4
4
|
export declare const appliedConfigurationsValidator: import("convex/values").VArray<("customer" | "merchant" | "recipient")[] | undefined, import("convex/values").VUnion<"customer" | "merchant" | "recipient", [import("convex/values").VLiteral<"customer", "required">, import("convex/values").VLiteral<"merchant", "required">, import("convex/values").VLiteral<"recipient", "required">], "required", never>, "optional">;
|
|
5
|
-
export declare const onboardingStatusValidator: import("convex/values").VUnion<"complete" | "
|
|
5
|
+
export declare const onboardingStatusValidator: import("convex/values").VUnion<"complete" | "in_progress" | "pending" | "restricted", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"in_progress", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"restricted", "required">], "required", never>;
|
|
6
6
|
export type OnboardingStatus = Infer<typeof onboardingStatusValidator>;
|
|
7
|
-
export declare const optionalOnboardingStatusValidator: import("convex/values").VUnion<"complete" | "
|
|
7
|
+
export declare const optionalOnboardingStatusValidator: import("convex/values").VUnion<"complete" | "in_progress" | "pending" | "restricted" | undefined, [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"in_progress", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"restricted", "required">], "optional", never>;
|
|
8
8
|
/**
|
|
9
9
|
* Field validators for the `accounts` table.
|
|
10
10
|
* Shared between the schema definition and the doc validator so the
|
|
@@ -21,29 +21,29 @@ export declare const accountFields: {
|
|
|
21
21
|
requirements: import("convex/values").VAny<any, "optional", string>;
|
|
22
22
|
configuration: import("convex/values").VAny<any, "optional", string>;
|
|
23
23
|
appliedConfigurations: import("convex/values").VArray<("customer" | "merchant" | "recipient")[] | undefined, import("convex/values").VUnion<"customer" | "merchant" | "recipient", [import("convex/values").VLiteral<"customer", "required">, import("convex/values").VLiteral<"merchant", "required">, import("convex/values").VLiteral<"recipient", "required">], "required", never>, "optional">;
|
|
24
|
-
onboardingStatus: import("convex/values").VUnion<"complete" | "
|
|
24
|
+
onboardingStatus: import("convex/values").VUnion<"complete" | "in_progress" | "pending" | "restricted", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"in_progress", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"restricted", "required">], "required", never>;
|
|
25
25
|
missingRequirements: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
26
26
|
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
27
27
|
statementDescriptor: import("convex/values").VString<string | undefined, "optional">;
|
|
28
28
|
};
|
|
29
29
|
/** Full `accounts` document, including system fields. */
|
|
30
30
|
export declare const accountDocValidator: import("convex/values").VObject<{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
metadata?: any;
|
|
34
|
-
orgId?: string | undefined;
|
|
35
|
-
statementDescriptor?: string | undefined;
|
|
31
|
+
_creationTime: number;
|
|
32
|
+
_id: import("convex/values").GenericId<"accounts">;
|
|
36
33
|
appliedConfigurations?: ("customer" | "merchant" | "recipient")[] | undefined;
|
|
37
34
|
capabilities?: any;
|
|
35
|
+
configuration?: any;
|
|
38
36
|
country?: string | undefined;
|
|
39
37
|
email?: string | undefined;
|
|
38
|
+
metadata?: any;
|
|
40
39
|
missingRequirements?: string[] | undefined;
|
|
41
40
|
name?: string | undefined;
|
|
42
|
-
|
|
41
|
+
onboardingStatus: "complete" | "in_progress" | "pending" | "restricted";
|
|
42
|
+
orgId?: string | undefined;
|
|
43
|
+
requirements?: any;
|
|
44
|
+
statementDescriptor?: string | undefined;
|
|
43
45
|
stripeAccountId: string;
|
|
44
|
-
|
|
45
|
-
_id: import("convex/values").GenericId<"accounts">;
|
|
46
|
-
_creationTime: number;
|
|
46
|
+
userId: string;
|
|
47
47
|
}, {
|
|
48
48
|
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
49
49
|
userId: import("convex/values").VString<string, "required">;
|
|
@@ -55,11 +55,11 @@ export declare const accountDocValidator: import("convex/values").VObject<{
|
|
|
55
55
|
requirements: import("convex/values").VAny<any, "optional", string>;
|
|
56
56
|
configuration: import("convex/values").VAny<any, "optional", string>;
|
|
57
57
|
appliedConfigurations: import("convex/values").VArray<("customer" | "merchant" | "recipient")[] | undefined, import("convex/values").VUnion<"customer" | "merchant" | "recipient", [import("convex/values").VLiteral<"customer", "required">, import("convex/values").VLiteral<"merchant", "required">, import("convex/values").VLiteral<"recipient", "required">], "required", never>, "optional">;
|
|
58
|
-
onboardingStatus: import("convex/values").VUnion<"complete" | "
|
|
58
|
+
onboardingStatus: import("convex/values").VUnion<"complete" | "in_progress" | "pending" | "restricted", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"in_progress", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"restricted", "required">], "required", never>;
|
|
59
59
|
missingRequirements: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
60
60
|
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
61
61
|
statementDescriptor: import("convex/values").VString<string | undefined, "optional">;
|
|
62
62
|
_id: import("convex/values").VId<import("convex/values").GenericId<"accounts">, "required">;
|
|
63
63
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
64
|
-
}, "required", "
|
|
64
|
+
}, "required", "_creationTime" | "_id" | "appliedConfigurations" | "capabilities" | "configuration" | "country" | "email" | "metadata" | "missingRequirements" | "name" | "onboardingStatus" | "orgId" | "requirements" | "statementDescriptor" | "stripeAccountId" | "userId" | `capabilities.${string}` | `configuration.${string}` | `metadata.${string}` | `requirements.${string}`>;
|
|
65
65
|
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/component/core/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAK,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,6BAA6B,2QAIzC,CAAC;AACF,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAE/E,eAAO,MAAM,8BAA8B,8WAE1C,CAAC;AAEF,eAAO,MAAM,yBAAyB,wVAKrC,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEvE,eAAO,MAAM,iCAAiC,oWAE7C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/component/core/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAK,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,6BAA6B,2QAIzC,CAAC;AACF,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAE/E,eAAO,MAAM,8BAA8B,8WAE1C,CAAC;AAEF,eAAO,MAAM,yBAAyB,wVAKrC,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEvE,eAAO,MAAM,iCAAiC,oWAE7C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa;IACxB,eAAe;IACf,MAAM;IACN,KAAK;IACL,KAAK;IACL,IAAI;IACJ,OAAO;IACP,YAAY;IACZ,YAAY;IACZ,aAAa;IACb,qBAAqB;IACrB,gBAAgB;IAChB,mBAAmB;IACnB,QAAQ;IAGR,mBAAmB;CACpB,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wXAI9B,CAAC"}
|
|
@@ -14,25 +14,25 @@ import { type Infer } from "convex/values";
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const chargeTypeValidator: import("convex/values").VUnion<"destination" | "separate", [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "required", never>;
|
|
16
16
|
export type ChargeType = Infer<typeof chargeTypeValidator>;
|
|
17
|
-
export declare const splitRecipientRoleValidator: import("convex/values").VUnion<"
|
|
17
|
+
export declare const splitRecipientRoleValidator: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
18
18
|
export type SplitRecipientRole = Infer<typeof splitRecipientRoleValidator>;
|
|
19
19
|
/**
|
|
20
20
|
* One destination in a multi-recipient split. The cut is expressed as either a
|
|
21
|
-
* fixed `amount` (minor units) or a `percent` of the
|
|
21
|
+
* fixed `amount` (minor units) or a `percent` of the gross charge; the resolver (BTS-14)
|
|
22
22
|
* decides precedence. App-owned attribution (who the affiliate is) lives in app
|
|
23
23
|
* tables — the component just records and executes the split.
|
|
24
24
|
*/
|
|
25
25
|
export declare const splitRecipientValidator: import("convex/values").VObject<{
|
|
26
|
-
percent?: number | undefined;
|
|
27
26
|
amount?: number | undefined;
|
|
28
27
|
destinationAccountId: string;
|
|
29
|
-
|
|
28
|
+
percent?: number | undefined;
|
|
29
|
+
role: "affiliate" | "other" | "store";
|
|
30
30
|
}, {
|
|
31
31
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
32
|
-
role: import("convex/values").VUnion<"
|
|
32
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
33
33
|
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
34
34
|
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
35
|
-
}, "required", "
|
|
35
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">;
|
|
36
36
|
export type SplitRecipient = Infer<typeof splitRecipientValidator>;
|
|
37
37
|
/**
|
|
38
38
|
* Optional fee/routing fields spread into the `subscriptions`,
|
|
@@ -55,20 +55,20 @@ export declare const feeRoutingFields: {
|
|
|
55
55
|
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
56
56
|
/** Multi-recipient split (store + affiliate[s]) for separate charges & transfers. */
|
|
57
57
|
splitRecipients: import("convex/values").VArray<{
|
|
58
|
-
percent?: number | undefined;
|
|
59
58
|
amount?: number | undefined;
|
|
60
59
|
destinationAccountId: string;
|
|
61
|
-
role: "store" | "affiliate" | "other";
|
|
62
|
-
}[] | undefined, import("convex/values").VObject<{
|
|
63
60
|
percent?: number | undefined;
|
|
61
|
+
role: "affiliate" | "other" | "store";
|
|
62
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
64
63
|
amount?: number | undefined;
|
|
65
64
|
destinationAccountId: string;
|
|
66
|
-
|
|
65
|
+
percent?: number | undefined;
|
|
66
|
+
role: "affiliate" | "other" | "store";
|
|
67
67
|
}, {
|
|
68
68
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
69
|
-
role: import("convex/values").VUnion<"
|
|
69
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
70
70
|
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
71
71
|
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
72
|
-
}, "required", "
|
|
72
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
73
73
|
};
|
|
74
74
|
//# sourceMappingURL=fees.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fees.d.ts","sourceRoot":"","sources":["../../../src/component/lib/fees.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAK,MAAM,eAAe,CAAC;AAE9C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,wMAG/B,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE3D,eAAO,MAAM,2BAA2B,+PAIvC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAE3E;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;sEAKlC,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;IAC3B,yEAAyE
|
|
1
|
+
{"version":3,"file":"fees.d.ts","sourceRoot":"","sources":["../../../src/component/lib/fees.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAK,MAAM,eAAe,CAAC;AAE9C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,wMAG/B,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE3D,eAAO,MAAM,2BAA2B,+PAIvC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAE3E;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;sEAKlC,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;IAC3B,yEAAyE;IACzE,oBAAoB;IACpB,kEAAkE;IAClE,oBAAoB;IACpB,iFAAiF;IACjF,qBAAqB;IACrB,+EAA+E;IAC/E,kBAAkB;IAClB,uEAAuE;IACvE,iBAAiB;IACjB,+CAA+C;IAC/C,UAAU;IACV,qFAAqF;IACrF,eAAe;;;;;;;;;;;;;;;;CAChB,CAAC"}
|
|
@@ -16,7 +16,7 @@ export const chargeTypeValidator = v.union(v.literal("destination"), v.literal("
|
|
|
16
16
|
export const splitRecipientRoleValidator = v.union(v.literal("store"), v.literal("affiliate"), v.literal("other"));
|
|
17
17
|
/**
|
|
18
18
|
* One destination in a multi-recipient split. The cut is expressed as either a
|
|
19
|
-
* fixed `amount` (minor units) or a `percent` of the
|
|
19
|
+
* fixed `amount` (minor units) or a `percent` of the gross charge; the resolver (BTS-14)
|
|
20
20
|
* decides precedence. App-owned attribution (who the affiliate is) lives in app
|
|
21
21
|
* tables — the component just records and executes the split.
|
|
22
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reversals.js","sourceRoot":"","sources":["../../../src/component/lib/reversals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA6BH,MAAM,UAAU,qBAAqB,CACnC,IAAmB,EACnB,IAAkB;IAElB,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAA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KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,IAAI,MAAM,IAAI,CAAC;gBAAE,MAAM;YACvB,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;YACtD,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;YAChD,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YAChD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;YACrD,IAAI,GAAG,IAAI,CAAC;gBAAE,SAAS;YACvB,MAAM,IAAI,GAAG,CAAC;YACd,IAAI,QAAQ,EAAE,CAAC;gBACb,QAAQ,CAAC,EAAE,GAAG,SAAS,GAAG,GAAG,CAAC;YAChC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC;oBACV,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;oBACtC,IAAI;oBACJ,EAAE,EAAE,IAAI,GAAG,GAAG;iBACf,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
export declare const upsertProduct: import("convex/server").RegisteredMutation<"public", {
|
|
2
2
|
accountId?: string | undefined;
|
|
3
|
-
metadata?: any;
|
|
4
|
-
description?: string | undefined;
|
|
5
3
|
active: boolean;
|
|
4
|
+
description?: string | undefined;
|
|
5
|
+
metadata?: any;
|
|
6
6
|
name: string;
|
|
7
7
|
stripeProductId: string;
|
|
8
8
|
}, Promise<null>>;
|
|
9
9
|
export declare const upsertPrice: import("convex/server").RegisteredMutation<"public", {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
active: boolean;
|
|
11
|
+
currency: string;
|
|
12
|
+
interval?: "day" | "month" | "week" | "year" | undefined;
|
|
12
13
|
intervalCount?: number | undefined;
|
|
14
|
+
metadata?: any;
|
|
13
15
|
nickname?: string | undefined;
|
|
14
|
-
type: "one_time" | "recurring";
|
|
15
|
-
currency: string;
|
|
16
|
-
active: boolean;
|
|
17
16
|
productId: string;
|
|
18
17
|
stripePriceId: string;
|
|
19
18
|
stripeProductId: string;
|
|
19
|
+
type: "one_time" | "recurring";
|
|
20
20
|
unitAmount: number;
|
|
21
21
|
}, Promise<null>>;
|
|
22
22
|
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export declare const getProduct: import("convex/server").RegisteredQuery<"public", {
|
|
2
2
|
productId: import("convex/values").GenericId<"products">;
|
|
3
3
|
}, Promise<{
|
|
4
|
-
_id: import("convex/values").GenericId<"products">;
|
|
5
4
|
_creationTime: number;
|
|
5
|
+
_id: import("convex/values").GenericId<"products">;
|
|
6
6
|
accountId?: string | undefined;
|
|
7
|
-
metadata?: any;
|
|
8
|
-
description?: string | undefined;
|
|
9
7
|
active: boolean;
|
|
8
|
+
description?: string | undefined;
|
|
9
|
+
metadata?: any;
|
|
10
10
|
name: string;
|
|
11
11
|
stripeProductId: string;
|
|
12
12
|
} | null>>;
|
|
13
13
|
export declare const getProductByStripeId: import("convex/server").RegisteredQuery<"public", {
|
|
14
14
|
stripeProductId: string;
|
|
15
15
|
}, Promise<{
|
|
16
|
-
_id: import("convex/values").GenericId<"products">;
|
|
17
16
|
_creationTime: number;
|
|
17
|
+
_id: import("convex/values").GenericId<"products">;
|
|
18
18
|
accountId?: string | undefined;
|
|
19
|
-
metadata?: any;
|
|
20
|
-
description?: string | undefined;
|
|
21
19
|
active: boolean;
|
|
20
|
+
description?: string | undefined;
|
|
21
|
+
metadata?: any;
|
|
22
22
|
name: string;
|
|
23
23
|
stripeProductId: string;
|
|
24
24
|
} | null>>;
|
|
@@ -27,47 +27,47 @@ export declare const listProducts: import("convex/server").RegisteredQuery<"publ
|
|
|
27
27
|
active?: boolean | undefined;
|
|
28
28
|
limit?: number | undefined;
|
|
29
29
|
}, Promise<{
|
|
30
|
-
_id: import("convex/values").GenericId<"products">;
|
|
31
30
|
_creationTime: number;
|
|
31
|
+
_id: import("convex/values").GenericId<"products">;
|
|
32
32
|
accountId?: string | undefined;
|
|
33
|
-
metadata?: any;
|
|
34
|
-
description?: string | undefined;
|
|
35
33
|
active: boolean;
|
|
34
|
+
description?: string | undefined;
|
|
35
|
+
metadata?: any;
|
|
36
36
|
name: string;
|
|
37
37
|
stripeProductId: string;
|
|
38
38
|
}[]>>;
|
|
39
39
|
export declare const getPrice: import("convex/server").RegisteredQuery<"public", {
|
|
40
40
|
priceId: import("convex/values").GenericId<"prices">;
|
|
41
41
|
}, Promise<{
|
|
42
|
-
_id: import("convex/values").GenericId<"prices">;
|
|
43
42
|
_creationTime: number;
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
_id: import("convex/values").GenericId<"prices">;
|
|
44
|
+
active: boolean;
|
|
45
|
+
currency: string;
|
|
46
|
+
interval?: "day" | "month" | "week" | "year" | undefined;
|
|
46
47
|
intervalCount?: number | undefined;
|
|
48
|
+
metadata?: any;
|
|
47
49
|
nickname?: string | undefined;
|
|
48
|
-
type: "one_time" | "recurring";
|
|
49
|
-
currency: string;
|
|
50
|
-
active: boolean;
|
|
51
50
|
productId: string;
|
|
52
51
|
stripePriceId: string;
|
|
53
52
|
stripeProductId: string;
|
|
53
|
+
type: "one_time" | "recurring";
|
|
54
54
|
unitAmount: number;
|
|
55
55
|
} | null>>;
|
|
56
56
|
export declare const getPriceByStripeId: import("convex/server").RegisteredQuery<"public", {
|
|
57
57
|
stripePriceId: string;
|
|
58
58
|
}, Promise<{
|
|
59
|
-
_id: import("convex/values").GenericId<"prices">;
|
|
60
59
|
_creationTime: number;
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
_id: import("convex/values").GenericId<"prices">;
|
|
61
|
+
active: boolean;
|
|
62
|
+
currency: string;
|
|
63
|
+
interval?: "day" | "month" | "week" | "year" | undefined;
|
|
63
64
|
intervalCount?: number | undefined;
|
|
65
|
+
metadata?: any;
|
|
64
66
|
nickname?: string | undefined;
|
|
65
|
-
type: "one_time" | "recurring";
|
|
66
|
-
currency: string;
|
|
67
|
-
active: boolean;
|
|
68
67
|
productId: string;
|
|
69
68
|
stripePriceId: string;
|
|
70
69
|
stripeProductId: string;
|
|
70
|
+
type: "one_time" | "recurring";
|
|
71
71
|
unitAmount: number;
|
|
72
72
|
} | null>>;
|
|
73
73
|
export declare const listPrices: import("convex/server").RegisteredQuery<"public", {
|
|
@@ -75,35 +75,35 @@ export declare const listPrices: import("convex/server").RegisteredQuery<"public
|
|
|
75
75
|
limit?: number | undefined;
|
|
76
76
|
productId?: string | undefined;
|
|
77
77
|
}, Promise<{
|
|
78
|
-
_id: import("convex/values").GenericId<"prices">;
|
|
79
78
|
_creationTime: number;
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
_id: import("convex/values").GenericId<"prices">;
|
|
80
|
+
active: boolean;
|
|
81
|
+
currency: string;
|
|
82
|
+
interval?: "day" | "month" | "week" | "year" | undefined;
|
|
82
83
|
intervalCount?: number | undefined;
|
|
84
|
+
metadata?: any;
|
|
83
85
|
nickname?: string | undefined;
|
|
84
|
-
type: "one_time" | "recurring";
|
|
85
|
-
currency: string;
|
|
86
|
-
active: boolean;
|
|
87
86
|
productId: string;
|
|
88
87
|
stripePriceId: string;
|
|
89
88
|
stripeProductId: string;
|
|
89
|
+
type: "one_time" | "recurring";
|
|
90
90
|
unitAmount: number;
|
|
91
91
|
}[]>>;
|
|
92
92
|
export declare const listPricesByProduct: import("convex/server").RegisteredQuery<"public", {
|
|
93
93
|
stripeProductId: string;
|
|
94
94
|
}, Promise<{
|
|
95
|
-
_id: import("convex/values").GenericId<"prices">;
|
|
96
95
|
_creationTime: number;
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
_id: import("convex/values").GenericId<"prices">;
|
|
97
|
+
active: boolean;
|
|
98
|
+
currency: string;
|
|
99
|
+
interval?: "day" | "month" | "week" | "year" | undefined;
|
|
99
100
|
intervalCount?: number | undefined;
|
|
101
|
+
metadata?: any;
|
|
100
102
|
nickname?: string | undefined;
|
|
101
|
-
type: "one_time" | "recurring";
|
|
102
|
-
currency: string;
|
|
103
|
-
active: boolean;
|
|
104
103
|
productId: string;
|
|
105
104
|
stripePriceId: string;
|
|
106
105
|
stripeProductId: string;
|
|
106
|
+
type: "one_time" | "recurring";
|
|
107
107
|
unitAmount: number;
|
|
108
108
|
}[]>>;
|
|
109
109
|
//# sourceMappingURL=queries.d.ts.map
|