Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Commit e9bf6ca

Browse files
passage-beachball-botgithub-actionsbertrmz
authored
add AuthMethods (#98)
* add AuthMethods field to App * Change files --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Bert Ramirez <bert.ramirez@agilebits.com>
1 parent 32db17c commit e9bf6ca

10 files changed

Lines changed: 269 additions & 71 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "add AuthMethods field to App",
4+
"packageName": "@passageidentity/passage-node",
5+
"email": "bert.ramirez@agilebits.com",
6+
"dependentChangeType": "patch"
7+
}

src/generated/.openapi-generator/FILES

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,26 @@ models/AuthMethods.ts
1212
models/CreateMagicLinkRequest.ts
1313
models/CreateUserRequest.ts
1414
models/ElementCustomization.ts
15-
models/EmailSmsAuthMethod.ts
1615
models/FontFamily.ts
1716
models/LayoutConfig.ts
1817
models/Layouts.ts
1918
models/ListDevicesResponse.ts
2019
models/MagicLink.ts
20+
models/MagicLinkAuthMethod.ts
2121
models/MagicLinkChannel.ts
2222
models/MagicLinkResponse.ts
2323
models/MagicLinkType.ts
2424
models/Model400Error.ts
2525
models/Model401Error.ts
2626
models/Model404Error.ts
2727
models/Model500Error.ts
28-
models/PasskeyAuthMethod.ts
28+
models/OtpAuthMethod.ts
29+
models/PasskeysAuthMethod.ts
2930
models/Technologies.ts
3031
models/TtlDisplayUnit.ts
31-
models/UpdateEmailSmsAuthMethod.ts
32-
models/UpdatePasskeyAuthMethod.ts
32+
models/UpdateMagicLinkAuthMethod.ts
33+
models/UpdateOtpAuthMethod.ts
34+
models/UpdatePasskeysAuthMethod.ts
3335
models/UpdateUserRequest.ts
3436
models/UserEventInfo.ts
3537
models/UserInfo.ts

src/generated/models/AuthMethods.ts

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,24 @@
1313
*/
1414

1515
import { exists, mapValues } from '../runtime';
16-
import type { EmailSmsAuthMethod } from './EmailSmsAuthMethod';
16+
import type { MagicLinkAuthMethod } from './MagicLinkAuthMethod';
1717
import {
18-
EmailSmsAuthMethodFromJSON,
19-
EmailSmsAuthMethodFromJSONTyped,
20-
EmailSmsAuthMethodToJSON,
21-
} from './EmailSmsAuthMethod';
22-
import type { PasskeyAuthMethod } from './PasskeyAuthMethod';
18+
MagicLinkAuthMethodFromJSON,
19+
MagicLinkAuthMethodFromJSONTyped,
20+
MagicLinkAuthMethodToJSON,
21+
} from './MagicLinkAuthMethod';
22+
import type { OtpAuthMethod } from './OtpAuthMethod';
2323
import {
24-
PasskeyAuthMethodFromJSON,
25-
PasskeyAuthMethodFromJSONTyped,
26-
PasskeyAuthMethodToJSON,
27-
} from './PasskeyAuthMethod';
24+
OtpAuthMethodFromJSON,
25+
OtpAuthMethodFromJSONTyped,
26+
OtpAuthMethodToJSON,
27+
} from './OtpAuthMethod';
28+
import type { PasskeysAuthMethod } from './PasskeysAuthMethod';
29+
import {
30+
PasskeysAuthMethodFromJSON,
31+
PasskeysAuthMethodFromJSONTyped,
32+
PasskeysAuthMethodToJSON,
33+
} from './PasskeysAuthMethod';
2834

2935
/**
3036
* Denotes what methods this app is allowed to use for authentication with configurations
@@ -34,30 +40,30 @@ import {
3440
export interface AuthMethods {
3541
/**
3642
*
37-
* @type {PasskeyAuthMethod}
43+
* @type {PasskeysAuthMethod}
3844
* @memberof AuthMethods
3945
*/
40-
passkey: PasskeyAuthMethod;
46+
passkeys: PasskeysAuthMethod;
4147
/**
4248
*
43-
* @type {EmailSmsAuthMethod}
49+
* @type {OtpAuthMethod}
4450
* @memberof AuthMethods
4551
*/
46-
otp: EmailSmsAuthMethod;
52+
otp: OtpAuthMethod;
4753
/**
4854
*
49-
* @type {EmailSmsAuthMethod}
55+
* @type {MagicLinkAuthMethod}
5056
* @memberof AuthMethods
5157
*/
52-
magic_link: EmailSmsAuthMethod;
58+
magic_link: MagicLinkAuthMethod;
5359
}
5460

5561
/**
5662
* Check if a given object implements the AuthMethods interface.
5763
*/
5864
export function instanceOfAuthMethods(value: object): boolean {
5965
let isInstance = true;
60-
isInstance = isInstance && "passkey" in value;
66+
isInstance = isInstance && "passkeys" in value;
6167
isInstance = isInstance && "otp" in value;
6268
isInstance = isInstance && "magic_link" in value;
6369

@@ -74,9 +80,9 @@ export function AuthMethodsFromJSONTyped(json: any, ignoreDiscriminator: boolean
7480
}
7581
return {
7682

77-
'passkey': PasskeyAuthMethodFromJSON(json['passkey']),
78-
'otp': EmailSmsAuthMethodFromJSON(json['otp']),
79-
'magic_link': EmailSmsAuthMethodFromJSON(json['magic_link']),
83+
'passkeys': PasskeysAuthMethodFromJSON(json['passkeys']),
84+
'otp': OtpAuthMethodFromJSON(json['otp']),
85+
'magic_link': MagicLinkAuthMethodFromJSON(json['magic_link']),
8086
};
8187
}
8288

@@ -89,9 +95,9 @@ export function AuthMethodsToJSON(value?: AuthMethods | null): any {
8995
}
9096
return {
9197

92-
'passkey': PasskeyAuthMethodToJSON(value.passkey),
93-
'otp': EmailSmsAuthMethodToJSON(value.otp),
94-
'magic_link': EmailSmsAuthMethodToJSON(value.magic_link),
98+
'passkeys': PasskeysAuthMethodToJSON(value.passkeys),
99+
'otp': OtpAuthMethodToJSON(value.otp),
100+
'magic_link': MagicLinkAuthMethodToJSON(value.magic_link),
95101
};
96102
}
97103

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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 { TtlDisplayUnit } from './TtlDisplayUnit';
17+
import {
18+
TtlDisplayUnitFromJSON,
19+
TtlDisplayUnitFromJSONTyped,
20+
TtlDisplayUnitToJSON,
21+
} from './TtlDisplayUnit';
22+
23+
/**
24+
*
25+
* @export
26+
* @interface MagicLinkAuthMethod
27+
*/
28+
export interface MagicLinkAuthMethod {
29+
/**
30+
*
31+
* @type {boolean}
32+
* @memberof MagicLinkAuthMethod
33+
*/
34+
enabled: boolean;
35+
/**
36+
* Maximum time (IN SECONDS) for the auth to expire.
37+
* @type {number}
38+
* @memberof MagicLinkAuthMethod
39+
*/
40+
ttl: number;
41+
/**
42+
*
43+
* @type {TtlDisplayUnit}
44+
* @memberof MagicLinkAuthMethod
45+
* @deprecated
46+
*/
47+
ttl_display_unit: TtlDisplayUnit;
48+
}
49+
50+
/**
51+
* Check if a given object implements the MagicLinkAuthMethod interface.
52+
*/
53+
export function instanceOfMagicLinkAuthMethod(value: object): boolean {
54+
let isInstance = true;
55+
isInstance = isInstance && "enabled" in value;
56+
isInstance = isInstance && "ttl" in value;
57+
isInstance = isInstance && "ttl_display_unit" in value;
58+
59+
return isInstance;
60+
}
61+
62+
export function MagicLinkAuthMethodFromJSON(json: any): MagicLinkAuthMethod {
63+
return MagicLinkAuthMethodFromJSONTyped(json, false);
64+
}
65+
66+
export function MagicLinkAuthMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): MagicLinkAuthMethod {
67+
if ((json === undefined) || (json === null)) {
68+
return json;
69+
}
70+
return {
71+
72+
'enabled': json['enabled'],
73+
'ttl': json['ttl'],
74+
'ttl_display_unit': TtlDisplayUnitFromJSON(json['ttl_display_unit']),
75+
};
76+
}
77+
78+
export function MagicLinkAuthMethodToJSON(value?: MagicLinkAuthMethod | null): any {
79+
if (value === undefined) {
80+
return undefined;
81+
}
82+
if (value === null) {
83+
return null;
84+
}
85+
return {
86+
87+
'enabled': value.enabled,
88+
'ttl': value.ttl,
89+
'ttl_display_unit': TtlDisplayUnitToJSON(value.ttl_display_unit),
90+
};
91+
}
92+

src/generated/models/EmailSmsAuthMethod.ts renamed to src/generated/models/OtpAuthMethod.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,34 @@ import {
2323
/**
2424
*
2525
* @export
26-
* @interface EmailSmsAuthMethod
26+
* @interface OtpAuthMethod
2727
*/
28-
export interface EmailSmsAuthMethod {
28+
export interface OtpAuthMethod {
2929
/**
3030
*
3131
* @type {boolean}
32-
* @memberof EmailSmsAuthMethod
32+
* @memberof OtpAuthMethod
3333
*/
3434
enabled: boolean;
3535
/**
3636
* Maximum time (IN SECONDS) for the auth to expire.
3737
* @type {number}
38-
* @memberof EmailSmsAuthMethod
38+
* @memberof OtpAuthMethod
3939
*/
4040
ttl: number;
4141
/**
4242
*
4343
* @type {TtlDisplayUnit}
44-
* @memberof EmailSmsAuthMethod
44+
* @memberof OtpAuthMethod
4545
* @deprecated
4646
*/
4747
ttl_display_unit: TtlDisplayUnit;
4848
}
4949

5050
/**
51-
* Check if a given object implements the EmailSmsAuthMethod interface.
51+
* Check if a given object implements the OtpAuthMethod interface.
5252
*/
53-
export function instanceOfEmailSmsAuthMethod(value: object): boolean {
53+
export function instanceOfOtpAuthMethod(value: object): boolean {
5454
let isInstance = true;
5555
isInstance = isInstance && "enabled" in value;
5656
isInstance = isInstance && "ttl" in value;
@@ -59,11 +59,11 @@ export function instanceOfEmailSmsAuthMethod(value: object): boolean {
5959
return isInstance;
6060
}
6161

62-
export function EmailSmsAuthMethodFromJSON(json: any): EmailSmsAuthMethod {
63-
return EmailSmsAuthMethodFromJSONTyped(json, false);
62+
export function OtpAuthMethodFromJSON(json: any): OtpAuthMethod {
63+
return OtpAuthMethodFromJSONTyped(json, false);
6464
}
6565

66-
export function EmailSmsAuthMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailSmsAuthMethod {
66+
export function OtpAuthMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): OtpAuthMethod {
6767
if ((json === undefined) || (json === null)) {
6868
return json;
6969
}
@@ -75,7 +75,7 @@ export function EmailSmsAuthMethodFromJSONTyped(json: any, ignoreDiscriminator:
7575
};
7676
}
7777

78-
export function EmailSmsAuthMethodToJSON(value?: EmailSmsAuthMethod | null): any {
78+
export function OtpAuthMethodToJSON(value?: OtpAuthMethod | null): any {
7979
if (value === undefined) {
8080
return undefined;
8181
}

src/generated/models/PasskeyAuthMethod.ts renamed to src/generated/models/PasskeysAuthMethod.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,32 @@ import { exists, mapValues } from '../runtime';
1616
/**
1717
*
1818
* @export
19-
* @interface PasskeyAuthMethod
19+
* @interface PasskeysAuthMethod
2020
*/
21-
export interface PasskeyAuthMethod {
21+
export interface PasskeysAuthMethod {
2222
/**
2323
*
2424
* @type {boolean}
25-
* @memberof PasskeyAuthMethod
25+
* @memberof PasskeysAuthMethod
2626
*/
2727
enabled: boolean;
2828
}
2929

3030
/**
31-
* Check if a given object implements the PasskeyAuthMethod interface.
31+
* Check if a given object implements the PasskeysAuthMethod interface.
3232
*/
33-
export function instanceOfPasskeyAuthMethod(value: object): boolean {
33+
export function instanceOfPasskeysAuthMethod(value: object): boolean {
3434
let isInstance = true;
3535
isInstance = isInstance && "enabled" in value;
3636

3737
return isInstance;
3838
}
3939

40-
export function PasskeyAuthMethodFromJSON(json: any): PasskeyAuthMethod {
41-
return PasskeyAuthMethodFromJSONTyped(json, false);
40+
export function PasskeysAuthMethodFromJSON(json: any): PasskeysAuthMethod {
41+
return PasskeysAuthMethodFromJSONTyped(json, false);
4242
}
4343

44-
export function PasskeyAuthMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasskeyAuthMethod {
44+
export function PasskeysAuthMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasskeysAuthMethod {
4545
if ((json === undefined) || (json === null)) {
4646
return json;
4747
}
@@ -51,7 +51,7 @@ export function PasskeyAuthMethodFromJSONTyped(json: any, ignoreDiscriminator: b
5151
};
5252
}
5353

54-
export function PasskeyAuthMethodToJSON(value?: PasskeyAuthMethod | null): any {
54+
export function PasskeysAuthMethodToJSON(value?: PasskeysAuthMethod | null): any {
5555
if (value === undefined) {
5656
return undefined;
5757
}

0 commit comments

Comments
 (0)