@redwoodjs-stripe/api
Version:
API-side code for RedwoodJS-Stripe projects
255 lines (221 loc) • 6.87 kB
JavaScript
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var customerPortal_sdl_exports = {};
__export(customerPortal_sdl_exports, {
schema: () => schema
});
module.exports = __toCommonJS(customerPortal_sdl_exports);
const schema = (
/* GraphQL */
`
scalar Timestamp
scalar Metadata
type StripeCustomerPortal {
id: ID!
object: String
configuration: StripeCustomerPortalConfig
created: Timestamp
customer: String
livemode: Boolean
locale: String
on_behalf_of: String
return_url: String
url: String
}
type StripeCustomerPortalConfig {
id: ID
object: String
active: Boolean
application: String
business_profile: StripeBusinessProfile
created: Timestamp
features: StripeCustomerPortalFeatures
is_default: Boolean
livemode: Boolean
metadata: Metadata
updated: Timestamp
}
type StripeCustomerPortalConfigList {
object: String
has_more: Boolean
url: String
data: [StripeCustomerPortalConfig]
}
type StripeCustomerPortalFeatures {
customer_update: StripeCustomerPortalFeaturesCustomerUpdate
invoice_history: StripeCustomerPortalFeaturesInvoiceHistory
payment_method_update: StripeCustomerPortalFeaturesPaymentMethodUpdate
subscription_cancel: StripeCustomerPortalFeaturesSubscriptionCancel
subscription_pause: StripeCustomerPortalFeaturesSubscriptionPause
subscription_update: StripeCustomerPortalFeatureSubscriptionUpdate
}
type StripeCustomerPortalFeatureSubscriptionUpdate {
default_allowed_updates: [StripeCustomerPortalSubscriptionAllowedUpdatesEnum]
enabled: Boolean
products: [StripeCustomerPortalSubscriptionProducts]
}
type StripeCustomerPortalSubscriptionProducts {
prices: [String]
product: String
}
enum StripeCustomerPortalSubscriptionAllowedUpdatesEnum {
price
quantity
promotion_code
}
type StripeCustomerPortalFeaturesSubscriptionPause {
enabled: Boolean
}
type StripeCustomerPortalFeaturesSubscriptionCancel {
cancellation_reason: StripeSubscriptionCancellationReason
enabled: Boolean
mode: StripeCancellationReasonModeEnum
proration_behavior: String
}
enum StripeCancellationReasonModeEnum {
immediately
at_period_end
}
type StripeSubscriptionCancellationReason {
enabled: Boolean
options: [StripeSubscriptionCancellationReasonOptionsEnum]
}
enum StripeSubscriptionCancellationReasonOptionsEnum {
customer_service
low_quality
missing_features
other
switched_service
too_complex
too_expensive
unused
}
type StripeCustomerPortalFeaturesPaymentMethodUpdate {
enabled: Boolean
}
type StripeCustomerPortalFeaturesInvoiceHistory {
enabled: Boolean
}
type StripeCustomerPortalFeaturesCustomerUpdate {
allowed_updates: [StripeCustomerAllowedUpdatesEnum]
enabled: Boolean
}
enum StripeCustomerAllowedUpdatesEnum {
email
address
shipping
phone
tax_id
}
type StripeBusinessProfile {
headline: String
privacy_policy_url: String
terms_of_service_url: String
}
input StripeCustomerPortalConfigInput {
id: ID
object: String
active: Boolean
application: String
business_profile: StripeBusinessProfileInput!
created: Timestamp
features: StripeCustomerPortalFeaturesInput!
is_default: Boolean
livemode: Boolean
metadata: Metadata
updated: Timestamp
}
input StripeBusinessProfileInput {
headline: String
privacy_policy_url: String
terms_of_service_url: String
}
input StripeCustomerPortalFeaturesInput {
customer_update: StripeCustomerPortalFeaturesCustomerUpdateInput
invoice_history: StripeCustomerPortalFeaturesInvoiceHistoryInput
payment_method_update: StripeCustomerPortalFeaturesPaymentMethodUpdateInput
subscription_cancel: StripeCustomerPortalFeaturesSubscriptionCancelInput
subscription_pause: StripeCustomerPortalFeaturesSubscriptionPauseInput
subscription_update: StripeCustomerPortalFeatureSubscriptionUpdateInput
}
input StripeCustomerPortalFeaturesCustomerUpdateInput {
allowed_updates: [StripeCustomerAllowedUpdatesEnum]
enabled: Boolean!
}
input StripeCustomerPortalFeaturesInvoiceHistoryInput {
enabled: Boolean!
}
input StripeCustomerPortalFeaturesPaymentMethodUpdateInput {
enabled: Boolean!
}
enum StripeCustomerPortalProrationBehaviorEnum {
always_invoice
create_prorations
none
}
input StripeCustomerPortalFeaturesSubscriptionCancelInput {
cancellation_reason: StripeSubscriptionCancellationReasonInput!
enabled: Boolean!
mode: StripeCancellationReasonModeEnum
proration_behavior: StripeCustomerPortalProrationBehaviorEnum
}
input StripeSubscriptionCancellationReasonInput {
enabled: Boolean!
options: [StripeSubscriptionCancellationReasonOptionsEnum!]!
}
input StripeCustomerPortalFeaturesSubscriptionPauseInput {
enabled: Boolean!
}
input StripeCustomerPortalFeatureSubscriptionUpdateInput {
default_allowed_updates: [StripeCustomerPortalSubscriptionAllowedUpdatesEnum]!
enabled: Boolean!
products: [StripeCustomerPortalSubscriptionProductsInput]!
}
input StripeCustomerPortalSubscriptionProductsInput {
prices: [String]!
product: String!
}
input StripeCustomerPortalInput {
customer: String!
configuration: String
locale: String
on_behalf_of: String
return_url: String
}
input StripeCustomerPortalConfigParamsInput {
active: Boolean
is_default: Boolean
limit: Int
ending_before: String
starting_after: String
}
type Query {
listStripeCustomerPortalConfig(params: StripeCustomerPortalConfigParamsInput): StripeCustomerPortalConfigList @requireAuth
}
type Mutation {
createStripeCustomerPortalConfig(data: StripeCustomerPortalConfigInput): StripeCustomerPortalConfig @skipAuth
createStripeCustomerPortalSessionSkipAuth(data: StripeCustomerPortalInput): StripeCustomerPortal @skipAuth
createStripeCustomerPortalSession(data: StripeCustomerPortalInput): StripeCustomerPortal @requireAuth
}
`
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
schema
});