@atcute/whitewind 2.0.1 → 3.0.1

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 (38) hide show
  1. package/README.md +23 -8
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +2 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/lexicons/index.d.ts +6 -0
  6. package/dist/lexicons/index.js +7 -0
  7. package/dist/lexicons/index.js.map +1 -0
  8. package/dist/lexicons/types/com/whtwnd/blog/defs.d.ts +47 -0
  9. package/dist/lexicons/types/com/whtwnd/blog/defs.js +27 -0
  10. package/dist/lexicons/types/com/whtwnd/blog/defs.js.map +1 -0
  11. package/dist/lexicons/types/com/whtwnd/blog/entry.d.ts +26 -0
  12. package/dist/lexicons/types/com/whtwnd/blog/entry.js +24 -0
  13. package/dist/lexicons/types/com/whtwnd/blog/entry.js.map +1 -0
  14. package/dist/lexicons/types/com/whtwnd/blog/getAuthorPosts.d.ts +20 -0
  15. package/dist/lexicons/types/com/whtwnd/blog/getAuthorPosts.js +17 -0
  16. package/dist/lexicons/types/com/whtwnd/blog/getAuthorPosts.js.map +1 -0
  17. package/dist/lexicons/types/com/whtwnd/blog/getEntryMetadataByName.d.ts +22 -0
  18. package/dist/lexicons/types/com/whtwnd/blog/getEntryMetadataByName.js +17 -0
  19. package/dist/lexicons/types/com/whtwnd/blog/getEntryMetadataByName.js.map +1 -0
  20. package/dist/lexicons/types/com/whtwnd/blog/getMentionsByEntry.d.ts +19 -0
  21. package/dist/lexicons/types/com/whtwnd/blog/getMentionsByEntry.js +14 -0
  22. package/dist/lexicons/types/com/whtwnd/blog/getMentionsByEntry.js.map +1 -0
  23. package/dist/lexicons/types/com/whtwnd/blog/notifyOfNewEntry.d.ts +20 -0
  24. package/dist/lexicons/types/com/whtwnd/blog/notifyOfNewEntry.js +16 -0
  25. package/dist/lexicons/types/com/whtwnd/blog/notifyOfNewEntry.js.map +1 -0
  26. package/lib/index.ts +1 -0
  27. package/lib/lexicons/index.ts +6 -0
  28. package/lib/lexicons/types/com/whtwnd/blog/defs.ts +44 -0
  29. package/lib/lexicons/types/com/whtwnd/blog/entry.ts +42 -0
  30. package/lib/lexicons/types/com/whtwnd/blog/getAuthorPosts.ts +30 -0
  31. package/lib/lexicons/types/com/whtwnd/blog/getEntryMetadataByName.ts +30 -0
  32. package/lib/lexicons/types/com/whtwnd/blog/getMentionsByEntry.ts +27 -0
  33. package/lib/lexicons/types/com/whtwnd/blog/notifyOfNewEntry.ts +29 -0
  34. package/package.json +14 -8
  35. package/dist/lexicons.d.ts +0 -142
  36. package/dist/lexicons.js +0 -8
  37. package/dist/lexicons.js.map +0 -1
  38. package/lib/lexicons.ts +0 -144
package/README.md CHANGED
@@ -1,30 +1,45 @@
1
1
  # @atcute/whitewind
2
2
 
3
- [WhiteWind](https://whtwnd.com) type definitions for `@atcute/client`, a lightweight and cute API
4
- client for AT Protocol.
3
+ [WhiteWind](https://whtwnd.com) (com.whtwnd.\*) schema definitions
5
4
 
6
5
  ## usage
7
6
 
8
- you'd need to import `@atcute/whitewind/lexicons` into your project, either by adding it into the
9
- `types` field in `tsconfig.json` or by importing it on your source code.
7
+ ```ts
8
+ import { is } from '@atcute/lexicons';
9
+ import { ComWhtwndBlogEntry } from '@atcute/whitewind';
10
+
11
+ const record: ComWhtwndBlogEntry.Main = {
12
+ $type: 'com.whtwnd.blog.entry',
13
+ content: `# Hello world!`,
14
+ visibility: 'public',
15
+ createdAt: '2025-05-07T10:00:00.000Z',
16
+ };
17
+
18
+ is(ComWhtwndBlogEntry.mainSchema, record);
19
+ // -> true
20
+ ```
21
+
22
+ ### with `@atcute/client`
23
+
24
+ pick either one of these 3 options to register the ambient declarations
10
25
 
11
26
  ```jsonc
12
27
  // tsconfig.json
13
28
  {
14
29
  "compilerOptions": {
15
- "types": ["@atcute/whitewind/lexicons"],
30
+ "types": ["@atcute/whitewind"],
16
31
  },
17
32
  }
18
33
  ```
19
34
 
20
35
  ```ts
21
36
  // env.d.ts
22
- /// <reference types="@atcute/whitewind/lexicons" />
37
+ /// <reference types="@atcute/whitewind" />
23
38
  ```
24
39
 
25
40
  ```ts
26
41
  // index.ts
27
- import '@atcute/whitewind/lexicons';
42
+ import type {} from '@atcute/whitewind';
28
43
  ```
29
44
 
30
- newly added lexicons are augmented to `@atcute/client/lexicons` module
45
+ now all the XRPC operations should be visible in the client
@@ -0,0 +1 @@
1
+ export * from './lexicons/index.js';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './lexicons/index.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * as ComWhtwndBlogDefs from './types/com/whtwnd/blog/defs.js';
2
+ export * as ComWhtwndBlogEntry from './types/com/whtwnd/blog/entry.js';
3
+ export * as ComWhtwndBlogGetAuthorPosts from './types/com/whtwnd/blog/getAuthorPosts.js';
4
+ export * as ComWhtwndBlogGetEntryMetadataByName from './types/com/whtwnd/blog/getEntryMetadataByName.js';
5
+ export * as ComWhtwndBlogGetMentionsByEntry from './types/com/whtwnd/blog/getMentionsByEntry.js';
6
+ export * as ComWhtwndBlogNotifyOfNewEntry from './types/com/whtwnd/blog/notifyOfNewEntry.js';
@@ -0,0 +1,7 @@
1
+ export * as ComWhtwndBlogDefs from './types/com/whtwnd/blog/defs.js';
2
+ export * as ComWhtwndBlogEntry from './types/com/whtwnd/blog/entry.js';
3
+ export * as ComWhtwndBlogGetAuthorPosts from './types/com/whtwnd/blog/getAuthorPosts.js';
4
+ export * as ComWhtwndBlogGetEntryMetadataByName from './types/com/whtwnd/blog/getEntryMetadataByName.js';
5
+ export * as ComWhtwndBlogGetMentionsByEntry from './types/com/whtwnd/blog/getMentionsByEntry.js';
6
+ export * as ComWhtwndBlogNotifyOfNewEntry from './types/com/whtwnd/blog/notifyOfNewEntry.js';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/lexicons/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,kBAAkB,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,2BAA2B,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,mCAAmC,MAAM,mDAAmD,CAAC;AACzG,OAAO,KAAK,+BAA+B,MAAM,+CAA+C,CAAC;AACjG,OAAO,KAAK,6BAA6B,MAAM,6CAA6C,CAAC"}
@@ -0,0 +1,47 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ declare const _blobMetadataSchema: v.ObjectSchema<{
3
+ $type: v.OptionalSchema<v.LiteralSchema<"com.whtwnd.blog.defs#blobMetadata">, undefined>;
4
+ blobref: v.BlobSchema;
5
+ name: v.OptionalSchema<v.StringSchema<string>, undefined>;
6
+ }>;
7
+ declare const _blogEntrySchema: v.ObjectSchema<{
8
+ $type: v.OptionalSchema<v.LiteralSchema<"com.whtwnd.blog.defs#blogEntry">, undefined>;
9
+ content: v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 100000>]>;
10
+ createdAt: v.OptionalSchema<v.FormattedStringSchema<"datetime">, undefined>;
11
+ }>;
12
+ declare const _commentSchema: v.ObjectSchema<{
13
+ $type: v.OptionalSchema<v.LiteralSchema<"com.whtwnd.blog.defs#comment">, undefined>;
14
+ content: v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 1000>]>;
15
+ entryUri: v.FormattedStringSchema<"at-uri">;
16
+ }>;
17
+ declare const _ogpSchema: v.ObjectSchema<{
18
+ $type: v.OptionalSchema<v.LiteralSchema<"com.whtwnd.blog.defs#ogp">, undefined>;
19
+ url: v.FormattedStringSchema<"uri">;
20
+ width: v.OptionalSchema<v.IntegerSchema, undefined>;
21
+ height: v.OptionalSchema<v.IntegerSchema, undefined>;
22
+ }>;
23
+ type blobMetadata$schematype = typeof _blobMetadataSchema;
24
+ type blogEntry$schematype = typeof _blogEntrySchema;
25
+ type comment$schematype = typeof _commentSchema;
26
+ type ogp$schematype = typeof _ogpSchema;
27
+ export interface blobMetadataSchema extends blobMetadata$schematype {
28
+ }
29
+ export interface blogEntrySchema extends blogEntry$schematype {
30
+ }
31
+ export interface commentSchema extends comment$schematype {
32
+ }
33
+ export interface ogpSchema extends ogp$schematype {
34
+ }
35
+ export declare const blobMetadataSchema: blobMetadataSchema;
36
+ export declare const blogEntrySchema: blogEntrySchema;
37
+ export declare const commentSchema: commentSchema;
38
+ export declare const ogpSchema: ogpSchema;
39
+ export interface BlobMetadata extends v.InferInput<typeof blobMetadataSchema> {
40
+ }
41
+ export interface BlogEntry extends v.InferInput<typeof blogEntrySchema> {
42
+ }
43
+ export interface Comment extends v.InferInput<typeof commentSchema> {
44
+ }
45
+ export interface Ogp extends v.InferInput<typeof ogpSchema> {
46
+ }
47
+ export {};
@@ -0,0 +1,27 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ const _blobMetadataSchema = /*#__PURE__*/ v.object({
3
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('com.whtwnd.blog.defs#blobMetadata')),
4
+ blobref: /*#__PURE__*/ v.blob(),
5
+ name: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
6
+ });
7
+ const _blogEntrySchema = /*#__PURE__*/ v.object({
8
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('com.whtwnd.blog.defs#blogEntry')),
9
+ content: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 100000)]),
10
+ createdAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
11
+ });
12
+ const _commentSchema = /*#__PURE__*/ v.object({
13
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('com.whtwnd.blog.defs#comment')),
14
+ content: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 1000)]),
15
+ entryUri: /*#__PURE__*/ v.resourceUriString(),
16
+ });
17
+ const _ogpSchema = /*#__PURE__*/ v.object({
18
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('com.whtwnd.blog.defs#ogp')),
19
+ url: /*#__PURE__*/ v.genericUriString(),
20
+ width: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()),
21
+ height: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()),
22
+ });
23
+ export const blobMetadataSchema = _blobMetadataSchema;
24
+ export const blogEntrySchema = _blogEntrySchema;
25
+ export const commentSchema = _commentSchema;
26
+ export const ogpSchema = _ogpSchema;
27
+ //# sourceMappingURL=defs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/com/whtwnd/blog/defs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,MAAM,mBAAmB,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAClD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;IAC7F,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE;IAC/B,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACxD,CAAC,CAAC;AACH,MAAM,gBAAgB,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC1F,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACvG,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;CACrE,CAAC,CAAC;AACH,MAAM,cAAc,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACxF,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IACrG,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE;CAC7C,CAAC,CAAC;AACH,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IACzC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACpF,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,gBAAgB,EAAE;IACvC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAC1D,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;CAC3D,CAAC,CAAC;AAYH,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAyC,CAAC;AAC5E,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAmC,CAAC;AACnE,MAAM,CAAC,MAAM,aAAa,GAAG,cAA+B,CAAC;AAC7D,MAAM,CAAC,MAAM,SAAS,GAAG,UAAuB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as ComWhtwndBlogDefs from './defs.js';
3
+ declare const _mainSchema: v.RecordSchema<v.ObjectSchema<{
4
+ $type: v.LiteralSchema<"com.whtwnd.blog.entry">;
5
+ content: v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 100000>]>;
6
+ createdAt: v.OptionalSchema<v.FormattedStringSchema<"datetime">, undefined>;
7
+ title: v.OptionalSchema<v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 1000>]>, undefined>;
8
+ subtitle: v.OptionalSchema<v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 1000>]>, undefined>;
9
+ readonly ogp: v.OptionalSchema<ComWhtwndBlogDefs.ogpSchema, undefined>;
10
+ theme: v.OptionalSchema<v.LiteralEnumSchema<readonly ["github-light"]>, undefined>;
11
+ readonly blobs: v.OptionalSchema<v.ArraySchema<ComWhtwndBlogDefs.blobMetadataSchema>, undefined>;
12
+ isDraft: v.OptionalSchema<v.BooleanSchema, undefined>;
13
+ visibility: v.LiteralEnumSchema<readonly ["public", "url", "author"]>;
14
+ }>, v.FormattedStringSchema<"tid">>;
15
+ type main$schematype = typeof _mainSchema;
16
+ export interface mainSchema extends main$schematype {
17
+ }
18
+ export declare const mainSchema: mainSchema;
19
+ export interface Main extends v.InferInput<typeof mainSchema> {
20
+ }
21
+ declare module '@atcute/lexicons/ambient' {
22
+ interface Records {
23
+ 'com.whtwnd.blog.entry': mainSchema;
24
+ }
25
+ }
26
+ export {};
@@ -0,0 +1,24 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as ComWhtwndBlogDefs from './defs.js';
3
+ const _mainSchema = /*#__PURE__*/ v.record(
4
+ /*#__PURE__*/ v.tidString(),
5
+ /*#__PURE__*/ v.object({
6
+ $type: /*#__PURE__*/ v.literal('com.whtwnd.blog.entry'),
7
+ content: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 100000)]),
8
+ createdAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
9
+ title: /*#__PURE__*/ v.optional(
10
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 1000)])),
11
+ subtitle: /*#__PURE__*/ v.optional(
12
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 1000)])),
13
+ get ogp() {
14
+ return /*#__PURE__*/ v.optional(ComWhtwndBlogDefs.ogpSchema);
15
+ },
16
+ theme: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literalEnum(['github-light'])),
17
+ get blobs() {
18
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(ComWhtwndBlogDefs.blobMetadataSchema));
19
+ },
20
+ isDraft: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()),
21
+ visibility: /*#__PURE__*/ v.literalEnum(['public', 'url', 'author']),
22
+ }));
23
+ export const mainSchema = _mainSchema;
24
+ //# sourceMappingURL=entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/com/whtwnd/blog/entry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,OAAO,KAAK,iBAAiB,MAAM,WAAW,CAAC;AAE/C,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM;AACzC,aAAa,CAAC,CAAC,CAAC,SAAS,EAAE;AAC3B,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,uBAAuB,CAAC;IACvD,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACvG,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;IACrE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ;IAC9B,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAC5F;IACD,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ;IACjC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAC5F;IACD,IAAI,GAAG;QACN,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC;IACD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;IAC9E,IAAI,KAAK;QACR,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC9F,CAAC;IACD,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAC5D,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;CACpE,CAAC,CACF,CAAC;AAMF,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as ComWhtwndBlogDefs from './defs.js';
3
+ declare const _mainSchema: v.XRPCQueryMetadata<v.ObjectSchema<{
4
+ author: v.FormattedStringSchema<"did">;
5
+ }>, {
6
+ type: "lex";
7
+ schema: v.ObjectSchema<{
8
+ readonly post: v.ArraySchema<ComWhtwndBlogDefs.blogEntrySchema>;
9
+ }>;
10
+ }, "com.whtwnd.blog.getAuthorPosts">;
11
+ type main$schematype = typeof _mainSchema;
12
+ export interface mainSchema extends main$schematype {
13
+ }
14
+ export declare const mainSchema: mainSchema;
15
+ declare module '@atcute/lexicons/ambient' {
16
+ interface XRPCQueries {
17
+ 'com.whtwnd.blog.getAuthorPosts': mainSchema;
18
+ }
19
+ }
20
+ export {};
@@ -0,0 +1,17 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as ComWhtwndBlogDefs from './defs.js';
3
+ const _mainSchema = /*#__PURE__*/ v.query('com.whtwnd.blog.getAuthorPosts', {
4
+ params: /*#__PURE__*/ v.object({
5
+ author: /*#__PURE__*/ v.didString(),
6
+ }),
7
+ output: {
8
+ type: 'lex',
9
+ schema: /*#__PURE__*/ v.object({
10
+ get post() {
11
+ return /*#__PURE__*/ v.array(ComWhtwndBlogDefs.blogEntrySchema);
12
+ },
13
+ }),
14
+ },
15
+ });
16
+ export const mainSchema = _mainSchema;
17
+ //# sourceMappingURL=getAuthorPosts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAuthorPosts.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/com/whtwnd/blog/getAuthorPosts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,OAAO,KAAK,iBAAiB,MAAM,WAAW,CAAC;AAE/C,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,gCAAgC,EAAE;IAC3E,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;QAC9B,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,EAAE;KACnC,CAAC;IACF,MAAM,EAAE;QACP,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;YAC9B,IAAI,IAAI;gBACP,OAAO,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;YACjE,CAAC;SACD,CAAC;KACF;CACD,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ declare const _mainSchema: v.XRPCQueryMetadata<v.ObjectSchema<{
3
+ author: v.FormattedStringSchema<"at-identifier">;
4
+ entryTitle: v.StringSchema<string>;
5
+ }>, {
6
+ type: "lex";
7
+ schema: v.ObjectSchema<{
8
+ entryUri: v.FormattedStringSchema<"at-uri">;
9
+ lastUpdate: v.OptionalSchema<v.FormattedStringSchema<"datetime">, undefined>;
10
+ cid: v.OptionalSchema<v.StringSchema<string>, undefined>;
11
+ }>;
12
+ }, "com.whtwnd.blog.getEntryMetadataByName">;
13
+ type main$schematype = typeof _mainSchema;
14
+ export interface mainSchema extends main$schematype {
15
+ }
16
+ export declare const mainSchema: mainSchema;
17
+ declare module '@atcute/lexicons/ambient' {
18
+ interface XRPCQueries {
19
+ 'com.whtwnd.blog.getEntryMetadataByName': mainSchema;
20
+ }
21
+ }
22
+ export {};
@@ -0,0 +1,17 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ const _mainSchema = /*#__PURE__*/ v.query('com.whtwnd.blog.getEntryMetadataByName', {
3
+ params: /*#__PURE__*/ v.object({
4
+ author: /*#__PURE__*/ v.actorIdentifierString(),
5
+ entryTitle: /*#__PURE__*/ v.string(),
6
+ }),
7
+ output: {
8
+ type: 'lex',
9
+ schema: /*#__PURE__*/ v.object({
10
+ entryUri: /*#__PURE__*/ v.resourceUriString(),
11
+ lastUpdate: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
12
+ cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
13
+ }),
14
+ },
15
+ });
16
+ export const mainSchema = _mainSchema;
17
+ //# sourceMappingURL=getEntryMetadataByName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getEntryMetadataByName.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/com/whtwnd/blog/getEntryMetadataByName.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAGlD,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,wCAAwC,EAAE;IACnF,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;QAC9B,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,qBAAqB,EAAE;QAC/C,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE;KACpC,CAAC;IACF,MAAM,EAAE;QACP,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;YAC9B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE;YAC7C,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;YACtE,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACvD,CAAC;KACF;CACD,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ declare const _mainSchema: v.XRPCQueryMetadata<v.ObjectSchema<{
3
+ postUri: v.FormattedStringSchema<"at-uri">;
4
+ }>, {
5
+ type: "lex";
6
+ schema: v.ObjectSchema<{
7
+ mentions: v.ArraySchema<v.FormattedStringSchema<"at-uri">>;
8
+ }>;
9
+ }, "com.whtwnd.blog.getMentionsByEntry">;
10
+ type main$schematype = typeof _mainSchema;
11
+ export interface mainSchema extends main$schematype {
12
+ }
13
+ export declare const mainSchema: mainSchema;
14
+ declare module '@atcute/lexicons/ambient' {
15
+ interface XRPCQueries {
16
+ 'com.whtwnd.blog.getMentionsByEntry': mainSchema;
17
+ }
18
+ }
19
+ export {};
@@ -0,0 +1,14 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ const _mainSchema = /*#__PURE__*/ v.query('com.whtwnd.blog.getMentionsByEntry', {
3
+ params: /*#__PURE__*/ v.object({
4
+ postUri: /*#__PURE__*/ v.resourceUriString(),
5
+ }),
6
+ output: {
7
+ type: 'lex',
8
+ schema: /*#__PURE__*/ v.object({
9
+ mentions: /*#__PURE__*/ v.array(/*#__PURE__*/ v.resourceUriString()),
10
+ }),
11
+ },
12
+ });
13
+ export const mainSchema = _mainSchema;
14
+ //# sourceMappingURL=getMentionsByEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getMentionsByEntry.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/com/whtwnd/blog/getMentionsByEntry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAGlD,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,oCAAoC,EAAE;IAC/E,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;QAC9B,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE;KAC5C,CAAC;IACF,MAAM,EAAE;QACP,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;YAC9B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;SACpE,CAAC;KACF;CACD,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ declare const _mainSchema: v.XRPCProcedureMetadata<null, {
3
+ type: "lex";
4
+ schema: v.ObjectSchema<{
5
+ entryUri: v.FormattedStringSchema<"at-uri">;
6
+ }>;
7
+ }, {
8
+ type: "lex";
9
+ schema: v.ObjectSchema<{}>;
10
+ }, "com.whtwnd.blog.notifyOfNewEntry">;
11
+ type main$schematype = typeof _mainSchema;
12
+ export interface mainSchema extends main$schematype {
13
+ }
14
+ export declare const mainSchema: mainSchema;
15
+ declare module '@atcute/lexicons/ambient' {
16
+ interface XRPCProcedures {
17
+ 'com.whtwnd.blog.notifyOfNewEntry': mainSchema;
18
+ }
19
+ }
20
+ export {};
@@ -0,0 +1,16 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ const _mainSchema = /*#__PURE__*/ v.procedure('com.whtwnd.blog.notifyOfNewEntry', {
3
+ params: null,
4
+ input: {
5
+ type: 'lex',
6
+ schema: /*#__PURE__*/ v.object({
7
+ entryUri: /*#__PURE__*/ v.resourceUriString(),
8
+ }),
9
+ },
10
+ output: {
11
+ type: 'lex',
12
+ schema: /*#__PURE__*/ v.object({}),
13
+ },
14
+ });
15
+ export const mainSchema = _mainSchema;
16
+ //# sourceMappingURL=notifyOfNewEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifyOfNewEntry.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/com/whtwnd/blog/notifyOfNewEntry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAGlD,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,kCAAkC,EAAE;IACjF,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE;QACN,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;YAC9B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE;SAC7C,CAAC;KACF;IACD,MAAM,EAAE;QACP,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;KAClC;CACD,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
package/lib/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lexicons/index.js';
@@ -0,0 +1,6 @@
1
+ export * as ComWhtwndBlogDefs from './types/com/whtwnd/blog/defs.js';
2
+ export * as ComWhtwndBlogEntry from './types/com/whtwnd/blog/entry.js';
3
+ export * as ComWhtwndBlogGetAuthorPosts from './types/com/whtwnd/blog/getAuthorPosts.js';
4
+ export * as ComWhtwndBlogGetEntryMetadataByName from './types/com/whtwnd/blog/getEntryMetadataByName.js';
5
+ export * as ComWhtwndBlogGetMentionsByEntry from './types/com/whtwnd/blog/getMentionsByEntry.js';
6
+ export * as ComWhtwndBlogNotifyOfNewEntry from './types/com/whtwnd/blog/notifyOfNewEntry.js';
@@ -0,0 +1,44 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import * as v from '@atcute/lexicons/validations';
3
+
4
+ const _blobMetadataSchema = /*#__PURE__*/ v.object({
5
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('com.whtwnd.blog.defs#blobMetadata')),
6
+ blobref: /*#__PURE__*/ v.blob(),
7
+ name: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
8
+ });
9
+ const _blogEntrySchema = /*#__PURE__*/ v.object({
10
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('com.whtwnd.blog.defs#blogEntry')),
11
+ content: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 100000)]),
12
+ createdAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
13
+ });
14
+ const _commentSchema = /*#__PURE__*/ v.object({
15
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('com.whtwnd.blog.defs#comment')),
16
+ content: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 1000)]),
17
+ entryUri: /*#__PURE__*/ v.resourceUriString(),
18
+ });
19
+ const _ogpSchema = /*#__PURE__*/ v.object({
20
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('com.whtwnd.blog.defs#ogp')),
21
+ url: /*#__PURE__*/ v.genericUriString(),
22
+ width: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()),
23
+ height: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()),
24
+ });
25
+
26
+ type blobMetadata$schematype = typeof _blobMetadataSchema;
27
+ type blogEntry$schematype = typeof _blogEntrySchema;
28
+ type comment$schematype = typeof _commentSchema;
29
+ type ogp$schematype = typeof _ogpSchema;
30
+
31
+ export interface blobMetadataSchema extends blobMetadata$schematype {}
32
+ export interface blogEntrySchema extends blogEntry$schematype {}
33
+ export interface commentSchema extends comment$schematype {}
34
+ export interface ogpSchema extends ogp$schematype {}
35
+
36
+ export const blobMetadataSchema = _blobMetadataSchema as blobMetadataSchema;
37
+ export const blogEntrySchema = _blogEntrySchema as blogEntrySchema;
38
+ export const commentSchema = _commentSchema as commentSchema;
39
+ export const ogpSchema = _ogpSchema as ogpSchema;
40
+
41
+ export interface BlobMetadata extends v.InferInput<typeof blobMetadataSchema> {}
42
+ export interface BlogEntry extends v.InferInput<typeof blogEntrySchema> {}
43
+ export interface Comment extends v.InferInput<typeof commentSchema> {}
44
+ export interface Ogp extends v.InferInput<typeof ogpSchema> {}
@@ -0,0 +1,42 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import * as v from '@atcute/lexicons/validations';
3
+ import type {} from '@atcute/lexicons/ambient';
4
+ import * as ComWhtwndBlogDefs from './defs.js';
5
+
6
+ const _mainSchema = /*#__PURE__*/ v.record(
7
+ /*#__PURE__*/ v.tidString(),
8
+ /*#__PURE__*/ v.object({
9
+ $type: /*#__PURE__*/ v.literal('com.whtwnd.blog.entry'),
10
+ content: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 100000)]),
11
+ createdAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
12
+ title: /*#__PURE__*/ v.optional(
13
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 1000)]),
14
+ ),
15
+ subtitle: /*#__PURE__*/ v.optional(
16
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 1000)]),
17
+ ),
18
+ get ogp() {
19
+ return /*#__PURE__*/ v.optional(ComWhtwndBlogDefs.ogpSchema);
20
+ },
21
+ theme: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literalEnum(['github-light'])),
22
+ get blobs() {
23
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(ComWhtwndBlogDefs.blobMetadataSchema));
24
+ },
25
+ isDraft: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()),
26
+ visibility: /*#__PURE__*/ v.literalEnum(['public', 'url', 'author']),
27
+ }),
28
+ );
29
+
30
+ type main$schematype = typeof _mainSchema;
31
+
32
+ export interface mainSchema extends main$schematype {}
33
+
34
+ export const mainSchema = _mainSchema as mainSchema;
35
+
36
+ export interface Main extends v.InferInput<typeof mainSchema> {}
37
+
38
+ declare module '@atcute/lexicons/ambient' {
39
+ interface Records {
40
+ 'com.whtwnd.blog.entry': mainSchema;
41
+ }
42
+ }
@@ -0,0 +1,30 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import * as v from '@atcute/lexicons/validations';
3
+ import type {} from '@atcute/lexicons/ambient';
4
+ import * as ComWhtwndBlogDefs from './defs.js';
5
+
6
+ const _mainSchema = /*#__PURE__*/ v.query('com.whtwnd.blog.getAuthorPosts', {
7
+ params: /*#__PURE__*/ v.object({
8
+ author: /*#__PURE__*/ v.didString(),
9
+ }),
10
+ output: {
11
+ type: 'lex',
12
+ schema: /*#__PURE__*/ v.object({
13
+ get post() {
14
+ return /*#__PURE__*/ v.array(ComWhtwndBlogDefs.blogEntrySchema);
15
+ },
16
+ }),
17
+ },
18
+ });
19
+
20
+ type main$schematype = typeof _mainSchema;
21
+
22
+ export interface mainSchema extends main$schematype {}
23
+
24
+ export const mainSchema = _mainSchema as mainSchema;
25
+
26
+ declare module '@atcute/lexicons/ambient' {
27
+ interface XRPCQueries {
28
+ 'com.whtwnd.blog.getAuthorPosts': mainSchema;
29
+ }
30
+ }
@@ -0,0 +1,30 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import * as v from '@atcute/lexicons/validations';
3
+ import type {} from '@atcute/lexicons/ambient';
4
+
5
+ const _mainSchema = /*#__PURE__*/ v.query('com.whtwnd.blog.getEntryMetadataByName', {
6
+ params: /*#__PURE__*/ v.object({
7
+ author: /*#__PURE__*/ v.actorIdentifierString(),
8
+ entryTitle: /*#__PURE__*/ v.string(),
9
+ }),
10
+ output: {
11
+ type: 'lex',
12
+ schema: /*#__PURE__*/ v.object({
13
+ entryUri: /*#__PURE__*/ v.resourceUriString(),
14
+ lastUpdate: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
15
+ cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
16
+ }),
17
+ },
18
+ });
19
+
20
+ type main$schematype = typeof _mainSchema;
21
+
22
+ export interface mainSchema extends main$schematype {}
23
+
24
+ export const mainSchema = _mainSchema as mainSchema;
25
+
26
+ declare module '@atcute/lexicons/ambient' {
27
+ interface XRPCQueries {
28
+ 'com.whtwnd.blog.getEntryMetadataByName': mainSchema;
29
+ }
30
+ }
@@ -0,0 +1,27 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import * as v from '@atcute/lexicons/validations';
3
+ import type {} from '@atcute/lexicons/ambient';
4
+
5
+ const _mainSchema = /*#__PURE__*/ v.query('com.whtwnd.blog.getMentionsByEntry', {
6
+ params: /*#__PURE__*/ v.object({
7
+ postUri: /*#__PURE__*/ v.resourceUriString(),
8
+ }),
9
+ output: {
10
+ type: 'lex',
11
+ schema: /*#__PURE__*/ v.object({
12
+ mentions: /*#__PURE__*/ v.array(/*#__PURE__*/ v.resourceUriString()),
13
+ }),
14
+ },
15
+ });
16
+
17
+ type main$schematype = typeof _mainSchema;
18
+
19
+ export interface mainSchema extends main$schematype {}
20
+
21
+ export const mainSchema = _mainSchema as mainSchema;
22
+
23
+ declare module '@atcute/lexicons/ambient' {
24
+ interface XRPCQueries {
25
+ 'com.whtwnd.blog.getMentionsByEntry': mainSchema;
26
+ }
27
+ }
@@ -0,0 +1,29 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import * as v from '@atcute/lexicons/validations';
3
+ import type {} from '@atcute/lexicons/ambient';
4
+
5
+ const _mainSchema = /*#__PURE__*/ v.procedure('com.whtwnd.blog.notifyOfNewEntry', {
6
+ params: null,
7
+ input: {
8
+ type: 'lex',
9
+ schema: /*#__PURE__*/ v.object({
10
+ entryUri: /*#__PURE__*/ v.resourceUriString(),
11
+ }),
12
+ },
13
+ output: {
14
+ type: 'lex',
15
+ schema: /*#__PURE__*/ v.object({}),
16
+ },
17
+ });
18
+
19
+ type main$schematype = typeof _mainSchema;
20
+
21
+ export interface mainSchema extends main$schematype {}
22
+
23
+ export const mainSchema = _mainSchema as mainSchema;
24
+
25
+ declare module '@atcute/lexicons/ambient' {
26
+ interface XRPCProcedures {
27
+ 'com.whtwnd.blog.notifyOfNewEntry': mainSchema;
28
+ }
29
+ }
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@atcute/whitewind",
4
- "version": "2.0.1",
5
- "description": "WhiteWind type definitions for atcute",
4
+ "version": "3.0.1",
5
+ "description": "WhiteWind (com.whtwnd.*) schema definitions",
6
+ "keywords": [
7
+ "atcute",
8
+ "atproto",
9
+ "whitewind"
10
+ ],
6
11
  "license": "MIT",
7
12
  "repository": {
8
13
  "url": "https://github.com/mary-ext/atcute",
@@ -15,18 +20,19 @@
15
20
  "!lib/**/*.test.ts"
16
21
  ],
17
22
  "exports": {
18
- "./lexicons": "./dist/lexicons.js"
23
+ ".": "./dist/index.js",
24
+ "./types/*": "./dist/lexicons/types/com/whtwnd/*.js"
19
25
  },
20
- "peerDependencies": {
21
- "@atcute/client": "^3.0.0"
26
+ "dependencies": {
27
+ "@atcute/lexicons": "^1.0.1"
22
28
  },
23
29
  "devDependencies": {
24
- "@atcute/client": "^3.0.1",
25
- "@atcute/lex-cli": "^1.1.1"
30
+ "@atcute/whitewind": "file:",
31
+ "@atcute/lex-cli": "^2.0.1"
26
32
  },
27
33
  "scripts": {
28
34
  "build": "tsc",
29
- "generate": "./scripts/generate-lexicons.sh",
35
+ "generate": "rm -r ./lib/lexicons/; lex-cli generate -c ./lex.config.js",
30
36
  "prepublish": "rm -rf dist; pnpm run build"
31
37
  }
32
38
  }
@@ -1,142 +0,0 @@
1
- /**
2
- * @module
3
- * Contains type declarations for WhiteWind lexicons
4
- */
5
- import '@atcute/client/lexicons';
6
- declare module '@atcute/client/lexicons' {
7
- namespace ComWhtwndBlogDefs {
8
- interface BlobMetadata {
9
- [Brand.Type]?: 'com.whtwnd.blog.defs#blobMetadata';
10
- blobref: At.Blob;
11
- name?: string;
12
- }
13
- interface BlogEntry {
14
- [Brand.Type]?: 'com.whtwnd.blog.defs#blogEntry';
15
- /** Maximum string length: 100000 */
16
- content: string;
17
- createdAt?: string;
18
- }
19
- interface Comment {
20
- [Brand.Type]?: 'com.whtwnd.blog.defs#comment';
21
- /** Maximum string length: 1000 */
22
- content: string;
23
- entryUri: At.ResourceUri;
24
- }
25
- interface Ogp {
26
- [Brand.Type]?: 'com.whtwnd.blog.defs#ogp';
27
- url: At.GenericUri;
28
- height?: number;
29
- width?: number;
30
- }
31
- }
32
- namespace ComWhtwndBlogEntry {
33
- /** A declaration of a post. */
34
- interface Record {
35
- $type: 'com.whtwnd.blog.entry';
36
- /** Maximum string length: 100000 */
37
- content: string;
38
- blobs?: ComWhtwndBlogDefs.BlobMetadata[];
39
- createdAt?: string;
40
- /** (DEPRECATED) Marks this entry as draft to tell AppViews not to show it to anyone except for the author */
41
- isDraft?: boolean;
42
- ogp?: ComWhtwndBlogDefs.Ogp;
43
- /** Maximum string length: 1000 */
44
- subtitle?: string;
45
- theme?: 'github-light';
46
- /** Maximum string length: 1000 */
47
- title?: string;
48
- /**
49
- * Tells the visibility of the article to AppView.
50
- * @default "public"
51
- */
52
- visibility?: 'public' | 'url' | 'author';
53
- }
54
- }
55
- /** Get blog posts associated to designated author. */
56
- namespace ComWhtwndBlogGetAuthorPosts {
57
- interface Params {
58
- author: At.Did;
59
- }
60
- type Input = undefined;
61
- interface Output {
62
- post: ComWhtwndBlogDefs.BlogEntry[];
63
- }
64
- }
65
- /** Get AT URI by blog author and entry name. If there are multiple blog entries associated with the name, return the latest one. */
66
- namespace ComWhtwndBlogGetEntryMetadataByName {
67
- interface Params {
68
- author: At.Identifier;
69
- entryTitle: string;
70
- }
71
- type Input = undefined;
72
- interface Output {
73
- entryUri: At.ResourceUri;
74
- cid?: At.Cid;
75
- lastUpdate?: string;
76
- }
77
- interface Errors {
78
- NotFound: {};
79
- }
80
- }
81
- /** Get comments associated to designated post. */
82
- namespace ComWhtwndBlogGetMentionsByEntry {
83
- interface Params {
84
- postUri: At.ResourceUri;
85
- }
86
- type Input = undefined;
87
- interface Output {
88
- mentions: At.ResourceUri[];
89
- }
90
- }
91
- /** Notify AppView of existence of new entry and request indexing */
92
- namespace ComWhtwndBlogNotifyOfNewEntry {
93
- interface Params {
94
- }
95
- interface Input {
96
- entryUri: At.ResourceUri;
97
- }
98
- interface Output {
99
- }
100
- interface Errors {
101
- }
102
- }
103
- interface Records {
104
- 'com.whtwnd.blog.entry': ComWhtwndBlogEntry.Record;
105
- }
106
- interface Queries {
107
- 'com.whtwnd.blog.getAuthorPosts': {
108
- params: ComWhtwndBlogGetAuthorPosts.Params;
109
- /** @deprecated */
110
- output: ComWhtwndBlogGetAuthorPosts.Output;
111
- response: {
112
- json: ComWhtwndBlogGetAuthorPosts.Output;
113
- };
114
- };
115
- 'com.whtwnd.blog.getEntryMetadataByName': {
116
- params: ComWhtwndBlogGetEntryMetadataByName.Params;
117
- /** @deprecated */
118
- output: ComWhtwndBlogGetEntryMetadataByName.Output;
119
- response: {
120
- json: ComWhtwndBlogGetEntryMetadataByName.Output;
121
- };
122
- };
123
- 'com.whtwnd.blog.getMentionsByEntry': {
124
- params: ComWhtwndBlogGetMentionsByEntry.Params;
125
- /** @deprecated */
126
- output: ComWhtwndBlogGetMentionsByEntry.Output;
127
- response: {
128
- json: ComWhtwndBlogGetMentionsByEntry.Output;
129
- };
130
- };
131
- }
132
- interface Procedures {
133
- 'com.whtwnd.blog.notifyOfNewEntry': {
134
- input: ComWhtwndBlogNotifyOfNewEntry.Input;
135
- /** @deprecated */
136
- output: ComWhtwndBlogNotifyOfNewEntry.Output;
137
- response: {
138
- json: ComWhtwndBlogNotifyOfNewEntry.Output;
139
- };
140
- };
141
- }
142
- }
package/dist/lexicons.js DELETED
@@ -1,8 +0,0 @@
1
- /* eslint-disable */
2
- // This file is automatically generated, do not edit!
3
- /**
4
- * @module
5
- * Contains type declarations for WhiteWind lexicons
6
- */
7
- import '@atcute/client/lexicons';
8
- //# sourceMappingURL=lexicons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lexicons.js","sourceRoot":"","sources":["../lib/lexicons.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,qDAAqD;AAErD;;;GAGG;AAEH,OAAO,yBAAyB,CAAC"}
package/lib/lexicons.ts DELETED
@@ -1,144 +0,0 @@
1
- /* eslint-disable */
2
- // This file is automatically generated, do not edit!
3
-
4
- /**
5
- * @module
6
- * Contains type declarations for WhiteWind lexicons
7
- */
8
-
9
- import '@atcute/client/lexicons';
10
-
11
- declare module '@atcute/client/lexicons' {
12
- namespace ComWhtwndBlogDefs {
13
- interface BlobMetadata {
14
- [Brand.Type]?: 'com.whtwnd.blog.defs#blobMetadata';
15
- blobref: At.Blob;
16
- name?: string;
17
- }
18
- interface BlogEntry {
19
- [Brand.Type]?: 'com.whtwnd.blog.defs#blogEntry';
20
- /** Maximum string length: 100000 */
21
- content: string;
22
- createdAt?: string;
23
- }
24
- interface Comment {
25
- [Brand.Type]?: 'com.whtwnd.blog.defs#comment';
26
- /** Maximum string length: 1000 */
27
- content: string;
28
- entryUri: At.ResourceUri;
29
- }
30
- interface Ogp {
31
- [Brand.Type]?: 'com.whtwnd.blog.defs#ogp';
32
- url: At.GenericUri;
33
- height?: number;
34
- width?: number;
35
- }
36
- }
37
-
38
- namespace ComWhtwndBlogEntry {
39
- /** A declaration of a post. */
40
- interface Record {
41
- $type: 'com.whtwnd.blog.entry';
42
- /** Maximum string length: 100000 */
43
- content: string;
44
- blobs?: ComWhtwndBlogDefs.BlobMetadata[];
45
- createdAt?: string;
46
- /** (DEPRECATED) Marks this entry as draft to tell AppViews not to show it to anyone except for the author */
47
- isDraft?: boolean;
48
- ogp?: ComWhtwndBlogDefs.Ogp;
49
- /** Maximum string length: 1000 */
50
- subtitle?: string;
51
- theme?: 'github-light';
52
- /** Maximum string length: 1000 */
53
- title?: string;
54
- /**
55
- * Tells the visibility of the article to AppView.
56
- * @default "public"
57
- */
58
- visibility?: 'public' | 'url' | 'author';
59
- }
60
- }
61
-
62
- /** Get blog posts associated to designated author. */
63
- namespace ComWhtwndBlogGetAuthorPosts {
64
- interface Params {
65
- author: At.Did;
66
- }
67
- type Input = undefined;
68
- interface Output {
69
- post: ComWhtwndBlogDefs.BlogEntry[];
70
- }
71
- }
72
-
73
- /** Get AT URI by blog author and entry name. If there are multiple blog entries associated with the name, return the latest one. */
74
- namespace ComWhtwndBlogGetEntryMetadataByName {
75
- interface Params {
76
- author: At.Identifier;
77
- entryTitle: string;
78
- }
79
- type Input = undefined;
80
- interface Output {
81
- entryUri: At.ResourceUri;
82
- cid?: At.Cid;
83
- lastUpdate?: string;
84
- }
85
- interface Errors {
86
- NotFound: {};
87
- }
88
- }
89
-
90
- /** Get comments associated to designated post. */
91
- namespace ComWhtwndBlogGetMentionsByEntry {
92
- interface Params {
93
- postUri: At.ResourceUri;
94
- }
95
- type Input = undefined;
96
- interface Output {
97
- mentions: At.ResourceUri[];
98
- }
99
- }
100
-
101
- /** Notify AppView of existence of new entry and request indexing */
102
- namespace ComWhtwndBlogNotifyOfNewEntry {
103
- interface Params {}
104
- interface Input {
105
- entryUri: At.ResourceUri;
106
- }
107
- interface Output {}
108
- interface Errors {}
109
- }
110
-
111
- interface Records {
112
- 'com.whtwnd.blog.entry': ComWhtwndBlogEntry.Record;
113
- }
114
-
115
- interface Queries {
116
- 'com.whtwnd.blog.getAuthorPosts': {
117
- params: ComWhtwndBlogGetAuthorPosts.Params;
118
- /** @deprecated */
119
- output: ComWhtwndBlogGetAuthorPosts.Output;
120
- response: { json: ComWhtwndBlogGetAuthorPosts.Output };
121
- };
122
- 'com.whtwnd.blog.getEntryMetadataByName': {
123
- params: ComWhtwndBlogGetEntryMetadataByName.Params;
124
- /** @deprecated */
125
- output: ComWhtwndBlogGetEntryMetadataByName.Output;
126
- response: { json: ComWhtwndBlogGetEntryMetadataByName.Output };
127
- };
128
- 'com.whtwnd.blog.getMentionsByEntry': {
129
- params: ComWhtwndBlogGetMentionsByEntry.Params;
130
- /** @deprecated */
131
- output: ComWhtwndBlogGetMentionsByEntry.Output;
132
- response: { json: ComWhtwndBlogGetMentionsByEntry.Output };
133
- };
134
- }
135
-
136
- interface Procedures {
137
- 'com.whtwnd.blog.notifyOfNewEntry': {
138
- input: ComWhtwndBlogNotifyOfNewEntry.Input;
139
- /** @deprecated */
140
- output: ComWhtwndBlogNotifyOfNewEntry.Output;
141
- response: { json: ComWhtwndBlogNotifyOfNewEntry.Output };
142
- };
143
- }
144
- }