···1212 "properties": {
1313 "defaultHold": {
1414 "type": "string",
1515- "format": "uri",
1616- "description": "Default hold endpoint for blob storage. If null, user has opted out of defaults."
1515+ "format": "did",
1616+ "description": "Default hold DID for blob storage. If null, user has opted out of defaults."
1717 },
1818 "autoRemoveUntagged": {
1919 "type": "boolean",
-6
pkg/atproto/endpoints.go
···4646 // Response: {"success": true, "layersCreated": 5, "postCreated": true, "postUri": "at://..."}
4747 HoldNotifyManifest = "/xrpc/io.atcr.hold.notifyManifest"
48484949- // HoldSetStats sets absolute stats values for a repository (used by migration).
5050- // Method: POST
5151- // Request: {"ownerDid": "...", "repository": "...", "pullCount": 10, "pushCount": 5, "lastPull": "...", "lastPush": "..."}
5252- // Response: {"success": true}
5353- HoldSetStats = "/xrpc/io.atcr.hold.setStats"
5454-5549 // HoldGetQuota returns storage quota information for a user.
5650 // Method: GET
5751 // Query: userDid={did}
-43
pkg/hold/pds/stats.go
···9393 return recordCID, statsRecord, nil
9494}
95959696-// SetStats directly sets the stats for a repository (used for migration)
9797-// Creates or updates the stats record with the specified counts
9898-func (p *HoldPDS) SetStats(ctx context.Context, ownerDID, repository string, pullCount, pushCount int64, lastPull, lastPush string) error {
9999- rkey := atproto.StatsRecordKey(ownerDID, repository)
100100- now := time.Now().Format(time.RFC3339)
101101-102102- // Try to get existing record
103103- _, existing, err := p.GetStats(ctx, ownerDID, repository)
104104- if err != nil {
105105- // Record doesn't exist - create new one
106106- record := &atproto.StatsRecord{
107107- Type: atproto.StatsCollection,
108108- OwnerDID: ownerDID,
109109- Repository: repository,
110110- PullCount: pullCount,
111111- PushCount: pushCount,
112112- LastPull: lastPull,
113113- LastPush: lastPush,
114114- UpdatedAt: now,
115115- }
116116-117117- _, _, err := p.repomgr.PutRecord(ctx, p.uid, atproto.StatsCollection, rkey, record)
118118- if err != nil {
119119- return fmt.Errorf("failed to create stats record: %w", err)
120120- }
121121- return nil
122122- }
123123-124124- // Record exists - update it
125125- existing.PullCount = pullCount
126126- existing.PushCount = pushCount
127127- existing.LastPull = lastPull
128128- existing.LastPush = lastPush
129129- existing.UpdatedAt = now
130130-131131- _, err = p.repomgr.UpdateRecord(ctx, p.uid, atproto.StatsCollection, rkey, existing)
132132- if err != nil {
133133- return fmt.Errorf("failed to update stats record: %w", err)
134134- }
135135-136136- return nil
137137-}
138138-13996// ListStats returns all stats records in the hold's PDS
14097// This is used by AppView to aggregate stats from all holds
14198func (p *HoldPDS) ListStats(ctx context.Context) ([]*atproto.StatsRecord, error) {