From 86b50fbc9ca8f51b220f2136439d0a5d93991646 Mon Sep 17 00:00:00 2001 From: qijieye Date: Fri, 15 May 2026 15:18:10 +0200 Subject: [PATCH] add auth/trust api --- Client/Auth/index.ts | 4 +++- index.ts | 2 ++ model/MPayProcessResponse.ts | 6 ++++++ model/index.ts | 2 ++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 model/MPayProcessResponse.ts diff --git a/Client/Auth/index.ts b/Client/Auth/index.ts index b3e6e6d5..4130478f 100644 --- a/Client/Auth/index.ts +++ b/Client/Auth/index.ts @@ -77,6 +77,9 @@ export class Auth { } return result } + async trust() { + return await this.connection.get(`auth/trust`) + } async refresh(request?: model.RelogWithNewSessionDetailsRequest) { let result if (request) { @@ -104,7 +107,6 @@ export class Auth { async unassume(): Promise { return this.data.user?.organisation?.code ? await this.assume(this.data.user.organisation.code) : undefined } - async logout() { this.roles = undefined this.features = undefined diff --git a/index.ts b/index.ts index 809f8d4c..8fe599d9 100644 --- a/index.ts +++ b/index.ts @@ -143,6 +143,7 @@ import { MetadataFormat, MetadataRequest, MetadataResponse, + MPayProcessResponse, Notification, OmnisetupFlags, OmnisetupProviderRequest, @@ -409,6 +410,7 @@ export { MetadataFormat, MetadataRequest, MetadataResponse, + MPayProcessResponse, TransferDestinationRequest, Notification, OmnisetupFlags, diff --git a/model/MPayProcessResponse.ts b/model/MPayProcessResponse.ts new file mode 100644 index 00000000..5be0fc70 --- /dev/null +++ b/model/MPayProcessResponse.ts @@ -0,0 +1,6 @@ +import { Issue } from "./Issue" + +export interface MPayProcessResponse { + status: "SUCCESS" | "FAILURE" + issues?: Issue[] +} diff --git a/model/index.ts b/model/index.ts index fda46bfd..57d7de9c 100644 --- a/model/index.ts +++ b/model/index.ts @@ -143,6 +143,7 @@ import { MerchantType } from "./MerchantType" import { MetadataFormat } from "./MetadataFormat" import { MetadataRequest } from "./MetadataRequest" import { MetadataResponse } from "./MetadataResponse" +import { MPayProcessResponse } from "./MPayProcessResponse" import { Notification } from "./Notification" import { OmnisetupFlags } from "./OmnisetupFlags" import { OmnisetupProviderRequest } from "./OmnisetupProviderRequest" @@ -410,6 +411,7 @@ export { MetadataFormat, MetadataRequest, MetadataResponse, + MPayProcessResponse, Notification, OmnisetupFlags, OmnisetupProviderRequest,