Skip to content

Commit

Permalink
Update internal types (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-zijdemans-vipps authored Oct 22, 2024
1 parent 1babb0d commit 0588de1
Show file tree
Hide file tree
Showing 5 changed files with 2,016 additions and 1,798 deletions.
122 changes: 65 additions & 57 deletions src/generated_types/access_token/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,67 +103,75 @@ export type ParameterVipps_System_Plugin_Name = string;
export type ParameterVipps_System_Plugin_Version = string;

export type FetchAuthorizationTokenUsingPostData = {
/**
* The `client_id` is available on portal.vippsmobilepay.com, under the *Developer* section.
* Think of it as the "username".
*/
clientId: string;
/**
* The `client_secret` is available on portal.vippsmobilepay.com, under the *Developer* section.
* Think of it as the "password".
* Keep it secret.
* We will never ask for it, and we don't need it for anything.
*/
clientSecret: string;
/**
* The merchant serial number (MSN) for the sales unit. The Merchant-Serial-Number header
* can be used with all API keys, and can speed up any trouble-shooting of API
* problems quite a bit.
*/
merchantSerialNumber?: string;
/**
* The subscription key for a sales unit. See [API keys](/docs/knowledge-base/api-keys/).
*/
ocpApimSubscriptionKey: string;
/**
* The name of the ecommerce solution.
* One word in lowercase letters is good.
* See [http-headers](/docs/knowledge-base/http-headers).
*/
vippsSystemName?: string;
/**
* The name of the ecommerce plugin (if applicable).
* One word in lowercase letters is good.
* See [http-headers](/docs/knowledge-base/http-headers).
*/
vippsSystemPluginName?: string;
/**
* The version number of the ecommerce plugin (if applicable).
* See [http-headers](/docs/knowledge-base/http-headers).
*/
vippsSystemPluginVersion?: string;
/**
* The version number of the ecommerce solution.
* See [http-headers](/docs/knowledge-base/http-headers).
*/
vippsSystemVersion?: string;
headers: {
/**
* The `client_id` is available on portal.vippsmobilepay.com, under the *Developer* section.
* Think of it as the "username".
*/
client_id: string;
/**
* The `client_secret` is available on portal.vippsmobilepay.com, under the *Developer* section.
* Think of it as the "password".
* Keep it secret.
* We will never ask for it, and we don't need it for anything.
*/
client_secret: string;
/**
* The merchant serial number (MSN) for the sales unit. The Merchant-Serial-Number header
* can be used with all API keys, and can speed up any trouble-shooting of API
* problems quite a bit.
*/
"Merchant-Serial-Number"?: string;
/**
* The subscription key for a sales unit. See [API keys](/docs/knowledge-base/api-keys/).
*/
"Ocp-Apim-Subscription-Key": string;
/**
* The name of the ecommerce solution.
* One word in lowercase letters is good.
* See [http-headers](/docs/knowledge-base/http-headers).
*/
"Vipps-System-Name"?: string;
/**
* The name of the ecommerce plugin (if applicable).
* One word in lowercase letters is good.
* See [http-headers](/docs/knowledge-base/http-headers).
*/
"Vipps-System-Plugin-Name"?: string;
/**
* The version number of the ecommerce plugin (if applicable).
* See [http-headers](/docs/knowledge-base/http-headers).
*/
"Vipps-System-Plugin-Version"?: string;
/**
* The version number of the ecommerce solution.
* See [http-headers](/docs/knowledge-base/http-headers).
*/
"Vipps-System-Version"?: string;
};
};

export type FetchAuthorizationTokenUsingPostResponse =
AuthorizationTokenResponse;

export type FetchAuthorizationTokenUsingPostError = unknown;

export type FetchTokenData = {
/**
* The string 'client_id:client_secret' encoded to Base64 with Basic in front
*/
authorization: string;
requestBody: {
body: {
grant_type?: "client_credentials";
};
headers: {
/**
* The string 'client_id:client_secret' encoded to Base64 with Basic in front
*/
Authorization: string;
};
};

export type FetchTokenResponse = TokenResponse;

export type FetchTokenError = unknown;

export type $OpenApiTs = {
"/accesstoken/get": {
post: {
Expand All @@ -172,19 +180,19 @@ export type $OpenApiTs = {
/**
* OK
*/
200: AuthorizationTokenResponse;
"200": AuthorizationTokenResponse;
/**
* Bad request
*/
400: unknown;
"400": unknown;
/**
* Unauthorized
*/
401: unknown;
"401": unknown;
/**
* Server error.
*/
500: unknown;
"500": unknown;
};
};
};
Expand All @@ -195,19 +203,19 @@ export type $OpenApiTs = {
/**
* OK
*/
200: TokenResponse;
"200": TokenResponse;
/**
* Bad request
*/
400: unknown;
"400": unknown;
/**
* Unauthorized
*/
401: unknown;
"401": unknown;
/**
* Server error.
*/
500: unknown;
"500": unknown;
};
};
};
Expand Down
86 changes: 47 additions & 39 deletions src/generated_types/checkout/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1009,40 +1009,48 @@ export type ParameterMerchant_Serial_Number = string;
export type ParameterIdempotency_Key = string;

export type PostCheckoutV3SessionData = {
clientId?: string;
clientSecret?: string;
idempotencyKey?: string;
merchantSerialNumber?: string;
ocpApimSubscriptionKey?: string;
requestBody?:
| InitiatePaymentSessionRequest
| InitiateSubscriptionSessionRequest;
vippsSystemName?: string;
vippsSystemPluginName?: string;
vippsSystemPluginVersion?: string;
vippsSystemVersion?: string;
body?: InitiatePaymentSessionRequest | InitiateSubscriptionSessionRequest;
headers?: {
client_id?: string;
client_secret?: string;
"Idempotency-Key"?: string;
"Merchant-Serial-Number"?: string;
"Ocp-Apim-Subscription-Key"?: string;
"Vipps-System-Name"?: string;
"Vipps-System-Plugin-Name"?: string;
"Vipps-System-Plugin-Version"?: string;
"Vipps-System-Version"?: string;
};
};

export type PostCheckoutV3SessionResponse = InitiateSessionResponse;

export type PostCheckoutV3SessionError = CheckoutProblemDetails;

export type GetCheckoutV3SessionByReferenceData = {
clientId?: string;
clientSecret?: string;
idempotencyKey?: string;
merchantSerialNumber?: string;
ocpApimSubscriptionKey?: string;
/**
* The reference of the session. Example: "123123".
*/
reference: string;
vippsSystemName?: string;
vippsSystemPluginName?: string;
vippsSystemPluginVersion?: string;
vippsSystemVersion?: string;
headers?: {
client_id?: string;
client_secret?: string;
"Idempotency-Key"?: string;
"Merchant-Serial-Number"?: string;
"Ocp-Apim-Subscription-Key"?: string;
"Vipps-System-Name"?: string;
"Vipps-System-Plugin-Name"?: string;
"Vipps-System-Plugin-Version"?: string;
"Vipps-System-Version"?: string;
};
path: {
/**
* The reference of the session. Example: "123123".
*/
reference: string;
};
};

export type GetCheckoutV3SessionByReferenceResponse = SessionResponse;

export type GetCheckoutV3SessionByReferenceError = CheckoutProblemDetails;

export type $OpenApiTs = {
"/checkout/v3/session": {
post: {
Expand All @@ -1051,31 +1059,31 @@ export type $OpenApiTs = {
/**
* Success
*/
200: InitiateSessionResponse;
"200": InitiateSessionResponse;
/**
* BadRequest: Validation errors
*/
400: CheckoutProblemDetails;
"400": CheckoutProblemDetails;
/**
* Unauthorized: Invalid credentials
*/
401: CheckoutProblemDetails;
"401": CheckoutProblemDetails;
/**
* Forbidden: Invalid subscription or configuration
*/
403: CheckoutProblemDetails;
"403": CheckoutProblemDetails;
/**
* Conflict. Duplicate reference
*/
409: CheckoutProblemDetails;
"409": CheckoutProblemDetails;
/**
* InternalServerError: Unexpected errors
*/
500: CheckoutProblemDetails;
"500": CheckoutProblemDetails;
/**
* BadGateway: Unexpected errors in integrations
*/
502: CheckoutProblemDetails;
"502": CheckoutProblemDetails;
};
};
};
Expand All @@ -1086,31 +1094,31 @@ export type $OpenApiTs = {
/**
* Success
*/
200: SessionResponse;
"200": SessionResponse;
/**
* BadRequest: Validation errors
*/
400: CheckoutProblemDetails;
"400": CheckoutProblemDetails;
/**
* Unauthorized: Invalid credentials
*/
401: CheckoutProblemDetails;
"401": CheckoutProblemDetails;
/**
* Forbidden: Invalid subscription or configuration
*/
403: CheckoutProblemDetails;
"403": CheckoutProblemDetails;
/**
* NotFound: The specified session id is unknown.
*/
404: CheckoutProblemDetails;
"404": CheckoutProblemDetails;
/**
* InternalServerError: Unexpected errors
*/
500: CheckoutProblemDetails;
"500": CheckoutProblemDetails;
/**
* BadGateway: Unexpected errors in integrations
*/
502: CheckoutProblemDetails;
"502": CheckoutProblemDetails;
};
};
};
Expand Down
Loading

0 comments on commit 0588de1

Please sign in to comment.