@calimero-network/mero-js 30.0.0 → 30.1.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/cloud-v2/client.d.ts +1 -1
- package/dist/cloud-v2/client.js +1 -1
- package/dist/cloud-v2/errors.d.ts +14 -0
- package/dist/cloud-v2/errors.js +19 -0
- package/dist/cloud-v2/index.d.ts +1 -1
- package/dist/cloud-v2/index.js +1 -1
- package/dist/index.browser.mjs +3 -3
- package/dist/index.browser.mjs.map +3 -3
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +12 -0
- package/dist/index.mjs.map +2 -2
- package/dist/runtime.browser.mjs +1 -0
- package/dist/runtime.cjs +1 -0
- package/dist/runtime.mjs +1 -0
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ import { type ApiClient, type ApiClientOptions } from '../api/client.js';
|
|
|
16
16
|
import { type Routes } from '../generated/methods.js';
|
|
17
17
|
import { type AppsReport, type ConsentRequest, type ConsentResult, type ConsentStarted, type OpenConsentOptions, type PendingApprovals } from './approvals.js';
|
|
18
18
|
import type { ApiAnswer, ApiSchema } from '../api/types.js';
|
|
19
|
-
export { AppError, ArgsTooLarge, BadOrigin, CalimeroError, ConfirmCancelled, ConfirmPromptBlocked, ConfirmRequired, IdempotencyMismatch, LoginRequired, ConsentStale, NotFound, OriginNotRegistered, OriginTaken, PasskeyUnknownHere, QuotaExceeded, RecoveryNotReady, ReleaseDeadlineError, RuntimeTooOld, SignUpRefused, TrapError, UnavailableError, WrongNode, WrongRecoveryCode, errorFrom, } from './errors.js';
|
|
19
|
+
export { AppError, ArgsTooLarge, BadOrigin, CalimeroError, ConfirmCancelled, ConfirmPromptBlocked, ConfirmRequired, IdempotencyMismatch, LoginRequired, ConsentStale, FeatureNotActive, NotFound, OriginNotRegistered, OriginTaken, PasskeyUnknownHere, QuotaExceeded, RecoveryNotReady, ReleaseDeadlineError, RuntimeTooOld, SignUpRefused, TrapError, UnavailableError, WrongNode, WrongRecoveryCode, errorFrom, } from './errors.js';
|
|
20
20
|
export type { Committed, SignUpRefusal } from './errors.js';
|
|
21
21
|
export type { CalimeroSession, CloudEvent };
|
|
22
22
|
export type CallResult = ApiAnswer<'intents'>;
|
package/dist/cloud-v2/client.js
CHANGED
|
@@ -18,7 +18,7 @@ import { createRoutes } from '../generated/methods.js';
|
|
|
18
18
|
import { passkeyConfirm } from '../api/step-up.js';
|
|
19
19
|
import { signRecovery } from './recovery.js';
|
|
20
20
|
import { confirmationCode, pageQuery, pendingApprovalsFrom, } from './approvals.js';
|
|
21
|
-
export { AppError, ArgsTooLarge, BadOrigin, CalimeroError, ConfirmCancelled, ConfirmPromptBlocked, ConfirmRequired, IdempotencyMismatch, LoginRequired, ConsentStale, NotFound, OriginNotRegistered, OriginTaken, PasskeyUnknownHere, QuotaExceeded, RecoveryNotReady, ReleaseDeadlineError, RuntimeTooOld, SignUpRefused, TrapError, UnavailableError, WrongNode, WrongRecoveryCode, errorFrom, } from './errors.js';
|
|
21
|
+
export { AppError, ArgsTooLarge, BadOrigin, CalimeroError, ConfirmCancelled, ConfirmPromptBlocked, ConfirmRequired, IdempotencyMismatch, LoginRequired, ConsentStale, FeatureNotActive, NotFound, OriginNotRegistered, OriginTaken, PasskeyUnknownHere, QuotaExceeded, RecoveryNotReady, ReleaseDeadlineError, RuntimeTooOld, SignUpRefused, TrapError, UnavailableError, WrongNode, WrongRecoveryCode, errorFrom, } from './errors.js';
|
|
22
22
|
/** A deployer's key, as `GET /deployers` lists it and `DELETE /deployers/{key}` takes it. */
|
|
23
23
|
export function deployerKey(deployer) {
|
|
24
24
|
return 'account' in deployer ? `account:${deployer.account}` : `org:${deployer.org}`;
|
|
@@ -198,6 +198,20 @@ export declare class NotServing extends CalimeroError {
|
|
|
198
198
|
export declare class ClusterNotUpgraded extends CalimeroError {
|
|
199
199
|
constructor(message: string, details?: Record<string, unknown>);
|
|
200
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* `409 FEATURE_NOT_ACTIVE`: the command (or a field of it) needs a cluster
|
|
203
|
+
* version not every node of the cluster supports yet, during a rollout from
|
|
204
|
+
* an older release; nothing was done. `feature` names it, `needs` is the core
|
|
205
|
+
* release it needs and `active` the cluster's version now (`''` when not every
|
|
206
|
+
* node said which it supports). It works once the old nodes leave the cluster:
|
|
207
|
+
* retry then, or tell the user the feature is not available yet.
|
|
208
|
+
*/
|
|
209
|
+
export declare class FeatureNotActive extends CalimeroError {
|
|
210
|
+
readonly feature: string;
|
|
211
|
+
readonly needs: string;
|
|
212
|
+
readonly active: string;
|
|
213
|
+
constructor(message: string, details?: Record<string, unknown>);
|
|
214
|
+
}
|
|
201
215
|
/**
|
|
202
216
|
* `409 RECOVERY_NOT_READY`: a recovery (an account's or an organization's)
|
|
203
217
|
* may finish only once its 72-hour delay has passed. `readyAt` is when it may
|
package/dist/cloud-v2/errors.js
CHANGED
|
@@ -245,6 +245,23 @@ export class ClusterNotUpgraded extends CalimeroError {
|
|
|
245
245
|
this.name = 'ClusterNotUpgraded';
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* `409 FEATURE_NOT_ACTIVE`: the command (or a field of it) needs a cluster
|
|
250
|
+
* version not every node of the cluster supports yet, during a rollout from
|
|
251
|
+
* an older release; nothing was done. `feature` names it, `needs` is the core
|
|
252
|
+
* release it needs and `active` the cluster's version now (`''` when not every
|
|
253
|
+
* node said which it supports). It works once the old nodes leave the cluster:
|
|
254
|
+
* retry then, or tell the user the feature is not available yet.
|
|
255
|
+
*/
|
|
256
|
+
export class FeatureNotActive extends CalimeroError {
|
|
257
|
+
constructor(message, details = {}) {
|
|
258
|
+
super(409, 'FEATURE_NOT_ACTIVE', message, details);
|
|
259
|
+
this.name = 'FeatureNotActive';
|
|
260
|
+
this.feature = typeof details.feature === 'string' ? details.feature : '';
|
|
261
|
+
this.needs = typeof details.needs === 'string' ? details.needs : '';
|
|
262
|
+
this.active = typeof details.active === 'string' ? details.active : '';
|
|
263
|
+
}
|
|
264
|
+
}
|
|
248
265
|
/**
|
|
249
266
|
* `409 RECOVERY_NOT_READY`: a recovery (an account's or an organization's)
|
|
250
267
|
* may finish only once its 72-hour delay has passed. `readyAt` is when it may
|
|
@@ -412,6 +429,8 @@ export function errorFrom(status, body, retryAfterHeader) {
|
|
|
412
429
|
return new NotServing(message, details);
|
|
413
430
|
case '409 CLUSTER_NOT_UPGRADED':
|
|
414
431
|
return new ClusterNotUpgraded(message, details);
|
|
432
|
+
case '409 FEATURE_NOT_ACTIVE':
|
|
433
|
+
return new FeatureNotActive(message, details);
|
|
415
434
|
case '429 QUOTA_EXCEEDED':
|
|
416
435
|
return new QuotaExceeded(message, details);
|
|
417
436
|
case '409 RECOVERY_NOT_READY':
|
package/dist/cloud-v2/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CalimeroClient, deployerKey, frontendManifest, pageDeployment, presenceState } from './client.js';
|
|
2
2
|
export { DEFAULT_DIRECTORY, DirectoryError } from './directory.js';
|
|
3
3
|
export type { DirectoryFailure } from './directory.js';
|
|
4
|
-
export { AppError, ArgsTooLarge, BadOrigin, CalimeroError, ClusterNotUpgraded, ConfirmCancelled, ConfirmPromptBlocked, ConfirmRequired, IdempotencyMismatch, LoginRequired, ConsentStale, NotFound, NotServing, OriginNotRegistered, OriginTaken, PasskeyUnknownHere, QuotaExceeded, RecoveryNotReady, ReleaseDeadlineError, RuntimeTooOld, SignUpRefused, TrapError, UnavailableError, WrongNode, WrongRecoveryCode, errorFrom, } from './errors.js';
|
|
4
|
+
export { AppError, ArgsTooLarge, BadOrigin, CalimeroError, ClusterNotUpgraded, ConfirmCancelled, ConfirmPromptBlocked, ConfirmRequired, IdempotencyMismatch, LoginRequired, ConsentStale, FeatureNotActive, NotFound, NotServing, OriginNotRegistered, OriginTaken, PasskeyUnknownHere, QuotaExceeded, RecoveryNotReady, ReleaseDeadlineError, RuntimeTooOld, SignUpRefused, TrapError, UnavailableError, WrongNode, WrongRecoveryCode, errorFrom, } from './errors.js';
|
|
5
5
|
export type { Committed, SignUpRefusal } from './errors.js';
|
|
6
6
|
export type { AppInfo, AppTeam, AppTeams, AppXcalls, BlobContent, BlobInfo, DeadLetter, Deployer, DeployerGrant, DeployersInfo, DeploymentInfo, DeploymentOffer, DeploymentOrgs, OrgMemberSecurity, FrontendManifest, MeInfo, MeOrg, MePasskey, MoveAppResult, AccountSession, AccountActivity, PackageOrigin, PackageOriginAdded, PackageOriginRemoved, PackageOrigins, ServedOrigin, ServedOrigins, SignInOptions, AccountRecovery, SignUpOptions, SignUpPolicy, PublicDeployment, CallResult, CalimeroClientOptions, CalimeroConnectOptions, CloudEvent, CalimeroSession, PackageInfo, PackageInstalled, CloudRetryOptions, OrgInfo, OrgInvite, OrgMode, OrgRecovery, RecoveryTimes, OrgUpgradeTarget, PresenceEntry, ScopeApp, ScopeAppsOptions, ScopeAppsResult, ScopedAppTeam, TeamInfo, TeamMemberInfo, UpgradeRun, ViewResult, } from './client.js';
|
|
7
7
|
export { claimedRelease, fetchAttestedKey, freshCollateral, MOCK_QUOTE_HEADER } from './attestation.js';
|
package/dist/cloud-v2/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { CalimeroClient, deployerKey, frontendManifest, pageDeployment, presenceState } from './client.js';
|
|
2
2
|
export { DEFAULT_DIRECTORY, DirectoryError } from './directory.js';
|
|
3
|
-
export { AppError, ArgsTooLarge, BadOrigin, CalimeroError, ClusterNotUpgraded, ConfirmCancelled, ConfirmPromptBlocked, ConfirmRequired, IdempotencyMismatch, LoginRequired, ConsentStale, NotFound, NotServing, OriginNotRegistered, OriginTaken, PasskeyUnknownHere, QuotaExceeded, RecoveryNotReady, ReleaseDeadlineError, RuntimeTooOld, SignUpRefused, TrapError, UnavailableError, WrongNode, WrongRecoveryCode, errorFrom, } from './errors.js';
|
|
3
|
+
export { AppError, ArgsTooLarge, BadOrigin, CalimeroError, ClusterNotUpgraded, ConfirmCancelled, ConfirmPromptBlocked, ConfirmRequired, IdempotencyMismatch, LoginRequired, ConsentStale, FeatureNotActive, NotFound, NotServing, OriginNotRegistered, OriginTaken, PasskeyUnknownHere, QuotaExceeded, RecoveryNotReady, ReleaseDeadlineError, RuntimeTooOld, SignUpRefused, TrapError, UnavailableError, WrongNode, WrongRecoveryCode, errorFrom, } from './errors.js';
|
|
4
4
|
export { claimedRelease, fetchAttestedKey, freshCollateral, MOCK_QUOTE_HEADER } from './attestation.js';
|
|
5
5
|
export { browserPasskey, b64url, fromB64url } from './passkey.js';
|
|
6
6
|
export { MAX_RECOVERY_NONCE_BYTES, RECOVERY_DOMAIN, newRecoverySeed, parseRecoverySeed, recoveryMessage, recoveryPublicKey, recoverySeedText, signRecovery, } from './recovery.js';
|