@calimero-network/mero-js 33.3.2 → 34.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/index.cjs CHANGED
@@ -110,6 +110,7 @@ __export(index_exports, {
110
110
  createRoutes: () => createRoutes,
111
111
  createSealedFetch: () => createSealedFetch,
112
112
  createSignedReleaseVerifier: () => createSignedReleaseVerifier,
113
+ deleteOrgConsent: () => deleteOrgConsent,
113
114
  deployerKey: () => deployerKey,
114
115
  directoryTransport: () => directoryTransport,
115
116
  errorFrom: () => errorFrom,
@@ -122,6 +123,7 @@ __export(index_exports, {
122
123
  generateOwnerKey: () => generateOwnerKey,
123
124
  holderKey: () => holderKey,
124
125
  holderRecoveryBody: () => holderRecoveryBody,
126
+ leaveOrgConsent: () => leaveOrgConsent,
125
127
  newBackupKeyPair: () => newBackupKeyPair,
126
128
  newIdempotencyKey: () => newIdempotencyKey,
127
129
  newRecoverySeed: () => newRecoverySeed,
@@ -148,8 +150,16 @@ __export(index_exports, {
148
150
  releaseAgent: () => releaseAgent,
149
151
  releaseConsent: () => releaseConsent,
150
152
  releaseNotesUrl: () => releaseNotesUrl,
153
+ removeMemberConsent: () => removeMemberConsent,
154
+ removeMemberTeamsConsent: () => removeMemberTeamsConsent,
155
+ renameOrgConsent: () => renameOrgConsent,
151
156
  retryDelayMs: () => retryDelayMs,
157
+ revokeInviteConsent: () => revokeInviteConsent,
152
158
  routePath: () => routePath,
159
+ setAllAppsConsent: () => setAllAppsConsent,
160
+ setCapabilitiesConsent: () => setCapabilitiesConsent,
161
+ setMemberRoleConsent: () => setMemberRoleConsent,
162
+ setMemberTeamsConsent: () => setMemberTeamsConsent,
153
163
  signRecovery: () => signRecovery,
154
164
  sseFrames: () => sseFrames,
155
165
  stalledBy: () => stalledBy,
@@ -3008,6 +3018,20 @@ function createRoutes(api) {
3008
3018
  * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3009
3019
  */
3010
3020
  delete: (args, options) => route(api, { "method": "DELETE", "path": "/apps/{app}", "pathParams": ["app"], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3021
+ /**
3022
+ * Export a sealed file's key.
3023
+ *
3024
+ * `POST /apps/{app}/files/{id}/export` (`exports_export`). **Who:** signed in (a session or an API key).
3025
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3026
+ */
3027
+ exportsExport: (args, options) => route(api, { "method": "POST", "path": "/apps/{app}/files/{id}/export", "pathParams": ["app", "id"], "query": [], "body": "fields", "optionalBody": false, "reply": "json" }, args, options),
3028
+ /**
3029
+ * One segment of a sealed file.
3030
+ *
3031
+ * `GET /apps/{app}/files/{id}/segments/{k}` (`exports_segment`). **Who:** signed in (a session or an API key).
3032
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3033
+ */
3034
+ exportsSegment: (args, options) => route(api, { "method": "GET", "path": "/apps/{app}/files/{id}/segments/{k}", "pathParams": ["app", "id", "k"], "query": [], "body": "none", "optionalBody": false, "reply": "bytes" }, args, options),
3011
3035
  /**
3012
3036
  * One sealed file.
3013
3037
  *
@@ -3074,6 +3098,62 @@ function createRoutes(api) {
3074
3098
  * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3075
3099
  */
3076
3100
  openapi: (args, options) => route(api, { "method": "GET", "path": "/apps/{app}/openapi.json", "pathParams": ["app"], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3101
+ /**
3102
+ * A pipeline run's receipt.
3103
+ *
3104
+ * `GET /apps/{app}/pipeline-runs/{run}/receipt` (`pipeline_receipt_receipt`). **Who:** signed in (a session or an API key).
3105
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3106
+ */
3107
+ pipelineReceiptReceipt: (args, options) => route(api, { "method": "GET", "path": "/apps/{app}/pipeline-runs/{run}/receipt", "pathParams": ["app", "run"], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3108
+ /**
3109
+ * Cancel a pipeline run.
3110
+ *
3111
+ * `POST /apps/{app}/pipeline-runs/{run}/cancel` (`pipelines_cancel`). **Who:** signed in (a session or an API key).
3112
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3113
+ */
3114
+ pipelinesCancel: (args, options) => route(api, { "method": "POST", "path": "/apps/{app}/pipeline-runs/{run}/cancel", "pathParams": ["app", "run"], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3115
+ /**
3116
+ * Estimate a pipeline run.
3117
+ *
3118
+ * `POST /apps/{app}/pipelines/{name}/estimate` (`pipelines_estimate_run`). **Who:** signed in (a session or an API key).
3119
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3120
+ */
3121
+ pipelinesEstimateRun: (args, options) => route(api, { "method": "POST", "path": "/apps/{app}/pipelines/{name}/estimate", "pathParams": ["app", "name"], "query": [], "body": "fields", "optionalBody": false, "reply": "json" }, args, options),
3122
+ /**
3123
+ * One pipeline run.
3124
+ *
3125
+ * `GET /apps/{app}/pipeline-runs/{run}` (`pipelines_get`). **Who:** whoever the app's access admits (a public app: anyone).
3126
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3127
+ */
3128
+ pipelinesGet: (args, options) => route(api, { "method": "GET", "path": "/apps/{app}/pipeline-runs/{run}", "pathParams": ["app", "run"], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3129
+ /**
3130
+ * An app's pipeline runs.
3131
+ *
3132
+ * `GET /apps/{app}/pipeline-runs` (`pipelines_list`). **Who:** whoever the app's access admits (a public app: anyone).
3133
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3134
+ */
3135
+ pipelinesList: (args, options) => route(api, { "method": "GET", "path": "/apps/{app}/pipeline-runs", "pathParams": ["app"], "query": ["limit"], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3136
+ /**
3137
+ * Retry a pipeline run.
3138
+ *
3139
+ * `POST /apps/{app}/pipeline-runs/{run}/retry` (`pipelines_retry`). **Who:** signed in (a session or an API key).
3140
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3141
+ */
3142
+ pipelinesRetry: (args, options) => route(api, { "method": "POST", "path": "/apps/{app}/pipeline-runs/{run}/retry", "pathParams": ["app", "run"], "query": [], "body": "fields", "optionalBody": false, "reply": "json" }, args, options),
3143
+ /**
3144
+ * Start a pipeline run.
3145
+ *
3146
+ * `POST /apps/{app}/pipelines/{name}/runs` (`pipelines_start`). **Who:** signed in (a session or an API key).
3147
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3148
+ */
3149
+ pipelinesStart: (args, options) => route(api, { "method": "POST", "path": "/apps/{app}/pipelines/{name}/runs", "pathParams": ["app", "name"], "query": [], "body": "fields", "optionalBody": false, "reply": "json" }, args, options),
3150
+ /**
3151
+ * Validate a pipeline.
3152
+ *
3153
+ * `POST /pipelines/validate` (`pipelines_validate`). **Who:** signed in (a session or an API key).
3154
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3155
+ */
3156
+ pipelinesValidate: (args, options) => route(api, { "method": "POST", "path": "/pipelines/validate", "pathParams": [], "query": [], "body": "fields", "optionalBody": false, "reply": "json" }, args, options),
3077
3157
  /**
3078
3158
  * Who is present.
3079
3159
  *
@@ -3191,6 +3271,13 @@ function createRoutes(api) {
3191
3271
  * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3192
3272
  */
3193
3273
  accountApps: (args = {}, options) => route(api, { "method": "GET", "path": "/auth/apps", "pathParams": [], "query": ["after", "limit"], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3274
+ /**
3275
+ * The account's backup key.
3276
+ *
3277
+ * `GET /auth/backup-key` (`account_backup_key`). **Who:** an account holder (a passkey session not bound to an app's frontend).
3278
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3279
+ */
3280
+ accountBackupKey: (args = {}, options) => route(api, { "method": "GET", "path": "/auth/backup-key", "pathParams": [], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3194
3281
  /**
3195
3282
  * Approve outbound prefixes for the account's apps.
3196
3283
  *
@@ -3243,6 +3330,14 @@ function createRoutes(api) {
3243
3330
  * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3244
3331
  */
3245
3332
  accountReleaseApproval: (args, options) => route(api, { "method": "POST", "path": "/auth/releases", "pathParams": [], "query": [], "body": "fields", "optionalBody": false, "reply": "json", "stepUp": true, "userVerification": "required" }, args, options),
3333
+ /**
3334
+ * Set the account's backup key.
3335
+ *
3336
+ * `POST /auth/backup-key` (`account_set_backup_key`). **Who:** an account holder (a passkey session not bound to an app's frontend).
3337
+ * Answers `412 CONFIRM_REQUIRED` first: give `confirm` (here or on the client); the passkey must verify the user `required`.
3338
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3339
+ */
3340
+ accountSetBackupKey: (args, options) => route(api, { "method": "POST", "path": "/auth/backup-key", "pathParams": [], "query": [], "body": "fields", "optionalBody": false, "reply": "json", "stepUp": true, "userVerification": "required" }, args, options),
3246
3341
  /**
3247
3342
  * What the account's passkeys did.
3248
3343
  *
@@ -3568,6 +3663,12 @@ function createRoutes(api) {
3568
3663
  * `POST /ops/backup` (`ops_backup`). **Who:** the ops token.
3569
3664
  */
3570
3665
  backup: (args = {}, options) => route(api, { "method": "POST", "path": "/ops/backup", "pathParams": [], "query": ["all"], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3666
+ /**
3667
+ * The operator's backup key.
3668
+ *
3669
+ * `GET /ops/backup-key` (`ops_backup_key`). **Who:** the ops token.
3670
+ */
3671
+ backupKey: (args = {}, options) => route(api, { "method": "GET", "path": "/ops/backup-key", "pathParams": [], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3571
3672
  /**
3572
3673
  * The cluster's identity.
3573
3674
  *
@@ -3684,6 +3785,19 @@ function createRoutes(api) {
3684
3785
  * Answers `428 OPERATOR_SIGNATURE_REQUIRED` first: give `operatorProof` (here or on the client).
3685
3786
  */
3686
3787
  poolsSet: (args, options) => route(api, { "method": "POST", "path": "/ops/pools", "pathParams": [], "query": [], "body": "fields", "optionalBody": false, "reply": "json", "operator": true }, args, options),
3788
+ /**
3789
+ * The price table.
3790
+ *
3791
+ * `GET /ops/prices` (`ops_prices_get`). **Who:** the ops token.
3792
+ */
3793
+ pricesGet: (args = {}, options) => route(api, { "method": "GET", "path": "/ops/prices", "pathParams": [], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3794
+ /**
3795
+ * Set the price table.
3796
+ *
3797
+ * `POST /ops/prices` (`ops_prices_set`). **Who:** the ops token.
3798
+ * Answers `428 OPERATOR_SIGNATURE_REQUIRED` first: give `operatorProof` (here or on the client).
3799
+ */
3800
+ pricesSet: (args, options) => route(api, { "method": "POST", "path": "/ops/prices", "pathParams": [], "query": [], "body": "fields", "optionalBody": false, "reply": "json", "operator": true }, args, options),
3687
3801
  /**
3688
3802
  * The quotas.
3689
3803
  *
@@ -3703,6 +3817,18 @@ function createRoutes(api) {
3703
3817
  * `GET /ops/nodes/{id}/receipt-key` (`ops_receipt_key`). **Who:** the ops token.
3704
3818
  */
3705
3819
  receiptKey: (args, options) => route(api, { "method": "GET", "path": "/ops/nodes/{id}/receipt-key", "pathParams": ["id"], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3820
+ /**
3821
+ * Found the cluster again from its recovery disk.
3822
+ *
3823
+ * `POST /ops/recover` (`ops_recover`). **Who:** the ops token.
3824
+ */
3825
+ recover: (args, options) => route(api, { "method": "POST", "path": "/ops/recover", "pathParams": [], "query": [], "body": "fields", "optionalBody": false, "reply": "json" }, args, options),
3826
+ /**
3827
+ * The recovery files a node reads.
3828
+ *
3829
+ * `GET /ops/recovery-files` (`ops_recovery_files`). **Who:** the ops token.
3830
+ */
3831
+ recoveryFiles: (args = {}, options) => route(api, { "method": "GET", "path": "/ops/recovery-files", "pathParams": [], "query": ["holder"], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3706
3832
  /**
3707
3833
  * Register a node.
3708
3834
  *
@@ -3751,6 +3877,13 @@ function createRoutes(api) {
3751
3877
  * `GET /ops/served-origins` (`ops_served`). **Who:** the ops token.
3752
3878
  */
3753
3879
  served: (args = {}, options) => route(api, { "method": "GET", "path": "/ops/served-origins", "pathParams": [], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3880
+ /**
3881
+ * Set the operator's backup key.
3882
+ *
3883
+ * `POST /ops/backup-key` (`ops_set_backup_key`). **Who:** the ops token.
3884
+ * Answers `428 OPERATOR_SIGNATURE_REQUIRED` first: give `operatorProof` (here or on the client).
3885
+ */
3886
+ setBackupKey: (args, options) => route(api, { "method": "POST", "path": "/ops/backup-key", "pathParams": [], "query": [], "body": "fields", "optionalBody": false, "reply": "json", "operator": true }, args, options),
3754
3887
  /**
3755
3888
  * Move an app's replicas.
3756
3889
  *
@@ -3837,6 +3970,13 @@ function createRoutes(api) {
3837
3970
  * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3838
3971
  */
3839
3972
  appTeamsScope: (args, options) => route(api, { "method": "POST", "path": "/orgs/{org}/app-teams", "pathParams": ["org"], "query": [], "body": "fields", "optionalBody": false, "reply": "json", "stepUp": true, "userVerification": "required" }, args, options),
3973
+ /**
3974
+ * The organization's backup key.
3975
+ *
3976
+ * `GET /orgs/{org}/backup-key` (`org_backup_key`). **Who:** an account holder (a passkey session not bound to an app's frontend).
3977
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
3978
+ */
3979
+ backupKey: (args, options) => route(api, { "method": "GET", "path": "/orgs/{org}/backup-key", "pathParams": ["org"], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
3840
3980
  /**
3841
3981
  * Set capabilities.
3842
3982
  *
@@ -4013,6 +4153,14 @@ function createRoutes(api) {
4013
4153
  * A `421 WRONG_NODE` moves the client to the next node of the cluster.
4014
4154
  */
4015
4155
  rename: (args, options) => route(api, { "method": "POST", "path": "/orgs/{org}/name", "pathParams": ["org"], "query": [], "body": "fields", "optionalBody": false, "reply": "json", "stepUp": true, "userVerification": "required" }, args, options),
4156
+ /**
4157
+ * Set the organization's backup key.
4158
+ *
4159
+ * `POST /orgs/{org}/backup-key` (`org_set_backup_key`). **Who:** an account holder (a passkey session not bound to an app's frontend).
4160
+ * Answers `412 CONFIRM_REQUIRED` first: give `confirm` (here or on the client); the passkey must verify the user `required`.
4161
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
4162
+ */
4163
+ setBackupKey: (args, options) => route(api, { "method": "POST", "path": "/orgs/{org}/backup-key", "pathParams": ["org"], "query": [], "body": "fields", "optionalBody": false, "reply": "json", "stepUp": true, "userVerification": "required" }, args, options),
4016
4164
  /**
4017
4165
  * Set a member's role.
4018
4166
  *
@@ -4150,6 +4298,13 @@ function createRoutes(api) {
4150
4298
  * A `421 WRONG_NODE` moves the client to the next node of the cluster.
4151
4299
  */
4152
4300
  originsRemove: (args, options) => route(api, { "method": "DELETE", "path": "/package-origins/{package}", "pathParams": ["package"], "query": [], "body": "fields", "optionalBody": false, "reply": "json", "stepUp": true, "userVerification": "required" }, args, options),
4301
+ /**
4302
+ * A release's pipelines.
4303
+ *
4304
+ * `GET /packages/{package}/{version}/pipelines` (`package_pipelines`). **Who:** signed in (a session or an API key).
4305
+ * A `421 WRONG_NODE` moves the client to the next node of the cluster.
4306
+ */
4307
+ pipelines: (args, options) => route(api, { "method": "GET", "path": "/packages/{package}/{version}/pipelines", "pathParams": ["package", "version"], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
4153
4308
  /**
4154
4309
  * Uninstall a package.
4155
4310
  *
@@ -4197,7 +4352,14 @@ function createRoutes(api) {
4197
4352
  *
4198
4353
  * `GET /releases` (`releases_public`). **Who:** anyone.
4199
4354
  */
4200
- releasesPublic: (args = {}, options) => route(api, { "method": "GET", "path": "/releases", "pathParams": [], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options)
4355
+ releasesPublic: (args = {}, options) => route(api, { "method": "GET", "path": "/releases", "pathParams": [], "query": [], "body": "none", "optionalBody": false, "reply": "json" }, args, options),
4356
+ /**
4357
+ * Bring an organization's or account's apps back from its recovery files.
4358
+ *
4359
+ * `POST /recover/holder` (`restore_recover_holder`). **Who:** anyone.
4360
+ * Answers `428 OPERATOR_SIGNATURE_REQUIRED` first: give `operatorProof` (here or on the client).
4361
+ */
4362
+ restoreRecoverHolder: (args, options) => route(api, { "method": "POST", "path": "/recover/holder", "pathParams": [], "query": [], "body": "fields", "optionalBody": false, "reply": "json", "operator": true }, args, options)
4201
4363
  }
4202
4364
  };
4203
4365
  }
@@ -5063,6 +5225,36 @@ function createInviteConsent(subject, returnTo) {
5063
5225
  function acceptInviteConsent(token, returnTo) {
5064
5226
  return { kind: "acceptInvite", subject: { token }, returnTo };
5065
5227
  }
5228
+ function leaveOrgConsent(org, returnTo) {
5229
+ return { kind: "leaveOrg", subject: { org }, returnTo };
5230
+ }
5231
+ function removeMemberConsent(org, account, returnTo) {
5232
+ return { kind: "removeMember", subject: { org, account }, returnTo };
5233
+ }
5234
+ function setMemberRoleConsent(org, account, role, returnTo) {
5235
+ return { kind: "setMemberRole", subject: { org, account, role }, returnTo };
5236
+ }
5237
+ function setMemberTeamsConsent(org, account, teams, returnTo) {
5238
+ return { kind: "setMemberTeams", subject: { org, account, teams }, returnTo };
5239
+ }
5240
+ function removeMemberTeamsConsent(org, account, teams, returnTo) {
5241
+ return { kind: "removeMemberTeams", subject: { org, account, teams }, returnTo };
5242
+ }
5243
+ function revokeInviteConsent(org, inviteKey, returnTo) {
5244
+ return { kind: "revokeInvite", subject: { org, inviteKey }, returnTo };
5245
+ }
5246
+ function renameOrgConsent(org, name, returnTo) {
5247
+ return { kind: "renameOrg", subject: { org, name }, returnTo };
5248
+ }
5249
+ function deleteOrgConsent(org, returnTo) {
5250
+ return { kind: "deleteOrg", subject: { org }, returnTo };
5251
+ }
5252
+ function setCapabilitiesConsent(subject, returnTo) {
5253
+ return { kind: "setCapabilities", subject, returnTo };
5254
+ }
5255
+ function setAllAppsConsent(org, account, allApps, returnTo) {
5256
+ return { kind: "setAllApps", subject: { org, account, allApps }, returnTo };
5257
+ }
5066
5258
 
5067
5259
  // src/client/calimero-client.ts
5068
5260
  var FILE_PART_BYTES = 16 * 1024 * 1024;