@nadohq/mobile-client 0.27.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/README.md +73 -0
- package/dist/MobileClient-9JSAzblH.cjs +218 -0
- package/dist/MobileClient-9JSAzblH.cjs.map +1 -0
- package/dist/MobileClient.cjs +4 -0
- package/dist/MobileClient.d.cts +114 -0
- package/dist/MobileClient.d.cts.map +1 -0
- package/dist/MobileClient.d.ts +114 -0
- package/dist/MobileClient.d.ts.map +1 -0
- package/dist/MobileClient.js +185 -0
- package/dist/MobileClient.js.map +1 -0
- package/dist/MobileServerFailureError-Belp_yef.d.cts +25 -0
- package/dist/MobileServerFailureError-Belp_yef.d.cts.map +1 -0
- package/dist/MobileServerFailureError-DqM0T6CB.d.ts +25 -0
- package/dist/MobileServerFailureError-DqM0T6CB.d.ts.map +1 -0
- package/dist/buildSignedMobileRequest-BsbBkU0K.d.cts +14 -0
- package/dist/buildSignedMobileRequest-BsbBkU0K.d.cts.map +1 -0
- package/dist/buildSignedMobileRequest-CDRsRNHm.d.ts +14 -0
- package/dist/buildSignedMobileRequest-CDRsRNHm.d.ts.map +1 -0
- package/dist/canonicalize-Dm7sXwPg.d.cts +14 -0
- package/dist/canonicalize-Dm7sXwPg.d.cts.map +1 -0
- package/dist/canonicalize-PX6dTIdF.d.ts +14 -0
- package/dist/canonicalize-PX6dTIdF.d.ts.map +1 -0
- package/dist/clientTypes-DWW2N66c.d.ts +168 -0
- package/dist/clientTypes-DWW2N66c.d.ts.map +1 -0
- package/dist/clientTypes-Et0PUa2d.d.cts +168 -0
- package/dist/clientTypes-Et0PUa2d.d.cts.map +1 -0
- package/dist/dataMappers.cjs +89 -0
- package/dist/dataMappers.cjs.map +1 -0
- package/dist/dataMappers.d.cts +27 -0
- package/dist/dataMappers.d.cts.map +1 -0
- package/dist/dataMappers.d.ts +27 -0
- package/dist/dataMappers.d.ts.map +1 -0
- package/dist/dataMappers.js +84 -0
- package/dist/dataMappers.js.map +1 -0
- package/dist/eip712MethodByType-DJgXal9r.d.ts +10 -0
- package/dist/eip712MethodByType-DJgXal9r.d.ts.map +1 -0
- package/dist/eip712MethodByType-DLh9MRsD.d.cts +10 -0
- package/dist/eip712MethodByType-DLh9MRsD.d.cts.map +1 -0
- package/dist/endpoints.cjs +14 -0
- package/dist/endpoints.cjs.map +1 -0
- package/dist/endpoints.d.cts +10 -0
- package/dist/endpoints.d.cts.map +1 -0
- package/dist/endpoints.d.ts +10 -0
- package/dist/endpoints.d.ts.map +1 -0
- package/dist/endpoints.js +13 -0
- package/dist/endpoints.js.map +1 -0
- package/dist/index.cjs +27 -0
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +15 -0
- package/dist/mobileErrorCodes-D8KzJXbU.d.cts +29 -0
- package/dist/mobileErrorCodes-D8KzJXbU.d.cts.map +1 -0
- package/dist/mobileErrorCodes-DM09jnNe.d.ts +29 -0
- package/dist/mobileErrorCodes-DM09jnNe.d.ts.map +1 -0
- package/dist/nonce-DCOrXXkQ.d.ts +15 -0
- package/dist/nonce-DCOrXXkQ.d.ts.map +1 -0
- package/dist/nonce-zGyisRlj.d.cts +15 -0
- package/dist/nonce-zGyisRlj.d.cts.map +1 -0
- package/dist/patterns-B9J2ldpx.d.cts +8 -0
- package/dist/patterns-B9J2ldpx.d.cts.map +1 -0
- package/dist/patterns-BbxH3_VA.d.ts +8 -0
- package/dist/patterns-BbxH3_VA.d.ts.map +1 -0
- package/dist/payloadHash-Bmhzs78N.d.ts +13 -0
- package/dist/payloadHash-Bmhzs78N.d.ts.map +1 -0
- package/dist/payloadHash-nj8WuLUP.d.cts +13 -0
- package/dist/payloadHash-nj8WuLUP.d.cts.map +1 -0
- package/dist/serverBaseTypes-BicXMrZV.d.cts +43 -0
- package/dist/serverBaseTypes-BicXMrZV.d.cts.map +1 -0
- package/dist/serverBaseTypes-ewbo8l4R.d.ts +43 -0
- package/dist/serverBaseTypes-ewbo8l4R.d.ts.map +1 -0
- package/dist/serverExecuteTypes-CXnMjKnt.d.ts +11 -0
- package/dist/serverExecuteTypes-CXnMjKnt.d.ts.map +1 -0
- package/dist/serverExecuteTypes-DKYK1V7C.d.cts +11 -0
- package/dist/serverExecuteTypes-DKYK1V7C.d.cts.map +1 -0
- package/dist/serverModelTypes-CQgfqgW3.d.cts +69 -0
- package/dist/serverModelTypes-CQgfqgW3.d.cts.map +1 -0
- package/dist/serverModelTypes-vEPhHIit.d.ts +69 -0
- package/dist/serverModelTypes-vEPhHIit.d.ts.map +1 -0
- package/dist/serverQueryTypes-BI-2TD8F.d.ts +53 -0
- package/dist/serverQueryTypes-BI-2TD8F.d.ts.map +1 -0
- package/dist/serverQueryTypes-D7Yharse.d.cts +53 -0
- package/dist/serverQueryTypes-D7Yharse.d.cts.map +1 -0
- package/dist/serverResponseGuards-C_vZIgGl.d.ts +16 -0
- package/dist/serverResponseGuards-C_vZIgGl.d.ts.map +1 -0
- package/dist/serverResponseGuards-DjCNL3CR.d.cts +16 -0
- package/dist/serverResponseGuards-DjCNL3CR.d.cts.map +1 -0
- package/dist/signing/buildSignedMobileRequest.cjs +47 -0
- package/dist/signing/buildSignedMobileRequest.cjs.map +1 -0
- package/dist/signing/buildSignedMobileRequest.d.cts +2 -0
- package/dist/signing/buildSignedMobileRequest.d.ts +2 -0
- package/dist/signing/buildSignedMobileRequest.js +45 -0
- package/dist/signing/buildSignedMobileRequest.js.map +1 -0
- package/dist/signing/canonicalize.cjs +68 -0
- package/dist/signing/canonicalize.cjs.map +1 -0
- package/dist/signing/canonicalize.d.cts +2 -0
- package/dist/signing/canonicalize.d.ts +2 -0
- package/dist/signing/canonicalize.js +67 -0
- package/dist/signing/canonicalize.js.map +1 -0
- package/dist/signing/eip712MethodByType.cjs +20 -0
- package/dist/signing/eip712MethodByType.cjs.map +1 -0
- package/dist/signing/eip712MethodByType.d.cts +2 -0
- package/dist/signing/eip712MethodByType.d.ts +2 -0
- package/dist/signing/eip712MethodByType.js +19 -0
- package/dist/signing/eip712MethodByType.js.map +1 -0
- package/dist/signing/index.cjs +11 -0
- package/dist/signing/index.d.cts +7 -0
- package/dist/signing/index.d.ts +7 -0
- package/dist/signing/index.js +6 -0
- package/dist/signing/nonce.cjs +19 -0
- package/dist/signing/nonce.cjs.map +1 -0
- package/dist/signing/nonce.d.cts +2 -0
- package/dist/signing/nonce.d.ts +2 -0
- package/dist/signing/nonce.js +18 -0
- package/dist/signing/nonce.js.map +1 -0
- package/dist/signing/payloadHash.cjs +17 -0
- package/dist/signing/payloadHash.cjs.map +1 -0
- package/dist/signing/payloadHash.d.cts +2 -0
- package/dist/signing/payloadHash.d.ts +2 -0
- package/dist/signing/payloadHash.js +15 -0
- package/dist/signing/payloadHash.js.map +1 -0
- package/dist/signing/types.cjs +0 -0
- package/dist/signing/types.d.cts +2 -0
- package/dist/signing/types.d.ts +2 -0
- package/dist/signing/types.js +1 -0
- package/dist/types/MobileServerFailureError.cjs +17 -0
- package/dist/types/MobileServerFailureError.cjs.map +1 -0
- package/dist/types/MobileServerFailureError.d.cts +2 -0
- package/dist/types/MobileServerFailureError.d.ts +2 -0
- package/dist/types/MobileServerFailureError.js +16 -0
- package/dist/types/MobileServerFailureError.js.map +1 -0
- package/dist/types/clientTypes.cjs +0 -0
- package/dist/types/clientTypes.d.cts +2 -0
- package/dist/types/clientTypes.d.ts +2 -0
- package/dist/types/clientTypes.js +1 -0
- package/dist/types/index.cjs +5 -0
- package/dist/types/index.d.cts +8 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.js +3 -0
- package/dist/types/mobileErrorCodes.cjs +27 -0
- package/dist/types/mobileErrorCodes.cjs.map +1 -0
- package/dist/types/mobileErrorCodes.d.cts +2 -0
- package/dist/types/mobileErrorCodes.d.ts +2 -0
- package/dist/types/mobileErrorCodes.js +26 -0
- package/dist/types/mobileErrorCodes.js.map +1 -0
- package/dist/types/serverBaseTypes.cjs +0 -0
- package/dist/types/serverBaseTypes.d.cts +2 -0
- package/dist/types/serverBaseTypes.d.ts +2 -0
- package/dist/types/serverBaseTypes.js +1 -0
- package/dist/types/serverExecuteTypes.cjs +0 -0
- package/dist/types/serverExecuteTypes.d.cts +2 -0
- package/dist/types/serverExecuteTypes.d.ts +2 -0
- package/dist/types/serverExecuteTypes.js +1 -0
- package/dist/types/serverModelTypes.cjs +0 -0
- package/dist/types/serverModelTypes.d.cts +2 -0
- package/dist/types/serverModelTypes.d.ts +2 -0
- package/dist/types/serverModelTypes.js +1 -0
- package/dist/types/serverQueryTypes.cjs +0 -0
- package/dist/types/serverQueryTypes.d.cts +2 -0
- package/dist/types/serverQueryTypes.d.ts +2 -0
- package/dist/types/serverQueryTypes.js +1 -0
- package/dist/types-B76Pn7Sy.d.ts +73 -0
- package/dist/types-B76Pn7Sy.d.ts.map +1 -0
- package/dist/types-uCD4BNZR.d.cts +73 -0
- package/dist/types-uCD4BNZR.d.cts.map +1 -0
- package/dist/utils/index.cjs +6 -0
- package/dist/utils/index.d.cts +3 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/patterns.cjs +10 -0
- package/dist/utils/patterns.cjs.map +1 -0
- package/dist/utils/patterns.d.cts +2 -0
- package/dist/utils/patterns.d.ts +2 -0
- package/dist/utils/patterns.js +9 -0
- package/dist/utils/patterns.js.map +1 -0
- package/dist/utils/serverResponseGuards.cjs +19 -0
- package/dist/utils/serverResponseGuards.cjs.map +1 -0
- package/dist/utils/serverResponseGuards.d.cts +2 -0
- package/dist/utils/serverResponseGuards.d.ts +2 -0
- package/dist/utils/serverResponseGuards.js +17 -0
- package/dist/utils/serverResponseGuards.js.map +1 -0
- package/package.json +58 -0
- package/src/MobileClient.ts +395 -0
- package/src/dataMappers.ts +106 -0
- package/src/endpoints.ts +10 -0
- package/src/index.ts +5 -0
- package/src/signing/buildSignedMobileRequest.ts +58 -0
- package/src/signing/canonicalize.ts +69 -0
- package/src/signing/eip712MethodByType.ts +19 -0
- package/src/signing/index.ts +6 -0
- package/src/signing/nonce.ts +16 -0
- package/src/signing/payloadHash.ts +12 -0
- package/src/signing/signing.test.ts +224 -0
- package/src/signing/types.ts +71 -0
- package/src/types/MobileServerFailureError.ts +18 -0
- package/src/types/clientTypes.ts +182 -0
- package/src/types/index.ts +7 -0
- package/src/types/mobileErrorCodes.ts +27 -0
- package/src/types/serverBaseTypes.ts +43 -0
- package/src/types/serverExecuteTypes.ts +12 -0
- package/src/types/serverModelTypes.ts +74 -0
- package/src/types/serverQueryTypes.ts +74 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/patterns.ts +4 -0
- package/src/utils/serverResponseGuards.ts +27 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { n as MobileNotificationPlatform, t as MobileNotificationCategory } from "./serverModelTypes-CQgfqgW3.cjs";
|
|
2
|
+
import { SignatureParams, Subaccount } from "@nadohq/shared";
|
|
3
|
+
import { Hex } from "viem";
|
|
4
|
+
|
|
5
|
+
//#region src/types/clientTypes.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* A subaccount's claimed identity on the mobile service API.
|
|
8
|
+
*
|
|
9
|
+
* `username` and `displayName` are two representations of the same claimed name: `displayName` is what the
|
|
10
|
+
* user entered (preserving casing, e.g. `Alice.One`), while `username` is the canonical, lowercased handle
|
|
11
|
+
* derived from it (e.g. `alice.one`). `username` is the unique key used for profile lookups
|
|
12
|
+
* ({@link MobilePublicProfile}); `displayName` is only for presentation.
|
|
13
|
+
*/
|
|
14
|
+
interface MobileIdentity {
|
|
15
|
+
subaccount: Hex;
|
|
16
|
+
/**
|
|
17
|
+
* Canonical, lowercased handle derived from {@link MobileIdentity.displayName}, unique per identity and
|
|
18
|
+
* used for profile lookups.
|
|
19
|
+
*/
|
|
20
|
+
username: string;
|
|
21
|
+
/**
|
|
22
|
+
* User-facing name as claimed, preserving original casing. Validated against `MOBILE_DISPLAY_NAME_PATTERN`.
|
|
23
|
+
*/
|
|
24
|
+
displayName: string;
|
|
25
|
+
privateMode: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A subaccount's public profile, as returned by an unsigned profile lookup.
|
|
29
|
+
*/
|
|
30
|
+
interface MobilePublicProfile {
|
|
31
|
+
subaccount: Hex;
|
|
32
|
+
username: string;
|
|
33
|
+
displayName: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Result of a username availability check.
|
|
37
|
+
*/
|
|
38
|
+
interface MobileUsernameAvailability {
|
|
39
|
+
username: string;
|
|
40
|
+
available: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Scope limiting a notification category preference. Scopes are part of the wire format but rejected by the
|
|
44
|
+
* backend for the MVP — `scopes` must be empty.
|
|
45
|
+
*/
|
|
46
|
+
type MobileNotificationPreferenceScope = {
|
|
47
|
+
type: 'subaccount';
|
|
48
|
+
subaccount: Hex;
|
|
49
|
+
} | {
|
|
50
|
+
type: 'product';
|
|
51
|
+
productId: number;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* A per-category push notification preference.
|
|
55
|
+
*/
|
|
56
|
+
interface MobileNotificationCategoryPreference {
|
|
57
|
+
category: MobileNotificationCategory;
|
|
58
|
+
enabled: boolean;
|
|
59
|
+
scopes: MobileNotificationPreferenceScope[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A wallet's push notification preferences. The backend requires exactly one entry per known category and
|
|
63
|
+
* `schemaVersion` of 1.
|
|
64
|
+
*/
|
|
65
|
+
interface MobileNotificationPreferences {
|
|
66
|
+
/** Only `1` is accepted by the backend for the MVP. */
|
|
67
|
+
schemaVersion: 1;
|
|
68
|
+
categories: MobileNotificationCategoryPreference[];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A device registered for push notifications.
|
|
72
|
+
*/
|
|
73
|
+
interface MobileRegisteredDevice {
|
|
74
|
+
/** Push platform the device registered under. */
|
|
75
|
+
platform: MobileNotificationPlatform;
|
|
76
|
+
/** BCP-47 locale tag reported at registration, or `null` if none was provided. */
|
|
77
|
+
locale: string | null;
|
|
78
|
+
/** App version string reported at registration, or `null` if none was provided. */
|
|
79
|
+
appVersion: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* First 8 hex chars of `keccak256` over the bracket-stripped Expo token — a stable, non-reversible
|
|
82
|
+
* identifier for the device's push token. The raw token is never returned by the backend.
|
|
83
|
+
*/
|
|
84
|
+
tokenFingerprintPrefix: string;
|
|
85
|
+
/**
|
|
86
|
+
* Unix timestamp (milliseconds) of the device's last registration refresh.
|
|
87
|
+
*/
|
|
88
|
+
lastSeenAt: number;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Common params for signed requests that authenticate as a given subaccount.
|
|
92
|
+
*/
|
|
93
|
+
interface MobileSignedRequestParams extends Subaccount, SignatureParams {}
|
|
94
|
+
/**
|
|
95
|
+
* Params for {@link MobileClient.getUsernameAvailability}.
|
|
96
|
+
*/
|
|
97
|
+
interface GetMobileUsernameAvailabilityParams {
|
|
98
|
+
displayName: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Params for {@link MobileClient.getPublicProfile}.
|
|
102
|
+
*/
|
|
103
|
+
interface GetMobilePublicProfileParams {
|
|
104
|
+
username: string;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Params for {@link MobileClient.getSelfIdentity}.
|
|
108
|
+
*/
|
|
109
|
+
type GetMobileSelfIdentityParams = MobileSignedRequestParams;
|
|
110
|
+
/**
|
|
111
|
+
* Params for {@link MobileClient.claimUsername}.
|
|
112
|
+
*/
|
|
113
|
+
interface MobileClaimUsernameParams extends MobileSignedRequestParams {
|
|
114
|
+
displayName: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Params for {@link MobileClient.updateUsername}.
|
|
118
|
+
*/
|
|
119
|
+
interface MobileUpdateUsernameParams extends MobileSignedRequestParams {
|
|
120
|
+
displayName: string;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Params for {@link MobileClient.setPrivateMode}.
|
|
124
|
+
*/
|
|
125
|
+
interface MobileSetPrivateModeParams extends MobileSignedRequestParams {
|
|
126
|
+
privateMode: boolean;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Params for {@link MobileClient.registerExpoToken}.
|
|
130
|
+
*/
|
|
131
|
+
interface MobileRegisterExpoTokenParams extends MobileSignedRequestParams {
|
|
132
|
+
/**
|
|
133
|
+
* Expo push token, e.g. `ExponentPushToken[...]`.
|
|
134
|
+
*/
|
|
135
|
+
expoToken: string;
|
|
136
|
+
platform: MobileNotificationPlatform;
|
|
137
|
+
/**
|
|
138
|
+
* BCP-47 locale tag, max 35 chars.
|
|
139
|
+
*/
|
|
140
|
+
locale?: string;
|
|
141
|
+
/**
|
|
142
|
+
* App version string, max 64 chars.
|
|
143
|
+
*/
|
|
144
|
+
appVersion?: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Params for {@link MobileClient.unregisterExpoToken}.
|
|
148
|
+
*/
|
|
149
|
+
interface MobileUnregisterExpoTokenParams extends MobileSignedRequestParams {
|
|
150
|
+
expoToken: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Params for {@link MobileClient.updateNotificationPreferences}.
|
|
154
|
+
*/
|
|
155
|
+
interface MobileUpdateNotificationPreferencesParams extends MobileSignedRequestParams {
|
|
156
|
+
preferences: MobileNotificationPreferences;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Params for {@link MobileClient.getNotificationPreferences}.
|
|
160
|
+
*/
|
|
161
|
+
type GetMobileNotificationPreferencesParams = MobileSignedRequestParams;
|
|
162
|
+
/**
|
|
163
|
+
* Params for {@link MobileClient.getRegisteredDevices}.
|
|
164
|
+
*/
|
|
165
|
+
type GetMobileRegisteredDevicesParams = MobileSignedRequestParams;
|
|
166
|
+
//#endregion
|
|
167
|
+
export { MobileUpdateNotificationPreferencesParams as _, GetMobileUsernameAvailabilityParams as a, MobileNotificationCategoryPreference as c, MobilePublicProfile as d, MobileRegisterExpoTokenParams as f, MobileUnregisterExpoTokenParams as g, MobileSignedRequestParams as h, GetMobileSelfIdentityParams as i, MobileNotificationPreferenceScope as l, MobileSetPrivateModeParams as m, GetMobilePublicProfileParams as n, MobileClaimUsernameParams as o, MobileRegisteredDevice as p, GetMobileRegisteredDevicesParams as r, MobileIdentity as s, GetMobileNotificationPreferencesParams as t, MobileNotificationPreferences as u, MobileUpdateUsernameParams as v, MobileUsernameAvailability as y };
|
|
168
|
+
//# sourceMappingURL=clientTypes-Et0PUa2d.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientTypes-Et0PUa2d.d.cts","names":[],"sources":["../src/types/src/types/clientTypes.ts"],"mappings":";;;;;;;AAeA;;;;;;UAAiB,cAAA;EACf,UAAA,EAAY,GAAG;EAUf;;AAAW;AAMb;EAXE,QAAA;;;;EAIA,WAAA;EACA,WAAA;AAAA;;AASW;AAMb;UATiB,mBAAA;EACf,UAAA,EAAY,GAAG;EACf,QAAA;EACA,WAAA;AAAA;;;;UAMe,0BAAA;EACf,QAAA;EACA,SAAS;AAAA;;;AASqB;AAKhC;KAPY,iCAAA;EACN,IAAA;EAAoB,UAAA,EAAY,GAAG;AAAA;EACnC,IAAA;EAAiB,SAAA;AAAA;;;AAQoB;UAH1B,oCAAA;EACf,QAAA,EAAU,0BAAA;EACV,OAAA;EACA,MAAA,EAAQ,iCAAiC;AAAA;;;;AAUO;UAHjC,6BAAA;EASsB;EAPrC,aAAA;EACA,UAAA,EAAY,oCAAoC;AAAA;;;;UAMjC,sBAAA;EAef;EAbA,QAAA,EAAU,0BAA0B;EAa1B;EAXV,MAAA;EAkBA;EAhBA,UAAA;EAgBQ;AAA2B;AAKrC;;EAhBE,sBAAA;EAiBW;AAAA;AAMb;EAnBE,UAAA;AAAA;;AAoBQ;AAMV;UApBiB,yBAAA,SACP,UAAA,EAAY,eAAe;;AAmB8B;AAKnE;UAnBiB,mCAAA;EACf,WAAW;AAAA;AAmBA;AAMb;;AANa,UAbI,4BAAA;EACf,QAAQ;AAAA;AAyBV;;;AAAA,KAnBY,2BAAA,GAA8B,yBAAyB;AAoBtD;AAMb;;AANa,UAfI,yBAAA,SAAkC,yBAAyB;EAC1E,WAAW;AAAA;;;;UAMI,0BAAA,SAAmC,yBAAyB;EAC3E,WAAW;AAAA;AA0BD;AAMZ;;AANY,UApBK,0BAAA,SAAmC,yBAAyB;EAC3E,WAAW;AAAA;AAgCb;;;AAAA,UA1BiB,6BAAA,SAAsC,yBAAyB;EA0Bb;;;EAtBjE,SAAA;EACA,QAAA,EAAU,0BAAA;EA4BA;;;EAxBV,MAAA;EAwB4E;AAK9E;;EAzBE,UAAA;AAAA;AAyBsE;;;AAAA,UAnBvD,+BAAA,SAAwC,yBAAyB;EAChF,SAAS;AAAA;;;;UAMM,yCAAA,SAAkD,yBAAyB;EAC1F,WAAA,EAAa,6BAAA;AAAA;;;;KAMH,sCAAA,GAAyC,yBAAyB;;;;KAKlE,gCAAA,GAAmC,yBAAyB"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/dataMappers.ts
|
|
3
|
+
/**
|
|
4
|
+
* Maps a server-side identity (snake_case) to its client-side (camelCase) representation.
|
|
5
|
+
*/
|
|
6
|
+
function mapMobileIdentity(server) {
|
|
7
|
+
return {
|
|
8
|
+
subaccount: server.subaccount,
|
|
9
|
+
username: server.username,
|
|
10
|
+
displayName: server.display_name,
|
|
11
|
+
privateMode: server.private_mode
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Maps a server-side public profile (snake_case) to its client-side (camelCase) representation.
|
|
16
|
+
*/
|
|
17
|
+
function mapMobilePublicProfile(server) {
|
|
18
|
+
return {
|
|
19
|
+
subaccount: server.subaccount,
|
|
20
|
+
username: server.username,
|
|
21
|
+
displayName: server.display_name
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.
|
|
26
|
+
*/
|
|
27
|
+
function mapMobileNotificationPreferences(server) {
|
|
28
|
+
return {
|
|
29
|
+
schemaVersion: server.schema_version,
|
|
30
|
+
categories: server.categories.map((category) => ({
|
|
31
|
+
category: category.category,
|
|
32
|
+
enabled: category.enabled,
|
|
33
|
+
scopes: category.scopes.map(mapMobileNotificationPreferenceScope)
|
|
34
|
+
}))
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function mapMobileNotificationPreferenceScope(server) {
|
|
38
|
+
if (server.type === "subaccount") return {
|
|
39
|
+
type: "subaccount",
|
|
40
|
+
subaccount: server.subaccount
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
type: "product",
|
|
44
|
+
productId: server.product_id
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Maps client-side notification preferences (camelCase) to the server-side (snake_case) wire shape.
|
|
49
|
+
*/
|
|
50
|
+
function mapMobileNotificationPreferencesToServer(preferences) {
|
|
51
|
+
return {
|
|
52
|
+
schema_version: preferences.schemaVersion,
|
|
53
|
+
categories: preferences.categories.map((category) => ({
|
|
54
|
+
category: category.category,
|
|
55
|
+
enabled: category.enabled,
|
|
56
|
+
scopes: category.scopes.map(mapMobileNotificationPreferenceScopeToServer)
|
|
57
|
+
}))
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function mapMobileNotificationPreferenceScopeToServer(scope) {
|
|
61
|
+
if (scope.type === "subaccount") return {
|
|
62
|
+
type: "subaccount",
|
|
63
|
+
subaccount: scope.subaccount
|
|
64
|
+
};
|
|
65
|
+
return {
|
|
66
|
+
type: "product",
|
|
67
|
+
product_id: scope.productId
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Maps a server-side registered device (snake_case) to its client-side (camelCase) representation.
|
|
72
|
+
*/
|
|
73
|
+
function mapMobileRegisteredDevice(server) {
|
|
74
|
+
return {
|
|
75
|
+
platform: server.platform,
|
|
76
|
+
locale: server.locale,
|
|
77
|
+
appVersion: server.app_version,
|
|
78
|
+
tokenFingerprintPrefix: server.token_fingerprint_prefix,
|
|
79
|
+
lastSeenAt: server.last_seen_at
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
exports.mapMobileIdentity = mapMobileIdentity;
|
|
84
|
+
exports.mapMobileNotificationPreferences = mapMobileNotificationPreferences;
|
|
85
|
+
exports.mapMobileNotificationPreferencesToServer = mapMobileNotificationPreferencesToServer;
|
|
86
|
+
exports.mapMobilePublicProfile = mapMobilePublicProfile;
|
|
87
|
+
exports.mapMobileRegisteredDevice = mapMobileRegisteredDevice;
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=dataMappers.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataMappers.cjs","names":[],"sources":["../src/dataMappers.ts"],"sourcesContent":["import {\n MobileIdentity,\n MobileNotificationPreferenceScope,\n MobileNotificationPreferences,\n MobilePublicProfile,\n MobileRegisteredDevice,\n} from './types/clientTypes';\nimport {\n MobileServerIdentity,\n MobileServerNotificationPreferenceScope,\n MobileServerNotificationPreferences,\n MobileServerProfile,\n MobileServerRegisteredDevice,\n} from './types/serverModelTypes';\n\n/**\n * Maps a server-side identity (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileIdentity(\n server: MobileServerIdentity,\n): MobileIdentity {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n privateMode: server.private_mode,\n };\n}\n\n/**\n * Maps a server-side public profile (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobilePublicProfile(\n server: MobileServerProfile,\n): MobilePublicProfile {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n };\n}\n\n/**\n * Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.\n */\nexport function mapMobileNotificationPreferences(\n server: MobileServerNotificationPreferences,\n): MobileNotificationPreferences {\n return {\n schemaVersion: server.schema_version,\n categories: server.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScope),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScope(\n server: MobileServerNotificationPreferenceScope,\n): MobileNotificationPreferenceScope {\n if (server.type === 'subaccount') {\n return { type: 'subaccount', subaccount: server.subaccount };\n }\n return { type: 'product', productId: server.product_id };\n}\n\n/**\n * Maps client-side notification preferences (camelCase) to the server-side (snake_case) wire shape.\n */\nexport function mapMobileNotificationPreferencesToServer(\n preferences: MobileNotificationPreferences,\n): MobileServerNotificationPreferences {\n return {\n schema_version: preferences.schemaVersion,\n categories: preferences.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScopeToServer),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScopeToServer(\n scope: MobileNotificationPreferenceScope,\n): MobileServerNotificationPreferenceScope {\n if (scope.type === 'subaccount') {\n return { type: 'subaccount', subaccount: scope.subaccount };\n }\n return { type: 'product', product_id: scope.productId };\n}\n\n/**\n * Maps a server-side registered device (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileRegisteredDevice(\n server: MobileServerRegisteredDevice,\n): MobileRegisteredDevice {\n return {\n platform: server.platform,\n locale: server.locale,\n appVersion: server.app_version,\n tokenFingerprintPrefix: server.token_fingerprint_prefix,\n lastSeenAt: server.last_seen_at,\n };\n}\n"],"mappings":";;;;;AAkBA,SAAgB,kBACd,QACgB;CAChB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,aAAa,OAAO;CACtB;AACF;;;;AAKA,SAAgB,uBACd,QACqB;CACrB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;CACtB;AACF;;;;AAKA,SAAgB,iCACd,QAC+B;CAC/B,OAAO;EACL,eAAe,OAAO;EACtB,YAAY,OAAO,WAAW,KAAK,cAAc;GAC/C,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,oCAAoC;EAClE,EAAE;CACJ;AACF;AAEA,SAAS,qCACP,QACmC;CACnC,IAAI,OAAO,SAAS,cAClB,OAAO;EAAE,MAAM;EAAc,YAAY,OAAO;CAAW;CAE7D,OAAO;EAAE,MAAM;EAAW,WAAW,OAAO;CAAW;AACzD;;;;AAKA,SAAgB,yCACd,aACqC;CACrC,OAAO;EACL,gBAAgB,YAAY;EAC5B,YAAY,YAAY,WAAW,KAAK,cAAc;GACpD,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,4CAA4C;EAC1E,EAAE;CACJ;AACF;AAEA,SAAS,6CACP,OACyC;CACzC,IAAI,MAAM,SAAS,cACjB,OAAO;EAAE,MAAM;EAAc,YAAY,MAAM;CAAW;CAE5D,OAAO;EAAE,MAAM;EAAW,YAAY,MAAM;CAAU;AACxD;;;;AAKA,SAAgB,0BACd,QACwB;CACxB,OAAO;EACL,UAAU,OAAO;EACjB,QAAQ,OAAO;EACf,YAAY,OAAO;EACnB,wBAAwB,OAAO;EAC/B,YAAY,OAAO;CACrB;AACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { c as MobileServerRegisteredDevice, o as MobileServerNotificationPreferences, r as MobileServerIdentity, s as MobileServerProfile } from "./serverModelTypes-CQgfqgW3.cjs";
|
|
2
|
+
import { d as MobilePublicProfile, p as MobileRegisteredDevice, s as MobileIdentity, u as MobileNotificationPreferences } from "./clientTypes-Et0PUa2d.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/dataMappers.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Maps a server-side identity (snake_case) to its client-side (camelCase) representation.
|
|
7
|
+
*/
|
|
8
|
+
declare function mapMobileIdentity(server: MobileServerIdentity): MobileIdentity;
|
|
9
|
+
/**
|
|
10
|
+
* Maps a server-side public profile (snake_case) to its client-side (camelCase) representation.
|
|
11
|
+
*/
|
|
12
|
+
declare function mapMobilePublicProfile(server: MobileServerProfile): MobilePublicProfile;
|
|
13
|
+
/**
|
|
14
|
+
* Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.
|
|
15
|
+
*/
|
|
16
|
+
declare function mapMobileNotificationPreferences(server: MobileServerNotificationPreferences): MobileNotificationPreferences;
|
|
17
|
+
/**
|
|
18
|
+
* Maps client-side notification preferences (camelCase) to the server-side (snake_case) wire shape.
|
|
19
|
+
*/
|
|
20
|
+
declare function mapMobileNotificationPreferencesToServer(preferences: MobileNotificationPreferences): MobileServerNotificationPreferences;
|
|
21
|
+
/**
|
|
22
|
+
* Maps a server-side registered device (snake_case) to its client-side (camelCase) representation.
|
|
23
|
+
*/
|
|
24
|
+
declare function mapMobileRegisteredDevice(server: MobileServerRegisteredDevice): MobileRegisteredDevice;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { mapMobileIdentity, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobilePublicProfile, mapMobileRegisteredDevice };
|
|
27
|
+
//# sourceMappingURL=dataMappers.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataMappers.d.cts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;AAkBA;iBAAgB,iBAAA,CACd,MAAA,EAAQ,oBAAA,GACP,cAAc;;;;iBAYD,sBAAA,CACd,MAAA,EAAQ,mBAAA,GACP,mBAAmB;;;AAdL;iBAyBD,gCAAA,CACd,MAAA,EAAQ,mCAAA,GACP,6BAA6B;;;;iBAuBhB,wCAAA,CACd,WAAA,EAAa,6BAAA,GACZ,mCAAmC;;;;iBAuBtB,yBAAA,CACd,MAAA,EAAQ,4BAAA,GACP,sBAAsB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { c as MobileServerRegisteredDevice, o as MobileServerNotificationPreferences, r as MobileServerIdentity, s as MobileServerProfile } from "./serverModelTypes-vEPhHIit.js";
|
|
2
|
+
import { d as MobilePublicProfile, p as MobileRegisteredDevice, s as MobileIdentity, u as MobileNotificationPreferences } from "./clientTypes-DWW2N66c.js";
|
|
3
|
+
|
|
4
|
+
//#region src/dataMappers.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Maps a server-side identity (snake_case) to its client-side (camelCase) representation.
|
|
7
|
+
*/
|
|
8
|
+
declare function mapMobileIdentity(server: MobileServerIdentity): MobileIdentity;
|
|
9
|
+
/**
|
|
10
|
+
* Maps a server-side public profile (snake_case) to its client-side (camelCase) representation.
|
|
11
|
+
*/
|
|
12
|
+
declare function mapMobilePublicProfile(server: MobileServerProfile): MobilePublicProfile;
|
|
13
|
+
/**
|
|
14
|
+
* Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.
|
|
15
|
+
*/
|
|
16
|
+
declare function mapMobileNotificationPreferences(server: MobileServerNotificationPreferences): MobileNotificationPreferences;
|
|
17
|
+
/**
|
|
18
|
+
* Maps client-side notification preferences (camelCase) to the server-side (snake_case) wire shape.
|
|
19
|
+
*/
|
|
20
|
+
declare function mapMobileNotificationPreferencesToServer(preferences: MobileNotificationPreferences): MobileServerNotificationPreferences;
|
|
21
|
+
/**
|
|
22
|
+
* Maps a server-side registered device (snake_case) to its client-side (camelCase) representation.
|
|
23
|
+
*/
|
|
24
|
+
declare function mapMobileRegisteredDevice(server: MobileServerRegisteredDevice): MobileRegisteredDevice;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { mapMobileIdentity, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobilePublicProfile, mapMobileRegisteredDevice };
|
|
27
|
+
//# sourceMappingURL=dataMappers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataMappers.d.ts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;AAkBA;iBAAgB,iBAAA,CACd,MAAA,EAAQ,oBAAA,GACP,cAAc;;;;iBAYD,sBAAA,CACd,MAAA,EAAQ,mBAAA,GACP,mBAAmB;;;AAdL;iBAyBD,gCAAA,CACd,MAAA,EAAQ,mCAAA,GACP,6BAA6B;;;;iBAuBhB,wCAAA,CACd,WAAA,EAAa,6BAAA,GACZ,mCAAmC;;;;iBAuBtB,yBAAA,CACd,MAAA,EAAQ,4BAAA,GACP,sBAAsB"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
//#region src/dataMappers.ts
|
|
2
|
+
/**
|
|
3
|
+
* Maps a server-side identity (snake_case) to its client-side (camelCase) representation.
|
|
4
|
+
*/
|
|
5
|
+
function mapMobileIdentity(server) {
|
|
6
|
+
return {
|
|
7
|
+
subaccount: server.subaccount,
|
|
8
|
+
username: server.username,
|
|
9
|
+
displayName: server.display_name,
|
|
10
|
+
privateMode: server.private_mode
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Maps a server-side public profile (snake_case) to its client-side (camelCase) representation.
|
|
15
|
+
*/
|
|
16
|
+
function mapMobilePublicProfile(server) {
|
|
17
|
+
return {
|
|
18
|
+
subaccount: server.subaccount,
|
|
19
|
+
username: server.username,
|
|
20
|
+
displayName: server.display_name
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.
|
|
25
|
+
*/
|
|
26
|
+
function mapMobileNotificationPreferences(server) {
|
|
27
|
+
return {
|
|
28
|
+
schemaVersion: server.schema_version,
|
|
29
|
+
categories: server.categories.map((category) => ({
|
|
30
|
+
category: category.category,
|
|
31
|
+
enabled: category.enabled,
|
|
32
|
+
scopes: category.scopes.map(mapMobileNotificationPreferenceScope)
|
|
33
|
+
}))
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function mapMobileNotificationPreferenceScope(server) {
|
|
37
|
+
if (server.type === "subaccount") return {
|
|
38
|
+
type: "subaccount",
|
|
39
|
+
subaccount: server.subaccount
|
|
40
|
+
};
|
|
41
|
+
return {
|
|
42
|
+
type: "product",
|
|
43
|
+
productId: server.product_id
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Maps client-side notification preferences (camelCase) to the server-side (snake_case) wire shape.
|
|
48
|
+
*/
|
|
49
|
+
function mapMobileNotificationPreferencesToServer(preferences) {
|
|
50
|
+
return {
|
|
51
|
+
schema_version: preferences.schemaVersion,
|
|
52
|
+
categories: preferences.categories.map((category) => ({
|
|
53
|
+
category: category.category,
|
|
54
|
+
enabled: category.enabled,
|
|
55
|
+
scopes: category.scopes.map(mapMobileNotificationPreferenceScopeToServer)
|
|
56
|
+
}))
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function mapMobileNotificationPreferenceScopeToServer(scope) {
|
|
60
|
+
if (scope.type === "subaccount") return {
|
|
61
|
+
type: "subaccount",
|
|
62
|
+
subaccount: scope.subaccount
|
|
63
|
+
};
|
|
64
|
+
return {
|
|
65
|
+
type: "product",
|
|
66
|
+
product_id: scope.productId
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Maps a server-side registered device (snake_case) to its client-side (camelCase) representation.
|
|
71
|
+
*/
|
|
72
|
+
function mapMobileRegisteredDevice(server) {
|
|
73
|
+
return {
|
|
74
|
+
platform: server.platform,
|
|
75
|
+
locale: server.locale,
|
|
76
|
+
appVersion: server.app_version,
|
|
77
|
+
tokenFingerprintPrefix: server.token_fingerprint_prefix,
|
|
78
|
+
lastSeenAt: server.last_seen_at
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { mapMobileIdentity, mapMobileNotificationPreferences, mapMobileNotificationPreferencesToServer, mapMobilePublicProfile, mapMobileRegisteredDevice };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=dataMappers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataMappers.js","names":[],"sources":["../src/dataMappers.ts"],"sourcesContent":["import {\n MobileIdentity,\n MobileNotificationPreferenceScope,\n MobileNotificationPreferences,\n MobilePublicProfile,\n MobileRegisteredDevice,\n} from './types/clientTypes';\nimport {\n MobileServerIdentity,\n MobileServerNotificationPreferenceScope,\n MobileServerNotificationPreferences,\n MobileServerProfile,\n MobileServerRegisteredDevice,\n} from './types/serverModelTypes';\n\n/**\n * Maps a server-side identity (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileIdentity(\n server: MobileServerIdentity,\n): MobileIdentity {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n privateMode: server.private_mode,\n };\n}\n\n/**\n * Maps a server-side public profile (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobilePublicProfile(\n server: MobileServerProfile,\n): MobilePublicProfile {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n };\n}\n\n/**\n * Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.\n */\nexport function mapMobileNotificationPreferences(\n server: MobileServerNotificationPreferences,\n): MobileNotificationPreferences {\n return {\n schemaVersion: server.schema_version,\n categories: server.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScope),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScope(\n server: MobileServerNotificationPreferenceScope,\n): MobileNotificationPreferenceScope {\n if (server.type === 'subaccount') {\n return { type: 'subaccount', subaccount: server.subaccount };\n }\n return { type: 'product', productId: server.product_id };\n}\n\n/**\n * Maps client-side notification preferences (camelCase) to the server-side (snake_case) wire shape.\n */\nexport function mapMobileNotificationPreferencesToServer(\n preferences: MobileNotificationPreferences,\n): MobileServerNotificationPreferences {\n return {\n schema_version: preferences.schemaVersion,\n categories: preferences.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScopeToServer),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScopeToServer(\n scope: MobileNotificationPreferenceScope,\n): MobileServerNotificationPreferenceScope {\n if (scope.type === 'subaccount') {\n return { type: 'subaccount', subaccount: scope.subaccount };\n }\n return { type: 'product', product_id: scope.productId };\n}\n\n/**\n * Maps a server-side registered device (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileRegisteredDevice(\n server: MobileServerRegisteredDevice,\n): MobileRegisteredDevice {\n return {\n platform: server.platform,\n locale: server.locale,\n appVersion: server.app_version,\n tokenFingerprintPrefix: server.token_fingerprint_prefix,\n lastSeenAt: server.last_seen_at,\n };\n}\n"],"mappings":";;;;AAkBA,SAAgB,kBACd,QACgB;CAChB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,aAAa,OAAO;CACtB;AACF;;;;AAKA,SAAgB,uBACd,QACqB;CACrB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;CACtB;AACF;;;;AAKA,SAAgB,iCACd,QAC+B;CAC/B,OAAO;EACL,eAAe,OAAO;EACtB,YAAY,OAAO,WAAW,KAAK,cAAc;GAC/C,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,oCAAoC;EAClE,EAAE;CACJ;AACF;AAEA,SAAS,qCACP,QACmC;CACnC,IAAI,OAAO,SAAS,cAClB,OAAO;EAAE,MAAM;EAAc,YAAY,OAAO;CAAW;CAE7D,OAAO;EAAE,MAAM;EAAW,WAAW,OAAO;CAAW;AACzD;;;;AAKA,SAAgB,yCACd,aACqC;CACrC,OAAO;EACL,gBAAgB,YAAY;EAC5B,YAAY,YAAY,WAAW,KAAK,cAAc;GACpD,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,4CAA4C;EAC1E,EAAE;CACJ;AACF;AAEA,SAAS,6CACP,OACyC;CACzC,IAAI,MAAM,SAAS,cACjB,OAAO;EAAE,MAAM;EAAc,YAAY,MAAM;CAAW;CAE5D,OAAO;EAAE,MAAM;EAAW,YAAY,MAAM;CAAU;AACxD;;;;AAKA,SAAgB,0BACd,QACwB;CACxB,OAAO;EACL,UAAU,OAAO;EACjB,QAAQ,OAAO;EACf,YAAY,OAAO;EACnB,wBAAwB,OAAO;EAC/B,YAAY,OAAO;CACrB;AACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { n as MobileSignedInner } from "./types-B76Pn7Sy.js";
|
|
2
|
+
|
|
3
|
+
//#region src/signing/eip712MethodByType.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* EIP-712 `method` string for each signed inner payload type.
|
|
6
|
+
*/
|
|
7
|
+
declare const MOBILE_EIP712_METHOD_BY_TYPE: Record<MobileSignedInner['type'], string>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { MOBILE_EIP712_METHOD_BY_TYPE as t };
|
|
10
|
+
//# sourceMappingURL=eip712MethodByType-DJgXal9r.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eip712MethodByType-DJgXal9r.d.ts","names":[],"sources":["../src/signing/src/signing/eip712MethodByType.ts"],"mappings":";;;;;AAKA;cAAa,4BAAA,EAA8B,MAAM,CAC/C,iBAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { n as MobileSignedInner } from "./types-uCD4BNZR.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/signing/eip712MethodByType.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* EIP-712 `method` string for each signed inner payload type.
|
|
6
|
+
*/
|
|
7
|
+
declare const MOBILE_EIP712_METHOD_BY_TYPE: Record<MobileSignedInner['type'], string>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { MOBILE_EIP712_METHOD_BY_TYPE as t };
|
|
10
|
+
//# sourceMappingURL=eip712MethodByType-DLh9MRsD.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eip712MethodByType-DLh9MRsD.d.cts","names":[],"sources":["../src/signing/src/signing/eip712MethodByType.ts"],"mappings":";;;;;AAKA;cAAa,4BAAA,EAA8B,MAAM,CAC/C,iBAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/endpoints.ts
|
|
3
|
+
/**
|
|
4
|
+
* Base URLs for the Nado mobile service API, keyed by chain environment.
|
|
5
|
+
*/
|
|
6
|
+
const MOBILE_CLIENT_ENDPOINTS = {
|
|
7
|
+
local: "http://mobile.local.nado.xyz:8004/v1",
|
|
8
|
+
inkTestnet: "https://mobile.test.nado.xyz/v1",
|
|
9
|
+
inkMainnet: "https://mobile.prod.nado.xyz/v1"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.MOBILE_CLIENT_ENDPOINTS = MOBILE_CLIENT_ENDPOINTS;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=endpoints.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.cjs","names":[],"sources":["../src/endpoints.ts"],"sourcesContent":["import { ChainEnv } from '@nadohq/shared';\n\n/**\n * Base URLs for the Nado mobile service API, keyed by chain environment.\n */\nexport const MOBILE_CLIENT_ENDPOINTS: Record<ChainEnv, string> = {\n local: 'http://mobile.local.nado.xyz:8004/v1',\n inkTestnet: 'https://mobile.test.nado.xyz/v1',\n inkMainnet: 'https://mobile.prod.nado.xyz/v1',\n};\n"],"mappings":";;;;;AAKA,MAAa,0BAAoD;CAC/D,OAAO;CACP,YAAY;CACZ,YAAY;AACd"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChainEnv } from "@nadohq/shared";
|
|
2
|
+
|
|
3
|
+
//#region src/endpoints.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Base URLs for the Nado mobile service API, keyed by chain environment.
|
|
6
|
+
*/
|
|
7
|
+
declare const MOBILE_CLIENT_ENDPOINTS: Record<ChainEnv, string>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { MOBILE_CLIENT_ENDPOINTS };
|
|
10
|
+
//# sourceMappingURL=endpoints.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.d.cts","names":[],"sources":["../src/src/endpoints.ts"],"mappings":";;;;;AAKA;cAAa,uBAAA,EAAyB,MAAM,CAAC,QAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChainEnv } from "@nadohq/shared";
|
|
2
|
+
|
|
3
|
+
//#region src/endpoints.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Base URLs for the Nado mobile service API, keyed by chain environment.
|
|
6
|
+
*/
|
|
7
|
+
declare const MOBILE_CLIENT_ENDPOINTS: Record<ChainEnv, string>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { MOBILE_CLIENT_ENDPOINTS };
|
|
10
|
+
//# sourceMappingURL=endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","names":[],"sources":["../src/src/endpoints.ts"],"mappings":";;;;;AAKA;cAAa,uBAAA,EAAyB,MAAM,CAAC,QAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/endpoints.ts
|
|
2
|
+
/**
|
|
3
|
+
* Base URLs for the Nado mobile service API, keyed by chain environment.
|
|
4
|
+
*/
|
|
5
|
+
const MOBILE_CLIENT_ENDPOINTS = {
|
|
6
|
+
local: "http://mobile.local.nado.xyz:8004/v1",
|
|
7
|
+
inkTestnet: "https://mobile.test.nado.xyz/v1",
|
|
8
|
+
inkMainnet: "https://mobile.prod.nado.xyz/v1"
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { MOBILE_CLIENT_ENDPOINTS };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.js","names":[],"sources":["../src/endpoints.ts"],"sourcesContent":["import { ChainEnv } from '@nadohq/shared';\n\n/**\n * Base URLs for the Nado mobile service API, keyed by chain environment.\n */\nexport const MOBILE_CLIENT_ENDPOINTS: Record<ChainEnv, string> = {\n local: 'http://mobile.local.nado.xyz:8004/v1',\n inkTestnet: 'https://mobile.test.nado.xyz/v1',\n inkMainnet: 'https://mobile.prod.nado.xyz/v1',\n};\n"],"mappings":";;;;AAKA,MAAa,0BAAoD;CAC/D,OAAO;CACP,YAAY;CACZ,YAAY;AACd"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_MobileClient = require("./MobileClient-9JSAzblH.cjs");
|
|
3
|
+
const require_signing_canonicalize = require("./signing/canonicalize.cjs");
|
|
4
|
+
const require_signing_eip712MethodByType = require("./signing/eip712MethodByType.cjs");
|
|
5
|
+
const require_signing_nonce = require("./signing/nonce.cjs");
|
|
6
|
+
const require_signing_payloadHash = require("./signing/payloadHash.cjs");
|
|
7
|
+
const require_signing_buildSignedMobileRequest = require("./signing/buildSignedMobileRequest.cjs");
|
|
8
|
+
require("./signing/index.cjs");
|
|
9
|
+
const require_types_MobileServerFailureError = require("./types/MobileServerFailureError.cjs");
|
|
10
|
+
const require_utils_serverResponseGuards = require("./utils/serverResponseGuards.cjs");
|
|
11
|
+
const require_endpoints = require("./endpoints.cjs");
|
|
12
|
+
const require_types_mobileErrorCodes = require("./types/mobileErrorCodes.cjs");
|
|
13
|
+
require("./types/index.cjs");
|
|
14
|
+
const require_utils_patterns = require("./utils/patterns.cjs");
|
|
15
|
+
require("./utils/index.cjs");
|
|
16
|
+
exports.MOBILE_CLIENT_ENDPOINTS = require_endpoints.MOBILE_CLIENT_ENDPOINTS;
|
|
17
|
+
exports.MOBILE_DISPLAY_NAME_PATTERN = require_utils_patterns.MOBILE_DISPLAY_NAME_PATTERN;
|
|
18
|
+
exports.MOBILE_EIP712_METHOD_BY_TYPE = require_signing_eip712MethodByType.MOBILE_EIP712_METHOD_BY_TYPE;
|
|
19
|
+
exports.MOBILE_ERROR_CODES = require_types_mobileErrorCodes.MOBILE_ERROR_CODES;
|
|
20
|
+
exports.MobileClient = require_MobileClient.MobileClient;
|
|
21
|
+
exports.MobileServerFailureError = require_types_MobileServerFailureError.MobileServerFailureError;
|
|
22
|
+
exports.buildSignedMobileRequest = require_signing_buildSignedMobileRequest.buildSignedMobileRequest;
|
|
23
|
+
exports.canonicalizeMobileInner = require_signing_canonicalize.canonicalizeMobileInner;
|
|
24
|
+
exports.getMobileNonce = require_signing_nonce.getMobileNonce;
|
|
25
|
+
exports.getMobilePayloadHash = require_signing_payloadHash.getMobilePayloadHash;
|
|
26
|
+
exports.isMobileServerFailureResponse = require_utils_serverResponseGuards.isMobileServerFailureResponse;
|
|
27
|
+
exports.isMobileServerSuccessResponse = require_utils_serverResponseGuards.isMobileServerSuccessResponse;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { a as MobileServerNotificationPreferenceScope, c as MobileServerRegisteredDevice, i as MobileServerNotificationCategoryPreference, n as MobileNotificationPlatform, o as MobileServerNotificationPreferences, r as MobileServerIdentity, s as MobileServerProfile, t as MobileNotificationCategory } from "./serverModelTypes-CQgfqgW3.cjs";
|
|
2
|
+
import { _ as MobileUpdateNotificationPreferencesParams, a as GetMobileUsernameAvailabilityParams, c as MobileNotificationCategoryPreference, d as MobilePublicProfile, f as MobileRegisterExpoTokenParams, g as MobileUnregisterExpoTokenParams, h as MobileSignedRequestParams, i as GetMobileSelfIdentityParams, l as MobileNotificationPreferenceScope, m as MobileSetPrivateModeParams, n as GetMobilePublicProfileParams, o as MobileClaimUsernameParams, p as MobileRegisteredDevice, r as GetMobileRegisteredDevicesParams, s as MobileIdentity, t as GetMobileNotificationPreferencesParams, u as MobileNotificationPreferences, v as MobileUpdateUsernameParams, y as MobileUsernameAvailability } from "./clientTypes-Et0PUa2d.cjs";
|
|
3
|
+
import { i as MobileSignedRequest, n as MobileSignedInner, r as MobileSignedInnerParams, t as BuildSignedMobileRequestParams } from "./types-uCD4BNZR.cjs";
|
|
4
|
+
import { t as buildSignedMobileRequest } from "./buildSignedMobileRequest-BsbBkU0K.cjs";
|
|
5
|
+
import { t as canonicalizeMobileInner } from "./canonicalize-Dm7sXwPg.cjs";
|
|
6
|
+
import { t as MOBILE_EIP712_METHOD_BY_TYPE } from "./eip712MethodByType-DLh9MRsD.cjs";
|
|
7
|
+
import { t as getMobileNonce } from "./nonce-zGyisRlj.cjs";
|
|
8
|
+
import { t as getMobilePayloadHash } from "./payloadHash-nj8WuLUP.cjs";
|
|
9
|
+
import { a as MobileServerSuccessResponse, i as MobileServerRequestType, n as MobileServerPublicQueryParamsByType, r as MobileServerPublicQueryType, t as MobileServerFailureResponse } from "./serverBaseTypes-BicXMrZV.cjs";
|
|
10
|
+
import { MobileClient, MobileClientOpts } from "./MobileClient.cjs";
|
|
11
|
+
import { MOBILE_CLIENT_ENDPOINTS } from "./endpoints.cjs";
|
|
12
|
+
import { n as MobileErrorCode, t as MOBILE_ERROR_CODES } from "./mobileErrorCodes-D8KzJXbU.cjs";
|
|
13
|
+
import { t as MobileServerFailureError } from "./MobileServerFailureError-Belp_yef.cjs";
|
|
14
|
+
import { t as MobileServerExecuteResult } from "./serverExecuteTypes-DKYK1V7C.cjs";
|
|
15
|
+
import { a as MobileServerRegisteredDevicesResponse, c as MobileServerUsernameAvailabilityResponse, i as MobileServerPublicQueryRequest, n as MobileServerProfileRequest, o as MobileServerSelfIdentityResponse, r as MobileServerProfileResponse, s as MobileServerUsernameAvailabilityRequest, t as MobileServerNotificationPreferencesResponse } from "./serverQueryTypes-D7Yharse.cjs";
|
|
16
|
+
import { t as MOBILE_DISPLAY_NAME_PATTERN } from "./patterns-B9J2ldpx.cjs";
|
|
17
|
+
import { n as isMobileServerSuccessResponse, t as isMobileServerFailureResponse } from "./serverResponseGuards-DjCNL3CR.cjs";
|
|
18
|
+
export { BuildSignedMobileRequestParams, GetMobileNotificationPreferencesParams, GetMobilePublicProfileParams, GetMobileRegisteredDevicesParams, GetMobileSelfIdentityParams, GetMobileUsernameAvailabilityParams, MOBILE_CLIENT_ENDPOINTS, MOBILE_DISPLAY_NAME_PATTERN, MOBILE_EIP712_METHOD_BY_TYPE, MOBILE_ERROR_CODES, MobileClaimUsernameParams, MobileClient, MobileClientOpts, MobileErrorCode, MobileIdentity, MobileNotificationCategory, MobileNotificationCategoryPreference, MobileNotificationPlatform, MobileNotificationPreferenceScope, MobileNotificationPreferences, MobilePublicProfile, MobileRegisterExpoTokenParams, MobileRegisteredDevice, MobileServerExecuteResult, MobileServerFailureError, MobileServerFailureResponse, MobileServerIdentity, MobileServerNotificationCategoryPreference, MobileServerNotificationPreferenceScope, MobileServerNotificationPreferences, MobileServerNotificationPreferencesResponse, MobileServerProfile, MobileServerProfileRequest, MobileServerProfileResponse, MobileServerPublicQueryParamsByType, MobileServerPublicQueryRequest, MobileServerPublicQueryType, MobileServerRegisteredDevice, MobileServerRegisteredDevicesResponse, MobileServerRequestType, MobileServerSelfIdentityResponse, MobileServerSuccessResponse, MobileServerUsernameAvailabilityRequest, MobileServerUsernameAvailabilityResponse, MobileSetPrivateModeParams, MobileSignedInner, MobileSignedInnerParams, MobileSignedRequest, MobileSignedRequestParams, MobileUnregisterExpoTokenParams, MobileUpdateNotificationPreferencesParams, MobileUpdateUsernameParams, MobileUsernameAvailability, buildSignedMobileRequest, canonicalizeMobileInner, getMobileNonce, getMobilePayloadHash, isMobileServerFailureResponse, isMobileServerSuccessResponse };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { a as MobileServerNotificationPreferenceScope, c as MobileServerRegisteredDevice, i as MobileServerNotificationCategoryPreference, n as MobileNotificationPlatform, o as MobileServerNotificationPreferences, r as MobileServerIdentity, s as MobileServerProfile, t as MobileNotificationCategory } from "./serverModelTypes-vEPhHIit.js";
|
|
2
|
+
import { _ as MobileUpdateNotificationPreferencesParams, a as GetMobileUsernameAvailabilityParams, c as MobileNotificationCategoryPreference, d as MobilePublicProfile, f as MobileRegisterExpoTokenParams, g as MobileUnregisterExpoTokenParams, h as MobileSignedRequestParams, i as GetMobileSelfIdentityParams, l as MobileNotificationPreferenceScope, m as MobileSetPrivateModeParams, n as GetMobilePublicProfileParams, o as MobileClaimUsernameParams, p as MobileRegisteredDevice, r as GetMobileRegisteredDevicesParams, s as MobileIdentity, t as GetMobileNotificationPreferencesParams, u as MobileNotificationPreferences, v as MobileUpdateUsernameParams, y as MobileUsernameAvailability } from "./clientTypes-DWW2N66c.js";
|
|
3
|
+
import { i as MobileSignedRequest, n as MobileSignedInner, r as MobileSignedInnerParams, t as BuildSignedMobileRequestParams } from "./types-B76Pn7Sy.js";
|
|
4
|
+
import { t as buildSignedMobileRequest } from "./buildSignedMobileRequest-CDRsRNHm.js";
|
|
5
|
+
import { t as canonicalizeMobileInner } from "./canonicalize-PX6dTIdF.js";
|
|
6
|
+
import { t as MOBILE_EIP712_METHOD_BY_TYPE } from "./eip712MethodByType-DJgXal9r.js";
|
|
7
|
+
import { t as getMobileNonce } from "./nonce-DCOrXXkQ.js";
|
|
8
|
+
import { t as getMobilePayloadHash } from "./payloadHash-Bmhzs78N.js";
|
|
9
|
+
import { a as MobileServerSuccessResponse, i as MobileServerRequestType, n as MobileServerPublicQueryParamsByType, r as MobileServerPublicQueryType, t as MobileServerFailureResponse } from "./serverBaseTypes-ewbo8l4R.js";
|
|
10
|
+
import { MobileClient, MobileClientOpts } from "./MobileClient.js";
|
|
11
|
+
import { MOBILE_CLIENT_ENDPOINTS } from "./endpoints.js";
|
|
12
|
+
import { n as MobileErrorCode, t as MOBILE_ERROR_CODES } from "./mobileErrorCodes-DM09jnNe.js";
|
|
13
|
+
import { t as MobileServerFailureError } from "./MobileServerFailureError-DqM0T6CB.js";
|
|
14
|
+
import { t as MobileServerExecuteResult } from "./serverExecuteTypes-CXnMjKnt.js";
|
|
15
|
+
import { a as MobileServerRegisteredDevicesResponse, c as MobileServerUsernameAvailabilityResponse, i as MobileServerPublicQueryRequest, n as MobileServerProfileRequest, o as MobileServerSelfIdentityResponse, r as MobileServerProfileResponse, s as MobileServerUsernameAvailabilityRequest, t as MobileServerNotificationPreferencesResponse } from "./serverQueryTypes-BI-2TD8F.js";
|
|
16
|
+
import { t as MOBILE_DISPLAY_NAME_PATTERN } from "./patterns-BbxH3_VA.js";
|
|
17
|
+
import { n as isMobileServerSuccessResponse, t as isMobileServerFailureResponse } from "./serverResponseGuards-C_vZIgGl.js";
|
|
18
|
+
export { BuildSignedMobileRequestParams, GetMobileNotificationPreferencesParams, GetMobilePublicProfileParams, GetMobileRegisteredDevicesParams, GetMobileSelfIdentityParams, GetMobileUsernameAvailabilityParams, MOBILE_CLIENT_ENDPOINTS, MOBILE_DISPLAY_NAME_PATTERN, MOBILE_EIP712_METHOD_BY_TYPE, MOBILE_ERROR_CODES, MobileClaimUsernameParams, MobileClient, MobileClientOpts, MobileErrorCode, MobileIdentity, MobileNotificationCategory, MobileNotificationCategoryPreference, MobileNotificationPlatform, MobileNotificationPreferenceScope, MobileNotificationPreferences, MobilePublicProfile, MobileRegisterExpoTokenParams, MobileRegisteredDevice, MobileServerExecuteResult, MobileServerFailureError, MobileServerFailureResponse, MobileServerIdentity, MobileServerNotificationCategoryPreference, MobileServerNotificationPreferenceScope, MobileServerNotificationPreferences, MobileServerNotificationPreferencesResponse, MobileServerProfile, MobileServerProfileRequest, MobileServerProfileResponse, MobileServerPublicQueryParamsByType, MobileServerPublicQueryRequest, MobileServerPublicQueryType, MobileServerRegisteredDevice, MobileServerRegisteredDevicesResponse, MobileServerRequestType, MobileServerSelfIdentityResponse, MobileServerSuccessResponse, MobileServerUsernameAvailabilityRequest, MobileServerUsernameAvailabilityResponse, MobileSetPrivateModeParams, MobileSignedInner, MobileSignedInnerParams, MobileSignedRequest, MobileSignedRequestParams, MobileUnregisterExpoTokenParams, MobileUpdateNotificationPreferencesParams, MobileUpdateUsernameParams, MobileUsernameAvailability, buildSignedMobileRequest, canonicalizeMobileInner, getMobileNonce, getMobilePayloadHash, isMobileServerFailureResponse, isMobileServerSuccessResponse };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { canonicalizeMobileInner } from "./signing/canonicalize.js";
|
|
2
|
+
import { MOBILE_EIP712_METHOD_BY_TYPE } from "./signing/eip712MethodByType.js";
|
|
3
|
+
import { getMobileNonce } from "./signing/nonce.js";
|
|
4
|
+
import { getMobilePayloadHash } from "./signing/payloadHash.js";
|
|
5
|
+
import { buildSignedMobileRequest } from "./signing/buildSignedMobileRequest.js";
|
|
6
|
+
import "./signing/index.js";
|
|
7
|
+
import { MobileServerFailureError } from "./types/MobileServerFailureError.js";
|
|
8
|
+
import { isMobileServerFailureResponse, isMobileServerSuccessResponse } from "./utils/serverResponseGuards.js";
|
|
9
|
+
import { MobileClient } from "./MobileClient.js";
|
|
10
|
+
import { MOBILE_CLIENT_ENDPOINTS } from "./endpoints.js";
|
|
11
|
+
import { MOBILE_ERROR_CODES } from "./types/mobileErrorCodes.js";
|
|
12
|
+
import "./types/index.js";
|
|
13
|
+
import { MOBILE_DISPLAY_NAME_PATTERN } from "./utils/patterns.js";
|
|
14
|
+
import "./utils/index.js";
|
|
15
|
+
export { MOBILE_CLIENT_ENDPOINTS, MOBILE_DISPLAY_NAME_PATTERN, MOBILE_EIP712_METHOD_BY_TYPE, MOBILE_ERROR_CODES, MobileClient, MobileServerFailureError, buildSignedMobileRequest, canonicalizeMobileInner, getMobileNonce, getMobilePayloadHash, isMobileServerFailureResponse, isMobileServerSuccessResponse };
|