prototypey.org - atproto lexicon typescript toolkit - mirror https://github.com/tylersayshi/prototypey
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix formatting

authored by

JP Hastings-Spital and committed by
Tyler Lawson
eaedcb7c e3f2cc1f

+31 -24
+17 -17
.changeset/permission-set-lexicons.md
··· 14 14 15 15 ```ts 16 16 const authCore = lx.lexicon("com.example.authCore", { 17 - main: lx.permissionSet({ 18 - title: "Example: Core functionality", 19 - detail: "The core functionality for Example", 20 - permissions: [ 21 - lx.repoPermission({ 22 - collection: [myRecord, "com.example.otherRecord"], 23 - action: ["create", "update"], 24 - }), 25 - lx.rpcPermission({ 26 - lxm: [myProcedure], 27 - aud: "did:web:example.com", 28 - }), 29 - lx.blobPermission({ 30 - accept: ["image/*"], 31 - }), 32 - ], 33 - }), 17 + main: lx.permissionSet({ 18 + title: "Example: Core functionality", 19 + detail: "The core functionality for Example", 20 + permissions: [ 21 + lx.repoPermission({ 22 + collection: [myRecord, "com.example.otherRecord"], 23 + action: ["create", "update"], 24 + }), 25 + lx.rpcPermission({ 26 + lxm: [myProcedure], 27 + aud: "did:web:example.com", 28 + }), 29 + lx.blobPermission({ 30 + accept: ["image/*"], 31 + }), 32 + ], 33 + }), 34 34 }); 35 35 ```
+1 -1
packages/prototypey/README.md
··· 84 84 main: lx.permissionSet({ 85 85 // Offer translations with langString 86 86 title: lx.langString("MyApp: Core functionality", { 87 - "es": "MyApp: Funciones centrales", 87 + es: "MyApp: Funciones centrales", 88 88 }), 89 89 // A string provides no translations 90 90 detail: "The core functionality for MyApp",
+5 -4
packages/prototypey/core/infer.ts
··· 90 90 91 91 type InferPermissionEntry<T> = T extends { resource: "repo" } 92 92 ? Prettify< 93 - { type: "permission"; resource: "repo"; collection: string[] } & (T extends 94 - { action: infer A } 95 - ? { action: A } 96 - : {}) 93 + { 94 + type: "permission"; 95 + resource: "repo"; 96 + collection: string[]; 97 + } & (T extends { action: infer A } ? { action: A } : {}) 97 98 > 98 99 : T extends { resource: "rpc" } 99 100 ? Prettify<
+8 -2
packages/prototypey/core/lib.ts
··· 446 446 /** @see https://atproto.com/specs/permission#blob */ 447 447 type BlobPermissionEntry = PermissionEntryOf<"blob", BlobPermissionOptions>; 448 448 /** @see https://atproto.com/specs/permission#account */ 449 - type AccountPermissionEntry = PermissionEntryOf<"account", AccountPermissionOptions>; 449 + type AccountPermissionEntry = PermissionEntryOf< 450 + "account", 451 + AccountPermissionOptions 452 + >; 450 453 /** @see https://atproto.com/specs/permission#identity */ 451 - type IdentityPermissionEntry = PermissionEntryOf<"identity", IdentityPermissionOptions>; 454 + type IdentityPermissionEntry = PermissionEntryOf< 455 + "identity", 456 + IdentityPermissionOptions 457 + >; 452 458 453 459 /** 454 460 * Union of all permission entry types.