File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1- import type { StringSchema } from '../schema.js' ;
21import { IGNORED_FORMATS , TYPE_FORMATS , sortName } from '../../utils/index.js' ;
2+ import type { StringSchema } from '../schema.js' ;
33
44export function resolveStringFormat ( format : string , nsid : string ) : string {
55 if ( format === 'did' ) return TYPE_FORMATS . DID ;
66 if ( format === 'cid' ) return TYPE_FORMATS . CID ;
77 if ( format === 'handle' ) return TYPE_FORMATS . HANDLE ;
88 if ( format === 'at-uri' ) return TYPE_FORMATS . URI ;
9+ if ( format === 'tid' ) return TYPE_FORMATS . TID ;
10+ if ( format === 'record-key' ) return TYPE_FORMATS . RKEY ;
911 if ( IGNORED_FORMATS . has ( format ) ) return 'string' ;
1012
1113 console . warn ( `${ nsid } : unknown format ${ format } ` ) ;
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ export const TYPE_FORMATS = {
33 CID : 'At.CID' ,
44 HANDLE : 'At.Handle' ,
55 URI : 'At.Uri' ,
6+ TID : 'At.TID' ,
7+ RKEY : 'At.RKEY' ,
68} as const ;
79
810export const IGNORED_FORMATS = new Set ( [
Original file line number Diff line number Diff line change @@ -33,7 +33,13 @@ export declare namespace At {
3333 type Handle = string;
3434
3535 /** URI string */
36- type Uri = string;
36+ type Uri = string;
37+
38+ /** TID string */
39+ type TID = string;
40+
41+ /** RKEY string */
42+ type RKEY = string;
3743
3844 /** Object containing a CID string */
3945 interface CIDLink {
You can’t perform that action at this time.
0 commit comments