export type ExtraDetail = { name: string; reason: string; }; export type ProblemDetails = { type?: (string) | null; title?: (string) | null; status?: (number) | null; detail?: (string) | null; instance?: (string) | null; traceId?: (string) | null; extraDetails?: Array | null; }; export type QueryResponse = { webhooks: Array; }; export type RegisterRequest = { /** * The URL that updates should be sent to. * Must be a valid, world-reachable URL. * The URL must use HTTPS. * The URL must respond with a 2XX HTTP status code, like `HTTP 200 OK`. * Can not be a URL that redirects to a different URL. * We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080. */ url: string; /** * See [Webhooks API Events](/docs/APIs/webhooks-api/events/) for details. */ events: Array<(string)>; }; export type RegisterResponse = { /** * The ID of the webhook URL. Used to retrieve and delete it later. */ id: string; /** * The secret of the webhook URL, used in the `Authorization` header * for the API request to the webhook URL. * See: [Request authentication](/docs/APIs/webhooks-api/request-authentication/). */ secret: string; }; export type Webhook = { /** * The ID of the webhook URL. */ id: string; url: string; events: Array<(string)>; }; export type GetV1WebhooksData = { headers: { /** * The Merchant Serial Number (MSN) is a unique ID for the sale unit that this payment is made for. * This is a required parameter if you are a partner making payments on behalf of a merchant. * The partner must use the merchant's MSN (not the partner's MSN). * This parameter is optional, and recommended, for regular Vipps merchants making payments for themselves. */ "Merchant-Serial-Number"?: string; /** * The subscription key */ "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 GetV1WebhooksResponse = QueryResponse; export type GetV1WebhooksError = ProblemDetails; export type PostV1WebhooksData = { body: RegisterRequest; headers: { /** * The Merchant Serial Number (MSN) is a unique ID for the sale unit that this payment is made for. * This is a required parameter if you are a partner making payments on behalf of a merchant. * The partner must use the merchant's MSN (not the partner's MSN). * This parameter is optional, and recommended, for regular Vipps merchants making payments for themselves. */ "Merchant-Serial-Number"?: string; /** * The subscription key. * 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 PostV1WebhooksResponse = RegisterResponse; export type PostV1WebhooksError = ProblemDetails; export type DeleteV1WebhooksByIdData = { headers: { /** * The Merchant Serial Number (MSN) is a unique ID for the sale unit that this payment is made for. * This is a required parameter if you are a partner making payments on behalf of a merchant. * The partner must use the merchant's MSN (not the partner's MSN). * This parameter is optional, and recommended, for regular Vipps merchants making payments for themselves. */ "Merchant-Serial-Number"?: string; /** * The subscription key */ "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; }; path: { id: string; }; }; export type DeleteV1WebhooksByIdResponse = void; export type DeleteV1WebhooksByIdError = ProblemDetails; export type $OpenApiTs = { "/v1/webhooks": { get: { req: GetV1WebhooksData; res: { /** * Success */ "200": QueryResponse; /** * Bad Request */ "400": ProblemDetails; }; }; post: { req: PostV1WebhooksData; res: { /** * Created */ "201": RegisterResponse; /** * Bad Request */ "400": ProblemDetails; }; }; }; "/v1/webhooks/{id}": { delete: { req: DeleteV1WebhooksByIdData; res: { /** * No Content */ "204": void; /** * Bad Request */ "400": ProblemDetails; }; }; }; }; //# sourceMappingURL=types.gen.d.ts.map