techne-sdk 0.1.0 → 0.3.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +139 -0
  2. package/README.md +48 -2
  3. package/dist/auth/app-key.d.ts +8 -0
  4. package/dist/auth/app-key.js +95 -0
  5. package/dist/auth/index.d.ts +192 -0
  6. package/dist/auth/index.js +230 -0
  7. package/dist/auth/placement.gen.d.ts +1 -0
  8. package/dist/auth/placement.gen.js +50 -0
  9. package/dist/catalog/catalog.gen.js +2161 -681
  10. package/dist/connect.js +2 -1
  11. package/dist/generated/index.d.ts +61 -0
  12. package/dist/generated/index.js +116 -0
  13. package/dist/generated/lexicons.d.ts +3689 -1449
  14. package/dist/generated/lexicons.js +1237 -42
  15. package/dist/generated/nsid.d.ts +23 -1
  16. package/dist/generated/nsid.js +23 -19
  17. package/dist/generated/nsid.json +23 -19
  18. package/dist/generated/records.d.ts +28 -26
  19. package/dist/generated/types/pub/techne/draft/commons/getVersions.d.ts +3 -3
  20. package/dist/generated/types/pub/techne/draft/commons/runChain.d.ts +1 -1
  21. package/dist/generated/types/pub/techne/draft/credential.d.ts +1 -1
  22. package/dist/generated/types/pub/techne/draft/credentialRevocation.d.ts +1 -1
  23. package/dist/generated/types/pub/techne/draft/permissioned/deleteRecord.d.ts +5 -0
  24. package/dist/generated/types/pub/techne/draft/permissioned/deleteRecord.js +7 -0
  25. package/dist/generated/types/pub/techne/draft/permissioned/getRecord.d.ts +2 -1
  26. package/dist/generated/types/pub/techne/draft/permissioned/listChanges.d.ts +1 -1
  27. package/dist/generated/types/pub/techne/draft/permissioned/putRecord.d.ts +2 -2
  28. package/dist/generated/types/pub/techne/draft/provenance.d.ts +1 -1
  29. package/dist/generated/types/pub/techne/draft/publisher.d.ts +1 -1
  30. package/dist/generated/types/pub/techne/draft/query/composeRecords.d.ts +152 -0
  31. package/dist/generated/types/pub/techne/draft/query/composeRecords.js +55 -0
  32. package/dist/generated/types/pub/techne/draft/query/getRecords.d.ts +1 -1
  33. package/dist/generated/types/pub/techne/draft/query/listRecords.d.ts +0 -4
  34. package/dist/generated/types/pub/techne/draft/query/listRejections.d.ts +2 -2
  35. package/dist/generated/types/pub/techne/draft/registry/blockIndex.d.ts +42 -0
  36. package/dist/generated/types/pub/techne/draft/registry/blockIndex.js +34 -0
  37. package/dist/generated/types/pub/techne/draft/registry/defs.d.ts +112 -0
  38. package/dist/generated/types/pub/techne/draft/registry/defs.js +32 -0
  39. package/dist/generated/types/pub/techne/draft/registry/getType.d.ts +23 -0
  40. package/dist/generated/types/pub/techne/draft/registry/getType.js +20 -0
  41. package/dist/generated/types/pub/techne/draft/registry/getTypeRequest.d.ts +23 -0
  42. package/dist/generated/types/pub/techne/draft/registry/getTypeRequest.js +20 -0
  43. package/dist/generated/types/pub/techne/draft/registry/listTypeRequests.d.ts +27 -0
  44. package/dist/generated/types/pub/techne/draft/registry/listTypeRequests.js +7 -0
  45. package/dist/generated/types/pub/techne/draft/registry/listTypes.d.ts +34 -0
  46. package/dist/generated/types/pub/techne/draft/registry/listTypes.js +7 -0
  47. package/dist/generated/types/pub/techne/draft/registry/publishType.d.ts +77 -0
  48. package/dist/generated/types/pub/techne/draft/registry/publishType.js +83 -0
  49. package/dist/generated/types/pub/techne/draft/registry/purgeType.d.ts +39 -0
  50. package/dist/generated/types/pub/techne/draft/registry/purgeType.js +34 -0
  51. package/dist/generated/types/pub/techne/draft/registry/requestType.d.ts +53 -0
  52. package/dist/generated/types/pub/techne/draft/registry/requestType.js +76 -0
  53. package/dist/generated/types/pub/techne/draft/registry/typeRequest.d.ts +22 -0
  54. package/dist/generated/types/pub/techne/draft/registry/typeRequest.js +12 -0
  55. package/dist/generated/types/pub/techne/draft/sync/indexRecord.d.ts +1 -1
  56. package/dist/generated/types/pub/techne/draft/verdict.d.ts +2 -2
  57. package/dist/platform.d.ts +14 -0
  58. package/dist/platform.js +16 -0
  59. package/dist/put/index.js +17 -7
  60. package/dist/query/index.d.ts +1 -10
  61. package/dist/query/index.js +1 -1
  62. package/dist/types-cli/emit.d.ts +20 -0
  63. package/dist/types-cli/emit.js +217 -0
  64. package/dist/types-cli/main.d.ts +5 -0
  65. package/dist/types-cli/main.js +63 -0
  66. package/dist/types-cli/resolve.d.ts +26 -0
  67. package/dist/types-cli/resolve.js +99 -0
  68. package/dist/wasm/index.d.ts +20 -3
  69. package/dist/wasm/index.js +6 -1
  70. package/dist/wasm/techne-wasm.gen.js +1 -1
  71. package/dist/wasm/techne-wasm2js.gen.js +26425 -25985
  72. package/package.json +23 -6
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "techne-sdk",
3
- "version": "0.1.0",
4
- "description": "TechneSDK: sign in, put, query, useEvent and the read-time check for apps on the Techne platform. Types and clients are generated from the published lexicons; the logic that must match the platform exactly (the check, version ranking, put's order) is Rust compiled to WebAssembly (wasm2js on hosts without it). Datetime fields are plain strings: send Date.prototype.toISOString() (UTC, trailing Z).",
3
+ "version": "0.3.0",
4
+ "description": "TechneSDK: sign in (\"Sign in with Techne\", browser OAuth), put, query, useEvent and the read-time check for apps on the Techne platform. Types and clients are generated from the published lexicons; the logic that must match the platform exactly (the check, version ranking, put's order) is Rust compiled to WebAssembly (wasm2js on hosts without it). Datetime fields are plain strings: send Date.prototype.toISOString() (UTC, trailing Z).",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -18,10 +18,14 @@
18
18
  "sideEffects": false,
19
19
  "files": [
20
20
  "dist",
21
- "README.md"
21
+ "README.md",
22
+ "CHANGELOG.md"
22
23
  ],
23
24
  "main": "./dist/generated/index.js",
24
25
  "types": "./dist/generated/index.d.ts",
26
+ "bin": {
27
+ "techne-sdk": "./dist/types-cli/main.js"
28
+ },
25
29
  "exports": {
26
30
  ".": {
27
31
  "types": "./dist/generated/index.d.ts",
@@ -81,18 +85,23 @@
81
85
  "types": "./dist/links/index.d.ts",
82
86
  "default": "./dist/links/index.js"
83
87
  },
88
+ "./auth": {
89
+ "types": "./dist/auth/index.d.ts",
90
+ "default": "./dist/auth/index.js"
91
+ },
84
92
  "./package.json": "./package.json"
85
93
  },
86
94
  "scripts": {
87
95
  "codegen": "bash ./scripts/gen.sh",
88
96
  "codegen:catalog": "node ./scripts/gen-catalog.mjs",
89
97
  "codegen:nsid": "node ./scripts/gen-nsid.mjs",
98
+ "codegen:placement": "node ./scripts/gen-placement.mjs",
90
99
  "build:wasm": "bash ./scripts/build-wasm.sh",
91
100
  "inputs:check": "node ./scripts/inputs-sync.mjs --check",
92
- "typecheck": "tsc --noEmit",
101
+ "typecheck": "tsc --noEmit && tsc --noEmit -p src/types-cli",
93
102
  "build": "node ./scripts/build.mjs",
94
103
  "prepack": "npm run build",
95
- "test": "npm run test:inputs && npm run test:catalog && npm run test:nsid && npm run test:versions && npm run test:wasm && npm run test:put && npm run test:query && npm run test:links && npm run test:package",
104
+ "test": "npm run test:inputs && npm run test:catalog && npm run test:nsid && npm run test:versions && npm run test:wasm && npm run test:put && npm run test:query && npm run test:links && npm run test:auth && npm run test:types-cli && npm run test:package",
96
105
  "test:inputs": "node --test ./scripts/inputs-sync.test.mjs",
97
106
  "test:catalog": "node --test ./scripts/gen-catalog.test.mjs",
98
107
  "test:nsid": "node --test ./scripts/gen-nsid.test.mjs",
@@ -101,11 +110,17 @@
101
110
  "test:put": "node --import tsx --test ./src/put/put.test.mjs",
102
111
  "test:query": "node --import tsx --test ./src/query/query.test.mjs",
103
112
  "test:links": "node --import tsx --test ./src/links/links.test.mjs",
113
+ "test:auth": "node --import tsx --test ./src/auth/auth.test.mjs",
104
114
  "test:package": "node --test ./scripts/package.test.mjs",
105
- "gate": "bash ./scripts/gate.sh"
115
+ "gate": "bash ./scripts/gate.sh",
116
+ "test:types-cli": "node --import tsx --test ./src/types-cli/types-cli.test.mjs"
106
117
  },
107
118
  "dependencies": {
119
+ "@atproto/did": "^0.5.6",
108
120
  "@atproto/lexicon": "^0.4.3",
121
+ "@atproto/oauth-client-browser": "^0.5.10",
122
+ "@atproto/oauth-types": "^0.7.7",
123
+ "@atproto/syntax": "^0.4.3",
109
124
  "@atproto/xrpc": "^0.6.12"
110
125
  },
111
126
  "peerDependencies": {
@@ -118,6 +133,8 @@
118
133
  },
119
134
  "devDependencies": {
120
135
  "@atproto/lex-cli": "^0.9.9",
136
+ "@atproto/oauth-scopes": "^0.5.14",
137
+ "@types/node": "^22.20.5",
121
138
  "@types/react": "^19.3.0",
122
139
  "multiformats": "^9.9.0",
123
140
  "react": "^19.2.3",