@castleio/sdk 3.1.0 → 3.2.0

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/README.md CHANGED
@@ -342,6 +342,7 @@ All HTTP/API exceptions inherit from `APIError`. `ConfigurationError` (setup pro
342
342
  | `InvalidParametersError` | `422` response with validation details. |
343
343
  | `InvalidRequestTokenError` | `422` — the `request_token` is missing or invalid. |
344
344
  | `RateLimitError` | `429` — back off and retry. |
345
+ | `PaymentRequiredError` | `402` response. |
345
346
  | `InternalServerError` | `5xx` response from Castle. |
346
347
  | `WebhookVerificationError` | A webhook signature did not match. |
347
348
 
package/dist/index.d.mts CHANGED
@@ -940,6 +940,9 @@ declare class InvalidRequestTokenError extends InvalidParametersError {
940
940
  declare class RateLimitError extends APIError {
941
941
  constructor(message: string);
942
942
  }
943
+ declare class PaymentRequiredError extends APIError {
944
+ constructor(message: string);
945
+ }
943
946
  declare class InternalServerError extends APIError {
944
947
  constructor(message: string);
945
948
  }
@@ -963,4 +966,4 @@ declare const SecureModeService: {
963
966
  call: (userId: string, configuration: Configuration) => string;
964
967
  };
965
968
 
966
- export { APIError, Action, type AddressPayload, BadRequestError, type BatchUpsertListItemsPayload, type Bucket, Castle, type ConfigurationProperties as CastleConfiguration, ConfigurationError, ContextPrepareService, type CountBucket, type CountListItemsPayload, type CreateListItemPayload, type CreateListPayload, DEFAULT_ALLOWLIST, DEFAULT_API_URL, DEFAULT_TIMEOUT, type DataType, type DateHistogramBucket, type DeleteUserDataPayload, type Device, type Event, EventAuthenticationMethod, EventSignal, EventStatus, EventType, FailoverStrategy, type FilterPayload, ForbiddenError, type FullListItemPayload, type Func, type GetEventsSchemaResponse, type GroupEvent, type GroupEventsPayload, type GroupEventsResponse, InternalServerError, InvalidParametersError, InvalidRequestTokenError, type List, type ListItem, type ListItemAuthorType, type ListItemMode, type ListItemPayload, type ListPayload, type LogPayload, NotFoundError, type NumberLike, type Op, PayloadPrepareService, type RangeBucket, RateLimitError, type RequestUserDataPayload, type RiskPayload, type RiskPolicy, type RiskPolicyFailover, type SearchEventsExistsQueryFilter, type SearchEventsOrQueryFilter, type SearchEventsPayload, type SearchEventsQueryFilter, SearchEventsQueryFilterOperator, SearchEventsQueryType, type SearchEventsRangeQueryFilter, type SearchEventsRelativeRangeQueryFilter, type SearchEventsResponse, type SearchField, type SearchListItemsPayload, type SearchListsPayload, SecureModeService, type Signals, type Source, TRUSTED_PROXIES, type TransactionPayload, type Transform, UnauthorizedError, type UpdateListItemPayload, type UpdateListPayload, UserUnauthorizedError, WebhookVerificationError, WebhookVerifyService };
969
+ export { APIError, Action, type AddressPayload, BadRequestError, type BatchUpsertListItemsPayload, type Bucket, Castle, type ConfigurationProperties as CastleConfiguration, ConfigurationError, ContextPrepareService, type CountBucket, type CountListItemsPayload, type CreateListItemPayload, type CreateListPayload, DEFAULT_ALLOWLIST, DEFAULT_API_URL, DEFAULT_TIMEOUT, type DataType, type DateHistogramBucket, type DeleteUserDataPayload, type Device, type Event, EventAuthenticationMethod, EventSignal, EventStatus, EventType, FailoverStrategy, type FilterPayload, ForbiddenError, type FullListItemPayload, type Func, type GetEventsSchemaResponse, type GroupEvent, type GroupEventsPayload, type GroupEventsResponse, InternalServerError, InvalidParametersError, InvalidRequestTokenError, type List, type ListItem, type ListItemAuthorType, type ListItemMode, type ListItemPayload, type ListPayload, type LogPayload, NotFoundError, type NumberLike, type Op, PayloadPrepareService, PaymentRequiredError, type RangeBucket, RateLimitError, type RequestUserDataPayload, type RiskPayload, type RiskPolicy, type RiskPolicyFailover, type SearchEventsExistsQueryFilter, type SearchEventsOrQueryFilter, type SearchEventsPayload, type SearchEventsQueryFilter, SearchEventsQueryFilterOperator, SearchEventsQueryType, type SearchEventsRangeQueryFilter, type SearchEventsRelativeRangeQueryFilter, type SearchEventsResponse, type SearchField, type SearchListItemsPayload, type SearchListsPayload, SecureModeService, type Signals, type Source, TRUSTED_PROXIES, type TransactionPayload, type Transform, UnauthorizedError, type UpdateListItemPayload, type UpdateListPayload, UserUnauthorizedError, WebhookVerificationError, WebhookVerifyService };
package/dist/index.d.ts CHANGED
@@ -940,6 +940,9 @@ declare class InvalidRequestTokenError extends InvalidParametersError {
940
940
  declare class RateLimitError extends APIError {
941
941
  constructor(message: string);
942
942
  }
943
+ declare class PaymentRequiredError extends APIError {
944
+ constructor(message: string);
945
+ }
943
946
  declare class InternalServerError extends APIError {
944
947
  constructor(message: string);
945
948
  }
@@ -963,4 +966,4 @@ declare const SecureModeService: {
963
966
  call: (userId: string, configuration: Configuration) => string;
964
967
  };
965
968
 
966
- export { APIError, Action, type AddressPayload, BadRequestError, type BatchUpsertListItemsPayload, type Bucket, Castle, type ConfigurationProperties as CastleConfiguration, ConfigurationError, ContextPrepareService, type CountBucket, type CountListItemsPayload, type CreateListItemPayload, type CreateListPayload, DEFAULT_ALLOWLIST, DEFAULT_API_URL, DEFAULT_TIMEOUT, type DataType, type DateHistogramBucket, type DeleteUserDataPayload, type Device, type Event, EventAuthenticationMethod, EventSignal, EventStatus, EventType, FailoverStrategy, type FilterPayload, ForbiddenError, type FullListItemPayload, type Func, type GetEventsSchemaResponse, type GroupEvent, type GroupEventsPayload, type GroupEventsResponse, InternalServerError, InvalidParametersError, InvalidRequestTokenError, type List, type ListItem, type ListItemAuthorType, type ListItemMode, type ListItemPayload, type ListPayload, type LogPayload, NotFoundError, type NumberLike, type Op, PayloadPrepareService, type RangeBucket, RateLimitError, type RequestUserDataPayload, type RiskPayload, type RiskPolicy, type RiskPolicyFailover, type SearchEventsExistsQueryFilter, type SearchEventsOrQueryFilter, type SearchEventsPayload, type SearchEventsQueryFilter, SearchEventsQueryFilterOperator, SearchEventsQueryType, type SearchEventsRangeQueryFilter, type SearchEventsRelativeRangeQueryFilter, type SearchEventsResponse, type SearchField, type SearchListItemsPayload, type SearchListsPayload, SecureModeService, type Signals, type Source, TRUSTED_PROXIES, type TransactionPayload, type Transform, UnauthorizedError, type UpdateListItemPayload, type UpdateListPayload, UserUnauthorizedError, WebhookVerificationError, WebhookVerifyService };
969
+ export { APIError, Action, type AddressPayload, BadRequestError, type BatchUpsertListItemsPayload, type Bucket, Castle, type ConfigurationProperties as CastleConfiguration, ConfigurationError, ContextPrepareService, type CountBucket, type CountListItemsPayload, type CreateListItemPayload, type CreateListPayload, DEFAULT_ALLOWLIST, DEFAULT_API_URL, DEFAULT_TIMEOUT, type DataType, type DateHistogramBucket, type DeleteUserDataPayload, type Device, type Event, EventAuthenticationMethod, EventSignal, EventStatus, EventType, FailoverStrategy, type FilterPayload, ForbiddenError, type FullListItemPayload, type Func, type GetEventsSchemaResponse, type GroupEvent, type GroupEventsPayload, type GroupEventsResponse, InternalServerError, InvalidParametersError, InvalidRequestTokenError, type List, type ListItem, type ListItemAuthorType, type ListItemMode, type ListItemPayload, type ListPayload, type LogPayload, NotFoundError, type NumberLike, type Op, PayloadPrepareService, PaymentRequiredError, type RangeBucket, RateLimitError, type RequestUserDataPayload, type RiskPayload, type RiskPolicy, type RiskPolicyFailover, type SearchEventsExistsQueryFilter, type SearchEventsOrQueryFilter, type SearchEventsPayload, type SearchEventsQueryFilter, SearchEventsQueryFilterOperator, SearchEventsQueryType, type SearchEventsRangeQueryFilter, type SearchEventsRelativeRangeQueryFilter, type SearchEventsResponse, type SearchField, type SearchListItemsPayload, type SearchListsPayload, SecureModeService, type Signals, type Source, TRUSTED_PROXIES, type TransactionPayload, type Transform, UnauthorizedError, type UpdateListItemPayload, type UpdateListPayload, UserUnauthorizedError, WebhookVerificationError, WebhookVerifyService };
package/dist/index.js CHANGED
@@ -50,6 +50,7 @@ __export(index_exports, {
50
50
  InvalidRequestTokenError: () => InvalidRequestTokenError,
51
51
  NotFoundError: () => NotFoundError,
52
52
  PayloadPrepareService: () => PayloadPrepareService,
53
+ PaymentRequiredError: () => PaymentRequiredError,
53
54
  RateLimitError: () => RateLimitError,
54
55
  SearchEventsQueryFilterOperator: () => SearchEventsQueryFilterOperator,
55
56
  SearchEventsQueryType: () => SearchEventsQueryType,
@@ -145,6 +146,12 @@ var RateLimitError = class extends APIError {
145
146
  this.name = "RateLimitError";
146
147
  }
147
148
  };
149
+ var PaymentRequiredError = class extends APIError {
150
+ constructor(message) {
151
+ super(message);
152
+ this.name = "PaymentRequiredError";
153
+ }
154
+ };
148
155
  var InternalServerError = class extends APIError {
149
156
  constructor(message) {
150
157
  super(message);
@@ -210,6 +217,7 @@ var LoggerService = {
210
217
  var RESPONSE_ERRORS = {
211
218
  "400": BadRequestError,
212
219
  "401": UnauthorizedError,
220
+ "402": PaymentRequiredError,
213
221
  "403": ForbiddenError,
214
222
  "404": NotFoundError,
215
223
  "419": UserUnauthorizedError,
@@ -485,7 +493,7 @@ var IPsExtractService = {
485
493
  };
486
494
 
487
495
  // package.json
488
- var version = "3.1.0";
496
+ var version = "3.2.0";
489
497
 
490
498
  // src/context/services/context-get-default.service.ts
491
499
  var requestContextData = (request, configuration) => {
@@ -1525,6 +1533,7 @@ var PayloadPrepareService = {
1525
1533
  InvalidRequestTokenError,
1526
1534
  NotFoundError,
1527
1535
  PayloadPrepareService,
1536
+ PaymentRequiredError,
1528
1537
  RateLimitError,
1529
1538
  SearchEventsQueryFilterOperator,
1530
1539
  SearchEventsQueryType,