@extrahorizon/javascript-sdk 8.12.0-dev-171-2fc7ff8 → 8.12.0-dev-173-29c2711

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/build/errors.d.ts CHANGED
@@ -240,6 +240,8 @@ export declare class FirebaseConnectionError extends BadGatewayServerError {
240
240
  }
241
241
  export declare class ServiceUnavailableError extends ApiError {
242
242
  }
243
+ export declare class ServiceUnreachableError extends ServiceUnavailableError {
244
+ }
243
245
  export declare class OidcIdTokenError extends ServiceUnavailableError {
244
246
  }
245
247
  export declare class InvalidGrantError extends OAuth2LoginError {
@@ -270,6 +272,7 @@ export declare const OAuth2ErrorClassMap: {
270
272
  };
271
273
  export declare const ErrorClassMap: {
272
274
  1: typeof ServerError;
275
+ 4: typeof ServiceUnreachableError;
273
276
  10: typeof NoPermissionError;
274
277
  11: typeof RemoveFieldError;
275
278
  12: typeof IDFormatError;
@@ -779,6 +779,8 @@ class FirebaseConnectionError extends BadGatewayServerError {
779
779
  // 503 Service Unavailable Error
780
780
  class ServiceUnavailableError extends ApiError {
781
781
  }
782
+ class ServiceUnreachableError extends ServiceUnavailableError {
783
+ }
782
784
  class OidcIdTokenError extends ServiceUnavailableError {
783
785
  }
784
786
  // OAuth2Login Errors
@@ -866,6 +868,7 @@ const OAuth2ErrorClassMap = {
866
868
  };
867
869
  const ErrorClassMap = {
868
870
  1: ServerError,
871
+ 4: ServiceUnreachableError,
869
872
  10: NoPermissionError,
870
873
  11: RemoveFieldError,
871
874
  12: IDFormatError,
@@ -1596,6 +1599,7 @@ async function findAllGeneric(find, options, level = 1) {
1596
1599
  // Extra check is needed because this function is call recursively with updated RQL
1597
1600
  // But on the first run, we need to set the limit to the max to optimize
1598
1601
  const result = await find({
1602
+ ...options,
1599
1603
  rql: (options === null || options === void 0 ? void 0 : options.rql) && options.rql.includes('limit(') ?
1600
1604
  options.rql :
1601
1605
  rqlBuilder(options === null || options === void 0 ? void 0 : options.rql).limit(MAX_LIMIT).build(),
@@ -1607,6 +1611,7 @@ async function findAllGeneric(find, options, level = 1) {
1607
1611
  [
1608
1612
  ...result.data,
1609
1613
  ...(await findAllGeneric(find, {
1614
+ ...options,
1610
1615
  rql: rqlBuilder(options === null || options === void 0 ? void 0 : options.rql)
1611
1616
  .limit(result.page.limit, result.page.offset + result.page.limit)
1612
1617
  .build(),
@@ -1618,6 +1623,7 @@ function addPagersFn(find, options, pagedResult) {
1618
1623
  let result = pagedResult;
1619
1624
  async function previous() {
1620
1625
  result = await find({
1626
+ ...options,
1621
1627
  rql: rqlBuilder(options === null || options === void 0 ? void 0 : options.rql)
1622
1628
  .limit(result.page.limit, result.page.offset > 0 ? result.page.offset - result.page.limit : 0)
1623
1629
  .build(),
@@ -1626,6 +1632,7 @@ function addPagersFn(find, options, pagedResult) {
1626
1632
  }
1627
1633
  async function next() {
1628
1634
  result = await find({
1635
+ ...options,
1629
1636
  rql: rqlBuilder(options === null || options === void 0 ? void 0 : options.rql)
1630
1637
  .limit(result.page.limit, result.page.offset + result.page.limit < result.page.total ?
1631
1638
  result.page.offset + result.page.limit :
@@ -5652,7 +5659,7 @@ const templatesV2Service = (httpWithAuth) => {
5652
5659
  };
5653
5660
  };
5654
5661
 
5655
- const version = '8.12.0-dev-171-2fc7ff8';
5662
+ const version = '8.12.0-dev-173-29c2711';
5656
5663
 
5657
5664
  /**
5658
5665
  * Create ExtraHorizon client.
@@ -5921,6 +5928,7 @@ exports.ResourceUnknownError = ResourceUnknownError;
5921
5928
  exports.ServerError = ServerError;
5922
5929
  exports.ServiceNotFoundError = ServiceNotFoundError;
5923
5930
  exports.ServiceUnavailableError = ServiceUnavailableError;
5931
+ exports.ServiceUnreachableError = ServiceUnreachableError;
5924
5932
  exports.StatusInUseError = StatusInUseError;
5925
5933
  exports.StripePaymentMethodError = StripePaymentMethodError;
5926
5934
  exports.StripeRequestError = StripeRequestError;
package/build/index.mjs CHANGED
@@ -749,6 +749,8 @@ class FirebaseConnectionError extends BadGatewayServerError {
749
749
  // 503 Service Unavailable Error
750
750
  class ServiceUnavailableError extends ApiError {
751
751
  }
752
+ class ServiceUnreachableError extends ServiceUnavailableError {
753
+ }
752
754
  class OidcIdTokenError extends ServiceUnavailableError {
753
755
  }
754
756
  // OAuth2Login Errors
@@ -836,6 +838,7 @@ const OAuth2ErrorClassMap = {
836
838
  };
837
839
  const ErrorClassMap = {
838
840
  1: ServerError,
841
+ 4: ServiceUnreachableError,
839
842
  10: NoPermissionError,
840
843
  11: RemoveFieldError,
841
844
  12: IDFormatError,
@@ -1566,6 +1569,7 @@ async function findAllGeneric(find, options, level = 1) {
1566
1569
  // Extra check is needed because this function is call recursively with updated RQL
1567
1570
  // But on the first run, we need to set the limit to the max to optimize
1568
1571
  const result = await find({
1572
+ ...options,
1569
1573
  rql: (options === null || options === void 0 ? void 0 : options.rql) && options.rql.includes('limit(') ?
1570
1574
  options.rql :
1571
1575
  rqlBuilder(options === null || options === void 0 ? void 0 : options.rql).limit(MAX_LIMIT).build(),
@@ -1577,6 +1581,7 @@ async function findAllGeneric(find, options, level = 1) {
1577
1581
  [
1578
1582
  ...result.data,
1579
1583
  ...(await findAllGeneric(find, {
1584
+ ...options,
1580
1585
  rql: rqlBuilder(options === null || options === void 0 ? void 0 : options.rql)
1581
1586
  .limit(result.page.limit, result.page.offset + result.page.limit)
1582
1587
  .build(),
@@ -1588,6 +1593,7 @@ function addPagersFn(find, options, pagedResult) {
1588
1593
  let result = pagedResult;
1589
1594
  async function previous() {
1590
1595
  result = await find({
1596
+ ...options,
1591
1597
  rql: rqlBuilder(options === null || options === void 0 ? void 0 : options.rql)
1592
1598
  .limit(result.page.limit, result.page.offset > 0 ? result.page.offset - result.page.limit : 0)
1593
1599
  .build(),
@@ -1596,6 +1602,7 @@ function addPagersFn(find, options, pagedResult) {
1596
1602
  }
1597
1603
  async function next() {
1598
1604
  result = await find({
1605
+ ...options,
1599
1606
  rql: rqlBuilder(options === null || options === void 0 ? void 0 : options.rql)
1600
1607
  .limit(result.page.limit, result.page.offset + result.page.limit < result.page.total ?
1601
1608
  result.page.offset + result.page.limit :
@@ -5622,7 +5629,7 @@ const templatesV2Service = (httpWithAuth) => {
5622
5629
  };
5623
5630
  };
5624
5631
 
5625
- const version = '8.12.0-dev-171-2fc7ff8';
5632
+ const version = '8.12.0-dev-173-29c2711';
5626
5633
 
5627
5634
  /**
5628
5635
  * Create ExtraHorizon client.
@@ -5802,4 +5809,4 @@ const parseStoredCredentials = (fileContent) => exhCredentialsDecoder(fileConten
5802
5809
  .filter(line => line.length === 2)
5803
5810
  .reduce((memo, [key, value]) => ({ ...memo, [key]: value }), {}));
5804
5811
 
5805
- export { AccessTokenExpiredError, AccessTokenUnknownError, ActionType, ActivationRequestLimitError, ActivationRequestTimeoutError, ActivationUnknownError, AlreadyActivatedError, ApiError, ApiFunctionRequestMethod, ApiRequestErrorType, AppStoreTransactionAlreadyLinked, ApplicationNotAuthenticatedError, ApplicationType, ApplicationUnknownError, AuthenticationError, AuthorizationCodeExpiredError, AuthorizationUnknownError, BadGatewayServerError, BadRequestError, BodyFormatError, CallbackNotValidError, Comorbidities, DefaultLocalizationMissingError, DisabledForOidcUsersError, DuplicateRequestError, EmailUnknownError, EmailUsedError, EmptyBodyError, ErrorClassMap, FieldFormatError, FieldType, FileTooLargeError, FirebaseConnectionError, FirebaseInvalidPlatformDataError, ForbiddenError, ForgotPasswordRequestLimitError, ForgotPasswordRequestTimeoutError, FunctionPermissionMode, Gender, GlobalPermissionName, IDFormatError, IllegalArgumentError, IllegalStateError, Impediments, IncorrectPinCodeError, InvalidClientError, InvalidCurrencyForProductPrice, InvalidGrantError, InvalidMfaCodeError, InvalidMfaTokenError, InvalidNonceError, InvalidPKCEError, InvalidPresenceTokenError, InvalidReceiptDataError, InvalidRequestError, InvalidTokenError, JSONSchemaType, LambdaInvocationError, LocalizationKeyMissingError, LockedDocumentError, LoginAttemptStatus, LoginFreezeError, LoginTimeoutError, MedicationFrequency, MedicationUnit, MfaReattemptDelayError, MfaRequiredError, MissingPKCEVerifierError, MissingRequiredFieldsError, NewMFARequiredError, NewPasswordHashUnknownError, NewPasswordPinCodeUnknownError, NoConfiguredAppStoreProduct, NoConfiguredPlayStoreProduct, NoMatchingPlayStoreLinkedSubscription, NoPermissionError, NotActivatedError, NotEnoughMfaMethodsError, NotFoundError, OAuth2ClientIdError, OAuth2ClientSecretError, OAuth2ErrorClassMap, OAuth2LoginError, OAuth2MissingClientCredentialsError, OauthKeyError, OauthSignatureError, OauthTokenError, OidcIdTokenError, OidcInvalidAuthorizationCodeError, OidcProviderResponseError, OrderSchemaStatus, PasswordError, PaymentIntentCreationSchemaPaymentMethodType, PaymentIntentCreationSchemaSetupPaymentMethodReuse, PinCodesNotEnabledError, PlayStoreTransactionAlreadyLinked, ProfileActivity, ProfileAlreadyExistsError, QueuedMailStatus, RefreshTokenExpiredError, RefreshTokenUnknownError, RemoveFieldError, RequestAbortedError, ResourceAlreadyExistsError, ResourceUnknownError, Results, ServerError, ServiceNotFoundError, ServiceUnavailableError, StatusInUseError, StripePaymentMethodError, StripeRequestError, SubscriptionEntitlementSource, SubscriptionEntitlementStatus, SubscriptionEntitlementStatusCategory, SubscriptionEventSource, SubscriptionEventType, SupportedLanguageCodes, TaskStatus, TemplateFillingError, TemplateResolvingError, TemplateSyntaxError, TokenNotDeleteableError, TokenPermission, TooManyFailedAttemptsError, UnauthorizedClientError, UnauthorizedError, UnauthorizedTokenError, UnknownReceiptTransactionError, UnsupportedGrantError, UnsupportedGrantTypeError, UnsupportedResponseTypeError, UserNotAuthenticatedError, createClient, createOAuth1Client, createOAuth2Client, createProxyClient, findAllGeneric, findAllIterator, getMockSdkOAuth2 as getMockSdk, getMockSdkOAuth1, getMockSdkOAuth2, getMockSdkProxy, parseGlobalPermissions, parseStoredCredentials, recursiveMap, rqlBuilder, rqlParser };
5812
+ export { AccessTokenExpiredError, AccessTokenUnknownError, ActionType, ActivationRequestLimitError, ActivationRequestTimeoutError, ActivationUnknownError, AlreadyActivatedError, ApiError, ApiFunctionRequestMethod, ApiRequestErrorType, AppStoreTransactionAlreadyLinked, ApplicationNotAuthenticatedError, ApplicationType, ApplicationUnknownError, AuthenticationError, AuthorizationCodeExpiredError, AuthorizationUnknownError, BadGatewayServerError, BadRequestError, BodyFormatError, CallbackNotValidError, Comorbidities, DefaultLocalizationMissingError, DisabledForOidcUsersError, DuplicateRequestError, EmailUnknownError, EmailUsedError, EmptyBodyError, ErrorClassMap, FieldFormatError, FieldType, FileTooLargeError, FirebaseConnectionError, FirebaseInvalidPlatformDataError, ForbiddenError, ForgotPasswordRequestLimitError, ForgotPasswordRequestTimeoutError, FunctionPermissionMode, Gender, GlobalPermissionName, IDFormatError, IllegalArgumentError, IllegalStateError, Impediments, IncorrectPinCodeError, InvalidClientError, InvalidCurrencyForProductPrice, InvalidGrantError, InvalidMfaCodeError, InvalidMfaTokenError, InvalidNonceError, InvalidPKCEError, InvalidPresenceTokenError, InvalidReceiptDataError, InvalidRequestError, InvalidTokenError, JSONSchemaType, LambdaInvocationError, LocalizationKeyMissingError, LockedDocumentError, LoginAttemptStatus, LoginFreezeError, LoginTimeoutError, MedicationFrequency, MedicationUnit, MfaReattemptDelayError, MfaRequiredError, MissingPKCEVerifierError, MissingRequiredFieldsError, NewMFARequiredError, NewPasswordHashUnknownError, NewPasswordPinCodeUnknownError, NoConfiguredAppStoreProduct, NoConfiguredPlayStoreProduct, NoMatchingPlayStoreLinkedSubscription, NoPermissionError, NotActivatedError, NotEnoughMfaMethodsError, NotFoundError, OAuth2ClientIdError, OAuth2ClientSecretError, OAuth2ErrorClassMap, OAuth2LoginError, OAuth2MissingClientCredentialsError, OauthKeyError, OauthSignatureError, OauthTokenError, OidcIdTokenError, OidcInvalidAuthorizationCodeError, OidcProviderResponseError, OrderSchemaStatus, PasswordError, PaymentIntentCreationSchemaPaymentMethodType, PaymentIntentCreationSchemaSetupPaymentMethodReuse, PinCodesNotEnabledError, PlayStoreTransactionAlreadyLinked, ProfileActivity, ProfileAlreadyExistsError, QueuedMailStatus, RefreshTokenExpiredError, RefreshTokenUnknownError, RemoveFieldError, RequestAbortedError, ResourceAlreadyExistsError, ResourceUnknownError, Results, ServerError, ServiceNotFoundError, ServiceUnavailableError, ServiceUnreachableError, StatusInUseError, StripePaymentMethodError, StripeRequestError, SubscriptionEntitlementSource, SubscriptionEntitlementStatus, SubscriptionEntitlementStatusCategory, SubscriptionEventSource, SubscriptionEventType, SupportedLanguageCodes, TaskStatus, TemplateFillingError, TemplateResolvingError, TemplateSyntaxError, TokenNotDeleteableError, TokenPermission, TooManyFailedAttemptsError, UnauthorizedClientError, UnauthorizedError, UnauthorizedTokenError, UnknownReceiptTransactionError, UnsupportedGrantError, UnsupportedGrantTypeError, UnsupportedResponseTypeError, UserNotAuthenticatedError, createClient, createOAuth1Client, createOAuth2Client, createProxyClient, findAllGeneric, findAllIterator, getMockSdkOAuth2 as getMockSdk, getMockSdkOAuth1, getMockSdkOAuth2, getMockSdkProxy, parseGlobalPermissions, parseStoredCredentials, recursiveMap, rqlBuilder, rqlParser };
@@ -240,6 +240,8 @@ export declare class FirebaseConnectionError extends BadGatewayServerError {
240
240
  }
241
241
  export declare class ServiceUnavailableError extends ApiError {
242
242
  }
243
+ export declare class ServiceUnreachableError extends ServiceUnavailableError {
244
+ }
243
245
  export declare class OidcIdTokenError extends ServiceUnavailableError {
244
246
  }
245
247
  export declare class InvalidGrantError extends OAuth2LoginError {
@@ -270,6 +272,7 @@ export declare const OAuth2ErrorClassMap: {
270
272
  };
271
273
  export declare const ErrorClassMap: {
272
274
  1: typeof ServerError;
275
+ 4: typeof ServiceUnreachableError;
273
276
  10: typeof NoPermissionError;
274
277
  11: typeof RemoveFieldError;
275
278
  12: typeof IDFormatError;
@@ -1 +1 @@
1
- export declare const version = "8.12.0-dev-171-2fc7ff8";
1
+ export declare const version = "8.12.0-dev-173-29c2711";
@@ -1 +1 @@
1
- export declare const version = "8.12.0-dev-171-2fc7ff8";
1
+ export declare const version = "8.12.0-dev-173-29c2711";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extrahorizon/javascript-sdk",
3
- "version": "8.12.0-dev-171-2fc7ff8",
3
+ "version": "8.12.0-dev-173-29c2711",
4
4
  "description": "This package serves as a JavaScript wrapper around all Extra Horizon cloud services.",
5
5
  "main": "build/index.cjs.js",
6
6
  "types": "build/types/index.d.ts",