@adstage/web-sdk 3.0.1 → 3.0.2

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
@@ -392,19 +392,34 @@ declare class ConfigModule implements BaseModule {
392
392
  }
393
393
 
394
394
  /**
395
- * AdStage SDK - Events 모듈
396
- * 이벤트 추적 시스템
395
+ * 사용자 속성 타입
396
+ * API의 UserAttributesInput과 동일한 구조
397
397
  */
398
-
399
- interface EventProperties {
400
- [key: string]: any;
398
+ interface UserProperties {
399
+ /** 성별 */
400
+ gender?: 'male' | 'female' | 'other' | 'unknown';
401
+ /** 국가 코드 (ISO 3166-1 alpha-2) */
402
+ country?: string;
403
+ /** 도시명 */
404
+ city?: string;
405
+ /** 나이 (문자열) */
406
+ age?: string;
407
+ /** 언어 코드 (ISO 639-1) */
408
+ language?: string;
401
409
  }
402
- interface PageData {
403
- page?: string;
404
- title?: string;
405
- category?: string;
410
+ /**
411
+ * 이벤트 속성 타입
412
+ */
413
+ interface EventProperties {
414
+ /** 이벤트 매개변수 */
406
415
  [key: string]: any;
407
416
  }
417
+
418
+ /**
419
+ * AdStage SDK - Events 모듈
420
+ * 이벤트 추적 시스템
421
+ */
422
+
408
423
  declare class EventsModule implements BaseModule {
409
424
  private _isReady;
410
425
  private _config;
@@ -431,14 +446,7 @@ declare class EventsModule implements BaseModule {
431
446
  /**
432
447
  * 사용자 속성 설정
433
448
  */
434
- setUserProperties(properties: {
435
- gender?: 'male' | 'female' | 'other' | 'unknown';
436
- country?: string;
437
- city?: string;
438
- age?: string;
439
- language?: string;
440
- [key: string]: any;
441
- }): void;
449
+ setUserProperties(properties: UserProperties): void;
442
450
  /**
443
451
  * 현재 사용자 속성 반환
444
452
  */
@@ -449,10 +457,6 @@ declare class EventsModule implements BaseModule {
449
457
  * @param properties 이벤트 속성
450
458
  */
451
459
  track(eventName: string, properties?: EventProperties): Promise<void>;
452
- /**
453
- * 페이지 뷰 이벤트 (track의 편의 메소드)
454
- */
455
- pageView(pageData?: PageData): Promise<void>;
456
460
  /**
457
461
  * 서버에 이벤트 전송
458
462
  */
@@ -517,11 +521,6 @@ declare class AdStage {
517
521
  };
518
522
  }
519
523
 
520
- /**
521
- * AdStage SDK - 전역 이벤트 함수들
522
- * Firebase Analytics와 유사한 간단한 API 제공
523
- */
524
-
525
524
  /**
526
525
  * 이벤트 추적 (메인 함수)
527
526
  * @param eventName 이벤트 이름
@@ -535,14 +534,6 @@ declare class AdStage {
535
534
  * });
536
535
  */
537
536
  declare function track(eventName: string, properties?: EventProperties): Promise<void>;
538
- /**
539
- * 페이지 뷰 추적
540
- * @param pageData 페이지 정보
541
- *
542
- * @example
543
- * pageView({ page: '/products', title: 'Products Page' });
544
- */
545
- declare function pageView(pageData?: PageData): Promise<void>;
546
537
  /**
547
538
  * 사용자 ID 설정
548
539
  * @param userId 사용자 ID
@@ -555,6 +546,22 @@ declare function setUserId(userId: string): void;
555
546
  * 현재 사용자 ID 반환
556
547
  */
557
548
  declare function getUserId(): string | undefined;
549
+ /**
550
+ * 사용자 속성 설정
551
+ * @param properties 사용자 속성 객체
552
+ *
553
+ * @example
554
+ * setUserProperties({
555
+ * gender: 'male',
556
+ * country: 'KR',
557
+ * age: '25'
558
+ * });
559
+ */
560
+ declare function setUserProperties(properties: UserProperties): void;
561
+ /**
562
+ * 현재 사용자 속성 반환
563
+ */
564
+ declare function getUserProperties(): any;
558
565
 
559
566
  interface AdStageContextType {
560
567
  isInitialized: boolean;
@@ -591,4 +598,4 @@ declare function useAdStageInstance(): typeof AdStage | null;
591
598
  declare const SDK_VERSION = "2.0.0";
592
599
  declare const SUPPORTED_MODULES: readonly ["ads", "events", "config"];
593
600
 
594
- export { AdEventType, AdOptions, AdSlot, AdStage, AdStageConfig, AdStageProvider, AdType, Advertisement, ApiResponse, BaseModule, EventProperties, ModuleName, OrganizationInfo, PageData, SDK_VERSION, SUPPORTED_MODULES, getUserId, pageView, setUserId, track, useAdStageContext, useAdStageInstance };
601
+ export { AdEventType, AdOptions, AdSlot, AdStage, AdStageConfig, AdStageProvider, AdType, Advertisement, ApiResponse, BaseModule, EventProperties, ModuleName, OrganizationInfo, SDK_VERSION, SUPPORTED_MODULES, UserProperties, getUserId, getUserProperties, setUserId, setUserProperties, track, useAdStageContext, useAdStageInstance };