Skip to content

Commit ee6500f

Browse files
feat(api): adding webhooks back in
1 parent a7d4fa5 commit ee6500f

7 files changed

Lines changed: 668 additions & 1 deletion

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 44
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lightspark%2Fgrid-3bb10cd66d5dd370dd6f6c0934f4bcf8b571cd375b09e7bdc1e430335683447c.yml
33
openapi_spec_hash: 8283d72bae0aac6ade01772fda453181
4-
config_hash: 66b99be4a4818d8d0bdca6ef785673da
4+
config_hash: 3b251feaa8ec393868ad53388e7bdfa5

api.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,3 +277,20 @@ Types:
277277
Methods:
278278

279279
- <code title="get /exchange-rates">client.exchangeRates.<a href="./src/resources/exchange-rates.ts">list</a>({ ...params }) -> ExchangeRateListResponse</code>
280+
281+
# Webhooks
282+
283+
Types:
284+
285+
- <code><a href="./src/resources/webhooks.ts">IncomingPaymentWebhookEvent</a></code>
286+
- <code><a href="./src/resources/webhooks.ts">OutgoingPaymentWebhookEvent</a></code>
287+
- <code><a href="./src/resources/webhooks.ts">TestWebhookWebhookEvent</a></code>
288+
- <code><a href="./src/resources/webhooks.ts">BulkUploadWebhookEvent</a></code>
289+
- <code><a href="./src/resources/webhooks.ts">InvitationClaimedWebhookEvent</a></code>
290+
- <code><a href="./src/resources/webhooks.ts">KYCStatusWebhookEvent</a></code>
291+
- <code><a href="./src/resources/webhooks.ts">InternalAccountStatusWebhookEvent</a></code>
292+
- <code><a href="./src/resources/webhooks.ts">UnwrapWebhookEvent</a></code>
293+
294+
Methods:
295+
296+
- <code>client.webhooks.<a href="./src/resources/webhooks.ts">unwrap</a>(body) -> void</code>

packages/mcp-server/src/code-tool-worker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ const fuse = new Fuse(
148148
'client.tokens.list',
149149
'client.tokens.retrieve',
150150
'client.exchangeRates.list',
151+
'client.webhooks.unwrap',
151152
],
152153
{ threshold: 1, shouldSort: true },
153154
);

packages/mcp-server/src/methods.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ export const sdkMethods: SdkMethod[] = [
274274
httpMethod: 'get',
275275
httpPath: '/exchange-rates',
276276
},
277+
{ clientCallName: 'client.webhooks.unwrap', fullyQualifiedName: 'webhooks.unwrap' },
277278
];
278279

279280
function allowedMethodsForCodeTool(options: McpOptions | undefined): SdkMethod[] | undefined {

src/client.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ import {
9696
UmaProviderListResponsesDefaultPagination,
9797
UmaProviders,
9898
} from './resources/uma-providers';
99+
import {
100+
BulkUploadWebhookEvent,
101+
IncomingPaymentWebhookEvent,
102+
InternalAccountStatusWebhookEvent,
103+
InvitationClaimedWebhookEvent,
104+
KYCStatusWebhookEvent,
105+
OutgoingPaymentWebhookEvent,
106+
TestWebhookWebhookEvent,
107+
UnwrapWebhookEvent,
108+
Webhooks,
109+
} from './resources/webhooks';
99110
import {
100111
Customer,
101112
CustomerCreate,
@@ -944,6 +955,7 @@ export class LightsparkGrid {
944955
* Endpoints for retrieving cached foreign exchange rates. Rates are cached for approximately 5 minutes and include platform-specific fees.
945956
*/
946957
exchangeRates: API.ExchangeRates = new API.ExchangeRates(this);
958+
webhooks: API.Webhooks = new API.Webhooks(this);
947959
}
948960

949961
LightsparkGrid.Config = Config;
@@ -960,6 +972,7 @@ LightsparkGrid.Sandbox = Sandbox;
960972
LightsparkGrid.UmaProviders = UmaProviders;
961973
LightsparkGrid.Tokens = Tokens;
962974
LightsparkGrid.ExchangeRates = ExchangeRates;
975+
LightsparkGrid.Webhooks = Webhooks;
963976

964977
export declare namespace LightsparkGrid {
965978
export type RequestOptions = Opts.RequestOptions;
@@ -1092,4 +1105,16 @@ export declare namespace LightsparkGrid {
10921105
type ExchangeRateListResponse as ExchangeRateListResponse,
10931106
type ExchangeRateListParams as ExchangeRateListParams,
10941107
};
1108+
1109+
export {
1110+
Webhooks as Webhooks,
1111+
type IncomingPaymentWebhookEvent as IncomingPaymentWebhookEvent,
1112+
type OutgoingPaymentWebhookEvent as OutgoingPaymentWebhookEvent,
1113+
type TestWebhookWebhookEvent as TestWebhookWebhookEvent,
1114+
type BulkUploadWebhookEvent as BulkUploadWebhookEvent,
1115+
type InvitationClaimedWebhookEvent as InvitationClaimedWebhookEvent,
1116+
type KYCStatusWebhookEvent as KYCStatusWebhookEvent,
1117+
type InternalAccountStatusWebhookEvent as InternalAccountStatusWebhookEvent,
1118+
type UnwrapWebhookEvent as UnwrapWebhookEvent,
1119+
};
10951120
}

src/resources/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,14 @@ export {
9797
type UmaProviderListParams,
9898
type UmaProviderListResponsesDefaultPagination,
9999
} from './uma-providers';
100+
export {
101+
Webhooks,
102+
type IncomingPaymentWebhookEvent,
103+
type OutgoingPaymentWebhookEvent,
104+
type TestWebhookWebhookEvent,
105+
type BulkUploadWebhookEvent,
106+
type InvitationClaimedWebhookEvent,
107+
type KYCStatusWebhookEvent,
108+
type InternalAccountStatusWebhookEvent,
109+
type UnwrapWebhookEvent,
110+
} from './webhooks';

0 commit comments

Comments
 (0)