@paid-ai/paid-node 0.3.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,8 +60,8 @@ class PaidClient {
60
60
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
61
61
  "X-Fern-Language": "JavaScript",
62
62
  "X-Fern-SDK-Name": "@paid-ai/paid-node",
63
- "X-Fern-SDK-Version": "0.3.1",
64
- "User-Agent": "@paid-ai/paid-node/0.3.1",
63
+ "X-Fern-SDK-Version": "0.4.1",
64
+ "User-Agent": "@paid-ai/paid-node/0.4.1",
65
65
  "X-Fern-Runtime": core.RUNTIME.type,
66
66
  "X-Fern-Runtime-Version": core.RUNTIME.version,
67
67
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.js";
5
+ import * as Paid from "../index.js";
6
+ import * as core from "../../core/index.js";
7
+ export declare class BadRequestError extends errors.PaidError {
8
+ constructor(body: Paid.Error_, rawResponse?: core.RawResponse);
9
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.BadRequestError = void 0;
40
+ const errors = __importStar(require("../../errors/index.js"));
41
+ class BadRequestError extends errors.PaidError {
42
+ constructor(body, rawResponse) {
43
+ super({
44
+ message: "BadRequestError",
45
+ statusCode: 400,
46
+ body: body,
47
+ rawResponse: rawResponse,
48
+ });
49
+ Object.setPrototypeOf(this, BadRequestError.prototype);
50
+ }
51
+ }
52
+ exports.BadRequestError = BadRequestError;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.js";
5
+ import * as Paid from "../index.js";
6
+ import * as core from "../../core/index.js";
7
+ export declare class NotFoundError extends errors.PaidError {
8
+ constructor(body: Paid.Error_, rawResponse?: core.RawResponse);
9
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.NotFoundError = void 0;
40
+ const errors = __importStar(require("../../errors/index.js"));
41
+ class NotFoundError extends errors.PaidError {
42
+ constructor(body, rawResponse) {
43
+ super({
44
+ message: "NotFoundError",
45
+ statusCode: 404,
46
+ body: body,
47
+ rawResponse: rawResponse,
48
+ });
49
+ Object.setPrototypeOf(this, NotFoundError.prototype);
50
+ }
51
+ }
52
+ exports.NotFoundError = NotFoundError;
@@ -1 +1,3 @@
1
1
  export * from "./ForbiddenError.js";
2
+ export * from "./BadRequestError.js";
3
+ export * from "./NotFoundError.js";
@@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ForbiddenError.js"), exports);
18
+ __exportStar(require("./BadRequestError.js"), exports);
19
+ __exportStar(require("./NotFoundError.js"), exports);
@@ -5,6 +5,13 @@ export interface Signal {
5
5
  event_name?: string;
6
6
  agent_id?: string;
7
7
  external_agent_id?: string;
8
+ /** Deprecated. The external customer id. Use `external_customer_id` or `internal_customer_id` instead. */
8
9
  customer_id?: string;
9
10
  data?: Record<string, unknown>;
11
+ /** A unique key to ensure idempotent signal processing */
12
+ idempotency_key?: string;
13
+ /** Paid's internal customer ID */
14
+ internal_customer_id?: string;
15
+ /** Your system's customer ID */
16
+ external_customer_id?: string;
10
17
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.3.1";
1
+ export declare const SDK_VERSION = "0.4.1";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.3.1";
4
+ exports.SDK_VERSION = "0.4.1";
@@ -24,8 +24,8 @@ export class PaidClient {
24
24
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
25
25
  "X-Fern-Language": "JavaScript",
26
26
  "X-Fern-SDK-Name": "@paid-ai/paid-node",
27
- "X-Fern-SDK-Version": "0.3.1",
28
- "User-Agent": "@paid-ai/paid-node/0.3.1",
27
+ "X-Fern-SDK-Version": "0.4.1",
28
+ "User-Agent": "@paid-ai/paid-node/0.4.1",
29
29
  "X-Fern-Runtime": core.RUNTIME.type,
30
30
  "X-Fern-Runtime-Version": core.RUNTIME.version,
31
31
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.mjs";
5
+ import * as Paid from "../index.mjs";
6
+ import * as core from "../../core/index.mjs";
7
+ export declare class BadRequestError extends errors.PaidError {
8
+ constructor(body: Paid.Error_, rawResponse?: core.RawResponse);
9
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.mjs";
5
+ export class BadRequestError extends errors.PaidError {
6
+ constructor(body, rawResponse) {
7
+ super({
8
+ message: "BadRequestError",
9
+ statusCode: 400,
10
+ body: body,
11
+ rawResponse: rawResponse,
12
+ });
13
+ Object.setPrototypeOf(this, BadRequestError.prototype);
14
+ }
15
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.mjs";
5
+ import * as Paid from "../index.mjs";
6
+ import * as core from "../../core/index.mjs";
7
+ export declare class NotFoundError extends errors.PaidError {
8
+ constructor(body: Paid.Error_, rawResponse?: core.RawResponse);
9
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.mjs";
5
+ export class NotFoundError extends errors.PaidError {
6
+ constructor(body, rawResponse) {
7
+ super({
8
+ message: "NotFoundError",
9
+ statusCode: 404,
10
+ body: body,
11
+ rawResponse: rawResponse,
12
+ });
13
+ Object.setPrototypeOf(this, NotFoundError.prototype);
14
+ }
15
+ }
@@ -1 +1,3 @@
1
1
  export * from "./ForbiddenError.mjs";
2
+ export * from "./BadRequestError.mjs";
3
+ export * from "./NotFoundError.mjs";
@@ -1 +1,3 @@
1
1
  export * from "./ForbiddenError.mjs";
2
+ export * from "./BadRequestError.mjs";
3
+ export * from "./NotFoundError.mjs";
@@ -5,6 +5,13 @@ export interface Signal {
5
5
  event_name?: string;
6
6
  agent_id?: string;
7
7
  external_agent_id?: string;
8
+ /** Deprecated. The external customer id. Use `external_customer_id` or `internal_customer_id` instead. */
8
9
  customer_id?: string;
9
10
  data?: Record<string, unknown>;
11
+ /** A unique key to ensure idempotent signal processing */
12
+ idempotency_key?: string;
13
+ /** Paid's internal customer ID */
14
+ internal_customer_id?: string;
15
+ /** Your system's customer ID */
16
+ external_customer_id?: string;
10
17
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.3.1";
1
+ export declare const SDK_VERSION = "0.4.1";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.3.1";
1
+ export const SDK_VERSION = "0.4.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paid-ai/paid-node",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "private": false,
5
5
  "repository": "https://github.com/paid-ai/paid-node",
6
6
  "type": "commonjs",