UNPKG

@rnaga/wp-node

Version:

👉 **[View Full Documentation at rnaga.github.io/wp-node →](https://rnaga.github.io/wp-node/)**

36 lines (35 loc) • 1.45 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.applicationPassword = void 0; const zod_1 = require("zod"); /* * @param array $passwords { * The list of application passwords. * * @type array ...$0 { * @type string $uuid The unique identifier for the application password. * @type string $app_id A UUID provided by the application to uniquely identify it. * @type string $name The name of the application password. * @type string $password A one-way hash of the password. * @type int $created Unix timestamp of when the password was created. * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used. * @type string|null $last_ip The IP address the application password was last used by. * } * } * */ exports.applicationPassword = zod_1.z.object({ uuid: zod_1.z.string(), app_id: zod_1.z.string(), name: zod_1.z.string().min(2).max(100), password: zod_1.z.string().min(8).max(100), created: zod_1.z.number().min(0), last_used: zod_1.z.number().min(0).nullable(), last_ip: zod_1.z .string() // .regex( // /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/, // { message: "Invalid IPv4 address" } // ) .nullable(), });