@sogni-ai/sogni-client 5.71.0 → 5.72.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/CHANGELOG.md +14 -0
- package/README.md +27 -0
- package/dist/Account/index.d.ts +27 -2
- package/dist/Account/index.js +27 -2
- package/dist/Account/index.js.map +1 -1
- package/dist/Account/types.d.ts +10 -0
- package/dist/ApiClient/WebSocketClient/index.d.ts +2 -0
- package/dist/ApiClient/WebSocketClient/index.js +26 -14
- package/dist/ApiClient/WebSocketClient/index.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/types/ErrorData.d.ts +13 -0
- package/dist/types/ErrorData.js +14 -1
- package/dist/types/ErrorData.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist-esm/Account/index.js +27 -2
- package/dist-esm/Account/index.js.map +1 -1
- package/dist-esm/ApiClient/WebSocketClient/index.js +26 -14
- package/dist-esm/ApiClient/WebSocketClient/index.js.map +1 -1
- package/dist-esm/index.js +2 -2
- package/dist-esm/index.js.map +1 -1
- package/dist-esm/types/ErrorData.js +13 -0
- package/dist-esm/types/ErrorData.js.map +1 -1
- package/dist-esm/version.js +1 -1
- package/llms-full.txt +28 -0
- package/llms.txt +1 -0
- package/package.json +3 -1
- package/src/Account/index.ts +30 -2
- package/src/Account/types.ts +11 -0
- package/src/ApiClient/WebSocketClient/index.ts +24 -12
- package/src/index.ts +10 -1
- package/src/types/ErrorData.ts +14 -0
- package/src/version.ts +1 -1
package/src/types/ErrorData.ts
CHANGED
|
@@ -98,6 +98,20 @@ export const MODEL_CONSENT_REQUIRED_ERROR_CODE = 4103;
|
|
|
98
98
|
*/
|
|
99
99
|
export const MODEL_NOT_YET_AVAILABLE_ERROR_CODE = 4104;
|
|
100
100
|
|
|
101
|
+
/**
|
|
102
|
+
* REST error code `sogni.account.login()` throws when the account was deleted
|
|
103
|
+
* and signing in can restore it. It arrives as an `ApiError` with HTTP status
|
|
104
|
+
* 400 and `error.payload.errorCode` set to this code. `error.details.deletedAt`
|
|
105
|
+
* is when the account was deleted, in Unix seconds.
|
|
106
|
+
*
|
|
107
|
+
* Ask the person whether to restore the account. If they agree, call `login()`
|
|
108
|
+
* again with the same arguments, including `rememberMe` and `appSource`, plus
|
|
109
|
+
* `{ restoreDeletedAccount: true }`: the account is restored and the call signs
|
|
110
|
+
* in as usual. The error's `message` is readable as is for apps that do not
|
|
111
|
+
* handle this code.
|
|
112
|
+
*/
|
|
113
|
+
export const ACCOUNT_RESTORABLE_ERROR_CODE = 196;
|
|
114
|
+
|
|
101
115
|
/**
|
|
102
116
|
* Socket error codes returned when a job explicitly submitted with
|
|
103
117
|
* `billingMode: 'subscription'` cannot be covered by the subscription, plus
|
package/src/version.ts
CHANGED