@smartico/public-api 0.0.388 → 0.0.390

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.
@@ -7593,7 +7593,6 @@ class WSAPIAvatars extends WSAPIMiniGames {
7593
7593
  *
7594
7594
  * **Visitor mode**: not supported (throws).
7595
7595
  *
7596
- * @param props.label_id Numeric Smartico label (brand) ID the user belongs to.
7597
7596
  * @param props.user_id Numeric Smartico user ID.
7598
7597
  * @param props.prompt_id Style-prompt ID (`prompt_id`) from {@link getAvatarPrompts}.
7599
7598
  * @param props.avatar_url CDN URL of the base avatar to customize.
@@ -7603,13 +7602,12 @@ class WSAPIAvatars extends WSAPIMiniGames {
7603
7602
  *
7604
7603
  * @example
7605
7604
  * ```ts
7606
- * // label_id / user_id identify the Smartico user being customized.
7605
+ * // user_id identifies the Smartico user being customized.
7607
7606
  * const prompts = await window._smartico.api.getAvatarPrompts();
7608
7607
  * const prompt = prompts[0];
7609
7608
  *
7610
7609
  * console.log('[smartico] generating avatar — show a spinner for ~5-20s and disable the Generate button');
7611
7610
  * const result = await window._smartico.api.avatarsCustomize({
7612
- * label_id,
7613
7611
  * user_id,
7614
7612
  * prompt_id: prompt.prompt_id,
7615
7613
  * avatar_url: baseAvatar.avatar_url,
@@ -7629,7 +7627,7 @@ class WSAPIAvatars extends WSAPIMiniGames {
7629
7627
  * ```
7630
7628
  */
7631
7629
  async avatarsCustomize(props) {
7632
- const required = ['label_id', 'user_id', 'prompt_id', 'avatar_url', 'avatar_real_id'];
7630
+ const required = ['user_id', 'prompt_id', 'avatar_url', 'avatar_real_id'];
7633
7631
  for (const field of required) {
7634
7632
  if (!props[field]) {
7635
7633
  throw new Error(`${field} is required`);
@@ -10490,7 +10488,8 @@ class SmarticoAPI {
10490
10488
  return this.sendAvatarApi({
10491
10489
  method: 'avatar-customize',
10492
10490
  body: {
10493
- label_id: params.label_id,
10491
+ // The server resolves label_id from label_api_key.
10492
+ label_api_key: this.label_api_key,
10494
10493
  user_id: params.user_id,
10495
10494
  user_ext_id: (_this$tracker = this.tracker) == null ? void 0 : _this$tracker.getExtUserId(),
10496
10495
  brand_key: this.brand_api_key || ((_this$tracker2 = this.tracker) == null || (_this$tracker2 = _this$tracker2.params) == null ? void 0 : _this$tracker2.brand_key),