@hypercerts-org/sdk-core 0.10.0-beta.2 → 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/dist/types.d.ts CHANGED
@@ -1360,22 +1360,27 @@ interface CreateHypercertParams {
1360
1360
  description: string;
1361
1361
  /**
1362
1362
  * Scope of work or impact area.
1363
+ * Logical scope of the work using label-based conditions. All labels in `withinAllOf` must apply; at least one label in `withinAnyOf` must apply if provided; no label in `withinNoneOf` may apply.
1363
1364
  *
1364
1365
  * @example "Climate Action", "Education", "Healthcare"
1365
1366
  */
1366
- workScope: string;
1367
+ workScope?: {
1368
+ withinAllOf?: string[];
1369
+ withinAnyOf?: string[];
1370
+ withinNoneOf?: string[];
1371
+ };
1367
1372
  /**
1368
1373
  * Start date of the work period.
1369
1374
  *
1370
1375
  * ISO 8601 date format (YYYY-MM-DD).
1371
1376
  */
1372
- workTimeFrameFrom: string;
1377
+ startDate: string;
1373
1378
  /**
1374
1379
  * End date of the work period.
1375
1380
  *
1376
1381
  * ISO 8601 date format (YYYY-MM-DD).
1377
1382
  */
1378
- workTimeFrameTo: string;
1383
+ endDate: string;
1379
1384
  /**
1380
1385
  * Rights associated with the hypercert.
1381
1386
  */
@@ -1475,6 +1480,22 @@ interface CreateHypercertParams {
1475
1480
  */
1476
1481
  onProgress?: (step: ProgressStep) => void;
1477
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
+ }
1478
1499
  /**
1479
1500
  * Result of creating a hypercert.
1480
1501
  *
@@ -2046,6 +2067,16 @@ interface HypercertOperations extends EventEmitter<HypercertEvents> {
2046
2067
  * await repo.collaborators.revoke({ userDid: "did:plc:former-user" });
2047
2068
  * ```
2048
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
+ }
2049
2080
  interface CollaboratorOperations {
2050
2081
  /**
2051
2082
  * Grants repository access to a user.
@@ -2054,10 +2085,7 @@ interface CollaboratorOperations {
2054
2085
  * @param params.userDid - DID of the user to grant access to
2055
2086
  * @param params.role - Role to assign
2056
2087
  */
2057
- grant(params: {
2058
- userDid: string;
2059
- role: RepositoryRole;
2060
- }): Promise<void>;
2088
+ grant(params: GrantAccessParams): Promise<void>;
2061
2089
  /**
2062
2090
  * Revokes repository access from a user.
2063
2091
  *
@@ -2139,17 +2167,10 @@ interface OrganizationOperations {
2139
2167
  /**
2140
2168
  * Creates a new organization.
2141
2169
  *
2142
- * @param params - Organization parameters
2143
- * @param params.name - Organization name
2144
- * @param params.description - Optional description
2145
- * @param params.handle - Optional custom handle
2170
+ * @param params - Organization creation parameters
2146
2171
  * @returns Promise resolving to organization info
2147
2172
  */
2148
- create(params: {
2149
- name: string;
2150
- description?: string;
2151
- handle?: string;
2152
- }): Promise<OrganizationInfo>;
2173
+ create(params: CreateOrganizationParams): Promise<OrganizationInfo>;
2153
2174
  /**
2154
2175
  * Gets an organization by DID.
2155
2176
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypercerts-org/sdk-core",
3
- "version": "0.10.0-beta.2",
3
+ "version": "0.10.0-beta.4",
4
4
  "description": "Framework-agnostic ATProto SDK core for authentication, repository operations, and lexicon management",
5
5
  "main": "dist/index.cjs",
6
6
  "repository": {