@atproto/api 0.2.2 → 0.2.3

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.
@@ -1295,6 +1295,9 @@ export declare const schemaDict: {
1295
1295
  default: number;
1296
1296
  description: string;
1297
1297
  };
1298
+ cursor: {
1299
+ type: string;
1300
+ };
1298
1301
  rkeyStart: {
1299
1302
  type: string;
1300
1303
  description: string;
@@ -1605,6 +1608,9 @@ export declare const schemaDict: {
1605
1608
  type: string;
1606
1609
  format: string;
1607
1610
  };
1611
+ email: {
1612
+ type: string;
1613
+ };
1608
1614
  };
1609
1615
  };
1610
1616
  };
@@ -1720,6 +1726,9 @@ export declare const schemaDict: {
1720
1726
  type: string;
1721
1727
  format: string;
1722
1728
  };
1729
+ email: {
1730
+ type: string;
1731
+ };
1723
1732
  };
1724
1733
  };
1725
1734
  };
@@ -2334,6 +2343,7 @@ export declare const schemaDict: {
2334
2343
  };
2335
2344
  displayName: {
2336
2345
  type: string;
2346
+ maxGraphemes: number;
2337
2347
  maxLength: number;
2338
2348
  };
2339
2349
  avatar: {
@@ -2359,10 +2369,12 @@ export declare const schemaDict: {
2359
2369
  };
2360
2370
  displayName: {
2361
2371
  type: string;
2372
+ maxGraphemes: number;
2362
2373
  maxLength: number;
2363
2374
  };
2364
2375
  description: {
2365
2376
  type: string;
2377
+ maxGraphemes: number;
2366
2378
  maxLength: number;
2367
2379
  };
2368
2380
  avatar: {
@@ -2392,10 +2404,12 @@ export declare const schemaDict: {
2392
2404
  };
2393
2405
  displayName: {
2394
2406
  type: string;
2407
+ maxGraphemes: number;
2395
2408
  maxLength: number;
2396
2409
  };
2397
2410
  description: {
2398
2411
  type: string;
2412
+ maxGraphemes: number;
2399
2413
  maxLength: number;
2400
2414
  };
2401
2415
  avatar: {
@@ -2561,10 +2575,12 @@ export declare const schemaDict: {
2561
2575
  properties: {
2562
2576
  displayName: {
2563
2577
  type: string;
2578
+ maxGraphemes: number;
2564
2579
  maxLength: number;
2565
2580
  };
2566
2581
  description: {
2567
2582
  type: string;
2583
+ maxGraphemes: number;
2568
2584
  maxLength: number;
2569
2585
  };
2570
2586
  avatar: {
@@ -4,6 +4,7 @@ export interface QueryParams {
4
4
  repo: string;
5
5
  collection: string;
6
6
  limit?: number;
7
+ cursor?: string;
7
8
  rkeyStart?: string;
8
9
  rkeyEnd?: string;
9
10
  reverse?: boolean;
@@ -11,6 +11,7 @@ export interface OutputSchema {
11
11
  refreshJwt: string;
12
12
  handle: string;
13
13
  did: string;
14
+ email?: string;
14
15
  [k: string]: unknown;
15
16
  }
16
17
  export interface CallOptions {
@@ -5,6 +5,7 @@ export declare type InputSchema = undefined;
5
5
  export interface OutputSchema {
6
6
  handle: string;
7
7
  did: string;
8
+ email?: string;
8
9
  [k: string]: unknown;
9
10
  }
10
11
  export interface CallOptions {
package/dist/index.js CHANGED
@@ -6866,11 +6866,8 @@ function getMethodSchemaHTTPMethod(schema2) {
6866
6866
  return "get";
6867
6867
  }
6868
6868
  function constructMethodCallUri(nsid2, schema2, serviceUri, params2) {
6869
- let origin = serviceUri.toString();
6870
- if (!origin.endsWith("/")) {
6871
- origin += "/";
6872
- }
6873
- const uri2 = new URL(`${origin}xrpc/${nsid2}`);
6869
+ const uri2 = new URL(serviceUri);
6870
+ uri2.pathname = `/xrpc/${nsid2}`;
6874
6871
  if (params2) {
6875
6872
  for (const [key, value] of Object.entries(params2)) {
6876
6873
  const paramSchema = schema2.parameters?.properties?.[key];
@@ -8509,6 +8506,9 @@ var schemaDict = {
8509
8506
  default: 50,
8510
8507
  description: "The number of records to return."
8511
8508
  },
8509
+ cursor: {
8510
+ type: "string"
8511
+ },
8512
8512
  rkeyStart: {
8513
8513
  type: "string",
8514
8514
  description: "The lowest sort-ordered rkey to start from (exclusive)"
@@ -8834,6 +8834,9 @@ var schemaDict = {
8834
8834
  did: {
8835
8835
  type: "string",
8836
8836
  format: "did"
8837
+ },
8838
+ email: {
8839
+ type: "string"
8837
8840
  }
8838
8841
  }
8839
8842
  }
@@ -8956,6 +8959,9 @@ var schemaDict = {
8956
8959
  did: {
8957
8960
  type: "string",
8958
8961
  format: "did"
8962
+ },
8963
+ email: {
8964
+ type: "string"
8959
8965
  }
8960
8966
  }
8961
8967
  }
@@ -9597,7 +9603,8 @@ var schemaDict = {
9597
9603
  },
9598
9604
  displayName: {
9599
9605
  type: "string",
9600
- maxLength: 64
9606
+ maxGraphemes: 64,
9607
+ maxLength: 640
9601
9608
  },
9602
9609
  avatar: {
9603
9610
  type: "string"
@@ -9622,11 +9629,13 @@ var schemaDict = {
9622
9629
  },
9623
9630
  displayName: {
9624
9631
  type: "string",
9625
- maxLength: 64
9632
+ maxGraphemes: 64,
9633
+ maxLength: 640
9626
9634
  },
9627
9635
  description: {
9628
9636
  type: "string",
9629
- maxLength: 256
9637
+ maxGraphemes: 256,
9638
+ maxLength: 2560
9630
9639
  },
9631
9640
  avatar: {
9632
9641
  type: "string"
@@ -9655,11 +9664,13 @@ var schemaDict = {
9655
9664
  },
9656
9665
  displayName: {
9657
9666
  type: "string",
9658
- maxLength: 64
9667
+ maxGraphemes: 64,
9668
+ maxLength: 640
9659
9669
  },
9660
9670
  description: {
9661
9671
  type: "string",
9662
- maxLength: 256
9672
+ maxGraphemes: 256,
9673
+ maxLength: 2560
9663
9674
  },
9664
9675
  avatar: {
9665
9676
  type: "string"
@@ -9824,11 +9835,13 @@ var schemaDict = {
9824
9835
  properties: {
9825
9836
  displayName: {
9826
9837
  type: "string",
9827
- maxLength: 64
9838
+ maxGraphemes: 64,
9839
+ maxLength: 640
9828
9840
  },
9829
9841
  description: {
9830
9842
  type: "string",
9831
- maxLength: 256
9843
+ maxGraphemes: 256,
9844
+ maxLength: 2560
9832
9845
  },
9833
9846
  avatar: {
9834
9847
  type: "blob",
@@ -13327,7 +13340,8 @@ var _AtpAgent = class {
13327
13340
  accessJwt: res.data.accessJwt,
13328
13341
  refreshJwt: res.data.refreshJwt,
13329
13342
  handle: res.data.handle,
13330
- did: res.data.did
13343
+ did: res.data.did,
13344
+ email: opts.email
13331
13345
  };
13332
13346
  return res;
13333
13347
  } catch (e) {
@@ -13351,7 +13365,8 @@ var _AtpAgent = class {
13351
13365
  accessJwt: res.data.accessJwt,
13352
13366
  refreshJwt: res.data.refreshJwt,
13353
13367
  handle: res.data.handle,
13354
- did: res.data.did
13368
+ did: res.data.did,
13369
+ email: res.data.email
13355
13370
  };
13356
13371
  return res;
13357
13372
  } catch (e) {
@@ -13372,6 +13387,8 @@ var _AtpAgent = class {
13372
13387
  if (!res.success || res.data.did !== this.session.did) {
13373
13388
  throw new Error("Invalid session");
13374
13389
  }
13390
+ this.session.email = res.data.email;
13391
+ this.session.handle = res.data.handle;
13375
13392
  return res;
13376
13393
  } catch (e) {
13377
13394
  this.session = void 0;