@pristine-ts/stripe 2.0.3 → 2.0.5

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.
@@ -1 +1,2 @@
1
1
  export * from "./stripe-authentication.error";
2
+ export * from "./stripe-error-code.enum";
@@ -1,10 +1,9 @@
1
- import { HttpError } from "@pristine-ts/networking";
1
+ import { PristineError } from "@pristine-ts/common";
2
2
  /**
3
- * This Error represents an error when authenticating with Stripe.
3
+ * This Error represents an error when authenticating with Stripe. Wraps the underlying
4
+ * Stripe API response status in the `httpStatus` slot so the framework's
5
+ * `HttpErrorResponder` produces a meaningful response automatically.
4
6
  */
5
- export declare class StripeAuthenticationError extends HttpError {
6
- readonly httpStatus: number;
7
- readonly message: string;
8
- readonly errors?: any[] | undefined;
9
- constructor(httpStatus: number, message: string, errors?: any[] | undefined);
7
+ export declare class StripeAuthenticationError extends PristineError {
8
+ constructor(httpStatus: number, message: string, errors?: any[]);
10
9
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Error-code catalog owned by `@pristine-ts/stripe`. Surfaced via `PristineErrorOptions.code`
3
+ * (typed `PristineErrorCode | string`, so any enum value is accepted).
4
+ *
5
+ * Codes here describe failures from the Stripe client wrapped by this module.
6
+ */
7
+ export declare enum StripeErrorCode {
8
+ StripeAuthenticationFailed = "STRIPE_AUTHENTICATION_FAILED"
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pristine-ts/stripe",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "",
5
5
  "module": "dist/lib/esm/stripe.module.js",
6
6
  "main": "dist/lib/cjs/stripe.module.js",
@@ -12,10 +12,10 @@
12
12
  "test:cov": "jest --coverage"
13
13
  },
14
14
  "dependencies": {
15
- "@pristine-ts/common": "^2.0.3",
16
- "@pristine-ts/core": "^2.0.3",
17
- "@pristine-ts/logging": "^2.0.3",
18
- "@pristine-ts/networking": "^2.0.3",
15
+ "@pristine-ts/common": "^2.0.5",
16
+ "@pristine-ts/core": "^2.0.5",
17
+ "@pristine-ts/logging": "^2.0.5",
18
+ "@pristine-ts/networking": "^2.0.5",
19
19
  "stripe": "^14.2.0"
20
20
  },
21
21
  "files": [
@@ -60,7 +60,7 @@
60
60
  "src/*.{js,ts}"
61
61
  ]
62
62
  },
63
- "gitHead": "c741bb430ab8f6286068dc3870fcadf4cefd0023",
63
+ "gitHead": "9a960b330ee1961bb9a6151ce50257c4d8ccd48d",
64
64
  "repository": {
65
65
  "type": "git",
66
66
  "url": "https://github.com/magieno/pristine-ts.git",