@hypercerts-org/sdk-core 0.10.0-beta.5 → 0.10.0-beta.6
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 +73 -0
- package/README.md +178 -39
- package/dist/index.cjs +393 -268
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +197 -149
- package/dist/index.mjs +393 -268
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +197 -148
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ import { LexiconDoc as LexiconDoc$1, Lexicons } from '@atproto/lexicon';
|
|
|
4
4
|
export { BlobRef, JsonBlobRef } from '@atproto/lexicon';
|
|
5
5
|
import { Agent } from '@atproto/api';
|
|
6
6
|
import { EventEmitter } from 'eventemitter3';
|
|
7
|
-
import {
|
|
7
|
+
import { OverrideProperties, SetOptional } from 'type-fest';
|
|
8
|
+
import { ComAtprotoRepoStrongRef, AppCertifiedLocation, OrgHypercertsClaimActivity, OrgHypercertsClaimCollection, OrgHypercertsClaimRights, OrgHypercertsClaimContributionDetails, OrgHypercertsClaimContributorInformation, OrgHypercertsClaimMeasurement, OrgHypercertsClaimEvaluation, OrgHypercertsHelperWorkScopeTag, AppCertifiedBadgeAward, AppCertifiedBadgeDefinition, AppCertifiedBadgeResponse, OrgHypercertsFundingReceipt, OrgHypercertsClaimEvidence, OrgHypercertsDefs } from '@hypercerts-org/lexicon';
|
|
8
9
|
export { AppCertifiedBadgeAward, AppCertifiedBadgeDefinition, AppCertifiedBadgeResponse, AppCertifiedDefs, AppCertifiedLocation, ComAtprotoRepoStrongRef, HYPERCERTS_LEXICON_DOC, HYPERCERTS_LEXICON_JSON, HYPERCERTS_NSIDS, HYPERCERTS_NSIDS_BY_TYPE, HYPERCERTS_SCHEMAS, HYPERCERTS_SCHEMA_DICT, OrgHypercertsClaimActivity, OrgHypercertsClaimCollection, OrgHypercertsClaimContributionDetails, OrgHypercertsClaimContributorInformation, OrgHypercertsClaimEvaluation, OrgHypercertsClaimEvidence, OrgHypercertsClaimMeasurement, OrgHypercertsClaimRights, OrgHypercertsDefs, OrgHypercertsFundingReceipt, OrgHypercertsHelperWorkScopeTag, lexicons, validate } from '@hypercerts-org/lexicon';
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -1218,85 +1219,118 @@ type FundingReceipt = OrgHypercertsFundingReceipt.Main;
|
|
|
1218
1219
|
/**
|
|
1219
1220
|
* Image input for SDK operations.
|
|
1220
1221
|
*
|
|
1221
|
-
*
|
|
1222
|
-
* - A URI reference (for external images)
|
|
1223
|
-
* - A Blob to be uploaded
|
|
1222
|
+
* Accepts either:
|
|
1223
|
+
* - A string URI reference (for external images)
|
|
1224
|
+
* - A Blob to be uploaded (will be converted to SmallImage or LargeImage)
|
|
1224
1225
|
*
|
|
1225
|
-
* The SDK will convert these to the appropriate lexicon types
|
|
1226
|
-
* - OrgHypercertsDefs.Uri
|
|
1227
|
-
* - OrgHypercertsDefs.SmallImage
|
|
1228
|
-
* - OrgHypercertsDefs.LargeImage
|
|
1226
|
+
* The SDK will convert these inputs to the appropriate lexicon types.
|
|
1229
1227
|
*/
|
|
1230
|
-
type HypercertImage =
|
|
1231
|
-
type: "uri";
|
|
1232
|
-
uri: string;
|
|
1233
|
-
} | {
|
|
1234
|
-
type: "blob";
|
|
1235
|
-
blob: Blob;
|
|
1236
|
-
};
|
|
1228
|
+
type HypercertImage = string | Blob;
|
|
1237
1229
|
/**
|
|
1238
1230
|
* Lexicon-defined image types (union of Uri and image blob types).
|
|
1239
|
-
*
|
|
1231
|
+
*
|
|
1232
|
+
* Used when working with stored records. Can be:
|
|
1233
|
+
* - OrgHypercertsDefs.Uri - External image reference
|
|
1234
|
+
* - OrgHypercertsDefs.SmallImage - Uploaded blob for avatars/thumbnails
|
|
1235
|
+
* - OrgHypercertsDefs.LargeImage - Uploaded blob for banners/covers
|
|
1240
1236
|
*/
|
|
1241
1237
|
type HypercertImageRecord = OrgHypercertsDefs.Uri | OrgHypercertsDefs.SmallImage | OrgHypercertsDefs.LargeImage;
|
|
1242
|
-
/** Hypercert with
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1238
|
+
/** Hypercert with resolved metadata */
|
|
1239
|
+
type HypercertWithMetadata = HypercertClaim & {
|
|
1240
|
+
resolvedRights?: HypercertRights;
|
|
1241
|
+
resolvedLocation?: HypercertLocation;
|
|
1242
|
+
};
|
|
1243
|
+
/** Project type alias (collection with type="project") */
|
|
1244
|
+
type HypercertProject = HypercertCollection & {
|
|
1245
|
+
type: "project";
|
|
1246
|
+
};
|
|
1247
|
+
/** Project with resolved metadata */
|
|
1248
|
+
type HypercertProjectWithMetadata = HypercertCollection & {
|
|
1249
|
+
resolvedLocation?: HypercertLocation;
|
|
1250
|
+
resolvedActivities?: HypercertClaim[];
|
|
1251
|
+
};
|
|
1252
|
+
|
|
1253
|
+
type CollectionItemInput = SetOptional<OrgHypercertsClaimCollection.Item, "$type">;
|
|
1248
1254
|
/**
|
|
1249
|
-
*
|
|
1255
|
+
* Parameters for specifying a location in collection/project operations.
|
|
1256
|
+
* Supports three ways to specify location:
|
|
1257
|
+
*
|
|
1258
|
+
* 1. **StrongRef** - Direct reference with uri and cid (no record creation)
|
|
1259
|
+
* 2. **AT-URI string** - Reference to existing location record
|
|
1260
|
+
* 3. **Location object** - Full location data (lpVersion, srs, locationType, location, etc.)
|
|
1261
|
+
* with optional `$type` and `createdAt` fields
|
|
1262
|
+
* where-as location field can be a Blob (e.g., GeoJSON) that will be uploaded
|
|
1263
|
+
*
|
|
1264
|
+
* @example Using a StrongRef (no record creation)
|
|
1265
|
+
* ```typescript
|
|
1266
|
+
* const location: AttachLocationParams = { uri: "at://did:plc:test/app.certified.location/abc", cid: "bafyrei..." };
|
|
1267
|
+
* ```
|
|
1268
|
+
*
|
|
1269
|
+
* @example Using an AT-URI (fetches existing record)
|
|
1270
|
+
* ```typescript
|
|
1271
|
+
* const location: AttachLocationParams = "at://did:plc:test/app.certified.location/xyz";
|
|
1272
|
+
* ```
|
|
1273
|
+
*
|
|
1274
|
+
* @example Using a location object
|
|
1275
|
+
* ```typescript
|
|
1276
|
+
* const location: AttachLocationParams = {
|
|
1277
|
+
* lpVersion: "1.0.0",
|
|
1278
|
+
* srs: "EPSG:4326",
|
|
1279
|
+
* locationType: "coordinate-decimal",
|
|
1280
|
+
* location: "https://locationuri.com",
|
|
1281
|
+
* name: "San Francisco",
|
|
1282
|
+
* };
|
|
1283
|
+
* ```
|
|
1250
1284
|
*/
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
}
|
|
1285
|
+
type CreateLocationParams = OverrideProperties<SetOptional<HypercertLocation, "$type" | "createdAt">, {
|
|
1286
|
+
location: string | Blob | HypercertLocation["location"];
|
|
1287
|
+
}>;
|
|
1288
|
+
type LocationParams = StrongRef | string | CreateLocationParams;
|
|
1289
|
+
/**
|
|
1290
|
+
* SDK input parameters for creating a collection.
|
|
1291
|
+
* Derived from lexicon type with $type and createdAt removed.
|
|
1292
|
+
* avatar/banner accept HypercertImage (string URI or Blob) for user convenience.
|
|
1293
|
+
* Location can be provided inline or via attachLocationToCollection().
|
|
1294
|
+
*/
|
|
1295
|
+
type CreateCollectionParams = OverrideProperties<SetOptional<OrgHypercertsClaimCollection.Main, "$type" | "createdAt">, {
|
|
1296
|
+
avatar?: HypercertImage;
|
|
1297
|
+
banner?: HypercertImage;
|
|
1298
|
+
items: CollectionItemInput[];
|
|
1299
|
+
/**
|
|
1300
|
+
* Optional location to attach to the collection.
|
|
1301
|
+
* Can be:
|
|
1302
|
+
* - StrongRef to reference existing location (uri + cid)
|
|
1303
|
+
* - string (AT-URI) to reference existing location (CID will be fetched)
|
|
1304
|
+
* - Location object to create a new location record
|
|
1305
|
+
*/
|
|
1306
|
+
location?: LocationParams;
|
|
1307
|
+
}>;
|
|
1254
1308
|
/**
|
|
1255
|
-
*
|
|
1309
|
+
* SDK input parameters for updating a collection.
|
|
1310
|
+
* All fields are optional.
|
|
1311
|
+
* avatar/banner accept HypercertImage (string URI or Blob), or null to remove.
|
|
1312
|
+
* Location can be updated inline or removed with null.
|
|
1256
1313
|
*/
|
|
1257
|
-
|
|
1314
|
+
type UpdateCollectionParams = Omit<Partial<CreateCollectionParams>, "avatar" | "banner" | "location"> & {
|
|
1315
|
+
avatar?: HypercertImage | null;
|
|
1316
|
+
banner?: HypercertImage | null;
|
|
1317
|
+
location?: LocationParams | null;
|
|
1318
|
+
};
|
|
1319
|
+
type CreateCollectionResult = {
|
|
1258
1320
|
uri: string;
|
|
1259
1321
|
cid: string;
|
|
1260
|
-
record:
|
|
1261
|
-
}
|
|
1322
|
+
record: HypercertCollection;
|
|
1323
|
+
};
|
|
1262
1324
|
/**
|
|
1263
|
-
*
|
|
1325
|
+
* SDK input parameters for creating a project.
|
|
1326
|
+
* Projects are collections with type="project" (set automatically).
|
|
1264
1327
|
*/
|
|
1265
|
-
|
|
1266
|
-
title: string;
|
|
1267
|
-
shortDescription: string;
|
|
1268
|
-
description?: unknown;
|
|
1269
|
-
avatar?: Blob;
|
|
1270
|
-
banner?: Blob;
|
|
1271
|
-
activities?: Array<{
|
|
1272
|
-
uri: string;
|
|
1273
|
-
cid: string;
|
|
1274
|
-
weight: string;
|
|
1275
|
-
}>;
|
|
1276
|
-
location?: {
|
|
1277
|
-
uri: string;
|
|
1278
|
-
cid: string;
|
|
1279
|
-
};
|
|
1280
|
-
}
|
|
1328
|
+
type CreateProjectParams = CreateCollectionParams;
|
|
1281
1329
|
/**
|
|
1282
|
-
*
|
|
1330
|
+
* SDK input parameters for updating a project.
|
|
1283
1331
|
*/
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
shortDescription?: string;
|
|
1287
|
-
description?: unknown;
|
|
1288
|
-
avatar?: Blob;
|
|
1289
|
-
banner?: Blob;
|
|
1290
|
-
activities?: Array<{
|
|
1291
|
-
uri: string;
|
|
1292
|
-
cid: string;
|
|
1293
|
-
weight: string;
|
|
1294
|
-
}>;
|
|
1295
|
-
location?: {
|
|
1296
|
-
uri: string;
|
|
1297
|
-
cid: string;
|
|
1298
|
-
};
|
|
1299
|
-
}
|
|
1332
|
+
type UpdateProjectParams = UpdateCollectionParams;
|
|
1333
|
+
type CreateProjectResult = CreateCollectionResult;
|
|
1300
1334
|
|
|
1301
1335
|
/**
|
|
1302
1336
|
* Parameters for creating a new hypercert.
|
|
@@ -1435,7 +1469,7 @@ interface CreateHypercertParams {
|
|
|
1435
1469
|
/**
|
|
1436
1470
|
* Optional geographic location of the impact.
|
|
1437
1471
|
*/
|
|
1438
|
-
location?:
|
|
1472
|
+
location?: LocationParams;
|
|
1439
1473
|
/**
|
|
1440
1474
|
* Optional list of contributions to the impact.
|
|
1441
1475
|
*
|
|
@@ -1524,49 +1558,6 @@ interface CreateHypercertEvidenceParams {
|
|
|
1524
1558
|
*/
|
|
1525
1559
|
[k: string]: unknown;
|
|
1526
1560
|
}
|
|
1527
|
-
/**
|
|
1528
|
-
* Parameters for attaching a location to a hypercert.
|
|
1529
|
-
*
|
|
1530
|
-
* @example Using a string location
|
|
1531
|
-
* ```typescript
|
|
1532
|
-
* const params: AttachLocationParams = {
|
|
1533
|
-
* lpVersion: "1.0.0",
|
|
1534
|
-
* srs: "EPSG:4326",
|
|
1535
|
-
* locationType: "coordinate-decimal",
|
|
1536
|
-
* location: "https://locationuri.com",
|
|
1537
|
-
* name: "San Francisco",
|
|
1538
|
-
* description: "Project location in SF Bay Area",
|
|
1539
|
-
* };
|
|
1540
|
-
* ```
|
|
1541
|
-
*
|
|
1542
|
-
* @example Using a GeoJSON Blob
|
|
1543
|
-
* ```typescript
|
|
1544
|
-
* const geojsonBlob = new Blob(
|
|
1545
|
-
* [JSON.stringify({ type: "Point", coordinates: [-122.4194, 37.7749] })],
|
|
1546
|
-
* { type: "application/geo+json" }
|
|
1547
|
-
* );
|
|
1548
|
-
* const params: AttachLocationParams = {
|
|
1549
|
-
* lpVersion: "1.0.0",
|
|
1550
|
-
* srs: "EPSG:4326",
|
|
1551
|
-
* locationType: "geojson-point",
|
|
1552
|
-
* location: geojsonBlob,
|
|
1553
|
-
* };
|
|
1554
|
-
* ```
|
|
1555
|
-
*/
|
|
1556
|
-
interface AttachLocationParams {
|
|
1557
|
-
/** The version of the Location Protocol */
|
|
1558
|
-
lpVersion: string;
|
|
1559
|
-
/** The Spatial Reference System URI (e.g., http://www.opengis.net/def/crs/OGC/1.3/CRS84) that defines the coordinate system. */
|
|
1560
|
-
srs: string;
|
|
1561
|
-
/** An identifier for the format of the location data (e.g., coordinate-decimal, geojson-point) */
|
|
1562
|
-
locationType: "coordinate-decimal" | "geojson-point" | (string & {});
|
|
1563
|
-
/** Location data as either a URL string or a GeoJSON Blob */
|
|
1564
|
-
location: string | Blob;
|
|
1565
|
-
/** Optional name for this location */
|
|
1566
|
-
name?: string;
|
|
1567
|
-
/** Optional description for this location */
|
|
1568
|
-
description?: string;
|
|
1569
|
-
}
|
|
1570
1561
|
/**
|
|
1571
1562
|
* Result of creating a hypercert.
|
|
1572
1563
|
*
|
|
@@ -1915,6 +1906,33 @@ interface HypercertEvents {
|
|
|
1915
1906
|
uri: string;
|
|
1916
1907
|
cid: string;
|
|
1917
1908
|
};
|
|
1909
|
+
/**
|
|
1910
|
+
* Emitted when a collection is updated.
|
|
1911
|
+
*/
|
|
1912
|
+
collectionUpdated: {
|
|
1913
|
+
uri: string;
|
|
1914
|
+
cid: string;
|
|
1915
|
+
};
|
|
1916
|
+
/**
|
|
1917
|
+
* Emitted when a collection is deleted.
|
|
1918
|
+
*/
|
|
1919
|
+
collectionDeleted: {
|
|
1920
|
+
uri: string;
|
|
1921
|
+
};
|
|
1922
|
+
/**
|
|
1923
|
+
* Emitted when a location is attached to a collection.
|
|
1924
|
+
*/
|
|
1925
|
+
locationAttachedToCollection: {
|
|
1926
|
+
uri: string;
|
|
1927
|
+
cid: string;
|
|
1928
|
+
collectionUri: string;
|
|
1929
|
+
};
|
|
1930
|
+
/**
|
|
1931
|
+
* Emitted when a location is removed from a collection.
|
|
1932
|
+
*/
|
|
1933
|
+
locationRemovedFromCollection: {
|
|
1934
|
+
collectionUri: string;
|
|
1935
|
+
};
|
|
1918
1936
|
/**
|
|
1919
1937
|
* Emitted when a project is created.
|
|
1920
1938
|
*/
|
|
@@ -1935,6 +1953,20 @@ interface HypercertEvents {
|
|
|
1935
1953
|
projectDeleted: {
|
|
1936
1954
|
uri: string;
|
|
1937
1955
|
};
|
|
1956
|
+
/**
|
|
1957
|
+
* Emitted when a location is attached to a project.
|
|
1958
|
+
*/
|
|
1959
|
+
locationAttachedToProject: {
|
|
1960
|
+
uri: string;
|
|
1961
|
+
cid: string;
|
|
1962
|
+
projectUri: string;
|
|
1963
|
+
};
|
|
1964
|
+
/**
|
|
1965
|
+
* Emitted when a location is removed from a project.
|
|
1966
|
+
*/
|
|
1967
|
+
locationRemovedFromProject: {
|
|
1968
|
+
projectUri: string;
|
|
1969
|
+
};
|
|
1938
1970
|
}
|
|
1939
1971
|
/**
|
|
1940
1972
|
* High-level hypercert operations.
|
|
@@ -1990,7 +2022,7 @@ interface HypercertOperations extends EventEmitter<HypercertEvents> {
|
|
|
1990
2022
|
*/
|
|
1991
2023
|
update(params: {
|
|
1992
2024
|
uri: string;
|
|
1993
|
-
updates: Partial<
|
|
2025
|
+
updates: Partial<CreateHypercertParams>;
|
|
1994
2026
|
image?: Blob | null;
|
|
1995
2027
|
}): Promise<UpdateResult>;
|
|
1996
2028
|
/**
|
|
@@ -2036,7 +2068,7 @@ interface HypercertOperations extends EventEmitter<HypercertEvents> {
|
|
|
2036
2068
|
* @param location.geojson - Optional GeoJSON blob for precise boundaries
|
|
2037
2069
|
* @returns Promise resolving to location record result
|
|
2038
2070
|
*/
|
|
2039
|
-
attachLocation(uri: string, location:
|
|
2071
|
+
attachLocation(uri: string, location: LocationParams): Promise<CreateResult>;
|
|
2040
2072
|
/**
|
|
2041
2073
|
* Adds evidence to an existing hypercert.
|
|
2042
2074
|
*
|
|
@@ -2085,18 +2117,9 @@ interface HypercertOperations extends EventEmitter<HypercertEvents> {
|
|
|
2085
2117
|
* Creates a collection of hypercerts.
|
|
2086
2118
|
*
|
|
2087
2119
|
* @param params - Collection parameters
|
|
2088
|
-
* @returns Promise resolving to collection record result
|
|
2089
|
-
*/
|
|
2090
|
-
createCollection(params:
|
|
2091
|
-
title: string;
|
|
2092
|
-
claims: Array<{
|
|
2093
|
-
uri: string;
|
|
2094
|
-
cid: string;
|
|
2095
|
-
weight: string;
|
|
2096
|
-
}>;
|
|
2097
|
-
shortDescription?: string;
|
|
2098
|
-
banner?: Blob;
|
|
2099
|
-
}): Promise<CreateResult>;
|
|
2120
|
+
* @returns Promise resolving to collection record result with optional location URI
|
|
2121
|
+
*/
|
|
2122
|
+
createCollection(params: CreateCollectionParams): Promise<CreateCollectionResult>;
|
|
2100
2123
|
/**
|
|
2101
2124
|
* Gets a collection by URI.
|
|
2102
2125
|
*
|
|
@@ -2119,24 +2142,45 @@ interface HypercertOperations extends EventEmitter<HypercertEvents> {
|
|
|
2119
2142
|
cid: string;
|
|
2120
2143
|
record: HypercertCollection;
|
|
2121
2144
|
}>>;
|
|
2145
|
+
/**
|
|
2146
|
+
* Updates a collection.
|
|
2147
|
+
*
|
|
2148
|
+
* @param uri - AT-URI of the collection
|
|
2149
|
+
* @param updates - Fields to update
|
|
2150
|
+
* @returns Promise resolving to update result
|
|
2151
|
+
*/
|
|
2152
|
+
updateCollection(uri: string, updates: UpdateCollectionParams): Promise<UpdateResult>;
|
|
2153
|
+
/**
|
|
2154
|
+
* Deletes a collection.
|
|
2155
|
+
*
|
|
2156
|
+
* @param uri - AT-URI of the collection
|
|
2157
|
+
* @returns Promise resolving when deleted
|
|
2158
|
+
*/
|
|
2159
|
+
deleteCollection(uri: string): Promise<void>;
|
|
2160
|
+
/**
|
|
2161
|
+
* Attaches a location to a collection.
|
|
2162
|
+
*
|
|
2163
|
+
* @param uri - AT-URI of the collection
|
|
2164
|
+
* @param location - Location data
|
|
2165
|
+
* @returns Promise resolving to location record result
|
|
2166
|
+
*/
|
|
2167
|
+
attachLocationToCollection(uri: string, location: LocationParams): Promise<CreateResult>;
|
|
2168
|
+
/**
|
|
2169
|
+
* Removes a location from a collection.
|
|
2170
|
+
*
|
|
2171
|
+
* @param uri - AT-URI of the collection
|
|
2172
|
+
* @returns Promise resolving when location is removed
|
|
2173
|
+
*/
|
|
2174
|
+
removeLocationFromCollection(uri: string): Promise<void>;
|
|
2122
2175
|
/**
|
|
2123
2176
|
* Creates a project.
|
|
2124
2177
|
*
|
|
2178
|
+
* A project is a collection with type='project' and optional location sidecar.
|
|
2179
|
+
*
|
|
2125
2180
|
* @param params - Project parameters
|
|
2126
|
-
* @returns Promise resolving to project record result
|
|
2127
|
-
*/
|
|
2128
|
-
createProject(params:
|
|
2129
|
-
title: string;
|
|
2130
|
-
shortDescription: string;
|
|
2131
|
-
description?: unknown;
|
|
2132
|
-
avatar?: Blob;
|
|
2133
|
-
banner?: Blob;
|
|
2134
|
-
activities?: Array<{
|
|
2135
|
-
uri: string;
|
|
2136
|
-
cid: string;
|
|
2137
|
-
weight: string;
|
|
2138
|
-
}>;
|
|
2139
|
-
}): Promise<CreateResult>;
|
|
2181
|
+
* @returns Promise resolving to project record result with optional location URI
|
|
2182
|
+
*/
|
|
2183
|
+
createProject(params: CreateProjectParams): Promise<CreateProjectResult>;
|
|
2140
2184
|
/**
|
|
2141
2185
|
* Gets a project by URI.
|
|
2142
2186
|
*
|
|
@@ -2170,18 +2214,7 @@ interface HypercertOperations extends EventEmitter<HypercertEvents> {
|
|
|
2170
2214
|
* @param updates - Fields to update
|
|
2171
2215
|
* @returns Promise resolving to update result
|
|
2172
2216
|
*/
|
|
2173
|
-
updateProject(uri: string, updates:
|
|
2174
|
-
title?: string;
|
|
2175
|
-
shortDescription?: string;
|
|
2176
|
-
description?: unknown;
|
|
2177
|
-
avatar?: Blob | null;
|
|
2178
|
-
banner?: Blob | null;
|
|
2179
|
-
activities?: Array<{
|
|
2180
|
-
uri: string;
|
|
2181
|
-
cid: string;
|
|
2182
|
-
weight: string;
|
|
2183
|
-
}>;
|
|
2184
|
-
}): Promise<UpdateResult>;
|
|
2217
|
+
updateProject(uri: string, updates: UpdateProjectParams): Promise<UpdateResult>;
|
|
2185
2218
|
/**
|
|
2186
2219
|
* Deletes a project.
|
|
2187
2220
|
*
|
|
@@ -2189,6 +2222,21 @@ interface HypercertOperations extends EventEmitter<HypercertEvents> {
|
|
|
2189
2222
|
* @returns Promise resolving when deleted
|
|
2190
2223
|
*/
|
|
2191
2224
|
deleteProject(uri: string): Promise<void>;
|
|
2225
|
+
/**
|
|
2226
|
+
* Attaches a location to a project.
|
|
2227
|
+
*
|
|
2228
|
+
* @param uri - AT-URI of the project
|
|
2229
|
+
* @param location - Location data
|
|
2230
|
+
* @returns Promise resolving to location record result
|
|
2231
|
+
*/
|
|
2232
|
+
attachLocationToProject(uri: string, location: LocationParams): Promise<CreateResult>;
|
|
2233
|
+
/**
|
|
2234
|
+
* Removes a location from a project.
|
|
2235
|
+
*
|
|
2236
|
+
* @param uri - AT-URI of the project
|
|
2237
|
+
* @returns Promise resolving when location is removed
|
|
2238
|
+
*/
|
|
2239
|
+
removeLocationFromProject(uri: string): Promise<void>;
|
|
2192
2240
|
}
|
|
2193
2241
|
/**
|
|
2194
2242
|
* Collaborator operations for SDS access control.
|
|
@@ -6350,4 +6398,4 @@ declare function validateScope(scope: string): {
|
|
|
6350
6398
|
};
|
|
6351
6399
|
|
|
6352
6400
|
export { ATPROTO_SCOPE, ATProtoSDK, ATProtoSDKConfigSchema, ATProtoSDKError, AccountActionSchema, AccountAttrSchema, AccountPermissionSchema, AuthenticationError, BaseOperations, BlobPermissionSchema, CollaboratorPermissionsSchema, CollaboratorSchema, ConfigurableAgent, HYPERCERT_COLLECTIONS, HYPERCERT_LEXICONS, IdentityAttrSchema, IdentityPermissionSchema, InMemorySessionStore, InMemoryStateStore, IncludePermissionSchema, LexiconRegistry, MimeTypeSchema, NetworkError, NsidSchema, OAuthConfigSchema, OrganizationSchema, PermissionBuilder, PermissionSchema, RepoActionSchema, RepoPermissionSchema, Repository, RpcPermissionSchema, SDSRequiredError, ScopePresets, ServerConfigSchema, SessionExpiredError, TRANSITION_SCOPES, TimeoutConfigSchema, TransitionScopeSchema, ValidationError, attachSidecar, batchCreateSidecars, buildAtUri, buildScope, createATProtoSDK, createArrayField, createBlobField, createBooleanField, createDatetimeField, createIntegerField, createLexiconDoc, createNumberField, createObjectField, createRecordDef, createSidecarRecord, createStringField, createStrongRef, createStrongRefField, createStrongRefFromResult, createWithSidecars, extractRkeyFromUri, hasAllPermissions, hasAnyPermission, hasPermission, isStrongRef, isValidAtUri, mergeScopes, parseAtUri, parseScope, removePermissions, validateLexiconStructure, validateScope, validateStrongRef };
|
|
6353
|
-
export type { ATProtoSDKConfig, AccountAction, AccountAttr, AccountPermissionInput, AtUriComponents,
|
|
6401
|
+
export type { ATProtoSDKConfig, AccountAction, AccountAttr, AccountPermissionInput, AtUriComponents, AttachSidecarParams, AuthorizeOptions, BadgeAward, BadgeDefinition, BadgeResponse, BlobOperations, BlobPermissionInput, CacheInterface, Collaborator, CollaboratorOperations, CollaboratorPermissions, CreateHypercertEvidenceParams, CreateHypercertParams, CreateHypercertResult, CreateOrganizationParams, CreateProjectParams, CreateResult, CreateWithSidecarsParams, DID, FundingReceipt, HypercertClaim, HypercertCollection, HypercertCollectionItem, HypercertContributionDetails, HypercertContributor, HypercertContributorInformation, HypercertEvaluation, HypercertEvents, HypercertEvidence, HypercertImage, HypercertImageRecord, HypercertLocation, HypercertMeasurement, HypercertOperations, HypercertProject, HypercertProjectWithMetadata, HypercertRights, HypercertWithMetadata, HypercertWorkScopeTag, IdentityAttr, IdentityPermissionInput, IncludePermissionInput, LexiconArrayField, LexiconBlobField, LexiconBooleanField, LexiconDoc, LexiconField, LexiconFieldType, LexiconIntegerField, LexiconNumberField, LexiconObjectField, LexiconRecordDef, LexiconRefField, LexiconStringField, LexiconUnknownField, ListParams, LocationParams, LoggerInterface, MultiSidecarResult, Organization, OrganizationInfo, OrganizationOperations, PaginatedList, Permission, PermissionInput, ProfileOperations, ProgressStep, RecordOperations, RepoAction, RepoPermissionInput, RepositoryAccessGrant, RepositoryOptions, RepositoryRole, RpcPermissionInput, Session, SessionStore, SidecarRecordParams, SidecarResult, StateStore, StrongRef, TransitionScope, UpdateProjectParams, UpdateResult, ValidationResult };
|