@fantastic.dev/better-stripe 0.59.0 → 0.60.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 +6 -0
- package/README.md +3 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +650 -44
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +309 -6
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +618 -12
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +325 -22
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/paymentSource/resolver.d.ts +12 -1
- package/dist/client/paymentSource/resolver.d.ts.map +1 -1
- package/dist/client/paymentSource/resolver.fixtures.d.ts +220 -0
- package/dist/client/paymentSource/resolver.fixtures.d.ts.map +1 -0
- package/dist/client/paymentSource/resolver.fixtures.js +189 -0
- package/dist/client/paymentSource/resolver.fixtures.js.map +1 -0
- package/dist/client/paymentSource/resolver.js +28 -3
- package/dist/client/paymentSource/resolver.js.map +1 -1
- package/dist/client/settlement/execution.d.ts +25 -0
- package/dist/client/settlement/execution.d.ts.map +1 -1
- package/dist/client/settlement/execution.js +2 -0
- package/dist/client/settlement/execution.js.map +1 -1
- package/dist/client/usage/catalogPrices.d.ts +1 -1
- package/dist/client/usage/catalogPrices.d.ts.map +1 -1
- package/dist/client/usage/catalogPrices.js +4 -4
- package/dist/client/usage/catalogPrices.js.map +1 -1
- package/dist/client/usage/client.d.ts +2 -2
- package/dist/client/usage/client.js +2 -2
- package/dist/client/usage/creditRevenue.d.ts +22 -0
- package/dist/client/usage/creditRevenue.d.ts.map +1 -0
- package/dist/client/usage/creditRevenue.js +118 -0
- package/dist/client/usage/creditRevenue.js.map +1 -0
- package/dist/client/usage/creditSettlement.d.ts +29 -0
- package/dist/client/usage/creditSettlement.d.ts.map +1 -0
- package/dist/client/usage/creditSettlement.fixtures.d.ts +215 -0
- package/dist/client/usage/creditSettlement.fixtures.d.ts.map +1 -0
- package/dist/client/usage/creditSettlement.fixtures.js +59 -0
- package/dist/client/usage/creditSettlement.fixtures.js.map +1 -0
- package/dist/client/usage/creditSettlement.js +70 -0
- package/dist/client/usage/creditSettlement.js.map +1 -0
- package/dist/client/usage/creditTransport.fixtures.d.ts +7 -1
- package/dist/client/usage/creditTransport.fixtures.d.ts.map +1 -1
- package/dist/client/usage/creditTransport.fixtures.js +25 -4
- package/dist/client/usage/creditTransport.fixtures.js.map +1 -1
- package/dist/client/usage/index.d.ts +4 -0
- package/dist/client/usage/index.d.ts.map +1 -1
- package/dist/client/usage/invoiceSale.d.ts +22 -0
- package/dist/client/usage/invoiceSale.d.ts.map +1 -0
- package/dist/client/usage/invoiceSale.fixtures.d.ts +285 -0
- package/dist/client/usage/invoiceSale.fixtures.d.ts.map +1 -0
- package/dist/client/usage/invoiceSale.fixtures.js +104 -0
- package/dist/client/usage/invoiceSale.fixtures.js.map +1 -0
- package/dist/client/usage/invoiceSale.js +117 -0
- package/dist/client/usage/invoiceSale.js.map +1 -0
- package/dist/client/usage/observationClient.d.ts +2 -2
- package/dist/client/usage/observationClient.d.ts.map +1 -1
- package/dist/client/usage/settlement.d.ts +32 -0
- package/dist/client/usage/settlement.d.ts.map +1 -0
- package/dist/client/usage/settlement.js +60 -0
- package/dist/client/usage/settlement.js.map +1 -0
- package/dist/client/usage/settlementClient.d.ts +51 -0
- package/dist/client/usage/settlementClient.d.ts.map +1 -0
- package/dist/client/usage/settlementClient.js +35 -0
- package/dist/client/usage/settlementClient.js.map +1 -0
- package/dist/component/_generated/component.d.ts +125 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
- package/dist/component/balanceFunding/mutations.d.ts +27 -27
- package/dist/component/earnings/triggers.d.ts +156 -6
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/financialObservations/settlementHelpers.d.ts.map +1 -1
- package/dist/component/financialObservations/settlementHelpers.js +2 -0
- package/dist/component/financialObservations/settlementHelpers.js.map +1 -1
- package/dist/component/recoveryWorkflow/helpers.d.ts +25 -0
- package/dist/component/recoveryWorkflow/helpers.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/mutations.d.ts +25 -0
- package/dist/component/recoveryWorkflow/mutations.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/queries.d.ts +50 -0
- package/dist/component/recoveryWorkflow/queries.d.ts.map +1 -1
- package/dist/component/recoveryWorkflow/schema.d.ts +566 -10
- package/dist/component/recoveryWorkflow/schema.d.ts.map +1 -1
- package/dist/component/schema.d.ts +309 -6
- package/dist/component/settlement/mutations.d.ts +50 -0
- package/dist/component/settlement/mutations.d.ts.map +1 -1
- package/dist/component/settlement/mutations.js +8 -1
- package/dist/component/settlement/mutations.js.map +1 -1
- package/dist/component/settlement/queries.d.ts +25 -0
- package/dist/component/settlement/queries.d.ts.map +1 -1
- package/dist/component/settlement/schema.d.ts +128 -1
- package/dist/component/settlement/schema.d.ts.map +1 -1
- package/dist/component/settlement/schema.js +22 -0
- package/dist/component/settlement/schema.js.map +1 -1
- package/docs/README.md +2 -0
- package/docs/settlement.md +4 -0
- package/docs/usage-settlement.md +162 -0
- package/package.json +2 -1
- package/src/client/index.ts +9 -0
- package/src/client/paymentSource/resolver.fixtures.ts +216 -0
- package/src/client/paymentSource/resolver.test.ts +11 -207
- package/src/client/paymentSource/resolver.ts +54 -2
- package/src/client/settlement/execution.ts +24 -0
- package/src/client/usage/catalogPrices.ts +4 -2
- package/src/client/usage/client.ts +2 -2
- package/src/client/usage/creditRevenue.test.ts +105 -0
- package/src/client/usage/creditRevenue.ts +163 -0
- package/src/client/usage/creditSettlement.fixtures.ts +70 -0
- package/src/client/usage/creditSettlement.test.ts +66 -0
- package/src/client/usage/creditSettlement.ts +94 -0
- package/src/client/usage/creditSettlementRecovery.test.ts +173 -0
- package/src/client/usage/creditTransport.fixtures.ts +29 -4
- package/src/client/usage/index.ts +9 -0
- package/src/client/usage/invoiceSale.fixtures.ts +103 -0
- package/src/client/usage/invoiceSale.test.ts +184 -0
- package/src/client/usage/invoiceSale.ts +155 -0
- package/src/client/usage/settlement.test.ts +179 -0
- package/src/client/usage/settlement.ts +81 -0
- package/src/client/usage/settlementClient.ts +84 -0
- package/src/component/_generated/component.ts +110 -0
- package/src/component/financialObservations/settlementHelpers.ts +2 -0
- package/src/component/settlement/mutations.ts +10 -1
- package/src/component/settlement/schema.ts +26 -0
- package/src/component/settlement/settlement-claims.test.ts +54 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type UsageCreditSettlementOptions } from "./creditSettlement.js";
|
|
2
|
+
import type { RunCtx } from "../helpers.js";
|
|
3
|
+
import { UsageCorrectionClient } from "./correctionClient.js";
|
|
4
|
+
import { type UsageInvoiceSaleOptions } from "./invoiceSale.js";
|
|
5
|
+
import { type UsageInvoiceSettlementOptions } from "./settlement.js";
|
|
6
|
+
import { type UsageCreditPurchaseOptions } from "./creditTerms.js";
|
|
7
|
+
import type { UsageDeliveryProviderOptions } from "./deliveryProvider.js";
|
|
8
|
+
/** Trusted host authorizes original seller/product and recipient policies before any settlement. */
|
|
9
|
+
export declare class UsageSettlementClient extends UsageCorrectionClient {
|
|
10
|
+
getInvoiceSale(_ctx: RunCtx, input: UsageInvoiceSaleOptions, options: UsageDeliveryProviderOptions): Promise<import("../index.js").FinancialOutcome<import("./invoiceSale.js").VerifiedUsageInvoiceSale>>;
|
|
11
|
+
settleInvoice(ctx: RunCtx, input: UsageInvoiceSettlementOptions, options: UsageDeliveryProviderOptions): Promise<{
|
|
12
|
+
status: "not_ready";
|
|
13
|
+
reason: "fee_pending" | "history_incomplete" | "provider_pending";
|
|
14
|
+
retryable: true;
|
|
15
|
+
} | {
|
|
16
|
+
status: "conflict";
|
|
17
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
18
|
+
retryable: false;
|
|
19
|
+
} | {
|
|
20
|
+
status: "rejected";
|
|
21
|
+
reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
|
|
22
|
+
retryable: false;
|
|
23
|
+
} | {
|
|
24
|
+
status: "unknown";
|
|
25
|
+
reason: "history_incomplete" | "provider_outcome_unknown";
|
|
26
|
+
retryable: false;
|
|
27
|
+
} | {
|
|
28
|
+
status: "not_payable";
|
|
29
|
+
eligible: false;
|
|
30
|
+
reason: string;
|
|
31
|
+
} | import("../index.js").SettlementResult>;
|
|
32
|
+
getCreditPurchaseRevenue(ctx: RunCtx, input: UsageCreditPurchaseOptions, options: UsageDeliveryProviderOptions): Promise<import("../index.js").FinancialOutcome<import("./creditRevenue.js").UsageCreditRevenue>>;
|
|
33
|
+
settleCreditPurchase(ctx: RunCtx, input: UsageCreditSettlementOptions, options: UsageDeliveryProviderOptions): Promise<{
|
|
34
|
+
status: "not_ready";
|
|
35
|
+
reason: "fee_pending" | "history_incomplete" | "provider_pending";
|
|
36
|
+
retryable: true;
|
|
37
|
+
} | {
|
|
38
|
+
status: "conflict";
|
|
39
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
40
|
+
retryable: false;
|
|
41
|
+
} | {
|
|
42
|
+
status: "rejected";
|
|
43
|
+
reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
|
|
44
|
+
retryable: false;
|
|
45
|
+
} | {
|
|
46
|
+
status: "unknown";
|
|
47
|
+
reason: "history_incomplete" | "provider_outcome_unknown";
|
|
48
|
+
retryable: false;
|
|
49
|
+
} | import("../index.js").SettlementResult>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=settlementClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settlementClient.d.ts","sourceRoot":"","sources":["../../../src/client/usage/settlementClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAW1E,oGAAoG;AACpG,qBAAa,qBAAsB,SAAQ,qBAAqB;IACxD,cAAc,CAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,uBAAuB,EAC9B,OAAO,EAAE,4BAA4B,wGAMtC;IACK,aAAa,CACjB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,6BAA6B,EACpC,OAAO,EAAE,4BAA4B;;;;;;;;;;;;;;;;;;;;gDAQtC;IACK,wBAAwB,CAC5B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,0BAA0B,EACjC,OAAO,EAAE,4BAA4B,oGAQtC;IACK,oBAAoB,CACxB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,4BAA4B,EACnC,OAAO,EAAE,4BAA4B;;;;;;;;;;;;;;;;gDAStC;CACF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { settleCreditPurchase, } from "./creditSettlement.js";
|
|
2
|
+
import Stripe from "stripe";
|
|
3
|
+
import { UsageCorrectionClient } from "./correctionClient.js";
|
|
4
|
+
import { getUsageInvoiceSale, } from "./invoiceSale.js";
|
|
5
|
+
import { settleUsageInvoice, } from "./settlement.js";
|
|
6
|
+
import { getCreditPurchaseRevenue } from "./creditRevenue.js";
|
|
7
|
+
import { creditBinding, creditPurchaseTerms, } from "./creditTerms.js";
|
|
8
|
+
import { observationOptions } from "./observationTypes.js";
|
|
9
|
+
function provider(version, options) {
|
|
10
|
+
if (!options.stripeSecretKey)
|
|
11
|
+
throw new Error("Native usage settlement credentials unavailable");
|
|
12
|
+
return new Stripe(options.stripeSecretKey, {
|
|
13
|
+
apiVersion: version,
|
|
14
|
+
maxNetworkRetries: 0,
|
|
15
|
+
timeout: 15000,
|
|
16
|
+
...(options.httpClient ? { httpClient: options.httpClient } : {}),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/** Trusted host authorizes original seller/product and recipient policies before any settlement. */
|
|
20
|
+
export class UsageSettlementClient extends UsageCorrectionClient {
|
|
21
|
+
async getInvoiceSale(_ctx, input, options) {
|
|
22
|
+
return getUsageInvoiceSale(provider(observationOptions(input).binding.apiVersion, options), input);
|
|
23
|
+
}
|
|
24
|
+
async settleInvoice(ctx, input, options) {
|
|
25
|
+
return settleUsageInvoice(provider(observationOptions(input).binding.apiVersion, options), this.component, ctx, input);
|
|
26
|
+
}
|
|
27
|
+
async getCreditPurchaseRevenue(ctx, input, options) {
|
|
28
|
+
return getCreditPurchaseRevenue(provider(creditPurchaseTerms(input).binding.apiVersion, options), this.component, ctx, input);
|
|
29
|
+
}
|
|
30
|
+
async settleCreditPurchase(ctx, input, options) {
|
|
31
|
+
const { policy: _policy, ...purchase } = input;
|
|
32
|
+
return settleCreditPurchase(provider(creditBinding(purchase).binding.apiVersion, options), this.component, ctx, input);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=settlementClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settlementClient.js","sourceRoot":"","sources":["../../../src/client/usage/settlementClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,GAErB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,mBAAmB,GAEpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,kBAAkB,GAEnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EACL,aAAa,EACb,mBAAmB,GAEpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,SAAS,QAAQ,CAAC,OAAe,EAAE,OAAqC;IACtE,IAAI,CAAC,OAAO,CAAC,eAAe;QAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACrE,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,EAAE;QACzC,UAAU,EAAE,OAA2B;QACvC,iBAAiB,EAAE,CAAC;QACpB,OAAO,EAAE,KAAK;QACd,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClE,CAAC,CAAC;AACL,CAAC;AACD,oGAAoG;AACpG,MAAM,OAAO,qBAAsB,SAAQ,qBAAqB;IAC9D,KAAK,CAAC,cAAc,CAClB,IAAY,EACZ,KAA8B,EAC9B,OAAqC;QAErC,OAAO,mBAAmB,CACxB,QAAQ,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,EAC/D,KAAK,CACN,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,aAAa,CACjB,GAAW,EACX,KAAoC,EACpC,OAAqC;QAErC,OAAO,kBAAkB,CACvB,QAAQ,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,EAC/D,IAAI,CAAC,SAAS,EACd,GAAG,EACH,KAAK,CACN,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,wBAAwB,CAC5B,GAAW,EACX,KAAiC,EACjC,OAAqC;QAErC,OAAO,wBAAwB,CAC7B,QAAQ,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,EAChE,IAAI,CAAC,SAAS,EACd,GAAG,EACH,KAAK,CACN,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,oBAAoB,CACxB,GAAW,EACX,KAAmC,EACnC,OAAqC;QAErC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAC;QAC/C,OAAO,oBAAoB,CACzB,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,EAC7D,IAAI,CAAC,SAAS,EACd,GAAG,EACH,KAAK,CACN,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -6325,6 +6325,15 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
6325
6325
|
accountId: string;
|
|
6326
6326
|
allocation?: {
|
|
6327
6327
|
adjustmentAmount?: number;
|
|
6328
|
+
creditSource?: {
|
|
6329
|
+
creditGrantId: string;
|
|
6330
|
+
customerAccount: string;
|
|
6331
|
+
livemode: boolean;
|
|
6332
|
+
purchaseId: string;
|
|
6333
|
+
stripeAccountId: string;
|
|
6334
|
+
stripePriceId: string;
|
|
6335
|
+
stripeProductId: string;
|
|
6336
|
+
};
|
|
6328
6337
|
currency: string;
|
|
6329
6338
|
gross: number;
|
|
6330
6339
|
paymentId?: string;
|
|
@@ -6338,6 +6347,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
6338
6347
|
destinationAccountId: string;
|
|
6339
6348
|
role: "store" | "affiliate" | "other";
|
|
6340
6349
|
}>;
|
|
6350
|
+
usageSource?: {
|
|
6351
|
+
customerAccount: string;
|
|
6352
|
+
invoicePaymentId: string;
|
|
6353
|
+
livemode: boolean;
|
|
6354
|
+
meterId: string;
|
|
6355
|
+
model: "pay_as_you_go" | "included_overage";
|
|
6356
|
+
period: {
|
|
6357
|
+
end: number;
|
|
6358
|
+
start: number;
|
|
6359
|
+
};
|
|
6360
|
+
stripeAccountId: string;
|
|
6361
|
+
stripePriceId: string;
|
|
6362
|
+
stripeProductId: string;
|
|
6363
|
+
subscriptionId: string;
|
|
6364
|
+
subscriptionItemId: string;
|
|
6365
|
+
};
|
|
6341
6366
|
};
|
|
6342
6367
|
completion?: string;
|
|
6343
6368
|
currency: string;
|
|
@@ -6407,6 +6432,15 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
6407
6432
|
activePhase?: "execute" | "reconcile";
|
|
6408
6433
|
allocation?: {
|
|
6409
6434
|
adjustmentAmount?: number;
|
|
6435
|
+
creditSource?: {
|
|
6436
|
+
creditGrantId: string;
|
|
6437
|
+
customerAccount: string;
|
|
6438
|
+
livemode: boolean;
|
|
6439
|
+
purchaseId: string;
|
|
6440
|
+
stripeAccountId: string;
|
|
6441
|
+
stripePriceId: string;
|
|
6442
|
+
stripeProductId: string;
|
|
6443
|
+
};
|
|
6410
6444
|
currency: string;
|
|
6411
6445
|
gross: number;
|
|
6412
6446
|
paymentId?: string;
|
|
@@ -6420,6 +6454,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
6420
6454
|
destinationAccountId: string;
|
|
6421
6455
|
role: "store" | "affiliate" | "other";
|
|
6422
6456
|
}>;
|
|
6457
|
+
usageSource?: {
|
|
6458
|
+
customerAccount: string;
|
|
6459
|
+
invoicePaymentId: string;
|
|
6460
|
+
livemode: boolean;
|
|
6461
|
+
meterId: string;
|
|
6462
|
+
model: "pay_as_you_go" | "included_overage";
|
|
6463
|
+
period: {
|
|
6464
|
+
end: number;
|
|
6465
|
+
start: number;
|
|
6466
|
+
};
|
|
6467
|
+
stripeAccountId: string;
|
|
6468
|
+
stripePriceId: string;
|
|
6469
|
+
stripeProductId: string;
|
|
6470
|
+
subscriptionId: string;
|
|
6471
|
+
subscriptionItemId: string;
|
|
6472
|
+
};
|
|
6423
6473
|
};
|
|
6424
6474
|
cancelRequested: boolean;
|
|
6425
6475
|
completion?: string;
|
|
@@ -6620,6 +6670,15 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
6620
6670
|
}, Name>;
|
|
6621
6671
|
reserveSettlementAllocation: FunctionReference<"mutation", "internal", {
|
|
6622
6672
|
adjustmentAmount?: number;
|
|
6673
|
+
creditSource?: {
|
|
6674
|
+
creditGrantId: string;
|
|
6675
|
+
customerAccount: string;
|
|
6676
|
+
livemode: boolean;
|
|
6677
|
+
purchaseId: string;
|
|
6678
|
+
stripeAccountId: string;
|
|
6679
|
+
stripePriceId: string;
|
|
6680
|
+
stripeProductId: string;
|
|
6681
|
+
};
|
|
6623
6682
|
currency: string;
|
|
6624
6683
|
gross: number;
|
|
6625
6684
|
paymentId?: string;
|
|
@@ -6633,10 +6692,35 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
6633
6692
|
destinationAccountId: string;
|
|
6634
6693
|
role: "store" | "affiliate" | "other";
|
|
6635
6694
|
}>;
|
|
6695
|
+
usageSource?: {
|
|
6696
|
+
customerAccount: string;
|
|
6697
|
+
invoicePaymentId: string;
|
|
6698
|
+
livemode: boolean;
|
|
6699
|
+
meterId: string;
|
|
6700
|
+
model: "pay_as_you_go" | "included_overage";
|
|
6701
|
+
period: {
|
|
6702
|
+
end: number;
|
|
6703
|
+
start: number;
|
|
6704
|
+
};
|
|
6705
|
+
stripeAccountId: string;
|
|
6706
|
+
stripePriceId: string;
|
|
6707
|
+
stripeProductId: string;
|
|
6708
|
+
subscriptionId: string;
|
|
6709
|
+
subscriptionItemId: string;
|
|
6710
|
+
};
|
|
6636
6711
|
}, {
|
|
6637
6712
|
_creationTime: number;
|
|
6638
6713
|
_id: string;
|
|
6639
6714
|
adjustmentAmount?: number;
|
|
6715
|
+
creditSource?: {
|
|
6716
|
+
creditGrantId: string;
|
|
6717
|
+
customerAccount: string;
|
|
6718
|
+
livemode: boolean;
|
|
6719
|
+
purchaseId: string;
|
|
6720
|
+
stripeAccountId: string;
|
|
6721
|
+
stripePriceId: string;
|
|
6722
|
+
stripeProductId: string;
|
|
6723
|
+
};
|
|
6640
6724
|
currency: string;
|
|
6641
6725
|
gross: number;
|
|
6642
6726
|
paymentId?: string;
|
|
@@ -6650,6 +6734,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
6650
6734
|
destinationAccountId: string;
|
|
6651
6735
|
role: "store" | "affiliate" | "other";
|
|
6652
6736
|
}>;
|
|
6737
|
+
usageSource?: {
|
|
6738
|
+
customerAccount: string;
|
|
6739
|
+
invoicePaymentId: string;
|
|
6740
|
+
livemode: boolean;
|
|
6741
|
+
meterId: string;
|
|
6742
|
+
model: "pay_as_you_go" | "included_overage";
|
|
6743
|
+
period: {
|
|
6744
|
+
end: number;
|
|
6745
|
+
start: number;
|
|
6746
|
+
};
|
|
6747
|
+
stripeAccountId: string;
|
|
6748
|
+
stripePriceId: string;
|
|
6749
|
+
stripeProductId: string;
|
|
6750
|
+
subscriptionId: string;
|
|
6751
|
+
subscriptionItemId: string;
|
|
6752
|
+
};
|
|
6653
6753
|
}, Name>;
|
|
6654
6754
|
};
|
|
6655
6755
|
queries: {
|
|
@@ -6667,6 +6767,15 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
6667
6767
|
_creationTime: number;
|
|
6668
6768
|
_id: string;
|
|
6669
6769
|
adjustmentAmount?: number;
|
|
6770
|
+
creditSource?: {
|
|
6771
|
+
creditGrantId: string;
|
|
6772
|
+
customerAccount: string;
|
|
6773
|
+
livemode: boolean;
|
|
6774
|
+
purchaseId: string;
|
|
6775
|
+
stripeAccountId: string;
|
|
6776
|
+
stripePriceId: string;
|
|
6777
|
+
stripeProductId: string;
|
|
6778
|
+
};
|
|
6670
6779
|
currency: string;
|
|
6671
6780
|
gross: number;
|
|
6672
6781
|
paymentId?: string;
|
|
@@ -6680,6 +6789,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
6680
6789
|
destinationAccountId: string;
|
|
6681
6790
|
role: "store" | "affiliate" | "other";
|
|
6682
6791
|
}>;
|
|
6792
|
+
usageSource?: {
|
|
6793
|
+
customerAccount: string;
|
|
6794
|
+
invoicePaymentId: string;
|
|
6795
|
+
livemode: boolean;
|
|
6796
|
+
meterId: string;
|
|
6797
|
+
model: "pay_as_you_go" | "included_overage";
|
|
6798
|
+
period: {
|
|
6799
|
+
end: number;
|
|
6800
|
+
start: number;
|
|
6801
|
+
};
|
|
6802
|
+
stripeAccountId: string;
|
|
6803
|
+
stripePriceId: string;
|
|
6804
|
+
stripeProductId: string;
|
|
6805
|
+
subscriptionId: string;
|
|
6806
|
+
subscriptionItemId: string;
|
|
6807
|
+
};
|
|
6683
6808
|
} | null, Name>;
|
|
6684
6809
|
listAffiliateObligations: FunctionReference<"query", "internal", {
|
|
6685
6810
|
affiliateAccountId: string;
|