@distilled.cloud/stripe 1.0.0-rc.15 → 1.0.0-rc.16

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.
@@ -8,7 +8,7 @@ export interface Config {
8
8
  readonly apiBaseUrl: string;
9
9
  }
10
10
  declare const Credentials_base: Context.ServiceClass<Credentials, "StripeCredentials", Effect.Effect<Config, never, never>>;
11
- export declare class Credentials extends Credentials_base {
11
+ export declare class Credentials extends /*@__PURE__*/ Credentials_base {
12
12
  }
13
13
  export declare const CredentialsFromEnv: Layer.Layer<Credentials, never, never>;
14
14
  /** Convenience layer from a redacted API key + optional base URL. */
@@ -1 +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,gBAEhC;CAAG;AAMJ,eAAO,MAAM,kBAAkB,wCAe9B,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,WAAW,WAAY;IAClC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAOxB,CAAC"}
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,WACX,SAAQ,aAAa,CAAC,gBAErB;CAAG;AAMN,eAAO,MAAM,kBAAkB,wCAe9B,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,WAAW,WAAY;IAClC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAOxB,CAAC"}
@@ -1,29 +1,32 @@
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
- */
1
+ import * as EffectConfig from "@distilled.cloud/core/config";
2
+
3
+
4
+
5
+
6
+
7
+
8
+
8
9
  import { ConfigError } from "@distilled.cloud/core/errors";
9
- import * as EffectConfig from "effect/Config";
10
10
  import * as Context from "effect/Context";
11
11
  import * as Effect from "effect/Effect";
12
12
  import * as Layer from "effect/Layer";
13
13
  import * as Redacted from "effect/Redacted";
14
14
  export const DEFAULT_API_BASE_URL = "https://api.stripe.com";
15
- export class Credentials extends Context.Service()("StripeCredentials") {
15
+ export class Credentials extends /*@__PURE__*/ /*@__PURE__*/ Context.Service()("StripeCredentials") {
16
16
  }
17
- const envConfig = EffectConfig.all({
18
- apiKey: EffectConfig.String("STRIPE_API_KEY"),
17
+ const envConfig = /*@__PURE__*/ EffectConfig.all({
18
+ apiKey: /*@__PURE__*/ EffectConfig.String("STRIPE_API_KEY"),
19
19
  });
20
- export const CredentialsFromEnv = Layer.succeed(Credentials, envConfig.pipe(Effect.mapError(() => new ConfigError({
20
+ export const CredentialsFromEnv = /*@__PURE__*/ Layer.succeed(Credentials,
21
+ /*@__PURE__*/ envConfig.pipe(
22
+ /*@__PURE__*/ Effect.mapError(() => new ConfigError({
21
23
  message: "STRIPE_API_KEY environment variable is required",
22
- })), Effect.map(({ apiKey }) => ({
24
+ })),
25
+ /*@__PURE__*/ Effect.map(({ apiKey }) => ({
23
26
  apiKey: Redacted.make(apiKey),
24
27
  apiBaseUrl: DEFAULT_API_BASE_URL,
25
28
  })), Effect.orDie));
26
- /** Convenience layer from a redacted API key + optional base URL. */
29
+
27
30
  export const credentials = (config) => Layer.succeed(Credentials, Effect.succeed({
28
31
  apiKey: config.apiKey,
29
32
  apiBaseUrl: config.apiBaseUrl ?? DEFAULT_API_BASE_URL,
@@ -1 +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,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,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,MAAM,CAAC,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AAO7D,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAAsC,CACpF,mBAAmB,CACpB;CAAG;AAEJ,MAA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,CAAb,aAAa,CAAC,OAAO,CAAC,OAAO,EAAsC,CACzE,mBAAmB,CACpB;CAAG;AAEN,MAAM,SAAS,GAAG,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC;IAC/C,MAAM,EAAE,aAAa,CAAC,YAAY,CAAC,MAAM,CAAC,gBAAgB,CAAC;CAC5D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC,KAAK,CAAC,OAAO,CAC3D,WAAW;AACX,aAAa,CAAC,SAAS,CAAC,IAAI;AAC1B,aAAa,CAAC,MAAM,CAAC,QAAQ,CAC3B,GAAG,EAAE,CACH,IAAI,WAAW,CAAC;IACd,OAAO,EAAE,iDAAiD;CAC3D,CAAC,CACL;AACD,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IACxC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;IAC7B,UAAU,EAAE,oBAAoB;CACjC,CAAC,CAAC,EACH,MAAM,CAAC,KAAK,CACb,CACF,CAAC;AAEF,qEAAqE;AACrE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAG3B,EAA4B,EAAE,CAC7B,KAAK,CAAC,OAAO,CACX,WAAW,EACX,MAAM,CAAC,OAAO,CAAC;IACb,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,oBAAoB;CACtD,CAAC,CACH,CAAC"}
package/lib/errors.d.ts CHANGED
@@ -8,90 +8,90 @@
8
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
9
  export type { DefaultErrors } from "@distilled.cloud/core/errors";
10
10
  import * as Category from "@distilled.cloud/core/category";
11
- import * as Schema from "effect/Schema";
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[]) => {
11
+ import * as Schema from "@distilled.cloud/core/schema-lite-typed";
12
+ declare const PaymentError_base: Schema.TaggedErrorClass<"PaymentError", {
13
+ readonly message: import("effect/Schema").optional<import("effect/Schema").String>;
14
+ readonly code: import("effect/Schema").optional<import("effect/Schema").String>;
15
+ readonly decline_code: import("effect/Schema").optional<import("effect/Schema").String>;
16
+ readonly charge: import("effect/Schema").optional<import("effect/Schema").String>;
17
+ readonly param: import("effect/Schema").optional<import("effect/Schema").String>;
18
+ readonly doc_url: import("effect/Schema").optional<import("effect/Schema").String>;
19
+ readonly request_log_url: import("effect/Schema").optional<import("effect/Schema").String>;
20
+ }> & (new (...args: any[]) => {
21
21
  "@distilled.cloud/error/categories": {
22
22
  BadRequestError: true;
23
23
  };
24
24
  });
25
25
  /**
26
- * Payment error — returned when a payment request fails (HTTP 402).
26
+ * Payment error -- returned when a payment request fails (HTTP 402).
27
27
  * The parameters were valid but the request failed (e.g., card declined).
28
28
  */
29
- export declare class PaymentError extends PaymentError_base {
29
+ export declare class PaymentError extends /*@__PURE__*/ PaymentError_base {
30
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[]) => {
31
+ declare const CardError_base: Schema.TaggedErrorClass<"CardError", {
32
+ readonly message: import("effect/Schema").optional<import("effect/Schema").String>;
33
+ readonly code: import("effect/Schema").optional<import("effect/Schema").String>;
34
+ readonly decline_code: import("effect/Schema").optional<import("effect/Schema").String>;
35
+ readonly charge: import("effect/Schema").optional<import("effect/Schema").String>;
36
+ readonly param: import("effect/Schema").optional<import("effect/Schema").String>;
37
+ readonly doc_url: import("effect/Schema").optional<import("effect/Schema").String>;
38
+ readonly advice_code: import("effect/Schema").optional<import("effect/Schema").String>;
39
+ readonly network_advice_code: import("effect/Schema").optional<import("effect/Schema").String>;
40
+ readonly network_decline_code: import("effect/Schema").optional<import("effect/Schema").String>;
41
+ readonly payment_method_type: import("effect/Schema").optional<import("effect/Schema").String>;
42
+ readonly request_log_url: import("effect/Schema").optional<import("effect/Schema").String>;
43
+ }> & (new (...args: any[]) => {
44
44
  "@distilled.cloud/error/categories": {
45
45
  BadRequestError: true;
46
46
  };
47
47
  });
48
48
  /**
49
- * Card error — returned when a card cannot be charged.
49
+ * Card error -- returned when a card cannot be charged.
50
50
  * Stripe error type: "card_error"
51
51
  */
52
- export declare class CardError extends CardError_base {
52
+ export declare class CardError extends /*@__PURE__*/ CardError_base {
53
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[]) => {
54
+ declare const IdempotencyError_base: Schema.TaggedErrorClass<"IdempotencyError", {
55
+ readonly message: import("effect/Schema").optional<import("effect/Schema").String>;
56
+ readonly code: import("effect/Schema").optional<import("effect/Schema").String>;
57
+ readonly doc_url: import("effect/Schema").optional<import("effect/Schema").String>;
58
+ readonly request_log_url: import("effect/Schema").optional<import("effect/Schema").String>;
59
+ }> & (new (...args: any[]) => {
60
60
  "@distilled.cloud/error/categories": {
61
61
  ConflictError: true;
62
62
  };
63
63
  });
64
64
  /**
65
- * Idempotency error — returned when an Idempotency-Key is re-used
65
+ * Idempotency error -- returned when an Idempotency-Key is re-used
66
66
  * on a request that does not match the first request's API endpoint and parameters.
67
67
  * Stripe error type: "idempotency_error"
68
68
  */
69
- export declare class IdempotencyError extends IdempotencyError_base {
69
+ export declare class IdempotencyError extends /*@__PURE__*/ IdempotencyError_base {
70
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[]) => {
71
+ declare const InvalidRequestError_base: Schema.TaggedErrorClass<"InvalidRequestError", {
72
+ readonly message: import("effect/Schema").optional<import("effect/Schema").String>;
73
+ readonly code: import("effect/Schema").optional<import("effect/Schema").String>;
74
+ readonly param: import("effect/Schema").optional<import("effect/Schema").String>;
75
+ readonly doc_url: import("effect/Schema").optional<import("effect/Schema").String>;
76
+ readonly request_log_url: import("effect/Schema").optional<import("effect/Schema").String>;
77
+ }> & (new (...args: any[]) => {
78
78
  "@distilled.cloud/error/categories": {
79
79
  BadRequestError: true;
80
80
  };
81
81
  });
82
82
  /**
83
- * Invalid request error — returned when the request has invalid parameters.
83
+ * Invalid request error -- returned when the request has invalid parameters.
84
84
  * Stripe error type: "invalid_request_error"
85
85
  */
86
- export declare class InvalidRequestError extends InvalidRequestError_base {
86
+ export declare class InvalidRequestError extends /*@__PURE__*/ InvalidRequestError_base {
87
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[]) => {
88
+ declare const ApiError_base: Schema.TaggedErrorClass<"ApiError", {
89
+ readonly message: import("effect/Schema").optional<import("effect/Schema").String>;
90
+ readonly code: import("effect/Schema").optional<import("effect/Schema").String>;
91
+ readonly param: import("effect/Schema").optional<import("effect/Schema").String>;
92
+ readonly doc_url: import("effect/Schema").optional<import("effect/Schema").String>;
93
+ readonly request_log_url: import("effect/Schema").optional<import("effect/Schema").String>;
94
+ }> & (new (...args: any[]) => {
95
95
  "@distilled.cloud/error/categories": {
96
96
  ServerError: true;
97
97
  };
@@ -99,16 +99,16 @@ declare const ApiError_base: Schema.Class<ApiError, Schema.TaggedStruct<"ApiErro
99
99
  "@distilled.cloud/error/retryable": Category.RetryableInfo;
100
100
  });
101
101
  /**
102
- * API error — returned when something goes wrong on Stripe's end (HTTP 500+).
102
+ * API error -- returned when something goes wrong on Stripe's end (HTTP 500+).
103
103
  * Stripe error type: "api_error"
104
104
  */
105
- export declare class ApiError extends ApiError_base {
105
+ export declare class ApiError extends /*@__PURE__*/ ApiError_base {
106
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[]) => {
107
+ declare const ExternalDependencyFailed_base: Schema.TaggedErrorClass<"ExternalDependencyFailed", {
108
+ readonly message: import("effect/Schema").optional<import("effect/Schema").String>;
109
+ readonly code: import("effect/Schema").optional<import("effect/Schema").String>;
110
+ readonly doc_url: import("effect/Schema").optional<import("effect/Schema").String>;
111
+ }> & (new (...args: any[]) => {
112
112
  "@distilled.cloud/error/categories": {
113
113
  ServerError: true;
114
114
  };
@@ -116,9 +116,9 @@ declare const ExternalDependencyFailed_base: Schema.Class<ExternalDependencyFail
116
116
  "@distilled.cloud/error/retryable": Category.RetryableInfo;
117
117
  });
118
118
  /**
119
- * External dependency failed — returned when an external dependency fails (HTTP 424).
119
+ * External dependency failed -- returned when an external dependency fails (HTTP 424).
120
120
  */
121
- export declare class ExternalDependencyFailed extends ExternalDependencyFailed_base {
121
+ export declare class ExternalDependencyFailed extends /*@__PURE__*/ ExternalDependencyFailed_base {
122
122
  }
123
123
  /**
124
124
  * Stripe HTTP status code to error class mapping.
@@ -128,33 +128,33 @@ export declare const STRIPE_HTTP_STATUS_MAP: {
128
128
  readonly 402: typeof PaymentError;
129
129
  readonly 424: typeof ExternalDependencyFailed;
130
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[]) => {
131
+ declare const UnknownStripeError_base: Schema.TaggedErrorClass<"UnknownStripeError", {
132
+ readonly type: import("effect/Schema").optional<import("effect/Schema").String>;
133
+ readonly code: import("effect/Schema").optional<import("effect/Schema").String>;
134
+ readonly message: import("effect/Schema").optional<import("effect/Schema").String>;
135
+ readonly param: import("effect/Schema").optional<import("effect/Schema").String>;
136
+ readonly body: import("effect/Schema").Unknown;
137
+ }> & (new (...args: any[]) => {
138
138
  "@distilled.cloud/error/categories": {
139
139
  ServerError: true;
140
140
  };
141
141
  });
142
- export declare class UnknownStripeError extends UnknownStripeError_base {
142
+ export declare class UnknownStripeError extends /*@__PURE__*/ UnknownStripeError_base {
143
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[]) => {
144
+ declare const StripeParseError_base: Schema.TaggedErrorClass<"StripeParseError", {
145
+ readonly body: import("effect/Schema").Unknown;
146
+ readonly cause: import("effect/Schema").Unknown;
147
+ }> & (new (...args: any[]) => {
148
148
  "@distilled.cloud/error/categories": {
149
149
  ParseError: true;
150
150
  };
151
151
  });
152
- export declare class StripeParseError extends StripeParseError_base {
152
+ export declare class StripeParseError extends /*@__PURE__*/ StripeParseError_base {
153
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[]) => {
154
+ declare const StripeWebhookSignatureError_base: Schema.TaggedErrorClass<"StripeWebhookSignatureError", {
155
+ readonly message: import("effect/Schema").String;
156
+ readonly cause: import("effect/Schema").optional<import("effect/Schema").Unknown>;
157
+ }> & (new (...args: any[]) => {
158
158
  "@distilled.cloud/error/categories": {
159
159
  AuthError: true;
160
160
  };
@@ -165,12 +165,12 @@ declare const StripeWebhookSignatureError_base: Schema.Class<StripeWebhookSignat
165
165
  * This is raised by the local webhook helpers when the Stripe-Signature header
166
166
  * is missing, malformed, expired, or does not match the raw request payload.
167
167
  */
168
- export declare class StripeWebhookSignatureError extends StripeWebhookSignatureError_base {
168
+ export declare class StripeWebhookSignatureError extends /*@__PURE__*/ StripeWebhookSignatureError_base {
169
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[]) => {
170
+ declare const StripeWebhookPayloadParseError_base: Schema.TaggedErrorClass<"StripeWebhookPayloadParseError", {
171
+ readonly message: import("effect/Schema").String;
172
+ readonly cause: import("effect/Schema").optional<import("effect/Schema").Unknown>;
173
+ }> & (new (...args: any[]) => {
174
174
  "@distilled.cloud/error/categories": {
175
175
  ParseError: true;
176
176
  };
@@ -178,6 +178,6 @@ declare const StripeWebhookPayloadParseError_base: Schema.Class<StripeWebhookPay
178
178
  /**
179
179
  * Stripe webhook payload JSON parsing failed after signature verification.
180
180
  */
181
- export declare class StripeWebhookPayloadParseError extends StripeWebhookPayloadParseError_base {
181
+ export declare class StripeWebhookPayloadParseError extends /*@__PURE__*/ StripeWebhookPayloadParseError_base {
182
182
  }
183
183
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +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,QAAQ,MAAM,gCAAgC,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;;;;;;;AAExC;;;GAGG;AACH,qBAAa,YAAa,SAAQ,iBAQG;CAAG;;;;;;;;;;;;;;;;;;AAExC;;;GAGG;AACH,qBAAa,SAAU,SAAQ,cAYM;CAAG;;;;;;;;;;;AAExC;;;;GAIG;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AQ,aAAa,CAAC,qBAKa;CAAG;;;;;;;;;;;;AAExC;;;GAGG;AACH,qBAAa,mBACX,SAAQ,aAAa,CAAC,wBAMe;CAAG;;;;;;;;;;;;;;AAE1C;;;GAGG;AACH,qBAAa,QACX,SAAQ,aAAa,CAAC,aAMmD;CAAG;;;;;;;;;;;;AAE9E;;GAEG;AACH,qBAAa,wBACX,SAAQ,aAAa,CAAC,6BAImD;CAAG;AAE9E;;;GAGG;AACH,eAAO,MAAM,sBAAsB;aACjC,GAAG;aACH,GAAG;CACK,CAAC;;;;;;;;;;;;AAGX,qBAAa,kBACX,SAAQ,aAAa,CAAC,uBAMW;CAAG;;;;;;;;;AAGtC,qBAAa,gBACX,SAAQ,aAAa,CAAC,qBAGU;CAAG;;;;;;;;;AAErC;;;;;GAKG;AACH,qBAAa,2BACX,SAAQ,aAAa,CAAC,gCAMQ;CAAG;;;;;;;;;AAEnC;;GAEG;AACH,qBAAa,8BACX,SAAQ,aAAa,CAAC,mCAMS;CAAG"}
package/lib/errors.js CHANGED
@@ -1,130 +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
- */
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
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
9
  import * as Category from "@distilled.cloud/core/category";
10
- import * as Schema from "effect/Schema";
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.TaggedError()("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),
10
+ import * as Schema from "@distilled.cloud/core/schema-lite-typed";
11
+
12
+
13
+
14
+
15
+ export class PaymentError extends /*@__PURE__*/ /*@__PURE__*/ Schema.TaggedError()("PaymentError", {
16
+ message: /*@__PURE__*/ Schema.optional(Schema.String),
17
+ code: /*@__PURE__*/ Schema.optional(Schema.String),
18
+ decline_code: /*@__PURE__*/ Schema.optional(Schema.String),
19
+ charge: /*@__PURE__*/ Schema.optional(Schema.String),
20
+ param: /*@__PURE__*/ Schema.optional(Schema.String),
21
+ doc_url: /*@__PURE__*/ Schema.optional(Schema.String),
22
+ request_log_url: /*@__PURE__*/ Schema.optional(Schema.String),
23
23
  }).pipe(Category.withBadRequestError) {
24
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.TaggedError()("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),
25
+
26
+
27
+
28
+
29
+ export class CardError extends /*@__PURE__*/ /*@__PURE__*/ Schema.TaggedError()("CardError", {
30
+ message: /*@__PURE__*/ Schema.optional(Schema.String),
31
+ code: /*@__PURE__*/ Schema.optional(Schema.String),
32
+ decline_code: /*@__PURE__*/ Schema.optional(Schema.String),
33
+ charge: /*@__PURE__*/ Schema.optional(Schema.String),
34
+ param: /*@__PURE__*/ Schema.optional(Schema.String),
35
+ doc_url: /*@__PURE__*/ Schema.optional(Schema.String),
36
+ advice_code: /*@__PURE__*/ Schema.optional(Schema.String),
37
+ network_advice_code: /*@__PURE__*/ Schema.optional(Schema.String),
38
+ network_decline_code: /*@__PURE__*/ Schema.optional(Schema.String),
39
+ payment_method_type: /*@__PURE__*/ Schema.optional(Schema.String),
40
+ request_log_url: /*@__PURE__*/ Schema.optional(Schema.String),
41
41
  }).pipe(Category.withBadRequestError) {
42
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.TaggedError()("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),
43
+
44
+
45
+
46
+
47
+
48
+ export class IdempotencyError extends /*@__PURE__*/ /*@__PURE__*/ Schema.TaggedError()("IdempotencyError", {
49
+ message: /*@__PURE__*/ Schema.optional(Schema.String),
50
+ code: /*@__PURE__*/ Schema.optional(Schema.String),
51
+ doc_url: /*@__PURE__*/ Schema.optional(Schema.String),
52
+ request_log_url: /*@__PURE__*/ Schema.optional(Schema.String),
53
53
  }).pipe(Category.withConflictError) {
54
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.TaggedError()("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),
55
+
56
+
57
+
58
+
59
+ export class InvalidRequestError extends /*@__PURE__*/ /*@__PURE__*/ Schema.TaggedError()("InvalidRequestError", {
60
+ message: /*@__PURE__*/ Schema.optional(Schema.String),
61
+ code: /*@__PURE__*/ Schema.optional(Schema.String),
62
+ param: /*@__PURE__*/ Schema.optional(Schema.String),
63
+ doc_url: /*@__PURE__*/ Schema.optional(Schema.String),
64
+ request_log_url: /*@__PURE__*/ Schema.optional(Schema.String),
65
65
  }).pipe(Category.withBadRequestError) {
66
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.TaggedError()("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()) {
67
+
68
+
69
+
70
+
71
+ export class ApiError extends /*@__PURE__*/ /*@__PURE__*/ Schema.TaggedError()("ApiError", {
72
+ message: /*@__PURE__*/ Schema.optional(Schema.String),
73
+ code: /*@__PURE__*/ Schema.optional(Schema.String),
74
+ param: /*@__PURE__*/ Schema.optional(Schema.String),
75
+ doc_url: /*@__PURE__*/ Schema.optional(Schema.String),
76
+ request_log_url: /*@__PURE__*/ Schema.optional(Schema.String),
77
+ }).pipe(Category.withServerError, /*@__PURE__*/ Category.withRetryable()) {
78
78
  }
79
- /**
80
- * External dependency failed — returned when an external dependency fails (HTTP 424).
81
- */
82
- export class ExternalDependencyFailed extends Schema.TaggedError()("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()) {
79
+
80
+
81
+
82
+ export class ExternalDependencyFailed extends /*@__PURE__*/ /*@__PURE__*/ Schema.TaggedError()("ExternalDependencyFailed", {
83
+ message: /*@__PURE__*/ Schema.optional(Schema.String),
84
+ code: /*@__PURE__*/ Schema.optional(Schema.String),
85
+ doc_url: /*@__PURE__*/ Schema.optional(Schema.String),
86
+ }).pipe(Category.withServerError, /*@__PURE__*/ Category.withRetryable()) {
87
87
  }
88
- /**
89
- * Stripe HTTP status code to error class mapping.
90
- * Extends core HTTP_STATUS_MAP with Stripe-specific statuses.
91
- */
88
+
89
+
90
+
91
+
92
92
  export const STRIPE_HTTP_STATUS_MAP = {
93
93
  402: PaymentError,
94
94
  424: ExternalDependencyFailed,
95
95
  };
96
- // Unknown Stripe error — returned when an error type is not recognized
97
- export class UnknownStripeError extends Schema.TaggedError()("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),
96
+ // Unknown Stripe error -- returned when an error type is not recognized
97
+ export class UnknownStripeError extends /*@__PURE__*/ /*@__PURE__*/ Schema.TaggedError()("UnknownStripeError", {
98
+ type: /*@__PURE__*/ Schema.optional(Schema.String),
99
+ code: /*@__PURE__*/ Schema.optional(Schema.String),
100
+ message: /*@__PURE__*/ Schema.optional(Schema.String),
101
+ param: /*@__PURE__*/ Schema.optional(Schema.String),
102
102
  body: Schema.Unknown,
103
103
  }).pipe(Category.withServerError) {
104
104
  }
105
105
  // Schema parse error wrapper
106
- export class StripeParseError extends Schema.TaggedError()("StripeParseError", {
106
+ export class StripeParseError extends /*@__PURE__*/ /*@__PURE__*/ Schema.TaggedError()("StripeParseError", {
107
107
  body: Schema.Unknown,
108
108
  cause: Schema.Unknown,
109
109
  }).pipe(Category.withParseError) {
110
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.TaggedError()("StripeWebhookSignatureError", {
111
+
112
+
113
+
114
+
115
+
116
+
117
+ export class StripeWebhookSignatureError extends /*@__PURE__*/ /*@__PURE__*/ Schema.TaggedError()("StripeWebhookSignatureError", {
118
118
  message: Schema.String,
119
- cause: Schema.optional(Schema.Unknown),
119
+ cause: /*@__PURE__*/ Schema.optional(Schema.Unknown),
120
120
  }).pipe(Category.withAuthError) {
121
121
  }
122
- /**
123
- * Stripe webhook payload JSON parsing failed after signature verification.
124
- */
125
- export class StripeWebhookPayloadParseError extends Schema.TaggedError()("StripeWebhookPayloadParseError", {
122
+
123
+
124
+
125
+ export class StripeWebhookPayloadParseError extends /*@__PURE__*/ /*@__PURE__*/ Schema.TaggedError()("StripeWebhookPayloadParseError", {
126
126
  message: Schema.String,
127
- cause: Schema.optional(Schema.Unknown),
127
+ cause: /*@__PURE__*/ Schema.optional(Schema.Unknown),
128
128
  }).pipe(Category.withParseError) {
129
129
  }
130
130
  //# sourceMappingURL=errors.js.map
package/lib/errors.js.map CHANGED
@@ -1 +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,QAAQ,MAAM,gCAAgC,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM,CAAC,WAAW,EAAgB,CAAC,cAAc,EAAE;IACnF,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,C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AE,MAAM,CAAC,MAAM;IACtB,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;CACrD,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;CAAG"}
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @distilled.cloud/stripe — Stripe SDK for Effect.
2
+ * @distilled.cloud/stripe -- Stripe SDK for Effect.
3
3
  *
4
4
  * `./services` is generated by `scripts/generate.ts` from the Smithy model
5
5
  * in `.generated-specs` (written by `scripts/convert.ts` from the Stripe