@useairfoil/producer-stripe 0.0.2 → 0.0.3
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.txt +201 -0
- package/dist/index.d.mts +26 -26
- package/dist/index.mjs +1 -1
- package/dist/main.mjs +6 -4
- package/dist/main.mjs.map +1 -1
- package/dist/{src-DXjXItdQ.mjs → src-DXKdOBgM.mjs} +210 -217
- package/dist/src-DXKdOBgM.mjs.map +1 -0
- package/package.json +18 -18
- package/src/create-table.ts +6 -1
- package/src/main.ts +8 -2
- package/src/schemas/charges.ts +98 -44
- package/src/schemas/customers.ts +47 -21
- package/src/schemas/invoices.ts +86 -44
- package/src/schemas/prices.ts +48 -24
- package/src/schemas/products.ts +37 -17
- package/src/schemas/refunds.ts +30 -16
- package/src/schemas/shared.ts +33 -26
- package/src/schemas/subscriptions.ts +96 -42
- package/src/start.ts +2 -2
- package/dist/src-DXjXItdQ.mjs.map +0 -1
|
@@ -91,7 +91,6 @@ const layer$1 = (config) => Layer.effect(StripeClient)(make$1(config)).pipe(Laye
|
|
|
91
91
|
const layerConfig$1 = (config) => Layer.effect(StripeClient)(Config.unwrap(config).pipe(Effect.flatMap(make$1))).pipe(Layer.provide(RateLimiterLive));
|
|
92
92
|
//#endregion
|
|
93
93
|
//#region src/schemas/shared.ts
|
|
94
|
-
const field = (fieldId, description) => Iceberg.field(fieldId, { description });
|
|
95
94
|
const UnixTime = Schema.Int.pipe(Schema.decodeTo(Schema.Date, SchemaTransformation.transform({
|
|
96
95
|
decode: (seconds) => /* @__PURE__ */ new Date(seconds * 1e3),
|
|
97
96
|
encode: (date) => Math.floor(date.getTime() / 1e3)
|
|
@@ -100,81 +99,75 @@ const Long = Schema.Int.pipe(Schema.decodeTo(Schema.BigInt, SchemaTransformation
|
|
|
100
99
|
decode: (value) => BigInt(value),
|
|
101
100
|
encode: (value) => Number(value)
|
|
102
101
|
})));
|
|
103
|
-
const Metadata = Schema.NullOr(Schema.Record(Schema.String, Schema.String)).pipe(Schema.decodeTo(Schema.ReadonlyMap(Schema.String.annotate({
|
|
104
|
-
fieldId: 200,
|
|
105
|
-
description: "Metadata key."
|
|
106
|
-
}), Schema.String.annotate({
|
|
107
|
-
fieldId: 201,
|
|
108
|
-
description: "Metadata value."
|
|
109
|
-
})), SchemaTransformation.transform({
|
|
102
|
+
const Metadata = Schema.NullOr(Schema.Record(Schema.String, Schema.String)).pipe(Schema.decodeTo(Schema.ReadonlyMap(Schema.String.annotate({ description: "Metadata key." }), Schema.String.annotate({ description: "Metadata value." })), SchemaTransformation.transform({
|
|
110
103
|
decode: (record) => new Map(Object.entries(record ?? {})),
|
|
111
104
|
encode: (map) => Object.fromEntries(map)
|
|
112
105
|
})));
|
|
113
|
-
const address =
|
|
114
|
-
line1: Schema.NullOr(Schema.String).pipe(
|
|
115
|
-
line2: Schema.NullOr(Schema.String).pipe(
|
|
116
|
-
city: Schema.NullOr(Schema.String).pipe(
|
|
117
|
-
state: Schema.NullOr(Schema.String).pipe(
|
|
118
|
-
postal_code: Schema.NullOr(Schema.String).pipe(
|
|
119
|
-
country: Schema.NullOr(Schema.String).pipe(
|
|
106
|
+
const address = Schema.Struct({
|
|
107
|
+
line1: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "First address line." })),
|
|
108
|
+
line2: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Second address line." })),
|
|
109
|
+
city: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "City." })),
|
|
110
|
+
state: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "State, county, or region." })),
|
|
111
|
+
postal_code: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Postal code." })),
|
|
112
|
+
country: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Two-letter country code." }))
|
|
120
113
|
});
|
|
121
|
-
const shipping =
|
|
122
|
-
name: Schema.String.pipe(
|
|
123
|
-
phone: Schema.NullOr(Schema.String).pipe(
|
|
124
|
-
address: address
|
|
114
|
+
const shipping = Schema.Struct({
|
|
115
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Recipient name." })),
|
|
116
|
+
phone: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Recipient phone number." })),
|
|
117
|
+
address: address.pipe(Schema.annotateKey({ description: "Shipping address." }))
|
|
125
118
|
});
|
|
126
|
-
const version =
|
|
127
|
-
const deleted =
|
|
119
|
+
const version = Schema.Date.pipe(Schema.annotateKey({ description: "Time the row was fetched from Stripe." }));
|
|
120
|
+
const deleted = Schema.optional(Schema.Boolean).pipe(Schema.annotateKey({ description: "Whether the object was deleted in Stripe." }));
|
|
128
121
|
//#endregion
|
|
129
122
|
//#region src/schemas/charges.ts
|
|
130
123
|
const ChargeSchema = Schema.Struct({
|
|
131
|
-
id: Schema.String.pipe(
|
|
132
|
-
version
|
|
133
|
-
created: UnixTime.pipe(
|
|
134
|
-
livemode: Schema.Boolean.pipe(
|
|
135
|
-
amount: Long.pipe(
|
|
136
|
-
amount_captured: Long.pipe(
|
|
137
|
-
amount_refunded: Long.pipe(
|
|
138
|
-
currency: Schema.String.pipe(
|
|
139
|
-
status: Schema.String.pipe(
|
|
140
|
-
paid: Schema.Boolean.pipe(
|
|
141
|
-
captured: Schema.Boolean.pipe(
|
|
142
|
-
refunded: Schema.Boolean.pipe(
|
|
143
|
-
disputed: Schema.Boolean.pipe(
|
|
144
|
-
customer: Schema.NullOr(Schema.String).pipe(
|
|
145
|
-
payment_intent: Schema.NullOr(Schema.String).pipe(
|
|
146
|
-
payment_method: Schema.NullOr(Schema.String).pipe(
|
|
147
|
-
balance_transaction: Schema.NullOr(Schema.String).pipe(
|
|
148
|
-
description: Schema.NullOr(Schema.String).pipe(
|
|
149
|
-
failure_code: Schema.NullOr(Schema.String).pipe(
|
|
150
|
-
failure_message: Schema.NullOr(Schema.String).pipe(
|
|
124
|
+
id: Schema.String.pipe(Schema.annotateKey({ description: "Unique charge identifier." })),
|
|
125
|
+
version,
|
|
126
|
+
created: UnixTime.pipe(Schema.annotateKey({ description: "Time when the charge was created." })),
|
|
127
|
+
livemode: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the charge exists in live mode." })),
|
|
128
|
+
amount: Long.pipe(Schema.annotateKey({ description: "Amount to collect, in the smallest currency unit." })),
|
|
129
|
+
amount_captured: Long.pipe(Schema.annotateKey({ description: "Amount captured." })),
|
|
130
|
+
amount_refunded: Long.pipe(Schema.annotateKey({ description: "Amount refunded." })),
|
|
131
|
+
currency: Schema.String.pipe(Schema.annotateKey({ description: "Three-letter currency code, in lowercase." })),
|
|
132
|
+
status: Schema.String.pipe(Schema.annotateKey({ description: "Status: succeeded, pending, or failed." })),
|
|
133
|
+
paid: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the charge succeeded or was authorized." })),
|
|
134
|
+
captured: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the charge was captured." })),
|
|
135
|
+
refunded: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the charge was fully refunded." })),
|
|
136
|
+
disputed: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the charge was disputed." })),
|
|
137
|
+
customer: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Customer who was charged, if any." })),
|
|
138
|
+
payment_intent: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Payment intent of the charge." })),
|
|
139
|
+
payment_method: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Payment method used." })),
|
|
140
|
+
balance_transaction: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Balance transaction for the charge." })),
|
|
141
|
+
description: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Free-text description." })),
|
|
142
|
+
failure_code: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Error code for failed charges." })),
|
|
143
|
+
failure_message: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Error message for failed charges." })),
|
|
151
144
|
payment_method_details: Schema.NullOr(Schema.Struct({
|
|
152
|
-
type: Schema.String.pipe(
|
|
145
|
+
type: Schema.String.pipe(Schema.annotateKey({ description: "Payment method type, such as card." })),
|
|
153
146
|
card: Schema.optional(Schema.NullOr(Schema.Struct({
|
|
154
|
-
brand: Schema.NullOr(Schema.String).pipe(
|
|
155
|
-
country: Schema.NullOr(Schema.String).pipe(
|
|
156
|
-
funding: Schema.NullOr(Schema.String).pipe(
|
|
157
|
-
last4: Schema.NullOr(Schema.String).pipe(
|
|
158
|
-
exp_month: Long.pipe(
|
|
159
|
-
exp_year: Long.pipe(
|
|
160
|
-
fingerprint: Schema.optional(Schema.NullOr(Schema.String)).pipe(
|
|
161
|
-
}))).pipe(
|
|
162
|
-
})).pipe(
|
|
147
|
+
brand: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Card brand." })),
|
|
148
|
+
country: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Two-letter card country." })),
|
|
149
|
+
funding: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Funding type: credit, debit, prepaid, or unknown." })),
|
|
150
|
+
last4: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Last four card digits." })),
|
|
151
|
+
exp_month: Long.pipe(Schema.annotateKey({ description: "Expiry month." })),
|
|
152
|
+
exp_year: Long.pipe(Schema.annotateKey({ description: "Expiry year." })),
|
|
153
|
+
fingerprint: Schema.optional(Schema.NullOr(Schema.String)).pipe(Schema.annotateKey({ description: "Stripe's fingerprint of the card number, for finding duplicates." }))
|
|
154
|
+
}))).pipe(Schema.annotateKey({ description: "Card details. Only set for card payments." }))
|
|
155
|
+
})).pipe(Schema.annotateKey({ description: "Payment method details at the time of the charge." })),
|
|
163
156
|
outcome: Schema.NullOr(Schema.Struct({
|
|
164
|
-
type: Schema.String.pipe(
|
|
165
|
-
network_status: Schema.NullOr(Schema.String).pipe(
|
|
166
|
-
reason: Schema.NullOr(Schema.String).pipe(
|
|
167
|
-
risk_level: Schema.optional(Schema.NullOr(Schema.String)).pipe(
|
|
168
|
-
seller_message: Schema.NullOr(Schema.String).pipe(
|
|
169
|
-
})).pipe(
|
|
170
|
-
metadata: Metadata.pipe(
|
|
157
|
+
type: Schema.String.pipe(Schema.annotateKey({ description: "Outcome type, such as authorized or issuer_declined." })),
|
|
158
|
+
network_status: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Card network result." })),
|
|
159
|
+
reason: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Reason for a decline or block." })),
|
|
160
|
+
risk_level: Schema.optional(Schema.NullOr(Schema.String)).pipe(Schema.annotateKey({ description: "Radar risk level." })),
|
|
161
|
+
seller_message: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Explanation of the outcome for the seller." }))
|
|
162
|
+
})).pipe(Schema.annotateKey({ description: "Whether the payment was accepted, and why." })),
|
|
163
|
+
metadata: Metadata.pipe(Schema.annotateKey({ description: "Key-value pairs set on the charge." })),
|
|
171
164
|
billing_details: Schema.Struct({
|
|
172
|
-
name: Schema.NullOr(Schema.String).pipe(
|
|
173
|
-
email: Schema.NullOr(Schema.String).pipe(
|
|
174
|
-
phone: Schema.NullOr(Schema.String).pipe(
|
|
175
|
-
address: Schema.NullOr(address
|
|
176
|
-
}).pipe(
|
|
177
|
-
receipt_email: Schema.NullOr(Schema.String).pipe(
|
|
165
|
+
name: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Payer name." })),
|
|
166
|
+
email: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Payer email." })),
|
|
167
|
+
phone: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Payer phone number." })),
|
|
168
|
+
address: Schema.NullOr(address).pipe(Schema.annotateKey({ description: "Billing address." }))
|
|
169
|
+
}).pipe(Schema.annotateKey({ description: "Billing details of the payment method at the time of the charge." })),
|
|
170
|
+
receipt_email: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Email the receipt was sent to." }))
|
|
178
171
|
}).annotate({ description: "Charges in a Stripe account." }).pipe(Iceberg.identifier("id"));
|
|
179
172
|
const ChargeObjectSchema = ChargeSchema.mapFields(Struct.omit(["version"]));
|
|
180
173
|
//#endregion
|
|
@@ -367,25 +360,25 @@ const makeCharges = (client) => Resource.entity({
|
|
|
367
360
|
//#endregion
|
|
368
361
|
//#region src/schemas/customers.ts
|
|
369
362
|
const CustomerSchema = Schema.Struct({
|
|
370
|
-
id: Schema.String.pipe(
|
|
371
|
-
version
|
|
372
|
-
created: UnixTime.pipe(
|
|
373
|
-
livemode: Schema.Boolean.pipe(
|
|
374
|
-
email: Schema.NullOr(Schema.String).pipe(
|
|
375
|
-
name: Schema.NullOr(Schema.String).pipe(
|
|
376
|
-
phone: Schema.NullOr(Schema.String).pipe(
|
|
377
|
-
description: Schema.NullOr(Schema.String).pipe(
|
|
378
|
-
currency: Schema.NullOr(Schema.String).pipe(
|
|
379
|
-
balance: Long.pipe(
|
|
380
|
-
delinquent: Schema.NullOr(Schema.Boolean).pipe(
|
|
381
|
-
tax_exempt: Schema.NullOr(Schema.String).pipe(
|
|
382
|
-
invoice_prefix: Schema.NullOr(Schema.String).pipe(
|
|
383
|
-
invoice_settings: Schema.Struct({ default_payment_method: Schema.NullOr(Schema.String).pipe(
|
|
384
|
-
address: Schema.NullOr(address
|
|
385
|
-
metadata: Metadata.pipe(
|
|
386
|
-
_deleted: deleted
|
|
387
|
-
test_clock: Schema.NullOr(Schema.String).pipe(
|
|
388
|
-
shipping: Schema.NullOr(shipping
|
|
363
|
+
id: Schema.String.pipe(Schema.annotateKey({ description: "Unique customer identifier." })),
|
|
364
|
+
version,
|
|
365
|
+
created: UnixTime.pipe(Schema.annotateKey({ description: "Time when the customer was created." })),
|
|
366
|
+
livemode: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the customer exists in live mode." })),
|
|
367
|
+
email: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Customer email address." })),
|
|
368
|
+
name: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Customer full name or business name." })),
|
|
369
|
+
phone: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Customer phone number." })),
|
|
370
|
+
description: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Free-text description." })),
|
|
371
|
+
currency: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Currency the customer is billed in for recurring billing." })),
|
|
372
|
+
balance: Long.pipe(Schema.annotateKey({ description: "Balance in the smallest currency unit. Negative means credit, positive means owed." })),
|
|
373
|
+
delinquent: Schema.NullOr(Schema.Boolean).pipe(Schema.annotateKey({ description: "Whether the latest invoice state change was a failed payment or missed due date." })),
|
|
374
|
+
tax_exempt: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Tax exemption status: none, exempt, or reverse." })),
|
|
375
|
+
invoice_prefix: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Prefix for invoice numbers." })),
|
|
376
|
+
invoice_settings: Schema.Struct({ default_payment_method: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Default payment method for invoices and subscriptions." })) }).pipe(Schema.annotateKey({ description: "Default invoice settings." })),
|
|
377
|
+
address: Schema.NullOr(address).pipe(Schema.annotateKey({ description: "Billing address." })),
|
|
378
|
+
metadata: Metadata.pipe(Schema.annotateKey({ description: "Key-value pairs set on the customer." })),
|
|
379
|
+
_deleted: deleted,
|
|
380
|
+
test_clock: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Test clock the customer belongs to. Sandbox only." })),
|
|
381
|
+
shipping: Schema.NullOr(shipping).pipe(Schema.annotateKey({ description: "Shipping name, phone, and address." }))
|
|
389
382
|
}).annotate({ description: "Customers in a Stripe account." }).pipe(Iceberg.identifier("id"));
|
|
390
383
|
const CustomerObjectSchema = CustomerSchema.mapFields(Struct.omit(["version", "_deleted"]));
|
|
391
384
|
//#endregion
|
|
@@ -412,47 +405,47 @@ const makeCustomers = (client) => Resource.entity({
|
|
|
412
405
|
//#endregion
|
|
413
406
|
//#region src/schemas/invoices.ts
|
|
414
407
|
const InvoiceSchema = Schema.Struct({
|
|
415
|
-
id: Schema.String.pipe(
|
|
416
|
-
version
|
|
417
|
-
created: UnixTime.pipe(
|
|
418
|
-
livemode: Schema.Boolean.pipe(
|
|
419
|
-
customer: Schema.NullOr(Schema.String).pipe(
|
|
420
|
-
customer_account: Schema.NullOr(Schema.String).pipe(
|
|
408
|
+
id: Schema.String.pipe(Schema.annotateKey({ description: "Unique invoice identifier." })),
|
|
409
|
+
version,
|
|
410
|
+
created: UnixTime.pipe(Schema.annotateKey({ description: "Time when the invoice was created." })),
|
|
411
|
+
livemode: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the invoice exists in live mode." })),
|
|
412
|
+
customer: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Customer who is billed." })),
|
|
413
|
+
customer_account: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Account that represents the customer, for Accounts v2." })),
|
|
421
414
|
parent: Schema.NullOr(Schema.Struct({
|
|
422
|
-
type: Schema.String.pipe(
|
|
423
|
-
subscription_details: Schema.NullOr(Schema.Struct({ subscription: Schema.String.pipe(
|
|
424
|
-
})).pipe(
|
|
425
|
-
status: Schema.NullOr(Schema.String).pipe(
|
|
426
|
-
number: Schema.NullOr(Schema.String).pipe(
|
|
427
|
-
currency: Schema.String.pipe(
|
|
428
|
-
subtotal: Long.pipe(
|
|
429
|
-
total: Long.pipe(
|
|
430
|
-
total_excluding_tax: Schema.NullOr(Long).pipe(
|
|
431
|
-
amount_due: Long.pipe(
|
|
432
|
-
amount_paid: Long.pipe(
|
|
433
|
-
amount_remaining: Long.pipe(
|
|
434
|
-
amount_overpaid: Long.pipe(
|
|
435
|
-
attempt_count: Long.pipe(
|
|
436
|
-
billing_reason: Schema.NullOr(Schema.String).pipe(
|
|
437
|
-
collection_method: Schema.String.pipe(
|
|
438
|
-
due_date: Schema.NullOr(UnixTime).pipe(
|
|
439
|
-
period_start: UnixTime.pipe(
|
|
440
|
-
period_end: UnixTime.pipe(
|
|
441
|
-
effective_at: Schema.NullOr(UnixTime).pipe(
|
|
415
|
+
type: Schema.String.pipe(Schema.annotateKey({ description: "What created the invoice, such as subscription_details." })),
|
|
416
|
+
subscription_details: Schema.NullOr(Schema.Struct({ subscription: Schema.String.pipe(Schema.annotateKey({ description: "Subscription that created the invoice." })) })).pipe(Schema.annotateKey({ description: "Set when a subscription created the invoice." }))
|
|
417
|
+
})).pipe(Schema.annotateKey({ description: "Object that created the invoice." })),
|
|
418
|
+
status: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Status: draft, open, paid, uncollectible, or void." })),
|
|
419
|
+
number: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Invoice number shown to the customer." })),
|
|
420
|
+
currency: Schema.String.pipe(Schema.annotateKey({ description: "Three-letter currency code, in lowercase." })),
|
|
421
|
+
subtotal: Long.pipe(Schema.annotateKey({ description: "Total before invoice-level discounts and exclusive tax." })),
|
|
422
|
+
total: Long.pipe(Schema.annotateKey({ description: "Total after discounts and taxes." })),
|
|
423
|
+
total_excluding_tax: Schema.NullOr(Long).pipe(Schema.annotateKey({ description: "Total after discounts, without tax." })),
|
|
424
|
+
amount_due: Long.pipe(Schema.annotateKey({ description: "Amount due now." })),
|
|
425
|
+
amount_paid: Long.pipe(Schema.annotateKey({ description: "Amount paid." })),
|
|
426
|
+
amount_remaining: Long.pipe(Schema.annotateKey({ description: "Amount due minus amount paid." })),
|
|
427
|
+
amount_overpaid: Long.pipe(Schema.annotateKey({ description: "Overpaid amount, credited to the customer balance." })),
|
|
428
|
+
attempt_count: Long.pipe(Schema.annotateKey({ description: "Payment attempts made by the retry schedule." })),
|
|
429
|
+
billing_reason: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Why the invoice was created." })),
|
|
430
|
+
collection_method: Schema.String.pipe(Schema.annotateKey({ description: "How the invoice is paid: charge_automatically or send_invoice." })),
|
|
431
|
+
due_date: Schema.NullOr(UnixTime).pipe(Schema.annotateKey({ description: "Due date. Only set for send_invoice." })),
|
|
432
|
+
period_start: UnixTime.pipe(Schema.annotateKey({ description: "Earliest time items can belong to the invoice." })),
|
|
433
|
+
period_end: UnixTime.pipe(Schema.annotateKey({ description: "Latest time items can belong to the invoice." })),
|
|
434
|
+
effective_at: Schema.NullOr(UnixTime).pipe(Schema.annotateKey({ description: "Date of issue." })),
|
|
442
435
|
status_transitions: Schema.Struct({
|
|
443
|
-
finalized_at: Schema.NullOr(UnixTime).pipe(
|
|
444
|
-
paid_at: Schema.NullOr(UnixTime).pipe(
|
|
445
|
-
voided_at: Schema.NullOr(UnixTime).pipe(
|
|
446
|
-
marked_uncollectible_at: Schema.NullOr(UnixTime).pipe(
|
|
447
|
-
}).pipe(
|
|
448
|
-
metadata: Metadata.pipe(
|
|
449
|
-
_deleted: deleted
|
|
450
|
-
test_clock: Schema.NullOr(Schema.String).pipe(
|
|
451
|
-
customer_email: Schema.NullOr(Schema.String).pipe(
|
|
452
|
-
customer_name: Schema.NullOr(Schema.String).pipe(
|
|
453
|
-
customer_phone: Schema.NullOr(Schema.String).pipe(
|
|
454
|
-
customer_address: Schema.NullOr(address
|
|
455
|
-
customer_shipping: Schema.NullOr(shipping
|
|
436
|
+
finalized_at: Schema.NullOr(UnixTime).pipe(Schema.annotateKey({ description: "Time when the invoice was finalized." })),
|
|
437
|
+
paid_at: Schema.NullOr(UnixTime).pipe(Schema.annotateKey({ description: "Time when the invoice was paid." })),
|
|
438
|
+
voided_at: Schema.NullOr(UnixTime).pipe(Schema.annotateKey({ description: "Time when the invoice was voided." })),
|
|
439
|
+
marked_uncollectible_at: Schema.NullOr(UnixTime).pipe(Schema.annotateKey({ description: "Time when the invoice was marked uncollectible." }))
|
|
440
|
+
}).pipe(Schema.annotateKey({ description: "Times of status changes." })),
|
|
441
|
+
metadata: Metadata.pipe(Schema.annotateKey({ description: "Key-value pairs set on the invoice." })),
|
|
442
|
+
_deleted: deleted,
|
|
443
|
+
test_clock: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Test clock the invoice belongs to. Sandbox only." })),
|
|
444
|
+
customer_email: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Customer email. Fixed when the invoice is finalized." })),
|
|
445
|
+
customer_name: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Customer name. Fixed when the invoice is finalized." })),
|
|
446
|
+
customer_phone: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Customer phone number. Fixed when the invoice is finalized." })),
|
|
447
|
+
customer_address: Schema.NullOr(address).pipe(Schema.annotateKey({ description: "Customer address. Fixed when the invoice is finalized." })),
|
|
448
|
+
customer_shipping: Schema.NullOr(shipping).pipe(Schema.annotateKey({ description: "Customer shipping details. Fixed when the invoice is finalized." }))
|
|
456
449
|
}).annotate({ description: "Invoices in a Stripe account. Deleted drafts are marked deleted." }).pipe(Iceberg.identifier("id"));
|
|
457
450
|
const InvoiceObjectSchema = InvoiceSchema.mapFields(Struct.omit(["version", "_deleted"]));
|
|
458
451
|
//#endregion
|
|
@@ -488,30 +481,30 @@ const makeInvoices = (client) => Resource.entity({
|
|
|
488
481
|
//#endregion
|
|
489
482
|
//#region src/schemas/prices.ts
|
|
490
483
|
const PriceSchema = Schema.Struct({
|
|
491
|
-
id: Schema.String.pipe(
|
|
492
|
-
version
|
|
493
|
-
created: UnixTime.pipe(
|
|
494
|
-
livemode: Schema.Boolean.pipe(
|
|
495
|
-
active: Schema.Boolean.pipe(
|
|
496
|
-
product: Schema.String.pipe(
|
|
497
|
-
currency: Schema.String.pipe(
|
|
498
|
-
type: Schema.String.pipe(
|
|
499
|
-
billing_scheme: Schema.String.pipe(
|
|
500
|
-
unit_amount: Schema.NullOr(Long).pipe(
|
|
501
|
-
unit_amount_decimal: Schema.NullOr(Schema.String).pipe(
|
|
502
|
-
tiers_mode: Schema.NullOr(Schema.String).pipe(
|
|
503
|
-
lookup_key: Schema.NullOr(Schema.String).pipe(
|
|
504
|
-
nickname: Schema.NullOr(Schema.String).pipe(
|
|
505
|
-
tax_behavior: Schema.NullOr(Schema.String).pipe(
|
|
484
|
+
id: Schema.String.pipe(Schema.annotateKey({ description: "Unique price identifier." })),
|
|
485
|
+
version,
|
|
486
|
+
created: UnixTime.pipe(Schema.annotateKey({ description: "Time when the price was created." })),
|
|
487
|
+
livemode: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the price exists in live mode." })),
|
|
488
|
+
active: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the price can be used for new purchases." })),
|
|
489
|
+
product: Schema.String.pipe(Schema.annotateKey({ description: "Product the price belongs to." })),
|
|
490
|
+
currency: Schema.String.pipe(Schema.annotateKey({ description: "Three-letter currency code, in lowercase." })),
|
|
491
|
+
type: Schema.String.pipe(Schema.annotateKey({ description: "Price type: one_time or recurring." })),
|
|
492
|
+
billing_scheme: Schema.String.pipe(Schema.annotateKey({ description: "How the amount is computed: per_unit or tiered." })),
|
|
493
|
+
unit_amount: Schema.NullOr(Long).pipe(Schema.annotateKey({ description: "Unit amount in the smallest currency unit. Null for tiered prices." })),
|
|
494
|
+
unit_amount_decimal: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Unit amount as a decimal string, for sub-cent amounts." })),
|
|
495
|
+
tiers_mode: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Tier mode: graduated or volume." })),
|
|
496
|
+
lookup_key: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Key used to look up the price." })),
|
|
497
|
+
nickname: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Internal name of the price." })),
|
|
498
|
+
tax_behavior: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Whether tax is inclusive, exclusive, or unspecified." })),
|
|
506
499
|
recurring: Schema.NullOr(Schema.Struct({
|
|
507
|
-
interval: Schema.String.pipe(
|
|
508
|
-
interval_count: Long.pipe(
|
|
509
|
-
usage_type: Schema.String.pipe(
|
|
510
|
-
meter: Schema.optional(Schema.NullOr(Schema.String)).pipe(
|
|
511
|
-
trial_period_days: Schema.optional(Schema.NullOr(Long)).pipe(
|
|
512
|
-
})).pipe(
|
|
513
|
-
metadata: Metadata.pipe(
|
|
514
|
-
_deleted: deleted
|
|
500
|
+
interval: Schema.String.pipe(Schema.annotateKey({ description: "Billing interval: day, week, month, or year." })),
|
|
501
|
+
interval_count: Long.pipe(Schema.annotateKey({ description: "Number of intervals between bills." })),
|
|
502
|
+
usage_type: Schema.String.pipe(Schema.annotateKey({ description: "Usage type: licensed or metered." })),
|
|
503
|
+
meter: Schema.optional(Schema.NullOr(Schema.String)).pipe(Schema.annotateKey({ description: "Meter that tracks usage for metered prices." })),
|
|
504
|
+
trial_period_days: Schema.optional(Schema.NullOr(Long)).pipe(Schema.annotateKey({ description: "Default trial length in days." }))
|
|
505
|
+
})).pipe(Schema.annotateKey({ description: "Billing period of recurring prices." })),
|
|
506
|
+
metadata: Metadata.pipe(Schema.annotateKey({ description: "Key-value pairs set on the price." })),
|
|
507
|
+
_deleted: deleted
|
|
515
508
|
}).annotate({ description: "Prices in a Stripe account, including inactive ones." }).pipe(Iceberg.identifier("id"));
|
|
516
509
|
const PriceObjectSchema = PriceSchema.mapFields(Struct.omit(["version", "_deleted"]));
|
|
517
510
|
//#endregion
|
|
@@ -538,22 +531,22 @@ const makePrices = (client) => Resource.entity({
|
|
|
538
531
|
//#endregion
|
|
539
532
|
//#region src/schemas/products.ts
|
|
540
533
|
const ProductSchema = Schema.Struct({
|
|
541
|
-
id: Schema.String.pipe(
|
|
542
|
-
version
|
|
543
|
-
created: UnixTime.pipe(
|
|
544
|
-
updated: UnixTime.pipe(
|
|
545
|
-
livemode: Schema.Boolean.pipe(
|
|
546
|
-
active: Schema.Boolean.pipe(
|
|
547
|
-
name: Schema.String.pipe(
|
|
548
|
-
description: Schema.NullOr(Schema.String).pipe(
|
|
549
|
-
default_price: Schema.NullOr(Schema.String).pipe(
|
|
550
|
-
tax_code: Schema.NullOr(Schema.String).pipe(
|
|
551
|
-
unit_label: Schema.NullOr(Schema.String).pipe(
|
|
552
|
-
url: Schema.NullOr(Schema.String).pipe(
|
|
553
|
-
shippable: Schema.NullOr(Schema.Boolean).pipe(
|
|
554
|
-
statement_descriptor: Schema.NullOr(Schema.String).pipe(
|
|
555
|
-
metadata: Metadata.pipe(
|
|
556
|
-
_deleted: deleted
|
|
534
|
+
id: Schema.String.pipe(Schema.annotateKey({ description: "Unique product identifier." })),
|
|
535
|
+
version,
|
|
536
|
+
created: UnixTime.pipe(Schema.annotateKey({ description: "Time when the product was created." })),
|
|
537
|
+
updated: UnixTime.pipe(Schema.annotateKey({ description: "Time when the product was last changed, in whole seconds." })),
|
|
538
|
+
livemode: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the product exists in live mode." })),
|
|
539
|
+
active: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the product can be bought. False when archived." })),
|
|
540
|
+
name: Schema.String.pipe(Schema.annotateKey({ description: "Product name." })),
|
|
541
|
+
description: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Product description." })),
|
|
542
|
+
default_price: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Default price of the product." })),
|
|
543
|
+
tax_code: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Tax code of the product." })),
|
|
544
|
+
unit_label: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Label for units on receipts." })),
|
|
545
|
+
url: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Public web page of the product." })),
|
|
546
|
+
shippable: Schema.NullOr(Schema.Boolean).pipe(Schema.annotateKey({ description: "Whether the product is shipped as physical goods." })),
|
|
547
|
+
statement_descriptor: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Text shown on card statements for subscription payments." })),
|
|
548
|
+
metadata: Metadata.pipe(Schema.annotateKey({ description: "Key-value pairs set on the product." })),
|
|
549
|
+
_deleted: deleted
|
|
557
550
|
}).annotate({ description: "Products in a Stripe account, including archived ones." }).pipe(Iceberg.identifier("id"));
|
|
558
551
|
const ProductObjectSchema = ProductSchema.mapFields(Struct.omit(["version", "_deleted"]));
|
|
559
552
|
//#endregion
|
|
@@ -580,21 +573,21 @@ const makeProducts = (client) => Resource.entity({
|
|
|
580
573
|
//#endregion
|
|
581
574
|
//#region src/schemas/refunds.ts
|
|
582
575
|
const RefundSchema = Schema.Struct({
|
|
583
|
-
id: Schema.String.pipe(
|
|
584
|
-
version
|
|
585
|
-
created: UnixTime.pipe(
|
|
586
|
-
amount: Long.pipe(
|
|
587
|
-
currency: Schema.String.pipe(
|
|
588
|
-
status: Schema.NullOr(Schema.String).pipe(
|
|
589
|
-
pending_reason: Schema.optional(Schema.NullOr(Schema.String)).pipe(
|
|
590
|
-
reason: Schema.NullOr(Schema.String).pipe(
|
|
591
|
-
failure_reason: Schema.optional(Schema.NullOr(Schema.String)).pipe(
|
|
592
|
-
charge: Schema.NullOr(Schema.String).pipe(
|
|
593
|
-
payment_intent: Schema.NullOr(Schema.String).pipe(
|
|
594
|
-
customer: Schema.optional(Schema.NullOr(Schema.String)).pipe(
|
|
595
|
-
customer_account: Schema.optional(Schema.NullOr(Schema.String)).pipe(
|
|
596
|
-
balance_transaction: Schema.NullOr(Schema.String).pipe(
|
|
597
|
-
metadata: Metadata.pipe(
|
|
576
|
+
id: Schema.String.pipe(Schema.annotateKey({ description: "Unique refund identifier." })),
|
|
577
|
+
version,
|
|
578
|
+
created: UnixTime.pipe(Schema.annotateKey({ description: "Time when the refund was created." })),
|
|
579
|
+
amount: Long.pipe(Schema.annotateKey({ description: "Refunded amount, in the smallest currency unit." })),
|
|
580
|
+
currency: Schema.String.pipe(Schema.annotateKey({ description: "Three-letter currency code, in lowercase." })),
|
|
581
|
+
status: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Status: pending, requires_action, succeeded, failed, or canceled." })),
|
|
582
|
+
pending_reason: Schema.optional(Schema.NullOr(Schema.String)).pipe(Schema.annotateKey({ description: "Why the refund is pending." })),
|
|
583
|
+
reason: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Why the refund was made." })),
|
|
584
|
+
failure_reason: Schema.optional(Schema.NullOr(Schema.String)).pipe(Schema.annotateKey({ description: "Why the refund failed." })),
|
|
585
|
+
charge: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Charge that was refunded." })),
|
|
586
|
+
payment_intent: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Payment intent that was refunded." })),
|
|
587
|
+
customer: Schema.optional(Schema.NullOr(Schema.String)).pipe(Schema.annotateKey({ description: "Customer of the refund." })),
|
|
588
|
+
customer_account: Schema.optional(Schema.NullOr(Schema.String)).pipe(Schema.annotateKey({ description: "Account that represents the customer, for Accounts v2." })),
|
|
589
|
+
balance_transaction: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Balance transaction for the refund." })),
|
|
590
|
+
metadata: Metadata.pipe(Schema.annotateKey({ description: "Key-value pairs set on the refund." }))
|
|
598
591
|
}).annotate({ description: "Refunds in a Stripe account." }).pipe(Iceberg.identifier("id"));
|
|
599
592
|
const RefundObjectSchema = RefundSchema.mapFields(Struct.omit(["version"]));
|
|
600
593
|
//#endregion
|
|
@@ -622,51 +615,51 @@ const makeRefunds = (client) => Resource.entity({
|
|
|
622
615
|
//#endregion
|
|
623
616
|
//#region src/schemas/subscriptions.ts
|
|
624
617
|
const SubscriptionItemSchema = Schema.Struct({
|
|
625
|
-
id: Schema.String.pipe(
|
|
626
|
-
created: UnixTime.pipe(
|
|
618
|
+
id: Schema.String.pipe(Schema.annotateKey({ description: "Unique subscription item identifier." })),
|
|
619
|
+
created: UnixTime.pipe(Schema.annotateKey({ description: "Time when the item was created." })),
|
|
627
620
|
price: Schema.Struct({
|
|
628
|
-
id: Schema.String.pipe(
|
|
629
|
-
product: Schema.String.pipe(
|
|
630
|
-
}).pipe(
|
|
631
|
-
quantity: Schema.optional(Long).pipe(
|
|
632
|
-
current_period_start: UnixTime.pipe(
|
|
633
|
-
current_period_end: UnixTime.pipe(
|
|
621
|
+
id: Schema.String.pipe(Schema.annotateKey({ description: "Price identifier." })),
|
|
622
|
+
product: Schema.String.pipe(Schema.annotateKey({ description: "Product the price belongs to." }))
|
|
623
|
+
}).pipe(Schema.annotateKey({ description: "Price of the item." })),
|
|
624
|
+
quantity: Schema.optional(Long).pipe(Schema.annotateKey({ description: "Quantity billed for the item." })),
|
|
625
|
+
current_period_start: UnixTime.pipe(Schema.annotateKey({ description: "Start of the item's current billing period." })),
|
|
626
|
+
current_period_end: UnixTime.pipe(Schema.annotateKey({ description: "End of the item's current billing period." }))
|
|
634
627
|
});
|
|
635
628
|
const SubscriptionSchema = Schema.Struct({
|
|
636
|
-
id: Schema.String.pipe(
|
|
637
|
-
version
|
|
638
|
-
created: UnixTime.pipe(
|
|
639
|
-
livemode: Schema.Boolean.pipe(
|
|
640
|
-
customer: Schema.NullOr(Schema.String).pipe(
|
|
641
|
-
customer_account: Schema.NullOr(Schema.String).pipe(
|
|
642
|
-
status: Schema.String.pipe(
|
|
643
|
-
currency: Schema.String.pipe(
|
|
644
|
-
collection_method: Schema.String.pipe(
|
|
645
|
-
start_date: UnixTime.pipe(
|
|
646
|
-
billing_cycle_anchor: UnixTime.pipe(
|
|
647
|
-
cancel_at: Schema.NullOr(UnixTime).pipe(
|
|
648
|
-
cancel_at_period_end: Schema.Boolean.pipe(
|
|
649
|
-
canceled_at: Schema.NullOr(UnixTime).pipe(
|
|
650
|
-
ended_at: Schema.NullOr(UnixTime).pipe(
|
|
651
|
-
trial_start: Schema.NullOr(UnixTime).pipe(
|
|
652
|
-
trial_end: Schema.NullOr(UnixTime).pipe(
|
|
653
|
-
days_until_due: Schema.NullOr(Long).pipe(
|
|
654
|
-
default_payment_method: Schema.NullOr(Schema.String).pipe(
|
|
655
|
-
latest_invoice: Schema.NullOr(Schema.String).pipe(
|
|
656
|
-
schedule: Schema.NullOr(Schema.String).pipe(
|
|
657
|
-
description: Schema.NullOr(Schema.String).pipe(
|
|
629
|
+
id: Schema.String.pipe(Schema.annotateKey({ description: "Unique subscription identifier." })),
|
|
630
|
+
version,
|
|
631
|
+
created: UnixTime.pipe(Schema.annotateKey({ description: "Time when the subscription was created." })),
|
|
632
|
+
livemode: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the subscription exists in live mode." })),
|
|
633
|
+
customer: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Customer who owns the subscription." })),
|
|
634
|
+
customer_account: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Account that represents the customer, for Accounts v2." })),
|
|
635
|
+
status: Schema.String.pipe(Schema.annotateKey({ description: "Status, such as trialing, active, past_due, canceled, unpaid, or paused." })),
|
|
636
|
+
currency: Schema.String.pipe(Schema.annotateKey({ description: "Three-letter currency code, in lowercase." })),
|
|
637
|
+
collection_method: Schema.String.pipe(Schema.annotateKey({ description: "How invoices are paid: charge_automatically or send_invoice." })),
|
|
638
|
+
start_date: UnixTime.pipe(Schema.annotateKey({ description: "Time when the subscription started. Can be backdated." })),
|
|
639
|
+
billing_cycle_anchor: UnixTime.pipe(Schema.annotateKey({ description: "Reference point for billing dates." })),
|
|
640
|
+
cancel_at: Schema.NullOr(UnixTime).pipe(Schema.annotateKey({ description: "Time when the subscription will cancel." })),
|
|
641
|
+
cancel_at_period_end: Schema.Boolean.pipe(Schema.annotateKey({ description: "Whether the subscription cancels at the end of the period." })),
|
|
642
|
+
canceled_at: Schema.NullOr(UnixTime).pipe(Schema.annotateKey({ description: "Time when cancellation was requested." })),
|
|
643
|
+
ended_at: Schema.NullOr(UnixTime).pipe(Schema.annotateKey({ description: "Time when the subscription ended." })),
|
|
644
|
+
trial_start: Schema.NullOr(UnixTime).pipe(Schema.annotateKey({ description: "Start of the trial." })),
|
|
645
|
+
trial_end: Schema.NullOr(UnixTime).pipe(Schema.annotateKey({ description: "End of the trial." })),
|
|
646
|
+
days_until_due: Schema.NullOr(Long).pipe(Schema.annotateKey({ description: "Days to pay invoices. Only set for send_invoice." })),
|
|
647
|
+
default_payment_method: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Default payment method of the subscription." })),
|
|
648
|
+
latest_invoice: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Most recent invoice." })),
|
|
649
|
+
schedule: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Subscription schedule, if any." })),
|
|
650
|
+
description: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Description shown to the customer." })),
|
|
658
651
|
cancellation_details: Schema.NullOr(Schema.Struct({
|
|
659
|
-
reason: Schema.NullOr(Schema.String).pipe(
|
|
660
|
-
feedback: Schema.NullOr(Schema.String).pipe(
|
|
661
|
-
comment: Schema.NullOr(Schema.String).pipe(
|
|
662
|
-
})).pipe(
|
|
652
|
+
reason: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Why the subscription was canceled." })),
|
|
653
|
+
feedback: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Reason the customer picked when canceling." })),
|
|
654
|
+
comment: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Free-text comment from the customer." }))
|
|
655
|
+
})).pipe(Schema.annotateKey({ description: "Why the subscription was canceled." })),
|
|
663
656
|
pause_collection: Schema.NullOr(Schema.Struct({
|
|
664
|
-
behavior: Schema.String.pipe(
|
|
665
|
-
resumes_at: Schema.NullOr(UnixTime).pipe(
|
|
666
|
-
})).pipe(
|
|
667
|
-
items: Schema.Array(SubscriptionItemSchema.
|
|
668
|
-
metadata: Metadata.pipe(
|
|
669
|
-
test_clock: Schema.NullOr(Schema.String).pipe(
|
|
657
|
+
behavior: Schema.String.pipe(Schema.annotateKey({ description: "What happens to invoices while paused." })),
|
|
658
|
+
resumes_at: Schema.NullOr(UnixTime).pipe(Schema.annotateKey({ description: "Time when collection resumes." }))
|
|
659
|
+
})).pipe(Schema.annotateKey({ description: "Paused payment collection. Not the same as status paused." })),
|
|
660
|
+
items: Schema.Array(SubscriptionItemSchema).pipe(Schema.annotateKey({ description: "All items of the subscription." })),
|
|
661
|
+
metadata: Metadata.pipe(Schema.annotateKey({ description: "Key-value pairs set on the subscription." })),
|
|
662
|
+
test_clock: Schema.NullOr(Schema.String).pipe(Schema.annotateKey({ description: "Test clock the subscription belongs to. Sandbox only." }))
|
|
670
663
|
}).annotate({ description: "Subscriptions in a Stripe account, including canceled ones." }).pipe(Iceberg.identifier("id"));
|
|
671
664
|
const SubscriptionObjectSchema = SubscriptionSchema.mapFields((fields) => ({
|
|
672
665
|
...Struct.omit(fields, ["version"]),
|
|
@@ -846,4 +839,4 @@ const layerConfig = (config) => Layer.unwrap(Config.unwrap(config).pipe(Effect.m
|
|
|
846
839
|
//#endregion
|
|
847
840
|
export { CustomerSchema as _, SubscriptionItemSchema as a, ChargeSchema as b, RefundObjectSchema as c, ProductSchema as d, PriceObjectSchema as f, CustomerObjectSchema as g, InvoiceSchema as h, webhookPath as i, RefundSchema as l, InvoiceObjectSchema as m, connector_exports as n, SubscriptionObjectSchema as o, PriceSchema as p, layerConfig as r, SubscriptionSchema as s, StripeConnector as t, ProductObjectSchema as u, StripeEventSchema as v, client_exports as x, ChargeObjectSchema as y };
|
|
848
841
|
|
|
849
|
-
//# sourceMappingURL=src-
|
|
842
|
+
//# sourceMappingURL=src-DXKdOBgM.mjs.map
|