|
| 1 | +/* tslint:disable */ |
| 2 | +/* eslint-disable */ |
| 3 | +/** |
| 4 | + * Passage Management API |
| 5 | + * Passage\'s management API to manage your Passage apps and users. |
| 6 | + * |
| 7 | + * The version of the OpenAPI document: 1 |
| 8 | + * Contact: support@passage.id |
| 9 | + * |
| 10 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 11 | + * https://openapi-generator.tech |
| 12 | + * Do not edit the class manually. |
| 13 | + */ |
| 14 | + |
| 15 | +import { exists, mapValues } from '../runtime'; |
| 16 | +import type { UserStatus } from './UserStatus'; |
| 17 | +import { |
| 18 | + UserStatusFromJSON, |
| 19 | + UserStatusFromJSONTyped, |
| 20 | + UserStatusToJSON, |
| 21 | +} from './UserStatus'; |
| 22 | + |
| 23 | +/** |
| 24 | + * |
| 25 | + * @export |
| 26 | + * @interface ListPaginatedUsersItem |
| 27 | + */ |
| 28 | +export interface ListPaginatedUsersItem { |
| 29 | + /** |
| 30 | + * |
| 31 | + * @type {Date} |
| 32 | + * @memberof ListPaginatedUsersItem |
| 33 | + */ |
| 34 | + created_at: Date; |
| 35 | + /** |
| 36 | + * |
| 37 | + * @type {string} |
| 38 | + * @memberof ListPaginatedUsersItem |
| 39 | + */ |
| 40 | + email: string; |
| 41 | + /** |
| 42 | + * |
| 43 | + * @type {boolean} |
| 44 | + * @memberof ListPaginatedUsersItem |
| 45 | + */ |
| 46 | + email_verified: boolean; |
| 47 | + /** |
| 48 | + * |
| 49 | + * @type {string} |
| 50 | + * @memberof ListPaginatedUsersItem |
| 51 | + */ |
| 52 | + id: string; |
| 53 | + /** |
| 54 | + * |
| 55 | + * @type {Date} |
| 56 | + * @memberof ListPaginatedUsersItem |
| 57 | + */ |
| 58 | + last_login_at: Date; |
| 59 | + /** |
| 60 | + * |
| 61 | + * @type {number} |
| 62 | + * @memberof ListPaginatedUsersItem |
| 63 | + */ |
| 64 | + login_count: number; |
| 65 | + /** |
| 66 | + * |
| 67 | + * @type {string} |
| 68 | + * @memberof ListPaginatedUsersItem |
| 69 | + */ |
| 70 | + phone: string; |
| 71 | + /** |
| 72 | + * |
| 73 | + * @type {boolean} |
| 74 | + * @memberof ListPaginatedUsersItem |
| 75 | + */ |
| 76 | + phone_verified: boolean; |
| 77 | + /** |
| 78 | + * |
| 79 | + * @type {UserStatus} |
| 80 | + * @memberof ListPaginatedUsersItem |
| 81 | + */ |
| 82 | + status: UserStatus; |
| 83 | + /** |
| 84 | + * |
| 85 | + * @type {Date} |
| 86 | + * @memberof ListPaginatedUsersItem |
| 87 | + */ |
| 88 | + updated_at: Date; |
| 89 | + /** |
| 90 | + * |
| 91 | + * @type {object} |
| 92 | + * @memberof ListPaginatedUsersItem |
| 93 | + */ |
| 94 | + user_metadata: object | null; |
| 95 | +} |
| 96 | + |
| 97 | +/** |
| 98 | + * Check if a given object implements the ListPaginatedUsersItem interface. |
| 99 | + */ |
| 100 | +export function instanceOfListPaginatedUsersItem(value: object): boolean { |
| 101 | + let isInstance = true; |
| 102 | + isInstance = isInstance && "created_at" in value; |
| 103 | + isInstance = isInstance && "email" in value; |
| 104 | + isInstance = isInstance && "email_verified" in value; |
| 105 | + isInstance = isInstance && "id" in value; |
| 106 | + isInstance = isInstance && "last_login_at" in value; |
| 107 | + isInstance = isInstance && "login_count" in value; |
| 108 | + isInstance = isInstance && "phone" in value; |
| 109 | + isInstance = isInstance && "phone_verified" in value; |
| 110 | + isInstance = isInstance && "status" in value; |
| 111 | + isInstance = isInstance && "updated_at" in value; |
| 112 | + isInstance = isInstance && "user_metadata" in value; |
| 113 | + |
| 114 | + return isInstance; |
| 115 | +} |
| 116 | + |
| 117 | +export function ListPaginatedUsersItemFromJSON(json: any): ListPaginatedUsersItem { |
| 118 | + return ListPaginatedUsersItemFromJSONTyped(json, false); |
| 119 | +} |
| 120 | + |
| 121 | +export function ListPaginatedUsersItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListPaginatedUsersItem { |
| 122 | + if ((json === undefined) || (json === null)) { |
| 123 | + return json; |
| 124 | + } |
| 125 | + return { |
| 126 | + |
| 127 | + 'created_at': (new Date(json['created_at'])), |
| 128 | + 'email': json['email'], |
| 129 | + 'email_verified': json['email_verified'], |
| 130 | + 'id': json['id'], |
| 131 | + 'last_login_at': (new Date(json['last_login_at'])), |
| 132 | + 'login_count': json['login_count'], |
| 133 | + 'phone': json['phone'], |
| 134 | + 'phone_verified': json['phone_verified'], |
| 135 | + 'status': UserStatusFromJSON(json['status']), |
| 136 | + 'updated_at': (new Date(json['updated_at'])), |
| 137 | + 'user_metadata': json['user_metadata'], |
| 138 | + }; |
| 139 | +} |
| 140 | + |
| 141 | +export function ListPaginatedUsersItemToJSON(value?: ListPaginatedUsersItem | null): any { |
| 142 | + if (value === undefined) { |
| 143 | + return undefined; |
| 144 | + } |
| 145 | + if (value === null) { |
| 146 | + return null; |
| 147 | + } |
| 148 | + return { |
| 149 | + |
| 150 | + 'created_at': (value.created_at.toISOString()), |
| 151 | + 'email': value.email, |
| 152 | + 'email_verified': value.email_verified, |
| 153 | + 'id': value.id, |
| 154 | + 'last_login_at': (value.last_login_at.toISOString()), |
| 155 | + 'login_count': value.login_count, |
| 156 | + 'phone': value.phone, |
| 157 | + 'phone_verified': value.phone_verified, |
| 158 | + 'status': UserStatusToJSON(value.status), |
| 159 | + 'updated_at': (value.updated_at.toISOString()), |
| 160 | + 'user_metadata': value.user_metadata, |
| 161 | + }; |
| 162 | +} |
| 163 | + |
0 commit comments