@accelbyte/sdk 4.1.4 → 4.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/dist/index.d.ts CHANGED
@@ -7,30 +7,43 @@ type MakeRequired<T, K extends keyof T> = T & {
7
7
  };
8
8
  declare function isType<T extends ZodTypeAny>(schema: T, data: unknown): data is z.infer<T>;
9
9
 
10
- interface CoreConfig {
10
+ declare const CoreConfig: z.ZodObject<{
11
11
  /**
12
12
  * The client ID for the SDK. This value is retrieved from Admin Portal, OAuth Clients.
13
13
  */
14
- clientId: string;
14
+ clientId: z.ZodString;
15
15
  /**
16
16
  * The redirect URI after logging in. This is used to generate the valid login URL to IAM.
17
17
  * This value is retrieved from Admin Portal, OAuth Clients.
18
18
  */
19
- redirectURI: string;
19
+ redirectURI: z.ZodString;
20
20
  /**
21
21
  * The base URL of your AGS deployment.
22
22
  */
23
- baseURL: string;
23
+ baseURL: z.ZodString;
24
24
  /**
25
25
  * The namespace of your AGS deployment.
26
26
  */
27
- namespace: string;
27
+ namespace: z.ZodString;
28
28
  /**
29
29
  * When "false" is provided, the SDK bypasses Zod Schema Validation.
30
30
  * Default is "true".
31
31
  */
32
+ useSchemaValidation: z.ZodDefault<z.ZodBoolean>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ clientId: string;
35
+ redirectURI: string;
36
+ baseURL: string;
37
+ namespace: string;
32
38
  useSchemaValidation: boolean;
33
- }
39
+ }, {
40
+ clientId: string;
41
+ redirectURI: string;
42
+ baseURL: string;
43
+ namespace: string;
44
+ useSchemaValidation?: boolean | undefined;
45
+ }>;
46
+ type CoreConfig = z.infer<typeof CoreConfig>;
34
47
  interface AxiosConfig {
35
48
  interceptors?: Interceptor[];
36
49
  request?: AxiosRequestConfig;
@@ -94,7 +107,13 @@ declare class AccelByteSDK {
94
107
  */
95
108
  assembly(): {
96
109
  axiosInstance: AxiosInstance;
97
- coreConfig: CoreConfig;
110
+ coreConfig: {
111
+ clientId: string;
112
+ redirectURI: string;
113
+ baseURL: string;
114
+ namespace: string;
115
+ useSchemaValidation: boolean;
116
+ };
98
117
  axiosConfig: MakeRequired<AxiosConfig, "request">;
99
118
  webSocketConfig: WebSocketConfig;
100
119
  };
@@ -322,6 +341,7 @@ declare class Validate {
322
341
  static safeParse<D>(data: unknown, Codec: z.ZodType<D>): D | null;
323
342
  }
324
343
  declare class DecodeError extends Error {
344
+ zodError: ZodError;
325
345
  constructor({ error, response, modelName }: {
326
346
  error: ZodError;
327
347
  response: AxiosResponse;
@@ -482,4 +502,4 @@ declare class UrlHelper {
482
502
  static removeQueryParam(fullUrlString: string, param: string): string;
483
503
  }
484
504
 
485
- export { AccelByte, AccelByteSDK, type ApiError, ApiUtils, type AxiosConfig, BrowserHelper, CodeGenUtil, type CoreConfig, DecodeError, DesktopChecker, ERROR_CODE_LINK_DELETION_ACCOUNT, ERROR_CODE_TOKEN_EXPIRED, ERROR_LINK_ANOTHER_3RD_PARTY_ACCOUNT, ERROR_USER_BANNED, ErrorInterceptors, IamErrorCode, type Interceptor, type MakeOptional, type MakeRequired, Network, RefreshSession, RefreshToken, type Response, type ResponseError, type SdkConstructorParam, SdkDevice, type SdkSetConfigParam, type TokenConfig, UrlHelper, Validate, type WebSocketConfig, createAuthInterceptor, createCustomPathInterceptor, createGetSessionInterceptor, createRefreshSessionInterceptor, isType };
505
+ export { AccelByte, AccelByteSDK, type ApiError, ApiUtils, type AxiosConfig, BrowserHelper, CodeGenUtil, CoreConfig, DecodeError, DesktopChecker, ERROR_CODE_LINK_DELETION_ACCOUNT, ERROR_CODE_TOKEN_EXPIRED, ERROR_LINK_ANOTHER_3RD_PARTY_ACCOUNT, ERROR_USER_BANNED, ErrorInterceptors, IamErrorCode, type Interceptor, type MakeOptional, type MakeRequired, Network, RefreshSession, RefreshToken, type Response, type ResponseError, type SdkConstructorParam, SdkDevice, type SdkSetConfigParam, type TokenConfig, UrlHelper, Validate, type WebSocketConfig, createAuthInterceptor, createCustomPathInterceptor, createGetSessionInterceptor, createRefreshSessionInterceptor, isType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@accelbyte/sdk",
3
- "version": "4.1.4",
3
+ "version": "4.2.0",
4
4
  "author": "AccelByte Inc",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "main": "./dist/cjs/node/index.cjs",
@@ -48,15 +48,15 @@
48
48
  "vitest": "3.1.1"
49
49
  },
50
50
  "dependencies": {
51
- "@accelbyte/validator": "0.2.29",
52
- "axios": "1.8.4",
51
+ "@accelbyte/validator": "0.2.30",
52
+ "axios": "1.12.0",
53
53
  "buffer": "6.0.3",
54
54
  "crypto-js": "4.2.0",
55
55
  "nanoid": "3.3.11",
56
56
  "platform": "1.3.6",
57
57
  "query-string": "7.1.1",
58
58
  "uuid": "8.3.2",
59
- "validator": "13.7.0",
59
+ "validator": "13.15.20",
60
60
  "ws": "8.18.0",
61
61
  "zod": "3.23.8"
62
62
  },