@lunora/payment 1.0.0-alpha.23 → 1.0.0-alpha.25
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/README.md +2 -0
- package/dist/index.d.mts +214 -25
- package/dist/index.d.ts +214 -25
- package/dist/packem_shared/{adapter.d-SULGy2QF.d.mts → adapter.d-BOheUepr.d.mts} +121 -15
- package/dist/packem_shared/{adapter.d-SULGy2QF.d.ts → adapter.d-BOheUepr.d.ts} +121 -15
- package/dist/providers/autumn-features.d.mts +41 -6
- package/dist/providers/autumn-features.d.ts +41 -6
- package/dist/providers/autumn.d.mts +10 -1
- package/dist/providers/autumn.d.ts +10 -1
- package/dist/providers/creem.d.mts +10 -1
- package/dist/providers/creem.d.ts +10 -1
- package/dist/providers/dodopayments.d.mts +10 -1
- package/dist/providers/dodopayments.d.ts +10 -1
- package/dist/providers/polar.d.mts +10 -1
- package/dist/providers/polar.d.ts +10 -1
- package/dist/providers/stripe.d.mts +10 -1
- package/dist/providers/stripe.d.ts +10 -1
- package/package.json +4 -4
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* A per-seat / per-workspace sub-customer with its own feature balances.
|
|
3
|
+
* @experimental
|
|
4
|
+
*/
|
|
2
5
|
interface AutumnEntity {
|
|
3
6
|
readonly featureId?: string;
|
|
4
7
|
readonly id: string;
|
|
@@ -6,6 +9,10 @@ interface AutumnEntity {
|
|
|
6
9
|
/** The raw provider record, for fields this facade does not normalize. */
|
|
7
10
|
readonly raw: Record<string, unknown>;
|
|
8
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* `CreateEntityInput` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
14
|
+
* @experimental
|
|
15
|
+
*/
|
|
9
16
|
interface CreateEntityInput {
|
|
10
17
|
/** The feature the entity consumes a seat/allowance of (e.g. `"seats"`). */
|
|
11
18
|
readonly featureId: string;
|
|
@@ -13,26 +20,43 @@ interface CreateEntityInput {
|
|
|
13
20
|
readonly id: string;
|
|
14
21
|
readonly name?: string;
|
|
15
22
|
}
|
|
16
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* One point in a usage-events aggregation.
|
|
25
|
+
* @experimental
|
|
26
|
+
*/
|
|
17
27
|
interface UsageEventPoint {
|
|
18
28
|
readonly count: number;
|
|
19
29
|
readonly period?: string;
|
|
20
30
|
readonly raw: Record<string, unknown>;
|
|
21
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* `EventsListInput` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
34
|
+
* @experimental
|
|
35
|
+
*/
|
|
22
36
|
interface EventsListInput {
|
|
23
37
|
/** Feature(s) to report on. */
|
|
24
38
|
readonly featureId: ReadonlyArray<string> | string;
|
|
25
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* `EventsAggregateInput` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
42
|
+
* @experimental
|
|
43
|
+
*/
|
|
26
44
|
interface EventsAggregateInput extends EventsListInput {
|
|
27
45
|
/** Time window to aggregate over (aggregate only — `list` ignores it, so it isn't accepted there). */
|
|
28
46
|
readonly range?: "7d" | "24h" | "30d" | "90d" | "last_cycle";
|
|
29
47
|
}
|
|
30
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* A prepaid feature quantity purchased at checkout (e.g. buy 5 seats up front).
|
|
50
|
+
* @experimental
|
|
51
|
+
*/
|
|
31
52
|
interface PrepaidOption {
|
|
32
53
|
readonly featureId: string;
|
|
33
54
|
readonly quantity: number;
|
|
34
55
|
}
|
|
35
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Autumn-native checkout — richer than the generic `createCheckout` (trials, prepaid, entities, rewards).
|
|
58
|
+
* @experimental
|
|
59
|
+
*/
|
|
36
60
|
interface AutumnCheckoutInput {
|
|
37
61
|
/** Scope the checkout to a specific entity (seat/workspace) rather than the top-level customer. */
|
|
38
62
|
readonly entityId?: string;
|
|
@@ -49,7 +73,10 @@ interface AutumnCheckoutInput {
|
|
|
49
73
|
readonly reward?: string;
|
|
50
74
|
readonly successUrl?: string;
|
|
51
75
|
}
|
|
52
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* The subset of the Autumn SDK surface the native facade calls. A real `Autumn` instance satisfies it.
|
|
78
|
+
* @experimental
|
|
79
|
+
*/
|
|
53
80
|
interface AutumnFeaturesClientLike {
|
|
54
81
|
readonly billing: unknown;
|
|
55
82
|
readonly entities: unknown;
|
|
@@ -57,10 +84,17 @@ interface AutumnFeaturesClientLike {
|
|
|
57
84
|
readonly plans: unknown;
|
|
58
85
|
readonly referrals: unknown;
|
|
59
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* `AutumnFeaturesOptions` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
89
|
+
* @experimental
|
|
90
|
+
*/
|
|
60
91
|
interface AutumnFeaturesOptions {
|
|
61
92
|
readonly client: AutumnFeaturesClientLike;
|
|
62
93
|
}
|
|
63
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* The Autumn-native feature facade returned by {@link createAutumnFeatures}.
|
|
96
|
+
* @experimental
|
|
97
|
+
*/
|
|
64
98
|
interface AutumnFeatures {
|
|
65
99
|
readonly checkout: (referenceId: string, input: AutumnCheckoutInput) => Promise<{
|
|
66
100
|
raw: Record<string, unknown>;
|
|
@@ -89,6 +123,7 @@ interface AutumnFeatures {
|
|
|
89
123
|
/**
|
|
90
124
|
* Build the Autumn-native feature facade over an injected client. Companion to `createAutumnAdapter`;
|
|
91
125
|
* share the same underlying `autumn-js` `Autumn` client between them.
|
|
126
|
+
* @experimental
|
|
92
127
|
*/
|
|
93
128
|
declare const createAutumnFeatures: (options: AutumnFeaturesOptions) => AutumnFeatures;
|
|
94
129
|
export { type AutumnCheckoutInput, type AutumnEntity, type AutumnFeatures, type AutumnFeaturesClientLike, type AutumnFeaturesOptions, type CreateEntityInput, type EventsAggregateInput, type EventsListInput, type PrepaidOption, type UsageEventPoint, createAutumnFeatures };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* A per-seat / per-workspace sub-customer with its own feature balances.
|
|
3
|
+
* @experimental
|
|
4
|
+
*/
|
|
2
5
|
interface AutumnEntity {
|
|
3
6
|
readonly featureId?: string;
|
|
4
7
|
readonly id: string;
|
|
@@ -6,6 +9,10 @@ interface AutumnEntity {
|
|
|
6
9
|
/** The raw provider record, for fields this facade does not normalize. */
|
|
7
10
|
readonly raw: Record<string, unknown>;
|
|
8
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* `CreateEntityInput` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
14
|
+
* @experimental
|
|
15
|
+
*/
|
|
9
16
|
interface CreateEntityInput {
|
|
10
17
|
/** The feature the entity consumes a seat/allowance of (e.g. `"seats"`). */
|
|
11
18
|
readonly featureId: string;
|
|
@@ -13,26 +20,43 @@ interface CreateEntityInput {
|
|
|
13
20
|
readonly id: string;
|
|
14
21
|
readonly name?: string;
|
|
15
22
|
}
|
|
16
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* One point in a usage-events aggregation.
|
|
25
|
+
* @experimental
|
|
26
|
+
*/
|
|
17
27
|
interface UsageEventPoint {
|
|
18
28
|
readonly count: number;
|
|
19
29
|
readonly period?: string;
|
|
20
30
|
readonly raw: Record<string, unknown>;
|
|
21
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* `EventsListInput` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
34
|
+
* @experimental
|
|
35
|
+
*/
|
|
22
36
|
interface EventsListInput {
|
|
23
37
|
/** Feature(s) to report on. */
|
|
24
38
|
readonly featureId: ReadonlyArray<string> | string;
|
|
25
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* `EventsAggregateInput` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
42
|
+
* @experimental
|
|
43
|
+
*/
|
|
26
44
|
interface EventsAggregateInput extends EventsListInput {
|
|
27
45
|
/** Time window to aggregate over (aggregate only — `list` ignores it, so it isn't accepted there). */
|
|
28
46
|
readonly range?: "7d" | "24h" | "30d" | "90d" | "last_cycle";
|
|
29
47
|
}
|
|
30
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* A prepaid feature quantity purchased at checkout (e.g. buy 5 seats up front).
|
|
50
|
+
* @experimental
|
|
51
|
+
*/
|
|
31
52
|
interface PrepaidOption {
|
|
32
53
|
readonly featureId: string;
|
|
33
54
|
readonly quantity: number;
|
|
34
55
|
}
|
|
35
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Autumn-native checkout — richer than the generic `createCheckout` (trials, prepaid, entities, rewards).
|
|
58
|
+
* @experimental
|
|
59
|
+
*/
|
|
36
60
|
interface AutumnCheckoutInput {
|
|
37
61
|
/** Scope the checkout to a specific entity (seat/workspace) rather than the top-level customer. */
|
|
38
62
|
readonly entityId?: string;
|
|
@@ -49,7 +73,10 @@ interface AutumnCheckoutInput {
|
|
|
49
73
|
readonly reward?: string;
|
|
50
74
|
readonly successUrl?: string;
|
|
51
75
|
}
|
|
52
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* The subset of the Autumn SDK surface the native facade calls. A real `Autumn` instance satisfies it.
|
|
78
|
+
* @experimental
|
|
79
|
+
*/
|
|
53
80
|
interface AutumnFeaturesClientLike {
|
|
54
81
|
readonly billing: unknown;
|
|
55
82
|
readonly entities: unknown;
|
|
@@ -57,10 +84,17 @@ interface AutumnFeaturesClientLike {
|
|
|
57
84
|
readonly plans: unknown;
|
|
58
85
|
readonly referrals: unknown;
|
|
59
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* `AutumnFeaturesOptions` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
89
|
+
* @experimental
|
|
90
|
+
*/
|
|
60
91
|
interface AutumnFeaturesOptions {
|
|
61
92
|
readonly client: AutumnFeaturesClientLike;
|
|
62
93
|
}
|
|
63
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* The Autumn-native feature facade returned by {@link createAutumnFeatures}.
|
|
96
|
+
* @experimental
|
|
97
|
+
*/
|
|
64
98
|
interface AutumnFeatures {
|
|
65
99
|
readonly checkout: (referenceId: string, input: AutumnCheckoutInput) => Promise<{
|
|
66
100
|
raw: Record<string, unknown>;
|
|
@@ -89,6 +123,7 @@ interface AutumnFeatures {
|
|
|
89
123
|
/**
|
|
90
124
|
* Build the Autumn-native feature facade over an injected client. Companion to `createAutumnAdapter`;
|
|
91
125
|
* share the same underlying `autumn-js` `Autumn` client between them.
|
|
126
|
+
* @experimental
|
|
92
127
|
*/
|
|
93
128
|
declare const createAutumnFeatures: (options: AutumnFeaturesOptions) => AutumnFeatures;
|
|
94
129
|
export { type AutumnCheckoutInput, type AutumnEntity, type AutumnFeatures, type AutumnFeaturesClientLike, type AutumnFeaturesOptions, type CreateEntityInput, type EventsAggregateInput, type EventsListInput, type PrepaidOption, type UsageEventPoint, createAutumnFeatures };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { P as PaymentAdapter } from "../packem_shared/adapter.d-
|
|
1
|
+
import { P as PaymentAdapter } from "../packem_shared/adapter.d-BOheUepr.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* The `autumn-js` SDK surface the adapter uses, as a structural type — a real `Autumn` instance
|
|
4
4
|
* satisfies it without a cast. Resources/methods are `unknown` (the adapter re-types the client as
|
|
5
5
|
* the real `Autumn` internally); this keeps the SDK's full type out of the published declarations.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
interface AutumnClientLike {
|
|
8
9
|
readonly billing: unknown;
|
|
@@ -10,10 +11,18 @@ interface AutumnClientLike {
|
|
|
10
11
|
readonly customers: unknown;
|
|
11
12
|
readonly track: unknown;
|
|
12
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* `AutumnAdapterOptions` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
16
|
+
* @experimental
|
|
17
|
+
*/
|
|
13
18
|
interface AutumnAdapterOptions {
|
|
14
19
|
readonly client: AutumnClientLike;
|
|
15
20
|
readonly webhookSecret: string;
|
|
16
21
|
readonly webhookToleranceSeconds?: number;
|
|
17
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* `createAutumnAdapter` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
25
|
+
* @experimental
|
|
26
|
+
*/
|
|
18
27
|
declare const createAutumnAdapter: (options: AutumnAdapterOptions) => PaymentAdapter;
|
|
19
28
|
export { type AutumnAdapterOptions, type AutumnClientLike, createAutumnAdapter };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { P as PaymentAdapter } from "../packem_shared/adapter.d-
|
|
1
|
+
import { P as PaymentAdapter } from "../packem_shared/adapter.d-BOheUepr.js";
|
|
2
2
|
/**
|
|
3
3
|
* The `autumn-js` SDK surface the adapter uses, as a structural type — a real `Autumn` instance
|
|
4
4
|
* satisfies it without a cast. Resources/methods are `unknown` (the adapter re-types the client as
|
|
5
5
|
* the real `Autumn` internally); this keeps the SDK's full type out of the published declarations.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
interface AutumnClientLike {
|
|
8
9
|
readonly billing: unknown;
|
|
@@ -10,10 +11,18 @@ interface AutumnClientLike {
|
|
|
10
11
|
readonly customers: unknown;
|
|
11
12
|
readonly track: unknown;
|
|
12
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* `AutumnAdapterOptions` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
16
|
+
* @experimental
|
|
17
|
+
*/
|
|
13
18
|
interface AutumnAdapterOptions {
|
|
14
19
|
readonly client: AutumnClientLike;
|
|
15
20
|
readonly webhookSecret: string;
|
|
16
21
|
readonly webhookToleranceSeconds?: number;
|
|
17
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* `createAutumnAdapter` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
25
|
+
* @experimental
|
|
26
|
+
*/
|
|
18
27
|
declare const createAutumnAdapter: (options: AutumnAdapterOptions) => PaymentAdapter;
|
|
19
28
|
export { type AutumnAdapterOptions, type AutumnClientLike, createAutumnAdapter };
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import { P as PaymentAdapter } from "../packem_shared/adapter.d-
|
|
1
|
+
import { P as PaymentAdapter } from "../packem_shared/adapter.d-BOheUepr.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* The `creem` SDK surface the adapter uses, as a structural type — a real `Creem` instance satisfies
|
|
4
4
|
* it without a cast. Resources are `unknown` (the adapter re-types the client as the real `Creem`
|
|
5
5
|
* internally); this keeps the SDK's full type out of the published declarations.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
interface CreemClientLike {
|
|
8
9
|
readonly checkouts: unknown;
|
|
9
10
|
readonly customers: unknown;
|
|
10
11
|
readonly subscriptions: unknown;
|
|
11
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* `CreemAdapterOptions` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
15
|
+
* @experimental
|
|
16
|
+
*/
|
|
12
17
|
interface CreemAdapterOptions {
|
|
13
18
|
readonly client: CreemClientLike;
|
|
14
19
|
readonly webhookSecret: string;
|
|
15
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* `createCreemAdapter` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
23
|
+
* @experimental
|
|
24
|
+
*/
|
|
16
25
|
declare const createCreemAdapter: (options: CreemAdapterOptions) => PaymentAdapter;
|
|
17
26
|
export { type CreemAdapterOptions, type CreemClientLike, createCreemAdapter };
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import { P as PaymentAdapter } from "../packem_shared/adapter.d-
|
|
1
|
+
import { P as PaymentAdapter } from "../packem_shared/adapter.d-BOheUepr.js";
|
|
2
2
|
/**
|
|
3
3
|
* The `creem` SDK surface the adapter uses, as a structural type — a real `Creem` instance satisfies
|
|
4
4
|
* it without a cast. Resources are `unknown` (the adapter re-types the client as the real `Creem`
|
|
5
5
|
* internally); this keeps the SDK's full type out of the published declarations.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
interface CreemClientLike {
|
|
8
9
|
readonly checkouts: unknown;
|
|
9
10
|
readonly customers: unknown;
|
|
10
11
|
readonly subscriptions: unknown;
|
|
11
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* `CreemAdapterOptions` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
15
|
+
* @experimental
|
|
16
|
+
*/
|
|
12
17
|
interface CreemAdapterOptions {
|
|
13
18
|
readonly client: CreemClientLike;
|
|
14
19
|
readonly webhookSecret: string;
|
|
15
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* `createCreemAdapter` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
23
|
+
* @experimental
|
|
24
|
+
*/
|
|
16
25
|
declare const createCreemAdapter: (options: CreemAdapterOptions) => PaymentAdapter;
|
|
17
26
|
export { type CreemAdapterOptions, type CreemClientLike, createCreemAdapter };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { P as PaymentAdapter } from "../packem_shared/adapter.d-
|
|
1
|
+
import { P as PaymentAdapter } from "../packem_shared/adapter.d-BOheUepr.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* The `dodopayments` SDK surface the adapter uses, as a structural type — a real `DodoPayments`
|
|
4
4
|
* instance satisfies it without a cast. Resources are `unknown` (the adapter re-types the client as
|
|
5
5
|
* the real `DodoPayments` internally); this keeps the SDK's full type out of the published declarations.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
interface DodoPaymentsClientLike {
|
|
8
9
|
readonly checkoutSessions: unknown;
|
|
@@ -12,10 +13,18 @@ interface DodoPaymentsClientLike {
|
|
|
12
13
|
readonly subscriptions: unknown;
|
|
13
14
|
readonly usageEvents: unknown;
|
|
14
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* `DodoPaymentsAdapterOptions` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
18
|
+
* @experimental
|
|
19
|
+
*/
|
|
15
20
|
interface DodoPaymentsAdapterOptions {
|
|
16
21
|
readonly client: DodoPaymentsClientLike;
|
|
17
22
|
readonly webhookSecret: string;
|
|
18
23
|
readonly webhookToleranceSeconds?: number;
|
|
19
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* `createDodoPaymentsAdapter` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
27
|
+
* @experimental
|
|
28
|
+
*/
|
|
20
29
|
declare const createDodoPaymentsAdapter: (options: DodoPaymentsAdapterOptions) => PaymentAdapter;
|
|
21
30
|
export { type DodoPaymentsAdapterOptions, type DodoPaymentsClientLike, createDodoPaymentsAdapter };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { P as PaymentAdapter } from "../packem_shared/adapter.d-
|
|
1
|
+
import { P as PaymentAdapter } from "../packem_shared/adapter.d-BOheUepr.js";
|
|
2
2
|
/**
|
|
3
3
|
* The `dodopayments` SDK surface the adapter uses, as a structural type — a real `DodoPayments`
|
|
4
4
|
* instance satisfies it without a cast. Resources are `unknown` (the adapter re-types the client as
|
|
5
5
|
* the real `DodoPayments` internally); this keeps the SDK's full type out of the published declarations.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
interface DodoPaymentsClientLike {
|
|
8
9
|
readonly checkoutSessions: unknown;
|
|
@@ -12,10 +13,18 @@ interface DodoPaymentsClientLike {
|
|
|
12
13
|
readonly subscriptions: unknown;
|
|
13
14
|
readonly usageEvents: unknown;
|
|
14
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* `DodoPaymentsAdapterOptions` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
18
|
+
* @experimental
|
|
19
|
+
*/
|
|
15
20
|
interface DodoPaymentsAdapterOptions {
|
|
16
21
|
readonly client: DodoPaymentsClientLike;
|
|
17
22
|
readonly webhookSecret: string;
|
|
18
23
|
readonly webhookToleranceSeconds?: number;
|
|
19
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* `createDodoPaymentsAdapter` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
27
|
+
* @experimental
|
|
28
|
+
*/
|
|
20
29
|
declare const createDodoPaymentsAdapter: (options: DodoPaymentsAdapterOptions) => PaymentAdapter;
|
|
21
30
|
export { type DodoPaymentsAdapterOptions, type DodoPaymentsClientLike, createDodoPaymentsAdapter };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { P as PaymentAdapter } from "../packem_shared/adapter.d-
|
|
1
|
+
import { P as PaymentAdapter } from "../packem_shared/adapter.d-BOheUepr.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* The `@polar-sh/sdk` surface the adapter uses, as a structural type — a real `Polar` instance
|
|
4
4
|
* satisfies it without a cast. Resources are `unknown` (the adapter re-types the client as the real
|
|
5
5
|
* `Polar` internally); this keeps the SDK's full type out of the published declarations.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
interface PolarClientLike {
|
|
8
9
|
readonly checkouts: unknown;
|
|
@@ -13,10 +14,18 @@ interface PolarClientLike {
|
|
|
13
14
|
readonly refunds: unknown;
|
|
14
15
|
readonly subscriptions: unknown;
|
|
15
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* `PolarAdapterOptions` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
19
|
+
* @experimental
|
|
20
|
+
*/
|
|
16
21
|
interface PolarAdapterOptions {
|
|
17
22
|
readonly client: PolarClientLike;
|
|
18
23
|
readonly webhookSecret: string;
|
|
19
24
|
readonly webhookToleranceSeconds?: number;
|
|
20
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* `createPolarAdapter` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
28
|
+
* @experimental
|
|
29
|
+
*/
|
|
21
30
|
declare const createPolarAdapter: (options: PolarAdapterOptions) => PaymentAdapter;
|
|
22
31
|
export { type PolarAdapterOptions, type PolarClientLike, createPolarAdapter };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { P as PaymentAdapter } from "../packem_shared/adapter.d-
|
|
1
|
+
import { P as PaymentAdapter } from "../packem_shared/adapter.d-BOheUepr.js";
|
|
2
2
|
/**
|
|
3
3
|
* The `@polar-sh/sdk` surface the adapter uses, as a structural type — a real `Polar` instance
|
|
4
4
|
* satisfies it without a cast. Resources are `unknown` (the adapter re-types the client as the real
|
|
5
5
|
* `Polar` internally); this keeps the SDK's full type out of the published declarations.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
interface PolarClientLike {
|
|
8
9
|
readonly checkouts: unknown;
|
|
@@ -13,10 +14,18 @@ interface PolarClientLike {
|
|
|
13
14
|
readonly refunds: unknown;
|
|
14
15
|
readonly subscriptions: unknown;
|
|
15
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* `PolarAdapterOptions` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
19
|
+
* @experimental
|
|
20
|
+
*/
|
|
16
21
|
interface PolarAdapterOptions {
|
|
17
22
|
readonly client: PolarClientLike;
|
|
18
23
|
readonly webhookSecret: string;
|
|
19
24
|
readonly webhookToleranceSeconds?: number;
|
|
20
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* `createPolarAdapter` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
28
|
+
* @experimental
|
|
29
|
+
*/
|
|
21
30
|
declare const createPolarAdapter: (options: PolarAdapterOptions) => PaymentAdapter;
|
|
22
31
|
export { type PolarAdapterOptions, type PolarClientLike, createPolarAdapter };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { P as PaymentAdapter } from "../packem_shared/adapter.d-
|
|
1
|
+
import { P as PaymentAdapter } from "../packem_shared/adapter.d-BOheUepr.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* The Stripe SDK surface the adapter uses, as a structural type — a real `Stripe` instance satisfies
|
|
4
4
|
* it without a cast. Resources are `unknown` here (the adapter re-types the client as the real
|
|
5
5
|
* `Stripe` internally); this keeps the SDK's full type out of the published declaration files.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
interface StripeClientLike {
|
|
8
9
|
readonly billing: unknown;
|
|
@@ -14,10 +15,18 @@ interface StripeClientLike {
|
|
|
14
15
|
readonly subscriptions: unknown;
|
|
15
16
|
readonly webhooks: unknown;
|
|
16
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* `StripeAdapterOptions` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
20
|
+
* @experimental
|
|
21
|
+
*/
|
|
17
22
|
interface StripeAdapterOptions {
|
|
18
23
|
readonly client: StripeClientLike;
|
|
19
24
|
readonly webhookSecret: string;
|
|
20
25
|
readonly webhookToleranceSeconds?: number;
|
|
21
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* `createStripeAdapter` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
29
|
+
* @experimental
|
|
30
|
+
*/
|
|
22
31
|
declare const createStripeAdapter: (options: StripeAdapterOptions) => PaymentAdapter;
|
|
23
32
|
export { type StripeAdapterOptions, type StripeClientLike, createStripeAdapter };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { P as PaymentAdapter } from "../packem_shared/adapter.d-
|
|
1
|
+
import { P as PaymentAdapter } from "../packem_shared/adapter.d-BOheUepr.js";
|
|
2
2
|
/**
|
|
3
3
|
* The Stripe SDK surface the adapter uses, as a structural type — a real `Stripe` instance satisfies
|
|
4
4
|
* it without a cast. Resources are `unknown` here (the adapter re-types the client as the real
|
|
5
5
|
* `Stripe` internally); this keeps the SDK's full type out of the published declaration files.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
interface StripeClientLike {
|
|
8
9
|
readonly billing: unknown;
|
|
@@ -14,10 +15,18 @@ interface StripeClientLike {
|
|
|
14
15
|
readonly subscriptions: unknown;
|
|
15
16
|
readonly webhooks: unknown;
|
|
16
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* `StripeAdapterOptions` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
20
|
+
* @experimental
|
|
21
|
+
*/
|
|
17
22
|
interface StripeAdapterOptions {
|
|
18
23
|
readonly client: StripeClientLike;
|
|
19
24
|
readonly webhookSecret: string;
|
|
20
25
|
readonly webhookToleranceSeconds?: number;
|
|
21
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* `createStripeAdapter` is part of the experimental `@lunora/payment` API and may change without a major version bump.
|
|
29
|
+
* @experimental
|
|
30
|
+
*/
|
|
22
31
|
declare const createStripeAdapter: (options: StripeAdapterOptions) => PaymentAdapter;
|
|
23
32
|
export { type StripeAdapterOptions, type StripeClientLike, createStripeAdapter };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/payment",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.25",
|
|
4
4
|
"description": "Provider-agnostic payments for Lunora: Stripe-first adapter, webhook sync, and subscription/payment state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"billing",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@lunora/errors": "1.0.0-alpha.
|
|
75
|
-
"@lunora/server": "1.0.0-alpha.
|
|
76
|
-
"@lunora/values": "1.0.0-alpha.
|
|
74
|
+
"@lunora/errors": "1.0.0-alpha.5",
|
|
75
|
+
"@lunora/server": "1.0.0-alpha.25",
|
|
76
|
+
"@lunora/values": "1.0.0-alpha.8",
|
|
77
77
|
"dinero.js": "2.0.2"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|