Skip to content

Commit

Permalink
feat: remove connections endpoint from resource spec (#292)
Browse files Browse the repository at this point in the history
* feat: remove connections endpoint from resource spec

* feat(openpayments): remove connections route and associated functionality

* feat: add changeset
  • Loading branch information
omertoast authored Sep 21, 2023
1 parent 5e40509 commit 2ea12f0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 183 deletions.
6 changes: 6 additions & 0 deletions .changeset/mighty-adults-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@interledger/open-payments': minor
'@interledger/openapi': minor
---

removed connections route endpoint from the spec and any associated functionality
36 changes: 0 additions & 36 deletions openapi/resource-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,42 +103,6 @@ paths:
operationId: get-payment-pointer-keys
description: Retrieve the public keys of the Payment Pointer.
security: []
'/connections/{id}':
servers:
- url: 'https://openpayments.guide'
get:
summary: Get ILP STREAM credentials for a connection
tags:
- stream-connection
responses:
'200':
description: Connection Found
content:
application/json:
schema:
$ref: '#/components/schemas/ilp-stream-connection'
examples:
Get connection:
value:
id: 'https://openpayments.guide/connections/016da9d5-c9a4-4c80-a354-86b915a04ff8'
ilpAddress: g.ilp.iwuyge987y.98y0f34tsrt8y
sharedSecret: 1c7eaXa4rd2fFOBl1iydvCT1tV5TbM3RW1WLCafu_JA
assetCode: USD
assetScale: 2
'404':
description: Connection Not Found
operationId: get-ilp-stream-connection
description: |-
*NB* Use server url specific to this path.
Fetch new connection credentials for an ILP STREAM connection.
A connection is an ephemeral resource that is created to accommodate new incoming payments.
A new set of credential will be generated each time this API is called.
security: []
parameters:
- $ref: '#/components/parameters/id'
/incoming-payments:
post:
summary: Create an Incoming Payment
Expand Down
62 changes: 0 additions & 62 deletions packages/open-payments/src/client/ilp-stream-connection.test.ts

This file was deleted.

25 changes: 0 additions & 25 deletions packages/open-payments/src/client/ilp-stream-connection.ts

This file was deleted.

15 changes: 0 additions & 15 deletions packages/open-payments/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ import {
createIncomingPaymentRoutes,
IncomingPaymentRoutes
} from './incoming-payment'
import {
createILPStreamConnectionRoutes,
ILPStreamConnectionRoutes
} from './ilp-stream-connection'
import {
createPaymentPointerRoutes,
PaymentPointerRoutes
Expand Down Expand Up @@ -110,7 +106,6 @@ export interface CreateUnauthenticatedClientArgs {
}

export interface UnauthenticatedClient {
ilpStreamConnection: ILPStreamConnectionRoutes
paymentPointer: PaymentPointerRoutes
}

Expand All @@ -125,11 +120,6 @@ export const createUnauthenticatedClient = async (
)

return {
ilpStreamConnection: createILPStreamConnectionRoutes({
axiosInstance,
openApi: resourceServerOpenApi,
logger
}),
paymentPointer: createPaymentPointerRoutes({
axiosInstance,
openApi: resourceServerOpenApi,
Expand Down Expand Up @@ -173,11 +163,6 @@ export const createAuthenticatedClient = async (
openApi: resourceServerOpenApi,
logger
}),
ilpStreamConnection: createILPStreamConnectionRoutes({
axiosInstance,
openApi: resourceServerOpenApi,
logger
}),
paymentPointer: createPaymentPointerRoutes({
axiosInstance,
openApi: resourceServerOpenApi,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,6 @@ export interface paths {
/** Retrieve the public keys of the Payment Pointer. */
get: operations["get-payment-pointer-keys"];
};
"/connections/{id}": {
/**
* *NB* Use server url specific to this path.
*
* Fetch new connection credentials for an ILP STREAM connection.
*
* A connection is an ephemeral resource that is created to accommodate new incoming payments.
*
* A new set of credential will be generated each time this API is called.
*/
get: operations["get-ilp-stream-connection"];
parameters: {
path: {
/** Sub-resource identifier */
id: components["parameters"]["id"];
};
};
};
"/incoming-payments": {
/** List all incoming payments on the payment pointer */
get: operations["list-incoming-payments"];
Expand Down Expand Up @@ -371,33 +353,6 @@ export interface operations {
404: unknown;
};
};
/**
* *NB* Use server url specific to this path.
*
* Fetch new connection credentials for an ILP STREAM connection.
*
* A connection is an ephemeral resource that is created to accommodate new incoming payments.
*
* A new set of credential will be generated each time this API is called.
*/
"get-ilp-stream-connection": {
parameters: {
path: {
/** Sub-resource identifier */
id: components["parameters"]["id"];
};
};
responses: {
/** Connection Found */
200: {
content: {
"application/json": components["schemas"]["ilp-stream-connection"];
};
};
/** Connection Not Found */
404: unknown;
};
};
/** List all incoming payments on the payment pointer */
"list-incoming-payments": {
parameters: {
Expand Down

0 comments on commit 2ea12f0

Please sign in to comment.