diff --git a/packages/openapi/package.json b/packages/openapi/package.json index 7d94e549..1f7506ea 100644 --- a/packages/openapi/package.json +++ b/packages/openapi/package.json @@ -2,6 +2,8 @@ "name": "@interledger/wm-openapi", "homepage": "https://github.com/interledger/web-monetization-extension/tree/main/packages/openapi", "private": true, + "main": "src/index.ts", + "types": "src/index.ts", "repository": { "type": "git", "url": "git@github.com:interledeger/web-monetization-extension.git", diff --git a/packages/openapi/schemas/web-monetization-server.yaml b/packages/openapi/schemas/web-monetization-server.yaml index 3c08cf0a..8bf82e65 100644 --- a/packages/openapi/schemas/web-monetization-server.yaml +++ b/packages/openapi/schemas/web-monetization-server.yaml @@ -8,6 +8,7 @@ info: paths: /: post: + operationId: connect-wallet security: - bearer: [] summary: Connect a wallet diff --git a/packages/openapi/src/generated/wm-server-types.ts b/packages/openapi/src/generated/wm-server-types.ts index 3a4f77c8..67c14a4b 100644 --- a/packages/openapi/src/generated/wm-server-types.ts +++ b/packages/openapi/src/generated/wm-server-types.ts @@ -7,32 +7,7 @@ export interface paths { "/": { /** Connect a wallet */ - post: { - requestBody: { - content: { - "application/json": { - /** Format: uri */ - walletAddressUrl: string; - amount: number; - recurring: boolean; - }; - }; - }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": { - /** Format: uri */ - interactionUrl: string; - /** Format: uri */ - continueUrl: string; - continueToken: string; - }; - }; - }; - }; - }; + post: operations["connect-wallet"]; }; "/incoming-payment": { /** Create incoming payment */ @@ -103,4 +78,33 @@ export type $defs = Record; export type external = Record; -export type operations = Record; +export interface operations { + + /** Connect a wallet */ + "connect-wallet": { + requestBody: { + content: { + "application/json": { + /** Format: uri */ + walletAddressUrl: string; + amount: number; + recurring: boolean; + }; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": { + /** Format: uri */ + interactionUrl: string; + /** Format: uri */ + continueUrl: string; + continueToken: string; + }; + }; + }; + }; + }; +} diff --git a/packages/openapi/src/index.ts b/packages/openapi/src/index.ts index e69de29b..40ec6eac 100644 --- a/packages/openapi/src/index.ts +++ b/packages/openapi/src/index.ts @@ -0,0 +1 @@ +export * from './generated/wm-server-types';