@oapiex/sdk-kit 0.1.4 → 0.1.6

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/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as CurrencyCode, C as UserConfig, D as XGenericObject, E as ValidationErrorResponse, O as CountryCode, S as UnifiedResponse, T as ValidationError, _ as OAuth2AuthConfig, a as AuthErrorResponse, b as ResponseStatus, c as BasicAuthConfig, d as CustomAuthConfig, f as Environment, g as NormalPagination, h as InitOptions, i as AuthConfig, k as CountryCodeRestricted, l as BearerAuthConfig, m as HttpMethod, n as AccessValidationResult, o as AuthRequestConfig, p as ErrorResponse, r as ApiKeyAuthConfig, s as AuthResponse, t as AccessValidationConfigUpdate, u as CursorPagination, v as PageInfoMeta, w as UserUrls, x as SuccessResponse, y as Response } from "./index-JjhthUpt.cjs";
1
+ import { A as CountryCodeRestricted, C as UnifiedResponse, D as ValidationErrorResponse, E as ValidationError, O as XGenericObject, S as SuccessResponse, T as UserUrls, _ as NormalPagination, a as AuthErrorResponse, b as Response, c as BasicAuthConfig, d as CustomAuthConfig, f as DebugLevel, g as InitOptions, h as HttpMethod, i as AuthConfig, j as CurrencyCode, k as CountryCode, l as BearerAuthConfig, m as ErrorResponse, n as AccessValidationResult, o as AuthRequestConfig, p as Environment, r as ApiKeyAuthConfig, s as AuthResponse, t as AccessValidationConfigUpdate, u as CursorPagination, v as OAuth2AuthConfig, w as UserConfig, x as ResponseStatus, y as PageInfoMeta } from "./index-CuddPXII.cjs";
2
2
  import * as axios0 from "axios";
3
3
  import { RawAxiosRequestHeaders } from "axios";
4
4
 
@@ -173,15 +173,15 @@ declare class Builder {
173
173
  //#region src/Core.d.ts
174
174
  declare class Core {
175
175
  static apiClass: typeof BaseApi;
176
- debugLevel: number;
176
+ debugLevel: DebugLevel;
177
177
  /**
178
178
  * Client ID
179
179
  */
180
- private clientId;
180
+ private clientId?;
181
181
  /**
182
182
  * Client Secret
183
183
  */
184
- private clientSecret;
184
+ private clientSecret?;
185
185
  /**
186
186
  * API Environment
187
187
  */
@@ -223,7 +223,7 @@ declare class Core {
223
223
  * @param level
224
224
  * @returns
225
225
  */
226
- debug(level?: number): this;
226
+ debug(level?: DebugLevel): this;
227
227
  /**
228
228
  * Get the current environment
229
229
  *
@@ -233,11 +233,11 @@ declare class Core {
233
233
  /**
234
234
  * Get the configured client identifier.
235
235
  */
236
- getClientId(): string;
236
+ getClientId(): string | undefined;
237
237
  /**
238
238
  * Get the configured client secret.
239
239
  */
240
- getClientSecret(): string;
240
+ getClientSecret(): string | undefined;
241
241
  /**
242
242
  * Get the current shared SDK config.
243
243
  */
@@ -281,6 +281,8 @@ declare class Core {
281
281
  api: BaseApi & InferRuntimeSdkApi<TBundle>;
282
282
  };
283
283
  private static normalizeEnvironment;
284
+ private static normalizeCredential;
285
+ private hasConfiguredAuth;
284
286
  private isAuthConfigOrArray;
285
287
  private isAuthConfig;
286
288
  private isConfigUpdate;
@@ -613,4 +615,4 @@ declare class WebhookValidator<Options extends XGenericObject = XGenericObject>
613
615
  };
614
616
  }
615
617
  //#endregion
616
- export { AccessTokenCacheLoader, AccessValidationConfigUpdate, AccessValidationResult, ApiKeyAuthConfig, AuthCacheLoader, AuthConfig, AuthErrorResponse, AuthRequestConfig, AuthResponse, BadRequestException, BaseApi, BasicAuthConfig, BearerAuthConfig, Builder, CachedAccessTokenValue, CachedAuthValue, Core, CountryCode, CountryCodeRestricted, CurrencyCode, CursorPagination, CustomAuthConfig, Environment, ErrorResponse, ForbiddenRequestException, Http, HttpException, HttpMethod, InferRuntimeSdkApi, InitOptions, NormalPagination, OAuth2AuthConfig, PageInfoMeta, Response, ResponseStatus, RuntimeSdkBundle, RuntimeSdkGroupManifest, RuntimeSdkManifest, RuntimeSdkOperationManifest, RuntimeSdkParameterManifest, RuntimeSdkSecurityRequirementManifest, RuntimeSdkSecurityRequirementSchemeManifest, RuntimeSdkSecuritySchemeManifest, SuccessResponse, UnauthorizedRequestException, UnifiedResponse, UserConfig, UserUrls, ValidationError, ValidationErrorResponse, WebhookValidator, XGenericObject, buildUrl, createAccessTokenCache, createAuthCache, createRuntimeApi, createSdk, defaultConfig, defineConfig, getConfig, globalConfig, normalizeValue, resetConfig };
618
+ export { AccessTokenCacheLoader, AccessValidationConfigUpdate, AccessValidationResult, ApiKeyAuthConfig, AuthCacheLoader, AuthConfig, AuthErrorResponse, AuthRequestConfig, AuthResponse, BadRequestException, BaseApi, BasicAuthConfig, BearerAuthConfig, Builder, CachedAccessTokenValue, CachedAuthValue, Core, CountryCode, CountryCodeRestricted, CurrencyCode, CursorPagination, CustomAuthConfig, DebugLevel, Environment, ErrorResponse, ForbiddenRequestException, Http, HttpException, HttpMethod, InferRuntimeSdkApi, InitOptions, NormalPagination, OAuth2AuthConfig, PageInfoMeta, Response, ResponseStatus, RuntimeSdkBundle, RuntimeSdkGroupManifest, RuntimeSdkManifest, RuntimeSdkOperationManifest, RuntimeSdkParameterManifest, RuntimeSdkSecurityRequirementManifest, RuntimeSdkSecurityRequirementSchemeManifest, RuntimeSdkSecuritySchemeManifest, SuccessResponse, UnauthorizedRequestException, UnifiedResponse, UserConfig, UserUrls, ValidationError, ValidationErrorResponse, WebhookValidator, XGenericObject, buildUrl, createAccessTokenCache, createAuthCache, createRuntimeApi, createSdk, defaultConfig, defineConfig, getConfig, globalConfig, normalizeValue, resetConfig };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as CurrencyCode, C as UserConfig, D as XGenericObject, E as ValidationErrorResponse, O as CountryCode, S as UnifiedResponse, T as ValidationError, _ as OAuth2AuthConfig, a as AuthErrorResponse, b as ResponseStatus, c as BasicAuthConfig, d as CustomAuthConfig, f as Environment, g as NormalPagination, h as InitOptions, i as AuthConfig, k as CountryCodeRestricted, l as BearerAuthConfig, m as HttpMethod, n as AccessValidationResult, o as AuthRequestConfig, p as ErrorResponse, r as ApiKeyAuthConfig, s as AuthResponse, t as AccessValidationConfigUpdate, u as CursorPagination, v as PageInfoMeta, w as UserUrls, x as SuccessResponse, y as Response } from "./index-DUI9uPJQ.js";
1
+ import { A as CountryCodeRestricted, C as UnifiedResponse, D as ValidationErrorResponse, E as ValidationError, O as XGenericObject, S as SuccessResponse, T as UserUrls, _ as NormalPagination, a as AuthErrorResponse, b as Response, c as BasicAuthConfig, d as CustomAuthConfig, f as DebugLevel, g as InitOptions, h as HttpMethod, i as AuthConfig, j as CurrencyCode, k as CountryCode, l as BearerAuthConfig, m as ErrorResponse, n as AccessValidationResult, o as AuthRequestConfig, p as Environment, r as ApiKeyAuthConfig, s as AuthResponse, t as AccessValidationConfigUpdate, u as CursorPagination, v as OAuth2AuthConfig, w as UserConfig, x as ResponseStatus, y as PageInfoMeta } from "./index-C_jXJLNo.js";
2
2
  import "dotenv/config";
3
3
  import * as axios0 from "axios";
4
4
  import { RawAxiosRequestHeaders } from "axios";
@@ -174,15 +174,15 @@ declare class Builder {
174
174
  //#region src/Core.d.ts
175
175
  declare class Core {
176
176
  static apiClass: typeof BaseApi;
177
- debugLevel: number;
177
+ debugLevel: DebugLevel;
178
178
  /**
179
179
  * Client ID
180
180
  */
181
- private clientId;
181
+ private clientId?;
182
182
  /**
183
183
  * Client Secret
184
184
  */
185
- private clientSecret;
185
+ private clientSecret?;
186
186
  /**
187
187
  * API Environment
188
188
  */
@@ -224,7 +224,7 @@ declare class Core {
224
224
  * @param level
225
225
  * @returns
226
226
  */
227
- debug(level?: number): this;
227
+ debug(level?: DebugLevel): this;
228
228
  /**
229
229
  * Get the current environment
230
230
  *
@@ -234,11 +234,11 @@ declare class Core {
234
234
  /**
235
235
  * Get the configured client identifier.
236
236
  */
237
- getClientId(): string;
237
+ getClientId(): string | undefined;
238
238
  /**
239
239
  * Get the configured client secret.
240
240
  */
241
- getClientSecret(): string;
241
+ getClientSecret(): string | undefined;
242
242
  /**
243
243
  * Get the current shared SDK config.
244
244
  */
@@ -282,6 +282,8 @@ declare class Core {
282
282
  api: BaseApi & InferRuntimeSdkApi<TBundle>;
283
283
  };
284
284
  private static normalizeEnvironment;
285
+ private static normalizeCredential;
286
+ private hasConfiguredAuth;
285
287
  private isAuthConfigOrArray;
286
288
  private isAuthConfig;
287
289
  private isConfigUpdate;
@@ -614,4 +616,4 @@ declare class WebhookValidator<Options extends XGenericObject = XGenericObject>
614
616
  };
615
617
  }
616
618
  //#endregion
617
- export { AccessTokenCacheLoader, AccessValidationConfigUpdate, AccessValidationResult, ApiKeyAuthConfig, AuthCacheLoader, AuthConfig, AuthErrorResponse, AuthRequestConfig, AuthResponse, BadRequestException, BaseApi, BasicAuthConfig, BearerAuthConfig, Builder, CachedAccessTokenValue, CachedAuthValue, Core, CountryCode, CountryCodeRestricted, CurrencyCode, CursorPagination, CustomAuthConfig, Environment, ErrorResponse, ForbiddenRequestException, Http, HttpException, HttpMethod, InferRuntimeSdkApi, InitOptions, NormalPagination, OAuth2AuthConfig, PageInfoMeta, Response, ResponseStatus, RuntimeSdkBundle, RuntimeSdkGroupManifest, RuntimeSdkManifest, RuntimeSdkOperationManifest, RuntimeSdkParameterManifest, RuntimeSdkSecurityRequirementManifest, RuntimeSdkSecurityRequirementSchemeManifest, RuntimeSdkSecuritySchemeManifest, SuccessResponse, UnauthorizedRequestException, UnifiedResponse, UserConfig, UserUrls, ValidationError, ValidationErrorResponse, WebhookValidator, XGenericObject, buildUrl, createAccessTokenCache, createAuthCache, createRuntimeApi, createSdk, defaultConfig, defineConfig, getConfig, globalConfig, normalizeValue, resetConfig };
619
+ export { AccessTokenCacheLoader, AccessValidationConfigUpdate, AccessValidationResult, ApiKeyAuthConfig, AuthCacheLoader, AuthConfig, AuthErrorResponse, AuthRequestConfig, AuthResponse, BadRequestException, BaseApi, BasicAuthConfig, BearerAuthConfig, Builder, CachedAccessTokenValue, CachedAuthValue, Core, CountryCode, CountryCodeRestricted, CurrencyCode, CursorPagination, CustomAuthConfig, DebugLevel, Environment, ErrorResponse, ForbiddenRequestException, Http, HttpException, HttpMethod, InferRuntimeSdkApi, InitOptions, NormalPagination, OAuth2AuthConfig, PageInfoMeta, Response, ResponseStatus, RuntimeSdkBundle, RuntimeSdkGroupManifest, RuntimeSdkManifest, RuntimeSdkOperationManifest, RuntimeSdkParameterManifest, RuntimeSdkSecurityRequirementManifest, RuntimeSdkSecurityRequirementSchemeManifest, RuntimeSdkSecuritySchemeManifest, SuccessResponse, UnauthorizedRequestException, UnifiedResponse, UserConfig, UserUrls, ValidationError, ValidationErrorResponse, WebhookValidator, XGenericObject, buildUrl, createAccessTokenCache, createAuthCache, createRuntimeApi, createSdk, defaultConfig, defineConfig, getConfig, globalConfig, normalizeValue, resetConfig };