@calimero-network/mero-js 18.1.0 → 18.1.1

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.
@@ -1,5 +1,5 @@
1
1
  import { HttpClient } from '../http-client/index.js';
2
- import type { HealthStatus, AdminAuthStatus, InstallApplicationRequest, InstallApplicationResponseData, InstallDevApplicationRequest, UninstallApplicationResponseData, ListApplicationsResponseData, GetApplicationResponseData, ApplicationVersionEntry, GetApplicationAbiResponseData, GetLatestVersionResponseData, ListPackagesResponseData, ListVersionsResponseData, CreateContextRequest, CreateContextResponseData, DeleteContextRequest, DeleteContextResponseData, GetContextsResponseData, Context, GenerateContextIdentityResponseData, GetContextIdentitiesResponseData, JoinContextResponseData, JoinSubgroupInheritanceResponseData, ContextGroupResponseData, ContextStorageResponseData, InviteSpecializedNodeRequest, InviteSpecializedNodeResponseData, UpdateContextApplicationRequest, ResyncContextRequest, ResyncContextResponseData, ContextsWithExecutorsResponseData, UploadBlobRequest, UploadBlobResponseData, DeleteBlobResponseData, ListBlobsResponseData, GetBlobInfoResponseData, CreateContextAliasRequest, CreateApplicationAliasRequest, CreateAliasResponseData, LookupAliasResponseData, DeleteAliasResponseData, ListAliasesResponseData, ListNamespacesResponseData, CreateNamespaceRequest, CreateNamespaceResponseData, DeleteNamespaceRequest, DeleteNamespaceResponseData, CreateNamespaceInvitationRequest, CreateNamespaceInvitationResponseData, CreateRecursiveInvitationResponseData, JoinNamespaceRequest, JoinNamespaceResponseData, CreateGroupInNamespaceRequest, CreateGroupInNamespaceResponseData, SubgroupEntry, Namespace, NamespaceIdentity, NodeIdentity, AccountPairInitRequest, AccountPairInitResponseData, AccountPairCompleteRequest, AccountPairCompleteResponseData, RelinkDeviceRequest, RelinkDeviceResponseData, AccountDeviceEntry, AccountApplicationEntry, RevokeAccountDeviceRequest, RevokeAccountDeviceResponseData, GroupInfoResponseData, DeleteGroupRequest, DeleteGroupResponseData, ListGroupMembersResponseData, ListGroupContextsResponseData, AddGroupMembersRequest, RemoveGroupMembersRequest, UpdateMemberRoleRequest, MemberCapabilities, SetMemberCapabilitiesRequest, SetDefaultCapabilitiesRequest, SetSubgroupVisibilityRequest, SetTeeAdmissionPolicyRequest, GetTeeAdmissionPolicyResponseData, SetGroupMetadataRequest, SetMemberMetadataRequest, SetContextMetadataRequest, MetadataRecord, SyncGroupRequest, SyncGroupResponseData, UpgradeGroupRequest, UpgradeGroupResponseData, GroupUpgradeStatusResponseData, MigrationStatus, CascadeStatusEntry, RetryGroupUpgradeRequest, RetryGroupUpgradeResponseData, ReparentGroupRequest, ReparentGroupResponseData, DetachContextFromGroupRequest, CreateGroupInvitationRequest, CreateGroupInvitationResponseData, CreateRecursiveGroupInvitationResponseData, JoinGroupRequest, JoinGroupResponseData, TeeInfoResponseData, TeeAttestRequest, TeeAttestResponseData, TeeVerifyQuoteRequest, TeeVerifyQuoteResponseData, PerformIntentRequest, PerformIntentResponseData, AdmitJoinRequest, AdmitJoinResponseData } from './admin-types.js';
2
+ import type { HealthStatus, AdminAuthStatus, InstallApplicationRequest, InstallApplicationResponseData, InstallDevApplicationRequest, UninstallApplicationResponseData, ListApplicationsResponseData, GetApplicationResponseData, ApplicationVersionEntry, GetApplicationAbiResponseData, GetLatestVersionResponseData, ListPackagesResponseData, ListVersionsResponseData, CreateContextRequest, CreateContextResponseData, DeleteContextResponseData, GetContextsResponseData, Context, GenerateContextIdentityResponseData, GetContextIdentitiesResponseData, JoinContextResponseData, JoinSubgroupInheritanceResponseData, ContextGroupResponseData, ContextStorageResponseData, InviteSpecializedNodeRequest, InviteSpecializedNodeResponseData, UpdateContextApplicationRequest, ResyncContextRequest, ResyncContextResponseData, ContextsWithExecutorsResponseData, UploadBlobRequest, UploadBlobResponseData, DeleteBlobResponseData, ListBlobsResponseData, GetBlobInfoResponseData, CreateContextAliasRequest, CreateApplicationAliasRequest, CreateAliasResponseData, LookupAliasResponseData, DeleteAliasResponseData, ListAliasesResponseData, ListNamespacesResponseData, CreateNamespaceRequest, CreateNamespaceResponseData, DeleteNamespaceResponseData, CreateNamespaceInvitationRequest, CreateNamespaceInvitationResponseData, CreateRecursiveInvitationResponseData, JoinNamespaceRequest, JoinNamespaceResponseData, CreateGroupInNamespaceRequest, CreateGroupInNamespaceResponseData, SubgroupEntry, Namespace, NamespaceIdentity, NodeIdentity, AccountPairInitRequest, AccountPairInitResponseData, AccountPairCompleteRequest, AccountPairCompleteResponseData, RelinkDeviceRequest, RelinkDeviceResponseData, AccountDeviceEntry, AccountApplicationEntry, RevokeAccountDeviceRequest, RevokeAccountDeviceResponseData, GroupInfoResponseData, CreateGroupRequest, CreateGroupResponseData, DeleteGroupResponseData, ListGroupMembersResponseData, ListGroupContextsResponseData, AddGroupMembersRequest, RemoveGroupMembersRequest, UpdateMemberRoleRequest, MemberCapabilities, SetMemberCapabilitiesRequest, SetDefaultCapabilitiesRequest, SetMemberAutoFollowRequest, SetSubgroupVisibilityRequest, SetTeeAdmissionPolicyRequest, GetTeeAdmissionPolicyResponseData, SetGroupMetadataRequest, SetMemberMetadataRequest, SetContextMetadataRequest, MetadataRecord, SyncGroupResponseData, UpgradeGroupRequest, UpgradeGroupResponseData, GroupUpgradeStatusResponseData, MigrationStatus, CascadeStatusEntry, RetryGroupUpgradeResponseData, ReparentGroupRequest, ReparentGroupResponseData, IssueOwnershipProofRequest, IssueNamespaceOwnershipProofRequest, IssueOwnershipProofResponseData, CreateGroupInvitationRequest, CreateGroupInvitationResponseData, CreateRecursiveGroupInvitationResponseData, JoinGroupRequest, JoinGroupResponseData, TeeInfoResponseData, TeeAttestRequest, TeeAttestResponseData, TeeVerifyQuoteRequest, TeeVerifyQuoteResponseData, PerformIntentRequest, PerformIntentResponseData, AdmitJoinRequest, AdmitJoinResponseData } from './admin-types.js';
3
3
  /**
4
4
  * Compare two version strings by SemVer 2.0 precedence, ascending: negative if
5
5
  * `a < b`, positive if `a > b`, `0` if equal. Build metadata (`+...`) is stripped
@@ -52,7 +52,7 @@ export declare class AdminApiClient {
52
52
  listPackageVersions(packageName: string): Promise<ListVersionsResponseData>;
53
53
  getLatestPackageVersion(packageName: string): Promise<GetLatestVersionResponseData>;
54
54
  createContext(request: CreateContextRequest): Promise<CreateContextResponseData>;
55
- deleteContext(contextId: string, request?: DeleteContextRequest): Promise<DeleteContextResponseData>;
55
+ deleteContext(contextId: string): Promise<DeleteContextResponseData>;
56
56
  getContexts(): Promise<GetContextsResponseData>;
57
57
  getContext(contextId: string): Promise<Context>;
58
58
  getContextsForApplication(applicationId: string): Promise<GetContextsResponseData>;
@@ -155,7 +155,7 @@ export declare class AdminApiClient {
155
155
  performIntent(contextId: string, request: PerformIntentRequest): Promise<PerformIntentResponseData>;
156
156
  listNamespacesForApplication(applicationId: string): Promise<ListNamespacesResponseData>;
157
157
  createNamespace(request: CreateNamespaceRequest): Promise<CreateNamespaceResponseData>;
158
- deleteNamespace(namespaceId: string, request?: DeleteNamespaceRequest): Promise<DeleteNamespaceResponseData>;
158
+ deleteNamespace(namespaceId: string): Promise<DeleteNamespaceResponseData>;
159
159
  createNamespaceInvitation(namespaceId: string, request?: CreateNamespaceInvitationRequest): Promise<CreateNamespaceInvitationResponseData | CreateRecursiveInvitationResponseData>;
160
160
  /**
161
161
  * Present a join this caller signed to a node the inviter named as an
@@ -274,7 +274,7 @@ export declare class AdminApiClient {
274
274
  getDefaultCapabilities(groupId: string): Promise<number>;
275
275
  /** Thin wrapper over {@link getGroupInfo}: returns the group's `subgroupVisibility`. */
276
276
  getSubgroupVisibility(groupId: string): Promise<string>;
277
- deleteGroup(groupId: string, request?: DeleteGroupRequest): Promise<DeleteGroupResponseData>;
277
+ deleteGroup(groupId: string): Promise<DeleteGroupResponseData>;
278
278
  listGroupMembers(groupId: string): Promise<ListGroupMembersResponseData>;
279
279
  listGroupContexts(groupId: string): Promise<ListGroupContextsResponseData>;
280
280
  addGroupMembers(groupId: string, request: AddGroupMembersRequest): Promise<void>;
@@ -312,7 +312,7 @@ export declare class AdminApiClient {
312
312
  getMemberMetadata(groupId: string, identity: string): Promise<MetadataRecord | null>;
313
313
  setContextMetadata(groupId: string, contextId: string, request: SetContextMetadataRequest): Promise<void>;
314
314
  getContextMetadata(groupId: string, contextId: string): Promise<MetadataRecord | null>;
315
- syncGroup(groupId: string, request?: SyncGroupRequest): Promise<SyncGroupResponseData>;
315
+ syncGroup(groupId: string): Promise<SyncGroupResponseData>;
316
316
  upgradeGroup(groupId: string, request: UpgradeGroupRequest): Promise<UpgradeGroupResponseData>;
317
317
  getGroupUpgradeStatus(groupId: string): Promise<GroupUpgradeStatusResponseData>;
318
318
  /**
@@ -323,11 +323,11 @@ export declare class AdminApiClient {
323
323
  getMigrationStatus(namespaceId: string): Promise<MigrationStatus>;
324
324
  /** Per-group cascade-migration snapshots for a namespace. */
325
325
  getCascadeStatus(namespaceId: string): Promise<CascadeStatusEntry[]>;
326
- retryGroupUpgrade(groupId: string, request?: RetryGroupUpgradeRequest): Promise<RetryGroupUpgradeResponseData>;
326
+ retryGroupUpgrade(groupId: string): Promise<RetryGroupUpgradeResponseData>;
327
327
  /** Move `childGroupId` under `request.newParentId`. */
328
328
  reparentGroup(childGroupId: string, request: ReparentGroupRequest): Promise<ReparentGroupResponseData>;
329
329
  listSubgroups(groupId: string): Promise<SubgroupEntry[]>;
330
- detachContextFromGroup(groupId: string, contextId: string, request?: DetachContextFromGroupRequest): Promise<void>;
330
+ detachContextFromGroup(groupId: string, contextId: string): Promise<void>;
331
331
  createGroupInvitation(groupId: string, request?: CreateGroupInvitationRequest): Promise<CreateGroupInvitationResponseData | CreateRecursiveGroupInvitationResponseData>;
332
332
  joinGroup(request: JoinGroupRequest): Promise<JoinGroupResponseData>;
333
333
  joinSubgroupInheritance(groupId: string): Promise<JoinSubgroupInheritanceResponseData>;
@@ -344,19 +344,17 @@ export declare class AdminApiClient {
344
344
  /** Node TLS certificate, PEM text (GET /admin-api/certificate). */
345
345
  getCertificate(): Promise<string>;
346
346
  /** Create a standalone group (POST /admin-api/groups). */
347
- createGroup(request: Record<string, unknown>): Promise<{
348
- groupId: string;
349
- }>;
347
+ createGroup(request: CreateGroupRequest): Promise<CreateGroupResponseData>;
350
348
  /** Leave a group (POST /admin-api/groups/:group_id/leave). */
351
- leaveGroup(groupId: string, request?: Record<string, unknown>): Promise<void>;
349
+ leaveGroup(groupId: string): Promise<void>;
352
350
  /** Leave a context (POST /admin-api/contexts/:context_id/leave). */
353
- leaveContext(contextId: string, request?: Record<string, unknown>): Promise<void>;
351
+ leaveContext(contextId: string): Promise<void>;
354
352
  /** Leave a namespace (POST /admin-api/namespaces/:namespace_id/leave). */
355
- leaveNamespace(namespaceId: string, request?: Record<string, unknown>): Promise<void>;
353
+ leaveNamespace(namespaceId: string): Promise<void>;
356
354
  /** Issue a group ownership proof (POST /admin-api/groups/:group_id/issue-ownership-proof). */
357
- issueOwnershipProof(groupId: string, request?: Record<string, unknown>): Promise<unknown>;
355
+ issueOwnershipProof(groupId: string, request: IssueOwnershipProofRequest): Promise<IssueOwnershipProofResponseData>;
358
356
  /** Issue a namespace ownership proof (POST /admin-api/groups/:group_id/issue-namespace-ownership-proof). */
359
- issueNamespaceOwnershipProof(groupId: string, request?: Record<string, unknown>): Promise<unknown>;
357
+ issueNamespaceOwnershipProof(groupId: string, request: IssueNamespaceOwnershipProofRequest): Promise<IssueOwnershipProofResponseData>;
360
358
  /**
361
359
  * Set a member's auto-follow flag (PUT
362
360
  * /admin-api/groups/:group_id/members/:identity/auto-follow).
@@ -365,7 +363,7 @@ export declare class AdminApiClient {
365
363
  * {@link listGroupMembers} — not the signing key that added them. Both are
366
364
  * 64 hex, so nothing but the source tells them apart.
367
365
  */
368
- setMemberAutoFollow(groupId: string, identity: string, request: Record<string, unknown>): Promise<void>;
366
+ setMemberAutoFollow(groupId: string, identity: string, request: SetMemberAutoFollowRequest): Promise<void>;
369
367
  /** Abort a namespace migration (POST /admin-api/groups/:namespace_id/migration/abort). */
370
- abortMigration(namespaceId: string, request?: Record<string, unknown>): Promise<unknown>;
368
+ abortMigration(namespaceId: string): Promise<unknown>;
371
369
  }
@@ -184,14 +184,7 @@ export class AdminApiClient {
184
184
  const body = { ...request, initializationParams: request.initializationParams ?? [] };
185
185
  return unwrap(await this.httpClient.post('/admin-api/contexts', body));
186
186
  }
187
- async deleteContext(contextId, request) {
188
- if (request) {
189
- return unwrap(await this.httpClient.request(`/admin-api/contexts/${contextId}`, {
190
- method: 'DELETE',
191
- body: JSON.stringify(request),
192
- headers: { 'Content-Type': 'application/json' },
193
- }));
194
- }
187
+ async deleteContext(contextId) {
195
188
  return unwrap(await this.httpClient.delete(`/admin-api/contexts/${contextId}`));
196
189
  }
197
190
  async getContexts() {
@@ -417,30 +410,14 @@ export class AdminApiClient {
417
410
  return unwrap(await this.httpClient.get(`/admin-api/namespaces/for-application/${applicationId}`));
418
411
  }
419
412
  async createNamespace(request) {
420
- // `upgradePolicy` is sent even though the request type no longer carries it.
421
- //
422
- // The concept was deleted server-side (calimero-network/core#3393), but only
423
- // on master: every RELEASED node still declares the field required and
424
- // rejects a body without it — `missing field 'upgradePolicy'`. A node that
425
- // has dropped it ignores the extra key, so sending it is the one shape that
426
- // works against both, and this SDK does not get to choose which node a
427
- // caller points it at.
428
- //
429
- // `LazyOnAccess` because it was the default and is the only behaviour that
430
- // survives the removal, so an old node given it does what a new one does.
431
- //
432
- // Remove once no supported release predates that change.
433
- return unwrap(await this.httpClient.post('/admin-api/namespaces', {
434
- upgradePolicy: 'LazyOnAccess',
435
- ...request,
436
- }));
413
+ return unwrap(await this.httpClient.post('/admin-api/namespaces', request));
437
414
  }
438
- async deleteNamespace(namespaceId, request) {
439
- // Core requires `Content-Type: application/json` on this DELETE even when the
440
- // body is empty, so always send the header and a (possibly empty) JSON body.
415
+ async deleteNamespace(namespaceId) {
416
+ // Core requires `Content-Type: application/json` on this DELETE even though
417
+ // the body is always empty, so send the header and an empty JSON object.
441
418
  return unwrap(await this.httpClient.request(`/admin-api/namespaces/${namespaceId}`, {
442
419
  method: 'DELETE',
443
- body: JSON.stringify(request ?? {}),
420
+ body: '{}',
444
421
  headers: { 'Content-Type': 'application/json' },
445
422
  }));
446
423
  }
@@ -604,12 +581,12 @@ export class AdminApiClient {
604
581
  async getSubgroupVisibility(groupId) {
605
582
  return (await this.getGroupInfo(groupId)).subgroupVisibility;
606
583
  }
607
- async deleteGroup(groupId, request) {
608
- // Core requires `Content-Type: application/json` on this DELETE even with an
609
- // empty body, so always send the header and a (possibly empty) JSON body.
584
+ async deleteGroup(groupId) {
585
+ // Core requires `Content-Type: application/json` on this DELETE even though
586
+ // the body is always empty, so send the header and an empty JSON object.
610
587
  return unwrap(await this.httpClient.request(`/admin-api/groups/${groupId}`, {
611
588
  method: 'DELETE',
612
- body: JSON.stringify(request ?? {}),
589
+ body: '{}',
613
590
  headers: { 'Content-Type': 'application/json' },
614
591
  }));
615
592
  }
@@ -710,8 +687,8 @@ export class AdminApiClient {
710
687
  const response = await this.httpClient.get(`/admin-api/groups/${groupId}/contexts/${contextId}/metadata`);
711
688
  return response?.data ?? null;
712
689
  }
713
- async syncGroup(groupId, request) {
714
- return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/sync`, request ?? {}));
690
+ async syncGroup(groupId) {
691
+ return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/sync`, {}));
715
692
  }
716
693
  async upgradeGroup(groupId, request) {
717
694
  return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/upgrade`, request));
@@ -733,8 +710,8 @@ export class AdminApiClient {
733
710
  const id = encodeURIComponent(namespaceId);
734
711
  return unwrap(await this.httpClient.get(`/admin-api/groups/${id}/cascade-status`));
735
712
  }
736
- async retryGroupUpgrade(groupId, request) {
737
- return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/upgrade/retry`, request ?? {}));
713
+ async retryGroupUpgrade(groupId) {
714
+ return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/upgrade/retry`, {}));
738
715
  }
739
716
  /** Move `childGroupId` under `request.newParentId`. */
740
717
  async reparentGroup(childGroupId, request) {
@@ -746,8 +723,8 @@ export class AdminApiClient {
746
723
  const response = await this.httpClient.get(`/admin-api/groups/${groupId}/subgroups`);
747
724
  return response.subgroups ?? response.data ?? [];
748
725
  }
749
- async detachContextFromGroup(groupId, contextId, request) {
750
- await this.httpClient.post(`/admin-api/groups/${groupId}/contexts/${contextId}/remove`, request ?? {});
726
+ async detachContextFromGroup(groupId, contextId) {
727
+ await this.httpClient.post(`/admin-api/groups/${groupId}/contexts/${contextId}/remove`, {});
751
728
  }
752
729
  // ---- Group Invitation & Join ----
753
730
  async createGroupInvitation(groupId, request) {
@@ -788,34 +765,27 @@ export class AdminApiClient {
788
765
  // ---- Group / context / namespace membership ----
789
766
  /** Create a standalone group (POST /admin-api/groups). */
790
767
  async createGroup(request) {
791
- // `upgradePolicy` for the same reason as `createNamespace` above — these are
792
- // the only two requests a released node still requires it on, and it ignores
793
- // the extra key once the concept is gone. Spread after the caller's request
794
- // so an explicit value wins.
795
- return unwrap(await this.httpClient.post('/admin-api/groups', {
796
- upgradePolicy: 'LazyOnAccess',
797
- ...request,
798
- }));
768
+ return unwrap(await this.httpClient.post('/admin-api/groups', request));
799
769
  }
800
770
  /** Leave a group (POST /admin-api/groups/:group_id/leave). */
801
- async leaveGroup(groupId, request) {
802
- await this.httpClient.post(`/admin-api/groups/${groupId}/leave`, request ?? {});
771
+ async leaveGroup(groupId) {
772
+ await this.httpClient.post(`/admin-api/groups/${groupId}/leave`, {});
803
773
  }
804
774
  /** Leave a context (POST /admin-api/contexts/:context_id/leave). */
805
- async leaveContext(contextId, request) {
806
- await this.httpClient.post(`/admin-api/contexts/${contextId}/leave`, request ?? {});
775
+ async leaveContext(contextId) {
776
+ await this.httpClient.post(`/admin-api/contexts/${contextId}/leave`, {});
807
777
  }
808
778
  /** Leave a namespace (POST /admin-api/namespaces/:namespace_id/leave). */
809
- async leaveNamespace(namespaceId, request) {
810
- await this.httpClient.post(`/admin-api/namespaces/${namespaceId}/leave`, request ?? {});
779
+ async leaveNamespace(namespaceId) {
780
+ await this.httpClient.post(`/admin-api/namespaces/${namespaceId}/leave`, {});
811
781
  }
812
782
  /** Issue a group ownership proof (POST /admin-api/groups/:group_id/issue-ownership-proof). */
813
783
  async issueOwnershipProof(groupId, request) {
814
- return this.httpClient.post(`/admin-api/groups/${groupId}/issue-ownership-proof`, request ?? {});
784
+ return this.httpClient.post(`/admin-api/groups/${groupId}/issue-ownership-proof`, request);
815
785
  }
816
786
  /** Issue a namespace ownership proof (POST /admin-api/groups/:group_id/issue-namespace-ownership-proof). */
817
787
  async issueNamespaceOwnershipProof(groupId, request) {
818
- return this.httpClient.post(`/admin-api/groups/${groupId}/issue-namespace-ownership-proof`, request ?? {});
788
+ return this.httpClient.post(`/admin-api/groups/${groupId}/issue-namespace-ownership-proof`, request);
819
789
  }
820
790
  /**
821
791
  * Set a member's auto-follow flag (PUT
@@ -829,7 +799,7 @@ export class AdminApiClient {
829
799
  await this.httpClient.put(`/admin-api/groups/${groupId}/members/${identity}/auto-follow`, request);
830
800
  }
831
801
  /** Abort a namespace migration (POST /admin-api/groups/:namespace_id/migration/abort). */
832
- async abortMigration(namespaceId, request) {
833
- return this.httpClient.post(`/admin-api/groups/${namespaceId}/migration/abort`, request ?? {});
802
+ async abortMigration(namespaceId) {
803
+ return this.httpClient.post(`/admin-api/groups/${namespaceId}/migration/abort`, {});
834
804
  }
835
805
  }
@@ -110,9 +110,6 @@ export interface CreateContextResponseData {
110
110
  groupId?: string;
111
111
  groupCreated?: boolean;
112
112
  }
113
- export interface DeleteContextRequest {
114
- requester?: string;
115
- }
116
113
  export interface DeleteContextResponseData {
117
114
  isDeleted: boolean;
118
115
  }
@@ -480,14 +477,10 @@ export interface CreateNamespaceRequest {
480
477
  export interface CreateNamespaceResponseData {
481
478
  namespaceId: string;
482
479
  }
483
- export interface DeleteNamespaceRequest {
484
- requester?: string;
485
- }
486
480
  export interface DeleteNamespaceResponseData {
487
481
  isDeleted: boolean;
488
482
  }
489
483
  export interface CreateNamespaceInvitationRequest {
490
- requester?: string;
491
484
  expirationTimestamp?: number;
492
485
  recursive?: boolean;
493
486
  }
@@ -532,8 +525,9 @@ export interface JoinNamespaceResponseData {
532
525
  memberAccount: string;
533
526
  }
534
527
  export interface CreateGroupInNamespaceRequest {
535
- groupId?: string;
536
- name?: string;
528
+ groupName?: string;
529
+ /** Subgroup visibility at birth. Absent means `'restricted'`. */
530
+ visibility?: 'open' | 'restricted';
537
531
  }
538
532
  export interface CreateGroupInNamespaceResponseData {
539
533
  groupId: string;
@@ -1001,9 +995,6 @@ export interface GroupContextEntry {
1001
995
  name?: string;
1002
996
  }
1003
997
  export type ListGroupContextsResponseData = GroupContextEntry[];
1004
- export interface DeleteGroupRequest {
1005
- requester?: string;
1006
- }
1007
998
  export interface DeleteGroupResponseData {
1008
999
  isDeleted: boolean;
1009
1000
  }
@@ -1021,7 +1012,6 @@ export interface GroupMemberInput {
1021
1012
  }
1022
1013
  export interface AddGroupMembersRequest {
1023
1014
  members: GroupMemberInput[];
1024
- requester?: string;
1025
1015
  }
1026
1016
  export type AddGroupMembersResponseData = Record<string, never>;
1027
1017
  export interface RemoveGroupMembersRequest {
@@ -1031,12 +1021,10 @@ export interface RemoveGroupMembersRequest {
1031
1021
  * {@link GroupMemberInput.identity} took to add them.
1032
1022
  */
1033
1023
  members: string[];
1034
- requester?: string;
1035
1024
  }
1036
1025
  export type RemoveGroupMembersResponseData = Record<string, never>;
1037
1026
  export interface UpdateMemberRoleRequest {
1038
1027
  role: string;
1039
- requester?: string;
1040
1028
  }
1041
1029
  export type UpdateMemberRoleResponseData = Record<string, never>;
1042
1030
  export interface MemberCapabilities {
@@ -1044,17 +1032,21 @@ export interface MemberCapabilities {
1044
1032
  }
1045
1033
  export interface SetMemberCapabilitiesRequest {
1046
1034
  capabilities: number;
1047
- requester?: string;
1048
1035
  }
1049
1036
  export type SetMemberCapabilitiesResponseData = Record<string, never>;
1050
1037
  export interface SetDefaultCapabilitiesRequest {
1051
1038
  defaultCapabilities: number;
1052
- requester?: string;
1053
1039
  }
1054
1040
  export type SetDefaultCapabilitiesResponseData = Record<string, never>;
1041
+ export interface SetMemberAutoFollowRequest {
1042
+ /** Auto-join contexts registered in this group. */
1043
+ autoFollowContexts: boolean;
1044
+ /** Self-admit into subgroups nested under this group. */
1045
+ autoFollowSubgroups: boolean;
1046
+ }
1047
+ export type SetMemberAutoFollowResponseData = Record<string, never>;
1055
1048
  export interface SetSubgroupVisibilityRequest {
1056
1049
  subgroupVisibility: string;
1057
- requester?: string;
1058
1050
  }
1059
1051
  export type SetSubgroupVisibilityResponseData = Record<string, never>;
1060
1052
  export interface SetTeeAdmissionPolicyRequest {
@@ -1065,7 +1057,6 @@ export interface SetTeeAdmissionPolicyRequest {
1065
1057
  allowedRtmr3: string[];
1066
1058
  allowedTcbStatuses: string[];
1067
1059
  acceptMock: boolean;
1068
- requester?: string;
1069
1060
  }
1070
1061
  export type SetTeeAdmissionPolicyResponseData = Record<string, never>;
1071
1062
  export interface GetTeeAdmissionPolicyResponseData {
@@ -1102,7 +1093,6 @@ export interface MetadataRecord {
1102
1093
  export interface SetMetadataRequest {
1103
1094
  name?: string;
1104
1095
  data?: Record<string, string>;
1105
- requester?: string;
1106
1096
  }
1107
1097
  export type SetGroupMetadataRequest = SetMetadataRequest;
1108
1098
  export type SetMemberMetadataRequest = SetMetadataRequest;
@@ -1115,9 +1105,6 @@ export type SetMetadataResponseData = Record<string, never>;
1115
1105
  export interface GetMetadataResponseData {
1116
1106
  data: MetadataRecord | null;
1117
1107
  }
1118
- export interface SyncGroupRequest {
1119
- requester?: string;
1120
- }
1121
1108
  export interface SyncGroupResponseData {
1122
1109
  groupId: string;
1123
1110
  appKey: string;
@@ -1127,7 +1114,6 @@ export interface SyncGroupResponseData {
1127
1114
  }
1128
1115
  export interface UpgradeGroupRequest {
1129
1116
  targetApplicationId: string;
1130
- requester?: string;
1131
1117
  /** Fan the upgrade out to every descendant subgroup running the same app
1132
1118
  * (one atomic cascade op). Without it the upgrade applies to the target
1133
1119
  * group only - members' subgroups never learn the migration. Server
@@ -1148,24 +1134,41 @@ export interface UpgradeGroupResponseData {
1148
1134
  localContextsFailed?: number;
1149
1135
  }
1150
1136
  export type GroupUpgradeStatusResponseData = GroupUpgradeStatus | null;
1151
- export interface RetryGroupUpgradeRequest {
1152
- requester?: string;
1153
- }
1154
1137
  export type RetryGroupUpgradeResponseData = UpgradeGroupResponseData;
1155
1138
  export interface ReparentGroupRequest {
1156
1139
  /** 64-char id of the destination parent group. */
1157
1140
  newParentId: string;
1158
- requester?: string;
1159
1141
  }
1160
1142
  export interface ReparentGroupResponseData {
1161
1143
  reparented: boolean;
1162
1144
  }
1163
- export interface DetachContextFromGroupRequest {
1164
- requester?: string;
1165
- }
1166
1145
  export type DetachContextFromGroupResponseData = Record<string, never>;
1146
+ export interface IssueOwnershipProofRequest {
1147
+ /** Who the proof is for. Non-empty, <= 256 characters. */
1148
+ audience: string;
1149
+ /** 64-hex context id the proof is scoped to. */
1150
+ contextId: string;
1151
+ /** What is being claimed. Non-empty, <= 512 characters. */
1152
+ subject: string;
1153
+ /** Caller-chosen hex nonce, 32-128 characters (even length). */
1154
+ nonce: string;
1155
+ /** Requested expiry, unix ms. Core clamps it to issue time + 5 minutes. */
1156
+ expiresAtMs: number;
1157
+ }
1158
+ /** Namespace-scoped sibling: identical minus `contextId`. */
1159
+ export type IssueNamespaceOwnershipProofRequest = Omit<IssueOwnershipProofRequest, 'contextId'>;
1160
+ export interface IssueOwnershipProofResponseData {
1161
+ /** Hex 32-byte ed25519 public key of the signer. */
1162
+ signerPublicKey: string;
1163
+ /**
1164
+ * Base64 opaque UTF-8 JSON bytes of the claim. Verifiers re-parse these exact
1165
+ * bytes and sign over `"calimero.ownership-claim.v1\0" || signedPayload`.
1166
+ */
1167
+ signedPayload: string;
1168
+ /** Base64 64-byte ed25519 signature. */
1169
+ signature: string;
1170
+ }
1167
1171
  export interface CreateGroupInvitationRequest {
1168
- requester?: string;
1169
1172
  expirationTimestamp?: number;
1170
1173
  recursive?: boolean;
1171
1174
  /**