Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d7eca15

Browse files
author
github-actions
committedMar 11, 2024·
SDK updates
1 parent 1ce4cba commit d7eca15

13 files changed

+737
-1
lines changed
 

‎src/generated/.openapi-generator/FILES

+6
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,30 @@ models/GithubUserSocialConnection.ts
1818
models/GoogleUserSocialConnection.ts
1919
models/LayoutConfig.ts
2020
models/Layouts.ts
21+
models/Link.ts
2122
models/ListDevicesResponse.ts
23+
models/ListPaginatedUsersItem.ts
24+
models/ListPaginatedUsersResponse.ts
2225
models/MagicLink.ts
2326
models/MagicLinkAuthMethod.ts
2427
models/MagicLinkChannel.ts
2528
models/MagicLinkResponse.ts
2629
models/MagicLinkType.ts
2730
models/Model400Error.ts
2831
models/Model401Error.ts
32+
models/Model403Error.ts
2933
models/Model404Error.ts
3034
models/Model500Error.ts
3135
models/OtpAuthMethod.ts
36+
models/PaginatedLinks.ts
3237
models/PasskeysAuthMethod.ts
3338
models/Technologies.ts
3439
models/TtlDisplayUnit.ts
3540
models/UpdateMagicLinkAuthMethod.ts
3641
models/UpdateOtpAuthMethod.ts
3742
models/UpdatePasskeysAuthMethod.ts
3843
models/UpdateUserRequest.ts
44+
models/UserEventStatus.ts
3945
models/UserInfo.ts
4046
models/UserMetadataField.ts
4147
models/UserMetadataFieldType.ts

‎src/generated/apis/MagicLinksApi.ts

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import type {
1919
MagicLinkResponse,
2020
Model400Error,
2121
Model401Error,
22+
Model403Error,
2223
Model404Error,
2324
Model500Error,
2425
} from '../models/index';
@@ -31,6 +32,8 @@ import {
3132
Model400ErrorToJSON,
3233
Model401ErrorFromJSON,
3334
Model401ErrorToJSON,
35+
Model403ErrorFromJSON,
36+
Model403ErrorToJSON,
3437
Model404ErrorFromJSON,
3538
Model404ErrorToJSON,
3639
Model500ErrorFromJSON,

‎src/generated/apis/TokensApi.ts

+3
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@
1616
import * as runtime from '../runtime';
1717
import type {
1818
Model401Error,
19+
Model403Error,
1920
Model404Error,
2021
Model500Error,
2122
} from '../models/index';
2223
import {
2324
Model401ErrorFromJSON,
2425
Model401ErrorToJSON,
26+
Model403ErrorFromJSON,
27+
Model403ErrorToJSON,
2528
Model404ErrorFromJSON,
2629
Model404ErrorToJSON,
2730
Model500ErrorFromJSON,

‎src/generated/apis/UsersApi.ts

+102
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import * as runtime from '../runtime';
1717
import type {
1818
CreateUserRequest,
19+
ListPaginatedUsersResponse,
1920
Model400Error,
2021
Model401Error,
2122
Model404Error,
@@ -26,6 +27,8 @@ import type {
2627
import {
2728
CreateUserRequestFromJSON,
2829
CreateUserRequestToJSON,
30+
ListPaginatedUsersResponseFromJSON,
31+
ListPaginatedUsersResponseToJSON,
2932
Model400ErrorFromJSON,
3033
Model400ErrorToJSON,
3134
Model401ErrorFromJSON,
@@ -65,6 +68,21 @@ export interface GetUserRequest {
6568
userId: string;
6669
}
6770

71+
export interface ListPaginatedUsersRequest {
72+
appId: string;
73+
page?: number;
74+
limit?: number;
75+
createdBefore?: number;
76+
orderBy?: string;
77+
identifier?: string;
78+
id?: string;
79+
loginCount?: number;
80+
status?: string;
81+
createdAt?: string;
82+
updatedAt?: string;
83+
lastLoginAt?: string;
84+
}
85+
6886
export interface UpdateUserOperationRequest {
6987
appId: string;
7088
userId: string;
@@ -298,6 +316,90 @@ export class UsersApi extends runtime.BaseAPI {
298316
return await response.value();
299317
}
300318

319+
/**
320+
* List users for an app.
321+
* List Users
322+
*/
323+
async listPaginatedUsersRaw(requestParameters: ListPaginatedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListPaginatedUsersResponse>> {
324+
if (requestParameters.appId === null || requestParameters.appId === undefined) {
325+
throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling listPaginatedUsers.');
326+
}
327+
328+
const queryParameters: any = {};
329+
330+
if (requestParameters.page !== undefined) {
331+
queryParameters['page'] = requestParameters.page;
332+
}
333+
334+
if (requestParameters.limit !== undefined) {
335+
queryParameters['limit'] = requestParameters.limit;
336+
}
337+
338+
if (requestParameters.createdBefore !== undefined) {
339+
queryParameters['created_before'] = requestParameters.createdBefore;
340+
}
341+
342+
if (requestParameters.orderBy !== undefined) {
343+
queryParameters['order_by'] = requestParameters.orderBy;
344+
}
345+
346+
if (requestParameters.identifier !== undefined) {
347+
queryParameters['identifier'] = requestParameters.identifier;
348+
}
349+
350+
if (requestParameters.id !== undefined) {
351+
queryParameters['id'] = requestParameters.id;
352+
}
353+
354+
if (requestParameters.loginCount !== undefined) {
355+
queryParameters['login_count'] = requestParameters.loginCount;
356+
}
357+
358+
if (requestParameters.status !== undefined) {
359+
queryParameters['status'] = requestParameters.status;
360+
}
361+
362+
if (requestParameters.createdAt !== undefined) {
363+
queryParameters['created_at'] = requestParameters.createdAt;
364+
}
365+
366+
if (requestParameters.updatedAt !== undefined) {
367+
queryParameters['updated_at'] = requestParameters.updatedAt;
368+
}
369+
370+
if (requestParameters.lastLoginAt !== undefined) {
371+
queryParameters['last_login_at'] = requestParameters.lastLoginAt;
372+
}
373+
374+
const headerParameters: runtime.HTTPHeaders = {};
375+
376+
if (this.configuration && this.configuration.accessToken) {
377+
const token = this.configuration.accessToken;
378+
const tokenString = await token("bearerAuth", []);
379+
380+
if (tokenString) {
381+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
382+
}
383+
}
384+
const response = await this.request({
385+
path: `/apps/{app_id}/users`.replace(`{${"app_id"}}`, encodeURIComponent(String(requestParameters.appId))),
386+
method: 'GET',
387+
headers: headerParameters,
388+
query: queryParameters,
389+
}, initOverrides);
390+
391+
return new runtime.JSONApiResponse(response, (jsonValue) => ListPaginatedUsersResponseFromJSON(jsonValue));
392+
}
393+
394+
/**
395+
* List users for an app.
396+
* List Users
397+
*/
398+
async listPaginatedUsers(requestParameters: ListPaginatedUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListPaginatedUsersResponse> {
399+
const response = await this.listPaginatedUsersRaw(requestParameters, initOverrides);
400+
return await response.value();
401+
}
402+
301403
/**
302404
* Update a user\'s information.
303405
* Update User

‎src/generated/models/AppInfo.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ export interface AppInfo {
294294
*/
295295
export const AppInfoTypeEnum = {
296296
Complete: 'complete',
297-
Flex: 'flex'
297+
Flex: 'flex',
298+
FlexV2: 'flex_v2'
298299
} as const;
299300
export type AppInfoTypeEnum = typeof AppInfoTypeEnum[keyof typeof AppInfoTypeEnum];
300301

‎src/generated/models/Link.ts

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
/**
17+
*
18+
* @export
19+
* @interface Link
20+
*/
21+
export interface Link {
22+
/**
23+
*
24+
* @type {string}
25+
* @memberof Link
26+
*/
27+
href: string;
28+
}
29+
30+
/**
31+
* Check if a given object implements the Link interface.
32+
*/
33+
export function instanceOfLink(value: object): boolean {
34+
let isInstance = true;
35+
isInstance = isInstance && "href" in value;
36+
37+
return isInstance;
38+
}
39+
40+
export function LinkFromJSON(json: any): Link {
41+
return LinkFromJSONTyped(json, false);
42+
}
43+
44+
export function LinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): Link {
45+
if ((json === undefined) || (json === null)) {
46+
return json;
47+
}
48+
return {
49+
50+
'href': json['href'],
51+
};
52+
}
53+
54+
export function LinkToJSON(value?: Link | null): any {
55+
if (value === undefined) {
56+
return undefined;
57+
}
58+
if (value === null) {
59+
return null;
60+
}
61+
return {
62+
63+
'href': value.href,
64+
};
65+
}
66+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
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+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
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 { ListPaginatedUsersItem } from './ListPaginatedUsersItem';
17+
import {
18+
ListPaginatedUsersItemFromJSON,
19+
ListPaginatedUsersItemFromJSONTyped,
20+
ListPaginatedUsersItemToJSON,
21+
} from './ListPaginatedUsersItem';
22+
import type { PaginatedLinks } from './PaginatedLinks';
23+
import {
24+
PaginatedLinksFromJSON,
25+
PaginatedLinksFromJSONTyped,
26+
PaginatedLinksToJSON,
27+
} from './PaginatedLinks';
28+
29+
/**
30+
*
31+
* @export
32+
* @interface ListPaginatedUsersResponse
33+
*/
34+
export interface ListPaginatedUsersResponse {
35+
/**
36+
*
37+
* @type {PaginatedLinks}
38+
* @memberof ListPaginatedUsersResponse
39+
*/
40+
_links: PaginatedLinks;
41+
/**
42+
* time anchor (Unix timestamp) --> all users returned created before this timestamp
43+
* @type {number}
44+
* @memberof ListPaginatedUsersResponse
45+
*/
46+
created_before: number;
47+
/**
48+
*
49+
* @type {number}
50+
* @memberof ListPaginatedUsersResponse
51+
*/
52+
limit: number;
53+
/**
54+
*
55+
* @type {number}
56+
* @memberof ListPaginatedUsersResponse
57+
*/
58+
page: number;
59+
/**
60+
* total number of users for a particular query
61+
* @type {number}
62+
* @memberof ListPaginatedUsersResponse
63+
*/
64+
total_users: number;
65+
/**
66+
*
67+
* @type {Array<ListPaginatedUsersItem>}
68+
* @memberof ListPaginatedUsersResponse
69+
*/
70+
users: Array<ListPaginatedUsersItem>;
71+
}
72+
73+
/**
74+
* Check if a given object implements the ListPaginatedUsersResponse interface.
75+
*/
76+
export function instanceOfListPaginatedUsersResponse(value: object): boolean {
77+
let isInstance = true;
78+
isInstance = isInstance && "_links" in value;
79+
isInstance = isInstance && "created_before" in value;
80+
isInstance = isInstance && "limit" in value;
81+
isInstance = isInstance && "page" in value;
82+
isInstance = isInstance && "total_users" in value;
83+
isInstance = isInstance && "users" in value;
84+
85+
return isInstance;
86+
}
87+
88+
export function ListPaginatedUsersResponseFromJSON(json: any): ListPaginatedUsersResponse {
89+
return ListPaginatedUsersResponseFromJSONTyped(json, false);
90+
}
91+
92+
export function ListPaginatedUsersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListPaginatedUsersResponse {
93+
if ((json === undefined) || (json === null)) {
94+
return json;
95+
}
96+
return {
97+
98+
'_links': PaginatedLinksFromJSON(json['_links']),
99+
'created_before': json['created_before'],
100+
'limit': json['limit'],
101+
'page': json['page'],
102+
'total_users': json['total_users'],
103+
'users': ((json['users'] as Array<any>).map(ListPaginatedUsersItemFromJSON)),
104+
};
105+
}
106+
107+
export function ListPaginatedUsersResponseToJSON(value?: ListPaginatedUsersResponse | null): any {
108+
if (value === undefined) {
109+
return undefined;
110+
}
111+
if (value === null) {
112+
return null;
113+
}
114+
return {
115+
116+
'_links': PaginatedLinksToJSON(value._links),
117+
'created_before': value.created_before,
118+
'limit': value.limit,
119+
'page': value.page,
120+
'total_users': value.total_users,
121+
'users': ((value.users as Array<any>).map(ListPaginatedUsersItemToJSON)),
122+
};
123+
}
124+

‎src/generated/models/Model403Error.ts

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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+
/**
17+
*
18+
* @export
19+
* @interface Model403Error
20+
*/
21+
export interface Model403Error {
22+
/**
23+
*
24+
* @type {string}
25+
* @memberof Model403Error
26+
*/
27+
code: Model403ErrorCodeEnum;
28+
/**
29+
*
30+
* @type {string}
31+
* @memberof Model403Error
32+
*/
33+
error: string;
34+
}
35+
36+
37+
/**
38+
* @export
39+
*/
40+
export const Model403ErrorCodeEnum = {
41+
CannotCreateOrganizationBillingPortalSession: 'cannot_create_organization_billing_portal_session',
42+
CannotCreateTransaction: 'cannot_create_transaction',
43+
CannotDeleteAdmin: 'cannot_delete_admin',
44+
CannotDeleteOrganizationMember: 'cannot_delete_organization_member',
45+
CannotSelfUpdateOrganizationMember: 'cannot_self_update_organization_member',
46+
OperationNotAllowed: 'operation_not_allowed'
47+
} as const;
48+
export type Model403ErrorCodeEnum = typeof Model403ErrorCodeEnum[keyof typeof Model403ErrorCodeEnum];
49+
50+
51+
/**
52+
* Check if a given object implements the Model403Error interface.
53+
*/
54+
export function instanceOfModel403Error(value: object): boolean {
55+
let isInstance = true;
56+
isInstance = isInstance && "code" in value;
57+
isInstance = isInstance && "error" in value;
58+
59+
return isInstance;
60+
}
61+
62+
export function Model403ErrorFromJSON(json: any): Model403Error {
63+
return Model403ErrorFromJSONTyped(json, false);
64+
}
65+
66+
export function Model403ErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): Model403Error {
67+
if ((json === undefined) || (json === null)) {
68+
return json;
69+
}
70+
return {
71+
72+
'code': json['code'],
73+
'error': json['error'],
74+
};
75+
}
76+
77+
export function Model403ErrorToJSON(value?: Model403Error | null): any {
78+
if (value === undefined) {
79+
return undefined;
80+
}
81+
if (value === null) {
82+
return null;
83+
}
84+
return {
85+
86+
'code': value.code,
87+
'error': value.error,
88+
};
89+
}
90+
+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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 { Link } from './Link';
17+
import {
18+
LinkFromJSON,
19+
LinkFromJSONTyped,
20+
LinkToJSON,
21+
} from './Link';
22+
23+
/**
24+
*
25+
* @export
26+
* @interface PaginatedLinks
27+
*/
28+
export interface PaginatedLinks {
29+
/**
30+
*
31+
* @type {Link}
32+
* @memberof PaginatedLinks
33+
*/
34+
first: Link;
35+
/**
36+
*
37+
* @type {Link}
38+
* @memberof PaginatedLinks
39+
*/
40+
last: Link;
41+
/**
42+
*
43+
* @type {Link}
44+
* @memberof PaginatedLinks
45+
*/
46+
next: Link;
47+
/**
48+
*
49+
* @type {Link}
50+
* @memberof PaginatedLinks
51+
*/
52+
previous: Link;
53+
/**
54+
*
55+
* @type {Link}
56+
* @memberof PaginatedLinks
57+
*/
58+
self: Link;
59+
}
60+
61+
/**
62+
* Check if a given object implements the PaginatedLinks interface.
63+
*/
64+
export function instanceOfPaginatedLinks(value: object): boolean {
65+
let isInstance = true;
66+
isInstance = isInstance && "first" in value;
67+
isInstance = isInstance && "last" in value;
68+
isInstance = isInstance && "next" in value;
69+
isInstance = isInstance && "previous" in value;
70+
isInstance = isInstance && "self" in value;
71+
72+
return isInstance;
73+
}
74+
75+
export function PaginatedLinksFromJSON(json: any): PaginatedLinks {
76+
return PaginatedLinksFromJSONTyped(json, false);
77+
}
78+
79+
export function PaginatedLinksFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedLinks {
80+
if ((json === undefined) || (json === null)) {
81+
return json;
82+
}
83+
return {
84+
85+
'first': LinkFromJSON(json['first']),
86+
'last': LinkFromJSON(json['last']),
87+
'next': LinkFromJSON(json['next']),
88+
'previous': LinkFromJSON(json['previous']),
89+
'self': LinkFromJSON(json['self']),
90+
};
91+
}
92+
93+
export function PaginatedLinksToJSON(value?: PaginatedLinks | null): any {
94+
if (value === undefined) {
95+
return undefined;
96+
}
97+
if (value === null) {
98+
return null;
99+
}
100+
return {
101+
102+
'first': LinkToJSON(value.first),
103+
'last': LinkToJSON(value.last),
104+
'next': LinkToJSON(value.next),
105+
'previous': LinkToJSON(value.previous),
106+
'self': LinkToJSON(value.self),
107+
};
108+
}
109+
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
16+
/**
17+
*
18+
* @export
19+
*/
20+
export const UserEventStatus = {
21+
Complete: 'complete',
22+
Incomplete: 'incomplete'
23+
} as const;
24+
export type UserEventStatus = typeof UserEventStatus[keyof typeof UserEventStatus];
25+
26+
27+
export function UserEventStatusFromJSON(json: any): UserEventStatus {
28+
return UserEventStatusFromJSONTyped(json, false);
29+
}
30+
31+
export function UserEventStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserEventStatus {
32+
return json as UserEventStatus;
33+
}
34+
35+
export function UserEventStatusToJSON(value?: UserEventStatus | null): any {
36+
return value as any;
37+
}
38+

‎src/generated/models/UserRecentEvent.ts

+25
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
*/
1414

1515
import { exists, mapValues } from '../runtime';
16+
import type { UserEventStatus } from './UserEventStatus';
17+
import {
18+
UserEventStatusFromJSON,
19+
UserEventStatusFromJSONTyped,
20+
UserEventStatusToJSON,
21+
} from './UserEventStatus';
22+
1623
/**
1724
*
1825
* @export
@@ -25,6 +32,12 @@ export interface UserRecentEvent {
2532
* @memberof UserRecentEvent
2633
*/
2734
created_at: Date;
35+
/**
36+
*
37+
* @type {Date}
38+
* @memberof UserRecentEvent
39+
*/
40+
completed_at: Date | null;
2841
/**
2942
*
3043
* @type {string}
@@ -37,6 +50,12 @@ export interface UserRecentEvent {
3750
* @memberof UserRecentEvent
3851
*/
3952
ip_addr: string;
53+
/**
54+
*
55+
* @type {UserEventStatus}
56+
* @memberof UserRecentEvent
57+
*/
58+
status: UserEventStatus;
4059
/**
4160
*
4261
* @type {string}
@@ -57,8 +76,10 @@ export interface UserRecentEvent {
5776
export function instanceOfUserRecentEvent(value: object): boolean {
5877
let isInstance = true;
5978
isInstance = isInstance && "created_at" in value;
79+
isInstance = isInstance && "completed_at" in value;
6080
isInstance = isInstance && "id" in value;
6181
isInstance = isInstance && "ip_addr" in value;
82+
isInstance = isInstance && "status" in value;
6283
isInstance = isInstance && "type" in value;
6384
isInstance = isInstance && "user_agent" in value;
6485

@@ -76,8 +97,10 @@ export function UserRecentEventFromJSONTyped(json: any, ignoreDiscriminator: boo
7697
return {
7798

7899
'created_at': (new Date(json['created_at'])),
100+
'completed_at': (json['completed_at'] === null ? null : new Date(json['completed_at'])),
79101
'id': json['id'],
80102
'ip_addr': json['ip_addr'],
103+
'status': UserEventStatusFromJSON(json['status']),
81104
'type': json['type'],
82105
'user_agent': json['user_agent'],
83106
};
@@ -93,8 +116,10 @@ export function UserRecentEventToJSON(value?: UserRecentEvent | null): any {
93116
return {
94117

95118
'created_at': (value.created_at.toISOString()),
119+
'completed_at': (value.completed_at === null ? null : value.completed_at.toISOString()),
96120
'id': value.id,
97121
'ip_addr': value.ip_addr,
122+
'status': UserEventStatusToJSON(value.status),
98123
'type': value.type,
99124
'user_agent': value.user_agent,
100125
};

‎src/generated/models/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,30 @@ export * from './GithubUserSocialConnection';
1212
export * from './GoogleUserSocialConnection';
1313
export * from './LayoutConfig';
1414
export * from './Layouts';
15+
export * from './Link';
1516
export * from './ListDevicesResponse';
17+
export * from './ListPaginatedUsersItem';
18+
export * from './ListPaginatedUsersResponse';
1619
export * from './MagicLink';
1720
export * from './MagicLinkAuthMethod';
1821
export * from './MagicLinkChannel';
1922
export * from './MagicLinkResponse';
2023
export * from './MagicLinkType';
2124
export * from './Model400Error';
2225
export * from './Model401Error';
26+
export * from './Model403Error';
2327
export * from './Model404Error';
2428
export * from './Model500Error';
2529
export * from './OtpAuthMethod';
30+
export * from './PaginatedLinks';
2631
export * from './PasskeysAuthMethod';
2732
export * from './Technologies';
2833
export * from './TtlDisplayUnit';
2934
export * from './UpdateMagicLinkAuthMethod';
3035
export * from './UpdateOtpAuthMethod';
3136
export * from './UpdatePasskeysAuthMethod';
3237
export * from './UpdateUserRequest';
38+
export * from './UserEventStatus';
3339
export * from './UserInfo';
3440
export * from './UserMetadataField';
3541
export * from './UserMetadataFieldType';

0 commit comments

Comments
 (0)
Please sign in to comment.