@hypercerts-org/sdk-core 0.2.0-beta.0 → 0.4.0-beta.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @hypercerts-org/sdk-core@0.1.0 build /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core
2
+ > @hypercerts-org/sdk-core@0.3.0 build /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core
3
3
  > rollup -c
4
4
 
5
5
  
@@ -154,7 +154,7 @@
154
154
     ~~~~~
155
155
  '$link' is declared here.
156
156
  
157
- created dist/errors.mjs, dist/errors.cjs in 2.1s
157
+ created dist/errors.mjs, dist/errors.cjs in 1.9s
158
158
  
159
159
  /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core/src/lexicons.ts → dist/lexicons.mjs, dist/lexicons.cjs...
160
160
  (!) [plugin typescript] src/repository/BlobOperationsImpl.ts (125:9): @rollup/plugin-typescript TS2741: Property '$link' is missing in type 'CID<unknown, number, number, Version>' but required in type '{ $link: string; }'.
@@ -205,7 +205,7 @@
205
205
     ~~~~~
206
206
  '$link' is declared here.
207
207
  
208
- created dist/lexicons.mjs, dist/lexicons.cjs in 1.8s
208
+ created dist/lexicons.mjs, dist/lexicons.cjs in 1.9s
209
209
  
210
210
  /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core/src/storage.ts → dist/storage.mjs, dist/storage.cjs...
211
211
  (!) [plugin typescript] src/repository/BlobOperationsImpl.ts (125:9): @rollup/plugin-typescript TS2741: Property '$link' is missing in type 'CID<unknown, number, number, Version>' but required in type '{ $link: string; }'.
@@ -256,7 +256,7 @@
256
256
     ~~~~~
257
257
  '$link' is declared here.
258
258
  
259
- created dist/storage.mjs, dist/storage.cjs in 1.7s
259
+ created dist/storage.mjs, dist/storage.cjs in 1.8s
260
260
  
261
261
  /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core/src/testing.ts → dist/testing.mjs, dist/testing.cjs...
262
262
  (!) [plugin typescript] src/repository/BlobOperationsImpl.ts (125:9): @rollup/plugin-typescript TS2741: Property '$link' is missing in type 'CID<unknown, number, number, Version>' but required in type '{ $link: string; }'.
@@ -307,22 +307,22 @@
307
307
     ~~~~~
308
308
  '$link' is declared here.
309
309
  
310
- created dist/testing.mjs, dist/testing.cjs in 1.8s
310
+ created dist/testing.mjs, dist/testing.cjs in 2.3s
311
311
  
312
312
  /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core/src/index.ts → dist/index.d.ts...
313
- created dist/index.d.ts in 1.5s
313
+ created dist/index.d.ts in 1.3s
314
314
  
315
315
  /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core/src/types.ts → dist/types.d.ts...
316
316
  created dist/types.d.ts in 1.2s
317
317
  
318
318
  /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core/src/errors.ts → dist/errors.d.ts...
319
- created dist/errors.d.ts in 486ms
319
+ created dist/errors.d.ts in 484ms
320
320
  
321
321
  /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core/src/lexicons.ts → dist/lexicons.d.ts...
322
- created dist/lexicons.d.ts in 1s
322
+ created dist/lexicons.d.ts in 1.1s
323
323
  
324
324
  /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core/src/storage.ts → dist/storage.d.ts...
325
- created dist/storage.d.ts in 553ms
325
+ created dist/storage.d.ts in 544ms
326
326
  
327
327
  /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core/src/testing.ts → dist/testing.d.ts...
328
- created dist/testing.d.ts in 1s
328
+ created dist/testing.d.ts in 723ms
@@ -1,15 +1,15 @@
1
1
 
2
- > @hypercerts-org/sdk-core@0.1.0 test /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core
2
+ > @hypercerts-org/sdk-core@0.3.0 test /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core
3
3
  > vitest
4
4
 
5
5
 
6
6
   RUN  v3.2.4 /home/runner/work/hypercerts-sdk/hypercerts-sdk/packages/sdk-core
7
7
 
8
- ✓ tests/repository/CollaboratorOperationsImpl.test.ts (18 tests) 28ms
9
- ✓ tests/repository/RecordOperationsImpl.test.ts (21 tests) 33ms
10
- ✓ tests/repository/HypercertOperationsImpl.test.ts (30 tests) 43ms
11
- ✓ tests/repository/ProfileOperationsImpl.test.ts (14 tests) 26ms
12
- ✓ tests/repository/OrganizationOperationsImpl.test.ts (12 tests) 19ms
8
+ ✓ tests/repository/CollaboratorOperationsImpl.test.ts (25 tests) 26ms
9
+ ✓ tests/repository/RecordOperationsImpl.test.ts (21 tests) 35ms
10
+ ✓ tests/repository/HypercertOperationsImpl.test.ts (30 tests) 49ms
11
+ ✓ tests/repository/ProfileOperationsImpl.test.ts (14 tests) 24ms
12
+ ✓ tests/repository/OrganizationOperationsImpl.test.ts (12 tests) 20ms
13
13
  ✓ tests/repository/LexiconRegistry.test.ts (16 tests) 18ms
14
14
  stderr | tests/auth/OAuthClient.test.ts > OAuthClient > constructor > should initialize with valid config
15
15
  No lock mechanism provided. Credentials might get revoked.
@@ -51,50 +51,49 @@ No lock mechanism provided. Credentials might get revoked.
51
51
  stderr | tests/core/SDK.test.ts > ATProtoSDK > authorize > should trim identifier
52
52
  No lock mechanism provided. Credentials might get revoked.
53
53
 
54
- ✓ tests/repository/Repository.test.ts (12 tests) 49ms
55
- stderr | tests/core/SDK.test.ts > ATProtoSDK > restoreSession > should throw ValidationError for empty DID
54
+ stderr | tests/auth/OAuthClient.test.ts > OAuthClient > callback > should throw AuthenticationError for OAuth error params
56
55
  No lock mechanism provided. Credentials might get revoked.
57
56
 
58
- stderr | tests/core/SDK.test.ts > ATProtoSDK > restoreSession > should handle non-existent session
57
+ stderr | tests/auth/OAuthClient.test.ts > OAuthClient > callback > should throw AuthenticationError for missing code
59
58
  No lock mechanism provided. Credentials might get revoked.
60
59
 
61
- stderr | tests/auth/OAuthClient.test.ts > OAuthClient > callback > should throw AuthenticationError for OAuth error params
60
+ stderr | tests/auth/OAuthClient.test.ts > OAuthClient > restore > should return null for non-existent session
62
61
  No lock mechanism provided. Credentials might get revoked.
63
62
 
64
- stderr | tests/auth/OAuthClient.test.ts > OAuthClient > callback > should throw AuthenticationError for missing code
63
+ stderr | tests/auth/OAuthClient.test.ts > OAuthClient > restore > should throw AuthenticationError for invalid DID
65
64
  No lock mechanism provided. Credentials might get revoked.
66
65
 
67
- stderr | tests/core/SDK.test.ts > ATProtoSDK > revokeSession > should throw ValidationError for empty DID
66
+ stderr | tests/auth/OAuthClient.test.ts > OAuthClient > revoke > should not throw for non-existent session
68
67
  No lock mechanism provided. Credentials might get revoked.
69
68
 
70
- stderr | tests/auth/OAuthClient.test.ts > OAuthClient > restore > should return null for non-existent session
69
+ stderr | tests/auth/OAuthClient.test.ts > OAuthClient > storage integration > should use provided session store
71
70
  No lock mechanism provided. Credentials might get revoked.
72
71
 
73
- stderr | tests/core/SDK.test.ts > ATProtoSDK > repository > should throw ValidationError when session is null
72
+ stderr | tests/auth/OAuthClient.test.ts > OAuthClient > storage integration > should use provided state store
74
73
  No lock mechanism provided. Credentials might get revoked.
75
74
 
76
- stderr | tests/auth/OAuthClient.test.ts > OAuthClient > restore > should throw AuthenticationError for invalid DID
75
+ stderr | tests/auth/OAuthClient.test.ts > OAuthClient > logger integration > should use provided logger
77
76
  No lock mechanism provided. Credentials might get revoked.
78
77
 
79
- stderr | tests/core/SDK.test.ts > ATProtoSDK > repository > should throw ValidationError when PDS not configured and no server specified
78
+ ✓ tests/auth/OAuthClient.test.ts (14 tests) 307ms
79
+ stderr | tests/core/SDK.test.ts > ATProtoSDK > restoreSession > should throw ValidationError for empty DID
80
80
  No lock mechanism provided. Credentials might get revoked.
81
81
 
82
- stderr | tests/auth/OAuthClient.test.ts > OAuthClient > revoke > should not throw for non-existent session
82
+ stderr | tests/core/SDK.test.ts > ATProtoSDK > restoreSession > should handle non-existent session
83
83
  No lock mechanism provided. Credentials might get revoked.
84
84
 
85
- stderr | tests/core/SDK.test.ts > ATProtoSDK > repository > should throw ValidationError when SDS not configured and server=sds
85
+ stderr | tests/core/SDK.test.ts > ATProtoSDK > revokeSession > should throw ValidationError for empty DID
86
86
  No lock mechanism provided. Credentials might get revoked.
87
87
 
88
- stderr | tests/auth/OAuthClient.test.ts > OAuthClient > storage integration > should use provided session store
88
+ stderr | tests/core/SDK.test.ts > ATProtoSDK > repository > should throw ValidationError when session is null
89
89
  No lock mechanism provided. Credentials might get revoked.
90
90
 
91
- stderr | tests/auth/OAuthClient.test.ts > OAuthClient > storage integration > should use provided state store
91
+ stderr | tests/core/SDK.test.ts > ATProtoSDK > repository > should throw ValidationError when PDS not configured and no server specified
92
92
  No lock mechanism provided. Credentials might get revoked.
93
93
 
94
- stderr | tests/auth/OAuthClient.test.ts > OAuthClient > logger integration > should use provided logger
94
+ stderr | tests/core/SDK.test.ts > ATProtoSDK > repository > should throw ValidationError when SDS not configured and server=sds
95
95
  No lock mechanism provided. Credentials might get revoked.
96
96
 
97
- ✓ tests/auth/OAuthClient.test.ts (14 tests) 356ms
98
97
  stderr | tests/core/SDK.test.ts > ATProtoSDK > repository > should create repository with custom serverUrl
99
98
  No lock mechanism provided. Credentials might get revoked.
100
99
 
@@ -107,12 +106,13 @@ No lock mechanism provided. Credentials might get revoked.
107
106
  stderr | tests/core/SDK.test.ts > ATProtoSDK > setup examples > should work with custom storage implementations
108
107
  No lock mechanism provided. Credentials might get revoked.
109
108
 
110
- ✓ tests/core/SDK.test.ts (19 tests) 234ms
111
- ✓ tests/repository/BlobOperationsImpl.test.ts (9 tests) 12ms
109
+ ✓ tests/core/SDK.test.ts (19 tests) 194ms
110
+ ✓ tests/repository/Repository.test.ts (12 tests) 85ms
111
+ ✓ tests/repository/BlobOperationsImpl.test.ts (9 tests) 14ms
112
112
  ✓ tests/core/errors.test.ts (9 tests) 5ms
113
113
 
114
114
   Test Files  11 passed (11)
115
-  Tests  174 passed (174)
116
-  Start at  19:15:42
117
-  Duration  2.20s (transform 569ms, setup 0ms, collect 2.69s, tests 824ms, environment 2ms, prepare 1.08s)
115
+  Tests  181 passed (181)
116
+  Start at  22:12:42
117
+  Duration  2.16s (transform 475ms, setup 0ms, collect 2.58s, tests 777ms, environment 3ms, prepare 1.11s)
118
118
 
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @hypercerts-org/sdk-core
2
2
 
3
- ## 0.2.0-beta.0
3
+ ## 0.4.0-beta.0
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -11,6 +11,12 @@
11
11
 
12
12
  ### Patch Changes
13
13
 
14
+ - [#55](https://github.com/hypercerts-org/hypercerts-sdk/pull/55)
15
+ [`23c3d9a`](https://github.com/hypercerts-org/hypercerts-sdk/commit/23c3d9a3b71f326df68b65420c83f7ae42c2432d) Thanks
16
+ [@bitbeckers](https://github.com/bitbeckers)! - Fix endpoints and NSIDs for SDS operations in CollaboratorOperations
17
+ and OrganizationOperations
18
+
14
19
  - Updated dependencies
15
- [[`eda4ac2`](https://github.com/hypercerts-org/hypercerts-sdk/commit/eda4ac233e09764d83f042ba7df94d4c9884cc01)]:
16
- - @hypercerts-org/lexicon@0.2.0-beta.0
20
+ [[`23c3d9a`](https://github.com/hypercerts-org/hypercerts-sdk/commit/23c3d9a3b71f326df68b65420c83f7ae42c2432d),
21
+ [`eda4ac2`](https://github.com/hypercerts-org/hypercerts-sdk/commit/eda4ac233e09764d83f042ba7df94d4c9884cc01)]:
22
+ - @hypercerts-org/lexicon@0.4.0-beta.0
package/README.md CHANGED
@@ -77,14 +77,57 @@ const existingSession = await sdk.restoreSession("did:plc:...");
77
77
 
78
78
  ```
79
79
  repo
80
- ├── .records → create, get, update, delete, list
81
- ├── .blobs → upload, get
82
- ├── .profile → get, update
83
- ├── .hypercerts → create, get, update, delete, list, addContribution, addMeasurement
84
- ├── .collaborators → grant, revoke, list, hasAccess (SDS only)
80
+ ├── .records → create, get, update, delete, list
81
+ ├── .blobs → upload, get
82
+ ├── .profile → get, update (PDS only)
83
+ ├── .hypercerts → create, get, update, delete, list, addContribution, addMeasurement
84
+ ├── .collaborators → grant, revoke, list, hasAccess, getRole, getPermissions, transferOwnership (SDS only)
85
85
  └── .organizations → create, get, list (SDS only)
86
86
  ```
87
87
 
88
+ ### Collaborator Operations (SDS only)
89
+
90
+ ```typescript
91
+ // Grant access to a user
92
+ await repo.collaborators.grant({
93
+ userDid: "did:plc:user123",
94
+ role: "editor", // viewer | editor | admin | owner
95
+ });
96
+
97
+ // Revoke access
98
+ await repo.collaborators.revoke({ userDid: "did:plc:user123" });
99
+
100
+ // List all collaborators
101
+ const collaborators = await repo.collaborators.list();
102
+
103
+ // Check if user has access
104
+ const hasAccess = await repo.collaborators.hasAccess("did:plc:user123");
105
+
106
+ // Get user's role
107
+ const role = await repo.collaborators.getRole("did:plc:user123");
108
+
109
+ // Get current user's permissions
110
+ const permissions = await repo.collaborators.getPermissions();
111
+ if (permissions.admin) {
112
+ // Can manage collaborators
113
+ }
114
+
115
+ // Transfer ownership (irreversible!)
116
+ await repo.collaborators.transferOwnership({
117
+ newOwnerDid: "did:plc:new-owner",
118
+ });
119
+ ```
120
+
121
+ ### SDS vs PDS Operations
122
+
123
+ | Operation | PDS | SDS | Namespace |
124
+ |-----------|-----|-----|-----------|
125
+ | Records (CRUD) | ✅ | ✅ | `com.atproto.repo.*` |
126
+ | Blobs | ✅ | ✅ | `com.atproto.repo.uploadBlob`, `com.atproto.sync.getBlob` |
127
+ | Profile | ✅ | ❌ | `app.bsky.actor.profile` |
128
+ | Organizations | ❌ | ✅ | `com.sds.organization.*` |
129
+ | Collaborators | ❌ | ✅ | `com.sds.repo.*` |
130
+
88
131
  ## Errors
89
132
 
90
133
  ```typescript
package/dist/index.cjs CHANGED
@@ -3041,9 +3041,11 @@ class HypercertOperationsImpl extends eventemitter3.EventEmitter {
3041
3041
  * - `owner`: Full control including ownership management
3042
3042
  *
3043
3043
  * **SDS API Endpoints Used**:
3044
- * - `com.atproto.sds.grantAccess`: Grant access to a user
3045
- * - `com.atproto.sds.revokeAccess`: Revoke access from a user
3046
- * - `com.atproto.sds.listCollaborators`: List all collaborators
3044
+ * - `com.sds.repo.grantAccess`: Grant access to a user
3045
+ * - `com.sds.repo.revokeAccess`: Revoke access from a user
3046
+ * - `com.sds.repo.listCollaborators`: List all collaborators
3047
+ * - `com.sds.repo.getPermissions`: Get current user's permissions
3048
+ * - `com.sds.repo.transferOwnership`: Transfer repository ownership
3047
3049
  *
3048
3050
  * @example
3049
3051
  * ```typescript
@@ -3145,7 +3147,7 @@ class CollaboratorOperationsImpl {
3145
3147
  */
3146
3148
  async grant(params) {
3147
3149
  const permissions = this.roleToPermissions(params.role);
3148
- const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.atproto.sds.grantAccess`, {
3150
+ const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.sds.repo.grantAccess`, {
3149
3151
  method: "POST",
3150
3152
  headers: { "Content-Type": "application/json" },
3151
3153
  body: JSON.stringify({
@@ -3177,7 +3179,7 @@ class CollaboratorOperationsImpl {
3177
3179
  * ```
3178
3180
  */
3179
3181
  async revoke(params) {
3180
- const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.atproto.sds.revokeAccess`, {
3182
+ const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.sds.repo.revokeAccess`, {
3181
3183
  method: "POST",
3182
3184
  headers: { "Content-Type": "application/json" },
3183
3185
  body: JSON.stringify({
@@ -3216,7 +3218,7 @@ class CollaboratorOperationsImpl {
3216
3218
  * ```
3217
3219
  */
3218
3220
  async list() {
3219
- const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.atproto.sds.listCollaborators?repo=${encodeURIComponent(this.repoDid)}`, { method: "GET" });
3221
+ const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.sds.repo.listCollaborators?repo=${encodeURIComponent(this.repoDid)}`, { method: "GET" });
3220
3222
  if (!response.ok) {
3221
3223
  throw new NetworkError(`Failed to list collaborators: ${response.statusText}`);
3222
3224
  }
@@ -3277,6 +3279,104 @@ class CollaboratorOperationsImpl {
3277
3279
  const collab = collaborators.find((c) => c.userDid === userDid && !c.revokedAt);
3278
3280
  return collab?.role ?? null;
3279
3281
  }
3282
+ /**
3283
+ * Gets the current user's permissions for this repository.
3284
+ *
3285
+ * @returns Promise resolving to the permission flags
3286
+ * @throws {@link NetworkError} if the request fails
3287
+ *
3288
+ * @remarks
3289
+ * This is useful for checking what actions the current user can perform
3290
+ * before attempting operations that might fail due to insufficient permissions.
3291
+ *
3292
+ * @example
3293
+ * ```typescript
3294
+ * const permissions = await repo.collaborators.getPermissions();
3295
+ *
3296
+ * if (permissions.admin) {
3297
+ * // Show admin UI
3298
+ * console.log("You can manage collaborators");
3299
+ * }
3300
+ *
3301
+ * if (permissions.create) {
3302
+ * console.log("You can create records");
3303
+ * }
3304
+ * ```
3305
+ *
3306
+ * @example Conditional UI rendering
3307
+ * ```typescript
3308
+ * const permissions = await repo.collaborators.getPermissions();
3309
+ *
3310
+ * // Show/hide UI elements based on permissions
3311
+ * const canEdit = permissions.update;
3312
+ * const canDelete = permissions.delete;
3313
+ * const isAdmin = permissions.admin;
3314
+ * const isOwner = permissions.owner;
3315
+ * ```
3316
+ */
3317
+ async getPermissions() {
3318
+ const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.sds.repo.getPermissions?repo=${encodeURIComponent(this.repoDid)}`, { method: "GET" });
3319
+ if (!response.ok) {
3320
+ throw new NetworkError(`Failed to get permissions: ${response.statusText}`);
3321
+ }
3322
+ const data = await response.json();
3323
+ return data.permissions;
3324
+ }
3325
+ /**
3326
+ * Transfers repository ownership to another user.
3327
+ *
3328
+ * @param params - Transfer parameters
3329
+ * @param params.newOwnerDid - DID of the user to transfer ownership to
3330
+ * @throws {@link NetworkError} if the transfer fails
3331
+ *
3332
+ * @remarks
3333
+ * **IMPORTANT**: This action is irreversible. Once ownership is transferred:
3334
+ * - The new owner gains full control of the repository
3335
+ * - Your role will be changed to admin (or specified role)
3336
+ * - You cannot transfer ownership back without the new owner's approval
3337
+ *
3338
+ * **Requirements**:
3339
+ * - You must be the current owner
3340
+ * - The new owner must have an existing account
3341
+ * - The new owner will be notified of the ownership transfer
3342
+ *
3343
+ * @example
3344
+ * ```typescript
3345
+ * // Transfer ownership to another user
3346
+ * await repo.collaborators.transferOwnership({
3347
+ * newOwnerDid: "did:plc:new-owner",
3348
+ * });
3349
+ *
3350
+ * console.log("Ownership transferred successfully");
3351
+ * // You are now an admin, not the owner
3352
+ * ```
3353
+ *
3354
+ * @example With confirmation
3355
+ * ```typescript
3356
+ * const confirmTransfer = await askUser(
3357
+ * "Are you sure you want to transfer ownership? This cannot be undone."
3358
+ * );
3359
+ *
3360
+ * if (confirmTransfer) {
3361
+ * await repo.collaborators.transferOwnership({
3362
+ * newOwnerDid: "did:plc:new-owner",
3363
+ * });
3364
+ * }
3365
+ * ```
3366
+ */
3367
+ async transferOwnership(params) {
3368
+ const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.sds.repo.transferOwnership`, {
3369
+ method: "POST",
3370
+ headers: { "Content-Type": "application/json" },
3371
+ body: JSON.stringify({
3372
+ repo: this.repoDid,
3373
+ newOwner: params.newOwnerDid,
3374
+ }),
3375
+ });
3376
+ if (!response.ok) {
3377
+ throw new NetworkError(`Failed to transfer ownership: ${response.statusText}`);
3378
+ }
3379
+ }
3280
3380
  }
3281
3381
 
3282
3382
  /**
@@ -3303,8 +3403,8 @@ class CollaboratorOperationsImpl {
3303
3403
  * {@link Repository.organizations} on an SDS-connected repository.
3304
3404
  *
3305
3405
  * **SDS API Endpoints Used**:
3306
- * - `com.atproto.sds.createRepository`: Create a new organization
3307
- * - `com.atproto.sds.listRepositories`: List accessible organizations
3406
+ * - `com.sds.organization.create`: Create a new organization
3407
+ * - `com.sds.organization.list`: List accessible organizations
3308
3408
  *
3309
3409
  * **Access Types**:
3310
3410
  * - `"owner"`: User created or owns the organization
@@ -3382,7 +3482,7 @@ class OrganizationOperationsImpl {
3382
3482
  * ```
3383
3483
  */
3384
3484
  async create(params) {
3385
- const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.atproto.sds.createRepository`, {
3485
+ const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.sds.organization.create`, {
3386
3486
  method: "POST",
3387
3487
  headers: { "Content-Type": "application/json" },
3388
3488
  body: JSON.stringify(params),
@@ -3472,7 +3572,7 @@ class OrganizationOperationsImpl {
3472
3572
  * ```
3473
3573
  */
3474
3574
  async list() {
3475
- const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.atproto.sds.listRepositories?userDid=${encodeURIComponent(this.session.did || this.session.sub)}`, { method: "GET" });
3575
+ const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.sds.organization.list?userDid=${encodeURIComponent(this.session.did || this.session.sub)}`, { method: "GET" });
3476
3576
  if (!response.ok) {
3477
3577
  throw new NetworkError(`Failed to list organizations: ${response.statusText}`);
3478
3578
  }