@distilled.cloud/stripe 1.0.0-rc.1 → 1.0.0-rc.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.
@@ -0,0 +1,20 @@
1
+ import * as Context from "effect/Context";
2
+ import * as Effect from "effect/Effect";
3
+ import * as Layer from "effect/Layer";
4
+ import * as Redacted from "effect/Redacted";
5
+ export declare const DEFAULT_API_BASE_URL = "https://api.stripe.com";
6
+ export interface Config {
7
+ readonly apiKey: Redacted.Redacted<string>;
8
+ readonly apiBaseUrl: string;
9
+ }
10
+ declare const Credentials_base: Context.ServiceClass<Credentials, "StripeCredentials", Effect.Effect<Config, never, never>>;
11
+ export declare class Credentials extends Credentials_base {
12
+ }
13
+ export declare const CredentialsFromEnv: Layer.Layer<Credentials, never, never>;
14
+ /** Convenience layer from a plain API key + optional base URL. */
15
+ export declare const credentials: (config: {
16
+ readonly apiKey: string;
17
+ readonly apiBaseUrl?: string;
18
+ }) => Layer.Layer<Credentials>;
19
+ export {};
20
+ //# sourceMappingURL=credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAE7D,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WAAY,SAAQ,gBAGT;CAAG;AAM3B,eAAO,MAAM,kBAAkB,wCAe9B,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,WAAW,WAAY;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAOxB,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Stripe credentials — hand-written.
3
+ *
4
+ * API-compatible port of the distilled v0 stripe credentials module: the
5
+ * `Credentials` service holds an *effect* that resolves the current
6
+ * credentials on every request. `CredentialsFromEnv` reads `STRIPE_API_KEY`.
7
+ */
8
+ import { ConfigError } from "@distilled.cloud/core/errors";
9
+ import * as EffectConfig from "effect/Config";
10
+ import * as Context from "effect/Context";
11
+ import * as Effect from "effect/Effect";
12
+ import * as Layer from "effect/Layer";
13
+ import * as Redacted from "effect/Redacted";
14
+ export const DEFAULT_API_BASE_URL = "https://api.stripe.com";
15
+ export class Credentials extends Context.Service()("StripeCredentials") {
16
+ }
17
+ const envConfig = EffectConfig.all({
18
+ apiKey: EffectConfig.string("STRIPE_API_KEY"),
19
+ });
20
+ export const CredentialsFromEnv = Layer.succeed(Credentials, envConfig.pipe(Effect.mapError(() => new ConfigError({
21
+ message: "STRIPE_API_KEY environment variable is required",
22
+ })), Effect.map(({ apiKey }) => ({
23
+ apiKey: Redacted.make(apiKey),
24
+ apiBaseUrl: DEFAULT_API_BASE_URL,
25
+ })), Effect.orDie));
26
+ /** Convenience layer from a plain API key + optional base URL. */
27
+ export const credentials = (config) => Layer.succeed(Credentials, Effect.succeed({
28
+ apiKey: Redacted.make(config.apiKey),
29
+ apiBaseUrl: config.apiBaseUrl ?? DEFAULT_API_BASE_URL,
30
+ }));
31
+ //# sourceMappingURL=credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAA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-exports common HTTP errors from core and adds Stripe-specific error
5
+ * matching and API error types. Ported from distilled v0's stripe errors
6
+ * module.
7
+ */
8
+ export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
9
+ export type { DefaultErrors } from "@distilled.cloud/core/errors";
10
+ import * as Schema from "effect/Schema";
11
+ import * as Category from "@distilled.cloud/core/category";
12
+ declare const PaymentError_base: Schema.Class<PaymentError, Schema.TaggedStruct<"PaymentError", {
13
+ readonly message: Schema.optional<Schema.String>;
14
+ readonly code: Schema.optional<Schema.String>;
15
+ readonly decline_code: Schema.optional<Schema.String>;
16
+ readonly charge: Schema.optional<Schema.String>;
17
+ readonly param: Schema.optional<Schema.String>;
18
+ readonly doc_url: Schema.optional<Schema.String>;
19
+ readonly request_log_url: Schema.optional<Schema.String>;
20
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
21
+ "@distilled.cloud/error/categories": {
22
+ BadRequestError: true;
23
+ };
24
+ });
25
+ /**
26
+ * Payment error — returned when a payment request fails (HTTP 402).
27
+ * The parameters were valid but the request failed (e.g., card declined).
28
+ */
29
+ export declare class PaymentError extends PaymentError_base {
30
+ }
31
+ declare const CardError_base: Schema.Class<CardError, Schema.TaggedStruct<"CardError", {
32
+ readonly message: Schema.optional<Schema.String>;
33
+ readonly code: Schema.optional<Schema.String>;
34
+ readonly decline_code: Schema.optional<Schema.String>;
35
+ readonly charge: Schema.optional<Schema.String>;
36
+ readonly param: Schema.optional<Schema.String>;
37
+ readonly doc_url: Schema.optional<Schema.String>;
38
+ readonly advice_code: Schema.optional<Schema.String>;
39
+ readonly network_advice_code: Schema.optional<Schema.String>;
40
+ readonly network_decline_code: Schema.optional<Schema.String>;
41
+ readonly payment_method_type: Schema.optional<Schema.String>;
42
+ readonly request_log_url: Schema.optional<Schema.String>;
43
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
44
+ "@distilled.cloud/error/categories": {
45
+ BadRequestError: true;
46
+ };
47
+ });
48
+ /**
49
+ * Card error — returned when a card cannot be charged.
50
+ * Stripe error type: "card_error"
51
+ */
52
+ export declare class CardError extends CardError_base {
53
+ }
54
+ declare const IdempotencyError_base: Schema.Class<IdempotencyError, Schema.TaggedStruct<"IdempotencyError", {
55
+ readonly message: Schema.optional<Schema.String>;
56
+ readonly code: Schema.optional<Schema.String>;
57
+ readonly doc_url: Schema.optional<Schema.String>;
58
+ readonly request_log_url: Schema.optional<Schema.String>;
59
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
60
+ "@distilled.cloud/error/categories": {
61
+ ConflictError: true;
62
+ };
63
+ });
64
+ /**
65
+ * Idempotency error — returned when an Idempotency-Key is re-used
66
+ * on a request that does not match the first request's API endpoint and parameters.
67
+ * Stripe error type: "idempotency_error"
68
+ */
69
+ export declare class IdempotencyError extends IdempotencyError_base {
70
+ }
71
+ declare const InvalidRequestError_base: Schema.Class<InvalidRequestError, Schema.TaggedStruct<"InvalidRequestError", {
72
+ readonly message: Schema.optional<Schema.String>;
73
+ readonly code: Schema.optional<Schema.String>;
74
+ readonly param: Schema.optional<Schema.String>;
75
+ readonly doc_url: Schema.optional<Schema.String>;
76
+ readonly request_log_url: Schema.optional<Schema.String>;
77
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
78
+ "@distilled.cloud/error/categories": {
79
+ BadRequestError: true;
80
+ };
81
+ });
82
+ /**
83
+ * Invalid request error — returned when the request has invalid parameters.
84
+ * Stripe error type: "invalid_request_error"
85
+ */
86
+ export declare class InvalidRequestError extends InvalidRequestError_base {
87
+ }
88
+ declare const ApiError_base: Schema.Class<ApiError, Schema.TaggedStruct<"ApiError", {
89
+ readonly message: Schema.optional<Schema.String>;
90
+ readonly code: Schema.optional<Schema.String>;
91
+ readonly param: Schema.optional<Schema.String>;
92
+ readonly doc_url: Schema.optional<Schema.String>;
93
+ readonly request_log_url: Schema.optional<Schema.String>;
94
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
95
+ "@distilled.cloud/error/categories": {
96
+ ServerError: true;
97
+ };
98
+ }) & (new (...args: any[]) => {
99
+ "@distilled.cloud/error/retryable": Category.RetryableInfo;
100
+ });
101
+ /**
102
+ * API error — returned when something goes wrong on Stripe's end (HTTP 500+).
103
+ * Stripe error type: "api_error"
104
+ */
105
+ export declare class ApiError extends ApiError_base {
106
+ }
107
+ declare const ExternalDependencyFailed_base: Schema.Class<ExternalDependencyFailed, Schema.TaggedStruct<"ExternalDependencyFailed", {
108
+ readonly message: Schema.optional<Schema.String>;
109
+ readonly code: Schema.optional<Schema.String>;
110
+ readonly doc_url: Schema.optional<Schema.String>;
111
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
112
+ "@distilled.cloud/error/categories": {
113
+ ServerError: true;
114
+ };
115
+ }) & (new (...args: any[]) => {
116
+ "@distilled.cloud/error/retryable": Category.RetryableInfo;
117
+ });
118
+ /**
119
+ * External dependency failed — returned when an external dependency fails (HTTP 424).
120
+ */
121
+ export declare class ExternalDependencyFailed extends ExternalDependencyFailed_base {
122
+ }
123
+ /**
124
+ * Stripe HTTP status code to error class mapping.
125
+ * Extends core HTTP_STATUS_MAP with Stripe-specific statuses.
126
+ */
127
+ export declare const STRIPE_HTTP_STATUS_MAP: {
128
+ readonly 402: typeof PaymentError;
129
+ readonly 424: typeof ExternalDependencyFailed;
130
+ };
131
+ declare const UnknownStripeError_base: Schema.Class<UnknownStripeError, Schema.TaggedStruct<"UnknownStripeError", {
132
+ readonly type: Schema.optional<Schema.String>;
133
+ readonly code: Schema.optional<Schema.String>;
134
+ readonly message: Schema.optional<Schema.String>;
135
+ readonly param: Schema.optional<Schema.String>;
136
+ readonly body: Schema.Unknown;
137
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
138
+ "@distilled.cloud/error/categories": {
139
+ ServerError: true;
140
+ };
141
+ });
142
+ export declare class UnknownStripeError extends UnknownStripeError_base {
143
+ }
144
+ declare const StripeParseError_base: Schema.Class<StripeParseError, Schema.TaggedStruct<"StripeParseError", {
145
+ readonly body: Schema.Unknown;
146
+ readonly cause: Schema.Unknown;
147
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
148
+ "@distilled.cloud/error/categories": {
149
+ ParseError: true;
150
+ };
151
+ });
152
+ export declare class StripeParseError extends StripeParseError_base {
153
+ }
154
+ declare const StripeWebhookSignatureError_base: Schema.Class<StripeWebhookSignatureError, Schema.TaggedStruct<"StripeWebhookSignatureError", {
155
+ readonly message: Schema.String;
156
+ readonly cause: Schema.optional<Schema.Unknown>;
157
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
158
+ "@distilled.cloud/error/categories": {
159
+ AuthError: true;
160
+ };
161
+ });
162
+ /**
163
+ * Stripe webhook signature verification failed.
164
+ *
165
+ * This is raised by the local webhook helpers when the Stripe-Signature header
166
+ * is missing, malformed, expired, or does not match the raw request payload.
167
+ */
168
+ export declare class StripeWebhookSignatureError extends StripeWebhookSignatureError_base {
169
+ }
170
+ declare const StripeWebhookPayloadParseError_base: Schema.Class<StripeWebhookPayloadParseError, Schema.TaggedStruct<"StripeWebhookPayloadParseError", {
171
+ readonly message: Schema.String;
172
+ readonly cause: Schema.optional<Schema.Unknown>;
173
+ }>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
174
+ "@distilled.cloud/error/categories": {
175
+ ParseError: true;
176
+ };
177
+ });
178
+ /**
179
+ * Stripe webhook payload JSON parsing failed after signature verification.
180
+ */
181
+ export declare class StripeWebhookPayloadParseError extends StripeWebhookPayloadParseError_base {
182
+ }
183
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;;;;;;;;;;;;;;AAE3D;;;GAGG;AACH,qBAAa,YAAa,SAAQ,iBAWE;CAAG;;;;;;;;;;;;;;;;;;AAEvC;;;GAGG;AACH,qBAAa,SAAU,SAAQ,cAeK;CAAG;;;;;;;;;;;AAEvC;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,qBAQJ;CAAG;;;;;;;;;;;;AAErC;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,wBASL;CAAG;;;;;;;;;;;;;;AAEvC;;;GAGG;AACH,qBAAa,QAAS,SAAQ,aAM6B;CAAG;;;;;;;;;;;;AAE9D;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,6BAOY;CAAG;AAE7D;;;GAGG;AACH,eAAO,MAAM,sBAAsB;aACjC,GAAG;aACH,GAAG;CACK,CAAC;;;;;;;;;;;;AAGX,qBAAa,kBAAmB,SAAQ,uBASR;CAAG;;;;;;;;;AAGnC,qBAAa,gBAAiB,SAAQ,qBAMP;CAAG;;;;;;;;;AAElC;;;;;GAKG;AACH,qBAAa,2BAA4B,SAAQ,gCAMnB;CAAG;;;;;;;;;AAEjC;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,mCAMrB;CAAG"}
package/lib/errors.js ADDED
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Stripe-specific error types.
3
+ *
4
+ * Re-exports common HTTP errors from core and adds Stripe-specific error
5
+ * matching and API error types. Ported from distilled v0's stripe errors
6
+ * module.
7
+ */
8
+ export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
9
+ import * as Schema from "effect/Schema";
10
+ import * as Category from "@distilled.cloud/core/category";
11
+ /**
12
+ * Payment error — returned when a payment request fails (HTTP 402).
13
+ * The parameters were valid but the request failed (e.g., card declined).
14
+ */
15
+ export class PaymentError extends Schema.TaggedErrorClass()("PaymentError", {
16
+ message: Schema.optional(Schema.String),
17
+ code: Schema.optional(Schema.String),
18
+ decline_code: Schema.optional(Schema.String),
19
+ charge: Schema.optional(Schema.String),
20
+ param: Schema.optional(Schema.String),
21
+ doc_url: Schema.optional(Schema.String),
22
+ request_log_url: Schema.optional(Schema.String),
23
+ }).pipe(Category.withBadRequestError) {
24
+ }
25
+ /**
26
+ * Card error — returned when a card cannot be charged.
27
+ * Stripe error type: "card_error"
28
+ */
29
+ export class CardError extends Schema.TaggedErrorClass()("CardError", {
30
+ message: Schema.optional(Schema.String),
31
+ code: Schema.optional(Schema.String),
32
+ decline_code: Schema.optional(Schema.String),
33
+ charge: Schema.optional(Schema.String),
34
+ param: Schema.optional(Schema.String),
35
+ doc_url: Schema.optional(Schema.String),
36
+ advice_code: Schema.optional(Schema.String),
37
+ network_advice_code: Schema.optional(Schema.String),
38
+ network_decline_code: Schema.optional(Schema.String),
39
+ payment_method_type: Schema.optional(Schema.String),
40
+ request_log_url: Schema.optional(Schema.String),
41
+ }).pipe(Category.withBadRequestError) {
42
+ }
43
+ /**
44
+ * Idempotency error — returned when an Idempotency-Key is re-used
45
+ * on a request that does not match the first request's API endpoint and parameters.
46
+ * Stripe error type: "idempotency_error"
47
+ */
48
+ export class IdempotencyError extends Schema.TaggedErrorClass()("IdempotencyError", {
49
+ message: Schema.optional(Schema.String),
50
+ code: Schema.optional(Schema.String),
51
+ doc_url: Schema.optional(Schema.String),
52
+ request_log_url: Schema.optional(Schema.String),
53
+ }).pipe(Category.withConflictError) {
54
+ }
55
+ /**
56
+ * Invalid request error — returned when the request has invalid parameters.
57
+ * Stripe error type: "invalid_request_error"
58
+ */
59
+ export class InvalidRequestError extends Schema.TaggedErrorClass()("InvalidRequestError", {
60
+ message: Schema.optional(Schema.String),
61
+ code: Schema.optional(Schema.String),
62
+ param: Schema.optional(Schema.String),
63
+ doc_url: Schema.optional(Schema.String),
64
+ request_log_url: Schema.optional(Schema.String),
65
+ }).pipe(Category.withBadRequestError) {
66
+ }
67
+ /**
68
+ * API error — returned when something goes wrong on Stripe's end (HTTP 500+).
69
+ * Stripe error type: "api_error"
70
+ */
71
+ export class ApiError extends Schema.TaggedErrorClass()("ApiError", {
72
+ message: Schema.optional(Schema.String),
73
+ code: Schema.optional(Schema.String),
74
+ param: Schema.optional(Schema.String),
75
+ doc_url: Schema.optional(Schema.String),
76
+ request_log_url: Schema.optional(Schema.String),
77
+ }).pipe(Category.withServerError, Category.withRetryable()) {
78
+ }
79
+ /**
80
+ * External dependency failed — returned when an external dependency fails (HTTP 424).
81
+ */
82
+ export class ExternalDependencyFailed extends Schema.TaggedErrorClass()("ExternalDependencyFailed", {
83
+ message: Schema.optional(Schema.String),
84
+ code: Schema.optional(Schema.String),
85
+ doc_url: Schema.optional(Schema.String),
86
+ }).pipe(Category.withServerError, Category.withRetryable()) {
87
+ }
88
+ /**
89
+ * Stripe HTTP status code to error class mapping.
90
+ * Extends core HTTP_STATUS_MAP with Stripe-specific statuses.
91
+ */
92
+ export const STRIPE_HTTP_STATUS_MAP = {
93
+ 402: PaymentError,
94
+ 424: ExternalDependencyFailed,
95
+ };
96
+ // Unknown Stripe error — returned when an error type is not recognized
97
+ export class UnknownStripeError extends Schema.TaggedErrorClass()("UnknownStripeError", {
98
+ type: Schema.optional(Schema.String),
99
+ code: Schema.optional(Schema.String),
100
+ message: Schema.optional(Schema.String),
101
+ param: Schema.optional(Schema.String),
102
+ body: Schema.Unknown,
103
+ }).pipe(Category.withServerError) {
104
+ }
105
+ // Schema parse error wrapper
106
+ export class StripeParseError extends Schema.TaggedErrorClass()("StripeParseError", {
107
+ body: Schema.Unknown,
108
+ cause: Schema.Unknown,
109
+ }).pipe(Category.withParseError) {
110
+ }
111
+ /**
112
+ * Stripe webhook signature verification failed.
113
+ *
114
+ * This is raised by the local webhook helpers when the Stripe-Signature header
115
+ * is missing, malformed, expired, or does not match the raw request payload.
116
+ */
117
+ export class StripeWebhookSignatureError extends Schema.TaggedErrorClass()("StripeWebhookSignatureError", {
118
+ message: Schema.String,
119
+ cause: Schema.optional(Schema.Unknown),
120
+ }).pipe(Category.withAuthError) {
121
+ }
122
+ /**
123
+ * Stripe webhook payload JSON parsing failed after signature verification.
124
+ */
125
+ export class StripeWebhookPayloadParseError extends Schema.TaggedErrorClass()("StripeWebhookPayloadParseError", {
126
+ message: Schema.String,
127
+ cause: Schema.optional(Schema.Unknown),
128
+ }).pipe(Category.withParseError) {
129
+ }
130
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAE3D;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM,CAAC,gBAAgB,EAAgB,CACvE,cAAc,EACd;IACE,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACvC,IAAI,E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AC,OAAO;CACrB,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;CAAG;AAEnC,6BAA6B;AAC7B,MAAM,OAAO,gBAAiB,SAAQ,MAAM,CAAC,gBAAgB,EAAoB,CAC/E,kBAAkB,EAClB;IACE,IAAI,EAAE,MAAM,CAAC,OAAO;IACpB,KAAK,EAAE,MAAM,CAAC,OAAO;CACtB,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;CAAG;AAElC;;;;;GAKG;AACH,MAAM,OAAO,2BAA4B,SAAQ,MAAM,CAAC,gBAAgB,EAA+B,CACrG,6BAA6B,EAC7B;IACE,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;CACvC,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;CAAG;AAEjC;;GAEG;AACH,MAAM,OAAO,8BAA+B,SAAQ,MAAM,CAAC,gBAAgB,EAAkC,CAC3G,gCAAgC,EAChC;IACE,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;CACvC,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;CAAG"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @distilled.cloud/stripe — Stripe SDK for Effect.
3
+ *
4
+ * `./services` is generated by `scripts/generate.ts` from the Smithy model
5
+ * in `.generated-specs` (written by `scripts/convert.ts` from the Stripe
6
+ * OpenAPI SDK spec). Everything else in this folder is hand-written.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import * as Stripe from "@distilled.cloud/stripe";
11
+ * ```
12
+ */
13
+ export * from "./credentials.ts";
14
+ export * from "./errors.ts";
15
+ export * as T from "./traits.ts";
16
+ export { StripeProtocol, RequestOptions, withRequestOptions, type StripeRequestOptions, type StripeOpError, type StripeOpContext, } from "./protocol.ts";
17
+ export { stripeSearchPaginate } from "./pagination.ts";
18
+ export * as Retry from "./retry.ts";
19
+ export * as Webhooks from "./webhooks.ts";
20
+ export * as Services from "./services/index.ts";
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
package/lib/index.js ADDED
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @distilled.cloud/stripe — Stripe SDK for Effect.
3
+ *
4
+ * `./services` is generated by `scripts/generate.ts` from the Smithy model
5
+ * in `.generated-specs` (written by `scripts/convert.ts` from the Stripe
6
+ * OpenAPI SDK spec). Everything else in this folder is hand-written.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import * as Stripe from "@distilled.cloud/stripe";
11
+ * ```
12
+ */
13
+ export * from "./credentials.js";
14
+ export * from "./errors.js";
15
+ export * as T from "./traits.js";
16
+ export { StripeProtocol, RequestOptions, withRequestOptions, } from "./protocol.js";
17
+ export { stripeSearchPaginate } from "./pagination.js";
18
+ export * as Retry from "./retry.js";
19
+ export * as Webhooks from "./webhooks.js";
20
+ export * as Services from "./services/index.js";
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,GAInB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Stripe pagination — hand-written.
3
+ *
4
+ * Only the GET …/search operations paginate (v0 parity): the converter
5
+ * detects them as `mode: "page"` (inputToken `page`, outputToken
6
+ * `next_page`, items `data`), but Stripe's `page` parameter is an OPAQUE
7
+ * CURSOR — `next_page` is the next cursor string, not a page number — so
8
+ * "page" mode traverses by following the cursor, exactly core's
9
+ * `paginateCursor` semantics.
10
+ *
11
+ * Stripe's regular list endpoints (starting_after / ending_before +
12
+ * has_more) are plain operations without the paginated surface, mirroring
13
+ * distilled v0.
14
+ */
15
+ import * as Pagination from "@distilled.cloud/core/pagination";
16
+ /** Dispatch on the operation's pagination mode, Stripe-style. */
17
+ export declare const stripeSearchPaginate: Pagination.PaginationStrategy;
18
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAE/D,iEAAiE;AACjE,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC,kBAc7C,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Stripe pagination — hand-written.
3
+ *
4
+ * Only the GET …/search operations paginate (v0 parity): the converter
5
+ * detects them as `mode: "page"` (inputToken `page`, outputToken
6
+ * `next_page`, items `data`), but Stripe's `page` parameter is an OPAQUE
7
+ * CURSOR — `next_page` is the next cursor string, not a page number — so
8
+ * "page" mode traverses by following the cursor, exactly core's
9
+ * `paginateCursor` semantics.
10
+ *
11
+ * Stripe's regular list endpoints (starting_after / ending_before +
12
+ * has_more) are plain operations without the paginated surface, mirroring
13
+ * distilled v0.
14
+ */
15
+ import * as Pagination from "@distilled.cloud/core/pagination";
16
+ /** Dispatch on the operation's pagination mode, Stripe-style. */
17
+ export const stripeSearchPaginate = (operation, input, pagination) => {
18
+ switch (pagination.mode) {
19
+ case "page":
20
+ // Stripe search: `page` is a cursor, `next_page` the next cursor.
21
+ return Pagination.paginateCursor(operation, input, pagination);
22
+ case "single":
23
+ return Pagination.paginateSingle(operation, input, pagination);
24
+ default:
25
+ return Pagination.paginateWithDefaults(operation, input, pagination);
26
+ }
27
+ };
28
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.js","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAE/D,iEAAiE;AACjE,MAAM,CAAC,MAAM,oBAAoB,GAAkC,CACjE,SAAS,EACT,KAAK,EACL,UAAU,EACV,EAAE;IACF,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;QACxB,KAAK,MAAM;YACT,kEAAkE;YAClE,OAAO,UAAU,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;QACjE,KAAK,QAAQ;YACX,OAAO,UAAU,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;QACjE;YACE,OAAO,UAAU,CAAC,oBAAoB,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;IACzE,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * StripeProtocol — hand-written.
3
+ *
4
+ * Speaks Stripe's REST protocol. The generic trait helpers live in
5
+ * `@distilled.cloud/core/protocol-http`; this module supplies what is
6
+ * Stripe's own (ported from the distilled v0 stripe client):
7
+ *
8
+ * request: credentials → `Authorization: Bearer <apiKey>` + API base URL;
9
+ * per-call {@link StripeRequestOptions} (resolved from the
10
+ * calling fiber via {@link RequestOptions}) → Idempotency-Key /
11
+ * Stripe-Account / Stripe-Context / Stripe-Version headers;
12
+ * GET inputs flatten body-bound members into the query string
13
+ * with Stripe bracket notation (`created[gte]`, `expand[]`);
14
+ * non-GET bodies encode as `application/x-www-form-urlencoded`
15
+ * with Stripe deepObject bracket expansion (`shipping[address]
16
+ * [city]=SF`, `expand[0]=data`) when the operation's `T.Http`
17
+ * trait says `contentType: "form-urlencoded"` (every /v1 op),
18
+ * as JSON otherwise (the /v2 ops), and as multipart form-data
19
+ * for `contentType: "multipart"` (POST /v1/files)
20
+ *
21
+ * response: 2xx JSON is the payload (no envelope) → wire→TS key mapping →
22
+ * Redacted wrapping of sensitive members; failures parse the
23
+ * `{ error: { type, code, message, … } }` envelope and dispatch
24
+ * by `error.type` first (card_error → CardError,
25
+ * idempotency_error → IdempotencyError, invalid_request_error →
26
+ * InvalidRequestError, api_error → ApiError), then the
27
+ * Stripe-specific status map (402 → PaymentError, 424 →
28
+ * ExternalDependencyFailed), then core's HTTP status map (with
29
+ * retryAfter hints), then UnknownStripeError.
30
+ */
31
+ import * as Context from "effect/Context";
32
+ import * as Effect from "effect/Effect";
33
+ import * as Layer from "effect/Layer";
34
+ import type * as HttpClient from "effect/unstable/http/HttpClient";
35
+ import type * as HttpClientError from "effect/unstable/http/HttpClientError";
36
+ import * as API from "@distilled.cloud/core/api";
37
+ import { ConfigError, type DefaultErrors as CoreDefaultErrors, BadRequest, Conflict, Forbidden, Locked, NotFound, UnprocessableEntity } from "@distilled.cloud/core/errors";
38
+ import { Credentials } from "./credentials.ts";
39
+ import { ApiError, CardError, ExternalDependencyFailed, IdempotencyError, InvalidRequestError, PaymentError, StripeParseError, UnknownStripeError } from "./errors.ts";
40
+ type StripeConnectRequestOptions = {
41
+ readonly stripeAccount?: string | undefined;
42
+ readonly stripeContext?: never;
43
+ } | {
44
+ readonly stripeAccount?: never;
45
+ readonly stripeContext?: string | undefined;
46
+ };
47
+ export type StripeRequestOptions = {
48
+ readonly idempotencyKey?: string | undefined;
49
+ readonly apiVersion?: string | undefined;
50
+ } & StripeConnectRequestOptions;
51
+ declare const RequestOptions_base: Context.ServiceClass<RequestOptions, "StripeRequestOptions", StripeRequestOptions>;
52
+ /**
53
+ * Per-call request options service. distilled v0 passed these as a second
54
+ * call argument; v1 operations take only their input, so options travel on
55
+ * the calling fiber's context instead — see {@link withRequestOptions}.
56
+ */
57
+ export declare class RequestOptions extends RequestOptions_base {
58
+ }
59
+ /**
60
+ * Provide {@link StripeRequestOptions} to every Stripe API call below it.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * yield* PostCharges({ amount: 2000, currency: "usd" }).pipe(
65
+ * Stripe.withRequestOptions({ idempotencyKey: "ch-create-1" }),
66
+ * );
67
+ * ```
68
+ */
69
+ export declare const withRequestOptions: (options: StripeRequestOptions) => <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, RequestOptions>>;
70
+ /**
71
+ * Error channel shared by every generated Stripe operation. Generated
72
+ * service files annotate operations with `API.OperationMethod<I, O,
73
+ * StripeOpError, StripeOpContext>` explicitly so the compiler never infers
74
+ * these back out of the schema generics.
75
+ */
76
+ export type StripeOpError = CardError | IdempotencyError | InvalidRequestError | ApiError | PaymentError | ExternalDependencyFailed | UnknownStripeError | StripeParseError | BadRequest | Forbidden | NotFound | Conflict | UnprocessableEntity | Locked | CoreDefaultErrors | ConfigError | HttpClientError.HttpClientError;
77
+ /** Context (requirements) shared by every generated Stripe operation. */
78
+ export type StripeOpContext = Credentials | HttpClient.HttpClient;
79
+ export declare const StripeProtocol: Layer.Layer<API.Protocol>;
80
+ export {};
81
+ //# sourceMappingURL=protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAItC,OAAO,KAAK,KAAK,UAAU,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,KAAK,eAAe,MAAM,sCAAsC,CAAC;AAI7E,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAajD,OAAO,EACL,WAAW,EAGX,KAAK,aAAa,IAAI,iBAAiB,EACvC,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,QAAQ,EACR,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EACL,QAAQ,EACR,SAAS,EACT,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EAEZ,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAcrB,KAAK,2BAA2B,GAC5B;IACE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC;CAChC,GACD;IACE,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC;IAC/B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C,CAAC;AAEN,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C,QAAQ,C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