@konantur/scene 0.2.0 → 0.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.cts CHANGED
@@ -100,11 +100,20 @@ interface InputScene {
100
100
  value: string;
101
101
  length: number;
102
102
  }
103
- type Scene = ClickScene | PageViewScene | ChangeScene | InputScene;
103
+ interface IdentifyScene {
104
+ event: 'identify';
105
+ timestamp: string;
106
+ user_id: string;
107
+ }
108
+ interface ExcludeScene {
109
+ event: 'exclude';
110
+ timestamp: string;
111
+ reason: string;
112
+ }
113
+ type Scene = ClickScene | PageViewScene | ChangeScene | InputScene | IdentifyScene | ExcludeScene;
104
114
  interface SceneBatch {
105
115
  session_id: string;
106
116
  device_id: string;
107
- user_id: string | null;
108
117
  scenes: Scene[];
109
118
  sent_at: string;
110
119
  page_url: string;
@@ -119,15 +128,15 @@ interface SceneBatch {
119
128
 
120
129
  declare function init(options?: Partial<Config>): void;
121
130
  declare function setUser(userId: string): void;
122
- declare function clearUser(): void;
131
+ declare function excludeSession(reason?: string): void;
123
132
  declare function flush(): void;
124
133
  declare function destroy(): void;
125
134
  declare const _default: {
126
135
  init: typeof init;
127
136
  setUser: typeof setUser;
128
- clearUser: typeof clearUser;
137
+ excludeSession: typeof excludeSession;
129
138
  flush: typeof flush;
130
139
  destroy: typeof destroy;
131
140
  };
132
141
 
133
- export { type ButtonInfo, type ChangeScene, type ClickScene, type Config, type ContentSnapshot, type DomChange, type ElementInfo, type ElementState, type InputInfo, type InputScene, type LinkInfo, type PageViewScene, type Rect, type ResponseInfo, type Scene, type SceneBatch, type TextInfo, type Tracker, clearUser, _default as default, destroy, flush, init, setUser };
142
+ export { type ButtonInfo, type ChangeScene, type ClickScene, type Config, type ContentSnapshot, type DomChange, type ElementInfo, type ElementState, type ExcludeScene, type IdentifyScene, type InputInfo, type InputScene, type LinkInfo, type PageViewScene, type Rect, type ResponseInfo, type Scene, type SceneBatch, type TextInfo, type Tracker, _default as default, destroy, excludeSession, flush, init, setUser };
package/dist/index.d.ts CHANGED
@@ -100,11 +100,20 @@ interface InputScene {
100
100
  value: string;
101
101
  length: number;
102
102
  }
103
- type Scene = ClickScene | PageViewScene | ChangeScene | InputScene;
103
+ interface IdentifyScene {
104
+ event: 'identify';
105
+ timestamp: string;
106
+ user_id: string;
107
+ }
108
+ interface ExcludeScene {
109
+ event: 'exclude';
110
+ timestamp: string;
111
+ reason: string;
112
+ }
113
+ type Scene = ClickScene | PageViewScene | ChangeScene | InputScene | IdentifyScene | ExcludeScene;
104
114
  interface SceneBatch {
105
115
  session_id: string;
106
116
  device_id: string;
107
- user_id: string | null;
108
117
  scenes: Scene[];
109
118
  sent_at: string;
110
119
  page_url: string;
@@ -119,15 +128,15 @@ interface SceneBatch {
119
128
 
120
129
  declare function init(options?: Partial<Config>): void;
121
130
  declare function setUser(userId: string): void;
122
- declare function clearUser(): void;
131
+ declare function excludeSession(reason?: string): void;
123
132
  declare function flush(): void;
124
133
  declare function destroy(): void;
125
134
  declare const _default: {
126
135
  init: typeof init;
127
136
  setUser: typeof setUser;
128
- clearUser: typeof clearUser;
137
+ excludeSession: typeof excludeSession;
129
138
  flush: typeof flush;
130
139
  destroy: typeof destroy;
131
140
  };
132
141
 
133
- export { type ButtonInfo, type ChangeScene, type ClickScene, type Config, type ContentSnapshot, type DomChange, type ElementInfo, type ElementState, type InputInfo, type InputScene, type LinkInfo, type PageViewScene, type Rect, type ResponseInfo, type Scene, type SceneBatch, type TextInfo, type Tracker, clearUser, _default as default, destroy, flush, init, setUser };
142
+ export { type ButtonInfo, type ChangeScene, type ClickScene, type Config, type ContentSnapshot, type DomChange, type ElementInfo, type ElementState, type ExcludeScene, type IdentifyScene, type InputInfo, type InputScene, type LinkInfo, type PageViewScene, type Rect, type ResponseInfo, type Scene, type SceneBatch, type TextInfo, type Tracker, _default as default, destroy, excludeSession, flush, init, setUser };