mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
feat: add fieldKeys
in generated const
This commit is contained in:
parent
1b0cce6de9
commit
fbd8498c25
3 changed files with 22 additions and 0 deletions
|
@ -23,4 +23,14 @@ export const OidcModelInstances = Object.freeze({
|
||||||
uid: 'uid',
|
uid: 'uid',
|
||||||
grantId: 'grant_id',
|
grantId: 'grant_id',
|
||||||
},
|
},
|
||||||
|
fieldKeys: [
|
||||||
|
'modelName',
|
||||||
|
'id',
|
||||||
|
'payload',
|
||||||
|
'expiresAt',
|
||||||
|
'consumedAt',
|
||||||
|
'userCode',
|
||||||
|
'uid',
|
||||||
|
'grantId',
|
||||||
|
],
|
||||||
} as const);
|
} as const);
|
||||||
|
|
|
@ -23,4 +23,13 @@ export const Users = Object.freeze({
|
||||||
passwordEncryptionMethod: 'password_encryption_method',
|
passwordEncryptionMethod: 'password_encryption_method',
|
||||||
passwordEncryptionSalt: 'password_encryption_salt',
|
passwordEncryptionSalt: 'password_encryption_salt',
|
||||||
},
|
},
|
||||||
|
fieldKeys: [
|
||||||
|
'id',
|
||||||
|
'userName',
|
||||||
|
'primaryEmail',
|
||||||
|
'primaryPhone',
|
||||||
|
'passwordEncrypted',
|
||||||
|
'passwordEncryptionMethod',
|
||||||
|
'passwordEncryptionSalt',
|
||||||
|
],
|
||||||
} as const);
|
} as const);
|
||||||
|
|
|
@ -194,6 +194,9 @@ const generate = async () => {
|
||||||
' fields: {',
|
' fields: {',
|
||||||
...fields.map(({ name }) => ` ${camelcase(name)}: '${name}',`),
|
...fields.map(({ name }) => ` ${camelcase(name)}: '${name}',`),
|
||||||
' },',
|
' },',
|
||||||
|
' fieldKeys: [',
|
||||||
|
...fields.map(({ name }) => ` '${camelcase(name)}',`),
|
||||||
|
' ],',
|
||||||
'} as const);',
|
'} as const);',
|
||||||
].join('\n')
|
].join('\n')
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue