@fantastic.dev/better-stripe 0.17.1 → 0.19.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 +12 -0
- package/README.md +10 -1
- package/dist/client/connect/payouts.d.ts +3 -2
- package/dist/client/connect/payouts.d.ts.map +1 -1
- package/dist/client/connect/payouts.js.map +1 -1
- package/dist/client/connect/transferReceipt.d.ts +48 -0
- package/dist/client/connect/transferReceipt.d.ts.map +1 -0
- package/dist/client/connect/transferReceipt.js +296 -0
- package/dist/client/connect/transferReceipt.js.map +1 -0
- package/dist/client/index.d.ts +4 -8
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +5 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/payoutPolicy.d.ts +84 -0
- package/dist/client/payoutPolicy.d.ts.map +1 -0
- package/dist/client/payoutPolicy.js +266 -0
- package/dist/client/payoutPolicy.js.map +1 -0
- package/dist/component/_generated/component.d.ts +273 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/earnings/triggers.d.ts +150 -0
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/payoutPolicy/helpers.d.ts +51 -0
- package/dist/component/payoutPolicy/helpers.d.ts.map +1 -0
- package/dist/component/payoutPolicy/helpers.js +68 -0
- package/dist/component/payoutPolicy/helpers.js.map +1 -0
- package/dist/component/payoutPolicy/mutations.d.ts +172 -0
- package/dist/component/payoutPolicy/mutations.d.ts.map +1 -0
- package/dist/component/payoutPolicy/mutations.js +191 -0
- package/dist/component/payoutPolicy/mutations.js.map +1 -0
- package/dist/component/payoutPolicy/queries.d.ts +97 -0
- package/dist/component/payoutPolicy/queries.d.ts.map +1 -0
- package/dist/component/payoutPolicy/queries.js +51 -0
- package/dist/component/payoutPolicy/queries.js.map +1 -0
- package/dist/component/payoutPolicy/schema.d.ts +396 -0
- package/dist/component/payoutPolicy/schema.d.ts.map +1 -0
- package/dist/component/payoutPolicy/schema.js +54 -0
- package/dist/component/payoutPolicy/schema.js.map +1 -0
- package/dist/component/schema.d.ts +131 -0
- package/dist/component/schema.js +3 -0
- package/dist/component/schema.js.map +1 -1
- package/docs/settlement.md +112 -0
- package/package.json +1 -1
- package/src/client/connect/payouts.ts +10 -8
- package/src/client/connect/transferReceipt.pagination.test.ts +209 -0
- package/src/client/connect/transferReceipt.test.ts +520 -0
- package/src/client/connect/transferReceipt.ts +422 -0
- package/src/client/index.ts +7 -11
- package/src/client/payoutPolicy.test.ts +320 -0
- package/src/client/payoutPolicy.ts +422 -0
- package/src/component/_generated/api.ts +6 -0
- package/src/component/_generated/component.ts +280 -0
- package/src/component/payout-policy.test.ts +248 -0
- package/src/component/payoutPolicy/helpers.ts +88 -0
- package/src/component/payoutPolicy/mutations.ts +225 -0
- package/src/component/payoutPolicy/queries.ts +56 -0
- package/src/component/payoutPolicy/schema.ts +67 -0
- package/src/component/schema.ts +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../src/component/payoutPolicy/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EACL,aAAa,EACb,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,IAAI,EACJ,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;IAC9B,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;QAC5B,aAAa,CAAC,KAAK,CAAC,CAAC;QACrB,IACE,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE;Y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AAC,CAAC;aACzE,MAAM,EAAE,CAAC;QACZ,IACE,CAAC,EAAE;YACH,EAAE,CAAC,SAAS,KAAK,IAAI,CAAC,SAAS;YAC/B,EAAE,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ;YAC7B,EAAE,CAAC,SAAS;YACZ,EAAE,CAAC,MAAM,KAAK,SAAS;YACvB,MAAM,EAAE,YAAY,KAAK,EAAE,CAAC,YAAY;YACxC,MAAM,CAAC,MAAM,KAAK,UAAU;YAE5B,MAAM,IAAI,KAAK,CACb,0DAA0D,CAC3D,CAAC;QACJ,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC;YACtE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;QACpE,MAAM,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,EAAE,EAAE,CAAC,GAAG,EAAE;YACnD,MAAM,EAAE,UAAU;SACnB,CAAC,CAAC;QACH,MAAM,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,gBAAgB,EAAE,MAAM,CAAC,GAAG,EAAE;YAC/C,MAAM,EAAE,OAAO;YACf,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,gBAAgB;gBAClC,CAAC,CAAC,EAAE,gBAAgB,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;gBAC1D,CAAC,CAAC,EAAE,CAAC;SACR,CAAC,CAAC;QACH,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,CAAC,GAAG,CAAC,CAAE,CAAC;IAC/D,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export declare const get: import("convex/server").RegisteredQuery<"public", {
|
|
2
|
+
accountId: string;
|
|
3
|
+
ownerKey: string;
|
|
4
|
+
}, Promise<{
|
|
5
|
+
_creationTime: number;
|
|
6
|
+
_id: import("convex/values").GenericId<"payoutPolicies">;
|
|
7
|
+
accountId: string;
|
|
8
|
+
country: string;
|
|
9
|
+
holdDeadline?: number | undefined;
|
|
10
|
+
mode: "custom" | "stripe_managed";
|
|
11
|
+
operationKey: string;
|
|
12
|
+
ownerKey: string;
|
|
13
|
+
previousSchedule?: {
|
|
14
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
15
|
+
monthlyDays?: number[] | undefined;
|
|
16
|
+
weeklyDays?: string[] | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
revision: number;
|
|
19
|
+
status: "changing" | "ready";
|
|
20
|
+
thresholds: {
|
|
21
|
+
amount: number;
|
|
22
|
+
currency: string;
|
|
23
|
+
}[];
|
|
24
|
+
} | null>>;
|
|
25
|
+
export declare const operation: import("convex/server").RegisteredQuery<"public", {
|
|
26
|
+
accountId: string;
|
|
27
|
+
operationKey: string;
|
|
28
|
+
ownerKey: string;
|
|
29
|
+
}, Promise<{
|
|
30
|
+
_creationTime: number;
|
|
31
|
+
_id: import("convex/values").GenericId<"payoutPolicyOperations">;
|
|
32
|
+
accountId: string;
|
|
33
|
+
attempted?: boolean | undefined;
|
|
34
|
+
country: string;
|
|
35
|
+
expectedRevision: number;
|
|
36
|
+
mode: "custom" | "stripe_managed";
|
|
37
|
+
observedAt?: number | undefined;
|
|
38
|
+
observedSchedule: {
|
|
39
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
40
|
+
monthlyDays?: number[] | undefined;
|
|
41
|
+
weeklyDays?: string[] | undefined;
|
|
42
|
+
};
|
|
43
|
+
operationKey: string;
|
|
44
|
+
ownerKey: string;
|
|
45
|
+
previousSchedule: {
|
|
46
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
47
|
+
monthlyDays?: number[] | undefined;
|
|
48
|
+
weeklyDays?: string[] | undefined;
|
|
49
|
+
};
|
|
50
|
+
revision: number;
|
|
51
|
+
status: "canceled" | "complete" | "pending";
|
|
52
|
+
targetSchedule: {
|
|
53
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
54
|
+
monthlyDays?: number[] | undefined;
|
|
55
|
+
weeklyDays?: string[] | undefined;
|
|
56
|
+
};
|
|
57
|
+
thresholds: {
|
|
58
|
+
amount: number;
|
|
59
|
+
currency: string;
|
|
60
|
+
}[];
|
|
61
|
+
} | null>>;
|
|
62
|
+
export declare const due: import("convex/server").RegisteredQuery<"public", {
|
|
63
|
+
now: number;
|
|
64
|
+
paginationOpts: {
|
|
65
|
+
id?: number;
|
|
66
|
+
endCursor?: string | null;
|
|
67
|
+
maximumRowsRead?: number;
|
|
68
|
+
maximumBytesRead?: number;
|
|
69
|
+
numItems: number;
|
|
70
|
+
cursor: string | null;
|
|
71
|
+
};
|
|
72
|
+
}, Promise<{
|
|
73
|
+
page: {
|
|
74
|
+
_creationTime: number;
|
|
75
|
+
_id: import("convex/values").GenericId<"payoutPolicies">;
|
|
76
|
+
accountId: string;
|
|
77
|
+
country: string;
|
|
78
|
+
holdDeadline?: number | undefined;
|
|
79
|
+
mode: "custom" | "stripe_managed";
|
|
80
|
+
operationKey: string;
|
|
81
|
+
ownerKey: string;
|
|
82
|
+
previousSchedule?: {
|
|
83
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
84
|
+
monthlyDays?: number[] | undefined;
|
|
85
|
+
weeklyDays?: string[] | undefined;
|
|
86
|
+
} | undefined;
|
|
87
|
+
revision: number;
|
|
88
|
+
status: "changing" | "ready";
|
|
89
|
+
thresholds: {
|
|
90
|
+
amount: number;
|
|
91
|
+
currency: string;
|
|
92
|
+
}[];
|
|
93
|
+
}[];
|
|
94
|
+
continueCursor: string;
|
|
95
|
+
isDone: boolean;
|
|
96
|
+
}>>;
|
|
97
|
+
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/payoutPolicy/queries.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;UAId,CAAC;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAgBpB,CAAC;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4Bd,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { paginationOptsValidator } from "convex/server";
|
|
2
|
+
import { v } from "convex/values";
|
|
3
|
+
import { query } from "../_generated/server.js";
|
|
4
|
+
import { scopeFields, policyDoc, operationDoc } from "./schema.js";
|
|
5
|
+
import { readPolicy, validateScope } from "./helpers.js";
|
|
6
|
+
export const get = query({
|
|
7
|
+
args: scopeFields,
|
|
8
|
+
returns: v.union(policyDoc, v.null()),
|
|
9
|
+
handler: readPolicy,
|
|
10
|
+
});
|
|
11
|
+
export const operation = query({
|
|
12
|
+
args: { ...scopeFields, operationKey: v.string() },
|
|
13
|
+
returns: v.union(operationDoc, v.null()),
|
|
14
|
+
handler: async (ctx, args) => {
|
|
15
|
+
validateScope(args);
|
|
16
|
+
const op = await ctx.db
|
|
17
|
+
.query("payoutPolicyOperations")
|
|
18
|
+
.withIndex("by_operation", (q) => q.eq("operationKey", args.operationKey))
|
|
19
|
+
.unique();
|
|
20
|
+
if (op &&
|
|
21
|
+
(op.accountId !== args.accountId || op.ownerKey !== args.ownerKey))
|
|
22
|
+
throw new Error("Payout policy operation identity does not match.");
|
|
23
|
+
return op;
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
export const due = query({
|
|
27
|
+
args: { now: v.number(), paginationOpts: paginationOptsValidator },
|
|
28
|
+
returns: v.object({
|
|
29
|
+
page: v.array(policyDoc),
|
|
30
|
+
continueCursor: v.string(),
|
|
31
|
+
isDone: v.boolean(),
|
|
32
|
+
}),
|
|
33
|
+
handler: async (ctx, args) => {
|
|
34
|
+
if (!Number.isSafeInteger(args.now) ||
|
|
35
|
+
args.now < 0 ||
|
|
36
|
+
!Number.isInteger(args.paginationOpts.numItems) ||
|
|
37
|
+
args.paginationOpts.numItems < 1 ||
|
|
38
|
+
args.paginationOpts.numItems > 100)
|
|
39
|
+
throw new Error("Invalid payout policy due page.");
|
|
40
|
+
const page = await ctx.db
|
|
41
|
+
.query("payoutPolicies")
|
|
42
|
+
.withIndex("by_deadline", (q) => q.gt("holdDeadline", 0).lte("holdDeadline", args.now))
|
|
43
|
+
.paginate(args.paginationOpts);
|
|
44
|
+
return {
|
|
45
|
+
page: page.page,
|
|
46
|
+
continueCursor: page.continueCursor,
|
|
47
|
+
isDone: page.isDone,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../src/component/payoutPolicy/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzD,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC;IACvB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACrC,OAAO,EAAE,UAAU;CACpB,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC;IAC7B,IAAI,EAAE,EAAE,GAAG,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE;IAClD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,EAAE,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,CAAC,QAAQ,GAAG,GAAG;YAElC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,EAAE;aACtB,KAAK,CAAC,gBAAgB,CAAC;aACvB,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE,CAC9B,CAAC,CAAC,EAAE,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,CACtD;aACA,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACjC,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
export declare const scopeFields: {
|
|
2
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
3
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
4
|
+
};
|
|
5
|
+
export declare const schedule: import("convex/values").VObject<{
|
|
6
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
7
|
+
monthlyDays?: number[] | undefined;
|
|
8
|
+
weeklyDays?: string[] | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
11
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
12
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
13
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
14
|
+
export declare const mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
|
|
15
|
+
export declare const thresholds: import("convex/values").VArray<{
|
|
16
|
+
amount: number;
|
|
17
|
+
currency: string;
|
|
18
|
+
}[], import("convex/values").VObject<{
|
|
19
|
+
amount: number;
|
|
20
|
+
currency: string;
|
|
21
|
+
}, {
|
|
22
|
+
currency: import("convex/values").VString<string, "required">;
|
|
23
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
24
|
+
}, "required", "amount" | "currency">, "required">;
|
|
25
|
+
export declare const prepareFields: {
|
|
26
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
27
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
28
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
29
|
+
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
30
|
+
mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
|
|
31
|
+
thresholds: import("convex/values").VArray<{
|
|
32
|
+
amount: number;
|
|
33
|
+
currency: string;
|
|
34
|
+
}[], import("convex/values").VObject<{
|
|
35
|
+
amount: number;
|
|
36
|
+
currency: string;
|
|
37
|
+
}, {
|
|
38
|
+
currency: import("convex/values").VString<string, "required">;
|
|
39
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
40
|
+
}, "required", "amount" | "currency">, "required">;
|
|
41
|
+
country: import("convex/values").VString<string, "required">;
|
|
42
|
+
observedSchedule: import("convex/values").VObject<{
|
|
43
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
44
|
+
monthlyDays?: number[] | undefined;
|
|
45
|
+
weeklyDays?: string[] | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
48
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
49
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
50
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
51
|
+
observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
52
|
+
};
|
|
53
|
+
export declare const policyFields: {
|
|
54
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
55
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
56
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
57
|
+
mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
|
|
58
|
+
thresholds: import("convex/values").VArray<{
|
|
59
|
+
amount: number;
|
|
60
|
+
currency: string;
|
|
61
|
+
}[], import("convex/values").VObject<{
|
|
62
|
+
amount: number;
|
|
63
|
+
currency: string;
|
|
64
|
+
}, {
|
|
65
|
+
currency: import("convex/values").VString<string, "required">;
|
|
66
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
67
|
+
}, "required", "amount" | "currency">, "required">;
|
|
68
|
+
status: import("convex/values").VUnion<"changing" | "ready", [import("convex/values").VLiteral<"changing", "required">, import("convex/values").VLiteral<"ready", "required">], "required", never>;
|
|
69
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
70
|
+
country: import("convex/values").VString<string, "required">;
|
|
71
|
+
previousSchedule: import("convex/values").VObject<{
|
|
72
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
73
|
+
monthlyDays?: number[] | undefined;
|
|
74
|
+
weeklyDays?: string[] | undefined;
|
|
75
|
+
} | undefined, {
|
|
76
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
77
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
78
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
79
|
+
}, "optional", "interval" | "monthlyDays" | "weeklyDays">;
|
|
80
|
+
holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
81
|
+
};
|
|
82
|
+
export declare const operationFields: {
|
|
83
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
84
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
85
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
86
|
+
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
87
|
+
mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
|
|
88
|
+
thresholds: import("convex/values").VArray<{
|
|
89
|
+
amount: number;
|
|
90
|
+
currency: string;
|
|
91
|
+
}[], import("convex/values").VObject<{
|
|
92
|
+
amount: number;
|
|
93
|
+
currency: string;
|
|
94
|
+
}, {
|
|
95
|
+
currency: import("convex/values").VString<string, "required">;
|
|
96
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
97
|
+
}, "required", "amount" | "currency">, "required">;
|
|
98
|
+
country: import("convex/values").VString<string, "required">;
|
|
99
|
+
observedSchedule: import("convex/values").VObject<{
|
|
100
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
101
|
+
monthlyDays?: number[] | undefined;
|
|
102
|
+
weeklyDays?: string[] | undefined;
|
|
103
|
+
}, {
|
|
104
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
105
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
106
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
107
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
108
|
+
observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
109
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
110
|
+
previousSchedule: import("convex/values").VObject<{
|
|
111
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
112
|
+
monthlyDays?: number[] | undefined;
|
|
113
|
+
weeklyDays?: string[] | undefined;
|
|
114
|
+
}, {
|
|
115
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
116
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
117
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
118
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
119
|
+
targetSchedule: import("convex/values").VObject<{
|
|
120
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
121
|
+
monthlyDays?: number[] | undefined;
|
|
122
|
+
weeklyDays?: string[] | undefined;
|
|
123
|
+
}, {
|
|
124
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
125
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
126
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
127
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
128
|
+
status: import("convex/values").VUnion<"canceled" | "complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
|
|
129
|
+
attempted: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
130
|
+
};
|
|
131
|
+
export declare const policyDoc: import("convex/values").VObject<{
|
|
132
|
+
_creationTime: number;
|
|
133
|
+
_id: import("convex/values").GenericId<"payoutPolicies">;
|
|
134
|
+
accountId: string;
|
|
135
|
+
country: string;
|
|
136
|
+
holdDeadline?: number | undefined;
|
|
137
|
+
mode: "custom" | "stripe_managed";
|
|
138
|
+
operationKey: string;
|
|
139
|
+
ownerKey: string;
|
|
140
|
+
previousSchedule?: {
|
|
141
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
142
|
+
monthlyDays?: number[] | undefined;
|
|
143
|
+
weeklyDays?: string[] | undefined;
|
|
144
|
+
} | undefined;
|
|
145
|
+
revision: number;
|
|
146
|
+
status: "changing" | "ready";
|
|
147
|
+
thresholds: {
|
|
148
|
+
amount: number;
|
|
149
|
+
currency: string;
|
|
150
|
+
}[];
|
|
151
|
+
}, {
|
|
152
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
153
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
154
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
155
|
+
mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
|
|
156
|
+
thresholds: import("convex/values").VArray<{
|
|
157
|
+
amount: number;
|
|
158
|
+
currency: string;
|
|
159
|
+
}[], import("convex/values").VObject<{
|
|
160
|
+
amount: number;
|
|
161
|
+
currency: string;
|
|
162
|
+
}, {
|
|
163
|
+
currency: import("convex/values").VString<string, "required">;
|
|
164
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
165
|
+
}, "required", "amount" | "currency">, "required">;
|
|
166
|
+
status: import("convex/values").VUnion<"changing" | "ready", [import("convex/values").VLiteral<"changing", "required">, import("convex/values").VLiteral<"ready", "required">], "required", never>;
|
|
167
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
168
|
+
country: import("convex/values").VString<string, "required">;
|
|
169
|
+
previousSchedule: import("convex/values").VObject<{
|
|
170
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
171
|
+
monthlyDays?: number[] | undefined;
|
|
172
|
+
weeklyDays?: string[] | undefined;
|
|
173
|
+
} | undefined, {
|
|
174
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
175
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
176
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
177
|
+
}, "optional", "interval" | "monthlyDays" | "weeklyDays">;
|
|
178
|
+
holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
179
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"payoutPolicies">, "required">;
|
|
180
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
181
|
+
}, "required", "_creationTime" | "_id" | "accountId" | "country" | "holdDeadline" | "mode" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "thresholds">;
|
|
182
|
+
export declare const operationDoc: import("convex/values").VObject<{
|
|
183
|
+
_creationTime: number;
|
|
184
|
+
_id: import("convex/values").GenericId<"payoutPolicyOperations">;
|
|
185
|
+
accountId: string;
|
|
186
|
+
attempted?: boolean | undefined;
|
|
187
|
+
country: string;
|
|
188
|
+
expectedRevision: number;
|
|
189
|
+
mode: "custom" | "stripe_managed";
|
|
190
|
+
observedAt?: number | undefined;
|
|
191
|
+
observedSchedule: {
|
|
192
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
193
|
+
monthlyDays?: number[] | undefined;
|
|
194
|
+
weeklyDays?: string[] | undefined;
|
|
195
|
+
};
|
|
196
|
+
operationKey: string;
|
|
197
|
+
ownerKey: string;
|
|
198
|
+
previousSchedule: {
|
|
199
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
200
|
+
monthlyDays?: number[] | undefined;
|
|
201
|
+
weeklyDays?: string[] | undefined;
|
|
202
|
+
};
|
|
203
|
+
revision: number;
|
|
204
|
+
status: "canceled" | "complete" | "pending";
|
|
205
|
+
targetSchedule: {
|
|
206
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
207
|
+
monthlyDays?: number[] | undefined;
|
|
208
|
+
weeklyDays?: string[] | undefined;
|
|
209
|
+
};
|
|
210
|
+
thresholds: {
|
|
211
|
+
amount: number;
|
|
212
|
+
currency: string;
|
|
213
|
+
}[];
|
|
214
|
+
}, {
|
|
215
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
216
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
217
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
218
|
+
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
219
|
+
mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
|
|
220
|
+
thresholds: import("convex/values").VArray<{
|
|
221
|
+
amount: number;
|
|
222
|
+
currency: string;
|
|
223
|
+
}[], import("convex/values").VObject<{
|
|
224
|
+
amount: number;
|
|
225
|
+
currency: string;
|
|
226
|
+
}, {
|
|
227
|
+
currency: import("convex/values").VString<string, "required">;
|
|
228
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
229
|
+
}, "required", "amount" | "currency">, "required">;
|
|
230
|
+
country: import("convex/values").VString<string, "required">;
|
|
231
|
+
observedSchedule: import("convex/values").VObject<{
|
|
232
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
233
|
+
monthlyDays?: number[] | undefined;
|
|
234
|
+
weeklyDays?: string[] | undefined;
|
|
235
|
+
}, {
|
|
236
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
237
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
238
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
239
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
240
|
+
observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
241
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
242
|
+
previousSchedule: import("convex/values").VObject<{
|
|
243
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
244
|
+
monthlyDays?: number[] | undefined;
|
|
245
|
+
weeklyDays?: string[] | undefined;
|
|
246
|
+
}, {
|
|
247
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
248
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
249
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
250
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
251
|
+
targetSchedule: import("convex/values").VObject<{
|
|
252
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
253
|
+
monthlyDays?: number[] | undefined;
|
|
254
|
+
weeklyDays?: string[] | undefined;
|
|
255
|
+
}, {
|
|
256
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
257
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
258
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
259
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
260
|
+
status: import("convex/values").VUnion<"canceled" | "complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
|
|
261
|
+
attempted: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
262
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"payoutPolicyOperations">, "required">;
|
|
263
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
264
|
+
}, "required", "_creationTime" | "_id" | "accountId" | "attempted" | "country" | "expectedRevision" | "mode" | "observedAt" | "observedSchedule" | "observedSchedule.interval" | "observedSchedule.monthlyDays" | "observedSchedule.weeklyDays" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "targetSchedule" | "targetSchedule.interval" | "targetSchedule.monthlyDays" | "targetSchedule.weeklyDays" | "thresholds">;
|
|
265
|
+
export declare const policiesTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
266
|
+
accountId: string;
|
|
267
|
+
country: string;
|
|
268
|
+
holdDeadline?: number | undefined;
|
|
269
|
+
mode: "custom" | "stripe_managed";
|
|
270
|
+
operationKey: string;
|
|
271
|
+
ownerKey: string;
|
|
272
|
+
previousSchedule?: {
|
|
273
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
274
|
+
monthlyDays?: number[] | undefined;
|
|
275
|
+
weeklyDays?: string[] | undefined;
|
|
276
|
+
} | undefined;
|
|
277
|
+
revision: number;
|
|
278
|
+
status: "changing" | "ready";
|
|
279
|
+
thresholds: {
|
|
280
|
+
amount: number;
|
|
281
|
+
currency: string;
|
|
282
|
+
}[];
|
|
283
|
+
}, {
|
|
284
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
285
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
286
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
287
|
+
mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
|
|
288
|
+
thresholds: import("convex/values").VArray<{
|
|
289
|
+
amount: number;
|
|
290
|
+
currency: string;
|
|
291
|
+
}[], import("convex/values").VObject<{
|
|
292
|
+
amount: number;
|
|
293
|
+
currency: string;
|
|
294
|
+
}, {
|
|
295
|
+
currency: import("convex/values").VString<string, "required">;
|
|
296
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
297
|
+
}, "required", "amount" | "currency">, "required">;
|
|
298
|
+
status: import("convex/values").VUnion<"changing" | "ready", [import("convex/values").VLiteral<"changing", "required">, import("convex/values").VLiteral<"ready", "required">], "required", never>;
|
|
299
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
300
|
+
country: import("convex/values").VString<string, "required">;
|
|
301
|
+
previousSchedule: import("convex/values").VObject<{
|
|
302
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
303
|
+
monthlyDays?: number[] | undefined;
|
|
304
|
+
weeklyDays?: string[] | undefined;
|
|
305
|
+
} | undefined, {
|
|
306
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
307
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
308
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
309
|
+
}, "optional", "interval" | "monthlyDays" | "weeklyDays">;
|
|
310
|
+
holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
311
|
+
}, "required", "accountId" | "country" | "holdDeadline" | "mode" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "thresholds">, {
|
|
312
|
+
by_account: ["accountId", "_creationTime"];
|
|
313
|
+
by_deadline: ["holdDeadline", "_creationTime"];
|
|
314
|
+
}, {}, {}>;
|
|
315
|
+
export declare const operationsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
316
|
+
accountId: string;
|
|
317
|
+
attempted?: boolean | undefined;
|
|
318
|
+
country: string;
|
|
319
|
+
expectedRevision: number;
|
|
320
|
+
mode: "custom" | "stripe_managed";
|
|
321
|
+
observedAt?: number | undefined;
|
|
322
|
+
observedSchedule: {
|
|
323
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
324
|
+
monthlyDays?: number[] | undefined;
|
|
325
|
+
weeklyDays?: string[] | undefined;
|
|
326
|
+
};
|
|
327
|
+
operationKey: string;
|
|
328
|
+
ownerKey: string;
|
|
329
|
+
previousSchedule: {
|
|
330
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
331
|
+
monthlyDays?: number[] | undefined;
|
|
332
|
+
weeklyDays?: string[] | undefined;
|
|
333
|
+
};
|
|
334
|
+
revision: number;
|
|
335
|
+
status: "canceled" | "complete" | "pending";
|
|
336
|
+
targetSchedule: {
|
|
337
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
338
|
+
monthlyDays?: number[] | undefined;
|
|
339
|
+
weeklyDays?: string[] | undefined;
|
|
340
|
+
};
|
|
341
|
+
thresholds: {
|
|
342
|
+
amount: number;
|
|
343
|
+
currency: string;
|
|
344
|
+
}[];
|
|
345
|
+
}, {
|
|
346
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
347
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
348
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
349
|
+
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
350
|
+
mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
|
|
351
|
+
thresholds: import("convex/values").VArray<{
|
|
352
|
+
amount: number;
|
|
353
|
+
currency: string;
|
|
354
|
+
}[], import("convex/values").VObject<{
|
|
355
|
+
amount: number;
|
|
356
|
+
currency: string;
|
|
357
|
+
}, {
|
|
358
|
+
currency: import("convex/values").VString<string, "required">;
|
|
359
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
360
|
+
}, "required", "amount" | "currency">, "required">;
|
|
361
|
+
country: import("convex/values").VString<string, "required">;
|
|
362
|
+
observedSchedule: import("convex/values").VObject<{
|
|
363
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
364
|
+
monthlyDays?: number[] | undefined;
|
|
365
|
+
weeklyDays?: string[] | undefined;
|
|
366
|
+
}, {
|
|
367
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
368
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
369
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
370
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
371
|
+
observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
372
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
373
|
+
previousSchedule: import("convex/values").VObject<{
|
|
374
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
375
|
+
monthlyDays?: number[] | undefined;
|
|
376
|
+
weeklyDays?: string[] | undefined;
|
|
377
|
+
}, {
|
|
378
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
379
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
380
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
381
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
382
|
+
targetSchedule: import("convex/values").VObject<{
|
|
383
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
384
|
+
monthlyDays?: number[] | undefined;
|
|
385
|
+
weeklyDays?: string[] | undefined;
|
|
386
|
+
}, {
|
|
387
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
388
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
389
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
390
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
391
|
+
status: import("convex/values").VUnion<"canceled" | "complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
|
|
392
|
+
attempted: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
393
|
+
}, "required", "accountId" | "attempted" | "country" | "expectedRevision" | "mode" | "observedAt" | "observedSchedule" | "observedSchedule.interval" | "observedSchedule.monthlyDays" | "observedSchedule.weeklyDays" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "targetSchedule" | "targetSchedule.interval" | "targetSchedule.monthlyDays" | "targetSchedule.weeklyDays" | "thresholds">, {
|
|
394
|
+
by_operation: ["operationKey", "_creationTime"];
|
|
395
|
+
}, {}, {}>;
|
|
396
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/payoutPolicy/schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;IAAK,SAAS;IAAc,QAAQ;CAAc,CAAC;AAC3E,eAAO,MAAM,QAAQ;;;;;;;;yDASnB,CAAC;AACH,eAAO,MAAM,IAAI,0MAA4D,CAAC;AAC9E,eAAO,MAAM,UAAU;;;;;;;;;kDAEtB,CAAC;AACF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;CASzB,CAAC;AACF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUxB,CAAC;AACF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAW3B,CAAC;AACF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oRAIpB,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qhBAIvB,CAAC;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAEe,CAAC;AAC1C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAG3B,CAAC"}
|