@blux.ai/web-sdk 2.2.0 → 2.2.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.
@@ -14,6 +14,11 @@ export var DevicePlatform;
14
14
  DevicePlatform["android"] = "android";
15
15
  DevicePlatform["browser"] = "browser";
16
16
  })(DevicePlatform || (DevicePlatform = {}));
17
+ export var Gender;
18
+ (function (Gender) {
19
+ Gender["male"] = "male";
20
+ Gender["female"] = "female";
21
+ })(Gender || (Gender = {}));
17
22
  const applicationsRoot = "/applications/{application_id}";
18
23
  const applicationsRootV2 = "/v2/applications/{application_id}";
19
24
  export var APIs;
@@ -24,6 +29,7 @@ export var APIs;
24
29
  bluxUsersInitialize.path = `${applicationsRoot}/blux-users/initialize`;
25
30
  bluxUsersInitialize.method = HttpMethod.POST;
26
31
  bluxUsersInitialize.bodySchema = z.object({
32
+ session_id: z.string().optional(),
27
33
  device_id: objectIdSchema.optional(),
28
34
  country_code: countryCodeWithLowerCaseSchema.optional(),
29
35
  device_model: z.string(),
@@ -33,7 +39,6 @@ export var APIs;
33
39
  sdk_type: z.string(),
34
40
  sdk_version: z.string(),
35
41
  timezone: z.string(),
36
- isVisitHandlingInSdk: z.boolean().default(false), // sdk 업데이트 후 삭제
37
42
  blux_user_id: z.string().optional(),
38
43
  });
39
44
  bluxUsersInitialize.pathSchema = z.object({
@@ -67,18 +72,18 @@ export var APIs;
67
72
  blux_user_id: objectIdSchema,
68
73
  });
69
74
  })(bluxUsersSignOut = APIs.bluxUsersSignOut || (APIs.bluxUsersSignOut = {}));
70
- let bluxUsersCollectEvents;
71
- (function (bluxUsersCollectEvents) {
72
- bluxUsersCollectEvents.name = "bluxUsersCollectEvents";
73
- bluxUsersCollectEvents.path = `${applicationsRoot}/blux-users/{blux_user_id}/collect-events`;
74
- bluxUsersCollectEvents.method = HttpMethod.POST;
75
- bluxUsersCollectEvents.pathSchema = z.object({
75
+ let bluxUsersCollectEventsV2;
76
+ (function (bluxUsersCollectEventsV2) {
77
+ bluxUsersCollectEventsV2.name = "bluxUsersCollectEventsV2";
78
+ bluxUsersCollectEventsV2.path = `${applicationsRootV2}/blux-users/{blux_user_id}/collect-events`;
79
+ bluxUsersCollectEventsV2.method = HttpMethod.POST;
80
+ bluxUsersCollectEventsV2.pathSchema = z.object({
76
81
  application_id: objectIdSchema,
77
82
  blux_user_id: objectIdSchema,
78
83
  });
79
- bluxUsersCollectEvents.bodySchema = z.object({
84
+ bluxUsersCollectEventsV2.bodySchema = z.object({
85
+ device_id: objectIdSchema,
80
86
  events: z.array(z.object({
81
- device_id: objectIdSchema.optional(),
82
87
  event_type: z.string(),
83
88
  event_properties: eventPropertiesSchema.optional(),
84
89
  custom_event_properties: customPropertiesSchema.optional(),
@@ -86,45 +91,35 @@ export var APIs;
86
91
  captured_at: dateSchema,
87
92
  })),
88
93
  });
89
- })(bluxUsersCollectEvents = APIs.bluxUsersCollectEvents || (APIs.bluxUsersCollectEvents = {}));
90
- let bluxUsersUpdateUserProperties;
91
- (function (bluxUsersUpdateUserProperties) {
92
- bluxUsersUpdateUserProperties.name = "bluxUsersUpdateUserProperties";
93
- bluxUsersUpdateUserProperties.path = `${applicationsRoot}/blux-users/{blux_user_id}/update-user-properties`;
94
- bluxUsersUpdateUserProperties.method = HttpMethod.PUT;
95
- bluxUsersUpdateUserProperties.bodySchema = z.object({
96
- properties: z.object({
97
- phone_number: z.string().nullable().optional(),
98
- email_address: z.string().nullable().optional(),
99
- nighttime_notification_consent: z.boolean().nullable().optional(),
100
- marketing_notification_consent: z.boolean().nullable().optional(),
101
- // TODO: @luna 김캐디 연동 수정 이후 삭제
102
- sms_consent: z.boolean().nullable().optional(),
103
- email_consent: z.boolean().nullable().optional(),
104
- marketing_notification_sms_consent: z.boolean().nullable().optional(),
105
- marketing_notification_email_consent: z.boolean().nullable().optional(),
106
- marketing_notification_kakao_consent: z.boolean().nullable().optional(),
107
- marketing_notification_push_consent: z.boolean().nullable().optional(),
108
- }),
109
- });
110
- bluxUsersUpdateUserProperties.pathSchema = z.object({
111
- application_id: z.string().optional(),
112
- blux_user_id: objectIdSchema,
113
- });
114
- })(bluxUsersUpdateUserProperties = APIs.bluxUsersUpdateUserProperties || (APIs.bluxUsersUpdateUserProperties = {}));
115
- let bluxUsersUpdateCustomUserProperties;
116
- (function (bluxUsersUpdateCustomUserProperties) {
117
- bluxUsersUpdateCustomUserProperties.name = "bluxUsersUpdateCustomUserProperties";
118
- bluxUsersUpdateCustomUserProperties.path = `${applicationsRoot}/blux-users/{blux_user_id}/update-custom-user-properties`;
119
- bluxUsersUpdateCustomUserProperties.method = HttpMethod.PUT;
120
- bluxUsersUpdateCustomUserProperties.bodySchema = z.object({
121
- properties: customPropertiesRequestSchema,
122
- });
123
- bluxUsersUpdateCustomUserProperties.pathSchema = z.object({
124
- application_id: z.string().optional(),
94
+ })(bluxUsersCollectEventsV2 = APIs.bluxUsersCollectEventsV2 || (APIs.bluxUsersCollectEventsV2 = {}));
95
+ let bluxUsersUpdateProperties;
96
+ (function (bluxUsersUpdateProperties) {
97
+ bluxUsersUpdateProperties.name = "bluxUsersUpdateProperties";
98
+ bluxUsersUpdateProperties.path = `${applicationsRoot}/blux-users/{blux_user_id}/update-properties`;
99
+ bluxUsersUpdateProperties.method = HttpMethod.PUT;
100
+ bluxUsersUpdateProperties.bodySchema = z.object({
101
+ user_properties: z
102
+ .object({
103
+ phone_number: z.string().nullish(),
104
+ email_address: z.string().nullish(),
105
+ nighttime_notification_consent: z.boolean().nullish(),
106
+ marketing_notification_consent: z.boolean().nullish(),
107
+ marketing_notification_sms_consent: z.boolean().nullish(),
108
+ marketing_notification_email_consent: z.boolean().nullish(),
109
+ marketing_notification_kakao_consent: z.boolean().nullish(),
110
+ marketing_notification_push_consent: z.boolean().nullish(),
111
+ is_all_notification_blocked: z.boolean().nullish(),
112
+ gender: z.nativeEnum(Gender).nullish(),
113
+ age: z.number().nullish(),
114
+ })
115
+ .optional(),
116
+ custom_user_properties: customPropertiesRequestSchema.optional(),
117
+ });
118
+ bluxUsersUpdateProperties.pathSchema = z.object({
119
+ application_id: z.string(),
125
120
  blux_user_id: objectIdSchema,
126
121
  });
127
- })(bluxUsersUpdateCustomUserProperties = APIs.bluxUsersUpdateCustomUserProperties || (APIs.bluxUsersUpdateCustomUserProperties = {}));
122
+ })(bluxUsersUpdateProperties = APIs.bluxUsersUpdateProperties || (APIs.bluxUsersUpdateProperties = {}));
128
123
  let bluxUsersGetItemRecommendationsV2;
129
124
  (function (bluxUsersGetItemRecommendationsV2) {
130
125
  bluxUsersGetItemRecommendationsV2.name = "bluxUsersGetItemRecommendationsV2";
@@ -156,24 +151,6 @@ export var APIs;
156
151
  application_id: z.string(),
157
152
  });
158
153
  })(crmEventsCreate = APIs.crmEventsCreate || (APIs.crmEventsCreate = {}));
159
- let inappsDispatcher;
160
- (function (inappsDispatcher) {
161
- inappsDispatcher.name = "inappsDispatcher";
162
- inappsDispatcher.path = `${applicationsRoot}/inapps/dispatch`;
163
- inappsDispatcher.method = HttpMethod.POST;
164
- inappsDispatcher.pathSchema = z.object({
165
- application_id: objectIdSchema,
166
- });
167
- inappsDispatcher.bodySchema = z.object({
168
- blux_user_id: objectIdSchema,
169
- device_id: objectIdSchema,
170
- platform: z.union([
171
- z.literal(DevicePlatform.android),
172
- z.literal(DevicePlatform.ios),
173
- z.literal(DevicePlatform.browser),
174
- ]),
175
- });
176
- })(inappsDispatcher = APIs.inappsDispatcher || (APIs.inappsDispatcher = {}));
177
154
  let notificationsUpdate;
178
155
  (function (notificationsUpdate) {
179
156
  notificationsUpdate.name = "notificationsUpdate";
@@ -1 +1 @@
1
- {"version":3,"file":"APIs.js","sourceRoot":"/","sources":["src/apis/APIs.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC7B,sBAAsB,EACtB,UAAU,EACV,qBAAqB,EACrB,6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B,GAAnB,wBAAmB,KAAnB,wBAAmB,QAgBnC;AACH,CAAC,EA3PgB,IAAI,KAAJ,IAAI,QA2PpB","sourcesContent":["/* eslint-disable @typescript-eslint/no-namespace */\nimport { z } from \"zod\";\n\nimport {\n countryCodeWithLowerCaseSchema,\n customPropertiesRequestSchema,\n customPropertiesSchema,\n dateSchema,\n eventPropertiesSchema,\n internalEventPropertiesSchema,\n objectIdSchema,\n recommendationRequestSchema,\n} from \"../utils/zodSchemas\";\n\nimport type { Serialize } from \"../utils/Base\";\nimport type { RecResponse } from \"../utils/zodSchemas\";\n\nenum HttpMethod {\n GET = \"get\",\n POST = \"post\",\n PUT = \"put\",\n DELETE = \"delete\",\n}\n\nexport enum DevicePlatform {\n ios = \"ios\",\n android = \"android\",\n browser = \"browser\",\n}\n\nconst applicationsRoot = \"/applications/{application_id}\";\nconst applicationsRootV2 = \"/v2/applications/{application_id}\";\n\nexport namespace APIs {\n export namespace bluxUsersInitialize {\n export const name = \"bluxUsersInitialize\";\n export const path = `${applicationsRoot}/blux-users/initialize`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = z.object({\n device_id: objectIdSchema.optional(),\n country_code: countryCodeWithLowerCaseSchema.optional(),\n device_model: z.string(),\n language_code: z.string(),\n os_version: z.string(),\n platform: z.nativeEnum(DevicePlatform),\n sdk_type: z.string(),\n sdk_version: z.string(),\n timezone: z.string(),\n isVisitHandlingInSdk: z.boolean().default(false), // sdk 업데이트 후 삭제\n blux_user_id: z.string().optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n device_id?: string;\n };\n }\n\n export namespace bluxUsersSignIn {\n export const name = \"bluxUsersSignIn\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/sign-in`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n user_id: z.string(),\n device_id: z.string().optional(), // TODO: @all sdk update 후 필수로 변경\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersSignOut {\n export const name = \"bluxUsersSignOut\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/sign-out`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n device_id: objectIdSchema.optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(), // TODO: @all objectIdSchema 로 변경\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersCollectEvents {\n export const name = \"bluxUsersCollectEvents\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/collect-events`;\n export const method = HttpMethod.POST;\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export const bodySchema = z.object({\n events: z.array(\n z.object({\n device_id: objectIdSchema.optional(),\n event_type: z.string(),\n event_properties: eventPropertiesSchema.optional(),\n custom_event_properties: customPropertiesSchema.optional(),\n internal_event_properties: internalEventPropertiesSchema.optional(),\n captured_at: dateSchema,\n }),\n ),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export type ResponseData = boolean;\n }\n\n export namespace bluxUsersUpdateUserProperties {\n export const name = \"bluxUsersUpdateUserProperties\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/update-user-properties`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n properties: z.object({\n phone_number: z.string().nullable().optional(),\n email_address: z.string().nullable().optional(),\n nighttime_notification_consent: z.boolean().nullable().optional(),\n marketing_notification_consent: z.boolean().nullable().optional(),\n\n // TODO: @luna 김캐디 연동 수정 이후 삭제\n sms_consent: z.boolean().nullable().optional(),\n email_consent: z.boolean().nullable().optional(),\n\n marketing_notification_sms_consent: z.boolean().nullable().optional(),\n marketing_notification_email_consent: z.boolean().nullable().optional(),\n marketing_notification_kakao_consent: z.boolean().nullable().optional(),\n marketing_notification_push_consent: z.boolean().nullable().optional(),\n }),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersUpdateCustomUserProperties {\n export const name = \"bluxUsersUpdateCustomUserProperties\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/update-custom-user-properties`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n properties: customPropertiesRequestSchema,\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersGetItemRecommendationsV2 {\n export const name = \"bluxUsersGetItemRecommendationsV2\";\n export const path = `${applicationsRootV2}/blux-users/{blux_user_id}/item-recommendations`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = recommendationRequestSchema;\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = RecResponse;\n }\n\n export namespace crmEventsCreate {\n export const name = \"crmEventsCreate\";\n export const path = `${applicationsRoot}/crm-events`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = z.object({\n notification_id: objectIdSchema,\n crm_event_type: z.union([\n z.literal(\"push_opened\"),\n z.literal(\"button_clicked\"),\n z.literal(\"landing_clicked\"),\n z.literal(\"inapp_opened\"),\n ]),\n captured_at: dateSchema,\n item_id: z.string().optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string(),\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = boolean;\n }\n export namespace inappsDispatcher {\n export const name = \"inappsDispatcher\";\n export const path = `${applicationsRoot}/inapps/dispatch`;\n export const method = HttpMethod.POST;\n\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export const bodySchema = z.object({\n blux_user_id: objectIdSchema,\n device_id: objectIdSchema,\n platform: z.union([\n z.literal(DevicePlatform.android),\n z.literal(DevicePlatform.ios),\n z.literal(DevicePlatform.browser),\n ]),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export type ResponseData =\n | ({\n notificationId: string;\n inappId: string;\n htmlString: string;\n baseUrl: string;\n } & { shouldDisplay: true; nextPollDelay: number })\n | {\n shouldDisplay: false;\n nextPollDelay: number;\n };\n }\n\n export namespace notificationsUpdate {\n export const name = \"notificationsUpdate\";\n export const path = `${applicationsRoot}/notifications/{notification_id}`;\n export const method = HttpMethod.POST;\n\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n notification_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export const bodySchema = z.object({\n status: z.literal(\"received\"),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n export type ResponseData = boolean;\n }\n}\n"]}
1
+ {"version":3,"file":"APIs.js","sourceRoot":"/","sources":["src/apis/APIs.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC7B,sBAAsB,EACtB,UAAU,EACV,qBAA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,CAAC,OAAO,CAAC,UAAU,CAAC;SAC9B,CAAC,CAAC;IAGL,CAAC,EAhBgB,mBAAmB,GAAnB,wBAAmB,KAAnB,wBAAmB,QAgBnC;AACH,CAAC,EA/MgB,IAAI,KAAJ,IAAI,QA+MpB","sourcesContent":["/* eslint-disable @typescript-eslint/no-namespace */\nimport { z } from \"zod\";\n\nimport {\n countryCodeWithLowerCaseSchema,\n customPropertiesRequestSchema,\n customPropertiesSchema,\n dateSchema,\n eventPropertiesSchema,\n internalEventPropertiesSchema,\n objectIdSchema,\n recommendationRequestSchema,\n} from \"../utils/zodSchemas\";\n\nimport type { Serialize } from \"../utils/Base\";\nimport type { RecResponse } from \"../utils/zodSchemas\";\n\nenum HttpMethod {\n GET = \"get\",\n POST = \"post\",\n PUT = \"put\",\n DELETE = \"delete\",\n}\n\nexport enum DevicePlatform {\n ios = \"ios\",\n android = \"android\",\n browser = \"browser\",\n}\n\nexport enum Gender {\n male = \"male\",\n female = \"female\",\n}\n\nconst applicationsRoot = \"/applications/{application_id}\";\nconst applicationsRootV2 = \"/v2/applications/{application_id}\";\n\nexport namespace APIs {\n export namespace bluxUsersInitialize {\n export const name = \"bluxUsersInitialize\";\n export const path = `${applicationsRoot}/blux-users/initialize`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = z.object({\n session_id: z.string().optional(),\n device_id: objectIdSchema.optional(),\n country_code: countryCodeWithLowerCaseSchema.optional(),\n device_model: z.string(),\n language_code: z.string(),\n os_version: z.string(),\n platform: z.nativeEnum(DevicePlatform),\n sdk_type: z.string(),\n sdk_version: z.string(),\n timezone: z.string(),\n blux_user_id: z.string().optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n device_id: string;\n };\n }\n\n export namespace bluxUsersSignIn {\n export const name = \"bluxUsersSignIn\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/sign-in`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n user_id: z.string(),\n device_id: z.string().optional(), // TODO: @all sdk update 후 필수로 변경\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersSignOut {\n export const name = \"bluxUsersSignOut\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/sign-out`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n device_id: objectIdSchema.optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(), // TODO: @all objectIdSchema 로 변경\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersCollectEventsV2 {\n export const name = \"bluxUsersCollectEventsV2\";\n export const path = `${applicationsRootV2}/blux-users/{blux_user_id}/collect-events`;\n export const method = HttpMethod.POST;\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export const bodySchema = z.object({\n device_id: objectIdSchema,\n events: z.array(\n z.object({\n event_type: z.string(),\n event_properties: eventPropertiesSchema.optional(),\n custom_event_properties: customPropertiesSchema.optional(),\n internal_event_properties: internalEventPropertiesSchema.optional(),\n captured_at: dateSchema,\n }),\n ),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export type ResponseData = {\n nextPollDelayMs: number;\n inapp?: {\n notificationId: string;\n inappId: string;\n htmlString: string;\n baseUrl: string;\n };\n };\n }\n\n export namespace bluxUsersUpdateProperties {\n export const name = \"bluxUsersUpdateProperties\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/update-properties`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n user_properties: z\n .object({\n phone_number: z.string().nullish(),\n email_address: z.string().nullish(),\n nighttime_notification_consent: z.boolean().nullish(),\n marketing_notification_consent: z.boolean().nullish(),\n marketing_notification_sms_consent: z.boolean().nullish(),\n marketing_notification_email_consent: z.boolean().nullish(),\n marketing_notification_kakao_consent: z.boolean().nullish(),\n marketing_notification_push_consent: z.boolean().nullish(),\n is_all_notification_blocked: z.boolean().nullish(),\n\n gender: z.nativeEnum(Gender).nullish(),\n age: z.number().nullish(),\n })\n .optional(),\n custom_user_properties: customPropertiesRequestSchema.optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string(),\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersGetItemRecommendationsV2 {\n export const name = \"bluxUsersGetItemRecommendationsV2\";\n export const path = `${applicationsRootV2}/blux-users/{blux_user_id}/item-recommendations`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = recommendationRequestSchema;\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = RecResponse;\n }\n\n export namespace crmEventsCreate {\n export const name = \"crmEventsCreate\";\n export const path = `${applicationsRoot}/crm-events`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = z.object({\n notification_id: objectIdSchema,\n crm_event_type: z.union([\n z.literal(\"push_opened\"),\n z.literal(\"button_clicked\"),\n z.literal(\"landing_clicked\"),\n z.literal(\"inapp_opened\"),\n ]),\n captured_at: dateSchema,\n item_id: z.string().optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string(),\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = boolean;\n }\n\n export namespace notificationsUpdate {\n export const name = \"notificationsUpdate\";\n export const path = `${applicationsRoot}/notifications/{notification_id}`;\n export const method = HttpMethod.POST;\n\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n notification_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export const bodySchema = z.object({\n status: z.literal(\"received\"),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n export type ResponseData = boolean;\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  import { APIs } from "./APIs";
2
2
  import type { AxiosInstance } from "axios";
3
- import API = APIs.bluxUsersCollectEvents;
4
- export declare const collectEvent: (instance: AxiosInstance, pathParams: API.PathParam, body: API.Body, headers: Record<string, string>) => Promise<import("axios").AxiosResponse<boolean, any>>;
3
+ import API = APIs.bluxUsersCollectEventsV2;
4
+ export declare const collectEvent: (instance: AxiosInstance, pathParams: API.PathParam, body: API.Body, headers: Record<string, string>) => Promise<import("axios").AxiosResponse<API.ResponseData, any>>;
@@ -1,6 +1,6 @@
1
1
  import { APIs } from "./APIs";
2
2
  import { getPath } from "../utils/getPath";
3
- var API = APIs.bluxUsersCollectEvents;
3
+ var API = APIs.bluxUsersCollectEventsV2;
4
4
  export const collectEvent = (instance, pathParams, body, headers) => {
5
5
  return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"createEvent.js","sourceRoot":"/","sources":["src/apis/createEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,IAAO,GAAG,GAAG,IAAI,CAAC,sBAAsB,CAAC;AAEzC,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,QAAuB,EACvB,UAAyB,EACzB,IAAc,EACd,OAA+B,EAC/B,EAAE;IACF,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CACzB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,EAC7B,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersCollectEvents;\n\nexport const collectEvent = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n body: API.Body,\n headers: Record<string, string>,\n) => {\n return instance[API.method]<API.ResponseData>(\n getPath(API.path, pathParams),\n body,\n { headers },\n );\n};\n"]}
1
+ {"version":3,"file":"createEvent.js","sourceRoot":"/","sources":["src/apis/createEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,IAAO,GAAG,GAAG,IAAI,CAAC,wBAAwB,CAAC;AAE3C,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,QAAuB,EACvB,UAAyB,EACzB,IAAc,EACd,OAA+B,EAC/B,EAAE;IACF,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CACzB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,EAC7B,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersCollectEventsV2;\n\nexport const collectEvent = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n body: API.Body,\n headers: Record<string, string>,\n) => {\n return instance[API.method]<API.ResponseData>(\n getPath(API.path, pathParams),\n body,\n { headers },\n );\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import { APIs } from "./APIs";
2
+ import type { AxiosInstance } from "axios";
3
+ import API = APIs.bluxUsersUpdateProperties;
4
+ export declare const updateProperties: (instance: AxiosInstance, pathParams: API.PathParam, body: API.Body, headers: Record<string, string>) => Promise<import("axios").AxiosResponse<API.ResponseData, any>>;
@@ -1,7 +1,7 @@
1
1
  import { APIs } from "./APIs";
2
2
  import { getPath } from "../utils/getPath";
3
- var API = APIs.inappsDispatcher;
4
- export const inappsDispatch = (instance, pathParams, body, headers) => {
3
+ var API = APIs.bluxUsersUpdateProperties;
4
+ export const updateProperties = (instance, pathParams, body, headers) => {
5
5
  return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
6
  };
7
- //# sourceMappingURL=inappsDispatch.js.map
7
+ //# sourceMappingURL=updateProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateProperties.js","sourceRoot":"/","sources":["src/apis/updateProperties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,IAAO,GAAG,GAAG,IAAI,CAAC,yBAAyB,CAAC;AAE5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,QAAuB,EACvB,UAAyB,EACzB,IAAc,EACd,OAA+B,EAC/B,EAAE;IACF,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CACzB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,EAC7B,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersUpdateProperties;\n\nexport const updateProperties = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n body: API.Body,\n headers: Record<string, string>,\n) => {\n return instance[API.method]<API.ResponseData>(\n getPath(API.path, pathParams),\n body,\n { headers },\n );\n};\n"]}
@@ -1,4 +1,6 @@
1
1
  export declare class SessionStorage {
2
2
  static getBluxUserId(): string | null;
3
3
  static setBluxUserId(userId: string): void;
4
+ static getSessionId(): string | null;
5
+ static setSessionId(sessionId: string): void;
4
6
  }
@@ -1,4 +1,5 @@
1
1
  const BLUX_USER_ID = "blux_userId";
2
+ const BLUX_SESSION_ID = "blux_sessionId";
2
3
  export class SessionStorage {
3
4
  static getBluxUserId() {
4
5
  const userId = sessionStorage.getItem(BLUX_USER_ID);
@@ -7,5 +8,11 @@ export class SessionStorage {
7
8
  static setBluxUserId(userId) {
8
9
  sessionStorage.setItem(BLUX_USER_ID, userId);
9
10
  }
11
+ static getSessionId() {
12
+ return sessionStorage.getItem(BLUX_SESSION_ID);
13
+ }
14
+ static setSessionId(sessionId) {
15
+ sessionStorage.setItem(BLUX_SESSION_ID, sessionId);
16
+ }
10
17
  }
11
18
  //# sourceMappingURL=SessionStorage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SessionStorage.js","sourceRoot":"/","sources":["src/utils/SessionStorage.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAG,aAAa,CAAC;AAGnC,MAAM,OAAO,cAAc;IACzB,MAAM,CAAC,aAAa;QAClB,MAAM,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACpD,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IACzE,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,MAAc;QACjC,cAAc,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;CACF","sourcesContent":["const BLUX_USER_ID = \"blux_userId\";\n\n \nexport class SessionStorage {\n static getBluxUserId(): string | null {\n const userId = sessionStorage.getItem(BLUX_USER_ID);\n return userId === \"undefined\" || userId?.trim() === \"\" ? null : userId;\n }\n\n static setBluxUserId(userId: string) {\n sessionStorage.setItem(BLUX_USER_ID, userId);\n }\n}\n"]}
1
+ {"version":3,"file":"SessionStorage.js","sourceRoot":"/","sources":["src/utils/SessionStorage.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAG,aAAa,CAAC;AACnC,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAEzC,MAAM,OAAO,cAAc;IACzB,MAAM,CAAC,aAAa;QAClB,MAAM,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACpD,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IACzE,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,MAAc;QACjC,cAAc,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;IAED,MAAM,CAAC,YAAY;QACjB,OAAO,cAAc,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,SAAiB;QACnC,cAAc,CAAC,OAAO,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;CACF","sourcesContent":["const BLUX_USER_ID = \"blux_userId\";\nconst BLUX_SESSION_ID = \"blux_sessionId\";\n\nexport class SessionStorage {\n static getBluxUserId(): string | null {\n const userId = sessionStorage.getItem(BLUX_USER_ID);\n return userId === \"undefined\" || userId?.trim() === \"\" ? null : userId;\n }\n\n static setBluxUserId(userId: string) {\n sessionStorage.setItem(BLUX_USER_ID, userId);\n }\n\n static getSessionId(): string | null {\n return sessionStorage.getItem(BLUX_SESSION_ID);\n }\n\n static setSessionId(sessionId: string) {\n sessionStorage.setItem(BLUX_SESSION_ID, sessionId);\n }\n}\n"]}