@nadohq/mobile-client 0.28.0 → 0.29.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/{MobileServerFailureError-BfdqvDBi.d.cts → MobileServerFailureError-ZggEcEda.d.cts} +5 -11
- package/dist/MobileServerFailureError-ZggEcEda.d.cts.map +1 -0
- package/dist/{MobileServerFailureError-DUXjO_3w.d.ts → MobileServerFailureError-f9KhKnJj.d.ts} +5 -11
- package/dist/MobileServerFailureError-f9KhKnJj.d.ts.map +1 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/types/MobileServerFailureError.cjs +5 -7
- package/dist/types/MobileServerFailureError.cjs.map +1 -1
- package/dist/types/MobileServerFailureError.d.cts +1 -1
- package/dist/types/MobileServerFailureError.d.ts +1 -1
- package/dist/types/MobileServerFailureError.js +4 -7
- package/dist/types/MobileServerFailureError.js.map +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/types/MobileServerFailureError.ts +8 -18
- package/dist/MobileServerFailureError-BfdqvDBi.d.cts.map +0 -1
- package/dist/MobileServerFailureError-DUXjO_3w.d.ts.map +0 -1
package/dist/{MobileServerFailureError-BfdqvDBi.d.cts → MobileServerFailureError-ZggEcEda.d.cts}
RENAMED
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
import { i as MobileServerRequestType, t as MobileServerFailureResponse } from "./serverBaseTypes-BicXMrZV.cjs";
|
|
2
|
+
import { BaseServerFailureError } from "@nadohq/shared";
|
|
2
3
|
|
|
3
4
|
//#region src/types/MobileServerFailureError.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Error thrown when the mobile service API returns a failure envelope, either as a non-2xx HTTP response
|
|
6
7
|
* or a 2xx response with `status: 'failure'`. The numeric error code is exposed directly on
|
|
7
|
-
* {@link errorCode} for comparison against {@link MOBILE_ERROR_CODES}.
|
|
8
|
+
* {@link BaseServerFailureError.errorCode} for comparison against {@link MOBILE_ERROR_CODES}.
|
|
8
9
|
*/
|
|
9
|
-
declare class MobileServerFailureError extends
|
|
10
|
+
declare class MobileServerFailureError extends BaseServerFailureError {
|
|
10
11
|
readonly responseData: MobileServerFailureResponse;
|
|
12
|
+
readonly requestType: MobileServerRequestType;
|
|
11
13
|
/**
|
|
12
14
|
* HTTP status code of the response, e.g. `404` for `PROFILE_NOT_FOUND`. Unlike the engine, the mobile
|
|
13
15
|
* backend maps domain failures onto HTTP statuses.
|
|
14
16
|
*/
|
|
15
17
|
readonly httpStatus: number;
|
|
16
|
-
/**
|
|
17
|
-
* Numeric mobile service API error code, see {@link MOBILE_ERROR_CODES}.
|
|
18
|
-
*/
|
|
19
|
-
readonly errorCode: number;
|
|
20
|
-
/**
|
|
21
|
-
* The request type that failed, e.g. `public_query_profile`, `execute_claim_username`.
|
|
22
|
-
*/
|
|
23
|
-
readonly requestType: MobileServerRequestType;
|
|
24
18
|
constructor(responseData: MobileServerFailureResponse, httpStatus: number);
|
|
25
19
|
}
|
|
26
20
|
//#endregion
|
|
27
21
|
export { MobileServerFailureError as t };
|
|
28
|
-
//# sourceMappingURL=MobileServerFailureError-
|
|
22
|
+
//# sourceMappingURL=MobileServerFailureError-ZggEcEda.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobileServerFailureError-ZggEcEda.d.cts","names":[],"sources":["../src/types/src/types/MobileServerFailureError.ts"],"mappings":";;;;;;AAWA;;;cAAa,wBAAA,SAAiC,sBAAA;EAAA,SAC3B,YAAA,EAAc,2BAAA;EAAA,SACd,WAAA,EAAa,uBAAA;EAFc;;;;EAAA,SAQnC,UAAA;cAEG,YAAA,EAAc,2BAAA,EAA6B,UAAA;AAAA"}
|
package/dist/{MobileServerFailureError-DUXjO_3w.d.ts → MobileServerFailureError-f9KhKnJj.d.ts}
RENAMED
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
import { i as MobileServerRequestType, t as MobileServerFailureResponse } from "./serverBaseTypes-ewbo8l4R.js";
|
|
2
|
+
import { BaseServerFailureError } from "@nadohq/shared";
|
|
2
3
|
|
|
3
4
|
//#region src/types/MobileServerFailureError.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Error thrown when the mobile service API returns a failure envelope, either as a non-2xx HTTP response
|
|
6
7
|
* or a 2xx response with `status: 'failure'`. The numeric error code is exposed directly on
|
|
7
|
-
* {@link errorCode} for comparison against {@link MOBILE_ERROR_CODES}.
|
|
8
|
+
* {@link BaseServerFailureError.errorCode} for comparison against {@link MOBILE_ERROR_CODES}.
|
|
8
9
|
*/
|
|
9
|
-
declare class MobileServerFailureError extends
|
|
10
|
+
declare class MobileServerFailureError extends BaseServerFailureError {
|
|
10
11
|
readonly responseData: MobileServerFailureResponse;
|
|
12
|
+
readonly requestType: MobileServerRequestType;
|
|
11
13
|
/**
|
|
12
14
|
* HTTP status code of the response, e.g. `404` for `PROFILE_NOT_FOUND`. Unlike the engine, the mobile
|
|
13
15
|
* backend maps domain failures onto HTTP statuses.
|
|
14
16
|
*/
|
|
15
17
|
readonly httpStatus: number;
|
|
16
|
-
/**
|
|
17
|
-
* Numeric mobile service API error code, see {@link MOBILE_ERROR_CODES}.
|
|
18
|
-
*/
|
|
19
|
-
readonly errorCode: number;
|
|
20
|
-
/**
|
|
21
|
-
* The request type that failed, e.g. `public_query_profile`, `execute_claim_username`.
|
|
22
|
-
*/
|
|
23
|
-
readonly requestType: MobileServerRequestType;
|
|
24
18
|
constructor(responseData: MobileServerFailureResponse, httpStatus: number);
|
|
25
19
|
}
|
|
26
20
|
//#endregion
|
|
27
21
|
export { MobileServerFailureError as t };
|
|
28
|
-
//# sourceMappingURL=MobileServerFailureError-
|
|
22
|
+
//# sourceMappingURL=MobileServerFailureError-f9KhKnJj.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobileServerFailureError-f9KhKnJj.d.ts","names":[],"sources":["../src/types/src/types/MobileServerFailureError.ts"],"mappings":";;;;;;AAWA;;;cAAa,wBAAA,SAAiC,sBAAA;EAAA,SAC3B,YAAA,EAAc,2BAAA;EAAA,SACd,WAAA,EAAa,uBAAA;EAFc;;;;EAAA,SAQnC,UAAA;cAEG,YAAA,EAAc,2BAAA,EAA6B,UAAA;AAAA"}
|
package/dist/index.d.cts
CHANGED
|
@@ -10,7 +10,7 @@ import { a as MobileServerSuccessResponse, i as MobileServerRequestType, n as Mo
|
|
|
10
10
|
import { MobileClient, MobileClientOpts } from "./MobileClient.cjs";
|
|
11
11
|
import { MOBILE_CLIENT_ENDPOINTS } from "./endpoints.cjs";
|
|
12
12
|
import { n as MobileErrorCode, t as MOBILE_ERROR_CODES } from "./mobileErrorCodes-BeyBKmwh.cjs";
|
|
13
|
-
import { t as MobileServerFailureError } from "./MobileServerFailureError-
|
|
13
|
+
import { t as MobileServerFailureError } from "./MobileServerFailureError-ZggEcEda.cjs";
|
|
14
14
|
import { t as MobileServerExecuteResult } from "./serverExecuteTypes-DKYK1V7C.cjs";
|
|
15
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
16
|
import { t as MOBILE_DISPLAY_NAME_PATTERN } from "./patterns-B9J2ldpx.cjs";
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { a as MobileServerSuccessResponse, i as MobileServerRequestType, n as Mo
|
|
|
10
10
|
import { MobileClient, MobileClientOpts } from "./MobileClient.js";
|
|
11
11
|
import { MOBILE_CLIENT_ENDPOINTS } from "./endpoints.js";
|
|
12
12
|
import { n as MobileErrorCode, t as MOBILE_ERROR_CODES } from "./mobileErrorCodes-QG5XbEY6.js";
|
|
13
|
-
import { t as MobileServerFailureError } from "./MobileServerFailureError-
|
|
13
|
+
import { t as MobileServerFailureError } from "./MobileServerFailureError-f9KhKnJj.js";
|
|
14
14
|
import { t as MobileServerExecuteResult } from "./serverExecuteTypes-CXnMjKnt.js";
|
|
15
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
16
|
import { t as MOBILE_DISPLAY_NAME_PATTERN } from "./patterns-BbxH3_VA.js";
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../MobileClient-9JSAzblH.cjs");
|
|
3
|
+
let _nadohq_shared = require("@nadohq/shared");
|
|
2
4
|
//#region src/types/MobileServerFailureError.ts
|
|
3
5
|
/**
|
|
4
6
|
* Error thrown when the mobile service API returns a failure envelope, either as a non-2xx HTTP response
|
|
5
7
|
* or a 2xx response with `status: 'failure'`. The numeric error code is exposed directly on
|
|
6
|
-
* {@link errorCode} for comparison against {@link MOBILE_ERROR_CODES}.
|
|
8
|
+
* {@link BaseServerFailureError.errorCode} for comparison against {@link MOBILE_ERROR_CODES}.
|
|
7
9
|
*/
|
|
8
|
-
var MobileServerFailureError = class extends
|
|
10
|
+
var MobileServerFailureError = class extends _nadohq_shared.BaseServerFailureError {
|
|
9
11
|
constructor(responseData, httpStatus) {
|
|
10
|
-
super(
|
|
11
|
-
this.responseData = responseData;
|
|
12
|
-
this.name = "MobileServerFailureError";
|
|
12
|
+
super(responseData, "MobileServerFailureError");
|
|
13
13
|
this.httpStatus = httpStatus;
|
|
14
|
-
this.errorCode = responseData.error_code;
|
|
15
|
-
this.requestType = responseData.request_type;
|
|
16
14
|
}
|
|
17
15
|
};
|
|
18
16
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileServerFailureError.cjs","names":[],"sources":["../../src/types/MobileServerFailureError.ts"],"sourcesContent":["import {\n MobileServerFailureResponse,\n MobileServerRequestType,\n} from './serverBaseTypes';\n\n/**\n * Error thrown when the mobile service API returns a failure envelope, either as a non-2xx HTTP response\n * or a 2xx response with `status: 'failure'`. The numeric error code is exposed directly on\n * {@link errorCode} for comparison against {@link MOBILE_ERROR_CODES}.\n */\nexport class MobileServerFailureError extends
|
|
1
|
+
{"version":3,"file":"MobileServerFailureError.cjs","names":["BaseServerFailureError"],"sources":["../../src/types/MobileServerFailureError.ts"],"sourcesContent":["import { BaseServerFailureError } from '@nadohq/shared';\nimport {\n MobileServerFailureResponse,\n MobileServerRequestType,\n} from './serverBaseTypes';\n\n/**\n * Error thrown when the mobile service API returns a failure envelope, either as a non-2xx HTTP response\n * or a 2xx response with `status: 'failure'`. The numeric error code is exposed directly on\n * {@link BaseServerFailureError.errorCode} for comparison against {@link MOBILE_ERROR_CODES}.\n */\nexport class MobileServerFailureError extends BaseServerFailureError {\n declare readonly responseData: MobileServerFailureResponse;\n declare readonly requestType: MobileServerRequestType;\n\n /**\n * HTTP status code of the response, e.g. `404` for `PROFILE_NOT_FOUND`. Unlike the engine, the mobile\n * backend maps domain failures onto HTTP statuses.\n */\n readonly httpStatus: number;\n\n constructor(responseData: MobileServerFailureResponse, httpStatus: number) {\n super(responseData, 'MobileServerFailureError');\n this.httpStatus = httpStatus;\n }\n}\n"],"mappings":";;;;;;;;;AAWA,IAAa,2BAAb,cAA8CA,eAAAA,uBAAuB;CAUnE,YAAY,cAA2C,YAAoB;EACzE,MAAM,cAAc,0BAA0B;EAC9C,KAAK,aAAa;CACpB;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as MobileServerFailureError } from "../MobileServerFailureError-
|
|
1
|
+
import { t as MobileServerFailureError } from "../MobileServerFailureError-ZggEcEda.cjs";
|
|
2
2
|
export { MobileServerFailureError };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as MobileServerFailureError } from "../MobileServerFailureError-
|
|
1
|
+
import { t as MobileServerFailureError } from "../MobileServerFailureError-f9KhKnJj.js";
|
|
2
2
|
export { MobileServerFailureError };
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
+
import { BaseServerFailureError } from "@nadohq/shared";
|
|
1
2
|
//#region src/types/MobileServerFailureError.ts
|
|
2
3
|
/**
|
|
3
4
|
* Error thrown when the mobile service API returns a failure envelope, either as a non-2xx HTTP response
|
|
4
5
|
* or a 2xx response with `status: 'failure'`. The numeric error code is exposed directly on
|
|
5
|
-
* {@link errorCode} for comparison against {@link MOBILE_ERROR_CODES}.
|
|
6
|
+
* {@link BaseServerFailureError.errorCode} for comparison against {@link MOBILE_ERROR_CODES}.
|
|
6
7
|
*/
|
|
7
|
-
var MobileServerFailureError = class extends
|
|
8
|
+
var MobileServerFailureError = class extends BaseServerFailureError {
|
|
8
9
|
constructor(responseData, httpStatus) {
|
|
9
|
-
super(
|
|
10
|
-
this.responseData = responseData;
|
|
11
|
-
this.name = "MobileServerFailureError";
|
|
10
|
+
super(responseData, "MobileServerFailureError");
|
|
12
11
|
this.httpStatus = httpStatus;
|
|
13
|
-
this.errorCode = responseData.error_code;
|
|
14
|
-
this.requestType = responseData.request_type;
|
|
15
12
|
}
|
|
16
13
|
};
|
|
17
14
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileServerFailureError.js","names":[],"sources":["../../src/types/MobileServerFailureError.ts"],"sourcesContent":["import {\n MobileServerFailureResponse,\n MobileServerRequestType,\n} from './serverBaseTypes';\n\n/**\n * Error thrown when the mobile service API returns a failure envelope, either as a non-2xx HTTP response\n * or a 2xx response with `status: 'failure'`. The numeric error code is exposed directly on\n * {@link errorCode} for comparison against {@link MOBILE_ERROR_CODES}.\n */\nexport class MobileServerFailureError extends
|
|
1
|
+
{"version":3,"file":"MobileServerFailureError.js","names":[],"sources":["../../src/types/MobileServerFailureError.ts"],"sourcesContent":["import { BaseServerFailureError } from '@nadohq/shared';\nimport {\n MobileServerFailureResponse,\n MobileServerRequestType,\n} from './serverBaseTypes';\n\n/**\n * Error thrown when the mobile service API returns a failure envelope, either as a non-2xx HTTP response\n * or a 2xx response with `status: 'failure'`. The numeric error code is exposed directly on\n * {@link BaseServerFailureError.errorCode} for comparison against {@link MOBILE_ERROR_CODES}.\n */\nexport class MobileServerFailureError extends BaseServerFailureError {\n declare readonly responseData: MobileServerFailureResponse;\n declare readonly requestType: MobileServerRequestType;\n\n /**\n * HTTP status code of the response, e.g. `404` for `PROFILE_NOT_FOUND`. Unlike the engine, the mobile\n * backend maps domain failures onto HTTP statuses.\n */\n readonly httpStatus: number;\n\n constructor(responseData: MobileServerFailureResponse, httpStatus: number) {\n super(responseData, 'MobileServerFailureError');\n this.httpStatus = httpStatus;\n }\n}\n"],"mappings":";;;;;;;AAWA,IAAa,2BAAb,cAA8C,uBAAuB;CAUnE,YAAY,cAA2C,YAAoB;EACzE,MAAM,cAAc,0BAA0B;EAC9C,KAAK,aAAa;CACpB;AACF"}
|
package/dist/types/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { a as MobileServerNotificationPreferenceScope, c as MobileServerRegister
|
|
|
2
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
3
|
import { a as MobileServerSuccessResponse, i as MobileServerRequestType, n as MobileServerPublicQueryParamsByType, r as MobileServerPublicQueryType, t as MobileServerFailureResponse } from "../serverBaseTypes-BicXMrZV.cjs";
|
|
4
4
|
import { n as MobileErrorCode, t as MOBILE_ERROR_CODES } from "../mobileErrorCodes-BeyBKmwh.cjs";
|
|
5
|
-
import { t as MobileServerFailureError } from "../MobileServerFailureError-
|
|
5
|
+
import { t as MobileServerFailureError } from "../MobileServerFailureError-ZggEcEda.cjs";
|
|
6
6
|
import { t as MobileServerExecuteResult } from "../serverExecuteTypes-DKYK1V7C.cjs";
|
|
7
7
|
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";
|
|
8
8
|
export { GetMobileNotificationPreferencesParams, GetMobilePublicProfileParams, GetMobileRegisteredDevicesParams, GetMobileSelfIdentityParams, GetMobileUsernameAvailabilityParams, MOBILE_ERROR_CODES, MobileClaimUsernameParams, 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, MobileSignedRequestParams, MobileUnregisterExpoTokenParams, MobileUpdateNotificationPreferencesParams, MobileUpdateUsernameParams, MobileUsernameAvailability };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { a as MobileServerNotificationPreferenceScope, c as MobileServerRegister
|
|
|
2
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
3
|
import { a as MobileServerSuccessResponse, i as MobileServerRequestType, n as MobileServerPublicQueryParamsByType, r as MobileServerPublicQueryType, t as MobileServerFailureResponse } from "../serverBaseTypes-ewbo8l4R.js";
|
|
4
4
|
import { n as MobileErrorCode, t as MOBILE_ERROR_CODES } from "../mobileErrorCodes-QG5XbEY6.js";
|
|
5
|
-
import { t as MobileServerFailureError } from "../MobileServerFailureError-
|
|
5
|
+
import { t as MobileServerFailureError } from "../MobileServerFailureError-f9KhKnJj.js";
|
|
6
6
|
import { t as MobileServerExecuteResult } from "../serverExecuteTypes-CXnMjKnt.js";
|
|
7
7
|
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";
|
|
8
8
|
export { GetMobileNotificationPreferencesParams, GetMobilePublicProfileParams, GetMobileRegisteredDevicesParams, GetMobileSelfIdentityParams, GetMobileUsernameAvailabilityParams, MOBILE_ERROR_CODES, MobileClaimUsernameParams, 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, MobileSignedRequestParams, MobileUnregisterExpoTokenParams, MobileUpdateNotificationPreferencesParams, MobileUpdateUsernameParams, MobileUsernameAvailability };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadohq/mobile-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "HTTP client for the Nado mobile service API — username claims, profiles, privacy settings, and push notification devices & preferences",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"types": "./dist/index.d.ts",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@msgpack/msgpack": "3.1.3",
|
|
45
|
-
"@nadohq/shared": "^0.
|
|
45
|
+
"@nadohq/shared": "^0.29.0",
|
|
46
46
|
"axios": "1.16.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"bignumber.js": "11.1.1",
|
|
55
55
|
"viem": "2.52.0"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "cb15bfd6a018f18a335cb8e7e755d1533767dcd4"
|
|
58
58
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BaseServerFailureError } from '@nadohq/shared';
|
|
1
2
|
import {
|
|
2
3
|
MobileServerFailureResponse,
|
|
3
4
|
MobileServerRequestType,
|
|
@@ -6,31 +7,20 @@ import {
|
|
|
6
7
|
/**
|
|
7
8
|
* Error thrown when the mobile service API returns a failure envelope, either as a non-2xx HTTP response
|
|
8
9
|
* or a 2xx response with `status: 'failure'`. The numeric error code is exposed directly on
|
|
9
|
-
* {@link errorCode} for comparison against {@link MOBILE_ERROR_CODES}.
|
|
10
|
+
* {@link BaseServerFailureError.errorCode} for comparison against {@link MOBILE_ERROR_CODES}.
|
|
10
11
|
*/
|
|
11
|
-
export class MobileServerFailureError extends
|
|
12
|
+
export class MobileServerFailureError extends BaseServerFailureError {
|
|
13
|
+
declare readonly responseData: MobileServerFailureResponse;
|
|
14
|
+
declare readonly requestType: MobileServerRequestType;
|
|
15
|
+
|
|
12
16
|
/**
|
|
13
17
|
* HTTP status code of the response, e.g. `404` for `PROFILE_NOT_FOUND`. Unlike the engine, the mobile
|
|
14
18
|
* backend maps domain failures onto HTTP statuses.
|
|
15
19
|
*/
|
|
16
20
|
readonly httpStatus: number;
|
|
17
|
-
/**
|
|
18
|
-
* Numeric mobile service API error code, see {@link MOBILE_ERROR_CODES}.
|
|
19
|
-
*/
|
|
20
|
-
readonly errorCode: number;
|
|
21
|
-
/**
|
|
22
|
-
* The request type that failed, e.g. `public_query_profile`, `execute_claim_username`.
|
|
23
|
-
*/
|
|
24
|
-
readonly requestType: MobileServerRequestType;
|
|
25
21
|
|
|
26
|
-
constructor(
|
|
27
|
-
|
|
28
|
-
httpStatus: number,
|
|
29
|
-
) {
|
|
30
|
-
super(`${responseData.error_code}: ${responseData.error}`);
|
|
31
|
-
this.name = 'MobileServerFailureError';
|
|
22
|
+
constructor(responseData: MobileServerFailureResponse, httpStatus: number) {
|
|
23
|
+
super(responseData, 'MobileServerFailureError');
|
|
32
24
|
this.httpStatus = httpStatus;
|
|
33
|
-
this.errorCode = responseData.error_code;
|
|
34
|
-
this.requestType = responseData.request_type;
|
|
35
25
|
}
|
|
36
26
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MobileServerFailureError-BfdqvDBi.d.cts","names":[],"sources":["../src/types/src/types/MobileServerFailureError.ts"],"mappings":";;;;;AAUA;;;cAAa,wBAAA,SAAiC,KAAA;EAAA,SAgBjC,YAAA,EAAc,2BAAA;EAAA;;;;EAAA,SAXhB,UAAA;EAWE;;;EAAA,SAPF,SAAA;EAIA;;;EAAA,SAAA,WAAA,EAAa,uBAAA;cAGX,YAAA,EAAc,2BAAA,EACvB,UAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MobileServerFailureError-DUXjO_3w.d.ts","names":[],"sources":["../src/types/src/types/MobileServerFailureError.ts"],"mappings":";;;;;AAUA;;;cAAa,wBAAA,SAAiC,KAAA;EAAA,SAgBjC,YAAA,EAAc,2BAAA;EAAA;;;;EAAA,SAXhB,UAAA;EAWE;;;EAAA,SAPF,SAAA;EAIA;;;EAAA,SAAA,WAAA,EAAa,uBAAA;cAGX,YAAA,EAAc,2BAAA,EACvB,UAAA;AAAA"}
|