@accelbyte/sdk 4.1.5 → 4.3.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
@@ -1,11 +1,5 @@
1
1
  import { AxiosRequestConfig, InternalAxiosRequestConfig, AxiosResponse, AxiosInstance, AxiosError } from 'axios';
2
- import { ZodTypeAny, z, ZodError } from 'zod';
3
-
4
- type MakeOptional<Type, UnionKeys extends keyof Type> = Omit<Type, UnionKeys> & Partial<Pick<Type, UnionKeys>>;
5
- type MakeRequired<T, K extends keyof T> = T & {
6
- [P in K]-?: T[P];
7
- };
8
- declare function isType<T extends ZodTypeAny>(schema: T, data: unknown): data is z.infer<T>;
2
+ import { z, ZodTypeAny, ZodError } from 'zod';
9
3
 
10
4
  declare const CoreConfig: z.ZodObject<{
11
5
  /**
@@ -73,7 +67,7 @@ type Interceptor = {
73
67
  onError?: (error: unknown) => unknown;
74
68
  };
75
69
  interface SdkConstructorParam {
76
- coreConfig: MakeOptional<CoreConfig, 'useSchemaValidation'>;
70
+ coreConfig: z.input<typeof CoreConfig>;
77
71
  axiosConfig?: AxiosConfig;
78
72
  webSocketConfig?: WebSocketConfig;
79
73
  }
@@ -91,6 +85,11 @@ type TokenConfig = {
91
85
  refreshToken?: string | null;
92
86
  };
93
87
 
88
+ type MakeRequired<T, K extends keyof T> = T & {
89
+ [P in K]-?: T[P];
90
+ };
91
+ declare function isType<T extends ZodTypeAny>(schema: T, data: unknown): data is z.infer<T>;
92
+
94
93
  declare const AccelByte: {
95
94
  SDK: (param: SdkConstructorParam) => AccelByteSDK;
96
95
  };
@@ -341,6 +340,7 @@ declare class Validate {
341
340
  static safeParse<D>(data: unknown, Codec: z.ZodType<D>): D | null;
342
341
  }
343
342
  declare class DecodeError extends Error {
343
+ zodError: ZodError;
344
344
  constructor({ error, response, modelName }: {
345
345
  error: ZodError;
346
346
  response: AxiosResponse;
@@ -501,4 +501,4 @@ declare class UrlHelper {
501
501
  static removeQueryParam(fullUrlString: string, param: string): string;
502
502
  }
503
503
 
504
- 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 };
504
+ 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 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.5",
3
+ "version": "4.3.0",
4
4
  "author": "AccelByte Inc",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "main": "./dist/cjs/node/index.cjs",
@@ -41,22 +41,22 @@
41
41
  "jsdom": "25.0.0",
42
42
  "msw": "2.4.1",
43
43
  "rimraf": "4.4.1",
44
- "rollup": "3.29.5",
44
+ "rollup": "3.30.0",
45
45
  "tslib": "2.4.0",
46
46
  "tsup": "8.3.5",
47
- "typescript": "5.5.4",
47
+ "typescript": "5.8.3",
48
48
  "vitest": "3.1.1"
49
49
  },
50
50
  "dependencies": {
51
- "@accelbyte/validator": "0.2.30",
52
- "axios": "1.8.4",
51
+ "@accelbyte/validator": "0.3.0",
52
+ "axios": "1.13.5",
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.22",
60
60
  "ws": "8.18.0",
61
61
  "zod": "3.23.8"
62
62
  },