@hypercerts-org/sdk-core 0.10.0-beta.3 → 0.10.0-beta.4
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 +16 -0
- package/README.md +5 -0
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +29 -13
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +29 -13
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1480,6 +1480,22 @@ interface CreateHypercertParams {
|
|
|
1480
1480
|
*/
|
|
1481
1481
|
onProgress?: (step: ProgressStep) => void;
|
|
1482
1482
|
}
|
|
1483
|
+
interface CreateOrganizationParams {
|
|
1484
|
+
/**
|
|
1485
|
+
* Name of the organization
|
|
1486
|
+
*/
|
|
1487
|
+
name: string;
|
|
1488
|
+
/**
|
|
1489
|
+
* The handle of the organization without attaching the SDS domain
|
|
1490
|
+
*
|
|
1491
|
+
* @example: "gainforest" for "gainforest.sds.hypercerts.org"
|
|
1492
|
+
*/
|
|
1493
|
+
handlePrefix: string;
|
|
1494
|
+
/**
|
|
1495
|
+
* Optional description of the organization
|
|
1496
|
+
*/
|
|
1497
|
+
description?: string;
|
|
1498
|
+
}
|
|
1483
1499
|
/**
|
|
1484
1500
|
* Result of creating a hypercert.
|
|
1485
1501
|
*
|
|
@@ -2051,6 +2067,16 @@ interface HypercertOperations extends EventEmitter<HypercertEvents> {
|
|
|
2051
2067
|
* await repo.collaborators.revoke({ userDid: "did:plc:former-user" });
|
|
2052
2068
|
* ```
|
|
2053
2069
|
*/
|
|
2070
|
+
interface GrantAccessParams {
|
|
2071
|
+
/**
|
|
2072
|
+
* DID of the user to grant access to
|
|
2073
|
+
*/
|
|
2074
|
+
userDid: string;
|
|
2075
|
+
/**
|
|
2076
|
+
* Role to assign
|
|
2077
|
+
*/
|
|
2078
|
+
role: RepositoryRole;
|
|
2079
|
+
}
|
|
2054
2080
|
interface CollaboratorOperations {
|
|
2055
2081
|
/**
|
|
2056
2082
|
* Grants repository access to a user.
|
|
@@ -2059,10 +2085,7 @@ interface CollaboratorOperations {
|
|
|
2059
2085
|
* @param params.userDid - DID of the user to grant access to
|
|
2060
2086
|
* @param params.role - Role to assign
|
|
2061
2087
|
*/
|
|
2062
|
-
grant(params:
|
|
2063
|
-
userDid: string;
|
|
2064
|
-
role: RepositoryRole;
|
|
2065
|
-
}): Promise<void>;
|
|
2088
|
+
grant(params: GrantAccessParams): Promise<void>;
|
|
2066
2089
|
/**
|
|
2067
2090
|
* Revokes repository access from a user.
|
|
2068
2091
|
*
|
|
@@ -2144,17 +2167,10 @@ interface OrganizationOperations {
|
|
|
2144
2167
|
/**
|
|
2145
2168
|
* Creates a new organization.
|
|
2146
2169
|
*
|
|
2147
|
-
* @param params - Organization parameters
|
|
2148
|
-
* @param params.name - Organization name
|
|
2149
|
-
* @param params.description - Optional description
|
|
2150
|
-
* @param params.handle - Optional custom handle
|
|
2170
|
+
* @param params - Organization creation parameters
|
|
2151
2171
|
* @returns Promise resolving to organization info
|
|
2152
2172
|
*/
|
|
2153
|
-
create(params:
|
|
2154
|
-
name: string;
|
|
2155
|
-
description?: string;
|
|
2156
|
-
handle?: string;
|
|
2157
|
-
}): Promise<OrganizationInfo>;
|
|
2173
|
+
create(params: CreateOrganizationParams): Promise<OrganizationInfo>;
|
|
2158
2174
|
/**
|
|
2159
2175
|
* Gets an organization by DID.
|
|
2160
2176
|
*
|
package/package.json
CHANGED