@atproto/api 0.18.14 → 0.18.16

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/agent.d.ts +9 -0
  3. package/dist/agent.d.ts.map +1 -1
  4. package/dist/agent.js +35 -0
  5. package/dist/agent.js.map +1 -1
  6. package/dist/client/index.d.ts +18 -0
  7. package/dist/client/index.d.ts.map +1 -1
  8. package/dist/client/index.js +49 -8
  9. package/dist/client/index.js.map +1 -1
  10. package/dist/client/lexicons.d.ts +744 -2
  11. package/dist/client/lexicons.d.ts.map +1 -1
  12. package/dist/client/lexicons.js +384 -0
  13. package/dist/client/lexicons.js.map +1 -1
  14. package/dist/client/types/app/bsky/actor/defs.d.ts +11 -1
  15. package/dist/client/types/app/bsky/actor/defs.d.ts.map +1 -1
  16. package/dist/client/types/app/bsky/actor/defs.js +9 -0
  17. package/dist/client/types/app/bsky/actor/defs.js.map +1 -1
  18. package/dist/client/types/app/bsky/draft/createDraft.d.ts +29 -0
  19. package/dist/client/types/app/bsky/draft/createDraft.d.ts.map +1 -0
  20. package/dist/client/types/app/bsky/draft/createDraft.js +26 -0
  21. package/dist/client/types/app/bsky/draft/createDraft.js.map +1 -0
  22. package/dist/client/types/app/bsky/draft/defs.d.ts +106 -0
  23. package/dist/client/types/app/bsky/draft/defs.d.ts.map +1 -0
  24. package/dist/client/types/app/bsky/draft/defs.js +97 -0
  25. package/dist/client/types/app/bsky/draft/defs.js.map +1 -0
  26. package/dist/client/types/app/bsky/draft/deleteDraft.d.ts +20 -0
  27. package/dist/client/types/app/bsky/draft/deleteDraft.d.ts.map +1 -0
  28. package/dist/client/types/app/bsky/draft/deleteDraft.js +11 -0
  29. package/dist/client/types/app/bsky/draft/deleteDraft.js.map +1 -0
  30. package/dist/client/types/app/bsky/draft/getDrafts.d.ts +25 -0
  31. package/dist/client/types/app/bsky/draft/getDrafts.d.ts.map +1 -0
  32. package/dist/client/types/app/bsky/draft/getDrafts.js +11 -0
  33. package/dist/client/types/app/bsky/draft/getDrafts.js.map +1 -0
  34. package/dist/client/types/app/bsky/draft/updateDraft.d.ts +21 -0
  35. package/dist/client/types/app/bsky/draft/updateDraft.d.ts.map +1 -0
  36. package/dist/client/types/app/bsky/draft/updateDraft.js +11 -0
  37. package/dist/client/types/app/bsky/draft/updateDraft.js.map +1 -0
  38. package/dist/predicate.d.ts +1 -0
  39. package/dist/predicate.d.ts.map +1 -1
  40. package/dist/predicate.js +2 -1
  41. package/dist/predicate.js.map +1 -1
  42. package/dist/types.d.ts +4 -0
  43. package/dist/types.d.ts.map +1 -1
  44. package/dist/types.js.map +1 -1
  45. package/package.json +3 -3
  46. package/src/agent.ts +44 -0
  47. package/src/client/index.ts +57 -0
  48. package/src/client/lexicons.ts +394 -0
  49. package/src/client/types/app/bsky/actor/defs.ts +20 -0
  50. package/src/client/types/app/bsky/draft/createDraft.ts +55 -0
  51. package/src/client/types/app/bsky/draft/defs.ts +208 -0
  52. package/src/client/types/app/bsky/draft/deleteDraft.ts +38 -0
  53. package/src/client/types/app/bsky/draft/getDrafts.ts +43 -0
  54. package/src/client/types/app/bsky/draft/updateDraft.ts +39 -0
  55. package/src/predicate.ts +3 -0
  56. package/src/types.ts +4 -0
  57. package/tests/atp-agent.test.ts +180 -0
  58. package/tests/moderation-prefs.test.ts +16 -0
  59. package/tsconfig.build.tsbuildinfo +1 -1
@@ -382,7 +382,7 @@ export declare const schemaDict: {
382
382
  readonly type: "array";
383
383
  readonly items: {
384
384
  readonly type: "union";
385
- readonly refs: ["lex:app.bsky.actor.defs#adultContentPref", "lex:app.bsky.actor.defs#contentLabelPref", "lex:app.bsky.actor.defs#savedFeedsPref", "lex:app.bsky.actor.defs#savedFeedsPrefV2", "lex:app.bsky.actor.defs#personalDetailsPref", "lex:app.bsky.actor.defs#declaredAgePref", "lex:app.bsky.actor.defs#feedViewPref", "lex:app.bsky.actor.defs#threadViewPref", "lex:app.bsky.actor.defs#interestsPref", "lex:app.bsky.actor.defs#mutedWordsPref", "lex:app.bsky.actor.defs#hiddenPostsPref", "lex:app.bsky.actor.defs#bskyAppStatePref", "lex:app.bsky.actor.defs#labelersPref", "lex:app.bsky.actor.defs#postInteractionSettingsPref", "lex:app.bsky.actor.defs#verificationPrefs"];
385
+ readonly refs: ["lex:app.bsky.actor.defs#adultContentPref", "lex:app.bsky.actor.defs#contentLabelPref", "lex:app.bsky.actor.defs#savedFeedsPref", "lex:app.bsky.actor.defs#savedFeedsPrefV2", "lex:app.bsky.actor.defs#personalDetailsPref", "lex:app.bsky.actor.defs#declaredAgePref", "lex:app.bsky.actor.defs#feedViewPref", "lex:app.bsky.actor.defs#threadViewPref", "lex:app.bsky.actor.defs#interestsPref", "lex:app.bsky.actor.defs#mutedWordsPref", "lex:app.bsky.actor.defs#hiddenPostsPref", "lex:app.bsky.actor.defs#bskyAppStatePref", "lex:app.bsky.actor.defs#labelersPref", "lex:app.bsky.actor.defs#postInteractionSettingsPref", "lex:app.bsky.actor.defs#verificationPrefs", "lex:app.bsky.actor.defs#liveEventPreferences"];
386
386
  };
387
387
  };
388
388
  readonly adultContentPref: {
@@ -722,6 +722,24 @@ export declare const schemaDict: {
722
722
  };
723
723
  };
724
724
  };
725
+ readonly liveEventPreferences: {
726
+ readonly type: "object";
727
+ readonly description: "Preferences for live events.";
728
+ readonly properties: {
729
+ readonly hiddenFeedIds: {
730
+ readonly description: "A list of feed IDs that the user has hidden from live events.";
731
+ readonly type: "array";
732
+ readonly items: {
733
+ readonly type: "string";
734
+ };
735
+ };
736
+ readonly hideAllFeeds: {
737
+ readonly description: "Whether to hide all feeds from live events.";
738
+ readonly type: "boolean";
739
+ readonly default: false;
740
+ };
741
+ };
742
+ };
725
743
  readonly postInteractionSettingsPref: {
726
744
  readonly type: "object";
727
745
  readonly description: "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.";
@@ -2040,6 +2058,359 @@ export declare const schemaDict: {
2040
2058
  };
2041
2059
  };
2042
2060
  };
2061
+ readonly AppBskyDraftCreateDraft: {
2062
+ readonly lexicon: 1;
2063
+ readonly id: "app.bsky.draft.createDraft";
2064
+ readonly defs: {
2065
+ readonly main: {
2066
+ readonly type: "procedure";
2067
+ readonly description: "Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication.";
2068
+ readonly input: {
2069
+ readonly encoding: "application/json";
2070
+ readonly schema: {
2071
+ readonly type: "object";
2072
+ readonly required: ["draft"];
2073
+ readonly properties: {
2074
+ readonly draft: {
2075
+ readonly type: "ref";
2076
+ readonly ref: "lex:app.bsky.draft.defs#draft";
2077
+ };
2078
+ };
2079
+ };
2080
+ };
2081
+ readonly output: {
2082
+ readonly encoding: "application/json";
2083
+ readonly schema: {
2084
+ readonly type: "object";
2085
+ readonly required: ["id"];
2086
+ readonly properties: {
2087
+ readonly id: {
2088
+ readonly type: "string";
2089
+ readonly description: "The ID of the created draft.";
2090
+ };
2091
+ };
2092
+ };
2093
+ };
2094
+ readonly errors: [{
2095
+ readonly name: "DraftLimitReached";
2096
+ readonly description: "Trying to insert a new draft when the limit was already reached.";
2097
+ }];
2098
+ };
2099
+ };
2100
+ };
2101
+ readonly AppBskyDraftDefs: {
2102
+ readonly lexicon: 1;
2103
+ readonly id: "app.bsky.draft.defs";
2104
+ readonly defs: {
2105
+ readonly draftWithId: {
2106
+ readonly description: "A draft with an identifier, used to store drafts in private storage (stash).";
2107
+ readonly type: "object";
2108
+ readonly required: ["id", "draft"];
2109
+ readonly properties: {
2110
+ readonly id: {
2111
+ readonly description: "A TID to be used as a draft identifier.";
2112
+ readonly type: "string";
2113
+ readonly format: "tid";
2114
+ };
2115
+ readonly draft: {
2116
+ readonly type: "ref";
2117
+ readonly ref: "lex:app.bsky.draft.defs#draft";
2118
+ };
2119
+ };
2120
+ };
2121
+ readonly draft: {
2122
+ readonly description: "A draft containing an array of draft posts.";
2123
+ readonly type: "object";
2124
+ readonly required: ["posts"];
2125
+ readonly properties: {
2126
+ readonly posts: {
2127
+ readonly description: "Array of draft posts that compose this draft.";
2128
+ readonly type: "array";
2129
+ readonly minLength: 1;
2130
+ readonly maxLength: 100;
2131
+ readonly items: {
2132
+ readonly type: "ref";
2133
+ readonly ref: "lex:app.bsky.draft.defs#draftPost";
2134
+ };
2135
+ };
2136
+ readonly langs: {
2137
+ readonly type: "array";
2138
+ readonly description: "Indicates human language of posts primary text content.";
2139
+ readonly maxLength: 3;
2140
+ readonly items: {
2141
+ readonly type: "string";
2142
+ readonly format: "language";
2143
+ };
2144
+ };
2145
+ readonly postgateEmbeddingRules: {
2146
+ readonly description: "Embedding rules for the postgates to be created when this draft is published.";
2147
+ readonly type: "array";
2148
+ readonly maxLength: 5;
2149
+ readonly items: {
2150
+ readonly type: "union";
2151
+ readonly refs: ["lex:app.bsky.feed.postgate#disableRule"];
2152
+ };
2153
+ };
2154
+ readonly threadgateAllow: {
2155
+ readonly description: "Allow-rules for the threadgate to be created when this draft is published.";
2156
+ readonly type: "array";
2157
+ readonly maxLength: 5;
2158
+ readonly items: {
2159
+ readonly type: "union";
2160
+ readonly refs: ["lex:app.bsky.feed.threadgate#mentionRule", "lex:app.bsky.feed.threadgate#followerRule", "lex:app.bsky.feed.threadgate#followingRule", "lex:app.bsky.feed.threadgate#listRule"];
2161
+ };
2162
+ };
2163
+ };
2164
+ };
2165
+ readonly draftPost: {
2166
+ readonly description: "One of the posts that compose a draft.";
2167
+ readonly type: "object";
2168
+ readonly required: ["text"];
2169
+ readonly properties: {
2170
+ readonly text: {
2171
+ readonly type: "string";
2172
+ readonly maxLength: 3000;
2173
+ readonly maxGraphemes: 300;
2174
+ readonly description: "The primary post content.";
2175
+ };
2176
+ readonly labels: {
2177
+ readonly type: "union";
2178
+ readonly description: "Self-label values for this post. Effectively content warnings.";
2179
+ readonly refs: ["lex:com.atproto.label.defs#selfLabels"];
2180
+ };
2181
+ readonly embedImages: {
2182
+ readonly type: "array";
2183
+ readonly items: {
2184
+ readonly type: "ref";
2185
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedImage";
2186
+ };
2187
+ readonly maxLength: 4;
2188
+ };
2189
+ readonly embedVideos: {
2190
+ readonly type: "array";
2191
+ readonly items: {
2192
+ readonly type: "ref";
2193
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedVideo";
2194
+ };
2195
+ readonly maxLength: 1;
2196
+ };
2197
+ readonly embedExternals: {
2198
+ readonly type: "array";
2199
+ readonly items: {
2200
+ readonly type: "ref";
2201
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedExternal";
2202
+ };
2203
+ readonly maxLength: 1;
2204
+ };
2205
+ readonly embedRecords: {
2206
+ readonly type: "array";
2207
+ readonly items: {
2208
+ readonly type: "ref";
2209
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedRecord";
2210
+ };
2211
+ readonly maxLength: 1;
2212
+ };
2213
+ };
2214
+ };
2215
+ readonly draftView: {
2216
+ readonly description: "View to present drafts data to users.";
2217
+ readonly type: "object";
2218
+ readonly required: ["id", "draft", "createdAt", "updatedAt"];
2219
+ readonly properties: {
2220
+ readonly id: {
2221
+ readonly description: "A TID to be used as a draft identifier.";
2222
+ readonly type: "string";
2223
+ readonly format: "tid";
2224
+ };
2225
+ readonly draft: {
2226
+ readonly type: "ref";
2227
+ readonly ref: "lex:app.bsky.draft.defs#draft";
2228
+ };
2229
+ readonly createdAt: {
2230
+ readonly description: "The time the draft was created.";
2231
+ readonly type: "string";
2232
+ readonly format: "datetime";
2233
+ };
2234
+ readonly updatedAt: {
2235
+ readonly description: "The time the draft was last updated.";
2236
+ readonly type: "string";
2237
+ readonly format: "datetime";
2238
+ };
2239
+ };
2240
+ };
2241
+ readonly draftEmbedLocalRef: {
2242
+ readonly type: "object";
2243
+ readonly required: ["path"];
2244
+ readonly properties: {
2245
+ readonly path: {
2246
+ readonly type: "string";
2247
+ readonly description: "Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts.";
2248
+ readonly minLength: 1;
2249
+ readonly maxLength: 1024;
2250
+ };
2251
+ };
2252
+ };
2253
+ readonly draftEmbedCaption: {
2254
+ readonly type: "object";
2255
+ readonly required: ["lang", "content"];
2256
+ readonly properties: {
2257
+ readonly lang: {
2258
+ readonly type: "string";
2259
+ readonly format: "language";
2260
+ };
2261
+ readonly content: {
2262
+ readonly type: "string";
2263
+ readonly maxLength: 10000;
2264
+ };
2265
+ };
2266
+ };
2267
+ readonly draftEmbedImage: {
2268
+ readonly type: "object";
2269
+ readonly required: ["localRef"];
2270
+ readonly properties: {
2271
+ readonly localRef: {
2272
+ readonly type: "ref";
2273
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedLocalRef";
2274
+ };
2275
+ readonly alt: {
2276
+ readonly type: "string";
2277
+ readonly maxGraphemes: 2000;
2278
+ };
2279
+ };
2280
+ };
2281
+ readonly draftEmbedVideo: {
2282
+ readonly type: "object";
2283
+ readonly required: ["localRef"];
2284
+ readonly properties: {
2285
+ readonly localRef: {
2286
+ readonly type: "ref";
2287
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedLocalRef";
2288
+ };
2289
+ readonly alt: {
2290
+ readonly type: "string";
2291
+ readonly maxGraphemes: 2000;
2292
+ };
2293
+ readonly captions: {
2294
+ readonly type: "array";
2295
+ readonly items: {
2296
+ readonly type: "ref";
2297
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedCaption";
2298
+ };
2299
+ readonly maxLength: 20;
2300
+ };
2301
+ };
2302
+ };
2303
+ readonly draftEmbedExternal: {
2304
+ readonly type: "object";
2305
+ readonly required: ["uri"];
2306
+ readonly properties: {
2307
+ readonly uri: {
2308
+ readonly type: "string";
2309
+ readonly format: "uri";
2310
+ };
2311
+ };
2312
+ };
2313
+ readonly draftEmbedRecord: {
2314
+ readonly type: "object";
2315
+ readonly required: ["record"];
2316
+ readonly properties: {
2317
+ readonly record: {
2318
+ readonly type: "ref";
2319
+ readonly ref: "lex:com.atproto.repo.strongRef";
2320
+ };
2321
+ };
2322
+ };
2323
+ };
2324
+ };
2325
+ readonly AppBskyDraftDeleteDraft: {
2326
+ readonly lexicon: 1;
2327
+ readonly id: "app.bsky.draft.deleteDraft";
2328
+ readonly defs: {
2329
+ readonly main: {
2330
+ readonly type: "procedure";
2331
+ readonly description: "Deletes a draft by ID. Requires authentication.";
2332
+ readonly input: {
2333
+ readonly encoding: "application/json";
2334
+ readonly schema: {
2335
+ readonly type: "object";
2336
+ readonly required: ["id"];
2337
+ readonly properties: {
2338
+ readonly id: {
2339
+ readonly type: "string";
2340
+ readonly format: "tid";
2341
+ };
2342
+ };
2343
+ };
2344
+ };
2345
+ };
2346
+ };
2347
+ };
2348
+ readonly AppBskyDraftGetDrafts: {
2349
+ readonly lexicon: 1;
2350
+ readonly id: "app.bsky.draft.getDrafts";
2351
+ readonly defs: {
2352
+ readonly main: {
2353
+ readonly type: "query";
2354
+ readonly description: "Gets views of user drafts. Requires authentication.";
2355
+ readonly parameters: {
2356
+ readonly type: "params";
2357
+ readonly properties: {
2358
+ readonly limit: {
2359
+ readonly type: "integer";
2360
+ readonly minimum: 1;
2361
+ readonly maximum: 100;
2362
+ readonly default: 50;
2363
+ };
2364
+ readonly cursor: {
2365
+ readonly type: "string";
2366
+ };
2367
+ };
2368
+ };
2369
+ readonly output: {
2370
+ readonly encoding: "application/json";
2371
+ readonly schema: {
2372
+ readonly type: "object";
2373
+ readonly required: ["drafts"];
2374
+ readonly properties: {
2375
+ readonly cursor: {
2376
+ readonly type: "string";
2377
+ };
2378
+ readonly drafts: {
2379
+ readonly type: "array";
2380
+ readonly items: {
2381
+ readonly type: "ref";
2382
+ readonly ref: "lex:app.bsky.draft.defs#draftView";
2383
+ };
2384
+ };
2385
+ };
2386
+ };
2387
+ };
2388
+ };
2389
+ };
2390
+ };
2391
+ readonly AppBskyDraftUpdateDraft: {
2392
+ readonly lexicon: 1;
2393
+ readonly id: "app.bsky.draft.updateDraft";
2394
+ readonly defs: {
2395
+ readonly main: {
2396
+ readonly type: "procedure";
2397
+ readonly description: "Updates a draft using private storage (stash). If the draft ID points to a non-existing ID, the update will be silently ignored. This is done because updates don't enforce draft limit, so it accepts all writes, but will ignore invalid ones. Requires authentication.";
2398
+ readonly input: {
2399
+ readonly encoding: "application/json";
2400
+ readonly schema: {
2401
+ readonly type: "object";
2402
+ readonly required: ["draft"];
2403
+ readonly properties: {
2404
+ readonly draft: {
2405
+ readonly type: "ref";
2406
+ readonly ref: "lex:app.bsky.draft.defs#draftWithId";
2407
+ };
2408
+ };
2409
+ };
2410
+ };
2411
+ };
2412
+ };
2413
+ };
2043
2414
  readonly AppBskyEmbedDefs: {
2044
2415
  readonly lexicon: 1;
2045
2416
  readonly id: "app.bsky.embed.defs";
@@ -18781,7 +19152,7 @@ export declare const schemas: ({
18781
19152
  readonly type: "array";
18782
19153
  readonly items: {
18783
19154
  readonly type: "union";
18784
- readonly refs: ["lex:app.bsky.actor.defs#adultContentPref", "lex:app.bsky.actor.defs#contentLabelPref", "lex:app.bsky.actor.defs#savedFeedsPref", "lex:app.bsky.actor.defs#savedFeedsPrefV2", "lex:app.bsky.actor.defs#personalDetailsPref", "lex:app.bsky.actor.defs#declaredAgePref", "lex:app.bsky.actor.defs#feedViewPref", "lex:app.bsky.actor.defs#threadViewPref", "lex:app.bsky.actor.defs#interestsPref", "lex:app.bsky.actor.defs#mutedWordsPref", "lex:app.bsky.actor.defs#hiddenPostsPref", "lex:app.bsky.actor.defs#bskyAppStatePref", "lex:app.bsky.actor.defs#labelersPref", "lex:app.bsky.actor.defs#postInteractionSettingsPref", "lex:app.bsky.actor.defs#verificationPrefs"];
19155
+ readonly refs: ["lex:app.bsky.actor.defs#adultContentPref", "lex:app.bsky.actor.defs#contentLabelPref", "lex:app.bsky.actor.defs#savedFeedsPref", "lex:app.bsky.actor.defs#savedFeedsPrefV2", "lex:app.bsky.actor.defs#personalDetailsPref", "lex:app.bsky.actor.defs#declaredAgePref", "lex:app.bsky.actor.defs#feedViewPref", "lex:app.bsky.actor.defs#threadViewPref", "lex:app.bsky.actor.defs#interestsPref", "lex:app.bsky.actor.defs#mutedWordsPref", "lex:app.bsky.actor.defs#hiddenPostsPref", "lex:app.bsky.actor.defs#bskyAppStatePref", "lex:app.bsky.actor.defs#labelersPref", "lex:app.bsky.actor.defs#postInteractionSettingsPref", "lex:app.bsky.actor.defs#verificationPrefs", "lex:app.bsky.actor.defs#liveEventPreferences"];
18785
19156
  };
18786
19157
  };
18787
19158
  readonly adultContentPref: {
@@ -19121,6 +19492,24 @@ export declare const schemas: ({
19121
19492
  };
19122
19493
  };
19123
19494
  };
19495
+ readonly liveEventPreferences: {
19496
+ readonly type: "object";
19497
+ readonly description: "Preferences for live events.";
19498
+ readonly properties: {
19499
+ readonly hiddenFeedIds: {
19500
+ readonly description: "A list of feed IDs that the user has hidden from live events.";
19501
+ readonly type: "array";
19502
+ readonly items: {
19503
+ readonly type: "string";
19504
+ };
19505
+ };
19506
+ readonly hideAllFeeds: {
19507
+ readonly description: "Whether to hide all feeds from live events.";
19508
+ readonly type: "boolean";
19509
+ readonly default: false;
19510
+ };
19511
+ };
19512
+ };
19124
19513
  readonly postInteractionSettingsPref: {
19125
19514
  readonly type: "object";
19126
19515
  readonly description: "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.";
@@ -20412,6 +20801,354 @@ export declare const schemas: ({
20412
20801
  }];
20413
20802
  };
20414
20803
  };
20804
+ } | {
20805
+ readonly lexicon: 1;
20806
+ readonly id: "app.bsky.draft.createDraft";
20807
+ readonly defs: {
20808
+ readonly main: {
20809
+ readonly type: "procedure";
20810
+ readonly description: "Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication.";
20811
+ readonly input: {
20812
+ readonly encoding: "application/json";
20813
+ readonly schema: {
20814
+ readonly type: "object";
20815
+ readonly required: ["draft"];
20816
+ readonly properties: {
20817
+ readonly draft: {
20818
+ readonly type: "ref";
20819
+ readonly ref: "lex:app.bsky.draft.defs#draft";
20820
+ };
20821
+ };
20822
+ };
20823
+ };
20824
+ readonly output: {
20825
+ readonly encoding: "application/json";
20826
+ readonly schema: {
20827
+ readonly type: "object";
20828
+ readonly required: ["id"];
20829
+ readonly properties: {
20830
+ readonly id: {
20831
+ readonly type: "string";
20832
+ readonly description: "The ID of the created draft.";
20833
+ };
20834
+ };
20835
+ };
20836
+ };
20837
+ readonly errors: [{
20838
+ readonly name: "DraftLimitReached";
20839
+ readonly description: "Trying to insert a new draft when the limit was already reached.";
20840
+ }];
20841
+ };
20842
+ };
20843
+ } | {
20844
+ readonly lexicon: 1;
20845
+ readonly id: "app.bsky.draft.defs";
20846
+ readonly defs: {
20847
+ readonly draftWithId: {
20848
+ readonly description: "A draft with an identifier, used to store drafts in private storage (stash).";
20849
+ readonly type: "object";
20850
+ readonly required: ["id", "draft"];
20851
+ readonly properties: {
20852
+ readonly id: {
20853
+ readonly description: "A TID to be used as a draft identifier.";
20854
+ readonly type: "string";
20855
+ readonly format: "tid";
20856
+ };
20857
+ readonly draft: {
20858
+ readonly type: "ref";
20859
+ readonly ref: "lex:app.bsky.draft.defs#draft";
20860
+ };
20861
+ };
20862
+ };
20863
+ readonly draft: {
20864
+ readonly description: "A draft containing an array of draft posts.";
20865
+ readonly type: "object";
20866
+ readonly required: ["posts"];
20867
+ readonly properties: {
20868
+ readonly posts: {
20869
+ readonly description: "Array of draft posts that compose this draft.";
20870
+ readonly type: "array";
20871
+ readonly minLength: 1;
20872
+ readonly maxLength: 100;
20873
+ readonly items: {
20874
+ readonly type: "ref";
20875
+ readonly ref: "lex:app.bsky.draft.defs#draftPost";
20876
+ };
20877
+ };
20878
+ readonly langs: {
20879
+ readonly type: "array";
20880
+ readonly description: "Indicates human language of posts primary text content.";
20881
+ readonly maxLength: 3;
20882
+ readonly items: {
20883
+ readonly type: "string";
20884
+ readonly format: "language";
20885
+ };
20886
+ };
20887
+ readonly postgateEmbeddingRules: {
20888
+ readonly description: "Embedding rules for the postgates to be created when this draft is published.";
20889
+ readonly type: "array";
20890
+ readonly maxLength: 5;
20891
+ readonly items: {
20892
+ readonly type: "union";
20893
+ readonly refs: ["lex:app.bsky.feed.postgate#disableRule"];
20894
+ };
20895
+ };
20896
+ readonly threadgateAllow: {
20897
+ readonly description: "Allow-rules for the threadgate to be created when this draft is published.";
20898
+ readonly type: "array";
20899
+ readonly maxLength: 5;
20900
+ readonly items: {
20901
+ readonly type: "union";
20902
+ readonly refs: ["lex:app.bsky.feed.threadgate#mentionRule", "lex:app.bsky.feed.threadgate#followerRule", "lex:app.bsky.feed.threadgate#followingRule", "lex:app.bsky.feed.threadgate#listRule"];
20903
+ };
20904
+ };
20905
+ };
20906
+ };
20907
+ readonly draftPost: {
20908
+ readonly description: "One of the posts that compose a draft.";
20909
+ readonly type: "object";
20910
+ readonly required: ["text"];
20911
+ readonly properties: {
20912
+ readonly text: {
20913
+ readonly type: "string";
20914
+ readonly maxLength: 3000;
20915
+ readonly maxGraphemes: 300;
20916
+ readonly description: "The primary post content.";
20917
+ };
20918
+ readonly labels: {
20919
+ readonly type: "union";
20920
+ readonly description: "Self-label values for this post. Effectively content warnings.";
20921
+ readonly refs: ["lex:com.atproto.label.defs#selfLabels"];
20922
+ };
20923
+ readonly embedImages: {
20924
+ readonly type: "array";
20925
+ readonly items: {
20926
+ readonly type: "ref";
20927
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedImage";
20928
+ };
20929
+ readonly maxLength: 4;
20930
+ };
20931
+ readonly embedVideos: {
20932
+ readonly type: "array";
20933
+ readonly items: {
20934
+ readonly type: "ref";
20935
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedVideo";
20936
+ };
20937
+ readonly maxLength: 1;
20938
+ };
20939
+ readonly embedExternals: {
20940
+ readonly type: "array";
20941
+ readonly items: {
20942
+ readonly type: "ref";
20943
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedExternal";
20944
+ };
20945
+ readonly maxLength: 1;
20946
+ };
20947
+ readonly embedRecords: {
20948
+ readonly type: "array";
20949
+ readonly items: {
20950
+ readonly type: "ref";
20951
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedRecord";
20952
+ };
20953
+ readonly maxLength: 1;
20954
+ };
20955
+ };
20956
+ };
20957
+ readonly draftView: {
20958
+ readonly description: "View to present drafts data to users.";
20959
+ readonly type: "object";
20960
+ readonly required: ["id", "draft", "createdAt", "updatedAt"];
20961
+ readonly properties: {
20962
+ readonly id: {
20963
+ readonly description: "A TID to be used as a draft identifier.";
20964
+ readonly type: "string";
20965
+ readonly format: "tid";
20966
+ };
20967
+ readonly draft: {
20968
+ readonly type: "ref";
20969
+ readonly ref: "lex:app.bsky.draft.defs#draft";
20970
+ };
20971
+ readonly createdAt: {
20972
+ readonly description: "The time the draft was created.";
20973
+ readonly type: "string";
20974
+ readonly format: "datetime";
20975
+ };
20976
+ readonly updatedAt: {
20977
+ readonly description: "The time the draft was last updated.";
20978
+ readonly type: "string";
20979
+ readonly format: "datetime";
20980
+ };
20981
+ };
20982
+ };
20983
+ readonly draftEmbedLocalRef: {
20984
+ readonly type: "object";
20985
+ readonly required: ["path"];
20986
+ readonly properties: {
20987
+ readonly path: {
20988
+ readonly type: "string";
20989
+ readonly description: "Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts.";
20990
+ readonly minLength: 1;
20991
+ readonly maxLength: 1024;
20992
+ };
20993
+ };
20994
+ };
20995
+ readonly draftEmbedCaption: {
20996
+ readonly type: "object";
20997
+ readonly required: ["lang", "content"];
20998
+ readonly properties: {
20999
+ readonly lang: {
21000
+ readonly type: "string";
21001
+ readonly format: "language";
21002
+ };
21003
+ readonly content: {
21004
+ readonly type: "string";
21005
+ readonly maxLength: 10000;
21006
+ };
21007
+ };
21008
+ };
21009
+ readonly draftEmbedImage: {
21010
+ readonly type: "object";
21011
+ readonly required: ["localRef"];
21012
+ readonly properties: {
21013
+ readonly localRef: {
21014
+ readonly type: "ref";
21015
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedLocalRef";
21016
+ };
21017
+ readonly alt: {
21018
+ readonly type: "string";
21019
+ readonly maxGraphemes: 2000;
21020
+ };
21021
+ };
21022
+ };
21023
+ readonly draftEmbedVideo: {
21024
+ readonly type: "object";
21025
+ readonly required: ["localRef"];
21026
+ readonly properties: {
21027
+ readonly localRef: {
21028
+ readonly type: "ref";
21029
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedLocalRef";
21030
+ };
21031
+ readonly alt: {
21032
+ readonly type: "string";
21033
+ readonly maxGraphemes: 2000;
21034
+ };
21035
+ readonly captions: {
21036
+ readonly type: "array";
21037
+ readonly items: {
21038
+ readonly type: "ref";
21039
+ readonly ref: "lex:app.bsky.draft.defs#draftEmbedCaption";
21040
+ };
21041
+ readonly maxLength: 20;
21042
+ };
21043
+ };
21044
+ };
21045
+ readonly draftEmbedExternal: {
21046
+ readonly type: "object";
21047
+ readonly required: ["uri"];
21048
+ readonly properties: {
21049
+ readonly uri: {
21050
+ readonly type: "string";
21051
+ readonly format: "uri";
21052
+ };
21053
+ };
21054
+ };
21055
+ readonly draftEmbedRecord: {
21056
+ readonly type: "object";
21057
+ readonly required: ["record"];
21058
+ readonly properties: {
21059
+ readonly record: {
21060
+ readonly type: "ref";
21061
+ readonly ref: "lex:com.atproto.repo.strongRef";
21062
+ };
21063
+ };
21064
+ };
21065
+ };
21066
+ } | {
21067
+ readonly lexicon: 1;
21068
+ readonly id: "app.bsky.draft.deleteDraft";
21069
+ readonly defs: {
21070
+ readonly main: {
21071
+ readonly type: "procedure";
21072
+ readonly description: "Deletes a draft by ID. Requires authentication.";
21073
+ readonly input: {
21074
+ readonly encoding: "application/json";
21075
+ readonly schema: {
21076
+ readonly type: "object";
21077
+ readonly required: ["id"];
21078
+ readonly properties: {
21079
+ readonly id: {
21080
+ readonly type: "string";
21081
+ readonly format: "tid";
21082
+ };
21083
+ };
21084
+ };
21085
+ };
21086
+ };
21087
+ };
21088
+ } | {
21089
+ readonly lexicon: 1;
21090
+ readonly id: "app.bsky.draft.getDrafts";
21091
+ readonly defs: {
21092
+ readonly main: {
21093
+ readonly type: "query";
21094
+ readonly description: "Gets views of user drafts. Requires authentication.";
21095
+ readonly parameters: {
21096
+ readonly type: "params";
21097
+ readonly properties: {
21098
+ readonly limit: {
21099
+ readonly type: "integer";
21100
+ readonly minimum: 1;
21101
+ readonly maximum: 100;
21102
+ readonly default: 50;
21103
+ };
21104
+ readonly cursor: {
21105
+ readonly type: "string";
21106
+ };
21107
+ };
21108
+ };
21109
+ readonly output: {
21110
+ readonly encoding: "application/json";
21111
+ readonly schema: {
21112
+ readonly type: "object";
21113
+ readonly required: ["drafts"];
21114
+ readonly properties: {
21115
+ readonly cursor: {
21116
+ readonly type: "string";
21117
+ };
21118
+ readonly drafts: {
21119
+ readonly type: "array";
21120
+ readonly items: {
21121
+ readonly type: "ref";
21122
+ readonly ref: "lex:app.bsky.draft.defs#draftView";
21123
+ };
21124
+ };
21125
+ };
21126
+ };
21127
+ };
21128
+ };
21129
+ };
21130
+ } | {
21131
+ readonly lexicon: 1;
21132
+ readonly id: "app.bsky.draft.updateDraft";
21133
+ readonly defs: {
21134
+ readonly main: {
21135
+ readonly type: "procedure";
21136
+ readonly description: "Updates a draft using private storage (stash). If the draft ID points to a non-existing ID, the update will be silently ignored. This is done because updates don't enforce draft limit, so it accepts all writes, but will ignore invalid ones. Requires authentication.";
21137
+ readonly input: {
21138
+ readonly encoding: "application/json";
21139
+ readonly schema: {
21140
+ readonly type: "object";
21141
+ readonly required: ["draft"];
21142
+ readonly properties: {
21143
+ readonly draft: {
21144
+ readonly type: "ref";
21145
+ readonly ref: "lex:app.bsky.draft.defs#draftWithId";
21146
+ };
21147
+ };
21148
+ };
21149
+ };
21150
+ };
21151
+ };
20415
21152
  } | {
20416
21153
  readonly lexicon: 1;
20417
21154
  readonly id: "app.bsky.embed.defs";
@@ -36530,6 +37267,11 @@ export declare const ids: {
36530
37267
  readonly AppBskyContactSendNotification: "app.bsky.contact.sendNotification";
36531
37268
  readonly AppBskyContactStartPhoneVerification: "app.bsky.contact.startPhoneVerification";
36532
37269
  readonly AppBskyContactVerifyPhone: "app.bsky.contact.verifyPhone";
37270
+ readonly AppBskyDraftCreateDraft: "app.bsky.draft.createDraft";
37271
+ readonly AppBskyDraftDefs: "app.bsky.draft.defs";
37272
+ readonly AppBskyDraftDeleteDraft: "app.bsky.draft.deleteDraft";
37273
+ readonly AppBskyDraftGetDrafts: "app.bsky.draft.getDrafts";
37274
+ readonly AppBskyDraftUpdateDraft: "app.bsky.draft.updateDraft";
36533
37275
  readonly AppBskyEmbedDefs: "app.bsky.embed.defs";
36534
37276
  readonly AppBskyEmbedExternal: "app.bsky.embed.external";
36535
37277
  readonly AppBskyEmbedImages: "app.bsky.embed.images";