@sudobility/types 1.9.52 → 1.9.54
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/index.cjs +10 -4
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/types/blockchain/index.cjs +30 -0
- package/dist/types/blockchain/index.d.ts +14 -0
- package/dist/types/blockchain/index.d.ts.map +1 -0
- package/dist/types/blockchain/index.js +30 -0
- package/dist/types/blockchain/index.js.map +1 -0
- package/dist/types/blockchain/validation.cjs +57 -1
- package/dist/types/blockchain/validation.d.ts +57 -1
- package/dist/types/blockchain/validation.d.ts.map +1 -1
- package/dist/types/blockchain/validation.js +57 -1
- package/dist/types/blockchain/validation.js.map +1 -1
- package/dist/types/business/enums.cjs +110 -25
- package/dist/types/business/enums.d.ts +110 -2
- package/dist/types/business/enums.d.ts.map +1 -1
- package/dist/types/business/enums.js +110 -25
- package/dist/types/business/enums.js.map +1 -1
- package/dist/types/common.cjs +7 -1
- package/dist/types/common.d.ts +134 -20
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +7 -1
- package/dist/types/common.js.map +1 -1
- package/dist/types/subscription/entitlements.cjs +14 -0
- package/dist/types/subscription/entitlements.d.ts +11 -0
- package/dist/types/subscription/entitlements.d.ts.map +1 -0
- package/dist/types/subscription/entitlements.js +14 -0
- package/dist/types/subscription/entitlements.js.map +1 -0
- package/dist/types/subscription/period.cjs +29 -0
- package/dist/types/subscription/period.d.ts +18 -0
- package/dist/types/subscription/period.d.ts.map +1 -0
- package/dist/types/subscription/period.js +29 -0
- package/dist/types/subscription/period.js.map +1 -0
- package/dist/utils/async-helpers.cjs +124 -10
- package/dist/utils/async-helpers.d.ts +129 -8
- package/dist/utils/async-helpers.d.ts.map +1 -1
- package/dist/utils/async-helpers.js +124 -10
- package/dist/utils/async-helpers.js.map +1 -1
- package/dist/utils/formatting/currency.cjs +5 -2
- package/dist/utils/formatting/currency.d.ts +5 -1
- package/dist/utils/formatting/currency.d.ts.map +1 -1
- package/dist/utils/formatting/currency.js +5 -2
- package/dist/utils/formatting/currency.js.map +1 -1
- package/dist/utils/formatting/date.cjs +67 -8
- package/dist/utils/formatting/date.d.ts +67 -8
- package/dist/utils/formatting/date.d.ts.map +1 -1
- package/dist/utils/formatting/date.js +67 -8
- package/dist/utils/formatting/date.js.map +1 -1
- package/dist/utils/formatting/string.cjs +150 -17
- package/dist/utils/formatting/string.d.ts +150 -17
- package/dist/utils/formatting/string.d.ts.map +1 -1
- package/dist/utils/formatting/string.js +150 -17
- package/dist/utils/formatting/string.js.map +1 -1
- package/dist/utils/validation/type-validation.cjs +94 -11
- package/dist/utils/validation/type-validation.d.ts +94 -11
- package/dist/utils/validation/type-validation.d.ts.map +1 -1
- package/dist/utils/validation/type-validation.js +94 -11
- package/dist/utils/validation/type-validation.js.map +1 -1
- package/package.json +6 -1
|
@@ -1,24 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Platform-agnostic enums for discrete states
|
|
4
|
-
* These replace string literals throughout the application
|
|
3
|
+
* Platform-agnostic enums for discrete states.
|
|
4
|
+
* These replace string literals throughout the application.
|
|
5
|
+
*
|
|
6
|
+
* @since 1.0.0
|
|
5
7
|
*/
|
|
6
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
9
|
exports.Currency = exports.ErrorType = exports.FeatureFlag = exports.EmailValidationState = exports.PlatformType = exports.ConnectionState = exports.ConnectionType = exports.EmailSortCriteria = exports.SortOrder = exports.EmailAddressType = exports.InfoType = exports.NotificationType = exports.RequestStatus = exports.SubscriptionAction = exports.EmailAction = exports.MediumView = exports.MobileView = exports.EmailComposeType = exports.FontSize = exports.Theme = exports.Chain = exports.ChainType = exports.AuthStatus = void 0;
|
|
8
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Authentication status of a wallet connection.
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
*/
|
|
9
14
|
var AuthStatus;
|
|
10
15
|
(function (AuthStatus) {
|
|
16
|
+
/** Wallet is connected but not yet verified via signature */
|
|
11
17
|
AuthStatus["CONNECTED"] = "connected";
|
|
18
|
+
/** Wallet is not connected */
|
|
12
19
|
AuthStatus["DISCONNECTED"] = "disconnected";
|
|
20
|
+
/** Wallet is connected and ownership is verified via signature */
|
|
13
21
|
AuthStatus["VERIFIED"] = "verified";
|
|
14
22
|
})(AuthStatus || (exports.AuthStatus = AuthStatus = {}));
|
|
15
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Blockchain family classification.
|
|
25
|
+
* @since 1.0.0
|
|
26
|
+
*/
|
|
16
27
|
var ChainType;
|
|
17
28
|
(function (ChainType) {
|
|
29
|
+
/** Ethereum Virtual Machine compatible chains */
|
|
18
30
|
ChainType["EVM"] = "evm";
|
|
31
|
+
/** Solana blockchain */
|
|
19
32
|
ChainType["SOLANA"] = "solana";
|
|
20
33
|
})(ChainType || (exports.ChainType = ChainType = {}));
|
|
21
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Supported blockchain networks across EVM and Solana ecosystems.
|
|
36
|
+
* Includes mainnets, testnets, and local development chains.
|
|
37
|
+
* @since 1.0.0
|
|
38
|
+
*/
|
|
22
39
|
var Chain;
|
|
23
40
|
(function (Chain) {
|
|
24
41
|
// Ethereum
|
|
@@ -110,21 +127,33 @@ var Chain;
|
|
|
110
127
|
Chain["EVM_LOCAL"] = "evm-local";
|
|
111
128
|
Chain["SOLANA_LOCAL"] = "solana-local";
|
|
112
129
|
})(Chain || (exports.Chain = Chain = {}));
|
|
113
|
-
|
|
130
|
+
/**
|
|
131
|
+
* UI theme preference.
|
|
132
|
+
* @since 1.0.0
|
|
133
|
+
*/
|
|
114
134
|
var Theme;
|
|
115
135
|
(function (Theme) {
|
|
136
|
+
/** Light color scheme */
|
|
116
137
|
Theme["LIGHT"] = "light";
|
|
138
|
+
/** Dark color scheme */
|
|
117
139
|
Theme["DARK"] = "dark";
|
|
140
|
+
/** Follow OS/system preference */
|
|
118
141
|
Theme["SYSTEM"] = "system";
|
|
119
142
|
})(Theme || (exports.Theme = Theme = {}));
|
|
120
|
-
|
|
143
|
+
/**
|
|
144
|
+
* UI font size preference.
|
|
145
|
+
* @since 1.2.0
|
|
146
|
+
*/
|
|
121
147
|
var FontSize;
|
|
122
148
|
(function (FontSize) {
|
|
123
149
|
FontSize["SMALL"] = "small";
|
|
124
150
|
FontSize["MEDIUM"] = "medium";
|
|
125
151
|
FontSize["LARGE"] = "large";
|
|
126
152
|
})(FontSize || (exports.FontSize = FontSize = {}));
|
|
127
|
-
|
|
153
|
+
/**
|
|
154
|
+
* Email composition mode.
|
|
155
|
+
* @since 1.0.0
|
|
156
|
+
*/
|
|
128
157
|
var EmailComposeType;
|
|
129
158
|
(function (EmailComposeType) {
|
|
130
159
|
EmailComposeType["NEW"] = "new";
|
|
@@ -132,7 +161,10 @@ var EmailComposeType;
|
|
|
132
161
|
EmailComposeType["REPLY_ALL"] = "replyAll";
|
|
133
162
|
EmailComposeType["FORWARD"] = "forward";
|
|
134
163
|
})(EmailComposeType || (exports.EmailComposeType = EmailComposeType = {}));
|
|
135
|
-
|
|
164
|
+
/**
|
|
165
|
+
* Mobile navigation view states.
|
|
166
|
+
* @since 1.0.0
|
|
167
|
+
*/
|
|
136
168
|
var MobileView;
|
|
137
169
|
(function (MobileView) {
|
|
138
170
|
MobileView["EMAIL_ADDRESSES"] = "emailAddresses";
|
|
@@ -140,13 +172,19 @@ var MobileView;
|
|
|
140
172
|
MobileView["EMAILS"] = "emails";
|
|
141
173
|
MobileView["EMAIL_BODY"] = "emailBody";
|
|
142
174
|
})(MobileView || (exports.MobileView = MobileView = {}));
|
|
143
|
-
|
|
175
|
+
/**
|
|
176
|
+
* Medium-screen (tablet) navigation pane selection.
|
|
177
|
+
* @since 1.0.0
|
|
178
|
+
*/
|
|
144
179
|
var MediumView;
|
|
145
180
|
(function (MediumView) {
|
|
146
181
|
MediumView["LEFT"] = "left";
|
|
147
182
|
MediumView["RIGHT"] = "right";
|
|
148
183
|
})(MediumView || (exports.MediumView = MediumView = {}));
|
|
149
|
-
|
|
184
|
+
/**
|
|
185
|
+
* Actions that can be performed on an email message.
|
|
186
|
+
* @since 1.0.0
|
|
187
|
+
*/
|
|
150
188
|
var EmailAction;
|
|
151
189
|
(function (EmailAction) {
|
|
152
190
|
EmailAction["OPEN"] = "open";
|
|
@@ -158,7 +196,10 @@ var EmailAction;
|
|
|
158
196
|
EmailAction["MARK_READ"] = "mark_read";
|
|
159
197
|
EmailAction["MARK_UNREAD"] = "mark_unread";
|
|
160
198
|
})(EmailAction || (exports.EmailAction = EmailAction = {}));
|
|
161
|
-
|
|
199
|
+
/**
|
|
200
|
+
* Subscription lifecycle actions.
|
|
201
|
+
* @since 1.3.0
|
|
202
|
+
*/
|
|
162
203
|
var SubscriptionAction;
|
|
163
204
|
(function (SubscriptionAction) {
|
|
164
205
|
SubscriptionAction["VIEW"] = "view";
|
|
@@ -166,15 +207,25 @@ var SubscriptionAction;
|
|
|
166
207
|
SubscriptionAction["CANCEL"] = "cancel";
|
|
167
208
|
SubscriptionAction["RESTORE"] = "restore";
|
|
168
209
|
})(SubscriptionAction || (exports.SubscriptionAction = SubscriptionAction = {}));
|
|
169
|
-
|
|
210
|
+
/**
|
|
211
|
+
* Network request lifecycle states.
|
|
212
|
+
* @since 1.0.0
|
|
213
|
+
*/
|
|
170
214
|
var RequestStatus;
|
|
171
215
|
(function (RequestStatus) {
|
|
216
|
+
/** No request in progress */
|
|
172
217
|
RequestStatus["IDLE"] = "idle";
|
|
218
|
+
/** Request is in flight */
|
|
173
219
|
RequestStatus["LOADING"] = "loading";
|
|
220
|
+
/** Request completed successfully */
|
|
174
221
|
RequestStatus["SUCCESS"] = "success";
|
|
222
|
+
/** Request failed */
|
|
175
223
|
RequestStatus["ERROR"] = "error";
|
|
176
224
|
})(RequestStatus || (exports.RequestStatus = RequestStatus = {}));
|
|
177
|
-
|
|
225
|
+
/**
|
|
226
|
+
* UI notification severity levels.
|
|
227
|
+
* @since 1.0.0
|
|
228
|
+
*/
|
|
178
229
|
var NotificationType;
|
|
179
230
|
(function (NotificationType) {
|
|
180
231
|
NotificationType["INFO"] = "info";
|
|
@@ -182,7 +233,10 @@ var NotificationType;
|
|
|
182
233
|
NotificationType["WARNING"] = "warning";
|
|
183
234
|
NotificationType["ERROR"] = "error";
|
|
184
235
|
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
185
|
-
|
|
236
|
+
/**
|
|
237
|
+
* Info-level UI feedback types.
|
|
238
|
+
* @since 1.0.0
|
|
239
|
+
*/
|
|
186
240
|
var InfoType;
|
|
187
241
|
(function (InfoType) {
|
|
188
242
|
InfoType["INFO"] = "info";
|
|
@@ -190,7 +244,10 @@ var InfoType;
|
|
|
190
244
|
InfoType["WARNING"] = "warning";
|
|
191
245
|
InfoType["ERROR"] = "error";
|
|
192
246
|
})(InfoType || (exports.InfoType = InfoType = {}));
|
|
193
|
-
|
|
247
|
+
/**
|
|
248
|
+
* Email address resolution types.
|
|
249
|
+
* @since 1.0.0
|
|
250
|
+
*/
|
|
194
251
|
var EmailAddressType;
|
|
195
252
|
(function (EmailAddressType) {
|
|
196
253
|
EmailAddressType["DIRECT"] = "direct";
|
|
@@ -198,13 +255,19 @@ var EmailAddressType;
|
|
|
198
255
|
EmailAddressType["SNS"] = "sns";
|
|
199
256
|
EmailAddressType["CUSTOM"] = "custom";
|
|
200
257
|
})(EmailAddressType || (exports.EmailAddressType = EmailAddressType = {}));
|
|
201
|
-
|
|
258
|
+
/**
|
|
259
|
+
* Sort order direction.
|
|
260
|
+
* @since 1.0.0
|
|
261
|
+
*/
|
|
202
262
|
var SortOrder;
|
|
203
263
|
(function (SortOrder) {
|
|
204
264
|
SortOrder["ASC"] = "asc";
|
|
205
265
|
SortOrder["DESC"] = "desc";
|
|
206
266
|
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
207
|
-
|
|
267
|
+
/**
|
|
268
|
+
* Fields by which emails can be sorted.
|
|
269
|
+
* @since 1.0.0
|
|
270
|
+
*/
|
|
208
271
|
var EmailSortCriteria;
|
|
209
272
|
(function (EmailSortCriteria) {
|
|
210
273
|
EmailSortCriteria["DATE"] = "date";
|
|
@@ -212,7 +275,10 @@ var EmailSortCriteria;
|
|
|
212
275
|
EmailSortCriteria["FROM"] = "from";
|
|
213
276
|
EmailSortCriteria["SIZE"] = "size";
|
|
214
277
|
})(EmailSortCriteria || (exports.EmailSortCriteria = EmailSortCriteria = {}));
|
|
215
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Network connection type (WiFi, cellular, etc.).
|
|
280
|
+
* @since 1.1.0
|
|
281
|
+
*/
|
|
216
282
|
var ConnectionType;
|
|
217
283
|
(function (ConnectionType) {
|
|
218
284
|
ConnectionType["UNKNOWN"] = "unknown";
|
|
@@ -224,7 +290,11 @@ var ConnectionType;
|
|
|
224
290
|
ConnectionType["CELLULAR_5G"] = "5g";
|
|
225
291
|
ConnectionType["ETHERNET"] = "ethernet";
|
|
226
292
|
})(ConnectionType || (exports.ConnectionType = ConnectionType = {}));
|
|
227
|
-
|
|
293
|
+
/**
|
|
294
|
+
* Wallet/network connection lifecycle states.
|
|
295
|
+
* Consolidated from WalletConnectionState, NetworkStatus, and ConnectionState.
|
|
296
|
+
* @since 1.0.0
|
|
297
|
+
*/
|
|
228
298
|
var ConnectionState;
|
|
229
299
|
(function (ConnectionState) {
|
|
230
300
|
ConnectionState["UNKNOWN"] = "unknown";
|
|
@@ -236,14 +306,20 @@ var ConnectionState;
|
|
|
236
306
|
ConnectionState["LIMITED"] = "limited";
|
|
237
307
|
ConnectionState["ERROR"] = "error";
|
|
238
308
|
})(ConnectionState || (exports.ConnectionState = ConnectionState = {}));
|
|
239
|
-
|
|
309
|
+
/**
|
|
310
|
+
* Runtime platform identification.
|
|
311
|
+
* @since 1.0.0
|
|
312
|
+
*/
|
|
240
313
|
var PlatformType;
|
|
241
314
|
(function (PlatformType) {
|
|
242
315
|
PlatformType["WEB"] = "web";
|
|
243
316
|
PlatformType["REACT_NATIVE"] = "react_native";
|
|
244
317
|
PlatformType["DESKTOP"] = "desktop";
|
|
245
318
|
})(PlatformType || (exports.PlatformType = PlatformType = {}));
|
|
246
|
-
|
|
319
|
+
/**
|
|
320
|
+
* Email address validation status.
|
|
321
|
+
* @since 1.0.0
|
|
322
|
+
*/
|
|
247
323
|
var EmailValidationState;
|
|
248
324
|
(function (EmailValidationState) {
|
|
249
325
|
EmailValidationState["VALID"] = "valid";
|
|
@@ -251,7 +327,10 @@ var EmailValidationState;
|
|
|
251
327
|
EmailValidationState["PENDING"] = "pending";
|
|
252
328
|
EmailValidationState["UNKNOWN"] = "unknown";
|
|
253
329
|
})(EmailValidationState || (exports.EmailValidationState = EmailValidationState = {}));
|
|
254
|
-
|
|
330
|
+
/**
|
|
331
|
+
* Feature flags for gating experimental or premium features.
|
|
332
|
+
* @since 1.2.0
|
|
333
|
+
*/
|
|
255
334
|
var FeatureFlag;
|
|
256
335
|
(function (FeatureFlag) {
|
|
257
336
|
FeatureFlag["AI_SEARCH"] = "ai_search";
|
|
@@ -261,7 +340,10 @@ var FeatureFlag;
|
|
|
261
340
|
FeatureFlag["NOTIFICATIONS"] = "notifications";
|
|
262
341
|
FeatureFlag["ANALYTICS"] = "analytics";
|
|
263
342
|
})(FeatureFlag || (exports.FeatureFlag = FeatureFlag = {}));
|
|
264
|
-
|
|
343
|
+
/**
|
|
344
|
+
* High-level error category classification.
|
|
345
|
+
* @since 1.0.0
|
|
346
|
+
*/
|
|
265
347
|
var ErrorType;
|
|
266
348
|
(function (ErrorType) {
|
|
267
349
|
ErrorType["NETWORK"] = "network";
|
|
@@ -270,7 +352,10 @@ var ErrorType;
|
|
|
270
352
|
ErrorType["PERMISSION"] = "permission";
|
|
271
353
|
ErrorType["UNKNOWN"] = "unknown";
|
|
272
354
|
})(ErrorType || (exports.ErrorType = ErrorType = {}));
|
|
273
|
-
|
|
355
|
+
/**
|
|
356
|
+
* Fiat currency codes for subscription pricing.
|
|
357
|
+
* @since 1.3.0
|
|
358
|
+
*/
|
|
274
359
|
var Currency;
|
|
275
360
|
(function (Currency) {
|
|
276
361
|
Currency["USD"] = "USD";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/types/business/enums.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/types/business/enums.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;;GAGG;AACH,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,6DAA6D;IAC7D,qCAAuB,CAAA;IACvB,8BAA8B;IAC9B,2CAA6B,CAAA;IAC7B,kEAAkE;IAClE,mCAAqB,CAAA;AACvB,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AAED;;;GAGG;AACH,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,iDAAiD;IACjD,wBAAW,CAAA;IACX,wBAAwB;IACxB,8BAAiB,CAAA;AACnB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAED;;;;GAIG;AACH,IAAY,KAoHX;AApHD,WAAY,KAAK;IACf,WAAW;IACX,oCAA2B,CAAA;IAC3B,oCAA2B,CAAA;IAC3B,kCAAyB,CAAA;IAEzB,UAAU;IACV,4CAAmC,CAAA;IACnC,0CAAiC,CAAA;IACjC,sCAA6B,CAAA;IAE7B,WAAW;IACX,8CAAqC,CAAA;IACrC,8CAAqC,CAAA;IACrC,4CAAmC,CAAA;IAEnC,WAAW;IACX,8CAAqC,CAAA;IACrC,8CAAqC,CAAA;IACrC,4CAAmC,CAAA;IAEnC,OAAO;IACP,sCAA6B,CAAA;IAC7B,sCAA6B,CAAA;IAC7B,oCAA2B,CAAA;IAE3B,YAAY;IACZ,gDAAuC,CAAA;IACvC,0CAAiC,CAAA;IAEjC,2CAA2C;IAC3C,oCAA2B,CA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R,QAAQ,QAMnB"}
|
package/dist/types/common.cjs
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Common utility types used throughout the application
|
|
3
|
+
* Common utility types used throughout the application.
|
|
4
|
+
*
|
|
5
|
+
* Provides foundational types like {@link Optional}, {@link Result},
|
|
6
|
+
* {@link ValidationResult}, and API response structures used across
|
|
7
|
+
* every package in the ecosystem.
|
|
8
|
+
*
|
|
9
|
+
* @since 1.0.0
|
|
4
10
|
*/
|
|
5
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
12
|
//# sourceMappingURL=common.js.map
|
package/dist/types/common.d.ts
CHANGED
|
@@ -1,15 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Common utility types used throughout the application
|
|
2
|
+
* Common utility types used throughout the application.
|
|
3
|
+
*
|
|
4
|
+
* Provides foundational types like {@link Optional}, {@link Result},
|
|
5
|
+
* {@link ValidationResult}, and API response structures used across
|
|
6
|
+
* every package in the ecosystem.
|
|
7
|
+
*
|
|
8
|
+
* @since 1.0.0
|
|
3
9
|
*/
|
|
4
10
|
import { ChainType } from './business/enums';
|
|
5
11
|
/**
|
|
6
|
-
* Utility type for values that can be T, undefined, or null
|
|
7
|
-
*
|
|
12
|
+
* Utility type for values that can be T, undefined, or null.
|
|
13
|
+
* Use instead of manual `T | null | undefined` unions for consistency.
|
|
14
|
+
*
|
|
15
|
+
* @template T - The base type
|
|
16
|
+
* @since 1.0.0
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* interface User {
|
|
21
|
+
* name: string;
|
|
22
|
+
* bio?: Optional<string>;
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
8
25
|
*/
|
|
9
26
|
export type Optional<T> = T | undefined | null;
|
|
10
27
|
/**
|
|
11
|
-
* Base wallet data structure containing address and chain type
|
|
12
|
-
* Used across all wallet-related interfaces to ensure consistency
|
|
28
|
+
* Base wallet data structure containing address and chain type.
|
|
29
|
+
* Used across all wallet-related interfaces to ensure consistency.
|
|
30
|
+
*
|
|
31
|
+
* @since 1.0.0
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const wallet: WalletData = {
|
|
36
|
+
* walletAddress: '0x742d35Cc6634C0532925a3b8D2C36B7f1234567',
|
|
37
|
+
* chainType: ChainType.EVM,
|
|
38
|
+
* };
|
|
39
|
+
* ```
|
|
13
40
|
*/
|
|
14
41
|
export interface WalletData {
|
|
15
42
|
/** Wallet address (EVM 0x format or Solana Base58) */
|
|
@@ -18,8 +45,10 @@ export interface WalletData {
|
|
|
18
45
|
chainType: ChainType;
|
|
19
46
|
}
|
|
20
47
|
/**
|
|
21
|
-
* Base folder data structure containing common folder properties
|
|
22
|
-
* Used across all folder/mailbox-related interfaces to ensure consistency
|
|
48
|
+
* Base folder data structure containing common folder properties.
|
|
49
|
+
* Used across all folder/mailbox-related interfaces to ensure consistency.
|
|
50
|
+
*
|
|
51
|
+
* @since 1.0.0
|
|
23
52
|
*/
|
|
24
53
|
export interface FolderBase {
|
|
25
54
|
/** Folder name */
|
|
@@ -30,8 +59,10 @@ export interface FolderBase {
|
|
|
30
59
|
unreadCount: number;
|
|
31
60
|
}
|
|
32
61
|
/**
|
|
33
|
-
* Base message structure containing core message fields
|
|
34
|
-
* Used across all message/email-related interfaces to ensure consistency
|
|
62
|
+
* Base message structure containing core message fields.
|
|
63
|
+
* Used across all message/email-related interfaces to ensure consistency.
|
|
64
|
+
*
|
|
65
|
+
* @since 1.0.0
|
|
35
66
|
*/
|
|
36
67
|
export interface MessageBase {
|
|
37
68
|
/** Message sender */
|
|
@@ -44,8 +75,20 @@ export interface MessageBase {
|
|
|
44
75
|
body: string;
|
|
45
76
|
}
|
|
46
77
|
/**
|
|
47
|
-
* Base response structure for all API operations
|
|
48
|
-
* Unified response interface for consistency across the entire application
|
|
78
|
+
* Base response structure for all API operations.
|
|
79
|
+
* Unified response interface for consistency across the entire application.
|
|
80
|
+
*
|
|
81
|
+
* @template T - The response data type (defaults to `unknown`)
|
|
82
|
+
* @since 1.0.0
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const response: BaseResponse<User> = {
|
|
87
|
+
* success: true,
|
|
88
|
+
* data: { name: 'Alice' },
|
|
89
|
+
* timestamp: new Date().toISOString(),
|
|
90
|
+
* };
|
|
91
|
+
* ```
|
|
49
92
|
*/
|
|
50
93
|
export interface BaseResponse<T = unknown> {
|
|
51
94
|
/** Operation success status */
|
|
@@ -58,7 +101,19 @@ export interface BaseResponse<T = unknown> {
|
|
|
58
101
|
timestamp: string;
|
|
59
102
|
}
|
|
60
103
|
/**
|
|
61
|
-
* Unified pagination options for querying
|
|
104
|
+
* Unified pagination options for querying.
|
|
105
|
+
* Supports both offset-based and cursor-based pagination.
|
|
106
|
+
*
|
|
107
|
+
* @since 1.0.0
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```typescript
|
|
111
|
+
* const opts: PaginationOptions = {
|
|
112
|
+
* limit: 20,
|
|
113
|
+
* cursor: 'abc123',
|
|
114
|
+
* sortOrder: 'desc',
|
|
115
|
+
* };
|
|
116
|
+
* ```
|
|
62
117
|
*/
|
|
63
118
|
export interface PaginationOptions {
|
|
64
119
|
/** Number of items per page */
|
|
@@ -71,7 +126,9 @@ export interface PaginationOptions {
|
|
|
71
126
|
sortOrder?: Optional<'asc' | 'desc'>;
|
|
72
127
|
}
|
|
73
128
|
/**
|
|
74
|
-
* Unified pagination metadata for responses
|
|
129
|
+
* Unified pagination metadata for responses.
|
|
130
|
+
*
|
|
131
|
+
* @since 1.0.0
|
|
75
132
|
*/
|
|
76
133
|
export interface PaginationInfo {
|
|
77
134
|
/** Whether there are more items after current page */
|
|
@@ -88,14 +145,42 @@ export interface PaginationInfo {
|
|
|
88
145
|
pageSize: number;
|
|
89
146
|
}
|
|
90
147
|
/**
|
|
91
|
-
* Paginated response structure
|
|
148
|
+
* Paginated response structure extending {@link BaseResponse} with
|
|
149
|
+
* pagination metadata.
|
|
150
|
+
*
|
|
151
|
+
* @template T - The item type in the paginated list
|
|
152
|
+
* @since 1.0.0
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```typescript
|
|
156
|
+
* const page: PaginatedResponse<User> = {
|
|
157
|
+
* success: true,
|
|
158
|
+
* data: [{ name: 'Alice' }],
|
|
159
|
+
* timestamp: new Date().toISOString(),
|
|
160
|
+
* pagination: { hasNextPage: true, pageSize: 20 },
|
|
161
|
+
* };
|
|
162
|
+
* ```
|
|
92
163
|
*/
|
|
93
164
|
export interface PaginatedResponse<T> extends BaseResponse<T[]> {
|
|
94
165
|
/** Pagination metadata */
|
|
95
166
|
pagination: PaginationInfo;
|
|
96
167
|
}
|
|
97
168
|
/**
|
|
98
|
-
* Unified error structure for all operations
|
|
169
|
+
* Unified error structure for all operations.
|
|
170
|
+
* Provides typed error categories, human-readable messages,
|
|
171
|
+
* and optional suggested actions for the user.
|
|
172
|
+
*
|
|
173
|
+
* @since 1.0.0
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```typescript
|
|
177
|
+
* const error: UnifiedError = {
|
|
178
|
+
* type: 'ValidationError',
|
|
179
|
+
* message: 'Invalid email address',
|
|
180
|
+
* details: { field: 'email' },
|
|
181
|
+
* suggestedAction: 'Please enter a valid email.',
|
|
182
|
+
* };
|
|
183
|
+
* ```
|
|
99
184
|
*/
|
|
100
185
|
export interface UnifiedError {
|
|
101
186
|
/** Error type/code */
|
|
@@ -116,9 +201,25 @@ export interface UnifiedError {
|
|
|
116
201
|
suggestedAction?: Optional<string>;
|
|
117
202
|
}
|
|
118
203
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
204
|
+
* Discriminated union for operations that can succeed or fail.
|
|
205
|
+
* Prefer this over throwing exceptions for recoverable errors.
|
|
206
|
+
*
|
|
207
|
+
* @template T - Success result type
|
|
208
|
+
* @template E - Error type (defaults to {@link UnifiedError})
|
|
209
|
+
* @since 1.0.0
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* ```typescript
|
|
213
|
+
* function divide(a: number, b: number): Result<number> {
|
|
214
|
+
* if (b === 0) {
|
|
215
|
+
* return {
|
|
216
|
+
* success: false,
|
|
217
|
+
* error: { type: 'ValidationError', message: 'Division by zero' },
|
|
218
|
+
* };
|
|
219
|
+
* }
|
|
220
|
+
* return { success: true, data: a / b };
|
|
221
|
+
* }
|
|
222
|
+
* ```
|
|
122
223
|
*/
|
|
123
224
|
export type Result<T, E = UnifiedError> = {
|
|
124
225
|
success: true;
|
|
@@ -128,8 +229,21 @@ export type Result<T, E = UnifiedError> = {
|
|
|
128
229
|
error: E;
|
|
129
230
|
};
|
|
130
231
|
/**
|
|
131
|
-
* Unified validation result pattern
|
|
132
|
-
* @
|
|
232
|
+
* Unified validation result pattern.
|
|
233
|
+
* Used by validators and {@link createValidator} to return typed results.
|
|
234
|
+
*
|
|
235
|
+
* @template T - The validated data type
|
|
236
|
+
* @since 1.0.0
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* ```typescript
|
|
240
|
+
* function validateAge(value: unknown): ValidationResult<number> {
|
|
241
|
+
* if (typeof value === 'number' && value >= 0) {
|
|
242
|
+
* return { isValid: true, data: value };
|
|
243
|
+
* }
|
|
244
|
+
* return { isValid: false, error: 'Age must be a non-negative number' };
|
|
245
|
+
* }
|
|
246
|
+
* ```
|
|
133
247
|
*/
|
|
134
248
|
export type ValidationResult<T = unknown> = {
|
|
135
249
|
isValid: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EA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B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC,CAAC;IACH,4BAA4B;IAC5B,eAAe,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,YAAY,IAClC;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAC1B;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAEjC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,OAAO,IACpC;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAC1B;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAA;CAAE,CAAC"}
|
package/dist/types/common.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Common utility types used throughout the application
|
|
3
|
+
* Common utility types used throughout the application.
|
|
4
|
+
*
|
|
5
|
+
* Provides foundational types like {@link Optional}, {@link Result},
|
|
6
|
+
* {@link ValidationResult}, and API response structures used across
|
|
7
|
+
* every package in the ecosystem.
|
|
8
|
+
*
|
|
9
|
+
* @since 1.0.0
|
|
4
10
|
*/
|
|
5
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
12
|
//# sourceMappingURL=common.js.map
|
package/dist/types/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Subscription Entitlement Constants
|
|
4
|
+
*
|
|
5
|
+
* Shared constants for subscription entitlement management.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.NONE_ENTITLEMENT = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* The special entitlement name for users without any subscription.
|
|
11
|
+
* This is returned when a user has no active entitlements in RevenueCat.
|
|
12
|
+
*/
|
|
13
|
+
exports.NONE_ENTITLEMENT = "none";
|
|
14
|
+
//# sourceMappingURL=entitlements.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subscription Entitlement Constants
|
|
3
|
+
*
|
|
4
|
+
* Shared constants for subscription entitlement management.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The special entitlement name for users without any subscription.
|
|
8
|
+
* This is returned when a user has no active entitlements in RevenueCat.
|
|
9
|
+
*/
|
|
10
|
+
export declare const NONE_ENTITLEMENT: "none";
|
|
11
|
+
//# sourceMappingURL=entitlements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entitlements.d.ts","sourceRoot":"","sources":["../../../src/types/subscription/entitlements.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAG,MAAe,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Subscription Entitlement Constants
|
|
4
|
+
*
|
|
5
|
+
* Shared constants for subscription entitlement management.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.NONE_ENTITLEMENT = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* The special entitlement name for users without any subscription.
|
|
11
|
+
* This is returned when a user has no active entitlements in RevenueCat.
|
|
12
|
+
*/
|
|
13
|
+
exports.NONE_ENTITLEMENT = "none";
|
|
14
|
+
//# sourceMappingURL=entitlements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entitlements.js","sourceRoot":"","sources":["../../../src/types/subscription/entitlements.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;GAGG;AACU,QAAA,gBAAgB,GAAG,MAAe,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Subscription Period Types
|
|
4
|
+
*
|
|
5
|
+
* Standard subscription periods and utilities for period comparison.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ALL_PERIODS = exports.PERIOD_RANKS = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* Period ranking for comparison (higher = longer)
|
|
11
|
+
*/
|
|
12
|
+
exports.PERIOD_RANKS = {
|
|
13
|
+
weekly: 1,
|
|
14
|
+
monthly: 2,
|
|
15
|
+
quarterly: 3,
|
|
16
|
+
yearly: 4,
|
|
17
|
+
lifetime: 5,
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* All supported periods in order
|
|
21
|
+
*/
|
|
22
|
+
exports.ALL_PERIODS = [
|
|
23
|
+
'weekly',
|
|
24
|
+
'monthly',
|
|
25
|
+
'quarterly',
|
|
26
|
+
'yearly',
|
|
27
|
+
'lifetime',
|
|
28
|
+
];
|
|
29
|
+
//# sourceMappingURL=period.js.map
|