n8n-nodes-base
Version:
Base nodes of n8n
44 lines (38 loc) • 1.09 kB
text/typescript
/**
* TOTP Node - Version 1
* Generate a time-based one-time password
*/
export interface TotpV1Params {
operation?: 'generateSecret';
/**
* Options
* @displayOptions.show { operation: ["generateSecret"] }
* @default {}
*/
options?: {
/** HMAC hashing algorithm. Defaults to SHA1.
* @default SHA1
*/
algorithm?: 'SHA1' | 'SHA224' | 'SHA256' | 'SHA3-224' | 'SHA3-256' | 'SHA3-384' | 'SHA3-512' | 'SHA384' | 'SHA512' | Expression<string>;
/** Number of digits in the generated TOTP code. Defaults to 6 digits.
* @default 6
*/
digits?: number | Expression<number>;
/** How many seconds the generated TOTP code is valid for. Defaults to 30 seconds.
* @default 30
*/
period?: number | Expression<number>;
};
}
export interface TotpV1Credentials {
totpApi: CredentialReference;
}
interface TotpV1NodeBase {
type: 'n8n-nodes-base.totp';
version: 1;
credentials?: TotpV1Credentials;
}
export type TotpV1ParamsNode = TotpV1NodeBase & {
config: NodeConfig<TotpV1Params>;
};
export type TotpV1Node = TotpV1ParamsNode;