From 1ce4cba8243180dd7ff9c7699ed5679b74a994f3 Mon Sep 17 00:00:00 2001 From: passage-beachball-bot <102172173+passage-beachball-bot@users.noreply.github.com> Date: Tue, 30 Jan 2024 13:32:57 -0600 Subject: [PATCH] SDK updates (#109) * SDK updates * Change files * Commited changelog --------- Co-authored-by: github-actions Co-authored-by: Danilo Kaltner <133175154+danilo-kaltner@users.noreply.github.com> --- ...-7838872e-b5d9-442f-9942-6d2ef22f6fcc.json | 7 ++ src/generated/.openapi-generator/FILES | 7 +- ...ection.ts => AppleUserSocialConnection.ts} | 24 ++--- ...ction.ts => GithubUserSocialConnection.ts} | 24 ++--- .../models/GoogleUserSocialConnection.ts | 93 +++++++++++++++++++ src/generated/models/UserInfo.ts | 18 ++-- .../{UserEventInfo.ts => UserRecentEvent.ts} | 26 +++--- src/generated/models/UserSocialConnections.ts | 50 ++++++---- src/generated/models/index.ts | 7 +- 9 files changed, 186 insertions(+), 70 deletions(-) create mode 100644 change/@passageidentity-passage-node-7838872e-b5d9-442f-9942-6d2ef22f6fcc.json rename src/generated/models/{GithubSocialConnection.ts => AppleUserSocialConnection.ts} (69%) rename src/generated/models/{GoogleSocialConnection.ts => GithubUserSocialConnection.ts} (69%) create mode 100644 src/generated/models/GoogleUserSocialConnection.ts rename src/generated/models/{UserEventInfo.ts => UserRecentEvent.ts} (72%) diff --git a/change/@passageidentity-passage-node-7838872e-b5d9-442f-9942-6d2ef22f6fcc.json b/change/@passageidentity-passage-node-7838872e-b5d9-442f-9942-6d2ef22f6fcc.json new file mode 100644 index 0000000..8289375 --- /dev/null +++ b/change/@passageidentity-passage-node-7838872e-b5d9-442f-9942-6d2ef22f6fcc.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "SDK updates", + "packageName": "@passageidentity/passage-node", + "email": "133175154+danilo-kaltner@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/src/generated/.openapi-generator/FILES b/src/generated/.openapi-generator/FILES index 2f25bd3..693c2ac 100644 --- a/src/generated/.openapi-generator/FILES +++ b/src/generated/.openapi-generator/FILES @@ -8,13 +8,14 @@ apis/index.ts index.ts models/AppInfo.ts models/AppResponse.ts +models/AppleUserSocialConnection.ts models/AuthMethods.ts models/CreateMagicLinkRequest.ts models/CreateUserRequest.ts models/ElementCustomization.ts models/FontFamily.ts -models/GithubSocialConnection.ts -models/GoogleSocialConnection.ts +models/GithubUserSocialConnection.ts +models/GoogleUserSocialConnection.ts models/LayoutConfig.ts models/Layouts.ts models/ListDevicesResponse.ts @@ -35,10 +36,10 @@ models/UpdateMagicLinkAuthMethod.ts models/UpdateOtpAuthMethod.ts models/UpdatePasskeysAuthMethod.ts models/UpdateUserRequest.ts -models/UserEventInfo.ts models/UserInfo.ts models/UserMetadataField.ts models/UserMetadataFieldType.ts +models/UserRecentEvent.ts models/UserResponse.ts models/UserSocialConnections.ts models/UserStatus.ts diff --git a/src/generated/models/GithubSocialConnection.ts b/src/generated/models/AppleUserSocialConnection.ts similarity index 69% rename from src/generated/models/GithubSocialConnection.ts rename to src/generated/models/AppleUserSocialConnection.ts index a347146..ca54ed5 100644 --- a/src/generated/models/GithubSocialConnection.ts +++ b/src/generated/models/AppleUserSocialConnection.ts @@ -16,39 +16,39 @@ import { exists, mapValues } from '../runtime'; /** * * @export - * @interface GithubSocialConnection + * @interface AppleUserSocialConnection */ -export interface GithubSocialConnection { +export interface AppleUserSocialConnection { /** * The external ID of the Social Connection. * @type {string} - * @memberof GithubSocialConnection + * @memberof AppleUserSocialConnection */ provider_id: string; /** * * @type {Date} - * @memberof GithubSocialConnection + * @memberof AppleUserSocialConnection */ created_at: Date; /** * * @type {Date} - * @memberof GithubSocialConnection + * @memberof AppleUserSocialConnection */ last_login_at: Date; /** * The email of connected social user. * @type {string} - * @memberof GithubSocialConnection + * @memberof AppleUserSocialConnection */ provider_identifier: string; } /** - * Check if a given object implements the GithubSocialConnection interface. + * Check if a given object implements the AppleUserSocialConnection interface. */ -export function instanceOfGithubSocialConnection(value: object): boolean { +export function instanceOfAppleUserSocialConnection(value: object): boolean { let isInstance = true; isInstance = isInstance && "provider_id" in value; isInstance = isInstance && "created_at" in value; @@ -58,11 +58,11 @@ export function instanceOfGithubSocialConnection(value: object): boolean { return isInstance; } -export function GithubSocialConnectionFromJSON(json: any): GithubSocialConnection { - return GithubSocialConnectionFromJSONTyped(json, false); +export function AppleUserSocialConnectionFromJSON(json: any): AppleUserSocialConnection { + return AppleUserSocialConnectionFromJSONTyped(json, false); } -export function GithubSocialConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GithubSocialConnection { +export function AppleUserSocialConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppleUserSocialConnection { if ((json === undefined) || (json === null)) { return json; } @@ -75,7 +75,7 @@ export function GithubSocialConnectionFromJSONTyped(json: any, ignoreDiscriminat }; } -export function GithubSocialConnectionToJSON(value?: GithubSocialConnection | null): any { +export function AppleUserSocialConnectionToJSON(value?: AppleUserSocialConnection | null): any { if (value === undefined) { return undefined; } diff --git a/src/generated/models/GoogleSocialConnection.ts b/src/generated/models/GithubUserSocialConnection.ts similarity index 69% rename from src/generated/models/GoogleSocialConnection.ts rename to src/generated/models/GithubUserSocialConnection.ts index 84f09d6..f0497b6 100644 --- a/src/generated/models/GoogleSocialConnection.ts +++ b/src/generated/models/GithubUserSocialConnection.ts @@ -16,39 +16,39 @@ import { exists, mapValues } from '../runtime'; /** * * @export - * @interface GoogleSocialConnection + * @interface GithubUserSocialConnection */ -export interface GoogleSocialConnection { +export interface GithubUserSocialConnection { /** * The external ID of the Social Connection. * @type {string} - * @memberof GoogleSocialConnection + * @memberof GithubUserSocialConnection */ provider_id: string; /** * * @type {Date} - * @memberof GoogleSocialConnection + * @memberof GithubUserSocialConnection */ created_at: Date; /** * * @type {Date} - * @memberof GoogleSocialConnection + * @memberof GithubUserSocialConnection */ last_login_at: Date; /** * The email of connected social user. * @type {string} - * @memberof GoogleSocialConnection + * @memberof GithubUserSocialConnection */ provider_identifier: string; } /** - * Check if a given object implements the GoogleSocialConnection interface. + * Check if a given object implements the GithubUserSocialConnection interface. */ -export function instanceOfGoogleSocialConnection(value: object): boolean { +export function instanceOfGithubUserSocialConnection(value: object): boolean { let isInstance = true; isInstance = isInstance && "provider_id" in value; isInstance = isInstance && "created_at" in value; @@ -58,11 +58,11 @@ export function instanceOfGoogleSocialConnection(value: object): boolean { return isInstance; } -export function GoogleSocialConnectionFromJSON(json: any): GoogleSocialConnection { - return GoogleSocialConnectionFromJSONTyped(json, false); +export function GithubUserSocialConnectionFromJSON(json: any): GithubUserSocialConnection { + return GithubUserSocialConnectionFromJSONTyped(json, false); } -export function GoogleSocialConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleSocialConnection { +export function GithubUserSocialConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GithubUserSocialConnection { if ((json === undefined) || (json === null)) { return json; } @@ -75,7 +75,7 @@ export function GoogleSocialConnectionFromJSONTyped(json: any, ignoreDiscriminat }; } -export function GoogleSocialConnectionToJSON(value?: GoogleSocialConnection | null): any { +export function GithubUserSocialConnectionToJSON(value?: GithubUserSocialConnection | null): any { if (value === undefined) { return undefined; } diff --git a/src/generated/models/GoogleUserSocialConnection.ts b/src/generated/models/GoogleUserSocialConnection.ts new file mode 100644 index 0000000..ffcf977 --- /dev/null +++ b/src/generated/models/GoogleUserSocialConnection.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Passage Management API + * Passage\'s management API to manage your Passage apps and users. + * + * The version of the OpenAPI document: 1 + * Contact: support@passage.id + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface GoogleUserSocialConnection + */ +export interface GoogleUserSocialConnection { + /** + * The external ID of the Social Connection. + * @type {string} + * @memberof GoogleUserSocialConnection + */ + provider_id: string; + /** + * + * @type {Date} + * @memberof GoogleUserSocialConnection + */ + created_at: Date; + /** + * + * @type {Date} + * @memberof GoogleUserSocialConnection + */ + last_login_at: Date; + /** + * The email of connected social user. + * @type {string} + * @memberof GoogleUserSocialConnection + */ + provider_identifier: string; +} + +/** + * Check if a given object implements the GoogleUserSocialConnection interface. + */ +export function instanceOfGoogleUserSocialConnection(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "provider_id" in value; + isInstance = isInstance && "created_at" in value; + isInstance = isInstance && "last_login_at" in value; + isInstance = isInstance && "provider_identifier" in value; + + return isInstance; +} + +export function GoogleUserSocialConnectionFromJSON(json: any): GoogleUserSocialConnection { + return GoogleUserSocialConnectionFromJSONTyped(json, false); +} + +export function GoogleUserSocialConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleUserSocialConnection { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'provider_id': json['provider_id'], + 'created_at': (new Date(json['created_at'])), + 'last_login_at': (new Date(json['last_login_at'])), + 'provider_identifier': json['provider_identifier'], + }; +} + +export function GoogleUserSocialConnectionToJSON(value?: GoogleUserSocialConnection | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'provider_id': value.provider_id, + 'created_at': (value.created_at.toISOString()), + 'last_login_at': (value.last_login_at.toISOString()), + 'provider_identifier': value.provider_identifier, + }; +} + diff --git a/src/generated/models/UserInfo.ts b/src/generated/models/UserInfo.ts index 502a650..bba654a 100644 --- a/src/generated/models/UserInfo.ts +++ b/src/generated/models/UserInfo.ts @@ -13,12 +13,12 @@ */ import { exists, mapValues } from '../runtime'; -import type { UserEventInfo } from './UserEventInfo'; +import type { UserRecentEvent } from './UserRecentEvent'; import { - UserEventInfoFromJSON, - UserEventInfoFromJSONTyped, - UserEventInfoToJSON, -} from './UserEventInfo'; + UserRecentEventFromJSON, + UserRecentEventFromJSONTyped, + UserRecentEventToJSON, +} from './UserRecentEvent'; import type { UserSocialConnections } from './UserSocialConnections'; import { UserSocialConnectionsFromJSON, @@ -100,10 +100,10 @@ export interface UserInfo { phone_verified: boolean; /** * - * @type {Array} + * @type {Array} * @memberof UserInfo */ - recent_events: Array; + recent_events: Array; /** * * @type {UserSocialConnections} @@ -191,7 +191,7 @@ export function UserInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): 'login_count': json['login_count'], 'phone': json['phone'], 'phone_verified': json['phone_verified'], - 'recent_events': ((json['recent_events'] as Array).map(UserEventInfoFromJSON)), + 'recent_events': ((json['recent_events'] as Array).map(UserRecentEventFromJSON)), 'social_connections': UserSocialConnectionsFromJSON(json['social_connections']), 'status': UserStatusFromJSON(json['status']), 'updated_at': (new Date(json['updated_at'])), @@ -219,7 +219,7 @@ export function UserInfoToJSON(value?: UserInfo | null): any { 'login_count': value.login_count, 'phone': value.phone, 'phone_verified': value.phone_verified, - 'recent_events': ((value.recent_events as Array).map(UserEventInfoToJSON)), + 'recent_events': ((value.recent_events as Array).map(UserRecentEventToJSON)), 'social_connections': UserSocialConnectionsToJSON(value.social_connections), 'status': UserStatusToJSON(value.status), 'updated_at': (value.updated_at.toISOString()), diff --git a/src/generated/models/UserEventInfo.ts b/src/generated/models/UserRecentEvent.ts similarity index 72% rename from src/generated/models/UserEventInfo.ts rename to src/generated/models/UserRecentEvent.ts index 430bd24..60baf2a 100644 --- a/src/generated/models/UserEventInfo.ts +++ b/src/generated/models/UserRecentEvent.ts @@ -16,45 +16,45 @@ import { exists, mapValues } from '../runtime'; /** * * @export - * @interface UserEventInfo + * @interface UserRecentEvent */ -export interface UserEventInfo { +export interface UserRecentEvent { /** * * @type {Date} - * @memberof UserEventInfo + * @memberof UserRecentEvent */ created_at: Date; /** * * @type {string} - * @memberof UserEventInfo + * @memberof UserRecentEvent */ id: string; /** * * @type {string} - * @memberof UserEventInfo + * @memberof UserRecentEvent */ ip_addr: string; /** * * @type {string} - * @memberof UserEventInfo + * @memberof UserRecentEvent */ type: string; /** * * @type {string} - * @memberof UserEventInfo + * @memberof UserRecentEvent */ user_agent: string; } /** - * Check if a given object implements the UserEventInfo interface. + * Check if a given object implements the UserRecentEvent interface. */ -export function instanceOfUserEventInfo(value: object): boolean { +export function instanceOfUserRecentEvent(value: object): boolean { let isInstance = true; isInstance = isInstance && "created_at" in value; isInstance = isInstance && "id" in value; @@ -65,11 +65,11 @@ export function instanceOfUserEventInfo(value: object): boolean { return isInstance; } -export function UserEventInfoFromJSON(json: any): UserEventInfo { - return UserEventInfoFromJSONTyped(json, false); +export function UserRecentEventFromJSON(json: any): UserRecentEvent { + return UserRecentEventFromJSONTyped(json, false); } -export function UserEventInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserEventInfo { +export function UserRecentEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserRecentEvent { if ((json === undefined) || (json === null)) { return json; } @@ -83,7 +83,7 @@ export function UserEventInfoFromJSONTyped(json: any, ignoreDiscriminator: boole }; } -export function UserEventInfoToJSON(value?: UserEventInfo | null): any { +export function UserRecentEventToJSON(value?: UserRecentEvent | null): any { if (value === undefined) { return undefined; } diff --git a/src/generated/models/UserSocialConnections.ts b/src/generated/models/UserSocialConnections.ts index 29e6c53..bf06df1 100644 --- a/src/generated/models/UserSocialConnections.ts +++ b/src/generated/models/UserSocialConnections.ts @@ -13,18 +13,24 @@ */ import { exists, mapValues } from '../runtime'; -import type { GithubSocialConnection } from './GithubSocialConnection'; +import type { AppleUserSocialConnection } from './AppleUserSocialConnection'; import { - GithubSocialConnectionFromJSON, - GithubSocialConnectionFromJSONTyped, - GithubSocialConnectionToJSON, -} from './GithubSocialConnection'; -import type { GoogleSocialConnection } from './GoogleSocialConnection'; + AppleUserSocialConnectionFromJSON, + AppleUserSocialConnectionFromJSONTyped, + AppleUserSocialConnectionToJSON, +} from './AppleUserSocialConnection'; +import type { GithubUserSocialConnection } from './GithubUserSocialConnection'; import { - GoogleSocialConnectionFromJSON, - GoogleSocialConnectionFromJSONTyped, - GoogleSocialConnectionToJSON, -} from './GoogleSocialConnection'; + GithubUserSocialConnectionFromJSON, + GithubUserSocialConnectionFromJSONTyped, + GithubUserSocialConnectionToJSON, +} from './GithubUserSocialConnection'; +import type { GoogleUserSocialConnection } from './GoogleUserSocialConnection'; +import { + GoogleUserSocialConnectionFromJSON, + GoogleUserSocialConnectionFromJSONTyped, + GoogleUserSocialConnectionToJSON, +} from './GoogleUserSocialConnection'; /** * @@ -34,16 +40,22 @@ import { export interface UserSocialConnections { /** * - * @type {GoogleSocialConnection} + * @type {AppleUserSocialConnection} + * @memberof UserSocialConnections + */ + apple?: AppleUserSocialConnection; + /** + * + * @type {GithubUserSocialConnection} * @memberof UserSocialConnections */ - google?: GoogleSocialConnection; + github?: GithubUserSocialConnection; /** * - * @type {GithubSocialConnection} + * @type {GoogleUserSocialConnection} * @memberof UserSocialConnections */ - github?: GithubSocialConnection; + google?: GoogleUserSocialConnection; } /** @@ -65,8 +77,9 @@ export function UserSocialConnectionsFromJSONTyped(json: any, ignoreDiscriminato } return { - 'google': !exists(json, 'google') ? undefined : GoogleSocialConnectionFromJSON(json['google']), - 'github': !exists(json, 'github') ? undefined : GithubSocialConnectionFromJSON(json['github']), + 'apple': !exists(json, 'apple') ? undefined : AppleUserSocialConnectionFromJSON(json['apple']), + 'github': !exists(json, 'github') ? undefined : GithubUserSocialConnectionFromJSON(json['github']), + 'google': !exists(json, 'google') ? undefined : GoogleUserSocialConnectionFromJSON(json['google']), }; } @@ -79,8 +92,9 @@ export function UserSocialConnectionsToJSON(value?: UserSocialConnections | null } return { - 'google': GoogleSocialConnectionToJSON(value.google), - 'github': GithubSocialConnectionToJSON(value.github), + 'apple': AppleUserSocialConnectionToJSON(value.apple), + 'github': GithubUserSocialConnectionToJSON(value.github), + 'google': GoogleUserSocialConnectionToJSON(value.google), }; } diff --git a/src/generated/models/index.ts b/src/generated/models/index.ts index 2c125c5..e34e281 100644 --- a/src/generated/models/index.ts +++ b/src/generated/models/index.ts @@ -2,13 +2,14 @@ /* eslint-disable */ export * from './AppInfo'; export * from './AppResponse'; +export * from './AppleUserSocialConnection'; export * from './AuthMethods'; export * from './CreateMagicLinkRequest'; export * from './CreateUserRequest'; export * from './ElementCustomization'; export * from './FontFamily'; -export * from './GithubSocialConnection'; -export * from './GoogleSocialConnection'; +export * from './GithubUserSocialConnection'; +export * from './GoogleUserSocialConnection'; export * from './LayoutConfig'; export * from './Layouts'; export * from './ListDevicesResponse'; @@ -29,10 +30,10 @@ export * from './UpdateMagicLinkAuthMethod'; export * from './UpdateOtpAuthMethod'; export * from './UpdatePasskeysAuthMethod'; export * from './UpdateUserRequest'; -export * from './UserEventInfo'; export * from './UserInfo'; export * from './UserMetadataField'; export * from './UserMetadataFieldType'; +export * from './UserRecentEvent'; export * from './UserResponse'; export * from './UserSocialConnections'; export * from './UserStatus';