@solomonai/stripe-sync-graphql-sdk 0.0.1
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/README.md +71 -0
- package/dist/index.d.mts +69 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.js +52 -0
- package/dist/index.mjs +26 -0
- package/package.json +51 -0
- package/src/__tests__/sdk.test.ts +435 -0
- package/src/generated/gql.ts +28 -0
- package/src/generated/graphql.ts +744 -0
- package/src/generated/index.ts +1 -0
- package/src/index.ts +78 -0
|
@@ -0,0 +1,744 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
export type Maybe<T> = T | null
|
|
3
|
+
export type InputMaybe<T> = Maybe<T>
|
|
4
|
+
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] }
|
|
5
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> }
|
|
6
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> }
|
|
7
|
+
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = {
|
|
8
|
+
[_ in K]?: never
|
|
9
|
+
}
|
|
10
|
+
export type Incremental<T> =
|
|
11
|
+
| T
|
|
12
|
+
| { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }
|
|
13
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
14
|
+
export type Scalars = {
|
|
15
|
+
ID: { input: string; output: string }
|
|
16
|
+
String: { input: string; output: string }
|
|
17
|
+
Boolean: { input: boolean; output: boolean }
|
|
18
|
+
Int: { input: number; output: number }
|
|
19
|
+
Float: { input: number; output: number }
|
|
20
|
+
/** The `BigInt` scalar type represents non-fractional signed whole numeric values. */
|
|
21
|
+
BigInt: { input: string; output: string }
|
|
22
|
+
/** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */
|
|
23
|
+
DateTime: { input: string; output: string }
|
|
24
|
+
/** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
|
|
25
|
+
JSON: { input: Record<string, unknown>; output: Record<string, unknown> }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** A Stripe charge/payment record */
|
|
29
|
+
export type Charge = {
|
|
30
|
+
__typename?: 'Charge'
|
|
31
|
+
/** Charge amount in cents */
|
|
32
|
+
amount?: Maybe<Scalars['BigInt']['output']>
|
|
33
|
+
/** Amount refunded in cents */
|
|
34
|
+
amountRefunded?: Maybe<Scalars['BigInt']['output']>
|
|
35
|
+
/** Balance transaction ID for this charge */
|
|
36
|
+
balanceTransaction?: Maybe<Scalars['String']['output']>
|
|
37
|
+
/** Calculated statement descriptor shown on statement */
|
|
38
|
+
calculatedStatementDescriptor?: Maybe<Scalars['String']['output']>
|
|
39
|
+
/** Whether the charge has been captured */
|
|
40
|
+
captured?: Maybe<Scalars['Boolean']['output']>
|
|
41
|
+
/** Unix timestamp when charge was created */
|
|
42
|
+
created?: Maybe<Scalars['Int']['output']>
|
|
43
|
+
/** Three-letter ISO currency code */
|
|
44
|
+
currency?: Maybe<Scalars['String']['output']>
|
|
45
|
+
/** Customer ID associated with this charge */
|
|
46
|
+
customer?: Maybe<Scalars['String']['output']>
|
|
47
|
+
/** Description of the charge */
|
|
48
|
+
description?: Maybe<Scalars['String']['output']>
|
|
49
|
+
/** Destination account for Connect transfers */
|
|
50
|
+
destination?: Maybe<Scalars['String']['output']>
|
|
51
|
+
/** Dispute ID if charge is disputed */
|
|
52
|
+
dispute?: Maybe<Scalars['String']['output']>
|
|
53
|
+
/** Error code if charge failed */
|
|
54
|
+
failureCode?: Maybe<Scalars['String']['output']>
|
|
55
|
+
/** Human-readable failure message */
|
|
56
|
+
failureMessage?: Maybe<Scalars['String']['output']>
|
|
57
|
+
/** Fraud detection details */
|
|
58
|
+
fraudDetails?: Maybe<Scalars['JSON']['output']>
|
|
59
|
+
/** Stripe charge ID (ch_xxx) */
|
|
60
|
+
id?: Maybe<Scalars['ID']['output']>
|
|
61
|
+
/** Invoice ID associated with this charge */
|
|
62
|
+
invoice?: Maybe<Scalars['String']['output']>
|
|
63
|
+
/** Whether this is a live mode charge */
|
|
64
|
+
livemode?: Maybe<Scalars['Boolean']['output']>
|
|
65
|
+
/** Arbitrary key-value metadata */
|
|
66
|
+
metadata?: Maybe<Scalars['JSON']['output']>
|
|
67
|
+
/** Connected account ID for on_behalf_of charges */
|
|
68
|
+
onBehalfOf?: Maybe<Scalars['String']['output']>
|
|
69
|
+
/** Outcome of the charge (risk level, etc.) */
|
|
70
|
+
outcome?: Maybe<Scalars['JSON']['output']>
|
|
71
|
+
/** Whether the charge was paid */
|
|
72
|
+
paid?: Maybe<Scalars['Boolean']['output']>
|
|
73
|
+
/** Payment intent ID for this charge */
|
|
74
|
+
paymentIntent?: Maybe<Scalars['String']['output']>
|
|
75
|
+
/** Payment method ID used */
|
|
76
|
+
paymentMethod?: Maybe<Scalars['String']['output']>
|
|
77
|
+
/** Details about the payment method */
|
|
78
|
+
paymentMethodDetails?: Maybe<Scalars['JSON']['output']>
|
|
79
|
+
/** Email address to send receipt to */
|
|
80
|
+
receiptEmail?: Maybe<Scalars['String']['output']>
|
|
81
|
+
/** Receipt number for the charge */
|
|
82
|
+
receiptNumber?: Maybe<Scalars['String']['output']>
|
|
83
|
+
/** URL to the charge receipt */
|
|
84
|
+
receiptUrl?: Maybe<Scalars['String']['output']>
|
|
85
|
+
/** Whether the charge has been fully refunded */
|
|
86
|
+
refunded?: Maybe<Scalars['Boolean']['output']>
|
|
87
|
+
/** List of refunds for this charge */
|
|
88
|
+
refunds?: Maybe<Scalars['JSON']['output']>
|
|
89
|
+
/** Shipping information */
|
|
90
|
+
shipping?: Maybe<Scalars['JSON']['output']>
|
|
91
|
+
/** Legacy payment source information */
|
|
92
|
+
source?: Maybe<Scalars['JSON']['output']>
|
|
93
|
+
/** Text appearing on bank statement */
|
|
94
|
+
statementDescriptor?: Maybe<Scalars['String']['output']>
|
|
95
|
+
/** Suffix for statement descriptor */
|
|
96
|
+
statementDescriptorSuffix?: Maybe<Scalars['String']['output']>
|
|
97
|
+
/** Charge status (succeeded, pending, failed) */
|
|
98
|
+
status?: Maybe<Scalars['String']['output']>
|
|
99
|
+
/** Transfer group for grouping related transfers */
|
|
100
|
+
transferGroup?: Maybe<Scalars['String']['output']>
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** Stripe charge status */
|
|
104
|
+
export enum ChargeStatus {
|
|
105
|
+
/** Payment failed */
|
|
106
|
+
Failed = 'failed',
|
|
107
|
+
/** Payment is pending */
|
|
108
|
+
Pending = 'pending',
|
|
109
|
+
/** Payment succeeded */
|
|
110
|
+
Succeeded = 'succeeded',
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** Customer churn metrics for a specified time period. Churn rate = (subscriptions canceled during period / total at period start) * 100. Requires PRO or ENTERPRISE plan (advancedAnalytics feature). */
|
|
114
|
+
export type ChurnMetrics = {
|
|
115
|
+
__typename?: 'ChurnMetrics'
|
|
116
|
+
/** Number of subscriptions that churned in the period */
|
|
117
|
+
count?: Maybe<Scalars['Int']['output']>
|
|
118
|
+
/** The time period this metric covers */
|
|
119
|
+
period?: Maybe<Scalars['String']['output']>
|
|
120
|
+
/** Churn rate as percentage (churned / total at start * 100) */
|
|
121
|
+
rate?: Maybe<Scalars['Float']['output']>
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** A Stripe customer representing an end user or organization. Contains profile information, billing details, and computed analytics fields. All customer queries are automatically filtered by tenant for multi-tenant isolation. */
|
|
125
|
+
export type Customer = {
|
|
126
|
+
__typename?: 'Customer'
|
|
127
|
+
/** Customer billing address */
|
|
128
|
+
address?: Maybe<Scalars['JSON']['output']>
|
|
129
|
+
/** Current balance in cents (negative = credit) */
|
|
130
|
+
balance?: Maybe<Scalars['Int']['output']>
|
|
131
|
+
/** Predicted churn risk score (0-1). Requires PRO plan or higher. */
|
|
132
|
+
churnRisk?: Maybe<Scalars['Float']['output']>
|
|
133
|
+
/** Unix timestamp when customer was created */
|
|
134
|
+
created?: Maybe<Scalars['Int']['output']>
|
|
135
|
+
/** Default currency for the customer */
|
|
136
|
+
currency?: Maybe<Scalars['String']['output']>
|
|
137
|
+
/** Whether the customer has an unpaid invoice */
|
|
138
|
+
delinquent?: Maybe<Scalars['Boolean']['output']>
|
|
139
|
+
/** Internal description or notes */
|
|
140
|
+
description?: Maybe<Scalars['String']['output']>
|
|
141
|
+
/** Customer email address */
|
|
142
|
+
email?: Maybe<Scalars['String']['output']>
|
|
143
|
+
/** Stripe customer ID (cus_xxx) */
|
|
144
|
+
id?: Maybe<Scalars['ID']['output']>
|
|
145
|
+
/** Prefix for invoice numbers */
|
|
146
|
+
invoicePrefix?: Maybe<Scalars['String']['output']>
|
|
147
|
+
/** Default invoice settings */
|
|
148
|
+
invoiceSettings?: Maybe<Scalars['JSON']['output']>
|
|
149
|
+
/** All invoices for this customer */
|
|
150
|
+
invoices?: Maybe<Array<Invoice>>
|
|
151
|
+
/** Total amount paid across all invoices (in cents) */
|
|
152
|
+
lifetimeValue?: Maybe<Scalars['BigInt']['output']>
|
|
153
|
+
/** Arbitrary key-value metadata attached to the customer */
|
|
154
|
+
metadata?: Maybe<Scalars['JSON']['output']>
|
|
155
|
+
/** Customer display name */
|
|
156
|
+
name?: Maybe<Scalars['String']['output']>
|
|
157
|
+
/** Customer phone number */
|
|
158
|
+
phone?: Maybe<Scalars['String']['output']>
|
|
159
|
+
/** Customer shipping information */
|
|
160
|
+
shipping?: Maybe<Scalars['JSON']['output']>
|
|
161
|
+
/** All subscriptions for this customer */
|
|
162
|
+
subscriptions?: Maybe<Array<Subscription>>
|
|
163
|
+
/** Tax exemption status (none, exempt, reverse) */
|
|
164
|
+
taxExempt?: Maybe<Scalars['String']['output']>
|
|
165
|
+
/** Total amount from successful charges (in cents) */
|
|
166
|
+
totalSpend?: Maybe<Scalars['BigInt']['output']>
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** Stripe entity types that can be synchronized */
|
|
170
|
+
export enum EntityType {
|
|
171
|
+
Charge = 'CHARGE',
|
|
172
|
+
Customer = 'CUSTOMER',
|
|
173
|
+
Invoice = 'INVOICE',
|
|
174
|
+
PaymentIntent = 'PAYMENT_INTENT',
|
|
175
|
+
PaymentMethod = 'PAYMENT_METHOD',
|
|
176
|
+
Price = 'PRICE',
|
|
177
|
+
Product = 'PRODUCT',
|
|
178
|
+
Subscription = 'SUBSCRIPTION',
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** A Stripe invoice record */
|
|
182
|
+
export type Invoice = {
|
|
183
|
+
__typename?: 'Invoice'
|
|
184
|
+
/** Amount currently due in cents */
|
|
185
|
+
amountDue?: Maybe<Scalars['BigInt']['output']>
|
|
186
|
+
/** Amount already paid in cents */
|
|
187
|
+
amountPaid?: Maybe<Scalars['BigInt']['output']>
|
|
188
|
+
/** Amount remaining to be paid in cents */
|
|
189
|
+
amountRemaining?: Maybe<Scalars['BigInt']['output']>
|
|
190
|
+
/** Number of payment attempts made */
|
|
191
|
+
attemptCount?: Maybe<Scalars['Int']['output']>
|
|
192
|
+
/** Whether a payment attempt has been made */
|
|
193
|
+
attempted?: Maybe<Scalars['Boolean']['output']>
|
|
194
|
+
/** Reason for invoice creation (subscription_create, subscription_cycle, etc.) */
|
|
195
|
+
billingReason?: Maybe<Scalars['String']['output']>
|
|
196
|
+
/** How to collect payment (charge_automatically or send_invoice) */
|
|
197
|
+
collectionMethod?: Maybe<Scalars['String']['output']>
|
|
198
|
+
/** Unix timestamp when invoice was created */
|
|
199
|
+
created?: Maybe<Scalars['Int']['output']>
|
|
200
|
+
/** Three-letter ISO currency code */
|
|
201
|
+
currency?: Maybe<Scalars['String']['output']>
|
|
202
|
+
/** Custom fields on the invoice */
|
|
203
|
+
customFields?: Maybe<Scalars['JSON']['output']>
|
|
204
|
+
/** The customer this invoice belongs to */
|
|
205
|
+
customer?: Maybe<Customer>
|
|
206
|
+
/** Customer email at time of invoice */
|
|
207
|
+
customerEmail?: Maybe<Scalars['String']['output']>
|
|
208
|
+
/** Customer name at time of invoice */
|
|
209
|
+
customerName?: Maybe<Scalars['String']['output']>
|
|
210
|
+
/** Customer phone at time of invoice */
|
|
211
|
+
customerPhone?: Maybe<Scalars['String']['output']>
|
|
212
|
+
/** Default tax rates applied */
|
|
213
|
+
defaultTaxRates?: Maybe<Scalars['JSON']['output']>
|
|
214
|
+
/** Invoice description */
|
|
215
|
+
description?: Maybe<Scalars['String']['output']>
|
|
216
|
+
/** Applied discount information */
|
|
217
|
+
discount?: Maybe<Scalars['JSON']['output']>
|
|
218
|
+
/** Applied discounts list */
|
|
219
|
+
discounts?: Maybe<Scalars['JSON']['output']>
|
|
220
|
+
/** Unix timestamp when invoice is due */
|
|
221
|
+
dueDate?: Maybe<Scalars['Int']['output']>
|
|
222
|
+
/** Invoice footer text */
|
|
223
|
+
footer?: Maybe<Scalars['String']['output']>
|
|
224
|
+
/** URL to view invoice in browser */
|
|
225
|
+
hostedInvoiceUrl?: Maybe<Scalars['String']['output']>
|
|
226
|
+
/** Stripe invoice ID (in_xxx) */
|
|
227
|
+
id?: Maybe<Scalars['ID']['output']>
|
|
228
|
+
/** URL to download invoice PDF */
|
|
229
|
+
invoicePdf?: Maybe<Scalars['String']['output']>
|
|
230
|
+
/** Invoice line items */
|
|
231
|
+
lines?: Maybe<Scalars['JSON']['output']>
|
|
232
|
+
/** Arbitrary key-value metadata */
|
|
233
|
+
metadata?: Maybe<Scalars['JSON']['output']>
|
|
234
|
+
/** Unix timestamp of next payment attempt */
|
|
235
|
+
nextPaymentAttempt?: Maybe<Scalars['Int']['output']>
|
|
236
|
+
/** Human-readable invoice number */
|
|
237
|
+
number?: Maybe<Scalars['String']['output']>
|
|
238
|
+
/** Whether the invoice has been paid */
|
|
239
|
+
paid?: Maybe<Scalars['Boolean']['output']>
|
|
240
|
+
/** Payment settings configuration */
|
|
241
|
+
paymentSettings?: Maybe<Scalars['JSON']['output']>
|
|
242
|
+
/** Unix timestamp of billing period end */
|
|
243
|
+
periodEnd?: Maybe<Scalars['Int']['output']>
|
|
244
|
+
/** Unix timestamp of billing period start */
|
|
245
|
+
periodStart?: Maybe<Scalars['Int']['output']>
|
|
246
|
+
/** Text appearing on bank statement */
|
|
247
|
+
statementDescriptor?: Maybe<Scalars['String']['output']>
|
|
248
|
+
/** Current invoice status */
|
|
249
|
+
status?: Maybe<InvoiceStatus>
|
|
250
|
+
/** Timestamps of status transitions */
|
|
251
|
+
statusTransitions?: Maybe<Scalars['JSON']['output']>
|
|
252
|
+
/** The subscription that generated this invoice */
|
|
253
|
+
subscription?: Maybe<Subscription>
|
|
254
|
+
/** Subtotal before tax and discounts in cents */
|
|
255
|
+
subtotal?: Maybe<Scalars['Int']['output']>
|
|
256
|
+
/** Total tax amount in cents */
|
|
257
|
+
tax?: Maybe<Scalars['Int']['output']>
|
|
258
|
+
/** Total invoice amount in cents */
|
|
259
|
+
total?: Maybe<Scalars['BigInt']['output']>
|
|
260
|
+
/** Total discount amounts breakdown */
|
|
261
|
+
totalDiscountAmounts?: Maybe<Scalars['JSON']['output']>
|
|
262
|
+
/** Tax amounts breakdown */
|
|
263
|
+
totalTaxAmounts?: Maybe<Scalars['JSON']['output']>
|
|
264
|
+
/** Unix timestamp when webhooks were delivered */
|
|
265
|
+
webhooksDeliveredAt?: Maybe<Scalars['Int']['output']>
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/** Stripe invoice status */
|
|
269
|
+
export enum InvoiceStatus {
|
|
270
|
+
Deleted = 'deleted',
|
|
271
|
+
Draft = 'draft',
|
|
272
|
+
Open = 'open',
|
|
273
|
+
Paid = 'paid',
|
|
274
|
+
Uncollectible = 'uncollectible',
|
|
275
|
+
Void = 'void',
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/** Monthly Recurring Revenue (MRR) metrics and growth analysis. Compares current MRR to previous period (30 days ago) for growth calculations. Requires PRO or ENTERPRISE plan (advancedAnalytics feature). */
|
|
279
|
+
export type MrrMetrics = {
|
|
280
|
+
__typename?: 'MRRMetrics'
|
|
281
|
+
/** MRR lost from churned subscriptions this period in cents */
|
|
282
|
+
churnedMrr?: Maybe<Scalars['BigInt']['output']>
|
|
283
|
+
/** MRR lost from subscription downgrades this period in cents */
|
|
284
|
+
contractionMrr?: Maybe<Scalars['BigInt']['output']>
|
|
285
|
+
/** Current MRR in cents */
|
|
286
|
+
current?: Maybe<Scalars['BigInt']['output']>
|
|
287
|
+
/** MRR gained from subscription upgrades this period in cents */
|
|
288
|
+
expansionMrr?: Maybe<Scalars['BigInt']['output']>
|
|
289
|
+
/** MRR growth (current - previous) in cents */
|
|
290
|
+
growth?: Maybe<Scalars['BigInt']['output']>
|
|
291
|
+
/** MRR growth rate as percentage (growth / previous * 100) */
|
|
292
|
+
growthRate?: Maybe<Scalars['Float']['output']>
|
|
293
|
+
/** MRR from new subscriptions this period in cents */
|
|
294
|
+
newMrr?: Maybe<Scalars['BigInt']['output']>
|
|
295
|
+
/** Previous period MRR in cents (30 days ago) */
|
|
296
|
+
previous?: Maybe<Scalars['BigInt']['output']>
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/** Root mutation type */
|
|
300
|
+
export type Mutation = {
|
|
301
|
+
__typename?: 'Mutation'
|
|
302
|
+
/** No-op mutation for schema validation */
|
|
303
|
+
_noop?: Maybe<Scalars['Boolean']['output']>
|
|
304
|
+
/** Queue a job to synchronize a single Stripe entity by ID */
|
|
305
|
+
syncSingleEntity?: Maybe<SyncResult>
|
|
306
|
+
/** Queue a sync job to synchronize Stripe data */
|
|
307
|
+
triggerSync?: Maybe<SyncResult>
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/** Root mutation type */
|
|
311
|
+
export type MutationSyncSingleEntityArgs = {
|
|
312
|
+
stripeId: Scalars['String']['input']
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/** Root mutation type */
|
|
316
|
+
export type MutationTriggerSyncArgs = {
|
|
317
|
+
entityType?: InputMaybe<EntityType>
|
|
318
|
+
fullSync?: InputMaybe<Scalars['Boolean']['input']>
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export type PageInfo = {
|
|
322
|
+
__typename?: 'PageInfo'
|
|
323
|
+
endCursor?: Maybe<Scalars['String']['output']>
|
|
324
|
+
hasNextPage: Scalars['Boolean']['output']
|
|
325
|
+
hasPreviousPage: Scalars['Boolean']['output']
|
|
326
|
+
startCursor?: Maybe<Scalars['String']['output']>
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/** Time period for analytics calculations */
|
|
330
|
+
export enum Period {
|
|
331
|
+
Day = 'DAY',
|
|
332
|
+
Month = 'MONTH',
|
|
333
|
+
Quarter = 'QUARTER',
|
|
334
|
+
Week = 'WEEK',
|
|
335
|
+
Year = 'YEAR',
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/** A Stripe price record */
|
|
339
|
+
export type Price = {
|
|
340
|
+
__typename?: 'Price'
|
|
341
|
+
/** Whether the price is currently available */
|
|
342
|
+
active?: Maybe<Scalars['Boolean']['output']>
|
|
343
|
+
/** How to calculate the price (per_unit, tiered) */
|
|
344
|
+
billingScheme?: Maybe<Scalars['String']['output']>
|
|
345
|
+
/** Unix timestamp when price was created */
|
|
346
|
+
created?: Maybe<Scalars['Int']['output']>
|
|
347
|
+
/** Three-letter ISO currency code */
|
|
348
|
+
currency?: Maybe<Scalars['String']['output']>
|
|
349
|
+
/** Stripe price ID (price_xxx) */
|
|
350
|
+
id?: Maybe<Scalars['ID']['output']>
|
|
351
|
+
/** Whether this is a live mode price */
|
|
352
|
+
livemode?: Maybe<Scalars['Boolean']['output']>
|
|
353
|
+
/** Lookup key for programmatic access */
|
|
354
|
+
lookupKey?: Maybe<Scalars['String']['output']>
|
|
355
|
+
/** Arbitrary key-value metadata */
|
|
356
|
+
metadata?: Maybe<Scalars['JSON']['output']>
|
|
357
|
+
/** Human-friendly price name */
|
|
358
|
+
nickname?: Maybe<Scalars['String']['output']>
|
|
359
|
+
/** The product this price is for */
|
|
360
|
+
product?: Maybe<Product>
|
|
361
|
+
/** Recurring billing configuration (interval, interval_count, etc.) */
|
|
362
|
+
recurring?: Maybe<Scalars['JSON']['output']>
|
|
363
|
+
/** Tiered pricing mode (graduated or volume) */
|
|
364
|
+
tiersMode?: Maybe<PricingTiers>
|
|
365
|
+
/** Transform quantity configuration */
|
|
366
|
+
transformQuantity?: Maybe<Scalars['JSON']['output']>
|
|
367
|
+
/** Price type (one_time or recurring) */
|
|
368
|
+
type?: Maybe<PricingType>
|
|
369
|
+
/** Price amount in cents */
|
|
370
|
+
unitAmount?: Maybe<Scalars['Int']['output']>
|
|
371
|
+
/** Price amount with decimal precision */
|
|
372
|
+
unitAmountDecimal?: Maybe<Scalars['String']['output']>
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/** Subscription pricing tiers */
|
|
376
|
+
export enum PricingPlan {
|
|
377
|
+
Enterprise = 'ENTERPRISE',
|
|
378
|
+
Free = 'FREE',
|
|
379
|
+
Pro = 'PRO',
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/** Pricing tier mode (graduated or volume) */
|
|
383
|
+
export enum PricingTiers {
|
|
384
|
+
Graduated = 'graduated',
|
|
385
|
+
Volume = 'volume',
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/** Price type (one_time or recurring) */
|
|
389
|
+
export enum PricingType {
|
|
390
|
+
OneTime = 'one_time',
|
|
391
|
+
Recurring = 'recurring',
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/** A Stripe product record */
|
|
395
|
+
export type Product = {
|
|
396
|
+
__typename?: 'Product'
|
|
397
|
+
/** Whether the product is currently available */
|
|
398
|
+
active?: Maybe<Scalars['Boolean']['output']>
|
|
399
|
+
/** Unix timestamp when product was created */
|
|
400
|
+
created?: Maybe<Scalars['Int']['output']>
|
|
401
|
+
/** Default price ID for this product */
|
|
402
|
+
defaultPrice?: Maybe<Scalars['String']['output']>
|
|
403
|
+
/** Product description */
|
|
404
|
+
description?: Maybe<Scalars['String']['output']>
|
|
405
|
+
/** Stripe product ID (prod_xxx) */
|
|
406
|
+
id?: Maybe<Scalars['ID']['output']>
|
|
407
|
+
/** Array of product image URLs */
|
|
408
|
+
images?: Maybe<Scalars['JSON']['output']>
|
|
409
|
+
/** Whether this is a live mode product */
|
|
410
|
+
livemode?: Maybe<Scalars['Boolean']['output']>
|
|
411
|
+
/** Marketing features for the product */
|
|
412
|
+
marketingFeatures?: Maybe<Scalars['JSON']['output']>
|
|
413
|
+
/** Arbitrary key-value metadata */
|
|
414
|
+
metadata?: Maybe<Scalars['JSON']['output']>
|
|
415
|
+
/** Product name */
|
|
416
|
+
name?: Maybe<Scalars['String']['output']>
|
|
417
|
+
/** Package dimensions for shippable products */
|
|
418
|
+
packageDimensions?: Maybe<Scalars['JSON']['output']>
|
|
419
|
+
/** All prices for this product */
|
|
420
|
+
prices?: Maybe<Array<Price>>
|
|
421
|
+
/** Whether the product is shippable */
|
|
422
|
+
shippable?: Maybe<Scalars['Boolean']['output']>
|
|
423
|
+
/** Extra information for statements */
|
|
424
|
+
statementDescriptor?: Maybe<Scalars['String']['output']>
|
|
425
|
+
/** Label for the unit of the product (e.g., "seat", "user") */
|
|
426
|
+
unitLabel?: Maybe<Scalars['String']['output']>
|
|
427
|
+
/** URL of the product */
|
|
428
|
+
url?: Maybe<Scalars['String']['output']>
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/** Root query type */
|
|
432
|
+
export type Query = {
|
|
433
|
+
__typename?: 'Query'
|
|
434
|
+
/** API version */
|
|
435
|
+
_version?: Maybe<Scalars['String']['output']>
|
|
436
|
+
/** Fetch a single charge by ID */
|
|
437
|
+
charge?: Maybe<Charge>
|
|
438
|
+
/** List charges with pagination */
|
|
439
|
+
charges?: Maybe<QueryChargesConnection>
|
|
440
|
+
/** Get customer churn metrics for a time period */
|
|
441
|
+
churnRate?: Maybe<ChurnMetrics>
|
|
442
|
+
/** Fetch a single customer by ID */
|
|
443
|
+
customer?: Maybe<Customer>
|
|
444
|
+
/** List customers with pagination */
|
|
445
|
+
customers?: Maybe<QueryCustomersConnection>
|
|
446
|
+
/** Fetch a single invoice by ID */
|
|
447
|
+
invoice?: Maybe<Invoice>
|
|
448
|
+
/** List invoices with pagination */
|
|
449
|
+
invoices?: Maybe<QueryInvoicesConnection>
|
|
450
|
+
/** Get Monthly Recurring Revenue metrics for the tenant */
|
|
451
|
+
mrrMetrics?: Maybe<MrrMetrics>
|
|
452
|
+
/** Fetch a single price by ID */
|
|
453
|
+
price?: Maybe<Price>
|
|
454
|
+
/** List prices with pagination */
|
|
455
|
+
prices?: Maybe<QueryPricesConnection>
|
|
456
|
+
/** Fetch a single product by ID */
|
|
457
|
+
product?: Maybe<Product>
|
|
458
|
+
/** List products with pagination */
|
|
459
|
+
products?: Maybe<QueryProductsConnection>
|
|
460
|
+
/** Fetch a single subscription by ID */
|
|
461
|
+
subscription?: Maybe<Subscription>
|
|
462
|
+
/** List subscriptions with pagination */
|
|
463
|
+
subscriptions?: Maybe<QuerySubscriptionsConnection>
|
|
464
|
+
/** Get tenant usage statistics for the current billing period */
|
|
465
|
+
tenantUsage?: Maybe<TenantUsage>
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/** Root query type */
|
|
469
|
+
export type QueryChargeArgs = {
|
|
470
|
+
id: Scalars['String']['input']
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/** Root query type */
|
|
474
|
+
export type QueryChargesArgs = {
|
|
475
|
+
after?: InputMaybe<Scalars['String']['input']>
|
|
476
|
+
before?: InputMaybe<Scalars['String']['input']>
|
|
477
|
+
customerId?: InputMaybe<Scalars['String']['input']>
|
|
478
|
+
first?: InputMaybe<Scalars['Int']['input']>
|
|
479
|
+
last?: InputMaybe<Scalars['Int']['input']>
|
|
480
|
+
paid?: InputMaybe<Scalars['Boolean']['input']>
|
|
481
|
+
status?: InputMaybe<Scalars['String']['input']>
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/** Root query type */
|
|
485
|
+
export type QueryChurnRateArgs = {
|
|
486
|
+
period: Period
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/** Root query type */
|
|
490
|
+
export type QueryCustomerArgs = {
|
|
491
|
+
id: Scalars['String']['input']
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/** Root query type */
|
|
495
|
+
export type QueryCustomersArgs = {
|
|
496
|
+
after?: InputMaybe<Scalars['String']['input']>
|
|
497
|
+
before?: InputMaybe<Scalars['String']['input']>
|
|
498
|
+
delinquent?: InputMaybe<Scalars['Boolean']['input']>
|
|
499
|
+
email?: InputMaybe<Scalars['String']['input']>
|
|
500
|
+
first?: InputMaybe<Scalars['Int']['input']>
|
|
501
|
+
last?: InputMaybe<Scalars['Int']['input']>
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/** Root query type */
|
|
505
|
+
export type QueryInvoiceArgs = {
|
|
506
|
+
id: Scalars['String']['input']
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/** Root query type */
|
|
510
|
+
export type QueryInvoicesArgs = {
|
|
511
|
+
after?: InputMaybe<Scalars['String']['input']>
|
|
512
|
+
before?: InputMaybe<Scalars['String']['input']>
|
|
513
|
+
customerId?: InputMaybe<Scalars['String']['input']>
|
|
514
|
+
first?: InputMaybe<Scalars['Int']['input']>
|
|
515
|
+
last?: InputMaybe<Scalars['Int']['input']>
|
|
516
|
+
status?: InputMaybe<InvoiceStatus>
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/** Root query type */
|
|
520
|
+
export type QueryPriceArgs = {
|
|
521
|
+
id: Scalars['String']['input']
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/** Root query type */
|
|
525
|
+
export type QueryPricesArgs = {
|
|
526
|
+
active?: InputMaybe<Scalars['Boolean']['input']>
|
|
527
|
+
after?: InputMaybe<Scalars['String']['input']>
|
|
528
|
+
before?: InputMaybe<Scalars['String']['input']>
|
|
529
|
+
first?: InputMaybe<Scalars['Int']['input']>
|
|
530
|
+
last?: InputMaybe<Scalars['Int']['input']>
|
|
531
|
+
productId?: InputMaybe<Scalars['String']['input']>
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/** Root query type */
|
|
535
|
+
export type QueryProductArgs = {
|
|
536
|
+
id: Scalars['String']['input']
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/** Root query type */
|
|
540
|
+
export type QueryProductsArgs = {
|
|
541
|
+
active?: InputMaybe<Scalars['Boolean']['input']>
|
|
542
|
+
after?: InputMaybe<Scalars['String']['input']>
|
|
543
|
+
before?: InputMaybe<Scalars['String']['input']>
|
|
544
|
+
first?: InputMaybe<Scalars['Int']['input']>
|
|
545
|
+
last?: InputMaybe<Scalars['Int']['input']>
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/** Root query type */
|
|
549
|
+
export type QuerySubscriptionArgs = {
|
|
550
|
+
id: Scalars['String']['input']
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/** Root query type */
|
|
554
|
+
export type QuerySubscriptionsArgs = {
|
|
555
|
+
after?: InputMaybe<Scalars['String']['input']>
|
|
556
|
+
before?: InputMaybe<Scalars['String']['input']>
|
|
557
|
+
customerId?: InputMaybe<Scalars['String']['input']>
|
|
558
|
+
first?: InputMaybe<Scalars['Int']['input']>
|
|
559
|
+
last?: InputMaybe<Scalars['Int']['input']>
|
|
560
|
+
status?: InputMaybe<SubscriptionStatus>
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export type QueryChargesConnection = {
|
|
564
|
+
__typename?: 'QueryChargesConnection'
|
|
565
|
+
edges?: Maybe<Array<Maybe<QueryChargesConnectionEdge>>>
|
|
566
|
+
pageInfo: PageInfo
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export type QueryChargesConnectionEdge = {
|
|
570
|
+
__typename?: 'QueryChargesConnectionEdge'
|
|
571
|
+
cursor: Scalars['String']['output']
|
|
572
|
+
node?: Maybe<Charge>
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
export type QueryCustomersConnection = {
|
|
576
|
+
__typename?: 'QueryCustomersConnection'
|
|
577
|
+
edges?: Maybe<Array<Maybe<QueryCustomersConnectionEdge>>>
|
|
578
|
+
pageInfo: PageInfo
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export type QueryCustomersConnectionEdge = {
|
|
582
|
+
__typename?: 'QueryCustomersConnectionEdge'
|
|
583
|
+
cursor: Scalars['String']['output']
|
|
584
|
+
node?: Maybe<Customer>
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
export type QueryInvoicesConnection = {
|
|
588
|
+
__typename?: 'QueryInvoicesConnection'
|
|
589
|
+
edges?: Maybe<Array<Maybe<QueryInvoicesConnectionEdge>>>
|
|
590
|
+
pageInfo: PageInfo
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
export type QueryInvoicesConnectionEdge = {
|
|
594
|
+
__typename?: 'QueryInvoicesConnectionEdge'
|
|
595
|
+
cursor: Scalars['String']['output']
|
|
596
|
+
node?: Maybe<Invoice>
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
export type QueryPricesConnection = {
|
|
600
|
+
__typename?: 'QueryPricesConnection'
|
|
601
|
+
edges?: Maybe<Array<Maybe<QueryPricesConnectionEdge>>>
|
|
602
|
+
pageInfo: PageInfo
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
export type QueryPricesConnectionEdge = {
|
|
606
|
+
__typename?: 'QueryPricesConnectionEdge'
|
|
607
|
+
cursor: Scalars['String']['output']
|
|
608
|
+
node?: Maybe<Price>
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export type QueryProductsConnection = {
|
|
612
|
+
__typename?: 'QueryProductsConnection'
|
|
613
|
+
edges?: Maybe<Array<Maybe<QueryProductsConnectionEdge>>>
|
|
614
|
+
pageInfo: PageInfo
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
export type QueryProductsConnectionEdge = {
|
|
618
|
+
__typename?: 'QueryProductsConnectionEdge'
|
|
619
|
+
cursor: Scalars['String']['output']
|
|
620
|
+
node?: Maybe<Product>
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
export type QuerySubscriptionsConnection = {
|
|
624
|
+
__typename?: 'QuerySubscriptionsConnection'
|
|
625
|
+
edges?: Maybe<Array<Maybe<QuerySubscriptionsConnectionEdge>>>
|
|
626
|
+
pageInfo: PageInfo
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
export type QuerySubscriptionsConnectionEdge = {
|
|
630
|
+
__typename?: 'QuerySubscriptionsConnectionEdge'
|
|
631
|
+
cursor: Scalars['String']['output']
|
|
632
|
+
node?: Maybe<Subscription>
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
/** A Stripe subscription representing recurring billing for a customer. Includes status tracking, billing periods, cancellation handling, and computed MRR. All subscription queries are automatically filtered by tenant for multi-tenant isolation. */
|
|
636
|
+
export type Subscription = {
|
|
637
|
+
__typename?: 'Subscription'
|
|
638
|
+
/** Unix timestamp for billing cycle anchor */
|
|
639
|
+
billingCycleAnchor?: Maybe<Scalars['Int']['output']>
|
|
640
|
+
/** Unix timestamp when subscription will cancel */
|
|
641
|
+
cancelAt?: Maybe<Scalars['Int']['output']>
|
|
642
|
+
/** Whether subscription will cancel at period end */
|
|
643
|
+
cancelAtPeriodEnd?: Maybe<Scalars['Boolean']['output']>
|
|
644
|
+
/** Unix timestamp when subscription was canceled */
|
|
645
|
+
canceledAt?: Maybe<Scalars['Int']['output']>
|
|
646
|
+
/** How to collect payments (charge_automatically or send_invoice) */
|
|
647
|
+
collectionMethod?: Maybe<Scalars['String']['output']>
|
|
648
|
+
/** Unix timestamp when subscription was created */
|
|
649
|
+
created?: Maybe<Scalars['Int']['output']>
|
|
650
|
+
/** Unix timestamp of current period end */
|
|
651
|
+
currentPeriodEnd?: Maybe<Scalars['Int']['output']>
|
|
652
|
+
/** Unix timestamp of current period start */
|
|
653
|
+
currentPeriodStart?: Maybe<Scalars['Int']['output']>
|
|
654
|
+
/** The customer who owns this subscription */
|
|
655
|
+
customer?: Maybe<Customer>
|
|
656
|
+
/** Days until invoice is due (for send_invoice method) */
|
|
657
|
+
daysUntilDue?: Maybe<Scalars['Int']['output']>
|
|
658
|
+
/** Applied discount information */
|
|
659
|
+
discount?: Maybe<Scalars['JSON']['output']>
|
|
660
|
+
/** Unix timestamp when subscription ended */
|
|
661
|
+
endedAt?: Maybe<Scalars['Int']['output']>
|
|
662
|
+
/** Stripe subscription ID (sub_xxx) */
|
|
663
|
+
id?: Maybe<Scalars['ID']['output']>
|
|
664
|
+
/** Invoices generated by this subscription */
|
|
665
|
+
invoices?: Maybe<Array<Invoice>>
|
|
666
|
+
/** Subscription items from Stripe (embedded) */
|
|
667
|
+
items?: Maybe<Scalars['JSON']['output']>
|
|
668
|
+
/** Arbitrary key-value metadata */
|
|
669
|
+
metadata?: Maybe<Scalars['JSON']['output']>
|
|
670
|
+
/** Monthly Recurring Revenue in cents. Calculated by normalizing all subscription item prices to monthly amounts. Returns null for non-active subscriptions. Handles daily, weekly, monthly, and yearly billing intervals. */
|
|
671
|
+
mrr?: Maybe<Scalars['BigInt']['output']>
|
|
672
|
+
/** Pause collection settings */
|
|
673
|
+
pauseCollection?: Maybe<Scalars['JSON']['output']>
|
|
674
|
+
/** Unix timestamp when subscription started */
|
|
675
|
+
startDate?: Maybe<Scalars['Int']['output']>
|
|
676
|
+
/** Current subscription status */
|
|
677
|
+
status?: Maybe<SubscriptionStatus>
|
|
678
|
+
/** Line items in this subscription */
|
|
679
|
+
subscriptionItems?: Maybe<Array<SubscriptionItem>>
|
|
680
|
+
/** Unix timestamp when trial ends/ended */
|
|
681
|
+
trialEnd?: Maybe<Scalars['Int']['output']>
|
|
682
|
+
/** Unix timestamp when trial started */
|
|
683
|
+
trialStart?: Maybe<Scalars['Int']['output']>
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/** A line item within a Stripe subscription. Represents a specific product/price combination with quantity. */
|
|
687
|
+
export type SubscriptionItem = {
|
|
688
|
+
__typename?: 'SubscriptionItem'
|
|
689
|
+
/** Billing threshold configuration */
|
|
690
|
+
billingThresholds?: Maybe<Scalars['JSON']['output']>
|
|
691
|
+
/** Unix timestamp when item was created */
|
|
692
|
+
created?: Maybe<Scalars['Int']['output']>
|
|
693
|
+
/** Whether the item has been deleted */
|
|
694
|
+
deleted?: Maybe<Scalars['Boolean']['output']>
|
|
695
|
+
/** Stripe subscription item ID (si_xxx) */
|
|
696
|
+
id?: Maybe<Scalars['ID']['output']>
|
|
697
|
+
/** Arbitrary key-value metadata */
|
|
698
|
+
metadata?: Maybe<Scalars['JSON']['output']>
|
|
699
|
+
/** The price for this subscription item */
|
|
700
|
+
price?: Maybe<Price>
|
|
701
|
+
/** Number of units of this item */
|
|
702
|
+
quantity?: Maybe<Scalars['Int']['output']>
|
|
703
|
+
/** The subscription this item belongs to */
|
|
704
|
+
subscription?: Maybe<Subscription>
|
|
705
|
+
/** Tax rates applied to this item */
|
|
706
|
+
taxRates?: Maybe<Scalars['JSON']['output']>
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/** Stripe subscription status */
|
|
710
|
+
export enum SubscriptionStatus {
|
|
711
|
+
Active = 'active',
|
|
712
|
+
Canceled = 'canceled',
|
|
713
|
+
Incomplete = 'incomplete',
|
|
714
|
+
IncompleteExpired = 'incomplete_expired',
|
|
715
|
+
PastDue = 'past_due',
|
|
716
|
+
Trialing = 'trialing',
|
|
717
|
+
Unpaid = 'unpaid',
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
/** Result of a sync mutation operation. Contains the job ID for tracking and status information. Check jobId to monitor sync progress via job queue. */
|
|
721
|
+
export type SyncResult = {
|
|
722
|
+
__typename?: 'SyncResult'
|
|
723
|
+
/** Number of entities queued for synchronization */
|
|
724
|
+
entitiesQueued?: Maybe<Scalars['Int']['output']>
|
|
725
|
+
/** Unique identifier for the queued job */
|
|
726
|
+
jobId?: Maybe<Scalars['String']['output']>
|
|
727
|
+
/** Human-readable status message */
|
|
728
|
+
message?: Maybe<Scalars['String']['output']>
|
|
729
|
+
/** Whether the sync job was queued successfully */
|
|
730
|
+
success?: Maybe<Scalars['Boolean']['output']>
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/** Tenant API and webhook usage statistics for the current billing period. Tracks webhook events processed and API calls made. Available on all plans. */
|
|
734
|
+
export type TenantUsage = {
|
|
735
|
+
__typename?: 'TenantUsage'
|
|
736
|
+
/** Number of API calls made this billing period */
|
|
737
|
+
apiCallsThisPeriod?: Maybe<Scalars['BigInt']['output']>
|
|
738
|
+
/** End of current billing period (ISO 8601) */
|
|
739
|
+
periodEnd?: Maybe<Scalars['String']['output']>
|
|
740
|
+
/** Start of current billing period (ISO 8601) */
|
|
741
|
+
periodStart?: Maybe<Scalars['String']['output']>
|
|
742
|
+
/** Number of webhook events processed this billing period */
|
|
743
|
+
webhookEventsThisPeriod?: Maybe<Scalars['BigInt']['output']>
|
|
744
|
+
}
|