Skip to content

Commit 2d0527c

Browse files
committed
feat: add Stainless SDK config and misc cleanups
- Add .stainless/stainless.yml and workspace.json - Add AllErrors schema and remove retry quotes endpoint - Update .redocly.lint-ignore.yaml - Fix UltimateBeneficialOwner phone format - Fix internal_accounts ref path
1 parent d0f0475 commit 2d0527c

9 files changed

Lines changed: 391 additions & 38 deletions

File tree

.redocly.lint-ignore.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API.
22
# See https://redocly.com/docs/cli/ for more information.
33
openapi.yaml:
4+
no-unused-components:
5+
- '#/components/schemas/AllErrors'
6+
no-required-schema-properties-undefined:
7+
- '#/components/schemas/QuoteSource/required/0'
8+
- '#/components/schemas/Quote/properties/destination/required/0'
49
no-invalid-media-type-examples:
510
- >-
611
#/paths/~1customers~1external-accounts/post/requestBody/content/application~1json/schema

.stainless/stainless.yml

Lines changed: 329 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,329 @@
1+
# yaml-language-server: $schema=https://app.stainless.com/config.schema.json
2+
3+
# The main edition for the config, see the [docs] for more information.
4+
#
5+
# [docs]: https://www.stainless.com/docs/reference/editions
6+
edition: 2025-10-10
7+
8+
organization:
9+
# Name of your organization or company, used to determine the name of the client
10+
# and headings.
11+
name: grid
12+
# Link to your API documentation.
13+
docs: ''
14+
# Contact email for bug reports, questions, and support requests.
15+
contact: support@lightspark.com
16+
17+
# `targets` define the output targets and their customization options, such as
18+
# whether to emit the Node SDK and what its package name should be.
19+
targets:
20+
typescript:
21+
# The edition for this target, see the [docs] for more information.
22+
#
23+
# [docs]: https://www.stainless.com/docs/reference/editions
24+
edition: typescript.2025-10-10
25+
package_name: grid
26+
production_repo: null
27+
publish:
28+
npm: false
29+
kotlin:
30+
edition: kotlin.2025-10-08
31+
reverse_domain: com.grid.api
32+
production_repo: null
33+
publish:
34+
maven: false
35+
36+
# `environments` are a map of the name of the environment (e.g. "sandbox",
37+
# "production") to the corresponding url to use.
38+
environments:
39+
production: https://api.lightspark.com/grid/2025-10-13
40+
41+
# `resources` define the structure and organization for your API, such as how
42+
# methods and models are grouped together and accessed. See the [configuration
43+
# guide] for more information.
44+
#
45+
# [configuration guide]: https://www.stainless.com/docs/guides/configure#resources
46+
resources:
47+
config:
48+
# Configure the methods defined in this resource. Each key in the object is the
49+
# name of the method and the value is either an endpoint (for example, `get /foo`)
50+
# or an object with more detail.
51+
#
52+
# [reference]: https://www.stainless.com/docs/reference/config#method
53+
# Configure the models--named types--defined in the resource. Each key in the
54+
# object is the name of the model and the value is either the name of a schema in
55+
# `#/components/schemas` or an object with more detail.
56+
#
57+
# [reference]: https://www.stainless.com/docs/reference/config#model
58+
models:
59+
customer_info_field_name: '#/components/schemas/CustomerInfoFieldName'
60+
platform_currency_config: '#/components/schemas/PlatformCurrencyConfig'
61+
platform_config: '#/components/schemas/PlatformConfig'
62+
methods:
63+
retrieve: get /config
64+
update: patch /config
65+
66+
customers:
67+
models:
68+
customer_type: '#/components/schemas/CustomerType'
69+
individual_customer: '#/components/schemas/IndividualCustomer'
70+
customer: '#/components/schemas/Customer'
71+
address: '#/components/schemas/Address'
72+
ultimate_beneficial_owner: '#/components/schemas/UltimateBeneficialOwner'
73+
business_customer: '#/components/schemas/BusinessCustomer'
74+
individual_customer_update: '#/components/schemas/IndividualCustomerUpdate'
75+
business_customer_update: '#/components/schemas/BusinessCustomerUpdate'
76+
methods:
77+
create:
78+
endpoint: post /customers
79+
body_param_name: CreateCustomerRequest
80+
list: get /customers
81+
retrieve: get /customers/{customerId}
82+
update:
83+
endpoint: patch /customers/{customerId}
84+
body_param_name: UpdateCustomerRequest
85+
delete: delete /customers/{customerId}
86+
get_kyc_link: get /customers/kyc-link
87+
list_internal_accounts: get /customers/internal-accounts
88+
# Subresources define resources that are nested within another for more powerful
89+
# logical groupings, e.g. `cards.payments`.
90+
subresources:
91+
external_accounts:
92+
models:
93+
us_account_info: '#/components/schemas/UsAccountInfo'
94+
pix_account_info: '#/components/schemas/PixAccountInfo'
95+
iban_account_info: '#/components/schemas/IbanAccountInfo'
96+
upi_account_info: '#/components/schemas/UpiAccountInfo'
97+
spark_wallet_info: '#/components/schemas/SparkWalletInfo'
98+
solana_wallet_info: '#/components/schemas/SolanaWalletInfo'
99+
tron_wallet_info: '#/components/schemas/TronWalletInfo'
100+
polygon_wallet_info: '#/components/schemas/PolygonWalletInfo'
101+
clabe_account_info: '#/components/schemas/ClabeAccountInfo'
102+
base_wallet_info: '#/components/schemas/BaseWalletInfo'
103+
individual_beneficiary: '#/components/schemas/IndividualBeneficiary'
104+
business_beneficiary: '#/components/schemas/BusinessBeneficiary'
105+
external_account_info: '#/components/schemas/ExternalAccountInfo'
106+
external_account: '#/components/schemas/ExternalAccount'
107+
external_account_create: '#/components/schemas/ExternalAccountCreateRequest'
108+
lightning_external_account_info: "#/components/schemas/LightningExternalAccountInfo"
109+
ngn_account_external_account_info: "#/components/schemas/NgnAccountExternalAccountInfo"
110+
methods:
111+
list: get /customers/external-accounts
112+
create: post /customers/external-accounts
113+
bulk:
114+
methods:
115+
upload_csv: post /customers/bulk/csv
116+
get_job_status: get /customers/bulk/jobs/{jobId}
117+
118+
platform:
119+
methods:
120+
list_internal_accounts:
121+
endpoint: get /platform/internal-accounts
122+
paginated: false
123+
subresources:
124+
external_accounts:
125+
methods:
126+
list:
127+
endpoint: get /platform/external-accounts
128+
paginated: false
129+
create: post /platform/external-accounts
130+
131+
plaid:
132+
methods:
133+
create_link_token: post /plaid/link-tokens
134+
submit_public_token: post /plaid/callback/{plaid_link_token}
135+
136+
transfer_in:
137+
models:
138+
transaction: '#/components/schemas/Transaction'
139+
methods:
140+
create: post /transfer-in
141+
142+
transfer_out:
143+
methods:
144+
create: post /transfer-out
145+
146+
receiver:
147+
models:
148+
counterparty_field_definition: '#/components/schemas/CounterpartyFieldDefinition'
149+
lookup_response: '#/components/schemas/ReceiverLookupResponse'
150+
methods:
151+
lookup_uma: get /receiver/uma/{receiverUmaAddress}
152+
lookup_external_account: get /receiver/external-account/{accountId}
153+
154+
quotes:
155+
models:
156+
currency: '#/components/schemas/Currency'
157+
payment_instructions: '#/components/schemas/PaymentInstructions'
158+
outgoing_rate_details: '#/components/schemas/OutgoingRateDetails'
159+
quote_source: '#/components/schemas/QuoteSource'
160+
quote: '#/components/schemas/Quote'
161+
methods:
162+
retrieve: get /quotes/{quoteId}
163+
create: post /quotes
164+
list: get /quotes
165+
execute: post /quotes/{quoteId}/execute
166+
167+
transactions:
168+
models:
169+
transaction_type: '#/components/schemas/TransactionType'
170+
incoming_transaction: '#/components/schemas/IncomingTransaction'
171+
transaction_status: '#/components/schemas/TransactionStatus'
172+
account_source: "#/components/schemas/AccountSource"
173+
uma_address_source: "#/components/schemas/UmaAddressSource"
174+
methods:
175+
list: get /transactions
176+
retrieve: get /transactions/{transactionId}
177+
approve: post /transactions/{transactionId}/approve
178+
reject: post /transactions/{transactionId}/reject
179+
180+
webhooks:
181+
methods:
182+
send_test: post /webhooks/test
183+
184+
invitations:
185+
models:
186+
currency_amount: '#/components/schemas/CurrencyAmount'
187+
uma_invitation: '#/components/schemas/UmaInvitation'
188+
methods:
189+
create: post /invitations
190+
retrieve: get /invitations/{invitationCode}
191+
claim: post /invitations/{invitationCode}/claim
192+
cancel: post /invitations/{invitationCode}/cancel
193+
194+
sandbox:
195+
methods:
196+
send_funds: post /sandbox/send
197+
subresources:
198+
uma:
199+
methods:
200+
receive_payment: post /sandbox/uma/receive
201+
internal_accounts:
202+
models:
203+
internal_account: '#/components/schemas/InternalAccount'
204+
methods:
205+
fund: post /sandbox/internal-accounts/{accountId}/fund
206+
207+
uma_providers:
208+
methods:
209+
list: get /uma-providers
210+
211+
tokens:
212+
models:
213+
permission: '#/components/schemas/Permission'
214+
api_token: '#/components/schemas/ApiToken'
215+
methods:
216+
create: post /tokens
217+
list: get /tokens
218+
retrieve: get /tokens/{tokenId}
219+
delete: delete /tokens/{tokenId}
220+
221+
settings:
222+
# All generated integration tests that hit the prism mock http server are marked
223+
# as skipped. Removing this setting or setting it to false enables tests, but
224+
# doing so may result in test failures due to bugs in the test server.
225+
#
226+
# [prism mock http server]: https://stoplight.io/open-source/prism
227+
disable_mock_tests: true
228+
license: Apache-2.0
229+
230+
# `client_settings` define settings for the API client, such as extra constructor
231+
# arguments (used for authentication), retry behavior, idempotency, etc.
232+
client_settings:
233+
opts:
234+
username:
235+
type: string
236+
nullable: false
237+
auth:
238+
security_scheme: BasicAuth
239+
role: username
240+
description: API token authentication using format `<api token id>:<api client secret>`
241+
read_env: GRID_USERNAME
242+
password:
243+
type: string
244+
nullable: false
245+
auth:
246+
security_scheme: BasicAuth
247+
role: password
248+
description: API token authentication using format `<api token id>:<api client secret>`
249+
read_env: GRID_PASSWORD
250+
webhook_signature:
251+
type: string
252+
nullable: true
253+
auth:
254+
security_scheme: WebhookSignature
255+
description: |
256+
Secp256r1 (P-256) asymmetric signature of the webhook payload, which can be used to verify that the webhook was sent by Grid.
257+
258+
To verify the signature:
259+
1. Get the Grid public key provided to you during integration
260+
2. Decode the base64 signature from the header
261+
3. Create a SHA-256 hash of the request body
262+
4. Verify the signature using the public key and the hash
263+
264+
If the signature verification succeeds, the webhook is authentic. If not, it should be rejected.
265+
read_env: GRID_WEBHOOK_SIGNATURE
266+
267+
# `readme` is used to configure the code snippets that will be rendered in the
268+
# README.md of various SDKs. In particular, you can change the `headline`
269+
# snippet's endpoint and the arguments to call it with.
270+
readme:
271+
example_requests:
272+
default:
273+
type: request
274+
endpoint: get /config
275+
params: {}
276+
headline:
277+
type: request
278+
endpoint: get /config
279+
params: {}
280+
pagination:
281+
type: request
282+
endpoint: get /customers
283+
params: {}
284+
285+
pagination:
286+
- name: default_pagination
287+
type: cursor
288+
request:
289+
cursor:
290+
type: string
291+
x-stainless-pagination-property:
292+
purpose: next_cursor_param
293+
response:
294+
data:
295+
type: array
296+
items:
297+
type: object
298+
nextCursor:
299+
type: string
300+
x-stainless-pagination-property:
301+
purpose: next_cursor_field
302+
hasMore:
303+
type: boolean
304+
x-stainless-pagination-property:
305+
purpose: has_next_page
306+
totalCount:
307+
type: integer
308+
309+
openapi:
310+
code_samples: mintlify
311+
transformations:
312+
- command: splitSchemasByEnumProperty
313+
reason: Split error schemas with multiple enum values into distinct ones
314+
args:
315+
unionPath: AllErrors
316+
enumProperty: code
317+
318+
errors:
319+
union:
320+
source: AllErrors
321+
discriminator: code
322+
status_property: status
323+
324+
codeflow:
325+
detect_breaking_changes: true
326+
diagnostics:
327+
ignored:
328+
Schema/ObjectHasNoProperties:
329+
- pagination.0.response.data.items

.stainless/workspace.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"project": "grid",
3+
"openapi_spec": "../mintlify/openapi.yaml",
4+
"stainless_config": "stainless.yml",
5+
"targets": {
6+
"typescript": {
7+
"output_path": "../sdks/grid-typescript"
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)