Skip to content

feat: adding webhook config#189

Open
pengying wants to merge 1 commit intomainfrom
02-12-feat_adding_webhook_config
Open

feat: adding webhook config#189
pengying wants to merge 1 commit intomainfrom
02-12-feat_adding_webhook_config

Conversation

@pengying
Copy link
Contributor

@pengying pengying commented Feb 12, 2026

TL;DR

Updated Stainless configuration to prepare for SDK publishing across multiple languages with proper package naming and repository references.

What changed?

  • Changed organization name from "grid" to "Lightspark Grid"

  • Updated TypeScript configuration:

    • Changed package name to "@lightsparkdev/grid"
    • Added production repository reference to lightsparkdev/grid-js-sdk
    • Configured NPM and JSR publishing with OIDC authentication
    • Added MCP server options with "@lightsparkdev/grid-mcp" package
  • Updated Kotlin configuration:

    • Changed reverse domain to "com.lightspark.grid"
    • Added production repository reference
    • Configured Maven publishing via Sonatype
  • Added Python configuration:

    • Set package name to "grid"
    • Configured PyPI publishing (disabled for now)
  • Simplified model references by commenting out unused schemas

  • Updated external account models with more consistent naming

  • Added webhook unwrapping functionality

  • Moved webhook test endpoint to sandbox resource

  • Updated environment variable names to use GRID_CLIENT_ID and GRID_CLIENT_SECRET

  • Fixed OpenAPI transformations to properly handle type discriminators

How to test?

  1. Verify the configuration changes by running Stainless generation
  2. Ensure the generated SDKs have the correct package names and structure
  3. Test webhook unwrapping functionality
  4. Verify environment variable references work correctly

Why make this change?

This change prepares the Grid API SDKs for proper publishing across multiple language ecosystems with consistent naming and structure. It improves the developer experience by providing better organized packages and fixing type discriminator issues that could cause compilation problems. The configuration now properly reflects the Lightspark branding and repository structure, making it ready for production use.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pengying pengying marked this pull request as ready for review February 12, 2026 21:24
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 12, 2026

Greptile Overview

Greptile Summary

Updated Stainless SDK configuration for multi-language publishing across TypeScript, Kotlin, and Python with proper package naming and repository references.

Key Changes

  • Branding: Organization name changed from "grid" to "Lightspark Grid"
  • TypeScript SDK: Changed package to @lightsparkdev/grid, added production repo lightsparkdev/grid-js-sdk, enabled NPM (OIDC) and JSR publishing, configured MCP server with @lightsparkdev/grid-mcp
  • Kotlin SDK: Updated reverse domain to com.lightspark.grid, added production repo lightsparkdev/grid-kotlin-sdk, enabled Maven publishing via Sonatype portal
  • Python SDK: Added configuration with package name "grid", PyPI publishing disabled for now
  • Webhook improvements: Added webhook unwrapping with type discriminator, moved test endpoint from webhooks.send_test() to sandbox.send_test_webhook()
  • Environment variables: Renamed to more descriptive names (GRID_CLIENT_ID, GRID_CLIENT_SECRET, GRID_WEBHOOK_PUBKEY)
  • Model organization: Commented out unused customer and beneficiary schemas to simplify SDK generation
  • External account naming: Standardized with "ExternalAccountInfo" suffix for consistency
  • OpenAPI transformations: Extensive refactoring to handle type discriminators by removing base schema references instead of inline enums
  • Removed error union configuration: Deleted the errors: section that configured AllErrors discriminated union
  • Codeflow: Added release_environment: npm for proper release tracking
  • README examples: Changed from get /config to post /quotes for better developer experience

Confidence Score: 4/5

  • This PR is safe to merge with low risk, primarily consisting of SDK configuration and metadata changes
  • The changes are well-structured configuration updates for SDK generation. The OpenAPI transformation changes are complex and should be tested with Stainless generation, but follow a consistent pattern. The removal of the error union configuration and the transformation strategy shift warrant verification. No runtime code changes are involved.
  • No files require special attention - verify SDK generation works as expected

Important Files Changed

Filename Overview
.stainless/stainless.yml Comprehensive SDK configuration update for multi-language publishing. Changes include organization branding, package naming, publishing setup (NPM/JSR/Maven/PyPI), webhook unwrapping, environment variable renaming (GRID_CLIENT_ID/GRID_CLIENT_SECRET/GRID_WEBHOOK_PUBKEY), OpenAPI transformation refactoring for discriminators, removal of error union config, and addition of npm release environment.

Last reviewed commit: d3349f8

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

sandbox:
methods:
send_funds: post /sandbox/send
send_test_webhook: post /webhooks/test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verify that generated SDK docs properly reflect this endpoint move from webhooks.send_test() to sandbox.send_test_webhook() to avoid breaking existing client code

Prompt To Fix With AI
This is a comment left during a code review.
Path: .stainless/stainless.yml
Line: 232:232

Comment:
verify that generated SDK docs properly reflect this endpoint move from `webhooks.send_test()` to `sandbox.send_test_webhook()` to avoid breaking existing client code

How can I resolve this? If you propose a fix, please make it concise.

@pengying pengying force-pushed the 02-12-feat_adding_webhook_config branch from 15b6eed to d3349f8 Compare February 13, 2026 00:41
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +410 to +419
- command: remove
reason: >-
Remove inline destinationType enums from transaction and quote
destination allOf variants to avoid conflicting types with their
base schemas which define destinationType via shared $ref enums
args:
unionPath: AllErrors
enumProperty: code
# ── customerType: IndividualCustomerFields / BusinessCustomerFields ──
target:
- "$.components.schemas.AccountTransactionDestination.allOf[0]"
- "$.components.schemas.UmaAddressTransactionDestination.allOf[0]"
keys: [ "$ref" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check that this transformation correctly removes the base schema reference. Removing $ref from allOf[0] is different from the pattern used in other transformations (which remove discriminator properties). Verify the generated SDK handles this correctly.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .stainless/stainless.yml
Line: 410:419

Comment:
Check that this transformation correctly removes the base schema reference. Removing `$ref` from `allOf[0]` is different from the pattern used in other transformations (which remove discriminator properties). Verify the generated SDK handles this correctly.

How can I resolve this? If you propose a fix, please make it concise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant