@btst/plugin-affiliate 0.0.0-stage → 1.0.0-beta.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/LICENSE.md +17 -0
- package/dist/api/getters.cjs +182 -0
- package/dist/api/getters.mjs +166 -0
- package/dist/api/index.cjs +49 -0
- package/dist/api/index.d.cts +975 -0
- package/dist/api/index.d.mts +975 -0
- package/dist/api/index.d.ts +975 -0
- package/dist/api/index.mjs +7 -0
- package/dist/api/mutations.cjs +362 -0
- package/dist/api/mutations.mjs +352 -0
- package/dist/api/operations.cjs +328 -0
- package/dist/api/operations.mjs +326 -0
- package/dist/api/plugin.cjs +146 -0
- package/dist/api/plugin.mjs +144 -0
- package/dist/attribution.cjs +92 -0
- package/dist/attribution.d.cts +20 -0
- package/dist/attribution.d.mts +20 -0
- package/dist/attribution.d.ts +20 -0
- package/dist/attribution.mjs +82 -0
- package/dist/client/components/index.cjs +12 -0
- package/dist/client/components/index.d.cts +13 -0
- package/dist/client/components/index.d.mts +13 -0
- package/dist/client/components/index.d.ts +13 -0
- package/dist/client/components/index.mjs +1 -0
- package/dist/client/components/pages/affiliate-apply-page.internal.cjs +59 -0
- package/dist/client/components/pages/affiliate-apply-page.internal.mjs +57 -0
- package/dist/client/components/pages/affiliate-detail-page.internal.cjs +112 -0
- package/dist/client/components/pages/affiliate-detail-page.internal.mjs +110 -0
- package/dist/client/components/pages/affiliate-portal-page.internal.cjs +252 -0
- package/dist/client/components/pages/affiliate-portal-page.internal.mjs +250 -0
- package/dist/client/components/pages/affiliates-page.internal.cjs +160 -0
- package/dist/client/components/pages/affiliates-page.internal.mjs +158 -0
- package/dist/client/components/pages/commissions-page.internal.cjs +151 -0
- package/dist/client/components/pages/commissions-page.internal.mjs +149 -0
- package/dist/client/components/pages/payouts-page.internal.cjs +230 -0
- package/dist/client/components/pages/payouts-page.internal.mjs +228 -0
- package/dist/client/components/pages.cjs +145 -0
- package/dist/client/components/pages.mjs +138 -0
- package/dist/client/components/shared.cjs +331 -0
- package/dist/client/components/shared.mjs +316 -0
- package/dist/client/constants.cjs +5 -0
- package/dist/client/constants.mjs +3 -0
- package/dist/client/hooks/index.cjs +77 -0
- package/dist/client/hooks/index.d.cts +39 -0
- package/dist/client/hooks/index.d.mts +39 -0
- package/dist/client/hooks/index.d.ts +39 -0
- package/dist/client/hooks/index.mjs +61 -0
- package/dist/client/index.cjs +7 -0
- package/dist/client/index.d.cts +110 -0
- package/dist/client/index.d.mts +110 -0
- package/dist/client/index.d.ts +110 -0
- package/dist/client/index.mjs +1 -0
- package/dist/client/plugin.cjs +77 -0
- package/dist/client/plugin.mjs +75 -0
- package/dist/client.css +311 -0
- package/dist/commission.cjs +24 -0
- package/dist/commission.mjs +22 -0
- package/dist/db.cjs +74 -0
- package/dist/db.mjs +72 -0
- package/dist/permissions.cjs +53 -0
- package/dist/permissions.d.cts +78 -0
- package/dist/permissions.d.mts +78 -0
- package/dist/permissions.d.ts +78 -0
- package/dist/permissions.mjs +51 -0
- package/dist/query-keys.cjs +152 -0
- package/dist/query-keys.d.cts +394 -0
- package/dist/query-keys.d.mts +394 -0
- package/dist/query-keys.d.ts +394 -0
- package/dist/query-keys.mjs +149 -0
- package/dist/schemas.cjs +95 -0
- package/dist/schemas.mjs +77 -0
- package/dist/style.css +313 -0
- package/dist/types.cjs +2 -0
- package/dist/types.d.cts +176 -0
- package/dist/types.d.mts +176 -0
- package/dist/types.d.ts +176 -0
- package/dist/types.mjs +1 -0
- package/package.json +159 -3
- package/README.md +0 -3
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/** Application review and referral eligibility state. */
|
|
2
|
+
type AffiliateStatus = "pending" | "approved" | "suspended";
|
|
3
|
+
/** Percentage points or a fixed amount in currency minor units. */
|
|
4
|
+
type CommissionType = "percent" | "flat";
|
|
5
|
+
/** Review and settlement state; payouts alone move commissions to paid. */
|
|
6
|
+
type CommissionStatus = "pending" | "approved" | "paid" | "voided";
|
|
7
|
+
/** Manual payment outcome; failed batches release their reserved commissions. */
|
|
8
|
+
type PayoutStatus = "pending" | "sent" | "failed";
|
|
9
|
+
/** Partner profile with ISO timestamp strings and optional administrative notes. */
|
|
10
|
+
interface Affiliate {
|
|
11
|
+
id: string;
|
|
12
|
+
/** Authenticated account that exclusively owns this profile's portal. */
|
|
13
|
+
userId: string;
|
|
14
|
+
name: string;
|
|
15
|
+
email: string;
|
|
16
|
+
code: string;
|
|
17
|
+
status: AffiliateStatus;
|
|
18
|
+
/** Payment instructions stored as text, without processor-specific validation. */
|
|
19
|
+
payoutDetails?: string | null;
|
|
20
|
+
/** Administrative notes, omitted from portal responses. */
|
|
21
|
+
notes?: string | null;
|
|
22
|
+
commissionType?: CommissionType | null;
|
|
23
|
+
commissionValue?: number | null;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
}
|
|
27
|
+
/** Recorded visit; its stored ISO timestamp determines cookie attribution eligibility. */
|
|
28
|
+
interface ReferralClick {
|
|
29
|
+
id: string;
|
|
30
|
+
affiliateId: string;
|
|
31
|
+
code: string;
|
|
32
|
+
landingPath?: string | null;
|
|
33
|
+
referrer?: string | null;
|
|
34
|
+
/** Optional hash supplied by a trusted integration; HTTP tracking does not collect IPs. */
|
|
35
|
+
ipHash?: string | null;
|
|
36
|
+
userAgent?: string | null;
|
|
37
|
+
createdAt: string;
|
|
38
|
+
}
|
|
39
|
+
/** Attributed order/event with a safe integer amount in currency minor units. */
|
|
40
|
+
interface Conversion {
|
|
41
|
+
id: string;
|
|
42
|
+
affiliateId: string;
|
|
43
|
+
clickId?: string | null;
|
|
44
|
+
/** Stable order/event identifier used to deduplicate conversion retries. */
|
|
45
|
+
externalRef?: string | null;
|
|
46
|
+
amount: number;
|
|
47
|
+
currency: string;
|
|
48
|
+
status: "pending" | "approved" | "rejected";
|
|
49
|
+
createdAt: string;
|
|
50
|
+
}
|
|
51
|
+
/** Earnings from one conversion, expressed in currency minor units with ISO timestamps. */
|
|
52
|
+
interface Commission {
|
|
53
|
+
id: string;
|
|
54
|
+
affiliateId: string;
|
|
55
|
+
conversionId: string;
|
|
56
|
+
/** Pending or settled payout reservation; empty when available for a new batch. */
|
|
57
|
+
payoutId?: string | null;
|
|
58
|
+
amount: number;
|
|
59
|
+
currency: string;
|
|
60
|
+
status: CommissionStatus;
|
|
61
|
+
createdAt: string;
|
|
62
|
+
updatedAt: string;
|
|
63
|
+
}
|
|
64
|
+
/** One affiliate's manual payment batch in one currency; dates are ISO strings. */
|
|
65
|
+
interface Payout {
|
|
66
|
+
id: string;
|
|
67
|
+
affiliateId: string;
|
|
68
|
+
amount: number;
|
|
69
|
+
currency: string;
|
|
70
|
+
status: PayoutStatus;
|
|
71
|
+
reference?: string | null;
|
|
72
|
+
paidAt?: string | null;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
}
|
|
75
|
+
/** Offset pagination and filters for affiliate administration lists. */
|
|
76
|
+
interface ListParams {
|
|
77
|
+
limit?: number;
|
|
78
|
+
offset?: number;
|
|
79
|
+
affiliateId?: string;
|
|
80
|
+
status?: string;
|
|
81
|
+
currency?: string;
|
|
82
|
+
}
|
|
83
|
+
/** A page of records and the total count before pagination. */
|
|
84
|
+
interface ListResult<T> {
|
|
85
|
+
items: T[];
|
|
86
|
+
total: number;
|
|
87
|
+
limit: number;
|
|
88
|
+
offset: number;
|
|
89
|
+
}
|
|
90
|
+
/** Referral counts and commission minor-unit totals, grouped separately per currency. */
|
|
91
|
+
interface AffiliateStats {
|
|
92
|
+
clicks: number;
|
|
93
|
+
conversions: number;
|
|
94
|
+
totals: {
|
|
95
|
+
currency: string;
|
|
96
|
+
pending: number;
|
|
97
|
+
approved: number;
|
|
98
|
+
paid: number;
|
|
99
|
+
voided: number;
|
|
100
|
+
}[];
|
|
101
|
+
}
|
|
102
|
+
/** HTTP(S) landing-page template and optional banner link shown to partners. */
|
|
103
|
+
interface MarketingAsset {
|
|
104
|
+
name: string;
|
|
105
|
+
url: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
bannerUrl?: string;
|
|
108
|
+
}
|
|
109
|
+
/** One account's profile, totals, recent financial history, and program marketing assets. */
|
|
110
|
+
interface AffiliatePortal {
|
|
111
|
+
affiliate: Affiliate | null;
|
|
112
|
+
stats: AffiliateStats;
|
|
113
|
+
commissions: Commission[];
|
|
114
|
+
payouts: Payout[];
|
|
115
|
+
assets: MarketingAsset[];
|
|
116
|
+
}
|
|
117
|
+
/** Pending-profile input; administrators supply ownership, applications use request identity. */
|
|
118
|
+
interface CreateAffiliateInput {
|
|
119
|
+
userId: string;
|
|
120
|
+
name: string;
|
|
121
|
+
email: string;
|
|
122
|
+
code?: string;
|
|
123
|
+
payoutDetails?: string;
|
|
124
|
+
}
|
|
125
|
+
/** Administrative profile edits; commission override type and value must be set or cleared together. */
|
|
126
|
+
interface UpdateAffiliateInput {
|
|
127
|
+
name?: string;
|
|
128
|
+
email?: string;
|
|
129
|
+
code?: string;
|
|
130
|
+
status?: AffiliateStatus;
|
|
131
|
+
payoutDetails?: string | null;
|
|
132
|
+
notes?: string | null;
|
|
133
|
+
commissionType?: CommissionType | null;
|
|
134
|
+
commissionValue?: number | null;
|
|
135
|
+
}
|
|
136
|
+
/** A referral visit and optional metadata supplied by the tracking transport or trusted caller. */
|
|
137
|
+
interface TrackClickInput {
|
|
138
|
+
code: string;
|
|
139
|
+
landingPath?: string;
|
|
140
|
+
referrer?: string;
|
|
141
|
+
ipHash?: string;
|
|
142
|
+
userAgent?: string;
|
|
143
|
+
}
|
|
144
|
+
/** Verified order/event amount and attribution; omitted attribution returns null without a request fallback. */
|
|
145
|
+
interface CreateConversionInput {
|
|
146
|
+
externalRef?: string;
|
|
147
|
+
amount: number;
|
|
148
|
+
currency?: string;
|
|
149
|
+
attribution?: {
|
|
150
|
+
code?: string;
|
|
151
|
+
clickId?: string;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/** Reserve selected or all available approved commissions for one affiliate and currency. */
|
|
155
|
+
interface CreatePayoutInput {
|
|
156
|
+
affiliateId: string;
|
|
157
|
+
currency: string;
|
|
158
|
+
commissionIds?: string[];
|
|
159
|
+
}
|
|
160
|
+
/** Attribution window, default commission rule, and optional partner marketing assets. */
|
|
161
|
+
interface AffiliateOptions {
|
|
162
|
+
/** Trusted HTTP(S) site origin for tracking redirects when the API uses a separate origin. */
|
|
163
|
+
siteOrigin?: string;
|
|
164
|
+
/** Number of days a stored referral click remains eligible. Defaults to 30. */
|
|
165
|
+
attributionWindowDays?: number;
|
|
166
|
+
/** Whether a new tracked referral replaces the existing cookie. Defaults to last_touch. */
|
|
167
|
+
attributionMode?: "first_touch" | "last_touch";
|
|
168
|
+
/** Default commission rule, unless the affiliate has an override. Defaults to percent. */
|
|
169
|
+
defaultCommissionType?: CommissionType;
|
|
170
|
+
/** Percentage (up to two decimals) or integer minor units for flat rules. Defaults to 20. */
|
|
171
|
+
defaultCommissionValue?: number;
|
|
172
|
+
/** Optional landing page templates and banner metadata displayed in the portal. */
|
|
173
|
+
marketingAssets?: MarketingAsset[];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export type { Affiliate, AffiliateOptions, AffiliatePortal, AffiliateStats, AffiliateStatus, Commission, CommissionStatus, CommissionType, Conversion, CreateAffiliateInput, CreateConversionInput, CreatePayoutInput, ListParams, ListResult, MarketingAsset, Payout, PayoutStatus, ReferralClick, TrackClickInput, UpdateAffiliateInput };
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/** Application review and referral eligibility state. */
|
|
2
|
+
type AffiliateStatus = "pending" | "approved" | "suspended";
|
|
3
|
+
/** Percentage points or a fixed amount in currency minor units. */
|
|
4
|
+
type CommissionType = "percent" | "flat";
|
|
5
|
+
/** Review and settlement state; payouts alone move commissions to paid. */
|
|
6
|
+
type CommissionStatus = "pending" | "approved" | "paid" | "voided";
|
|
7
|
+
/** Manual payment outcome; failed batches release their reserved commissions. */
|
|
8
|
+
type PayoutStatus = "pending" | "sent" | "failed";
|
|
9
|
+
/** Partner profile with ISO timestamp strings and optional administrative notes. */
|
|
10
|
+
interface Affiliate {
|
|
11
|
+
id: string;
|
|
12
|
+
/** Authenticated account that exclusively owns this profile's portal. */
|
|
13
|
+
userId: string;
|
|
14
|
+
name: string;
|
|
15
|
+
email: string;
|
|
16
|
+
code: string;
|
|
17
|
+
status: AffiliateStatus;
|
|
18
|
+
/** Payment instructions stored as text, without processor-specific validation. */
|
|
19
|
+
payoutDetails?: string | null;
|
|
20
|
+
/** Administrative notes, omitted from portal responses. */
|
|
21
|
+
notes?: string | null;
|
|
22
|
+
commissionType?: CommissionType | null;
|
|
23
|
+
commissionValue?: number | null;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
}
|
|
27
|
+
/** Recorded visit; its stored ISO timestamp determines cookie attribution eligibility. */
|
|
28
|
+
interface ReferralClick {
|
|
29
|
+
id: string;
|
|
30
|
+
affiliateId: string;
|
|
31
|
+
code: string;
|
|
32
|
+
landingPath?: string | null;
|
|
33
|
+
referrer?: string | null;
|
|
34
|
+
/** Optional hash supplied by a trusted integration; HTTP tracking does not collect IPs. */
|
|
35
|
+
ipHash?: string | null;
|
|
36
|
+
userAgent?: string | null;
|
|
37
|
+
createdAt: string;
|
|
38
|
+
}
|
|
39
|
+
/** Attributed order/event with a safe integer amount in currency minor units. */
|
|
40
|
+
interface Conversion {
|
|
41
|
+
id: string;
|
|
42
|
+
affiliateId: string;
|
|
43
|
+
clickId?: string | null;
|
|
44
|
+
/** Stable order/event identifier used to deduplicate conversion retries. */
|
|
45
|
+
externalRef?: string | null;
|
|
46
|
+
amount: number;
|
|
47
|
+
currency: string;
|
|
48
|
+
status: "pending" | "approved" | "rejected";
|
|
49
|
+
createdAt: string;
|
|
50
|
+
}
|
|
51
|
+
/** Earnings from one conversion, expressed in currency minor units with ISO timestamps. */
|
|
52
|
+
interface Commission {
|
|
53
|
+
id: string;
|
|
54
|
+
affiliateId: string;
|
|
55
|
+
conversionId: string;
|
|
56
|
+
/** Pending or settled payout reservation; empty when available for a new batch. */
|
|
57
|
+
payoutId?: string | null;
|
|
58
|
+
amount: number;
|
|
59
|
+
currency: string;
|
|
60
|
+
status: CommissionStatus;
|
|
61
|
+
createdAt: string;
|
|
62
|
+
updatedAt: string;
|
|
63
|
+
}
|
|
64
|
+
/** One affiliate's manual payment batch in one currency; dates are ISO strings. */
|
|
65
|
+
interface Payout {
|
|
66
|
+
id: string;
|
|
67
|
+
affiliateId: string;
|
|
68
|
+
amount: number;
|
|
69
|
+
currency: string;
|
|
70
|
+
status: PayoutStatus;
|
|
71
|
+
reference?: string | null;
|
|
72
|
+
paidAt?: string | null;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
}
|
|
75
|
+
/** Offset pagination and filters for affiliate administration lists. */
|
|
76
|
+
interface ListParams {
|
|
77
|
+
limit?: number;
|
|
78
|
+
offset?: number;
|
|
79
|
+
affiliateId?: string;
|
|
80
|
+
status?: string;
|
|
81
|
+
currency?: string;
|
|
82
|
+
}
|
|
83
|
+
/** A page of records and the total count before pagination. */
|
|
84
|
+
interface ListResult<T> {
|
|
85
|
+
items: T[];
|
|
86
|
+
total: number;
|
|
87
|
+
limit: number;
|
|
88
|
+
offset: number;
|
|
89
|
+
}
|
|
90
|
+
/** Referral counts and commission minor-unit totals, grouped separately per currency. */
|
|
91
|
+
interface AffiliateStats {
|
|
92
|
+
clicks: number;
|
|
93
|
+
conversions: number;
|
|
94
|
+
totals: {
|
|
95
|
+
currency: string;
|
|
96
|
+
pending: number;
|
|
97
|
+
approved: number;
|
|
98
|
+
paid: number;
|
|
99
|
+
voided: number;
|
|
100
|
+
}[];
|
|
101
|
+
}
|
|
102
|
+
/** HTTP(S) landing-page template and optional banner link shown to partners. */
|
|
103
|
+
interface MarketingAsset {
|
|
104
|
+
name: string;
|
|
105
|
+
url: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
bannerUrl?: string;
|
|
108
|
+
}
|
|
109
|
+
/** One account's profile, totals, recent financial history, and program marketing assets. */
|
|
110
|
+
interface AffiliatePortal {
|
|
111
|
+
affiliate: Affiliate | null;
|
|
112
|
+
stats: AffiliateStats;
|
|
113
|
+
commissions: Commission[];
|
|
114
|
+
payouts: Payout[];
|
|
115
|
+
assets: MarketingAsset[];
|
|
116
|
+
}
|
|
117
|
+
/** Pending-profile input; administrators supply ownership, applications use request identity. */
|
|
118
|
+
interface CreateAffiliateInput {
|
|
119
|
+
userId: string;
|
|
120
|
+
name: string;
|
|
121
|
+
email: string;
|
|
122
|
+
code?: string;
|
|
123
|
+
payoutDetails?: string;
|
|
124
|
+
}
|
|
125
|
+
/** Administrative profile edits; commission override type and value must be set or cleared together. */
|
|
126
|
+
interface UpdateAffiliateInput {
|
|
127
|
+
name?: string;
|
|
128
|
+
email?: string;
|
|
129
|
+
code?: string;
|
|
130
|
+
status?: AffiliateStatus;
|
|
131
|
+
payoutDetails?: string | null;
|
|
132
|
+
notes?: string | null;
|
|
133
|
+
commissionType?: CommissionType | null;
|
|
134
|
+
commissionValue?: number | null;
|
|
135
|
+
}
|
|
136
|
+
/** A referral visit and optional metadata supplied by the tracking transport or trusted caller. */
|
|
137
|
+
interface TrackClickInput {
|
|
138
|
+
code: string;
|
|
139
|
+
landingPath?: string;
|
|
140
|
+
referrer?: string;
|
|
141
|
+
ipHash?: string;
|
|
142
|
+
userAgent?: string;
|
|
143
|
+
}
|
|
144
|
+
/** Verified order/event amount and attribution; omitted attribution returns null without a request fallback. */
|
|
145
|
+
interface CreateConversionInput {
|
|
146
|
+
externalRef?: string;
|
|
147
|
+
amount: number;
|
|
148
|
+
currency?: string;
|
|
149
|
+
attribution?: {
|
|
150
|
+
code?: string;
|
|
151
|
+
clickId?: string;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/** Reserve selected or all available approved commissions for one affiliate and currency. */
|
|
155
|
+
interface CreatePayoutInput {
|
|
156
|
+
affiliateId: string;
|
|
157
|
+
currency: string;
|
|
158
|
+
commissionIds?: string[];
|
|
159
|
+
}
|
|
160
|
+
/** Attribution window, default commission rule, and optional partner marketing assets. */
|
|
161
|
+
interface AffiliateOptions {
|
|
162
|
+
/** Trusted HTTP(S) site origin for tracking redirects when the API uses a separate origin. */
|
|
163
|
+
siteOrigin?: string;
|
|
164
|
+
/** Number of days a stored referral click remains eligible. Defaults to 30. */
|
|
165
|
+
attributionWindowDays?: number;
|
|
166
|
+
/** Whether a new tracked referral replaces the existing cookie. Defaults to last_touch. */
|
|
167
|
+
attributionMode?: "first_touch" | "last_touch";
|
|
168
|
+
/** Default commission rule, unless the affiliate has an override. Defaults to percent. */
|
|
169
|
+
defaultCommissionType?: CommissionType;
|
|
170
|
+
/** Percentage (up to two decimals) or integer minor units for flat rules. Defaults to 20. */
|
|
171
|
+
defaultCommissionValue?: number;
|
|
172
|
+
/** Optional landing page templates and banner metadata displayed in the portal. */
|
|
173
|
+
marketingAssets?: MarketingAsset[];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export type { Affiliate, AffiliateOptions, AffiliatePortal, AffiliateStats, AffiliateStatus, Commission, CommissionStatus, CommissionType, Conversion, CreateAffiliateInput, CreateConversionInput, CreatePayoutInput, ListParams, ListResult, MarketingAsset, Payout, PayoutStatus, ReferralClick, TrackClickInput, UpdateAffiliateInput };
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,162 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@btst/plugin-affiliate",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/better-stack-ai/better-stack.git"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"**/*.css"
|
|
18
|
+
],
|
|
19
|
+
"description": "Affiliate plugin for the BTST core runtime.",
|
|
20
|
+
"exports": {
|
|
21
|
+
"./api": {
|
|
22
|
+
"import": {
|
|
23
|
+
"types": "./dist/api/index.d.ts",
|
|
24
|
+
"default": "./dist/api/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"require": {
|
|
27
|
+
"types": "./dist/api/index.d.cts",
|
|
28
|
+
"default": "./dist/api/index.cjs"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"./client": {
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/client/index.d.ts",
|
|
34
|
+
"default": "./dist/client/index.mjs"
|
|
35
|
+
},
|
|
36
|
+
"require": {
|
|
37
|
+
"types": "./dist/client/index.d.cts",
|
|
38
|
+
"default": "./dist/client/index.cjs"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"./client/hooks": {
|
|
42
|
+
"import": {
|
|
43
|
+
"types": "./dist/client/hooks/index.d.ts",
|
|
44
|
+
"default": "./dist/client/hooks/index.mjs"
|
|
45
|
+
},
|
|
46
|
+
"require": {
|
|
47
|
+
"types": "./dist/client/hooks/index.d.cts",
|
|
48
|
+
"default": "./dist/client/hooks/index.cjs"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"./client/components": {
|
|
52
|
+
"import": {
|
|
53
|
+
"types": "./dist/client/components/index.d.ts",
|
|
54
|
+
"default": "./dist/client/components/index.mjs"
|
|
55
|
+
},
|
|
56
|
+
"require": {
|
|
57
|
+
"types": "./dist/client/components/index.d.cts",
|
|
58
|
+
"default": "./dist/client/components/index.cjs"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"./query-keys": {
|
|
62
|
+
"import": {
|
|
63
|
+
"types": "./dist/query-keys.d.ts",
|
|
64
|
+
"default": "./dist/query-keys.mjs"
|
|
65
|
+
},
|
|
66
|
+
"require": {
|
|
67
|
+
"types": "./dist/query-keys.d.cts",
|
|
68
|
+
"default": "./dist/query-keys.cjs"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"./permissions": {
|
|
72
|
+
"import": {
|
|
73
|
+
"types": "./dist/permissions.d.ts",
|
|
74
|
+
"default": "./dist/permissions.mjs"
|
|
75
|
+
},
|
|
76
|
+
"require": {
|
|
77
|
+
"types": "./dist/permissions.d.cts",
|
|
78
|
+
"default": "./dist/permissions.cjs"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"./attribution": {
|
|
82
|
+
"import": {
|
|
83
|
+
"types": "./dist/attribution.d.ts",
|
|
84
|
+
"default": "./dist/attribution.mjs"
|
|
85
|
+
},
|
|
86
|
+
"require": {
|
|
87
|
+
"types": "./dist/attribution.d.cts",
|
|
88
|
+
"default": "./dist/attribution.cjs"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"./types": {
|
|
92
|
+
"import": {
|
|
93
|
+
"types": "./dist/types.d.ts",
|
|
94
|
+
"default": "./dist/types.mjs"
|
|
95
|
+
},
|
|
96
|
+
"require": {
|
|
97
|
+
"types": "./dist/types.d.cts",
|
|
98
|
+
"default": "./dist/types.cjs"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"./css": "./dist/style.css"
|
|
102
|
+
},
|
|
103
|
+
"typesVersions": {
|
|
104
|
+
"*": {
|
|
105
|
+
"api": [
|
|
106
|
+
"./dist/api/index.d.ts"
|
|
107
|
+
],
|
|
108
|
+
"client": [
|
|
109
|
+
"./dist/client/index.d.ts"
|
|
110
|
+
],
|
|
111
|
+
"client/hooks": [
|
|
112
|
+
"./dist/client/hooks/index.d.ts"
|
|
113
|
+
],
|
|
114
|
+
"client/components": [
|
|
115
|
+
"./dist/client/components/index.d.ts"
|
|
116
|
+
],
|
|
117
|
+
"query-keys": [
|
|
118
|
+
"./dist/query-keys.d.ts"
|
|
119
|
+
],
|
|
120
|
+
"permissions": [
|
|
121
|
+
"./dist/permissions.d.ts"
|
|
122
|
+
],
|
|
123
|
+
"attribution": [
|
|
124
|
+
"./dist/attribution.d.ts"
|
|
125
|
+
],
|
|
126
|
+
"types": [
|
|
127
|
+
"./dist/types.d.ts"
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"dependencies": {
|
|
132
|
+
"@btst/db": "3.0.1",
|
|
133
|
+
"better-call": "1.4.4",
|
|
134
|
+
"zod": "^4.2.1"
|
|
135
|
+
},
|
|
136
|
+
"peerDependencies": {
|
|
137
|
+
"@btst/stack": ">=6.0.0-beta.0 <7.0.0",
|
|
138
|
+
"@btst/yar": ">=1.3.2",
|
|
139
|
+
"@tanstack/react-query": "^5.0.0",
|
|
140
|
+
"react": ">=19.2.6",
|
|
141
|
+
"react-dom": ">=19.2.6"
|
|
142
|
+
},
|
|
143
|
+
"devDependencies": {
|
|
144
|
+
"@btst/yar": "1.3.2",
|
|
145
|
+
"@tanstack/react-query": "5.105.0",
|
|
146
|
+
"@types/react": "^19.3.0",
|
|
147
|
+
"@types/react-dom": "^19.3.0",
|
|
148
|
+
"react": "^19.3.1",
|
|
149
|
+
"react-dom": "^19.3.1",
|
|
150
|
+
"typescript": "^5.6.3",
|
|
151
|
+
"unbuild": "3.6.1",
|
|
152
|
+
"vitest": "^4.1.12",
|
|
153
|
+
"@btst/adapter-memory": "3.0.1",
|
|
154
|
+
"@btst/stack": "6.0.0-beta.0"
|
|
155
|
+
},
|
|
156
|
+
"gitHead": "ac7a6206d81e36262baf4392255575b4dc9bf6b5",
|
|
157
|
+
"scripts": {
|
|
158
|
+
"build": "unbuild --clean",
|
|
159
|
+
"typecheck": "tsc --project tsconfig.json",
|
|
160
|
+
"test": "vitest run"
|
|
161
|
+
}
|
|
6
162
|
}
|
package/README.md
DELETED