@coinlist-co/react 0.4.0 → 0.5.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/dist/chunk-CRACFEJ4.js +17 -0
- package/dist/chunk-CRACFEJ4.js.map +1 -0
- package/dist/{chunk-NC45IO63.js → chunk-N3WBC2VS.js} +20 -325
- package/dist/chunk-N3WBC2VS.js.map +1 -0
- package/dist/chunk-V6WO67RO.js +311 -0
- package/dist/chunk-V6WO67RO.js.map +1 -0
- package/dist/client/index.cjs +1013 -220
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +526 -9
- package/dist/client/index.d.ts +526 -9
- package/dist/client/index.js +1464 -94
- package/dist/client/index.js.map +1 -1
- package/dist/{participation-DMMEDxON.d.cts → requirement-BEO42QOr.d.cts} +204 -2
- package/dist/{participation-E-bT-GXJ.d.ts → requirement-BEO42QOr.d.ts} +204 -2
- package/dist/server/index.cjs +9 -91
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +4 -21
- package/dist/server/index.d.ts +4 -21
- package/dist/server/index.js +14 -78
- package/dist/server/index.js.map +1 -1
- package/dist/shared/index.cjs +375 -0
- package/dist/shared/index.cjs.map +1 -0
- package/dist/shared/index.d.cts +35 -0
- package/dist/shared/index.d.ts +35 -0
- package/dist/{client/core → shared}/index.js +35 -16
- package/dist/shared/index.js.map +1 -0
- package/package.json +7 -22
- package/dist/RequirementItem-B-MvcxSr.d.cts +0 -37
- package/dist/RequirementItem-DcYot2uC.d.ts +0 -37
- package/dist/chunk-EHZ6PIGN.js +0 -414
- package/dist/chunk-EHZ6PIGN.js.map +0 -1
- package/dist/chunk-NC45IO63.js.map +0 -1
- package/dist/chunk-RIFATQB5.js +0 -257
- package/dist/chunk-RIFATQB5.js.map +0 -1
- package/dist/chunk-UGJUTRXC.js +0 -304
- package/dist/chunk-UGJUTRXC.js.map +0 -1
- package/dist/chunk-YJQMJFA7.js +0 -16
- package/dist/chunk-YJQMJFA7.js.map +0 -1
- package/dist/client/components/index.cjs +0 -1108
- package/dist/client/components/index.cjs.map +0 -1
- package/dist/client/components/index.d.cts +0 -139
- package/dist/client/components/index.d.ts +0 -139
- package/dist/client/components/index.js +0 -558
- package/dist/client/components/index.js.map +0 -1
- package/dist/client/core/index.cjs +0 -1047
- package/dist/client/core/index.cjs.map +0 -1
- package/dist/client/core/index.d.cts +0 -23
- package/dist/client/core/index.d.ts +0 -23
- package/dist/client/core/index.js.map +0 -1
- package/dist/client/hooks/index.cjs +0 -307
- package/dist/client/hooks/index.cjs.map +0 -1
- package/dist/client/hooks/index.d.cts +0 -126
- package/dist/client/hooks/index.d.ts +0 -126
- package/dist/client/hooks/index.js +0 -19
- package/dist/client/hooks/index.js.map +0 -1
- package/dist/coinlist-client-BSxpqylo.d.ts +0 -158
- package/dist/coinlist-client-Cah5c_aF.d.cts +0 -158
- package/dist/requirement-XWT0T_zO.d.cts +0 -205
- package/dist/requirement-XWT0T_zO.d.ts +0 -205
- package/dist/useCoinListRequirements-B5-ZPOMz.d.ts +0 -80
- package/dist/useCoinListRequirements-Cuc32Tqw.d.cts +0 -80
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
declare const __brand: unique symbol;
|
|
2
|
-
type Newtype<Base, Branding> = Base & {
|
|
3
|
-
readonly [__brand]: Branding;
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
type OfferDto = {
|
|
7
|
-
id: string;
|
|
8
|
-
slug: string;
|
|
9
|
-
tagline: string | null | undefined;
|
|
10
|
-
banner_url: string | null | undefined;
|
|
11
|
-
logo_url: string | null | undefined;
|
|
12
|
-
starts_at: string;
|
|
13
|
-
ends_at: string;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
type OfferId = Newtype<string, 'OfferId'>;
|
|
17
|
-
declare const OfferId: (value: string) => OfferId;
|
|
18
|
-
type OfferSlug = Newtype<string, 'OfferSlug'>;
|
|
19
|
-
declare const OfferSlug: (value: string) => OfferSlug;
|
|
20
|
-
type Offer = {
|
|
21
|
-
id: OfferId;
|
|
22
|
-
slug: OfferSlug;
|
|
23
|
-
tagline: string | null;
|
|
24
|
-
bannerUrl: string | null;
|
|
25
|
-
logoUrl: string | null;
|
|
26
|
-
startsAt: Date;
|
|
27
|
-
endsAt: Date;
|
|
28
|
-
};
|
|
29
|
-
declare const Offer: {
|
|
30
|
-
fromDto: (dto: OfferDto) => Offer;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
type AssetDto = {
|
|
34
|
-
code: string;
|
|
35
|
-
fractional_digits: number;
|
|
36
|
-
id: string;
|
|
37
|
-
name: string;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
type AssetId = Newtype<string, 'AssetId'>;
|
|
41
|
-
declare const AssetId: (value: string) => AssetId;
|
|
42
|
-
type AssetCode = Newtype<string, 'AssetCode'>;
|
|
43
|
-
declare const AssetCode: (value: string) => AssetCode;
|
|
44
|
-
type Asset = {
|
|
45
|
-
id: AssetId;
|
|
46
|
-
code: AssetCode;
|
|
47
|
-
name: string;
|
|
48
|
-
fractionalDigits: number;
|
|
49
|
-
};
|
|
50
|
-
declare const Asset: {
|
|
51
|
-
fromDto: (dto: AssetDto) => Asset;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
type OfferDetailDto = {
|
|
55
|
-
asset: AssetDto;
|
|
56
|
-
faqs: OfferDetailFaqDto[];
|
|
57
|
-
funding_assets: AssetDto[];
|
|
58
|
-
id: string;
|
|
59
|
-
links: OfferDetailLinkDto[];
|
|
60
|
-
milestones: OfferDetailMilestoneDto[];
|
|
61
|
-
name: string;
|
|
62
|
-
object: 'offer_details';
|
|
63
|
-
options: OfferDetailOptionDto[];
|
|
64
|
-
slug: string;
|
|
65
|
-
terms: OfferDetailTermDto[];
|
|
66
|
-
about: string | null | undefined;
|
|
67
|
-
banner_url: string | null | undefined;
|
|
68
|
-
category: string | null | undefined;
|
|
69
|
-
ends_at: string;
|
|
70
|
-
logo_url: string | null | undefined;
|
|
71
|
-
starts_at: string;
|
|
72
|
-
tagline: string | null | undefined;
|
|
73
|
-
};
|
|
74
|
-
type OfferDetailFaqDto = {
|
|
75
|
-
answer: string | null;
|
|
76
|
-
question: string | null;
|
|
77
|
-
};
|
|
78
|
-
type OfferDetailLinkDto = {
|
|
79
|
-
label: string | null;
|
|
80
|
-
url: string | null;
|
|
81
|
-
};
|
|
82
|
-
type OfferDetailMilestoneDto = {
|
|
83
|
-
name: string | null;
|
|
84
|
-
schedule: string | null;
|
|
85
|
-
status: 'completed' | 'active' | 'upcoming';
|
|
86
|
-
};
|
|
87
|
-
type OfferDetailOptionDto = {
|
|
88
|
-
bid_increment: number | null;
|
|
89
|
-
floor_price_usd: number | null;
|
|
90
|
-
id: string;
|
|
91
|
-
minimum_purchase_usd: number | null;
|
|
92
|
-
price_usd: string | null;
|
|
93
|
-
sale_agreement_url: string | null;
|
|
94
|
-
slug: string;
|
|
95
|
-
total_token_supply: number | null;
|
|
96
|
-
};
|
|
97
|
-
type OfferDetailTermDto = {
|
|
98
|
-
key: string | null;
|
|
99
|
-
value: string | null;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
type OfferOptionId = Newtype<string, 'OfferOptionId'>;
|
|
103
|
-
declare const OfferOptionId: (value: string) => OfferOptionId;
|
|
104
|
-
type OfferOptionSlug = Newtype<string, 'OfferOptionSlug'>;
|
|
105
|
-
declare const OfferOptionSlug: (value: string) => OfferOptionSlug;
|
|
106
|
-
type OfferDetail = {
|
|
107
|
-
id: OfferId;
|
|
108
|
-
slug: OfferSlug;
|
|
109
|
-
name: string;
|
|
110
|
-
asset: Asset;
|
|
111
|
-
fundingAssets: Asset[];
|
|
112
|
-
about: string | null;
|
|
113
|
-
tagline: string | null;
|
|
114
|
-
bannerUrl: string | null;
|
|
115
|
-
logoUrl: string | null;
|
|
116
|
-
category: string | null;
|
|
117
|
-
startsAt: Date;
|
|
118
|
-
endsAt: Date;
|
|
119
|
-
faqs: FaqItem[];
|
|
120
|
-
links: Link[];
|
|
121
|
-
milestones: Milestone[];
|
|
122
|
-
options: OfferOption[];
|
|
123
|
-
terms: TermItem[];
|
|
124
|
-
};
|
|
125
|
-
declare const OfferDetail: {
|
|
126
|
-
fromDto: (dto: OfferDetailDto) => OfferDetail;
|
|
127
|
-
};
|
|
128
|
-
type OfferOption = {
|
|
129
|
-
id: OfferOptionId;
|
|
130
|
-
slug: OfferOptionSlug;
|
|
131
|
-
bidIncrement: number | null;
|
|
132
|
-
floorPriceUsd: number | null;
|
|
133
|
-
minimumPurchaseUsd: number | null;
|
|
134
|
-
priceUsd: string | null;
|
|
135
|
-
saleAgreementUrl: string | null;
|
|
136
|
-
totalTokenSupply: number | null;
|
|
137
|
-
};
|
|
138
|
-
declare const OfferOption: {
|
|
139
|
-
fromDto: (dto: OfferDetailOptionDto) => OfferOption;
|
|
140
|
-
};
|
|
141
|
-
type FaqItem = {
|
|
142
|
-
question: string | null;
|
|
143
|
-
answer: string | null;
|
|
144
|
-
};
|
|
145
|
-
declare const FaqItem: {
|
|
146
|
-
fromDto: (dto: OfferDetailFaqDto) => FaqItem;
|
|
147
|
-
};
|
|
148
|
-
type Link = {
|
|
149
|
-
label: string | null;
|
|
150
|
-
url: string | null;
|
|
151
|
-
};
|
|
152
|
-
declare const Link: {
|
|
153
|
-
fromDto: (dto: OfferDetailLinkDto) => Link;
|
|
154
|
-
};
|
|
155
|
-
type TermItem = {
|
|
156
|
-
key: string | null;
|
|
157
|
-
value: string | null;
|
|
158
|
-
};
|
|
159
|
-
declare const TermItem: {
|
|
160
|
-
fromDto: (dto: OfferDetailTermDto) => TermItem;
|
|
161
|
-
};
|
|
162
|
-
type Milestone = {
|
|
163
|
-
name: string | null;
|
|
164
|
-
schedule: string | null;
|
|
165
|
-
status: 'completed' | 'active' | 'upcoming';
|
|
166
|
-
};
|
|
167
|
-
declare const Milestone: {
|
|
168
|
-
fromDto: (dto: OfferDetailMilestoneDto) => Milestone;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
type RequirementTypeDto = 'kyc_approved' | 'identity_verified' | 'proof_of_address' | 'source_of_funds' | 'external_wallet' | 'whitelisted_wallet' | 'jurisdiction' | 'accreditation';
|
|
172
|
-
type RequirementDto = {
|
|
173
|
-
object: 'requirement';
|
|
174
|
-
id: string;
|
|
175
|
-
type: RequirementTypeDto;
|
|
176
|
-
details: Record<string, unknown> | null;
|
|
177
|
-
};
|
|
178
|
-
type RequirementStatusValueDto = 'not_started' | 'in_progress' | 'action_needed' | 'completed' | 'rejected';
|
|
179
|
-
type RequirementStatusesDto = {
|
|
180
|
-
object: 'requirement_statuses';
|
|
181
|
-
offer_id: string;
|
|
182
|
-
statuses: Record<string, RequirementStatusValueDto>;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
type RequirementId = Newtype<string, 'RequirementId'>;
|
|
186
|
-
declare const RequirementId: (value: string) => RequirementId;
|
|
187
|
-
type RequirementType = RequirementTypeDto;
|
|
188
|
-
type RequirementStatusValue = RequirementStatusValueDto;
|
|
189
|
-
type Requirement = {
|
|
190
|
-
id: RequirementId;
|
|
191
|
-
type: RequirementType;
|
|
192
|
-
details: Record<string, unknown> | null;
|
|
193
|
-
};
|
|
194
|
-
declare const Requirement: {
|
|
195
|
-
fromDto: (dto: RequirementDto) => Requirement;
|
|
196
|
-
};
|
|
197
|
-
type RequirementStatusInfo = {
|
|
198
|
-
id: RequirementId;
|
|
199
|
-
status: RequirementStatusValue;
|
|
200
|
-
};
|
|
201
|
-
declare const RequirementStatusInfo: {
|
|
202
|
-
fromStatusesDto: (dto: RequirementStatusesDto) => RequirementStatusInfo[];
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
export { type AssetDto as A, FaqItem as F, Link as L, Milestone as M, type Newtype as N, Offer as O, Requirement as R, TermItem as T, OfferDetail as a, OfferId as b, OfferOption as c, OfferOptionId as d, OfferOptionSlug as e, OfferSlug as f, RequirementId as g, RequirementStatusInfo as h, type RequirementStatusValue as i, type RequirementType as j, Asset as k, AssetId as l };
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
declare const __brand: unique symbol;
|
|
2
|
-
type Newtype<Base, Branding> = Base & {
|
|
3
|
-
readonly [__brand]: Branding;
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
type OfferDto = {
|
|
7
|
-
id: string;
|
|
8
|
-
slug: string;
|
|
9
|
-
tagline: string | null | undefined;
|
|
10
|
-
banner_url: string | null | undefined;
|
|
11
|
-
logo_url: string | null | undefined;
|
|
12
|
-
starts_at: string;
|
|
13
|
-
ends_at: string;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
type OfferId = Newtype<string, 'OfferId'>;
|
|
17
|
-
declare const OfferId: (value: string) => OfferId;
|
|
18
|
-
type OfferSlug = Newtype<string, 'OfferSlug'>;
|
|
19
|
-
declare const OfferSlug: (value: string) => OfferSlug;
|
|
20
|
-
type Offer = {
|
|
21
|
-
id: OfferId;
|
|
22
|
-
slug: OfferSlug;
|
|
23
|
-
tagline: string | null;
|
|
24
|
-
bannerUrl: string | null;
|
|
25
|
-
logoUrl: string | null;
|
|
26
|
-
startsAt: Date;
|
|
27
|
-
endsAt: Date;
|
|
28
|
-
};
|
|
29
|
-
declare const Offer: {
|
|
30
|
-
fromDto: (dto: OfferDto) => Offer;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
type AssetDto = {
|
|
34
|
-
code: string;
|
|
35
|
-
fractional_digits: number;
|
|
36
|
-
id: string;
|
|
37
|
-
name: string;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
type AssetId = Newtype<string, 'AssetId'>;
|
|
41
|
-
declare const AssetId: (value: string) => AssetId;
|
|
42
|
-
type AssetCode = Newtype<string, 'AssetCode'>;
|
|
43
|
-
declare const AssetCode: (value: string) => AssetCode;
|
|
44
|
-
type Asset = {
|
|
45
|
-
id: AssetId;
|
|
46
|
-
code: AssetCode;
|
|
47
|
-
name: string;
|
|
48
|
-
fractionalDigits: number;
|
|
49
|
-
};
|
|
50
|
-
declare const Asset: {
|
|
51
|
-
fromDto: (dto: AssetDto) => Asset;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
type OfferDetailDto = {
|
|
55
|
-
asset: AssetDto;
|
|
56
|
-
faqs: OfferDetailFaqDto[];
|
|
57
|
-
funding_assets: AssetDto[];
|
|
58
|
-
id: string;
|
|
59
|
-
links: OfferDetailLinkDto[];
|
|
60
|
-
milestones: OfferDetailMilestoneDto[];
|
|
61
|
-
name: string;
|
|
62
|
-
object: 'offer_details';
|
|
63
|
-
options: OfferDetailOptionDto[];
|
|
64
|
-
slug: string;
|
|
65
|
-
terms: OfferDetailTermDto[];
|
|
66
|
-
about: string | null | undefined;
|
|
67
|
-
banner_url: string | null | undefined;
|
|
68
|
-
category: string | null | undefined;
|
|
69
|
-
ends_at: string;
|
|
70
|
-
logo_url: string | null | undefined;
|
|
71
|
-
starts_at: string;
|
|
72
|
-
tagline: string | null | undefined;
|
|
73
|
-
};
|
|
74
|
-
type OfferDetailFaqDto = {
|
|
75
|
-
answer: string | null;
|
|
76
|
-
question: string | null;
|
|
77
|
-
};
|
|
78
|
-
type OfferDetailLinkDto = {
|
|
79
|
-
label: string | null;
|
|
80
|
-
url: string | null;
|
|
81
|
-
};
|
|
82
|
-
type OfferDetailMilestoneDto = {
|
|
83
|
-
name: string | null;
|
|
84
|
-
schedule: string | null;
|
|
85
|
-
status: 'completed' | 'active' | 'upcoming';
|
|
86
|
-
};
|
|
87
|
-
type OfferDetailOptionDto = {
|
|
88
|
-
bid_increment: number | null;
|
|
89
|
-
floor_price_usd: number | null;
|
|
90
|
-
id: string;
|
|
91
|
-
minimum_purchase_usd: number | null;
|
|
92
|
-
price_usd: string | null;
|
|
93
|
-
sale_agreement_url: string | null;
|
|
94
|
-
slug: string;
|
|
95
|
-
total_token_supply: number | null;
|
|
96
|
-
};
|
|
97
|
-
type OfferDetailTermDto = {
|
|
98
|
-
key: string | null;
|
|
99
|
-
value: string | null;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
type OfferOptionId = Newtype<string, 'OfferOptionId'>;
|
|
103
|
-
declare const OfferOptionId: (value: string) => OfferOptionId;
|
|
104
|
-
type OfferOptionSlug = Newtype<string, 'OfferOptionSlug'>;
|
|
105
|
-
declare const OfferOptionSlug: (value: string) => OfferOptionSlug;
|
|
106
|
-
type OfferDetail = {
|
|
107
|
-
id: OfferId;
|
|
108
|
-
slug: OfferSlug;
|
|
109
|
-
name: string;
|
|
110
|
-
asset: Asset;
|
|
111
|
-
fundingAssets: Asset[];
|
|
112
|
-
about: string | null;
|
|
113
|
-
tagline: string | null;
|
|
114
|
-
bannerUrl: string | null;
|
|
115
|
-
logoUrl: string | null;
|
|
116
|
-
category: string | null;
|
|
117
|
-
startsAt: Date;
|
|
118
|
-
endsAt: Date;
|
|
119
|
-
faqs: FaqItem[];
|
|
120
|
-
links: Link[];
|
|
121
|
-
milestones: Milestone[];
|
|
122
|
-
options: OfferOption[];
|
|
123
|
-
terms: TermItem[];
|
|
124
|
-
};
|
|
125
|
-
declare const OfferDetail: {
|
|
126
|
-
fromDto: (dto: OfferDetailDto) => OfferDetail;
|
|
127
|
-
};
|
|
128
|
-
type OfferOption = {
|
|
129
|
-
id: OfferOptionId;
|
|
130
|
-
slug: OfferOptionSlug;
|
|
131
|
-
bidIncrement: number | null;
|
|
132
|
-
floorPriceUsd: number | null;
|
|
133
|
-
minimumPurchaseUsd: number | null;
|
|
134
|
-
priceUsd: string | null;
|
|
135
|
-
saleAgreementUrl: string | null;
|
|
136
|
-
totalTokenSupply: number | null;
|
|
137
|
-
};
|
|
138
|
-
declare const OfferOption: {
|
|
139
|
-
fromDto: (dto: OfferDetailOptionDto) => OfferOption;
|
|
140
|
-
};
|
|
141
|
-
type FaqItem = {
|
|
142
|
-
question: string | null;
|
|
143
|
-
answer: string | null;
|
|
144
|
-
};
|
|
145
|
-
declare const FaqItem: {
|
|
146
|
-
fromDto: (dto: OfferDetailFaqDto) => FaqItem;
|
|
147
|
-
};
|
|
148
|
-
type Link = {
|
|
149
|
-
label: string | null;
|
|
150
|
-
url: string | null;
|
|
151
|
-
};
|
|
152
|
-
declare const Link: {
|
|
153
|
-
fromDto: (dto: OfferDetailLinkDto) => Link;
|
|
154
|
-
};
|
|
155
|
-
type TermItem = {
|
|
156
|
-
key: string | null;
|
|
157
|
-
value: string | null;
|
|
158
|
-
};
|
|
159
|
-
declare const TermItem: {
|
|
160
|
-
fromDto: (dto: OfferDetailTermDto) => TermItem;
|
|
161
|
-
};
|
|
162
|
-
type Milestone = {
|
|
163
|
-
name: string | null;
|
|
164
|
-
schedule: string | null;
|
|
165
|
-
status: 'completed' | 'active' | 'upcoming';
|
|
166
|
-
};
|
|
167
|
-
declare const Milestone: {
|
|
168
|
-
fromDto: (dto: OfferDetailMilestoneDto) => Milestone;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
type RequirementTypeDto = 'kyc_approved' | 'identity_verified' | 'proof_of_address' | 'source_of_funds' | 'external_wallet' | 'whitelisted_wallet' | 'jurisdiction' | 'accreditation';
|
|
172
|
-
type RequirementDto = {
|
|
173
|
-
object: 'requirement';
|
|
174
|
-
id: string;
|
|
175
|
-
type: RequirementTypeDto;
|
|
176
|
-
details: Record<string, unknown> | null;
|
|
177
|
-
};
|
|
178
|
-
type RequirementStatusValueDto = 'not_started' | 'in_progress' | 'action_needed' | 'completed' | 'rejected';
|
|
179
|
-
type RequirementStatusesDto = {
|
|
180
|
-
object: 'requirement_statuses';
|
|
181
|
-
offer_id: string;
|
|
182
|
-
statuses: Record<string, RequirementStatusValueDto>;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
type RequirementId = Newtype<string, 'RequirementId'>;
|
|
186
|
-
declare const RequirementId: (value: string) => RequirementId;
|
|
187
|
-
type RequirementType = RequirementTypeDto;
|
|
188
|
-
type RequirementStatusValue = RequirementStatusValueDto;
|
|
189
|
-
type Requirement = {
|
|
190
|
-
id: RequirementId;
|
|
191
|
-
type: RequirementType;
|
|
192
|
-
details: Record<string, unknown> | null;
|
|
193
|
-
};
|
|
194
|
-
declare const Requirement: {
|
|
195
|
-
fromDto: (dto: RequirementDto) => Requirement;
|
|
196
|
-
};
|
|
197
|
-
type RequirementStatusInfo = {
|
|
198
|
-
id: RequirementId;
|
|
199
|
-
status: RequirementStatusValue;
|
|
200
|
-
};
|
|
201
|
-
declare const RequirementStatusInfo: {
|
|
202
|
-
fromStatusesDto: (dto: RequirementStatusesDto) => RequirementStatusInfo[];
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
export { type AssetDto as A, FaqItem as F, Link as L, Milestone as M, type Newtype as N, Offer as O, Requirement as R, TermItem as T, OfferDetail as a, OfferId as b, OfferOption as c, OfferOptionId as d, OfferOptionSlug as e, OfferSlug as f, RequirementId as g, RequirementStatusInfo as h, type RequirementStatusValue as i, type RequirementType as j, Asset as k, AssetId as l };
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { O as Offer, d as OfferOptionId, R as Requirement, h as RequirementStatusInfo, b as OfferId } from './requirement-XWT0T_zO.js';
|
|
2
|
-
|
|
3
|
-
type LoadOffersReason = 'not-authenticated' | 'generic-error';
|
|
4
|
-
type LoadOffersState = {
|
|
5
|
-
type: 'LOADING';
|
|
6
|
-
} | {
|
|
7
|
-
type: 'ERROR';
|
|
8
|
-
reason: LoadOffersReason;
|
|
9
|
-
} | {
|
|
10
|
-
type: 'CONTENT';
|
|
11
|
-
offers: Offer[];
|
|
12
|
-
};
|
|
13
|
-
interface UseCoinListOffersOptions {
|
|
14
|
-
/**
|
|
15
|
-
* Offers pre-fetched on the server (e.g. via `CoinListServer.fetchAllOffers()`).
|
|
16
|
-
* When provided, the hook uses this data as-is and skips the client-side fetch entirely.
|
|
17
|
-
*/
|
|
18
|
-
serverOffers?: Offer[];
|
|
19
|
-
}
|
|
20
|
-
interface UseCoinListOffersResult {
|
|
21
|
-
offersState: LoadOffersState;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Loads all CoinList offers for the current user and exposes a UI-friendly state.
|
|
25
|
-
*
|
|
26
|
-
* Pass `serverOffers` (pre-fetched server-side) to use that data as-is and skip
|
|
27
|
-
* the client-side fetch entirely.
|
|
28
|
-
*
|
|
29
|
-
* Returns `LOADING` while CoinList is initializing or while offers are being fetched.
|
|
30
|
-
* Returns `CONTENT` with all offers when `fetchAllOffers()` succeeds.
|
|
31
|
-
* Returns `ERROR` with:
|
|
32
|
-
* - `not-authenticated` when fetching fails with {@link NotAuthenticatedError}
|
|
33
|
-
* - `generic-error` for any other failure
|
|
34
|
-
*/
|
|
35
|
-
declare function useCoinListOffers(options?: UseCoinListOffersOptions): UseCoinListOffersResult;
|
|
36
|
-
|
|
37
|
-
type LoadRequirementsReason = 'not-authenticated' | 'generic-error';
|
|
38
|
-
type LoadRequirementsState = {
|
|
39
|
-
type: 'LOADING';
|
|
40
|
-
} | {
|
|
41
|
-
type: 'ERROR';
|
|
42
|
-
reason: LoadRequirementsReason;
|
|
43
|
-
} | {
|
|
44
|
-
type: 'CONTENT';
|
|
45
|
-
requirementsByOptionId: Record<OfferOptionId, Requirement[]>;
|
|
46
|
-
statuses: RequirementStatusInfo[];
|
|
47
|
-
};
|
|
48
|
-
interface UseCoinListRequirementsOptions {
|
|
49
|
-
/**
|
|
50
|
-
* Requirements data pre-fetched on the server (e.g. via
|
|
51
|
-
* `CoinListServer.fetchOfferRequirements()` + `fetchRequirementStatuses()`).
|
|
52
|
-
* When provided, the hook uses this data as-is and skips the initial client-side fetch.
|
|
53
|
-
* Calling `refetch()` will still trigger a fresh fetch.
|
|
54
|
-
*/
|
|
55
|
-
serverData?: {
|
|
56
|
-
requirementsByOptionId: Record<OfferOptionId, Requirement[]>;
|
|
57
|
-
statuses: RequirementStatusInfo[];
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
interface UseCoinListRequirementsResult {
|
|
61
|
-
requirementsState: LoadRequirementsState;
|
|
62
|
-
/** Triggers a re-fetch of requirements and statuses. */
|
|
63
|
-
refetch: () => void;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Loads requirements (grouped by option ID) and requirement statuses for a
|
|
67
|
-
* given offer, then exposes them via a state machine.
|
|
68
|
-
*
|
|
69
|
-
* Pass `serverData` (pre-fetched server-side) to use that data as-is and skip
|
|
70
|
-
* the initial client-side fetch. Calling `refetch()` will still trigger a fresh fetch.
|
|
71
|
-
*
|
|
72
|
-
* Returns `LOADING` while CoinList is initializing or while data is being fetched.
|
|
73
|
-
* Returns `CONTENT` with requirementsByOptionId and statuses on success.
|
|
74
|
-
* Returns `ERROR` with:
|
|
75
|
-
* - `not-authenticated` when fetching fails with {@link NotAuthenticatedError}
|
|
76
|
-
* - `generic-error` for any other failure
|
|
77
|
-
*/
|
|
78
|
-
declare function useCoinListRequirements(offerId: OfferId, options?: UseCoinListRequirementsOptions): UseCoinListRequirementsResult;
|
|
79
|
-
|
|
80
|
-
export { type LoadOffersReason as L, type UseCoinListOffersOptions as U, type LoadOffersState as a, type LoadRequirementsReason as b, type LoadRequirementsState as c, type UseCoinListOffersResult as d, type UseCoinListRequirementsOptions as e, type UseCoinListRequirementsResult as f, useCoinListRequirements as g, useCoinListOffers as u };
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { O as Offer, d as OfferOptionId, R as Requirement, h as RequirementStatusInfo, b as OfferId } from './requirement-XWT0T_zO.cjs';
|
|
2
|
-
|
|
3
|
-
type LoadOffersReason = 'not-authenticated' | 'generic-error';
|
|
4
|
-
type LoadOffersState = {
|
|
5
|
-
type: 'LOADING';
|
|
6
|
-
} | {
|
|
7
|
-
type: 'ERROR';
|
|
8
|
-
reason: LoadOffersReason;
|
|
9
|
-
} | {
|
|
10
|
-
type: 'CONTENT';
|
|
11
|
-
offers: Offer[];
|
|
12
|
-
};
|
|
13
|
-
interface UseCoinListOffersOptions {
|
|
14
|
-
/**
|
|
15
|
-
* Offers pre-fetched on the server (e.g. via `CoinListServer.fetchAllOffers()`).
|
|
16
|
-
* When provided, the hook uses this data as-is and skips the client-side fetch entirely.
|
|
17
|
-
*/
|
|
18
|
-
serverOffers?: Offer[];
|
|
19
|
-
}
|
|
20
|
-
interface UseCoinListOffersResult {
|
|
21
|
-
offersState: LoadOffersState;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Loads all CoinList offers for the current user and exposes a UI-friendly state.
|
|
25
|
-
*
|
|
26
|
-
* Pass `serverOffers` (pre-fetched server-side) to use that data as-is and skip
|
|
27
|
-
* the client-side fetch entirely.
|
|
28
|
-
*
|
|
29
|
-
* Returns `LOADING` while CoinList is initializing or while offers are being fetched.
|
|
30
|
-
* Returns `CONTENT` with all offers when `fetchAllOffers()` succeeds.
|
|
31
|
-
* Returns `ERROR` with:
|
|
32
|
-
* - `not-authenticated` when fetching fails with {@link NotAuthenticatedError}
|
|
33
|
-
* - `generic-error` for any other failure
|
|
34
|
-
*/
|
|
35
|
-
declare function useCoinListOffers(options?: UseCoinListOffersOptions): UseCoinListOffersResult;
|
|
36
|
-
|
|
37
|
-
type LoadRequirementsReason = 'not-authenticated' | 'generic-error';
|
|
38
|
-
type LoadRequirementsState = {
|
|
39
|
-
type: 'LOADING';
|
|
40
|
-
} | {
|
|
41
|
-
type: 'ERROR';
|
|
42
|
-
reason: LoadRequirementsReason;
|
|
43
|
-
} | {
|
|
44
|
-
type: 'CONTENT';
|
|
45
|
-
requirementsByOptionId: Record<OfferOptionId, Requirement[]>;
|
|
46
|
-
statuses: RequirementStatusInfo[];
|
|
47
|
-
};
|
|
48
|
-
interface UseCoinListRequirementsOptions {
|
|
49
|
-
/**
|
|
50
|
-
* Requirements data pre-fetched on the server (e.g. via
|
|
51
|
-
* `CoinListServer.fetchOfferRequirements()` + `fetchRequirementStatuses()`).
|
|
52
|
-
* When provided, the hook uses this data as-is and skips the initial client-side fetch.
|
|
53
|
-
* Calling `refetch()` will still trigger a fresh fetch.
|
|
54
|
-
*/
|
|
55
|
-
serverData?: {
|
|
56
|
-
requirementsByOptionId: Record<OfferOptionId, Requirement[]>;
|
|
57
|
-
statuses: RequirementStatusInfo[];
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
interface UseCoinListRequirementsResult {
|
|
61
|
-
requirementsState: LoadRequirementsState;
|
|
62
|
-
/** Triggers a re-fetch of requirements and statuses. */
|
|
63
|
-
refetch: () => void;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Loads requirements (grouped by option ID) and requirement statuses for a
|
|
67
|
-
* given offer, then exposes them via a state machine.
|
|
68
|
-
*
|
|
69
|
-
* Pass `serverData` (pre-fetched server-side) to use that data as-is and skip
|
|
70
|
-
* the initial client-side fetch. Calling `refetch()` will still trigger a fresh fetch.
|
|
71
|
-
*
|
|
72
|
-
* Returns `LOADING` while CoinList is initializing or while data is being fetched.
|
|
73
|
-
* Returns `CONTENT` with requirementsByOptionId and statuses on success.
|
|
74
|
-
* Returns `ERROR` with:
|
|
75
|
-
* - `not-authenticated` when fetching fails with {@link NotAuthenticatedError}
|
|
76
|
-
* - `generic-error` for any other failure
|
|
77
|
-
*/
|
|
78
|
-
declare function useCoinListRequirements(offerId: OfferId, options?: UseCoinListRequirementsOptions): UseCoinListRequirementsResult;
|
|
79
|
-
|
|
80
|
-
export { type LoadOffersReason as L, type UseCoinListOffersOptions as U, type LoadOffersState as a, type LoadRequirementsReason as b, type LoadRequirementsState as c, type UseCoinListOffersResult as d, type UseCoinListRequirementsOptions as e, type UseCoinListRequirementsResult as f, useCoinListRequirements as g, useCoinListOffers as u };
|