@dual-os/stripe-api 0.0.0-stage → 6.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +4 -0
- package/Runner.js +5537 -0
- package/Runner.js.map +59 -0
- package/bundle-inventory.json +1 -0
- package/dist/_virtual/_rolldown/runtime.js +10 -0
- package/dist/_virtual/_rolldown/runtime.js.map +9 -0
- package/dist/auth.d.ts +21 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +17 -0
- package/dist/auth.js.map +9 -0
- package/dist/generated/http.d.ts +81 -0
- package/dist/generated/http.d.ts.map +1 -0
- package/dist/generated/http.js +64 -0
- package/dist/generated/http.js.map +9 -0
- package/dist/generated/operations.d.ts +73686 -0
- package/dist/generated/operations.d.ts.map +1 -0
- package/dist/generated/operations.js +5212 -0
- package/dist/generated/operations.js.map +9 -0
- package/dist/generated/plugin.d.ts +2734 -0
- package/dist/generated/plugin.d.ts.map +1 -0
- package/dist/generated/plugin.js +4396 -0
- package/dist/generated/plugin.js.map +10 -0
- package/dist/triggers.d.ts +98 -0
- package/dist/triggers.d.ts.map +1 -0
- package/dist/triggers.js +17 -0
- package/dist/triggers.js.map +9 -0
- package/dual-plugin.json +1 -0
- package/licenses/@dual-os_sdk@0.9.0/LICENSE +4 -0
- package/licenses/@effect_platform-node-shared@4.1.2/LICENSE +21 -0
- package/licenses/@effect_platform-node@4.1.2/LICENSE +21 -0
- package/licenses/effect@4.1.2/LICENSE +21 -0
- package/package.json +1 -6
- package/plugin-2jdfj02n.js +18 -0
- package/plugin-2jdfj02n.js.map +10 -0
- package/plugin-b3yra2xt.js +145 -0
- package/plugin-b3yra2xt.js.map +10 -0
- package/plugin-g8e5s4bz.js +1281 -0
- package/plugin-g8e5s4bz.js.map +18 -0
- package/plugin-ty63scdn.js +18974 -0
- package/plugin-ty63scdn.js.map +158 -0
- package/plugin-v52b3xya.js +62 -0
- package/plugin-v52b3xya.js.map +10 -0
- package/plugin-xe3spzxq.js +75667 -0
- package/plugin-xe3spzxq.js.map +10 -0
- package/plugin.json +36 -0
- package/README.md +0 -3
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import { Action, Trigger } from "@dual-os/sdk";
|
|
3
|
+
//#region src/triggers.d.ts
|
|
4
|
+
export declare const triggers: readonly [Trigger.Trigger<"event", "webhook", Schema.Struct<{
|
|
5
|
+
readonly apiVersion: Schema.optionalKey<Schema.Literals<readonly ["2011-01-01", "2011-06-21", "2011-06-28", "2011-08-01", "2011-09-15", "2011-11-17", "2012-02-23", "2012-03-25", "2012-06-18", "2012-06-28", "2012-07-09", "2012-09-24", "2012-10-26", "2012-11-07", "2013-02-11", "2013-02-13", "2013-07-05", "2013-08-12", "2013-08-13", "2013-10-29", "2013-12-03", "2014-01-31", "2014-03-13", "2014-03-28", "2014-05-19", "2014-06-13", "2014-06-17", "2014-07-22", "2014-07-26", "2014-08-04", "2014-08-20", "2014-09-08", "2014-10-07", "2014-11-05", "2014-11-20", "2014-12-08", "2014-12-17", "2014-12-22", "2015-01-11", "2015-01-26", "2015-02-10", "2015-02-16", "2015-02-18", "2015-03-24", "2015-04-07", "2015-06-15", "2015-07-07", "2015-07-13", "2015-07-28", "2015-08-07", "2015-08-19", "2015-09-03", "2015-09-08", "2015-09-23", "2015-10-01", "2015-10-12", "2015-10-16", "2016-02-03", "2016-02-19", "2016-02-22", "2016-02-23", "2016-02-29", "2016-03-07", "2016-06-15", "2016-07-06", "2016-10-19", "2017-01-27", "2017-02-14", "2017-04-06", "2017-05-25", "2017-06-05", "2017-08-15", "2017-12-14", "2018-01-23", "2018-02-05", "2018-02-06", "2018-02-28", "2018-05-21", "2018-07-27", "2018-08-23", "2018-09-06", "2018-09-24", "2018-10-31", "2018-11-08", "2019-02-11", "2019-02-19", "2019-03-14", "2019-05-16", "2019-08-14", "2019-09-09", "2019-10-08", "2019-10-17", "2019-11-05", "2019-12-03", "2020-03-02", "2020-08-27", "2022-08-01", "2022-11-15", "2023-08-16", "2023-10-16", "2024-04-10", "2024-06-20", "2024-09-30.acacia", "2024-10-28.acacia", "2024-11-20.acacia", "2024-12-18.acacia", "2025-01-27.acacia", "2025-02-24.acacia", "2025-03-01.dashboard", "2025-03-31.basil", "2025-04-30.basil", "2025-05-28.basil", "2025-06-30.basil", "2025-07-30.basil", "2025-08-27.basil", "2025-09-30.clover", "2025-10-29.clover", "2025-11-17.clover", "2025-12-15.clover", "2026-01-28.clover", "2026-02-25.clover", "2026-03-25.dahlia", "2026-04-22.dahlia", "2026-05-27.dahlia", "2026-06-24.dahlia", "2026-07-29.dahlia", "2026-08-26.dahlia", "2026-09-30.endive"]>>;
|
|
6
|
+
readonly events: Schema.$Array<Schema.Literals<readonly ["*", "account.application.authorized", "account.application.deauthorized", "account.external_account.created", "account.external_account.deleted", "account.external_account.updated", "account.updated", "application_fee.created", "application_fee.refund.updated", "application_fee.refunded", "apps.install.created", "apps.install.deleted", "apps.install.updated", "balance.available", "balance_settings.updated", "billing.alert.triggered", "billing.credit_balance_transaction.created", "billing.credit_grant.created", "billing.credit_grant.updated", "billing.meter.created", "billing.meter.deactivated", "billing.meter.reactivated", "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", "capability.updated", "cash_balance.funds_available", "charge.captured", "charge.dispute.closed", "charge.dispute.created", "charge.dispute.funds_reinstated", "charge.dispute.funds_withdrawn", "charge.dispute.updated", "charge.expired", "charge.failed", "charge.pending", "charge.refund.updated", "charge.refunded", "charge.succeeded", "charge.updated", "checkout.session.async_payment_failed", "checkout.session.async_payment_succeeded", "checkout.session.completed", "checkout.session.expired", "climate.order.canceled", "climate.order.created", "climate.order.delayed", "climate.order.delivered", "climate.order.product_substituted", "climate.product.created", "climate.product.pricing_updated", "coupon.created", "coupon.deleted", "coupon.updated", "credit_note.created", "credit_note.updated", "credit_note.voided", "customer.created", "customer.deleted", "customer.discount.created", "customer.discount.deleted", "customer.discount.updated", "customer.source.created", "customer.source.deleted", "customer.source.expiring", "customer.source.updated", "customer.subscription.created", "customer.subscription.deleted", "customer.subscription.paused", "customer.subscription.pending_update_applied", "customer.subscription.pending_update_expired", "customer.subscription.resumed", "customer.subscription.trial_will_end", "customer.subscription.updated", "customer.tax_id.created", "customer.tax_id.deleted", "customer.tax_id.updated", "customer.updated", "customer_cash_balance_transaction.created", "entitlements.active_entitlement_summary.updated", "file.created", "financial_connections.account.account_numbers_updated", "financial_connections.account.created", "financial_connections.account.deactivated", "financial_connections.account.disconnected", "financial_connections.account.expected_deactivation_date_updated", "financial_connections.account.reactivated", "financial_connections.account.refreshed_balance", "financial_connections.account.refreshed_ownership", "financial_connections.account.refreshed_transactions", "financial_connections.account.supported_payment_method_types_updated", "financial_connections.account.upcoming_account_number_expiry", "financial_connections.account.upcoming_deactivation", "financial_connections.authorization.expected_deactivation_date_updated", "financial_connections.authorization.upcoming_deactivation", "identity.verification_session.canceled", "identity.verification_session.created", "identity.verification_session.processing", "identity.verification_session.redacted", "identity.verification_session.requires_input", "identity.verification_session.verified", "invoice.created", "invoice.deleted", "invoice.finalization_failed", "invoice.finalized", "invoice.marked_uncollectible", "invoice.overdue", "invoice.overpaid", "invoice.paid", "invoice.payment_action_required", "invoice.payment_attempt_required", "invoice.payment_failed", "invoice.payment_succeeded", "invoice.sent", "invoice.upcoming", "invoice.updated", "invoice.voided", "invoice.will_be_due", "invoice_payment.paid", "invoiceitem.created", "invoiceitem.deleted", "issuing_authorization.created", "issuing_authorization.request", "issuing_authorization.updated", "issuing_card.created", "issuing_card.updated", "issuing_cardholder.created", "issuing_cardholder.updated", "issuing_dispute.closed", "issuing_dispute.created", "issuing_dispute.funds_reinstated", "issuing_dispute.funds_rescinded", "issuing_dispute.submitted", "issuing_dispute.updated", "issuing_personalization_design.activated", "issuing_personalization_design.deactivated", "issuing_personalization_design.rejected", "issuing_personalization_design.updated", "issuing_token.created", "issuing_token.updated", "issuing_transaction.created", "issuing_transaction.purchase_details_receipt_updated", "issuing_transaction.updated", "mandate.updated", "payment_intent.amount_capturable_updated", "payment_intent.canceled", "payment_intent.created", "payment_intent.partially_funded", "payment_intent.payment_failed", "payment_intent.processing", "payment_intent.requires_action", "payment_intent.succeeded", "payment_link.created", "payment_link.updated", "payment_method.attached", "payment_method.automatically_updated", "payment_method.detached", "payment_method.updated", "payout.canceled", "payout.created", "payout.failed", "payout.paid", "payout.reconciliation_completed", "payout.updated", "person.created", "person.deleted", "person.updated", "plan.created", "plan.deleted", "plan.updated", "price.created", "price.deleted", "price.updated", "product.created", "product.deleted", "product.updated", "promotion_code.created", "promotion_code.updated", "quote.accepted", "quote.canceled", "quote.created", "quote.finalized", "radar.early_fraud_warning.created", "radar.early_fraud_warning.updated", "refund.created", "refund.failed", "refund.updated", "reporting.report_run.failed", "reporting.report_run.succeeded", "reporting.report_type.updated", "reserve.hold.created", "reserve.hold.updated", "reserve.plan.created", "reserve.plan.disabled", "reserve.plan.expired", "reserve.plan.updated", "reserve.release.created", "review.closed", "review.opened", "setup_intent.canceled", "setup_intent.created", "setup_intent.requires_action", "setup_intent.setup_failed", "setup_intent.succeeded", "sigma.scheduled_query_run.created", "source.canceled", "source.chargeable", "source.failed", "source.mandate_notification", "source.refund_attributes_required", "source.transaction.created", "source.transaction.updated", "subscription_schedule.aborted", "subscription_schedule.canceled", "subscription_schedule.completed", "subscription_schedule.created", "subscription_schedule.expiring", "subscription_schedule.released", "subscription_schedule.updated", "tax.settings.updated", "tax_rate.created", "tax_rate.updated", "terminal.reader.action_failed", "terminal.reader.action_succeeded", "terminal.reader.action_updated", "test_helpers.test_clock.advancing", "test_helpers.test_clock.created", "test_helpers.test_clock.deleted", "test_helpers.test_clock.internal_failure", "test_helpers.test_clock.ready", "topup.canceled", "topup.created", "topup.failed", "topup.reversed", "topup.succeeded", "transfer.created", "transfer.reversed", "transfer.updated", "treasury.credit_reversal.created", "treasury.credit_reversal.posted", "treasury.debit_reversal.completed", "treasury.debit_reversal.created", "treasury.debit_reversal.initial_credit_granted", "treasury.financial_account.closed", "treasury.financial_account.created", "treasury.financial_account.features_status_updated", "treasury.inbound_transfer.canceled", "treasury.inbound_transfer.created", "treasury.inbound_transfer.failed", "treasury.inbound_transfer.succeeded", "treasury.outbound_payment.canceled", "treasury.outbound_payment.created", "treasury.outbound_payment.expected_arrival_date_updated", "treasury.outbound_payment.failed", "treasury.outbound_payment.posted", "treasury.outbound_payment.returned", "treasury.outbound_payment.tracking_details_updated", "treasury.outbound_transfer.canceled", "treasury.outbound_transfer.created", "treasury.outbound_transfer.expected_arrival_date_updated", "treasury.outbound_transfer.failed", "treasury.outbound_transfer.posted", "treasury.outbound_transfer.returned", "treasury.outbound_transfer.tracking_details_updated", "treasury.received_credit.created", "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created"]>>;
|
|
7
|
+
}>, Schema.StructWithRest<Schema.Struct<{
|
|
8
|
+
readonly id: Schema.String;
|
|
9
|
+
readonly type: Schema.String;
|
|
10
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.Struct<{
|
|
11
|
+
readonly webhookId: Schema.String;
|
|
12
|
+
readonly webhookSecret: Schema.optionalKey<Schema.String>;
|
|
13
|
+
}>, true>];
|
|
14
|
+
export declare const handlers: {
|
|
15
|
+
event: {
|
|
16
|
+
activate: (input: Trigger.WebhookActivationInput<{
|
|
17
|
+
readonly apiVersion?: "2011-01-01" | "2011-06-21" | "2011-06-28" | "2011-08-01" | "2011-09-15" | "2011-11-17" | "2012-02-23" | "2012-03-25" | "2012-06-18" | "2012-06-28" | "2012-07-09" | "2012-09-24" | "2012-10-26" | "2012-11-07" | "2013-02-11" | "2013-02-13" | "2013-07-05" | "2013-08-12" | "2013-08-13" | "2013-10-29" | "2013-12-03" | "2014-01-31" | "2014-03-13" | "2014-03-28" | "2014-05-19" | "2014-06-13" | "2014-06-17" | "2014-07-22" | "2014-07-26" | "2014-08-04" | "2014-08-20" | "2014-09-08" | "2014-10-07" | "2014-11-05" | "2014-11-20" | "2014-12-08" | "2014-12-17" | "2014-12-22" | "2015-01-11" | "2015-01-26" | "2015-02-10" | "2015-02-16" | "2015-02-18" | "2015-03-24" | "2015-04-07" | "2015-06-15" | "2015-07-07" | "2015-07-13" | "2015-07-28" | "2015-08-07" | "2015-08-19" | "2015-09-03" | "2015-09-08" | "2015-09-23" | "2015-10-01" | "2015-10-12" | "2015-10-16" | "2016-02-03" | "2016-02-19" | "2016-02-22" | "2016-02-23" | "2016-02-29" | "2016-03-07" | "2016-06-15" | "2016-07-06" | "2016-10-19" | "2017-01-27" | "2017-02-14" | "2017-04-06" | "2017-05-25" | "2017-06-05" | "2017-08-15" | "2017-12-14" | "2018-01-23" | "2018-02-05" | "2018-02-06" | "2018-02-28" | "2018-05-21" | "2018-07-27" | "2018-08-23" | "2018-09-06" | "2018-09-24" | "2018-10-31" | "2018-11-08" | "2019-02-11" | "2019-02-19" | "2019-03-14" | "2019-05-16" | "2019-08-14" | "2019-09-09" | "2019-10-08" | "2019-10-17" | "2019-11-05" | "2019-12-03" | "2020-03-02" | "2020-08-27" | "2022-08-01" | "2022-11-15" | "2023-08-16" | "2023-10-16" | "2024-04-10" | "2024-06-20" | "2024-09-30.acacia" | "2024-10-28.acacia" | "2024-11-20.acacia" | "2024-12-18.acacia" | "2025-01-27.acacia" | "2025-02-24.acacia" | "2025-03-01.dashboard" | "2025-03-31.basil" | "2025-04-30.basil" | "2025-05-28.basil" | "2025-06-30.basil" | "2025-07-30.basil" | "2025-08-27.basil" | "2025-09-30.clover" | "2025-10-29.clover" | "2025-11-17.clover" | "2025-12-15.clover" | "2026-01-28.clover" | "2026-02-25.clover" | "2026-03-25.dahlia" | "2026-04-22.dahlia" | "2026-05-27.dahlia" | "2026-06-24.dahlia" | "2026-07-29.dahlia" | "2026-08-26.dahlia" | "2026-09-30.endive";
|
|
18
|
+
readonly events: readonly ("*" | "account.application.authorized" | "account.application.deauthorized" | "account.external_account.created" | "account.external_account.deleted" | "account.external_account.updated" | "account.updated" | "application_fee.created" | "application_fee.refund.updated" | "application_fee.refunded" | "apps.install.created" | "apps.install.deleted" | "apps.install.updated" | "balance.available" | "balance_settings.updated" | "billing.alert.triggered" | "billing.credit_balance_transaction.created" | "billing.credit_grant.created" | "billing.credit_grant.updated" | "billing.meter.created" | "billing.meter.deactivated" | "billing.meter.reactivated" | "billing.meter.updated" | "billing_portal.configuration.created" | "billing_portal.configuration.updated" | "billing_portal.session.created" | "capability.updated" | "cash_balance.funds_available" | "charge.captured" | "charge.dispute.closed" | "charge.dispute.created" | "charge.dispute.funds_reinstated" | "charge.dispute.funds_withdrawn" | "charge.dispute.updated" | "charge.expired" | "charge.failed" | "charge.pending" | "charge.refund.updated" | "charge.refunded" | "charge.succeeded" | "charge.updated" | "checkout.session.async_payment_failed" | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" | "climate.order.canceled" | "climate.order.created" | "climate.order.delayed" | "climate.order.delivered" | "climate.order.product_substituted" | "climate.product.created" | "climate.product.pricing_updated" | "coupon.created" | "coupon.deleted" | "coupon.updated" | "credit_note.created" | "credit_note.updated" | "credit_note.voided" | "customer.created" | "customer.deleted" | "customer.discount.created" | "customer.discount.deleted" | "customer.discount.updated" | "customer.source.created" | "customer.source.deleted" | "customer.source.expiring" | "customer.source.updated" | "customer.subscription.created" | "customer.subscription.deleted" | "customer.subscription.paused" | "customer.subscription.pending_update_applied" | "customer.subscription.pending_update_expired" | "customer.subscription.resumed" | "customer.subscription.trial_will_end" | "customer.subscription.updated" | "customer.tax_id.created" | "customer.tax_id.deleted" | "customer.tax_id.updated" | "customer.updated" | "customer_cash_balance_transaction.created" | "entitlements.active_entitlement_summary.updated" | "file.created" | "financial_connections.account.account_numbers_updated" | "financial_connections.account.created" | "financial_connections.account.deactivated" | "financial_connections.account.disconnected" | "financial_connections.account.expected_deactivation_date_updated" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" | "financial_connections.account.refreshed_ownership" | "financial_connections.account.refreshed_transactions" | "financial_connections.account.supported_payment_method_types_updated" | "financial_connections.account.upcoming_account_number_expiry" | "financial_connections.account.upcoming_deactivation" | "financial_connections.authorization.expected_deactivation_date_updated" | "financial_connections.authorization.upcoming_deactivation" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" | "identity.verification_session.redacted" | "identity.verification_session.requires_input" | "identity.verification_session.verified" | "invoice.created" | "invoice.deleted" | "invoice.finalization_failed" | "invoice.finalized" | "invoice.marked_uncollectible" | "invoice.overdue" | "invoice.overpaid" | "invoice.paid" | "invoice.payment_action_required" | "invoice.payment_attempt_required" | "invoice.payment_failed" | "invoice.payment_succeeded" | "invoice.sent" | "invoice.upcoming" | "invoice.updated" | "invoice.voided" | "invoice.will_be_due" | "invoice_payment.paid" | "invoiceitem.created" | "invoiceitem.deleted" | "issuing_authorization.created" | "issuing_authorization.request" | "issuing_authorization.updated" | "issuing_card.created" | "issuing_card.updated" | "issuing_cardholder.created" | "issuing_cardholder.updated" | "issuing_dispute.closed" | "issuing_dispute.created" | "issuing_dispute.funds_reinstated" | "issuing_dispute.funds_rescinded" | "issuing_dispute.submitted" | "issuing_dispute.updated" | "issuing_personalization_design.activated" | "issuing_personalization_design.deactivated" | "issuing_personalization_design.rejected" | "issuing_personalization_design.updated" | "issuing_token.created" | "issuing_token.updated" | "issuing_transaction.created" | "issuing_transaction.purchase_details_receipt_updated" | "issuing_transaction.updated" | "mandate.updated" | "payment_intent.amount_capturable_updated" | "payment_intent.canceled" | "payment_intent.created" | "payment_intent.partially_funded" | "payment_intent.payment_failed" | "payment_intent.processing" | "payment_intent.requires_action" | "payment_intent.succeeded" | "payment_link.created" | "payment_link.updated" | "payment_method.attached" | "payment_method.automatically_updated" | "payment_method.detached" | "payment_method.updated" | "payout.canceled" | "payout.created" | "payout.failed" | "payout.paid" | "payout.reconciliation_completed" | "payout.updated" | "person.created" | "person.deleted" | "person.updated" | "plan.created" | "plan.deleted" | "plan.updated" | "price.created" | "price.deleted" | "price.updated" | "product.created" | "product.deleted" | "product.updated" | "promotion_code.created" | "promotion_code.updated" | "quote.accepted" | "quote.canceled" | "quote.created" | "quote.finalized" | "radar.early_fraud_warning.created" | "radar.early_fraud_warning.updated" | "refund.created" | "refund.failed" | "refund.updated" | "reporting.report_run.failed" | "reporting.report_run.succeeded" | "reporting.report_type.updated" | "reserve.hold.created" | "reserve.hold.updated" | "reserve.plan.created" | "reserve.plan.disabled" | "reserve.plan.expired" | "reserve.plan.updated" | "reserve.release.created" | "review.closed" | "review.opened" | "setup_intent.canceled" | "setup_intent.created" | "setup_intent.requires_action" | "setup_intent.setup_failed" | "setup_intent.succeeded" | "sigma.scheduled_query_run.created" | "source.canceled" | "source.chargeable" | "source.failed" | "source.mandate_notification" | "source.refund_attributes_required" | "source.transaction.created" | "source.transaction.updated" | "subscription_schedule.aborted" | "subscription_schedule.canceled" | "subscription_schedule.completed" | "subscription_schedule.created" | "subscription_schedule.expiring" | "subscription_schedule.released" | "subscription_schedule.updated" | "tax.settings.updated" | "tax_rate.created" | "tax_rate.updated" | "terminal.reader.action_failed" | "terminal.reader.action_succeeded" | "terminal.reader.action_updated" | "test_helpers.test_clock.advancing" | "test_helpers.test_clock.created" | "test_helpers.test_clock.deleted" | "test_helpers.test_clock.internal_failure" | "test_helpers.test_clock.ready" | "topup.canceled" | "topup.created" | "topup.failed" | "topup.reversed" | "topup.succeeded" | "transfer.created" | "transfer.reversed" | "transfer.updated" | "treasury.credit_reversal.created" | "treasury.credit_reversal.posted" | "treasury.debit_reversal.completed" | "treasury.debit_reversal.created" | "treasury.debit_reversal.initial_credit_granted" | "treasury.financial_account.closed" | "treasury.financial_account.created" | "treasury.financial_account.features_status_updated" | "treasury.inbound_transfer.canceled" | "treasury.inbound_transfer.created" | "treasury.inbound_transfer.failed" | "treasury.inbound_transfer.succeeded" | "treasury.outbound_payment.canceled" | "treasury.outbound_payment.created" | "treasury.outbound_payment.expected_arrival_date_updated" | "treasury.outbound_payment.failed" | "treasury.outbound_payment.posted" | "treasury.outbound_payment.returned" | "treasury.outbound_payment.tracking_details_updated" | "treasury.outbound_transfer.canceled" | "treasury.outbound_transfer.created" | "treasury.outbound_transfer.expected_arrival_date_updated" | "treasury.outbound_transfer.failed" | "treasury.outbound_transfer.posted" | "treasury.outbound_transfer.returned" | "treasury.outbound_transfer.tracking_details_updated" | "treasury.received_credit.created" | "treasury.received_credit.failed" | "treasury.received_credit.succeeded" | "treasury.received_debit.created")[];
|
|
19
|
+
}, {
|
|
20
|
+
readonly webhookId: string;
|
|
21
|
+
readonly webhookSecret?: string;
|
|
22
|
+
} | undefined>, context: {
|
|
23
|
+
readonly auth: import("@dual-os/sdk/AuthMethodBinding").Context<readonly [import("@dual-os/sdk/AuthMethod").AuthMethod<"secret-key", undefined, Schema.Struct<{
|
|
24
|
+
readonly secretKey: Schema.NonEmptyString;
|
|
25
|
+
readonly signatureSecret: Schema.optional<Schema.String>;
|
|
26
|
+
}>, Schema.Struct<{
|
|
27
|
+
readonly secretKey: Schema.NonEmptyString;
|
|
28
|
+
readonly signatureSecret: Schema.optional<Schema.String>;
|
|
29
|
+
}>, Schema.Struct<{
|
|
30
|
+
readonly secretKey: Schema.NonEmptyString;
|
|
31
|
+
readonly signatureSecret: Schema.optional<Schema.String>;
|
|
32
|
+
}>, never>]>;
|
|
33
|
+
} & import("@dual-os/sdk/ConnectionResolver").ConnectionResolutionContext) => Effect.Effect<{
|
|
34
|
+
state: {
|
|
35
|
+
webhookId: string;
|
|
36
|
+
webhookSecret: string;
|
|
37
|
+
};
|
|
38
|
+
}, Action.ActionHandlerFailure, import("effect/http/HttpClient").HttpClient>;
|
|
39
|
+
deactivate: (input: Trigger.WebhookActivationInput<{
|
|
40
|
+
readonly apiVersion?: "2011-01-01" | "2011-06-21" | "2011-06-28" | "2011-08-01" | "2011-09-15" | "2011-11-17" | "2012-02-23" | "2012-03-25" | "2012-06-18" | "2012-06-28" | "2012-07-09" | "2012-09-24" | "2012-10-26" | "2012-11-07" | "2013-02-11" | "2013-02-13" | "2013-07-05" | "2013-08-12" | "2013-08-13" | "2013-10-29" | "2013-12-03" | "2014-01-31" | "2014-03-13" | "2014-03-28" | "2014-05-19" | "2014-06-13" | "2014-06-17" | "2014-07-22" | "2014-07-26" | "2014-08-04" | "2014-08-20" | "2014-09-08" | "2014-10-07" | "2014-11-05" | "2014-11-20" | "2014-12-08" | "2014-12-17" | "2014-12-22" | "2015-01-11" | "2015-01-26" | "2015-02-10" | "2015-02-16" | "2015-02-18" | "2015-03-24" | "2015-04-07" | "2015-06-15" | "2015-07-07" | "2015-07-13" | "2015-07-28" | "2015-08-07" | "2015-08-19" | "2015-09-03" | "2015-09-08" | "2015-09-23" | "2015-10-01" | "2015-10-12" | "2015-10-16" | "2016-02-03" | "2016-02-19" | "2016-02-22" | "2016-02-23" | "2016-02-29" | "2016-03-07" | "2016-06-15" | "2016-07-06" | "2016-10-19" | "2017-01-27" | "2017-02-14" | "2017-04-06" | "2017-05-25" | "2017-06-05" | "2017-08-15" | "2017-12-14" | "2018-01-23" | "2018-02-05" | "2018-02-06" | "2018-02-28" | "2018-05-21" | "2018-07-27" | "2018-08-23" | "2018-09-06" | "2018-09-24" | "2018-10-31" | "2018-11-08" | "2019-02-11" | "2019-02-19" | "2019-03-14" | "2019-05-16" | "2019-08-14" | "2019-09-09" | "2019-10-08" | "2019-10-17" | "2019-11-05" | "2019-12-03" | "2020-03-02" | "2020-08-27" | "2022-08-01" | "2022-11-15" | "2023-08-16" | "2023-10-16" | "2024-04-10" | "2024-06-20" | "2024-09-30.acacia" | "2024-10-28.acacia" | "2024-11-20.acacia" | "2024-12-18.acacia" | "2025-01-27.acacia" | "2025-02-24.acacia" | "2025-03-01.dashboard" | "2025-03-31.basil" | "2025-04-30.basil" | "2025-05-28.basil" | "2025-06-30.basil" | "2025-07-30.basil" | "2025-08-27.basil" | "2025-09-30.clover" | "2025-10-29.clover" | "2025-11-17.clover" | "2025-12-15.clover" | "2026-01-28.clover" | "2026-02-25.clover" | "2026-03-25.dahlia" | "2026-04-22.dahlia" | "2026-05-27.dahlia" | "2026-06-24.dahlia" | "2026-07-29.dahlia" | "2026-08-26.dahlia" | "2026-09-30.endive";
|
|
41
|
+
readonly events: readonly ("*" | "account.application.authorized" | "account.application.deauthorized" | "account.external_account.created" | "account.external_account.deleted" | "account.external_account.updated" | "account.updated" | "application_fee.created" | "application_fee.refund.updated" | "application_fee.refunded" | "apps.install.created" | "apps.install.deleted" | "apps.install.updated" | "balance.available" | "balance_settings.updated" | "billing.alert.triggered" | "billing.credit_balance_transaction.created" | "billing.credit_grant.created" | "billing.credit_grant.updated" | "billing.meter.created" | "billing.meter.deactivated" | "billing.meter.reactivated" | "billing.meter.updated" | "billing_portal.configuration.created" | "billing_portal.configuration.updated" | "billing_portal.session.created" | "capability.updated" | "cash_balance.funds_available" | "charge.captured" | "charge.dispute.closed" | "charge.dispute.created" | "charge.dispute.funds_reinstated" | "charge.dispute.funds_withdrawn" | "charge.dispute.updated" | "charge.expired" | "charge.failed" | "charge.pending" | "charge.refund.updated" | "charge.refunded" | "charge.succeeded" | "charge.updated" | "checkout.session.async_payment_failed" | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" | "climate.order.canceled" | "climate.order.created" | "climate.order.delayed" | "climate.order.delivered" | "climate.order.product_substituted" | "climate.product.created" | "climate.product.pricing_updated" | "coupon.created" | "coupon.deleted" | "coupon.updated" | "credit_note.created" | "credit_note.updated" | "credit_note.voided" | "customer.created" | "customer.deleted" | "customer.discount.created" | "customer.discount.deleted" | "customer.discount.updated" | "customer.source.created" | "customer.source.deleted" | "customer.source.expiring" | "customer.source.updated" | "customer.subscription.created" | "customer.subscription.deleted" | "customer.subscription.paused" | "customer.subscription.pending_update_applied" | "customer.subscription.pending_update_expired" | "customer.subscription.resumed" | "customer.subscription.trial_will_end" | "customer.subscription.updated" | "customer.tax_id.created" | "customer.tax_id.deleted" | "customer.tax_id.updated" | "customer.updated" | "customer_cash_balance_transaction.created" | "entitlements.active_entitlement_summary.updated" | "file.created" | "financial_connections.account.account_numbers_updated" | "financial_connections.account.created" | "financial_connections.account.deactivated" | "financial_connections.account.disconnected" | "financial_connections.account.expected_deactivation_date_updated" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" | "financial_connections.account.refreshed_ownership" | "financial_connections.account.refreshed_transactions" | "financial_connections.account.supported_payment_method_types_updated" | "financial_connections.account.upcoming_account_number_expiry" | "financial_connections.account.upcoming_deactivation" | "financial_connections.authorization.expected_deactivation_date_updated" | "financial_connections.authorization.upcoming_deactivation" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" | "identity.verification_session.redacted" | "identity.verification_session.requires_input" | "identity.verification_session.verified" | "invoice.created" | "invoice.deleted" | "invoice.finalization_failed" | "invoice.finalized" | "invoice.marked_uncollectible" | "invoice.overdue" | "invoice.overpaid" | "invoice.paid" | "invoice.payment_action_required" | "invoice.payment_attempt_required" | "invoice.payment_failed" | "invoice.payment_succeeded" | "invoice.sent" | "invoice.upcoming" | "invoice.updated" | "invoice.voided" | "invoice.will_be_due" | "invoice_payment.paid" | "invoiceitem.created" | "invoiceitem.deleted" | "issuing_authorization.created" | "issuing_authorization.request" | "issuing_authorization.updated" | "issuing_card.created" | "issuing_card.updated" | "issuing_cardholder.created" | "issuing_cardholder.updated" | "issuing_dispute.closed" | "issuing_dispute.created" | "issuing_dispute.funds_reinstated" | "issuing_dispute.funds_rescinded" | "issuing_dispute.submitted" | "issuing_dispute.updated" | "issuing_personalization_design.activated" | "issuing_personalization_design.deactivated" | "issuing_personalization_design.rejected" | "issuing_personalization_design.updated" | "issuing_token.created" | "issuing_token.updated" | "issuing_transaction.created" | "issuing_transaction.purchase_details_receipt_updated" | "issuing_transaction.updated" | "mandate.updated" | "payment_intent.amount_capturable_updated" | "payment_intent.canceled" | "payment_intent.created" | "payment_intent.partially_funded" | "payment_intent.payment_failed" | "payment_intent.processing" | "payment_intent.requires_action" | "payment_intent.succeeded" | "payment_link.created" | "payment_link.updated" | "payment_method.attached" | "payment_method.automatically_updated" | "payment_method.detached" | "payment_method.updated" | "payout.canceled" | "payout.created" | "payout.failed" | "payout.paid" | "payout.reconciliation_completed" | "payout.updated" | "person.created" | "person.deleted" | "person.updated" | "plan.created" | "plan.deleted" | "plan.updated" | "price.created" | "price.deleted" | "price.updated" | "product.created" | "product.deleted" | "product.updated" | "promotion_code.created" | "promotion_code.updated" | "quote.accepted" | "quote.canceled" | "quote.created" | "quote.finalized" | "radar.early_fraud_warning.created" | "radar.early_fraud_warning.updated" | "refund.created" | "refund.failed" | "refund.updated" | "reporting.report_run.failed" | "reporting.report_run.succeeded" | "reporting.report_type.updated" | "reserve.hold.created" | "reserve.hold.updated" | "reserve.plan.created" | "reserve.plan.disabled" | "reserve.plan.expired" | "reserve.plan.updated" | "reserve.release.created" | "review.closed" | "review.opened" | "setup_intent.canceled" | "setup_intent.created" | "setup_intent.requires_action" | "setup_intent.setup_failed" | "setup_intent.succeeded" | "sigma.scheduled_query_run.created" | "source.canceled" | "source.chargeable" | "source.failed" | "source.mandate_notification" | "source.refund_attributes_required" | "source.transaction.created" | "source.transaction.updated" | "subscription_schedule.aborted" | "subscription_schedule.canceled" | "subscription_schedule.completed" | "subscription_schedule.created" | "subscription_schedule.expiring" | "subscription_schedule.released" | "subscription_schedule.updated" | "tax.settings.updated" | "tax_rate.created" | "tax_rate.updated" | "terminal.reader.action_failed" | "terminal.reader.action_succeeded" | "terminal.reader.action_updated" | "test_helpers.test_clock.advancing" | "test_helpers.test_clock.created" | "test_helpers.test_clock.deleted" | "test_helpers.test_clock.internal_failure" | "test_helpers.test_clock.ready" | "topup.canceled" | "topup.created" | "topup.failed" | "topup.reversed" | "topup.succeeded" | "transfer.created" | "transfer.reversed" | "transfer.updated" | "treasury.credit_reversal.created" | "treasury.credit_reversal.posted" | "treasury.debit_reversal.completed" | "treasury.debit_reversal.created" | "treasury.debit_reversal.initial_credit_granted" | "treasury.financial_account.closed" | "treasury.financial_account.created" | "treasury.financial_account.features_status_updated" | "treasury.inbound_transfer.canceled" | "treasury.inbound_transfer.created" | "treasury.inbound_transfer.failed" | "treasury.inbound_transfer.succeeded" | "treasury.outbound_payment.canceled" | "treasury.outbound_payment.created" | "treasury.outbound_payment.expected_arrival_date_updated" | "treasury.outbound_payment.failed" | "treasury.outbound_payment.posted" | "treasury.outbound_payment.returned" | "treasury.outbound_payment.tracking_details_updated" | "treasury.outbound_transfer.canceled" | "treasury.outbound_transfer.created" | "treasury.outbound_transfer.expected_arrival_date_updated" | "treasury.outbound_transfer.failed" | "treasury.outbound_transfer.posted" | "treasury.outbound_transfer.returned" | "treasury.outbound_transfer.tracking_details_updated" | "treasury.received_credit.created" | "treasury.received_credit.failed" | "treasury.received_credit.succeeded" | "treasury.received_debit.created")[];
|
|
42
|
+
}, {
|
|
43
|
+
readonly webhookId: string;
|
|
44
|
+
readonly webhookSecret?: string;
|
|
45
|
+
} | undefined>, context: {
|
|
46
|
+
readonly auth: import("@dual-os/sdk/AuthMethodBinding").Context<readonly [import("@dual-os/sdk/AuthMethod").AuthMethod<"secret-key", undefined, Schema.Struct<{
|
|
47
|
+
readonly secretKey: Schema.NonEmptyString;
|
|
48
|
+
readonly signatureSecret: Schema.optional<Schema.String>;
|
|
49
|
+
}>, Schema.Struct<{
|
|
50
|
+
readonly secretKey: Schema.NonEmptyString;
|
|
51
|
+
readonly signatureSecret: Schema.optional<Schema.String>;
|
|
52
|
+
}>, Schema.Struct<{
|
|
53
|
+
readonly secretKey: Schema.NonEmptyString;
|
|
54
|
+
readonly signatureSecret: Schema.optional<Schema.String>;
|
|
55
|
+
}>, never>]>;
|
|
56
|
+
} & import("@dual-os/sdk/ConnectionResolver").ConnectionResolutionContext) => Effect.Effect<void, Action.ActionHandlerFailure, import("effect/http/HttpClient").HttpClient>;
|
|
57
|
+
parse: (input: Trigger.WebhookLifecycleInput<{
|
|
58
|
+
readonly apiVersion?: "2011-01-01" | "2011-06-21" | "2011-06-28" | "2011-08-01" | "2011-09-15" | "2011-11-17" | "2012-02-23" | "2012-03-25" | "2012-06-18" | "2012-06-28" | "2012-07-09" | "2012-09-24" | "2012-10-26" | "2012-11-07" | "2013-02-11" | "2013-02-13" | "2013-07-05" | "2013-08-12" | "2013-08-13" | "2013-10-29" | "2013-12-03" | "2014-01-31" | "2014-03-13" | "2014-03-28" | "2014-05-19" | "2014-06-13" | "2014-06-17" | "2014-07-22" | "2014-07-26" | "2014-08-04" | "2014-08-20" | "2014-09-08" | "2014-10-07" | "2014-11-05" | "2014-11-20" | "2014-12-08" | "2014-12-17" | "2014-12-22" | "2015-01-11" | "2015-01-26" | "2015-02-10" | "2015-02-16" | "2015-02-18" | "2015-03-24" | "2015-04-07" | "2015-06-15" | "2015-07-07" | "2015-07-13" | "2015-07-28" | "2015-08-07" | "2015-08-19" | "2015-09-03" | "2015-09-08" | "2015-09-23" | "2015-10-01" | "2015-10-12" | "2015-10-16" | "2016-02-03" | "2016-02-19" | "2016-02-22" | "2016-02-23" | "2016-02-29" | "2016-03-07" | "2016-06-15" | "2016-07-06" | "2016-10-19" | "2017-01-27" | "2017-02-14" | "2017-04-06" | "2017-05-25" | "2017-06-05" | "2017-08-15" | "2017-12-14" | "2018-01-23" | "2018-02-05" | "2018-02-06" | "2018-02-28" | "2018-05-21" | "2018-07-27" | "2018-08-23" | "2018-09-06" | "2018-09-24" | "2018-10-31" | "2018-11-08" | "2019-02-11" | "2019-02-19" | "2019-03-14" | "2019-05-16" | "2019-08-14" | "2019-09-09" | "2019-10-08" | "2019-10-17" | "2019-11-05" | "2019-12-03" | "2020-03-02" | "2020-08-27" | "2022-08-01" | "2022-11-15" | "2023-08-16" | "2023-10-16" | "2024-04-10" | "2024-06-20" | "2024-09-30.acacia" | "2024-10-28.acacia" | "2024-11-20.acacia" | "2024-12-18.acacia" | "2025-01-27.acacia" | "2025-02-24.acacia" | "2025-03-01.dashboard" | "2025-03-31.basil" | "2025-04-30.basil" | "2025-05-28.basil" | "2025-06-30.basil" | "2025-07-30.basil" | "2025-08-27.basil" | "2025-09-30.clover" | "2025-10-29.clover" | "2025-11-17.clover" | "2025-12-15.clover" | "2026-01-28.clover" | "2026-02-25.clover" | "2026-03-25.dahlia" | "2026-04-22.dahlia" | "2026-05-27.dahlia" | "2026-06-24.dahlia" | "2026-07-29.dahlia" | "2026-08-26.dahlia" | "2026-09-30.endive";
|
|
59
|
+
readonly events: readonly ("*" | "account.application.authorized" | "account.application.deauthorized" | "account.external_account.created" | "account.external_account.deleted" | "account.external_account.updated" | "account.updated" | "application_fee.created" | "application_fee.refund.updated" | "application_fee.refunded" | "apps.install.created" | "apps.install.deleted" | "apps.install.updated" | "balance.available" | "balance_settings.updated" | "billing.alert.triggered" | "billing.credit_balance_transaction.created" | "billing.credit_grant.created" | "billing.credit_grant.updated" | "billing.meter.created" | "billing.meter.deactivated" | "billing.meter.reactivated" | "billing.meter.updated" | "billing_portal.configuration.created" | "billing_portal.configuration.updated" | "billing_portal.session.created" | "capability.updated" | "cash_balance.funds_available" | "charge.captured" | "charge.dispute.closed" | "charge.dispute.created" | "charge.dispute.funds_reinstated" | "charge.dispute.funds_withdrawn" | "charge.dispute.updated" | "charge.expired" | "charge.failed" | "charge.pending" | "charge.refund.updated" | "charge.refunded" | "charge.succeeded" | "charge.updated" | "checkout.session.async_payment_failed" | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" | "climate.order.canceled" | "climate.order.created" | "climate.order.delayed" | "climate.order.delivered" | "climate.order.product_substituted" | "climate.product.created" | "climate.product.pricing_updated" | "coupon.created" | "coupon.deleted" | "coupon.updated" | "credit_note.created" | "credit_note.updated" | "credit_note.voided" | "customer.created" | "customer.deleted" | "customer.discount.created" | "customer.discount.deleted" | "customer.discount.updated" | "customer.source.created" | "customer.source.deleted" | "customer.source.expiring" | "customer.source.updated" | "customer.subscription.created" | "customer.subscription.deleted" | "customer.subscription.paused" | "customer.subscription.pending_update_applied" | "customer.subscription.pending_update_expired" | "customer.subscription.resumed" | "customer.subscription.trial_will_end" | "customer.subscription.updated" | "customer.tax_id.created" | "customer.tax_id.deleted" | "customer.tax_id.updated" | "customer.updated" | "customer_cash_balance_transaction.created" | "entitlements.active_entitlement_summary.updated" | "file.created" | "financial_connections.account.account_numbers_updated" | "financial_connections.account.created" | "financial_connections.account.deactivated" | "financial_connections.account.disconnected" | "financial_connections.account.expected_deactivation_date_updated" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" | "financial_connections.account.refreshed_ownership" | "financial_connections.account.refreshed_transactions" | "financial_connections.account.supported_payment_method_types_updated" | "financial_connections.account.upcoming_account_number_expiry" | "financial_connections.account.upcoming_deactivation" | "financial_connections.authorization.expected_deactivation_date_updated" | "financial_connections.authorization.upcoming_deactivation" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" | "identity.verification_session.redacted" | "identity.verification_session.requires_input" | "identity.verification_session.verified" | "invoice.created" | "invoice.deleted" | "invoice.finalization_failed" | "invoice.finalized" | "invoice.marked_uncollectible" | "invoice.overdue" | "invoice.overpaid" | "invoice.paid" | "invoice.payment_action_required" | "invoice.payment_attempt_required" | "invoice.payment_failed" | "invoice.payment_succeeded" | "invoice.sent" | "invoice.upcoming" | "invoice.updated" | "invoice.voided" | "invoice.will_be_due" | "invoice_payment.paid" | "invoiceitem.created" | "invoiceitem.deleted" | "issuing_authorization.created" | "issuing_authorization.request" | "issuing_authorization.updated" | "issuing_card.created" | "issuing_card.updated" | "issuing_cardholder.created" | "issuing_cardholder.updated" | "issuing_dispute.closed" | "issuing_dispute.created" | "issuing_dispute.funds_reinstated" | "issuing_dispute.funds_rescinded" | "issuing_dispute.submitted" | "issuing_dispute.updated" | "issuing_personalization_design.activated" | "issuing_personalization_design.deactivated" | "issuing_personalization_design.rejected" | "issuing_personalization_design.updated" | "issuing_token.created" | "issuing_token.updated" | "issuing_transaction.created" | "issuing_transaction.purchase_details_receipt_updated" | "issuing_transaction.updated" | "mandate.updated" | "payment_intent.amount_capturable_updated" | "payment_intent.canceled" | "payment_intent.created" | "payment_intent.partially_funded" | "payment_intent.payment_failed" | "payment_intent.processing" | "payment_intent.requires_action" | "payment_intent.succeeded" | "payment_link.created" | "payment_link.updated" | "payment_method.attached" | "payment_method.automatically_updated" | "payment_method.detached" | "payment_method.updated" | "payout.canceled" | "payout.created" | "payout.failed" | "payout.paid" | "payout.reconciliation_completed" | "payout.updated" | "person.created" | "person.deleted" | "person.updated" | "plan.created" | "plan.deleted" | "plan.updated" | "price.created" | "price.deleted" | "price.updated" | "product.created" | "product.deleted" | "product.updated" | "promotion_code.created" | "promotion_code.updated" | "quote.accepted" | "quote.canceled" | "quote.created" | "quote.finalized" | "radar.early_fraud_warning.created" | "radar.early_fraud_warning.updated" | "refund.created" | "refund.failed" | "refund.updated" | "reporting.report_run.failed" | "reporting.report_run.succeeded" | "reporting.report_type.updated" | "reserve.hold.created" | "reserve.hold.updated" | "reserve.plan.created" | "reserve.plan.disabled" | "reserve.plan.expired" | "reserve.plan.updated" | "reserve.release.created" | "review.closed" | "review.opened" | "setup_intent.canceled" | "setup_intent.created" | "setup_intent.requires_action" | "setup_intent.setup_failed" | "setup_intent.succeeded" | "sigma.scheduled_query_run.created" | "source.canceled" | "source.chargeable" | "source.failed" | "source.mandate_notification" | "source.refund_attributes_required" | "source.transaction.created" | "source.transaction.updated" | "subscription_schedule.aborted" | "subscription_schedule.canceled" | "subscription_schedule.completed" | "subscription_schedule.created" | "subscription_schedule.expiring" | "subscription_schedule.released" | "subscription_schedule.updated" | "tax.settings.updated" | "tax_rate.created" | "tax_rate.updated" | "terminal.reader.action_failed" | "terminal.reader.action_succeeded" | "terminal.reader.action_updated" | "test_helpers.test_clock.advancing" | "test_helpers.test_clock.created" | "test_helpers.test_clock.deleted" | "test_helpers.test_clock.internal_failure" | "test_helpers.test_clock.ready" | "topup.canceled" | "topup.created" | "topup.failed" | "topup.reversed" | "topup.succeeded" | "transfer.created" | "transfer.reversed" | "transfer.updated" | "treasury.credit_reversal.created" | "treasury.credit_reversal.posted" | "treasury.debit_reversal.completed" | "treasury.debit_reversal.created" | "treasury.debit_reversal.initial_credit_granted" | "treasury.financial_account.closed" | "treasury.financial_account.created" | "treasury.financial_account.features_status_updated" | "treasury.inbound_transfer.canceled" | "treasury.inbound_transfer.created" | "treasury.inbound_transfer.failed" | "treasury.inbound_transfer.succeeded" | "treasury.outbound_payment.canceled" | "treasury.outbound_payment.created" | "treasury.outbound_payment.expected_arrival_date_updated" | "treasury.outbound_payment.failed" | "treasury.outbound_payment.posted" | "treasury.outbound_payment.returned" | "treasury.outbound_payment.tracking_details_updated" | "treasury.outbound_transfer.canceled" | "treasury.outbound_transfer.created" | "treasury.outbound_transfer.expected_arrival_date_updated" | "treasury.outbound_transfer.failed" | "treasury.outbound_transfer.posted" | "treasury.outbound_transfer.returned" | "treasury.outbound_transfer.tracking_details_updated" | "treasury.received_credit.created" | "treasury.received_credit.failed" | "treasury.received_credit.succeeded" | "treasury.received_debit.created")[];
|
|
60
|
+
}, {
|
|
61
|
+
readonly webhookId: string;
|
|
62
|
+
readonly webhookSecret?: string;
|
|
63
|
+
} | undefined>) => Effect.Effect<{
|
|
64
|
+
events: never[] | {
|
|
65
|
+
key: string;
|
|
66
|
+
payload: {
|
|
67
|
+
readonly [x: string]: unknown;
|
|
68
|
+
readonly id: string;
|
|
69
|
+
readonly type: string;
|
|
70
|
+
};
|
|
71
|
+
}[];
|
|
72
|
+
state: {
|
|
73
|
+
readonly webhookId: string;
|
|
74
|
+
readonly webhookSecret?: string;
|
|
75
|
+
} | undefined;
|
|
76
|
+
}, Schema.SchemaError, never>;
|
|
77
|
+
verify: (input: Trigger.WebhookLifecycleInput<{
|
|
78
|
+
readonly apiVersion?: "2011-01-01" | "2011-06-21" | "2011-06-28" | "2011-08-01" | "2011-09-15" | "2011-11-17" | "2012-02-23" | "2012-03-25" | "2012-06-18" | "2012-06-28" | "2012-07-09" | "2012-09-24" | "2012-10-26" | "2012-11-07" | "2013-02-11" | "2013-02-13" | "2013-07-05" | "2013-08-12" | "2013-08-13" | "2013-10-29" | "2013-12-03" | "2014-01-31" | "2014-03-13" | "2014-03-28" | "2014-05-19" | "2014-06-13" | "2014-06-17" | "2014-07-22" | "2014-07-26" | "2014-08-04" | "2014-08-20" | "2014-09-08" | "2014-10-07" | "2014-11-05" | "2014-11-20" | "2014-12-08" | "2014-12-17" | "2014-12-22" | "2015-01-11" | "2015-01-26" | "2015-02-10" | "2015-02-16" | "2015-02-18" | "2015-03-24" | "2015-04-07" | "2015-06-15" | "2015-07-07" | "2015-07-13" | "2015-07-28" | "2015-08-07" | "2015-08-19" | "2015-09-03" | "2015-09-08" | "2015-09-23" | "2015-10-01" | "2015-10-12" | "2015-10-16" | "2016-02-03" | "2016-02-19" | "2016-02-22" | "2016-02-23" | "2016-02-29" | "2016-03-07" | "2016-06-15" | "2016-07-06" | "2016-10-19" | "2017-01-27" | "2017-02-14" | "2017-04-06" | "2017-05-25" | "2017-06-05" | "2017-08-15" | "2017-12-14" | "2018-01-23" | "2018-02-05" | "2018-02-06" | "2018-02-28" | "2018-05-21" | "2018-07-27" | "2018-08-23" | "2018-09-06" | "2018-09-24" | "2018-10-31" | "2018-11-08" | "2019-02-11" | "2019-02-19" | "2019-03-14" | "2019-05-16" | "2019-08-14" | "2019-09-09" | "2019-10-08" | "2019-10-17" | "2019-11-05" | "2019-12-03" | "2020-03-02" | "2020-08-27" | "2022-08-01" | "2022-11-15" | "2023-08-16" | "2023-10-16" | "2024-04-10" | "2024-06-20" | "2024-09-30.acacia" | "2024-10-28.acacia" | "2024-11-20.acacia" | "2024-12-18.acacia" | "2025-01-27.acacia" | "2025-02-24.acacia" | "2025-03-01.dashboard" | "2025-03-31.basil" | "2025-04-30.basil" | "2025-05-28.basil" | "2025-06-30.basil" | "2025-07-30.basil" | "2025-08-27.basil" | "2025-09-30.clover" | "2025-10-29.clover" | "2025-11-17.clover" | "2025-12-15.clover" | "2026-01-28.clover" | "2026-02-25.clover" | "2026-03-25.dahlia" | "2026-04-22.dahlia" | "2026-05-27.dahlia" | "2026-06-24.dahlia" | "2026-07-29.dahlia" | "2026-08-26.dahlia" | "2026-09-30.endive";
|
|
79
|
+
readonly events: readonly ("*" | "account.application.authorized" | "account.application.deauthorized" | "account.external_account.created" | "account.external_account.deleted" | "account.external_account.updated" | "account.updated" | "application_fee.created" | "application_fee.refund.updated" | "application_fee.refunded" | "apps.install.created" | "apps.install.deleted" | "apps.install.updated" | "balance.available" | "balance_settings.updated" | "billing.alert.triggered" | "billing.credit_balance_transaction.created" | "billing.credit_grant.created" | "billing.credit_grant.updated" | "billing.meter.created" | "billing.meter.deactivated" | "billing.meter.reactivated" | "billing.meter.updated" | "billing_portal.configuration.created" | "billing_portal.configuration.updated" | "billing_portal.session.created" | "capability.updated" | "cash_balance.funds_available" | "charge.captured" | "charge.dispute.closed" | "charge.dispute.created" | "charge.dispute.funds_reinstated" | "charge.dispute.funds_withdrawn" | "charge.dispute.updated" | "charge.expired" | "charge.failed" | "charge.pending" | "charge.refund.updated" | "charge.refunded" | "charge.succeeded" | "charge.updated" | "checkout.session.async_payment_failed" | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" | "climate.order.canceled" | "climate.order.created" | "climate.order.delayed" | "climate.order.delivered" | "climate.order.product_substituted" | "climate.product.created" | "climate.product.pricing_updated" | "coupon.created" | "coupon.deleted" | "coupon.updated" | "credit_note.created" | "credit_note.updated" | "credit_note.voided" | "customer.created" | "customer.deleted" | "customer.discount.created" | "customer.discount.deleted" | "customer.discount.updated" | "customer.source.created" | "customer.source.deleted" | "customer.source.expiring" | "customer.source.updated" | "customer.subscription.created" | "customer.subscription.deleted" | "customer.subscription.paused" | "customer.subscription.pending_update_applied" | "customer.subscription.pending_update_expired" | "customer.subscription.resumed" | "customer.subscription.trial_will_end" | "customer.subscription.updated" | "customer.tax_id.created" | "customer.tax_id.deleted" | "customer.tax_id.updated" | "customer.updated" | "customer_cash_balance_transaction.created" | "entitlements.active_entitlement_summary.updated" | "file.created" | "financial_connections.account.account_numbers_updated" | "financial_connections.account.created" | "financial_connections.account.deactivated" | "financial_connections.account.disconnected" | "financial_connections.account.expected_deactivation_date_updated" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" | "financial_connections.account.refreshed_ownership" | "financial_connections.account.refreshed_transactions" | "financial_connections.account.supported_payment_method_types_updated" | "financial_connections.account.upcoming_account_number_expiry" | "financial_connections.account.upcoming_deactivation" | "financial_connections.authorization.expected_deactivation_date_updated" | "financial_connections.authorization.upcoming_deactivation" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" | "identity.verification_session.redacted" | "identity.verification_session.requires_input" | "identity.verification_session.verified" | "invoice.created" | "invoice.deleted" | "invoice.finalization_failed" | "invoice.finalized" | "invoice.marked_uncollectible" | "invoice.overdue" | "invoice.overpaid" | "invoice.paid" | "invoice.payment_action_required" | "invoice.payment_attempt_required" | "invoice.payment_failed" | "invoice.payment_succeeded" | "invoice.sent" | "invoice.upcoming" | "invoice.updated" | "invoice.voided" | "invoice.will_be_due" | "invoice_payment.paid" | "invoiceitem.created" | "invoiceitem.deleted" | "issuing_authorization.created" | "issuing_authorization.request" | "issuing_authorization.updated" | "issuing_card.created" | "issuing_card.updated" | "issuing_cardholder.created" | "issuing_cardholder.updated" | "issuing_dispute.closed" | "issuing_dispute.created" | "issuing_dispute.funds_reinstated" | "issuing_dispute.funds_rescinded" | "issuing_dispute.submitted" | "issuing_dispute.updated" | "issuing_personalization_design.activated" | "issuing_personalization_design.deactivated" | "issuing_personalization_design.rejected" | "issuing_personalization_design.updated" | "issuing_token.created" | "issuing_token.updated" | "issuing_transaction.created" | "issuing_transaction.purchase_details_receipt_updated" | "issuing_transaction.updated" | "mandate.updated" | "payment_intent.amount_capturable_updated" | "payment_intent.canceled" | "payment_intent.created" | "payment_intent.partially_funded" | "payment_intent.payment_failed" | "payment_intent.processing" | "payment_intent.requires_action" | "payment_intent.succeeded" | "payment_link.created" | "payment_link.updated" | "payment_method.attached" | "payment_method.automatically_updated" | "payment_method.detached" | "payment_method.updated" | "payout.canceled" | "payout.created" | "payout.failed" | "payout.paid" | "payout.reconciliation_completed" | "payout.updated" | "person.created" | "person.deleted" | "person.updated" | "plan.created" | "plan.deleted" | "plan.updated" | "price.created" | "price.deleted" | "price.updated" | "product.created" | "product.deleted" | "product.updated" | "promotion_code.created" | "promotion_code.updated" | "quote.accepted" | "quote.canceled" | "quote.created" | "quote.finalized" | "radar.early_fraud_warning.created" | "radar.early_fraud_warning.updated" | "refund.created" | "refund.failed" | "refund.updated" | "reporting.report_run.failed" | "reporting.report_run.succeeded" | "reporting.report_type.updated" | "reserve.hold.created" | "reserve.hold.updated" | "reserve.plan.created" | "reserve.plan.disabled" | "reserve.plan.expired" | "reserve.plan.updated" | "reserve.release.created" | "review.closed" | "review.opened" | "setup_intent.canceled" | "setup_intent.created" | "setup_intent.requires_action" | "setup_intent.setup_failed" | "setup_intent.succeeded" | "sigma.scheduled_query_run.created" | "source.canceled" | "source.chargeable" | "source.failed" | "source.mandate_notification" | "source.refund_attributes_required" | "source.transaction.created" | "source.transaction.updated" | "subscription_schedule.aborted" | "subscription_schedule.canceled" | "subscription_schedule.completed" | "subscription_schedule.created" | "subscription_schedule.expiring" | "subscription_schedule.released" | "subscription_schedule.updated" | "tax.settings.updated" | "tax_rate.created" | "tax_rate.updated" | "terminal.reader.action_failed" | "terminal.reader.action_succeeded" | "terminal.reader.action_updated" | "test_helpers.test_clock.advancing" | "test_helpers.test_clock.created" | "test_helpers.test_clock.deleted" | "test_helpers.test_clock.internal_failure" | "test_helpers.test_clock.ready" | "topup.canceled" | "topup.created" | "topup.failed" | "topup.reversed" | "topup.succeeded" | "transfer.created" | "transfer.reversed" | "transfer.updated" | "treasury.credit_reversal.created" | "treasury.credit_reversal.posted" | "treasury.debit_reversal.completed" | "treasury.debit_reversal.created" | "treasury.debit_reversal.initial_credit_granted" | "treasury.financial_account.closed" | "treasury.financial_account.created" | "treasury.financial_account.features_status_updated" | "treasury.inbound_transfer.canceled" | "treasury.inbound_transfer.created" | "treasury.inbound_transfer.failed" | "treasury.inbound_transfer.succeeded" | "treasury.outbound_payment.canceled" | "treasury.outbound_payment.created" | "treasury.outbound_payment.expected_arrival_date_updated" | "treasury.outbound_payment.failed" | "treasury.outbound_payment.posted" | "treasury.outbound_payment.returned" | "treasury.outbound_payment.tracking_details_updated" | "treasury.outbound_transfer.canceled" | "treasury.outbound_transfer.created" | "treasury.outbound_transfer.expected_arrival_date_updated" | "treasury.outbound_transfer.failed" | "treasury.outbound_transfer.posted" | "treasury.outbound_transfer.returned" | "treasury.outbound_transfer.tracking_details_updated" | "treasury.received_credit.created" | "treasury.received_credit.failed" | "treasury.received_credit.succeeded" | "treasury.received_debit.created")[];
|
|
80
|
+
}, {
|
|
81
|
+
readonly webhookId: string;
|
|
82
|
+
readonly webhookSecret?: string;
|
|
83
|
+
} | undefined>, context: {
|
|
84
|
+
readonly auth: import("@dual-os/sdk/AuthMethodBinding").Context<readonly [import("@dual-os/sdk/AuthMethod").AuthMethod<"secret-key", undefined, Schema.Struct<{
|
|
85
|
+
readonly secretKey: Schema.NonEmptyString;
|
|
86
|
+
readonly signatureSecret: Schema.optional<Schema.String>;
|
|
87
|
+
}>, Schema.Struct<{
|
|
88
|
+
readonly secretKey: Schema.NonEmptyString;
|
|
89
|
+
readonly signatureSecret: Schema.optional<Schema.String>;
|
|
90
|
+
}>, Schema.Struct<{
|
|
91
|
+
readonly secretKey: Schema.NonEmptyString;
|
|
92
|
+
readonly signatureSecret: Schema.optional<Schema.String>;
|
|
93
|
+
}>, never>]>;
|
|
94
|
+
} & import("@dual-os/sdk/ConnectionResolver").ConnectionResolutionContext) => Effect.Effect<undefined, Action.ActionHandlerError | Schema.SchemaError, never>;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
//#endregion
|
|
98
|
+
//# sourceMappingURL=triggers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggers.d.ts","names":[],"sources":["../src/triggers.ts"],"mappings":";;;qBAgDa,oBAAQ,QAAA,4BAAA,OAAA;;;;;;;;;;qBAER;;IAET,WAAQ,OAAA,QAAA;;;;;;;;;;;;;;;;;;;QAwBY;QAAwB;;;IAE5C,aAAU,OAAA,QAAA;;;;;;;;;;;;;;;;;;IAOV,QAAK,OAAA,QAAA;;;;;;;;;;;;;;;;;;;;IAaL,SAAM,OAAA,QAAA"}
|
package/dist/triggers.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
triggers2,
|
|
4
|
+
handlers2
|
|
5
|
+
} from "../plugin-b3yra2xt.js";
|
|
6
|
+
import"../plugin-xe3spzxq.js";
|
|
7
|
+
import"../plugin-v52b3xya.js";
|
|
8
|
+
import"../plugin-g8e5s4bz.js";
|
|
9
|
+
import"../plugin-2jdfj02n.js";
|
|
10
|
+
import"../plugin-ty63scdn.js";
|
|
11
|
+
export {
|
|
12
|
+
handlers2 as handlers,
|
|
13
|
+
triggers2 as triggers
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//# debugId=839FD91A59A8813364756E2164756E21
|
|
17
|
+
//# sourceMappingURL=triggers.js.map
|
package/dual-plugin.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"entrypoint":"dist/generated/plugin.js","export":"stripeApiPlugin","format":2,"plugin":"stripe-api","runner":"Runner.js","sdk_version":"0.9.0","version":"6.0.4"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Effectful Technologies Inc
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Effectful Technologies Inc
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Effectful Technologies Inc
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dual-os/stripe-api",
|
|
3
|
-
"version": "0.0.0-stage",
|
|
4
|
-
"stub": true,
|
|
5
|
-
"description": "Temporary package placeholder for staged publishing"
|
|
6
|
-
}
|
|
1
|
+
{"name":"@dual-os/stripe-api","version":"6.0.4","license":"UNLICENSED","exports":{".":"./dist/generated/plugin.js","./definition":"./dist/generated/plugin.js","./executable":"./dist/generated/plugin.js","./plugin.json":"./plugin.json","./package.json":"./package.json"},"files":["**/*"],"type":"module","scripts":{},"dependencies":{},"devDependencies":{},"dual":{"plugin":{"entrypoint":"dist/generated/plugin.js","export":"stripeApiPlugin","format":2,"plugin":"stripe-api","runner":"Runner.js","sdk_version":"0.9.0","version":"6.0.4","assets":["dist/_virtual/_rolldown/runtime.js","dist/auth.d.ts","dist/auth.d.ts.map","dist/auth.js","dist/auth.js.map","dist/generated/http.d.ts","dist/generated/http.d.ts.map","dist/generated/http.js","dist/generated/http.js.map","dist/generated/operations.d.ts","dist/generated/operations.d.ts.map","dist/generated/operations.js","dist/generated/operations.js.map","dist/generated/plugin.d.ts","dist/generated/plugin.d.ts.map","dist/generated/plugin.js","dist/generated/plugin.js.map","dist/triggers.d.ts","dist/triggers.d.ts.map","dist/triggers.js","dist/triggers.js.map","plugin.json","package.json"]}},"peerDependencies":{},"optionalDependencies":{}}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// dist/_virtual/_rolldown/runtime.js
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __exportAll2 = (all, no_symbols) => {
|
|
5
|
+
let target = {};
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
11
|
+
if (!no_symbols)
|
|
12
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
return target;
|
|
14
|
+
};
|
|
15
|
+
export { __exportAll2 };
|
|
16
|
+
|
|
17
|
+
//# debugId=082734D28D54F6AF64756E2164756E21
|
|
18
|
+
//# sourceMappingURL=plugin-2jdfj02n.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../bundle-input/dist/_virtual/_rolldown/runtime.js"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"//#region \\0rolldown/runtime.js\nvar __defProp = Object.defineProperty;\nvar __exportAll = (all, no_symbols) => {\n\tlet target = {};\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n\tif (!no_symbols) __defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\treturn target;\n};\n//#endregion\nexport { __exportAll };\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,eAAc,CAAC,KAAK,eAAe;AAAA,EACtC,IAAI,SAAS,CAAC;AAAA,EACd,SAAS,QAAQ;AAAA,IAAK,UAAU,QAAQ,MAAM;AAAA,MAC7C,KAAK,IAAI;AAAA,MACT,YAAY;AAAA,IACb,CAAC;AAAA,EACD,IAAI,CAAC;AAAA,IAAY,UAAU,QAAQ,OAAO,aAAa,EAAE,OAAO,SAAS,CAAC;AAAA,EAC1E,OAAO;AAAA;",
|
|
8
|
+
"debugId": "082734D28D54F6AF64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
pipe,
|
|
4
|
+
match2,
|
|
5
|
+
fromUndefinedOr,
|
|
6
|
+
flatMap,
|
|
7
|
+
filter,
|
|
8
|
+
exists,
|
|
9
|
+
get2,
|
|
10
|
+
take,
|
|
11
|
+
findFirst,
|
|
12
|
+
contains,
|
|
13
|
+
map3,
|
|
14
|
+
flatMap2,
|
|
15
|
+
filter2,
|
|
16
|
+
fromNullishOr2,
|
|
17
|
+
minutes,
|
|
18
|
+
toMillis,
|
|
19
|
+
currentTimeMillis,
|
|
20
|
+
between,
|
|
21
|
+
parse,
|
|
22
|
+
isEmpty,
|
|
23
|
+
split,
|
|
24
|
+
forEach,
|
|
25
|
+
fromOption2,
|
|
26
|
+
mapError,
|
|
27
|
+
fn,
|
|
28
|
+
decodeUnknownEffect,
|
|
29
|
+
optionalKey,
|
|
30
|
+
Unknown,
|
|
31
|
+
String3,
|
|
32
|
+
Struct,
|
|
33
|
+
Record,
|
|
34
|
+
StructWithRest,
|
|
35
|
+
ArraySchema,
|
|
36
|
+
Uint8Array2,
|
|
37
|
+
Action_exports,
|
|
38
|
+
Trigger_exports
|
|
39
|
+
} from "./plugin-ty63scdn.js";
|
|
40
|
+
import {
|
|
41
|
+
match
|
|
42
|
+
} from "./plugin-g8e5s4bz.js";
|
|
43
|
+
import {
|
|
44
|
+
ApiVersion2,
|
|
45
|
+
EnabledEvents2,
|
|
46
|
+
webhookEndpoints_postWebhookEndpoints2,
|
|
47
|
+
webhookEndpoints_deleteWebhookEndpointsWebhookEndpoint2
|
|
48
|
+
} from "./plugin-xe3spzxq.js";
|
|
49
|
+
|
|
50
|
+
// dist/triggers.js
|
|
51
|
+
var tolerance = minutes(5);
|
|
52
|
+
var Event = StructWithRest(Struct({
|
|
53
|
+
id: String3,
|
|
54
|
+
type: String3
|
|
55
|
+
}), [Record(String3, Unknown)]);
|
|
56
|
+
var SignedDelivery = Struct({
|
|
57
|
+
headers: Struct({ "stripe-signature": String3 }),
|
|
58
|
+
rawBody: Uint8Array2
|
|
59
|
+
});
|
|
60
|
+
var triggers2 = [Trigger_exports.webhook("event", {
|
|
61
|
+
description: "Triggers on Stripe events (charges, customers, invoices, subscriptions, and more)",
|
|
62
|
+
name: "Stripe event",
|
|
63
|
+
config: Struct({
|
|
64
|
+
apiVersion: optionalKey(ApiVersion2),
|
|
65
|
+
events: ArraySchema(EnabledEvents2)
|
|
66
|
+
}),
|
|
67
|
+
output: Event,
|
|
68
|
+
state: Struct({
|
|
69
|
+
webhookId: String3,
|
|
70
|
+
webhookSecret: optionalKey(String3)
|
|
71
|
+
})
|
|
72
|
+
})];
|
|
73
|
+
var handlers2 = { event: {
|
|
74
|
+
activate: fn("Stripe.event.activate")(function* (input, context) {
|
|
75
|
+
const endpoint = yield* webhookEndpoints_postWebhookEndpoints2.run({ payload: {
|
|
76
|
+
...match2(fromUndefinedOr(input.config.apiVersion), {
|
|
77
|
+
onNone: () => ({}),
|
|
78
|
+
onSome: (api_version) => ({ api_version })
|
|
79
|
+
}),
|
|
80
|
+
description: "Created by Dual",
|
|
81
|
+
enabled_events: input.config.events,
|
|
82
|
+
url: input.webhookUrl
|
|
83
|
+
} }, context);
|
|
84
|
+
if (endpoint.secret === undefined || endpoint.secret === "") {
|
|
85
|
+
yield* webhookEndpoints_deleteWebhookEndpointsWebhookEndpoint2.run({ webhook_endpoint: endpoint.id }, context);
|
|
86
|
+
return yield* Action_exports.ActionHandlerError.make({ message: "Stripe did not return the new endpoint signing secret" });
|
|
87
|
+
}
|
|
88
|
+
return { state: {
|
|
89
|
+
webhookId: endpoint.id,
|
|
90
|
+
webhookSecret: endpoint.secret
|
|
91
|
+
} };
|
|
92
|
+
}),
|
|
93
|
+
deactivate: fn("Stripe.event.deactivate")(function* (input, context) {
|
|
94
|
+
if (input.state === undefined)
|
|
95
|
+
return;
|
|
96
|
+
yield* webhookEndpoints_deleteWebhookEndpointsWebhookEndpoint2.run({ webhook_endpoint: input.state.webhookId }, context);
|
|
97
|
+
}),
|
|
98
|
+
parse: fn("Stripe.event.parse")(function* (input) {
|
|
99
|
+
const payload = yield* decodeUnknownEffect(Event)(input.request.body);
|
|
100
|
+
const wanted = contains(input.config.events, "*") || contains(input.config.events, payload.type);
|
|
101
|
+
return {
|
|
102
|
+
events: match(wanted, {
|
|
103
|
+
onFalse: () => [],
|
|
104
|
+
onTrue: () => [{
|
|
105
|
+
key: payload.id,
|
|
106
|
+
payload
|
|
107
|
+
}]
|
|
108
|
+
}),
|
|
109
|
+
state: input.state
|
|
110
|
+
};
|
|
111
|
+
}),
|
|
112
|
+
verify: fn("Stripe.event.verify")(function* (input, context) {
|
|
113
|
+
const forged = Action_exports.ActionHandlerError.make({
|
|
114
|
+
message: "Invalid Stripe request signature",
|
|
115
|
+
status: 401
|
|
116
|
+
});
|
|
117
|
+
const secret = input.state?.webhookSecret ?? context.auth.current.value.signatureSecret;
|
|
118
|
+
if (secret === undefined || isEmpty(secret))
|
|
119
|
+
return yield* forged;
|
|
120
|
+
const delivery = yield* decodeUnknownEffect(SignedDelivery)({
|
|
121
|
+
...input.request,
|
|
122
|
+
headers: input.request.headers ?? {}
|
|
123
|
+
});
|
|
124
|
+
const pairs = pipe(delivery.headers["stripe-signature"], split(","), map3(split("=")));
|
|
125
|
+
const now = yield* currentTimeMillis;
|
|
126
|
+
const timestamp = yield* pipe(pairs, findFirst((pair) => pair[0] === "t"), flatMap((pair) => get2(pair, 1)), filter((seconds) => exists(parse(seconds), (parsed) => between(parsed * 1000, {
|
|
127
|
+
maximum: now + toMillis(tolerance),
|
|
128
|
+
minimum: now - toMillis(tolerance)
|
|
129
|
+
}))), fromOption2, mapError(() => forged));
|
|
130
|
+
const signatures = pipe(pairs, filter2((pair) => pair[0] === "v1"), flatMap2((pair) => fromNullishOr2(pair[1])));
|
|
131
|
+
const results = yield* forEach(take(signatures, 5), (signature) => Trigger_exports.verifyHmac({
|
|
132
|
+
algorithm: "sha256",
|
|
133
|
+
encoding: "hex",
|
|
134
|
+
message: [`${timestamp}.`, delivery.rawBody],
|
|
135
|
+
secret,
|
|
136
|
+
signature
|
|
137
|
+
}));
|
|
138
|
+
if (!contains(results, true))
|
|
139
|
+
return yield* forged;
|
|
140
|
+
})
|
|
141
|
+
} };
|
|
142
|
+
export { triggers2, handlers2 };
|
|
143
|
+
|
|
144
|
+
//# debugId=B2E6681FA46221B264756E2164756E21
|
|
145
|
+
//# sourceMappingURL=plugin-b3yra2xt.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../bundle-input/dist/triggers.js"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { ApiVersion, EnabledEvents, webhookEndpoints_deleteWebhookEndpointsWebhookEndpoint, webhookEndpoints_postWebhookEndpoints } from \"./generated/operations.js\";\nimport { Array, Boolean, Clock, Duration, Effect, Number, Option, Schema, String, pipe } from \"effect\";\nimport { Action, Trigger } from \"@dual-os/sdk\";\n//#region src/triggers.ts\nconst tolerance = Duration.minutes(5);\nconst Event = Schema.StructWithRest(Schema.Struct({\n\tid: Schema.String,\n\ttype: Schema.String\n}), [Schema.Record(Schema.String, Schema.Unknown)]);\nconst SignedDelivery = Schema.Struct({\n\theaders: Schema.Struct({ \"stripe-signature\": Schema.String }),\n\trawBody: Schema.Uint8Array\n});\nconst triggers = [Trigger.webhook(\"event\", {\n\tdescription: \"Triggers on Stripe events (charges, customers, invoices, subscriptions, and more)\",\n\tname: \"Stripe event\",\n\tconfig: Schema.Struct({\n\t\tapiVersion: Schema.optionalKey(ApiVersion),\n\t\tevents: Schema.Array(EnabledEvents)\n\t}),\n\toutput: Event,\n\tstate: Schema.Struct({\n\t\twebhookId: Schema.String,\n\t\twebhookSecret: Schema.optionalKey(Schema.String)\n\t})\n})];\nconst handlers = { event: {\n\tactivate: Effect.fn(\"Stripe.event.activate\")(function* (input, context) {\n\t\tconst endpoint = yield* webhookEndpoints_postWebhookEndpoints.run({ payload: {\n\t\t\t...Option.match(Option.fromUndefinedOr(input.config.apiVersion), {\n\t\t\t\tonNone: () => ({}),\n\t\t\t\tonSome: (api_version) => ({ api_version })\n\t\t\t}),\n\t\t\tdescription: \"Created by Dual\",\n\t\t\tenabled_events: input.config.events,\n\t\t\turl: input.webhookUrl\n\t\t} }, context);\n\t\tif (endpoint.secret === void 0 || endpoint.secret === \"\") {\n\t\t\tyield* webhookEndpoints_deleteWebhookEndpointsWebhookEndpoint.run({ webhook_endpoint: endpoint.id }, context);\n\t\t\treturn yield* Action.ActionHandlerError.make({ message: \"Stripe did not return the new endpoint signing secret\" });\n\t\t}\n\t\treturn { state: {\n\t\t\twebhookId: endpoint.id,\n\t\t\twebhookSecret: endpoint.secret\n\t\t} };\n\t}),\n\tdeactivate: Effect.fn(\"Stripe.event.deactivate\")(function* (input, context) {\n\t\tif (input.state === void 0) return;\n\t\tyield* webhookEndpoints_deleteWebhookEndpointsWebhookEndpoint.run({ webhook_endpoint: input.state.webhookId }, context);\n\t}),\n\tparse: Effect.fn(\"Stripe.event.parse\")(function* (input) {\n\t\tconst payload = yield* Schema.decodeUnknownEffect(Event)(input.request.body);\n\t\tconst wanted = Array.contains(input.config.events, \"*\") || Array.contains(input.config.events, payload.type);\n\t\treturn {\n\t\t\tevents: Boolean.match(wanted, {\n\t\t\t\tonFalse: () => [],\n\t\t\t\tonTrue: () => [{\n\t\t\t\t\tkey: payload.id,\n\t\t\t\t\tpayload\n\t\t\t\t}]\n\t\t\t}),\n\t\t\tstate: input.state\n\t\t};\n\t}),\n\tverify: Effect.fn(\"Stripe.event.verify\")(function* (input, context) {\n\t\tconst forged = Action.ActionHandlerError.make({\n\t\t\tmessage: \"Invalid Stripe request signature\",\n\t\t\tstatus: 401\n\t\t});\n\t\tconst secret = input.state?.webhookSecret ?? context.auth.current.value.signatureSecret;\n\t\tif (secret === void 0 || String.isEmpty(secret)) return yield* forged;\n\t\tconst delivery = yield* Schema.decodeUnknownEffect(SignedDelivery)({\n\t\t\t...input.request,\n\t\t\theaders: input.request.headers ?? {}\n\t\t});\n\t\tconst pairs = pipe(delivery.headers[\"stripe-signature\"], String.split(\",\"), Array.map(String.split(\"=\")));\n\t\tconst now = yield* Clock.currentTimeMillis;\n\t\tconst timestamp = yield* pipe(pairs, Array.findFirst((pair) => pair[0] === \"t\"), Option.flatMap((pair) => Array.get(pair, 1)), Option.filter((seconds) => Option.exists(Number.parse(seconds), (parsed) => Number.between(parsed * 1e3, {\n\t\t\tmaximum: now + Duration.toMillis(tolerance),\n\t\t\tminimum: now - Duration.toMillis(tolerance)\n\t\t}))), Effect.fromOption, Effect.mapError(() => forged));\n\t\tconst signatures = pipe(pairs, Array.filter((pair) => pair[0] === \"v1\"), Array.flatMap((pair) => Array.fromNullishOr(pair[1])));\n\t\tconst results = yield* Effect.forEach(Array.take(signatures, 5), (signature) => Trigger.verifyHmac({\n\t\t\talgorithm: \"sha256\",\n\t\t\tencoding: \"hex\",\n\t\t\tmessage: [`${timestamp}.`, delivery.rawBody],\n\t\t\tsecret,\n\t\t\tsignature\n\t\t}));\n\t\tif (!Array.contains(results, true)) return yield* forged;\n\t})\n} };\n//#endregion\nexport { handlers, triggers };\n\n//# sourceMappingURL=triggers.js.map"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,YAAY,QAAiB,CAAC;AACpC,IAAM,QAAQ,eAAsB,OAAc;AAAA,EACjD,IAAI;AAAA,EACJ,MAAM;AACP,CAAC,GAAG,CAAC,OAAc,SAAe,OAAc,CAAC,CAAC;AAClD,IAAM,iBAAiB,OAAc;AAAA,EACpC,SAAS,OAAc,EAAE,oBAAoB,QAAc,CAAC;AAAA,EAC5D,SAAS;AACV,CAAC;AACD,IAAM,YAAW,CAAC,gBAAQ,QAAQ,SAAS;AAAA,EAC1C,aAAa;AAAA,EACb,MAAM;AAAA,EACN,QAAQ,OAAc;AAAA,IACrB,YAAY,YAAmB,WAAU;AAAA,IACzC,QAAQ,YAAa,cAAa;AAAA,EACnC,CAAC;AAAA,EACD,QAAQ;AAAA,EACR,OAAO,OAAc;AAAA,IACpB,WAAW;AAAA,IACX,eAAe,YAAmB,OAAa;AAAA,EAChD,CAAC;AACF,CAAC,CAAC;AACF,IAAM,YAAW,EAAE,OAAO;AAAA,EACzB,UAAU,GAAU,uBAAuB,EAAE,UAAU,CAAC,OAAO,SAAS;AAAA,IACvE,MAAM,WAAW,OAAO,uCAAsC,IAAI,EAAE,SAAS;AAAA,SACzE,OAAa,gBAAuB,MAAM,OAAO,UAAU,GAAG;AAAA,QAChE,QAAQ,OAAO,CAAC;AAAA,QAChB,QAAQ,CAAC,iBAAiB,EAAE,YAAY;AAAA,MACzC,CAAC;AAAA,MACD,aAAa;AAAA,MACb,gBAAgB,MAAM,OAAO;AAAA,MAC7B,KAAK,MAAM;AAAA,IACZ,EAAE,GAAG,OAAO;AAAA,IACZ,IAAI,SAAS,WAAgB,aAAK,SAAS,WAAW,IAAI;AAAA,MACzD,OAAO,wDAAuD,IAAI,EAAE,kBAAkB,SAAS,GAAG,GAAG,OAAO;AAAA,MAC5G,OAAO,OAAO,eAAO,mBAAmB,KAAK,EAAE,SAAS,wDAAwD,CAAC;AAAA,IAClH;AAAA,IACA,OAAO,EAAE,OAAO;AAAA,MACf,WAAW,SAAS;AAAA,MACpB,eAAe,SAAS;AAAA,IACzB,EAAE;AAAA,GACF;AAAA,EACD,YAAY,GAAU,yBAAyB,EAAE,UAAU,CAAC,OAAO,SAAS;AAAA,IAC3E,IAAI,MAAM,UAAe;AAAA,MAAG;AAAA,IAC5B,OAAO,wDAAuD,IAAI,EAAE,kBAAkB,MAAM,MAAM,UAAU,GAAG,OAAO;AAAA,GACtH;AAAA,EACD,OAAO,GAAU,oBAAoB,EAAE,UAAU,CAAC,OAAO;AAAA,IACxD,MAAM,UAAU,OAAO,oBAA2B,KAAK,EAAE,MAAM,QAAQ,IAAI;AAAA,IAC3E,MAAM,SAAS,SAAe,MAAM,OAAO,QAAQ,GAAG,KAAK,SAAe,MAAM,OAAO,QAAQ,QAAQ,IAAI;AAAA,IAC3G,OAAO;AAAA,MACN,QAAQ,MAAc,QAAQ;AAAA,QAC7B,SAAS,MAAM,CAAC;AAAA,QAChB,QAAQ,MAAM,CAAC;AAAA,UACd,KAAK,QAAQ;AAAA,UACb;AAAA,QACD,CAAC;AAAA,MACF,CAAC;AAAA,MACD,OAAO,MAAM;AAAA,IACd;AAAA,GACA;AAAA,EACD,QAAQ,GAAU,qBAAqB,EAAE,UAAU,CAAC,OAAO,SAAS;AAAA,IACnE,MAAM,SAAS,eAAO,mBAAmB,KAAK;AAAA,MAC7C,SAAS;AAAA,MACT,QAAQ;AAAA,IACT,CAAC;AAAA,IACD,MAAM,SAAS,MAAM,OAAO,iBAAiB,QAAQ,KAAK,QAAQ,MAAM;AAAA,IACxE,IAAI,WAAgB,aAAK,QAAe,MAAM;AAAA,MAAG,OAAO,OAAO;AAAA,IAC/D,MAAM,WAAW,OAAO,oBAA2B,cAAc,EAAE;AAAA,SAC/D,MAAM;AAAA,MACT,SAAS,MAAM,QAAQ,WAAW,CAAC;AAAA,IACpC,CAAC;AAAA,IACD,MAAM,QAAQ,KAAK,SAAS,QAAQ,qBAAqB,MAAa,GAAG,GAAG,KAAU,MAAa,GAAG,CAAC,CAAC;AAAA,IACxG,MAAM,MAAM,OAAO;AAAA,IACnB,MAAM,YAAY,OAAO,KAAK,OAAO,UAAgB,CAAC,SAAS,KAAK,OAAO,GAAG,GAAG,QAAe,CAAC,SAAS,KAAU,MAAM,CAAC,CAAC,GAAG,OAAc,CAAC,YAAY,OAAc,MAAa,OAAO,GAAG,CAAC,WAAW,QAAe,SAAS,MAAK;AAAA,MACvO,SAAS,MAAM,SAAkB,SAAS;AAAA,MAC1C,SAAS,MAAM,SAAkB,SAAS;AAAA,IAC3C,CAAC,CAAC,CAAC,GAAG,aAAmB,SAAgB,MAAM,MAAM,CAAC;AAAA,IACtD,MAAM,aAAa,KAAK,OAAO,QAAa,CAAC,SAAS,KAAK,OAAO,IAAI,GAAG,SAAc,CAAC,SAAS,eAAoB,KAAK,EAAE,CAAC,CAAC;AAAA,IAC9H,MAAM,UAAU,OAAO,QAAe,KAAW,YAAY,CAAC,GAAG,CAAC,cAAc,gBAAQ,WAAW;AAAA,MAClG,WAAW;AAAA,MACX,UAAU;AAAA,MACV,SAAS,CAAC,GAAG,cAAc,SAAS,OAAO;AAAA,MAC3C;AAAA,MACA;AAAA,IACD,CAAC,CAAC;AAAA,IACF,IAAI,CAAC,SAAe,SAAS,IAAI;AAAA,MAAG,OAAO,OAAO;AAAA,GAClD;AACF,EAAE;",
|
|
8
|
+
"debugId": "B2E6681FA46221B264756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|