pubky-app-specs 0.4.1 → 0.4.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.
package/package.json CHANGED
@@ -1,15 +1,20 @@
1
1
  {
2
2
  "name": "pubky-app-specs",
3
3
  "description": "Pubky.app Data Model Specifications",
4
- "version": "0.4.1",
4
+ "version": "0.4.3",
5
5
  "license": "MIT",
6
- "collaborators": [
7
- "SHAcollision"
6
+ "contributors": [
7
+ "SHAcollision",
8
+ "tipogi",
9
+ "ok300"
8
10
  ],
9
11
  "repository": {
10
12
  "type": "git",
11
13
  "url": "git+https://github.com/pubky/pubky-app-specs.git"
12
14
  },
15
+ "bugs": {
16
+ "url": "https://github.com/pubky/pubky-app-specs/issues"
17
+ },
13
18
  "files": [
14
19
  "pubky_app_specs_bg.wasm",
15
20
  "pubky_app_specs.d.ts",
@@ -18,9 +23,16 @@
18
23
  "example.js"
19
24
  ],
20
25
  "type": "module",
21
- "main": "index.cjs",
26
+ "main": "index.cjs",
22
27
  "module": "index.js",
23
28
  "types": "pubky_app_specs.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./pubky_app_specs.d.ts",
32
+ "import": "./index.js",
33
+ "require": "./index.cjs"
34
+ }
35
+ },
24
36
  "homepage": "https://pubky.app",
25
37
  "sideEffects": false,
26
38
  "devDependencies": {
@@ -41,6 +41,25 @@ export function feedUriBuilder(author_id: string, feed_id: string): string;
41
41
  * Builds a LastRead URI of the form "pubky://<author_id>/pub/pubky.app/last_read"
42
42
  */
43
43
  export function lastReadUriBuilder(author_id: string): string;
44
+ /**
45
+ * Returns the list of valid MIME types for file attachments.
46
+ *
47
+ * This allows JavaScript consumers to validate file types before submission
48
+ * without having to duplicate the list.
49
+ *
50
+ * # Example (TypeScript)
51
+ *
52
+ * ```typescript
53
+ * import { get_valid_mime_types } from "pubky-app-specs";
54
+ *
55
+ * const validTypes = get_valid_mime_types();
56
+ * const fileType = "image/png";
57
+ * if (validTypes.includes(fileType)) {
58
+ * console.log("Valid file type!");
59
+ * }
60
+ * ```
61
+ */
62
+ export function getValidMimeTypes(): any[];
44
63
  /**
45
64
  * Parses a Pubky URI and returns a strongly typed `ParsedUriResult`.
46
65
  *
@@ -464,6 +483,10 @@ export class PubkySpecsBuilder {
464
483
  createMute(mutee_id: string): MuteResult;
465
484
  createLastRead(): LastReadResult;
466
485
  createBlob(blob_data: any): BlobResult;
486
+ /**
487
+ * Returns validation limits as a JSON value for client-side use.
488
+ */
489
+ readonly validationLimits: any;
467
490
  }
468
491
  export class TagResult {
469
492
  private constructor();
Binary file