@teez-sdk/teez-b2c-api 2.1.0 → 2.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.mts CHANGED
@@ -246,7 +246,7 @@ declare class HttpClient {
246
246
  * Generated from: schemas.ts
247
247
  */
248
248
  /**
249
- * Response schema for login.
249
+ * Response schema for initiating phone login.
250
250
  */
251
251
  type AuthApiLoginResponse = void | undefined;
252
252
  /**
@@ -258,17 +258,21 @@ interface AuthApiVerifyResponse {
258
258
  */
259
259
  userId: string;
260
260
  /**
261
- * JWT access token for authenticated requests
261
+ * User's phone number in E.164 format
262
+ */
263
+ phone: string;
264
+ /**
265
+ * JWT access token for API authentication (HS512 algorithm, ~24 hour expiration)
262
266
  */
263
267
  accessToken: string;
264
268
  /**
265
- * Refresh token for obtaining new access tokens
269
+ * Base64-encoded refresh token for obtaining new access tokens
266
270
  */
267
271
  refreshToken: string;
268
272
  /**
269
- * User's phone number
273
+ * User's preferred payment method ID
270
274
  */
271
- phone: string;
275
+ paymentId?: (number | null) | undefined;
272
276
  /**
273
277
  * User's default pickup point
274
278
  */
@@ -278,13 +282,9 @@ interface AuthApiVerifyResponse {
278
282
  */
279
283
  address?: (unknown | null) | undefined;
280
284
  /**
281
- * User's default recipient information
285
+ * User's default order recipient information
282
286
  */
283
287
  recipient?: (unknown | null) | undefined;
284
- /**
285
- * User's default payment method ID
286
- */
287
- paymentId?: (number | null) | undefined;
288
288
  }
289
289
  /**
290
290
  * Response schema for token validation.
@@ -295,7 +295,7 @@ interface AuthApiCheckTokenResponse {
295
295
  */
296
296
  userId: string;
297
297
  /**
298
- * User's phone number
298
+ * User's phone number in E.164 format
299
299
  */
300
300
  phoneNumber: string;
301
301
  /**
@@ -307,19 +307,19 @@ interface AuthApiCheckTokenResponse {
307
307
  */
308
308
  email: string;
309
309
  /**
310
- * Token expiration date (ISO 8601 format)
310
+ * Token expiration datetime in ISO 8601 format (e.g., "2025-12-30T13:08:44+00:00")
311
311
  */
312
312
  expiredTokenDate: string;
313
313
  /**
314
- * User's language preference (ru or kk)
314
+ * User's preferred language: "ru" (Russian) or "kk" (Kazakh)
315
315
  */
316
316
  language: "ru" | "kk";
317
317
  /**
318
- * Whether user has any orders in the system
318
+ * Whether user has active orders in progress
319
319
  */
320
320
  hasOrders: boolean;
321
321
  /**
322
- * Whether user has any orders (alternative field)
322
+ * Whether user has any order history (including completed orders)
323
323
  */
324
324
  hasAnyOrders: boolean;
325
325
  }
@@ -330,7 +330,7 @@ interface AuthApiCheckTokenResponse {
330
330
  */
331
331
  interface AuthApiLoginParams extends BaseParams {
332
332
  /**
333
- * Phone number with country code (e.g., "+77071234567")
333
+ * Phone number with country code in E.164 format (e.g., "+77071234567")
334
334
  */
335
335
  phone: string;
336
336
  }
@@ -339,11 +339,11 @@ interface AuthApiLoginParams extends BaseParams {
339
339
  */
340
340
  interface AuthApiVerifyParams extends BaseParams {
341
341
  /**
342
- * Phone number with country code (e.g., "+77071234567")
342
+ * Phone number with country code in E.164 format (e.g., "+77071234567")
343
343
  */
344
344
  phone: string;
345
345
  /**
346
- * OTP code received via SMS
346
+ * 4-digit OTP code received via SMS
347
347
  */
348
348
  otpCode: string;
349
349
  }
@@ -2360,6 +2360,119 @@ declare class SkuApi {
2360
2360
  getReviewAvailable(params: SkuApiGetReviewAvailableParams): Promise<SkuApiGetReviewAvailableResponse>;
2361
2361
  }
2362
2362
  //#endregion
2363
+ //#region src/api/users/schema-types.d.ts
2364
+ /**
2365
+ * ⚠️ This file is auto-generated. Do not edit manually.
2366
+ * Run `npm run generate:schema-types` to regenerate.
2367
+ * Generated from: schemas.ts
2368
+ */
2369
+ /**
2370
+ * Supported language enum for user preference
2371
+ */
2372
+ type UsersApiLanguageEnum = "ru" | "kk";
2373
+ /**
2374
+ * Response schema for language update
2375
+ */
2376
+ interface UsersApiUpdateLanguageResponse {
2377
+ /**
2378
+ * Updated language code
2379
+ */
2380
+ language: UsersApiLanguageEnum;
2381
+ /**
2382
+ * Response title
2383
+ */
2384
+ title: string;
2385
+ /**
2386
+ * Response message
2387
+ */
2388
+ message: string;
2389
+ }
2390
+ /**
2391
+ * Response schema for device registration
2392
+ */
2393
+ type UsersApiRegisterDeviceResponse = (null | null) | undefined;
2394
+ //#endregion
2395
+ //#region src/api/users/types.d.ts
2396
+ /**
2397
+ * Parameters for updating user's preferred language
2398
+ */
2399
+ interface UsersApiUpdateLanguageParams extends BaseParams {
2400
+ /**
2401
+ * Language code: "ru" (Russian) or "kk" (Kazakh)
2402
+ */
2403
+ language: "ru" | "kk";
2404
+ }
2405
+ /**
2406
+ * SDK information for a specific tracking service
2407
+ */
2408
+ interface UsersApiDeviceSdkInformation {
2409
+ /**
2410
+ * Type of tracking SDK (e.g., "Appsflyer", "Firebase")
2411
+ */
2412
+ type: string;
2413
+ /**
2414
+ * Unique device identifier for the tracking service
2415
+ */
2416
+ deviceId: string;
2417
+ }
2418
+ /**
2419
+ * Device identity containing tracking SDK information
2420
+ */
2421
+ interface UsersApiDeviceIdentity {
2422
+ /**
2423
+ * Array of tracking SDK information
2424
+ */
2425
+ sdkInformation: UsersApiDeviceSdkInformation[];
2426
+ }
2427
+ /**
2428
+ * Parameters for registering device identity
2429
+ */
2430
+ interface UsersApiRegisterDeviceParams extends BaseParams {
2431
+ /**
2432
+ * Device identity information for analytics tracking
2433
+ */
2434
+ deviceIdentity: UsersApiDeviceIdentity;
2435
+ }
2436
+ //#endregion
2437
+ //#region src/api/users/api.d.ts
2438
+ /**
2439
+ * API for user management operations.
2440
+ */
2441
+ declare class UsersApi {
2442
+ private http;
2443
+ /**
2444
+ * Initializes a new instance of the UsersApi.
2445
+ *
2446
+ * @param http HTTP client instance.
2447
+ */
2448
+ constructor(http: HttpClient);
2449
+ /**
2450
+ * Updates the user's preferred language.
2451
+ *
2452
+ * @example
2453
+ * await client.users.updateLanguage({
2454
+ * language: "ru"
2455
+ * });
2456
+ */
2457
+ updateLanguage(params: UsersApiUpdateLanguageParams): Promise<UsersApiUpdateLanguageResponse>;
2458
+ /**
2459
+ * Registers device identity for analytics tracking.
2460
+ *
2461
+ * @example
2462
+ * await client.users.registerDevice({
2463
+ * deviceIdentity: {
2464
+ * sdkInformation: [
2465
+ * {
2466
+ * type: "Appsflyer",
2467
+ * deviceId: "1765694307025-6267413661002574019"
2468
+ * }
2469
+ * ]
2470
+ * }
2471
+ * });
2472
+ */
2473
+ registerDevice(params: UsersApiRegisterDeviceParams): Promise<UsersApiRegisterDeviceResponse>;
2474
+ }
2475
+ //#endregion
2363
2476
  //#region src/client.d.ts
2364
2477
  /**
2365
2478
  * Main client for interacting with the Teez B2C API.
@@ -2380,7 +2493,7 @@ declare class TeezClient {
2380
2493
  */
2381
2494
  private readonly http;
2382
2495
  /**
2383
- * API for authentication operations (login, verify OTP, check token).
2496
+ * API for authentication operations.
2384
2497
  */
2385
2498
  readonly auth: AuthApi;
2386
2499
  /**
@@ -2415,6 +2528,10 @@ declare class TeezClient {
2415
2528
  * API for retrieving SKU details.
2416
2529
  */
2417
2530
  readonly sku: SkuApi;
2531
+ /**
2532
+ * API for user management operations.
2533
+ */
2534
+ readonly users: UsersApi;
2418
2535
  /**
2419
2536
  * Initializes a new instance of the TeezClient.
2420
2537
  *
@@ -2611,7 +2728,7 @@ declare class TeezValidationError extends TeezError {
2611
2728
  //#endregion
2612
2729
  //#region src/api/auth/schemas.d.ts
2613
2730
  /**
2614
- * Response schema for login.
2731
+ * Response schema for initiating phone login.
2615
2732
  */
2616
2733
  declare const AuthApiLoginResponseSchema: z.ZodMiniVoid;
2617
2734
  /**
@@ -2623,17 +2740,21 @@ declare const AuthApiVerifyResponseSchema: z.ZodMiniObject<{
2623
2740
  */
2624
2741
  userId: z.ZodMiniString<string>;
2625
2742
  /**
2626
- * JWT access token for authenticated requests
2743
+ * User's phone number in E.164 format
2744
+ */
2745
+ phone: z.ZodMiniString<string>;
2746
+ /**
2747
+ * JWT access token for API authentication (HS512 algorithm, ~24 hour expiration)
2627
2748
  */
2628
2749
  accessToken: z.ZodMiniString<string>;
2629
2750
  /**
2630
- * Refresh token for obtaining new access tokens
2751
+ * Base64-encoded refresh token for obtaining new access tokens
2631
2752
  */
2632
2753
  refreshToken: z.ZodMiniString<string>;
2633
2754
  /**
2634
- * User's phone number
2755
+ * User's preferred payment method ID
2635
2756
  */
2636
- phone: z.ZodMiniString<string>;
2757
+ paymentId: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
2637
2758
  /**
2638
2759
  * User's default pickup point
2639
2760
  */
@@ -2643,13 +2764,9 @@ declare const AuthApiVerifyResponseSchema: z.ZodMiniObject<{
2643
2764
  */
2644
2765
  address: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnknown>>;
2645
2766
  /**
2646
- * User's default recipient information
2767
+ * User's default order recipient information
2647
2768
  */
2648
2769
  recipient: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnknown>>;
2649
- /**
2650
- * User's default payment method ID
2651
- */
2652
- paymentId: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
2653
2770
  }, z.core.$strip>;
2654
2771
  /**
2655
2772
  * Response schema for token validation.
@@ -2660,7 +2777,7 @@ declare const AuthApiCheckTokenResponseSchema: z.ZodMiniObject<{
2660
2777
  */
2661
2778
  userId: z.ZodMiniString<string>;
2662
2779
  /**
2663
- * User's phone number
2780
+ * User's phone number in E.164 format
2664
2781
  */
2665
2782
  phoneNumber: z.ZodMiniString<string>;
2666
2783
  /**
@@ -2672,22 +2789,22 @@ declare const AuthApiCheckTokenResponseSchema: z.ZodMiniObject<{
2672
2789
  */
2673
2790
  email: z.ZodMiniString<string>;
2674
2791
  /**
2675
- * Token expiration date (ISO 8601 format)
2792
+ * Token expiration datetime in ISO 8601 format (e.g., "2025-12-30T13:08:44+00:00")
2676
2793
  */
2677
2794
  expiredTokenDate: z.ZodMiniString<string>;
2678
2795
  /**
2679
- * User's language preference (ru or kk)
2796
+ * User's preferred language: "ru" (Russian) or "kk" (Kazakh)
2680
2797
  */
2681
2798
  language: z.ZodMiniEnum<{
2682
2799
  ru: "ru";
2683
2800
  kk: "kk";
2684
2801
  }>;
2685
2802
  /**
2686
- * Whether user has any orders in the system
2803
+ * Whether user has active orders in progress
2687
2804
  */
2688
2805
  hasOrders: z.ZodMiniBoolean<boolean>;
2689
2806
  /**
2690
- * Whether user has any orders (alternative field)
2807
+ * Whether user has any order history (including completed orders)
2691
2808
  */
2692
2809
  hasAnyOrders: z.ZodMiniBoolean<boolean>;
2693
2810
  }, z.core.$strip>;
@@ -3268,6 +3385,34 @@ declare const CollectionsApiGetResponseSchema: z.ZodMiniObject<{
3268
3385
  priority: z.ZodMiniNumber<number>;
3269
3386
  }, z.core.$strip>;
3270
3387
  //#endregion
3388
+ //#region src/api/feature-flags/schemas.d.ts
3389
+ /**
3390
+ * Schema for a feature flag item.
3391
+ */
3392
+ declare const FeatureFlagsApiItemSchema: z.ZodMiniObject<{
3393
+ /**
3394
+ * Name of the feature flag
3395
+ */
3396
+ name: z.ZodMiniString<string>;
3397
+ /**
3398
+ * Indicates if the feature flag is currently active
3399
+ */
3400
+ isActive: z.ZodMiniBoolean<boolean>;
3401
+ }, z.core.$strip>;
3402
+ /**
3403
+ * Response schema for the list of feature flags.
3404
+ */
3405
+ declare const FeatureFlagsApiListResponseSchema: z.ZodMiniArray<z.ZodMiniObject<{
3406
+ /**
3407
+ * Name of the feature flag
3408
+ */
3409
+ name: z.ZodMiniString<string>;
3410
+ /**
3411
+ * Indicates if the feature flag is currently active
3412
+ */
3413
+ isActive: z.ZodMiniBoolean<boolean>;
3414
+ }, z.core.$strip>>;
3415
+ //#endregion
3271
3416
  //#region src/api/products/schemas.d.ts
3272
3417
  /**
3273
3418
  * Type union for product sort keys
@@ -4874,33 +5019,38 @@ declare const SkuApiGetReviewAvailableResponseSchema: z.ZodMiniObject<{
4874
5019
  message: z.ZodMiniString<string>;
4875
5020
  }, z.core.$strip>;
4876
5021
  //#endregion
4877
- //#region src/api/feature-flags/schemas.d.ts
5022
+ //#region src/api/users/schemas.d.ts
4878
5023
  /**
4879
- * Schema for a feature flag item.
5024
+ * Supported language enum for user preference
4880
5025
  */
4881
- declare const FeatureFlagsApiItemSchema: z.ZodMiniObject<{
5026
+ declare const UsersApiLanguageEnumSchema: z.ZodMiniEnum<{
5027
+ ru: "ru";
5028
+ kk: "kk";
5029
+ }>;
5030
+ /**
5031
+ * Response schema for language update
5032
+ */
5033
+ declare const UsersApiUpdateLanguageResponseSchema: z.ZodMiniObject<{
4882
5034
  /**
4883
- * Name of the feature flag
5035
+ * Updated language code
4884
5036
  */
4885
- name: z.ZodMiniString<string>;
5037
+ language: z.ZodMiniEnum<{
5038
+ ru: "ru";
5039
+ kk: "kk";
5040
+ }>;
4886
5041
  /**
4887
- * Indicates if the feature flag is currently active
5042
+ * Response title
4888
5043
  */
4889
- isActive: z.ZodMiniBoolean<boolean>;
5044
+ title: z.ZodMiniString<string>;
5045
+ /**
5046
+ * Response message
5047
+ */
5048
+ message: z.ZodMiniString<string>;
4890
5049
  }, z.core.$strip>;
4891
5050
  /**
4892
- * Response schema for the list of feature flags.
5051
+ * Response schema for device registration
4893
5052
  */
4894
- declare const FeatureFlagsApiListResponseSchema: z.ZodMiniArray<z.ZodMiniObject<{
4895
- /**
4896
- * Name of the feature flag
4897
- */
4898
- name: z.ZodMiniString<string>;
4899
- /**
4900
- * Indicates if the feature flag is currently active
4901
- */
4902
- isActive: z.ZodMiniBoolean<boolean>;
4903
- }, z.core.$strip>>;
5053
+ declare const UsersApiRegisterDeviceResponseSchema: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNull>>;
4904
5054
  //#endregion
4905
- export { AuthApi, AuthApiCheckTokenParams, AuthApiCheckTokenResponse, AuthApiCheckTokenResponseSchema, AuthApiLoginParams, AuthApiLoginResponse, AuthApiLoginResponseSchema, AuthApiVerifyParams, AuthApiVerifyResponse, AuthApiVerifyResponseSchema, BASE_URL, BannerActionTypes, BannerActionTypesSchema, BannerImageType, BannerImageTypeSchema, BannersApi, BannersApiAction, BannersApiActionSchema, BannersApiBannerItem, BannersApiBannerItemSchema, BannersApiImage, BannersApiImageSchema, BannersApiListParams, BannersApiListResponse, BannersApiListResponseSchema, BaseParams, CategoriesApi, CategoriesApiGetParams, CategoriesApiGetParentsParams, CategoriesApiGetParentsResponse, CategoriesApiGetParentsResponseItem, CategoriesApiGetParentsResponseItemSchema, CategoriesApiGetParentsResponseSchema, CategoriesApiGetResponse, CategoriesApiGetResponseSchema, CategoriesApiListParams, CategoriesApiListResponse, CategoriesApiListResponseItem, CategoriesApiListResponseItemSchema, CategoriesApiListResponseSchema, CollectionType, CollectionTypeSchema, CollectionsApi, CollectionsApiGetParams, CollectionsApiGetResponse, CollectionsApiGetResponseSchema, CollectionsApiGetSkusParams, CollectionsApiGetSkusResponse, CollectionsApiGetSkusResponseSchema, CollectionsApiListItem, CollectionsApiListItemSchema, CollectionsApiListParams, CollectionsApiListResponse, CollectionsApiListResponseSchema, CollectionsApiSkuItem, CollectionsApiSkuItemSchema, CollectionsApiStockAvailability, CollectionsApiStockAvailabilitySchema, CollectionsStockAvailabilityType, CollectionsStockAvailabilityTypeSchema, DEFAULT_APP_VERSION, DEFAULT_CONFIG, FeatureFlagsApi, FeatureFlagsApiItem, FeatureFlagsApiItemSchema, FeatureFlagsApiListParams, FeatureFlagsApiListResponse, FeatureFlagsApiListResponseSchema, LANGUAGES, Language, ProductSortKey, ProductSortKeySchema, ProductsApi, ProductsApiBadge, ProductsApiBadgeSchema, ProductsApiGetReviewsParams, ProductsApiGetReviewsResponse, ProductsApiGetReviewsResponseSchema, ProductsApiGetSortOptionsParams, ProductsApiGetSortOptionsResponse, ProductsApiGetSortOptionsResponseSchema, ProductsApiListParams, ProductsApiListResponse, ProductsApiListResponseSchema, ProductsApiProductItem, ProductsApiProductItemSchema, ProductsApiReviewItem, ProductsApiReviewItemSchema, ProductsApiSortOption, ProductsApiSortOptionSchema, ProductsApiStockAvailability, ProductsApiStockAvailabilitySchema, ProductsStockAvailabilityType, ProductsStockAvailabilityTypeSchema, PromoApi, PromoApiItem, PromoApiItemSchema, PromoApiListParams, PromoApiListResponse, PromoApiListResponseSchema, ResolvedTeezClientConfig, ShopsApi, ShopsApiContactInfo, ShopsApiContactInfoSchema, ShopsApiGetMonobrandParams, ShopsApiGetMonobrandResponse, ShopsApiGetMonobrandResponseSchema, ShopsApiGetParams, ShopsApiGetProductsParams, ShopsApiGetProductsResponse, ShopsApiGetProductsResponseSchema, ShopsApiGetResponse, ShopsApiGetResponseSchema, ShopsApiProductItem, ShopsApiProductItemSchema, ShopsApiShopItem, ShopsApiShopItemSchema, ShopsApiStockAvailability, ShopsApiStockAvailabilitySchema, ShopsApiTag, ShopsApiTagSchema, ShopsStockAvailabilityType, ShopsStockAvailabilityTypeSchema, SkuApi, SkuApiAttribute, SkuApiAttributeProperty, SkuApiAttributePropertySchema, SkuApiAttributePropertyValue, SkuApiAttributePropertyValueSchema, SkuApiAttributeSchema, SkuApiBrand, SkuApiBrandSchema, SkuApiCategory, SkuApiCategorySchema, SkuApiCollectionItem, SkuApiCollectionItemSchema, SkuApiGetCollectionsParams, SkuApiGetCollectionsResponse, SkuApiGetCollectionsResponseSchema, SkuApiGetParams, SkuApiGetResponse, SkuApiGetResponseSchema, SkuApiGetReviewAvailableParams, SkuApiGetReviewAvailableResponse, SkuApiGetReviewAvailableResponseSchema, SkuApiGetSimilarParams, SkuApiGetSimilarResponse, SkuApiGetSimilarResponseSchema, SkuApiInstallment, SkuApiInstallmentSchema, SkuApiShop, SkuApiShopSchema, SkuApiSimilarItem, SkuApiSimilarItemSchema, SkuApiStockAvailability, SkuApiStockAvailabilitySchema, SkuApiTag, SkuApiTagSchema, SkuStockAvailabilityType, SkuStockAvailabilityTypeSchema, TeezApiError, TeezApiErrorOptions, TeezClient, TeezClientConfig, TeezError, TeezNetworkError, TeezNetworkErrorOptions, TeezTimeoutError, TeezTimeoutErrorOptions, TeezValidationError, TeezValidationErrorOptions, TeezValidationIssue, buildHeaders, buildUserAgent, resolveConfig };
5055
+ export { AuthApi, AuthApiCheckTokenParams, AuthApiCheckTokenResponse, AuthApiCheckTokenResponseSchema, AuthApiLoginParams, AuthApiLoginResponse, AuthApiLoginResponseSchema, AuthApiVerifyParams, AuthApiVerifyResponse, AuthApiVerifyResponseSchema, BASE_URL, BannerActionTypes, BannerActionTypesSchema, BannerImageType, BannerImageTypeSchema, BannersApi, BannersApiAction, BannersApiActionSchema, BannersApiBannerItem, BannersApiBannerItemSchema, BannersApiImage, BannersApiImageSchema, BannersApiListParams, BannersApiListResponse, BannersApiListResponseSchema, BaseParams, CategoriesApi, CategoriesApiGetParams, CategoriesApiGetParentsParams, CategoriesApiGetParentsResponse, CategoriesApiGetParentsResponseItem, CategoriesApiGetParentsResponseItemSchema, CategoriesApiGetParentsResponseSchema, CategoriesApiGetResponse, CategoriesApiGetResponseSchema, CategoriesApiListParams, CategoriesApiListResponse, CategoriesApiListResponseItem, CategoriesApiListResponseItemSchema, CategoriesApiListResponseSchema, CollectionType, CollectionTypeSchema, CollectionsApi, CollectionsApiGetParams, CollectionsApiGetResponse, CollectionsApiGetResponseSchema, CollectionsApiGetSkusParams, CollectionsApiGetSkusResponse, CollectionsApiGetSkusResponseSchema, CollectionsApiListItem, CollectionsApiListItemSchema, CollectionsApiListParams, CollectionsApiListResponse, CollectionsApiListResponseSchema, CollectionsApiSkuItem, CollectionsApiSkuItemSchema, CollectionsApiStockAvailability, CollectionsApiStockAvailabilitySchema, CollectionsStockAvailabilityType, CollectionsStockAvailabilityTypeSchema, DEFAULT_APP_VERSION, DEFAULT_CONFIG, FeatureFlagsApi, FeatureFlagsApiItem, FeatureFlagsApiItemSchema, FeatureFlagsApiListParams, FeatureFlagsApiListResponse, FeatureFlagsApiListResponseSchema, LANGUAGES, Language, ProductSortKey, ProductSortKeySchema, ProductsApi, ProductsApiBadge, ProductsApiBadgeSchema, ProductsApiGetReviewsParams, ProductsApiGetReviewsResponse, ProductsApiGetReviewsResponseSchema, ProductsApiGetSortOptionsParams, ProductsApiGetSortOptionsResponse, ProductsApiGetSortOptionsResponseSchema, ProductsApiListParams, ProductsApiListResponse, ProductsApiListResponseSchema, ProductsApiProductItem, ProductsApiProductItemSchema, ProductsApiReviewItem, ProductsApiReviewItemSchema, ProductsApiSortOption, ProductsApiSortOptionSchema, ProductsApiStockAvailability, ProductsApiStockAvailabilitySchema, ProductsStockAvailabilityType, ProductsStockAvailabilityTypeSchema, PromoApi, PromoApiItem, PromoApiItemSchema, PromoApiListParams, PromoApiListResponse, PromoApiListResponseSchema, ResolvedTeezClientConfig, ShopsApi, ShopsApiContactInfo, ShopsApiContactInfoSchema, ShopsApiGetMonobrandParams, ShopsApiGetMonobrandResponse, ShopsApiGetMonobrandResponseSchema, ShopsApiGetParams, ShopsApiGetProductsParams, ShopsApiGetProductsResponse, ShopsApiGetProductsResponseSchema, ShopsApiGetResponse, ShopsApiGetResponseSchema, ShopsApiProductItem, ShopsApiProductItemSchema, ShopsApiShopItem, ShopsApiShopItemSchema, ShopsApiStockAvailability, ShopsApiStockAvailabilitySchema, ShopsApiTag, ShopsApiTagSchema, ShopsStockAvailabilityType, ShopsStockAvailabilityTypeSchema, SkuApi, SkuApiAttribute, SkuApiAttributeProperty, SkuApiAttributePropertySchema, SkuApiAttributePropertyValue, SkuApiAttributePropertyValueSchema, SkuApiAttributeSchema, SkuApiBrand, SkuApiBrandSchema, SkuApiCategory, SkuApiCategorySchema, SkuApiCollectionItem, SkuApiCollectionItemSchema, SkuApiGetCollectionsParams, SkuApiGetCollectionsResponse, SkuApiGetCollectionsResponseSchema, SkuApiGetParams, SkuApiGetResponse, SkuApiGetResponseSchema, SkuApiGetReviewAvailableParams, SkuApiGetReviewAvailableResponse, SkuApiGetReviewAvailableResponseSchema, SkuApiGetSimilarParams, SkuApiGetSimilarResponse, SkuApiGetSimilarResponseSchema, SkuApiInstallment, SkuApiInstallmentSchema, SkuApiShop, SkuApiShopSchema, SkuApiSimilarItem, SkuApiSimilarItemSchema, SkuApiStockAvailability, SkuApiStockAvailabilitySchema, SkuApiTag, SkuApiTagSchema, SkuStockAvailabilityType, SkuStockAvailabilityTypeSchema, TeezApiError, TeezApiErrorOptions, TeezClient, TeezClientConfig, TeezError, TeezNetworkError, TeezNetworkErrorOptions, TeezTimeoutError, TeezTimeoutErrorOptions, TeezValidationError, TeezValidationErrorOptions, TeezValidationIssue, UsersApi, UsersApiDeviceIdentity, UsersApiDeviceSdkInformation, UsersApiLanguageEnum, UsersApiLanguageEnumSchema, UsersApiRegisterDeviceParams, UsersApiRegisterDeviceResponse, UsersApiRegisterDeviceResponseSchema, UsersApiUpdateLanguageParams, UsersApiUpdateLanguageResponse, UsersApiUpdateLanguageResponseSchema, buildHeaders, buildUserAgent, resolveConfig };
4906
5056
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -69,7 +69,7 @@ function parseResponse(schema, data) {
69
69
  //#endregion
70
70
  //#region src/api/auth/schemas.ts
71
71
  /**
72
- * Response schema for login.
72
+ * Response schema for initiating phone login.
73
73
  */
74
74
  const AuthApiLoginResponseSchema = z.void();
75
75
  /**
@@ -77,13 +77,13 @@ const AuthApiLoginResponseSchema = z.void();
77
77
  */
78
78
  const AuthApiVerifyResponseSchema = z.object({
79
79
  userId: z.string(),
80
+ phone: z.string(),
80
81
  accessToken: z.string(),
81
82
  refreshToken: z.string(),
82
- phone: z.string(),
83
+ paymentId: z.nullish(z.number()),
83
84
  pickupPoint: z.nullish(z.unknown()),
84
85
  address: z.nullish(z.unknown()),
85
- recipient: z.nullish(z.unknown()),
86
- paymentId: z.nullish(z.number())
86
+ recipient: z.nullish(z.unknown())
87
87
  });
88
88
  /**
89
89
  * Response schema for token validation.
@@ -1184,6 +1184,76 @@ var SkuApi = class {
1184
1184
  }
1185
1185
  };
1186
1186
 
1187
+ //#endregion
1188
+ //#region src/api/users/schemas.ts
1189
+ /**
1190
+ * Supported language enum for user preference
1191
+ */
1192
+ const UsersApiLanguageEnumSchema = z.enum(["ru", "kk"]);
1193
+ /**
1194
+ * Response schema for language update
1195
+ */
1196
+ const UsersApiUpdateLanguageResponseSchema = z.object({
1197
+ language: UsersApiLanguageEnumSchema,
1198
+ title: z.string(),
1199
+ message: z.string()
1200
+ });
1201
+ /**
1202
+ * Response schema for device registration
1203
+ */
1204
+ const UsersApiRegisterDeviceResponseSchema = z.nullish(z.null());
1205
+
1206
+ //#endregion
1207
+ //#region src/api/users/api.ts
1208
+ /**
1209
+ * API for user management operations.
1210
+ */
1211
+ var UsersApi = class {
1212
+ /**
1213
+ * Initializes a new instance of the UsersApi.
1214
+ *
1215
+ * @param http HTTP client instance.
1216
+ */
1217
+ constructor(http) {
1218
+ this.http = http;
1219
+ }
1220
+ /**
1221
+ * Updates the user's preferred language.
1222
+ *
1223
+ * @example
1224
+ * await client.users.updateLanguage({
1225
+ * language: "ru"
1226
+ * });
1227
+ */
1228
+ async updateLanguage(params) {
1229
+ return parseResponse(UsersApiUpdateLanguageResponseSchema, await this.http.patch({
1230
+ path: "/api/v1/users/me/language",
1231
+ body: params
1232
+ }));
1233
+ }
1234
+ /**
1235
+ * Registers device identity for analytics tracking.
1236
+ *
1237
+ * @example
1238
+ * await client.users.registerDevice({
1239
+ * deviceIdentity: {
1240
+ * sdkInformation: [
1241
+ * {
1242
+ * type: "Appsflyer",
1243
+ * deviceId: "1765694307025-6267413661002574019"
1244
+ * }
1245
+ * ]
1246
+ * }
1247
+ * });
1248
+ */
1249
+ async registerDevice(params) {
1250
+ return parseResponse(UsersApiRegisterDeviceResponseSchema, await this.http.post({
1251
+ path: "/api/v1/device-identities",
1252
+ body: params
1253
+ }));
1254
+ }
1255
+ };
1256
+
1187
1257
  //#endregion
1188
1258
  //#region src/common/constants.ts
1189
1259
  /**
@@ -1488,7 +1558,7 @@ var TeezClient = class {
1488
1558
  */
1489
1559
  http;
1490
1560
  /**
1491
- * API for authentication operations (login, verify OTP, check token).
1561
+ * API for authentication operations.
1492
1562
  */
1493
1563
  auth;
1494
1564
  /**
@@ -1524,6 +1594,10 @@ var TeezClient = class {
1524
1594
  */
1525
1595
  sku;
1526
1596
  /**
1597
+ * API for user management operations.
1598
+ */
1599
+ users;
1600
+ /**
1527
1601
  * Initializes a new instance of the TeezClient.
1528
1602
  *
1529
1603
  * @param config Optional client configuration.
@@ -1540,6 +1614,7 @@ var TeezClient = class {
1540
1614
  this.promo = new PromoApi(this.http);
1541
1615
  this.shops = new ShopsApi(this.http);
1542
1616
  this.sku = new SkuApi(this.http);
1617
+ this.users = new UsersApi(this.http);
1543
1618
  }
1544
1619
  /**
1545
1620
  * Returns the current client configuration.
@@ -1550,5 +1625,5 @@ var TeezClient = class {
1550
1625
  };
1551
1626
 
1552
1627
  //#endregion
1553
- export { AuthApi, AuthApiCheckTokenResponseSchema, AuthApiLoginResponseSchema, AuthApiVerifyResponseSchema, BASE_URL, BannerActionTypesSchema, BannerImageTypeSchema, BannersApi, BannersApiActionSchema, BannersApiBannerItemSchema, BannersApiImageSchema, BannersApiListResponseSchema, CategoriesApi, CategoriesApiGetParentsResponseItemSchema, CategoriesApiGetParentsResponseSchema, CategoriesApiGetResponseSchema, CategoriesApiListResponseItemSchema, CategoriesApiListResponseSchema, CollectionTypeSchema, CollectionsApi, CollectionsApiGetResponseSchema, CollectionsApiGetSkusResponseSchema, CollectionsApiListItemSchema, CollectionsApiListResponseSchema, CollectionsApiSkuItemSchema, CollectionsApiStockAvailabilitySchema, CollectionsStockAvailabilityTypeSchema, DEFAULT_APP_VERSION, DEFAULT_CONFIG, FeatureFlagsApi, FeatureFlagsApiItemSchema, FeatureFlagsApiListResponseSchema, LANGUAGES, ProductSortKeySchema, ProductsApi, ProductsApiBadgeSchema, ProductsApiGetReviewsResponseSchema, ProductsApiGetSortOptionsResponseSchema, ProductsApiListResponseSchema, ProductsApiProductItemSchema, ProductsApiReviewItemSchema, ProductsApiSortOptionSchema, ProductsApiStockAvailabilitySchema, ProductsStockAvailabilityTypeSchema, PromoApi, PromoApiItemSchema, PromoApiListResponseSchema, ShopsApi, ShopsApiContactInfoSchema, ShopsApiGetMonobrandResponseSchema, ShopsApiGetProductsResponseSchema, ShopsApiGetResponseSchema, ShopsApiProductItemSchema, ShopsApiShopItemSchema, ShopsApiStockAvailabilitySchema, ShopsApiTagSchema, ShopsStockAvailabilityTypeSchema, SkuApi, SkuApiAttributePropertySchema, SkuApiAttributePropertyValueSchema, SkuApiAttributeSchema, SkuApiBrandSchema, SkuApiCategorySchema, SkuApiCollectionItemSchema, SkuApiGetCollectionsResponseSchema, SkuApiGetResponseSchema, SkuApiGetReviewAvailableResponseSchema, SkuApiGetSimilarResponseSchema, SkuApiInstallmentSchema, SkuApiShopSchema, SkuApiSimilarItemSchema, SkuApiStockAvailabilitySchema, SkuApiTagSchema, SkuStockAvailabilityTypeSchema, TeezApiError, TeezClient, TeezError, TeezNetworkError, TeezTimeoutError, TeezValidationError, buildHeaders, buildUserAgent, resolveConfig };
1628
+ export { AuthApi, AuthApiCheckTokenResponseSchema, AuthApiLoginResponseSchema, AuthApiVerifyResponseSchema, BASE_URL, BannerActionTypesSchema, BannerImageTypeSchema, BannersApi, BannersApiActionSchema, BannersApiBannerItemSchema, BannersApiImageSchema, BannersApiListResponseSchema, CategoriesApi, CategoriesApiGetParentsResponseItemSchema, CategoriesApiGetParentsResponseSchema, CategoriesApiGetResponseSchema, CategoriesApiListResponseItemSchema, CategoriesApiListResponseSchema, CollectionTypeSchema, CollectionsApi, CollectionsApiGetResponseSchema, CollectionsApiGetSkusResponseSchema, CollectionsApiListItemSchema, CollectionsApiListResponseSchema, CollectionsApiSkuItemSchema, CollectionsApiStockAvailabilitySchema, CollectionsStockAvailabilityTypeSchema, DEFAULT_APP_VERSION, DEFAULT_CONFIG, FeatureFlagsApi, FeatureFlagsApiItemSchema, FeatureFlagsApiListResponseSchema, LANGUAGES, ProductSortKeySchema, ProductsApi, ProductsApiBadgeSchema, ProductsApiGetReviewsResponseSchema, ProductsApiGetSortOptionsResponseSchema, ProductsApiListResponseSchema, ProductsApiProductItemSchema, ProductsApiReviewItemSchema, ProductsApiSortOptionSchema, ProductsApiStockAvailabilitySchema, ProductsStockAvailabilityTypeSchema, PromoApi, PromoApiItemSchema, PromoApiListResponseSchema, ShopsApi, ShopsApiContactInfoSchema, ShopsApiGetMonobrandResponseSchema, ShopsApiGetProductsResponseSchema, ShopsApiGetResponseSchema, ShopsApiProductItemSchema, ShopsApiShopItemSchema, ShopsApiStockAvailabilitySchema, ShopsApiTagSchema, ShopsStockAvailabilityTypeSchema, SkuApi, SkuApiAttributePropertySchema, SkuApiAttributePropertyValueSchema, SkuApiAttributeSchema, SkuApiBrandSchema, SkuApiCategorySchema, SkuApiCollectionItemSchema, SkuApiGetCollectionsResponseSchema, SkuApiGetResponseSchema, SkuApiGetReviewAvailableResponseSchema, SkuApiGetSimilarResponseSchema, SkuApiInstallmentSchema, SkuApiShopSchema, SkuApiSimilarItemSchema, SkuApiStockAvailabilitySchema, SkuApiTagSchema, SkuStockAvailabilityTypeSchema, TeezApiError, TeezClient, TeezError, TeezNetworkError, TeezTimeoutError, TeezValidationError, UsersApi, UsersApiLanguageEnumSchema, UsersApiRegisterDeviceResponseSchema, UsersApiUpdateLanguageResponseSchema, buildHeaders, buildUserAgent, resolveConfig };
1554
1629
  //# sourceMappingURL=index.mjs.map