@calimero-network/mero-js 18.1.0 → 18.2.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/admin-api/admin-client.d.ts +15 -17
- package/dist/admin-api/admin-client.js +27 -57
- package/dist/admin-api/admin-types.d.ts +43 -34
- package/dist/index.browser.mjs +2 -2
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +26 -41
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +26 -41
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
|
@@ -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,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
349
|
+
leaveGroup(groupId: string): Promise<void>;
|
|
352
350
|
/** Leave a context (POST /admin-api/contexts/:context_id/leave). */
|
|
353
|
-
leaveContext(contextId: string
|
|
351
|
+
leaveContext(contextId: string): Promise<void>;
|
|
354
352
|
/** Leave a namespace (POST /admin-api/namespaces/:namespace_id/leave). */
|
|
355
|
-
leaveNamespace(namespaceId: string
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
439
|
-
// Core requires `Content-Type: application/json` on this DELETE even
|
|
440
|
-
// body is empty, so
|
|
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:
|
|
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
|
|
608
|
-
// Core requires `Content-Type: application/json` on this DELETE even
|
|
609
|
-
//
|
|
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:
|
|
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
|
|
714
|
-
return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/sync`,
|
|
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
|
|
737
|
-
return unwrap(await this.httpClient.post(`/admin-api/groups/${groupId}/upgrade/retry`,
|
|
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
|
|
750
|
-
await this.httpClient.post(`/admin-api/groups/${groupId}/contexts/${contextId}/remove`,
|
|
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
|
-
|
|
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
|
|
802
|
-
await this.httpClient.post(`/admin-api/groups/${groupId}/leave`,
|
|
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
|
|
806
|
-
await this.httpClient.post(`/admin-api/contexts/${contextId}/leave`,
|
|
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
|
|
810
|
-
await this.httpClient.post(`/admin-api/namespaces/${namespaceId}/leave`,
|
|
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
|
|
833
|
-
return this.httpClient.post(`/admin-api/groups/${namespaceId}/migration/abort`,
|
|
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
|
-
|
|
536
|
-
|
|
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;
|
|
@@ -914,9 +908,15 @@ export interface MemberMigrationReport {
|
|
|
914
908
|
migrationFailed?: MigrationFailureReason;
|
|
915
909
|
}
|
|
916
910
|
export interface MemberMigrationStatusEntry {
|
|
911
|
+
/** The reporting device's signing KEY, bs58. One account with two devices
|
|
912
|
+
* appears as two rows: the cohort is replicas, not people. */
|
|
917
913
|
peer: string;
|
|
918
|
-
/**
|
|
919
|
-
|
|
914
|
+
/** The ACCOUNT `peer` speaks for, 64 hex - join it to `listGroupMembers` to
|
|
915
|
+
* name a person. Absent from nodes predating the field. */
|
|
916
|
+
account?: string;
|
|
917
|
+
/** Freshest reported facts. Omitted (not `null`) when the member's state is
|
|
918
|
+
* `unknown`, so test falsiness rather than `=== null`. */
|
|
919
|
+
report?: MemberMigrationReport | null;
|
|
920
920
|
state: MemberMigrationState;
|
|
921
921
|
}
|
|
922
922
|
export interface MigrationStatusRollup {
|
|
@@ -1001,9 +1001,6 @@ export interface GroupContextEntry {
|
|
|
1001
1001
|
name?: string;
|
|
1002
1002
|
}
|
|
1003
1003
|
export type ListGroupContextsResponseData = GroupContextEntry[];
|
|
1004
|
-
export interface DeleteGroupRequest {
|
|
1005
|
-
requester?: string;
|
|
1006
|
-
}
|
|
1007
1004
|
export interface DeleteGroupResponseData {
|
|
1008
1005
|
isDeleted: boolean;
|
|
1009
1006
|
}
|
|
@@ -1021,7 +1018,6 @@ export interface GroupMemberInput {
|
|
|
1021
1018
|
}
|
|
1022
1019
|
export interface AddGroupMembersRequest {
|
|
1023
1020
|
members: GroupMemberInput[];
|
|
1024
|
-
requester?: string;
|
|
1025
1021
|
}
|
|
1026
1022
|
export type AddGroupMembersResponseData = Record<string, never>;
|
|
1027
1023
|
export interface RemoveGroupMembersRequest {
|
|
@@ -1031,12 +1027,10 @@ export interface RemoveGroupMembersRequest {
|
|
|
1031
1027
|
* {@link GroupMemberInput.identity} took to add them.
|
|
1032
1028
|
*/
|
|
1033
1029
|
members: string[];
|
|
1034
|
-
requester?: string;
|
|
1035
1030
|
}
|
|
1036
1031
|
export type RemoveGroupMembersResponseData = Record<string, never>;
|
|
1037
1032
|
export interface UpdateMemberRoleRequest {
|
|
1038
1033
|
role: string;
|
|
1039
|
-
requester?: string;
|
|
1040
1034
|
}
|
|
1041
1035
|
export type UpdateMemberRoleResponseData = Record<string, never>;
|
|
1042
1036
|
export interface MemberCapabilities {
|
|
@@ -1044,17 +1038,21 @@ export interface MemberCapabilities {
|
|
|
1044
1038
|
}
|
|
1045
1039
|
export interface SetMemberCapabilitiesRequest {
|
|
1046
1040
|
capabilities: number;
|
|
1047
|
-
requester?: string;
|
|
1048
1041
|
}
|
|
1049
1042
|
export type SetMemberCapabilitiesResponseData = Record<string, never>;
|
|
1050
1043
|
export interface SetDefaultCapabilitiesRequest {
|
|
1051
1044
|
defaultCapabilities: number;
|
|
1052
|
-
requester?: string;
|
|
1053
1045
|
}
|
|
1054
1046
|
export type SetDefaultCapabilitiesResponseData = Record<string, never>;
|
|
1047
|
+
export interface SetMemberAutoFollowRequest {
|
|
1048
|
+
/** Auto-join contexts registered in this group. */
|
|
1049
|
+
autoFollowContexts: boolean;
|
|
1050
|
+
/** Self-admit into subgroups nested under this group. */
|
|
1051
|
+
autoFollowSubgroups: boolean;
|
|
1052
|
+
}
|
|
1053
|
+
export type SetMemberAutoFollowResponseData = Record<string, never>;
|
|
1055
1054
|
export interface SetSubgroupVisibilityRequest {
|
|
1056
1055
|
subgroupVisibility: string;
|
|
1057
|
-
requester?: string;
|
|
1058
1056
|
}
|
|
1059
1057
|
export type SetSubgroupVisibilityResponseData = Record<string, never>;
|
|
1060
1058
|
export interface SetTeeAdmissionPolicyRequest {
|
|
@@ -1065,7 +1063,6 @@ export interface SetTeeAdmissionPolicyRequest {
|
|
|
1065
1063
|
allowedRtmr3: string[];
|
|
1066
1064
|
allowedTcbStatuses: string[];
|
|
1067
1065
|
acceptMock: boolean;
|
|
1068
|
-
requester?: string;
|
|
1069
1066
|
}
|
|
1070
1067
|
export type SetTeeAdmissionPolicyResponseData = Record<string, never>;
|
|
1071
1068
|
export interface GetTeeAdmissionPolicyResponseData {
|
|
@@ -1102,7 +1099,6 @@ export interface MetadataRecord {
|
|
|
1102
1099
|
export interface SetMetadataRequest {
|
|
1103
1100
|
name?: string;
|
|
1104
1101
|
data?: Record<string, string>;
|
|
1105
|
-
requester?: string;
|
|
1106
1102
|
}
|
|
1107
1103
|
export type SetGroupMetadataRequest = SetMetadataRequest;
|
|
1108
1104
|
export type SetMemberMetadataRequest = SetMetadataRequest;
|
|
@@ -1115,9 +1111,6 @@ export type SetMetadataResponseData = Record<string, never>;
|
|
|
1115
1111
|
export interface GetMetadataResponseData {
|
|
1116
1112
|
data: MetadataRecord | null;
|
|
1117
1113
|
}
|
|
1118
|
-
export interface SyncGroupRequest {
|
|
1119
|
-
requester?: string;
|
|
1120
|
-
}
|
|
1121
1114
|
export interface SyncGroupResponseData {
|
|
1122
1115
|
groupId: string;
|
|
1123
1116
|
appKey: string;
|
|
@@ -1127,7 +1120,6 @@ export interface SyncGroupResponseData {
|
|
|
1127
1120
|
}
|
|
1128
1121
|
export interface UpgradeGroupRequest {
|
|
1129
1122
|
targetApplicationId: string;
|
|
1130
|
-
requester?: string;
|
|
1131
1123
|
/** Fan the upgrade out to every descendant subgroup running the same app
|
|
1132
1124
|
* (one atomic cascade op). Without it the upgrade applies to the target
|
|
1133
1125
|
* group only - members' subgroups never learn the migration. Server
|
|
@@ -1148,24 +1140,41 @@ export interface UpgradeGroupResponseData {
|
|
|
1148
1140
|
localContextsFailed?: number;
|
|
1149
1141
|
}
|
|
1150
1142
|
export type GroupUpgradeStatusResponseData = GroupUpgradeStatus | null;
|
|
1151
|
-
export interface RetryGroupUpgradeRequest {
|
|
1152
|
-
requester?: string;
|
|
1153
|
-
}
|
|
1154
1143
|
export type RetryGroupUpgradeResponseData = UpgradeGroupResponseData;
|
|
1155
1144
|
export interface ReparentGroupRequest {
|
|
1156
1145
|
/** 64-char id of the destination parent group. */
|
|
1157
1146
|
newParentId: string;
|
|
1158
|
-
requester?: string;
|
|
1159
1147
|
}
|
|
1160
1148
|
export interface ReparentGroupResponseData {
|
|
1161
1149
|
reparented: boolean;
|
|
1162
1150
|
}
|
|
1163
|
-
export interface DetachContextFromGroupRequest {
|
|
1164
|
-
requester?: string;
|
|
1165
|
-
}
|
|
1166
1151
|
export type DetachContextFromGroupResponseData = Record<string, never>;
|
|
1152
|
+
export interface IssueOwnershipProofRequest {
|
|
1153
|
+
/** Who the proof is for. Non-empty, <= 256 characters. */
|
|
1154
|
+
audience: string;
|
|
1155
|
+
/** 64-hex context id the proof is scoped to. */
|
|
1156
|
+
contextId: string;
|
|
1157
|
+
/** What is being claimed. Non-empty, <= 512 characters. */
|
|
1158
|
+
subject: string;
|
|
1159
|
+
/** Caller-chosen hex nonce, 32-128 characters (even length). */
|
|
1160
|
+
nonce: string;
|
|
1161
|
+
/** Requested expiry, unix ms. Core clamps it to issue time + 5 minutes. */
|
|
1162
|
+
expiresAtMs: number;
|
|
1163
|
+
}
|
|
1164
|
+
/** Namespace-scoped sibling: identical minus `contextId`. */
|
|
1165
|
+
export type IssueNamespaceOwnershipProofRequest = Omit<IssueOwnershipProofRequest, 'contextId'>;
|
|
1166
|
+
export interface IssueOwnershipProofResponseData {
|
|
1167
|
+
/** Hex 32-byte ed25519 public key of the signer. */
|
|
1168
|
+
signerPublicKey: string;
|
|
1169
|
+
/**
|
|
1170
|
+
* Base64 opaque UTF-8 JSON bytes of the claim. Verifiers re-parse these exact
|
|
1171
|
+
* bytes and sign over `"calimero.ownership-claim.v1\0" || signedPayload`.
|
|
1172
|
+
*/
|
|
1173
|
+
signedPayload: string;
|
|
1174
|
+
/** Base64 64-byte ed25519 signature. */
|
|
1175
|
+
signature: string;
|
|
1176
|
+
}
|
|
1167
1177
|
export interface CreateGroupInvitationRequest {
|
|
1168
|
-
requester?: string;
|
|
1169
1178
|
expirationTimestamp?: number;
|
|
1170
1179
|
recursive?: boolean;
|
|
1171
1180
|
/**
|