@blux.ai/web-sdk 1.0.0-rc0 → 1.0.0-rc2

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.
Files changed (128) hide show
  1. package/dist/package.json +4 -4
  2. package/dist/src/BluxClient.d.ts +41 -0
  3. package/dist/src/BluxClient.js +208 -0
  4. package/dist/src/BluxClient.js.map +1 -0
  5. package/dist/src/apis/APIs.d.ts +348 -0
  6. package/dist/src/apis/APIs.js +145 -0
  7. package/dist/src/apis/APIs.js.map +1 -0
  8. package/dist/src/apis/createEvent.d.ts +4 -0
  9. package/dist/src/apis/createEvent.js +7 -0
  10. package/dist/src/apis/createEvent.js.map +1 -0
  11. package/dist/src/apis/getItemRecommendation.d.ts +4 -0
  12. package/dist/src/apis/getItemRecommendation.js +7 -0
  13. package/dist/src/apis/getItemRecommendation.js.map +1 -0
  14. package/dist/src/apis/initialize.d.ts +4 -0
  15. package/dist/src/apis/initialize.js +7 -0
  16. package/dist/src/apis/initialize.js.map +1 -0
  17. package/dist/src/apis/signIn.d.ts +4 -0
  18. package/dist/src/apis/signIn.js +7 -0
  19. package/dist/src/apis/signIn.js.map +1 -0
  20. package/dist/src/apis/signOut.d.ts +4 -0
  21. package/dist/src/apis/signOut.js +7 -0
  22. package/dist/src/apis/signOut.js.map +1 -0
  23. package/dist/src/apis/updateCustomUserProperties.d.ts +4 -0
  24. package/dist/src/apis/updateCustomUserProperties.js +7 -0
  25. package/dist/src/apis/updateCustomUserProperties.js.map +1 -0
  26. package/dist/src/apis/updateUserProperties.d.ts +4 -0
  27. package/dist/src/apis/updateUserProperties.js +7 -0
  28. package/dist/src/apis/updateUserProperties.js.map +1 -0
  29. package/dist/src/constants/COUNTRIES.d.ts +928 -0
  30. package/dist/src/constants/COUNTRIES.js +1159 -0
  31. package/dist/src/constants/COUNTRIES.js.map +1 -0
  32. package/dist/src/constants/ISO8601_REGEX.d.ts +1 -0
  33. package/dist/src/constants/ISO8601_REGEX.js +4 -0
  34. package/dist/src/constants/ISO8601_REGEX.js.map +1 -0
  35. package/dist/src/events/AddCartaddEvent.d.ts +5 -0
  36. package/dist/src/events/AddCartaddEvent.js +13 -0
  37. package/dist/src/events/AddCartaddEvent.js.map +1 -0
  38. package/dist/src/events/AddCustomEvent.d.ts +5 -0
  39. package/dist/src/events/AddCustomEvent.js +11 -0
  40. package/dist/src/events/AddCustomEvent.js.map +1 -0
  41. package/dist/src/events/AddInstantImpression.d.ts +5 -0
  42. package/dist/src/events/AddInstantImpression.js +17 -0
  43. package/dist/src/events/AddInstantImpression.js.map +1 -0
  44. package/dist/src/events/AddLikeEvent.d.ts +5 -0
  45. package/dist/src/events/AddLikeEvent.js +13 -0
  46. package/dist/src/events/AddLikeEvent.js.map +1 -0
  47. package/dist/src/events/AddPageViewEvent.d.ts +5 -0
  48. package/dist/src/events/AddPageViewEvent.js +11 -0
  49. package/dist/src/events/AddPageViewEvent.js.map +1 -0
  50. package/dist/src/events/AddPageVisitEvent.d.ts +5 -0
  51. package/dist/src/events/AddPageVisitEvent.js +10 -0
  52. package/dist/src/events/AddPageVisitEvent.js.map +1 -0
  53. package/dist/src/events/AddPersistentImpression.d.ts +5 -0
  54. package/dist/src/events/AddPersistentImpression.js +17 -0
  55. package/dist/src/events/AddPersistentImpression.js.map +1 -0
  56. package/dist/src/events/AddProductDetailViewEvent.d.ts +5 -0
  57. package/dist/src/events/AddProductDetailViewEvent.js +16 -0
  58. package/dist/src/events/AddProductDetailViewEvent.js.map +1 -0
  59. package/dist/src/events/AddPurchaseEvent.d.ts +5 -0
  60. package/dist/src/events/AddPurchaseEvent.js +15 -0
  61. package/dist/src/events/AddPurchaseEvent.js.map +1 -0
  62. package/dist/src/events/AddRateEvent.d.ts +5 -0
  63. package/dist/src/events/AddRateEvent.js +11 -0
  64. package/dist/src/events/AddRateEvent.js.map +1 -0
  65. package/dist/src/events/AddSectionViewEvent.d.ts +5 -0
  66. package/dist/src/events/AddSectionViewEvent.js +14 -0
  67. package/dist/src/events/AddSectionViewEvent.js.map +1 -0
  68. package/dist/src/events/Event.d.ts +24 -0
  69. package/dist/src/events/Event.js +33 -0
  70. package/dist/src/events/Event.js.map +1 -0
  71. package/dist/src/events/VisitEvent.d.ts +5 -0
  72. package/dist/src/events/VisitEvent.js +10 -0
  73. package/dist/src/events/VisitEvent.js.map +1 -0
  74. package/dist/src/events/index.d.ts +10 -0
  75. package/dist/src/events/index.js +11 -0
  76. package/dist/src/events/index.js.map +1 -0
  77. package/dist/src/events/types.d.ts +75 -0
  78. package/dist/src/events/types.js +3 -0
  79. package/dist/src/events/types.js.map +1 -0
  80. package/dist/src/index.d.ts +4 -0
  81. package/dist/src/index.js +5 -0
  82. package/dist/src/index.js.map +1 -0
  83. package/dist/src/recommendations/ItemRecommendation.d.ts +5 -0
  84. package/dist/src/recommendations/ItemRecommendation.js +12 -0
  85. package/dist/src/recommendations/ItemRecommendation.js.map +1 -0
  86. package/dist/src/recommendations/Recommendation.d.ts +5 -0
  87. package/dist/src/recommendations/Recommendation.js +9 -0
  88. package/dist/src/recommendations/Recommendation.js.map +1 -0
  89. package/dist/src/recommendations/index.d.ts +1 -0
  90. package/dist/src/recommendations/index.js +2 -0
  91. package/dist/src/recommendations/index.js.map +1 -0
  92. package/dist/src/recommendations/types.d.ts +11 -0
  93. package/dist/src/recommendations/types.js +2 -0
  94. package/dist/src/recommendations/types.js.map +1 -0
  95. package/dist/src/utils/Base.d.ts +13 -0
  96. package/dist/src/utils/Base.js +2 -0
  97. package/dist/src/utils/Base.js.map +1 -0
  98. package/dist/src/utils/LocalStorage.d.ts +8 -0
  99. package/dist/src/utils/LocalStorage.js +30 -0
  100. package/dist/src/utils/LocalStorage.js.map +1 -0
  101. package/dist/src/utils/Logger.d.ts +13 -0
  102. package/dist/src/utils/Logger.js +49 -0
  103. package/dist/src/utils/Logger.js.map +1 -0
  104. package/dist/src/utils/assertEqualTypes.d.ts +3 -0
  105. package/dist/src/utils/assertEqualTypes.js +5 -0
  106. package/dist/src/utils/assertEqualTypes.js.map +1 -0
  107. package/dist/src/utils/getPath.d.ts +1 -0
  108. package/dist/src/utils/getPath.js +9 -0
  109. package/dist/src/utils/getPath.js.map +1 -0
  110. package/dist/src/utils/helper.d.ts +1 -0
  111. package/dist/src/utils/helper.js +4 -0
  112. package/dist/src/utils/helper.js.map +1 -0
  113. package/dist/src/utils/operators.d.ts +2 -0
  114. package/dist/src/utils/operators.js +6 -0
  115. package/dist/src/utils/operators.js.map +1 -0
  116. package/dist/src/utils/zodSchemas.d.ts +19 -0
  117. package/dist/src/utils/zodSchemas.js +105 -0
  118. package/dist/src/utils/zodSchemas.js.map +1 -0
  119. package/package.json +4 -4
  120. package/demo/craco.config.js +0 -29
  121. package/demo/package.json +0 -50
  122. package/demo/public/favicon.ico +0 -0
  123. package/demo/public/index.html +0 -43
  124. package/demo/public/logo192.png +0 -0
  125. package/demo/public/logo512.png +0 -0
  126. package/demo/public/manifest.json +0 -25
  127. package/demo/public/robots.txt +0 -3
  128. package/demo/tailwind.config.js +0 -10
@@ -0,0 +1,348 @@
1
+ import { z } from "zod";
2
+ import type { Serialize } from "../utils/Base";
3
+ declare enum HttpMethod {
4
+ GET = "get",
5
+ POST = "post",
6
+ PUT = "put",
7
+ DELETE = "delete"
8
+ }
9
+ export declare enum DevicePlatform {
10
+ ios = "ios",
11
+ android = "android",
12
+ browser = "browser"
13
+ }
14
+ export declare namespace APIs {
15
+ namespace bluxUsersInitialize {
16
+ const name = "bluxUsersInitialize";
17
+ const path: string;
18
+ const method = HttpMethod.POST;
19
+ const bodySchema: z.ZodObject<{
20
+ device_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>>;
21
+ country_code: z.ZodOptional<z.ZodEffects<z.ZodEnum<["AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW", ...("AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW")[]]>, "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW", unknown>>;
22
+ device_model: z.ZodString;
23
+ language_code: z.ZodString;
24
+ os_version: z.ZodString;
25
+ platform: z.ZodNativeEnum<typeof DevicePlatform>;
26
+ sdk_type: z.ZodString;
27
+ sdk_version: z.ZodString;
28
+ timezone: z.ZodString;
29
+ isVisitHandlingInSdk: z.ZodDefault<z.ZodBoolean>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ platform: DevicePlatform;
32
+ timezone: string;
33
+ device_model: string;
34
+ language_code: string;
35
+ os_version: string;
36
+ sdk_type: string;
37
+ sdk_version: string;
38
+ isVisitHandlingInSdk: boolean;
39
+ device_id?: import("bson-objectid").default | undefined;
40
+ country_code?: "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW" | undefined;
41
+ }, {
42
+ platform: DevicePlatform;
43
+ timezone: string;
44
+ device_model: string;
45
+ language_code: string;
46
+ os_version: string;
47
+ sdk_type: string;
48
+ sdk_version: string;
49
+ device_id?: string | undefined;
50
+ country_code?: unknown;
51
+ isVisitHandlingInSdk?: boolean | undefined;
52
+ }>;
53
+ type Body = Serialize<z.input<typeof bodySchema>>;
54
+ const pathSchema: z.ZodObject<{
55
+ application_id: z.ZodOptional<z.ZodString>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ application_id?: string | undefined;
58
+ }, {
59
+ application_id?: string | undefined;
60
+ }>;
61
+ type PathParam = Serialize<z.input<typeof pathSchema>>;
62
+ type ResponseData = {
63
+ blux_user_id: string;
64
+ device_id: string;
65
+ };
66
+ }
67
+ namespace bluxUsersSignIn {
68
+ const name = "bluxUsersSignIn";
69
+ const path: string;
70
+ const method = HttpMethod.PUT;
71
+ const bodySchema: z.ZodObject<{
72
+ user_id: z.ZodString;
73
+ device_id: z.ZodOptional<z.ZodString>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ user_id: string;
76
+ device_id?: string | undefined;
77
+ }, {
78
+ user_id: string;
79
+ device_id?: string | undefined;
80
+ }>;
81
+ type Body = Serialize<z.input<typeof bodySchema>>;
82
+ const pathSchema: z.ZodObject<{
83
+ application_id: z.ZodOptional<z.ZodString>;
84
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ blux_user_id: import("bson-objectid").default;
87
+ application_id?: string | undefined;
88
+ }, {
89
+ blux_user_id: string;
90
+ application_id?: string | undefined;
91
+ }>;
92
+ type PathParam = Serialize<z.input<typeof pathSchema>>;
93
+ type ResponseData = {
94
+ blux_user_id: string;
95
+ };
96
+ }
97
+ namespace bluxUsersSignOut {
98
+ const name = "bluxUsersSignOut";
99
+ const path: string;
100
+ const method = HttpMethod.PUT;
101
+ const bodySchema: z.ZodObject<{
102
+ device_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ device_id: import("bson-objectid").default;
105
+ }, {
106
+ device_id: string;
107
+ }>;
108
+ type Body = Serialize<z.input<typeof bodySchema>>;
109
+ const pathSchema: z.ZodObject<{
110
+ application_id: z.ZodOptional<z.ZodString>;
111
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ blux_user_id: import("bson-objectid").default;
114
+ application_id?: string | undefined;
115
+ }, {
116
+ blux_user_id: string;
117
+ application_id?: string | undefined;
118
+ }>;
119
+ type PathParam = Serialize<z.input<typeof pathSchema>>;
120
+ type ResponseData = {
121
+ blux_user_id: string;
122
+ };
123
+ }
124
+ namespace bluxUsersCollectEvents {
125
+ const name = "bluxUsersCollectEvents";
126
+ const path: string;
127
+ const method = HttpMethod.POST;
128
+ const pathSchema: z.ZodObject<{
129
+ application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
130
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
131
+ }, "strip", z.ZodTypeAny, {
132
+ application_id: import("bson-objectid").default;
133
+ blux_user_id: import("bson-objectid").default;
134
+ }, {
135
+ application_id: string;
136
+ blux_user_id: string;
137
+ }>;
138
+ type PathParam = Serialize<z.input<typeof pathSchema>>;
139
+ const bodySchema: z.ZodObject<{
140
+ events: z.ZodArray<z.ZodObject<{
141
+ device_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>>;
142
+ event_type: z.ZodString;
143
+ event_value: z.ZodOptional<z.ZodString>;
144
+ item_id: z.ZodOptional<z.ZodString>;
145
+ event_properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>;
146
+ custom_event_properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>;
147
+ internal_event_properties: z.ZodOptional<z.ZodObject<{
148
+ url: z.ZodOptional<z.ZodString>;
149
+ ref: z.ZodOptional<z.ZodString>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ url?: string | undefined;
152
+ ref?: string | undefined;
153
+ }, {
154
+ url?: string | undefined;
155
+ ref?: string | undefined;
156
+ }>>;
157
+ captured_at: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>;
158
+ }, "strip", z.ZodTypeAny, {
159
+ event_type: string;
160
+ captured_at: Date;
161
+ internal_event_properties?: {
162
+ url?: string | undefined;
163
+ ref?: string | undefined;
164
+ } | undefined;
165
+ event_properties?: Record<string, string | number | boolean | string[] | Date> | undefined;
166
+ custom_event_properties?: Record<string, string | number | boolean | string[] | Date> | undefined;
167
+ item_id?: string | undefined;
168
+ device_id?: import("bson-objectid").default | undefined;
169
+ event_value?: string | undefined;
170
+ }, {
171
+ event_type: string;
172
+ captured_at: string;
173
+ internal_event_properties?: {
174
+ url?: string | undefined;
175
+ ref?: string | undefined;
176
+ } | undefined;
177
+ event_properties?: Record<string, string | number | boolean | string[]> | undefined;
178
+ custom_event_properties?: Record<string, string | number | boolean | string[]> | undefined;
179
+ item_id?: string | undefined;
180
+ device_id?: string | undefined;
181
+ event_value?: string | undefined;
182
+ }>, "many">;
183
+ }, "strip", z.ZodTypeAny, {
184
+ events: {
185
+ event_type: string;
186
+ captured_at: Date;
187
+ internal_event_properties?: {
188
+ url?: string | undefined;
189
+ ref?: string | undefined;
190
+ } | undefined;
191
+ event_properties?: Record<string, string | number | boolean | string[] | Date> | undefined;
192
+ custom_event_properties?: Record<string, string | number | boolean | string[] | Date> | undefined;
193
+ item_id?: string | undefined;
194
+ device_id?: import("bson-objectid").default | undefined;
195
+ event_value?: string | undefined;
196
+ }[];
197
+ }, {
198
+ events: {
199
+ event_type: string;
200
+ captured_at: string;
201
+ internal_event_properties?: {
202
+ url?: string | undefined;
203
+ ref?: string | undefined;
204
+ } | undefined;
205
+ event_properties?: Record<string, string | number | boolean | string[]> | undefined;
206
+ custom_event_properties?: Record<string, string | number | boolean | string[]> | undefined;
207
+ item_id?: string | undefined;
208
+ device_id?: string | undefined;
209
+ event_value?: string | undefined;
210
+ }[];
211
+ }>;
212
+ type Body = Serialize<z.input<typeof bodySchema>>;
213
+ type ResponseData = boolean;
214
+ }
215
+ namespace bluxUsersGetItemRecommendations {
216
+ const name = "bluxUsersGetItemRecommendations";
217
+ const path: string;
218
+ const method = HttpMethod.POST;
219
+ const bodySchema: z.ZodObject<{
220
+ call_type: z.ZodString;
221
+ limit: z.ZodNumber;
222
+ offset: z.ZodDefault<z.ZodNumber>;
223
+ item_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
224
+ }, "strip", z.ZodTypeAny, {
225
+ offset: number;
226
+ call_type: string;
227
+ limit: number;
228
+ item_ids?: string[] | undefined;
229
+ }, {
230
+ call_type: string;
231
+ limit: number;
232
+ offset?: number | undefined;
233
+ item_ids?: string[] | undefined;
234
+ }>;
235
+ type Body = Serialize<z.input<typeof bodySchema>>;
236
+ const pathSchema: z.ZodObject<{
237
+ application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
238
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
239
+ }, "strip", z.ZodTypeAny, {
240
+ application_id: import("bson-objectid").default;
241
+ blux_user_id: import("bson-objectid").default;
242
+ }, {
243
+ application_id: string;
244
+ blux_user_id: string;
245
+ }>;
246
+ type PathParam = Serialize<z.input<typeof pathSchema>>;
247
+ type ResponseData = {
248
+ recommendation_id?: string;
249
+ items: string[];
250
+ metadata: Record<string, any>;
251
+ status: {
252
+ is_success: boolean;
253
+ code: number;
254
+ message?: string;
255
+ };
256
+ };
257
+ }
258
+ namespace bluxUsersUpdateUserProperties {
259
+ const name = "bluxUsersUpdateUserProperties";
260
+ const path: string;
261
+ const method = HttpMethod.PUT;
262
+ const bodySchema: z.ZodObject<{
263
+ properties: z.ZodObject<{
264
+ phone_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
265
+ email_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
266
+ nighttime_notification_consent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
267
+ marketing_notification_consent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
268
+ sms_consent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
269
+ email_consent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
270
+ }, "strip", z.ZodTypeAny, {
271
+ phone_number?: string | null | undefined;
272
+ email_address?: string | null | undefined;
273
+ nighttime_notification_consent?: boolean | null | undefined;
274
+ marketing_notification_consent?: boolean | null | undefined;
275
+ sms_consent?: boolean | null | undefined;
276
+ email_consent?: boolean | null | undefined;
277
+ }, {
278
+ phone_number?: string | null | undefined;
279
+ email_address?: string | null | undefined;
280
+ nighttime_notification_consent?: boolean | null | undefined;
281
+ marketing_notification_consent?: boolean | null | undefined;
282
+ sms_consent?: boolean | null | undefined;
283
+ email_consent?: boolean | null | undefined;
284
+ }>;
285
+ }, "strip", z.ZodTypeAny, {
286
+ properties: {
287
+ phone_number?: string | null | undefined;
288
+ email_address?: string | null | undefined;
289
+ nighttime_notification_consent?: boolean | null | undefined;
290
+ marketing_notification_consent?: boolean | null | undefined;
291
+ sms_consent?: boolean | null | undefined;
292
+ email_consent?: boolean | null | undefined;
293
+ };
294
+ }, {
295
+ properties: {
296
+ phone_number?: string | null | undefined;
297
+ email_address?: string | null | undefined;
298
+ nighttime_notification_consent?: boolean | null | undefined;
299
+ marketing_notification_consent?: boolean | null | undefined;
300
+ sms_consent?: boolean | null | undefined;
301
+ email_consent?: boolean | null | undefined;
302
+ };
303
+ }>;
304
+ type Body = Serialize<z.input<typeof bodySchema>>;
305
+ const pathSchema: z.ZodObject<{
306
+ application_id: z.ZodOptional<z.ZodString>;
307
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
308
+ }, "strip", z.ZodTypeAny, {
309
+ blux_user_id: import("bson-objectid").default;
310
+ application_id?: string | undefined;
311
+ }, {
312
+ blux_user_id: string;
313
+ application_id?: string | undefined;
314
+ }>;
315
+ type PathParam = Serialize<z.input<typeof pathSchema>>;
316
+ type ResponseData = {
317
+ blux_user_id: string;
318
+ };
319
+ }
320
+ namespace bluxUsersUpdateCustomUserProperties {
321
+ const name = "bluxUsersUpdateCustomUserProperties";
322
+ const path: string;
323
+ const method = HttpMethod.PUT;
324
+ const bodySchema: z.ZodObject<{
325
+ properties: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodNull]>>;
326
+ }, "strip", z.ZodTypeAny, {
327
+ properties: Record<string, string | number | boolean | string[] | Date | null>;
328
+ }, {
329
+ properties: Record<string, string | number | boolean | string[] | null>;
330
+ }>;
331
+ type Body = Serialize<z.input<typeof bodySchema>>;
332
+ const pathSchema: z.ZodObject<{
333
+ application_id: z.ZodOptional<z.ZodString>;
334
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
335
+ }, "strip", z.ZodTypeAny, {
336
+ blux_user_id: import("bson-objectid").default;
337
+ application_id?: string | undefined;
338
+ }, {
339
+ blux_user_id: string;
340
+ application_id?: string | undefined;
341
+ }>;
342
+ type PathParam = Serialize<z.input<typeof pathSchema>>;
343
+ type ResponseData = {
344
+ blux_user_id: string;
345
+ };
346
+ }
347
+ }
348
+ export {};
@@ -0,0 +1,145 @@
1
+ /* eslint-disable @typescript-eslint/no-namespace */
2
+ import { z } from "zod";
3
+ import { countryCodeWithLowerCaseSchema, customPropertiesRequestSchema, customPropertiesSchema, dateSchema, objectIdSchema, } from "../utils/zodSchemas";
4
+ var HttpMethod;
5
+ (function (HttpMethod) {
6
+ HttpMethod["GET"] = "get";
7
+ HttpMethod["POST"] = "post";
8
+ HttpMethod["PUT"] = "put";
9
+ HttpMethod["DELETE"] = "delete";
10
+ })(HttpMethod || (HttpMethod = {}));
11
+ export var DevicePlatform;
12
+ (function (DevicePlatform) {
13
+ DevicePlatform["ios"] = "ios";
14
+ DevicePlatform["android"] = "android";
15
+ DevicePlatform["browser"] = "browser";
16
+ })(DevicePlatform || (DevicePlatform = {}));
17
+ const applicationsRoot = "/applications/{application_id}";
18
+ export var APIs;
19
+ (function (APIs) {
20
+ let bluxUsersInitialize;
21
+ (function (bluxUsersInitialize) {
22
+ bluxUsersInitialize.name = "bluxUsersInitialize";
23
+ bluxUsersInitialize.path = `${applicationsRoot}/blux-users/initialize`;
24
+ bluxUsersInitialize.method = HttpMethod.POST;
25
+ bluxUsersInitialize.bodySchema = z.object({
26
+ device_id: objectIdSchema.optional(),
27
+ country_code: countryCodeWithLowerCaseSchema.optional(),
28
+ device_model: z.string(),
29
+ language_code: z.string(),
30
+ os_version: z.string(),
31
+ platform: z.nativeEnum(DevicePlatform),
32
+ sdk_type: z.string(),
33
+ sdk_version: z.string(),
34
+ timezone: z.string(),
35
+ isVisitHandlingInSdk: z.boolean().default(false), // sdk 업데이트 후 삭제
36
+ });
37
+ bluxUsersInitialize.pathSchema = z.object({
38
+ application_id: z.string().optional(),
39
+ });
40
+ })(bluxUsersInitialize = APIs.bluxUsersInitialize || (APIs.bluxUsersInitialize = {}));
41
+ let bluxUsersSignIn;
42
+ (function (bluxUsersSignIn) {
43
+ bluxUsersSignIn.name = "bluxUsersSignIn";
44
+ bluxUsersSignIn.path = `${applicationsRoot}/blux-users/{blux_user_id}/sign-in`;
45
+ bluxUsersSignIn.method = HttpMethod.PUT;
46
+ bluxUsersSignIn.bodySchema = z.object({
47
+ user_id: z.string(),
48
+ device_id: z.string().optional(), // todo: sdk update 후 필수로 변경
49
+ });
50
+ bluxUsersSignIn.pathSchema = z.object({
51
+ application_id: z.string().optional(),
52
+ blux_user_id: objectIdSchema,
53
+ });
54
+ })(bluxUsersSignIn = APIs.bluxUsersSignIn || (APIs.bluxUsersSignIn = {}));
55
+ let bluxUsersSignOut;
56
+ (function (bluxUsersSignOut) {
57
+ bluxUsersSignOut.name = "bluxUsersSignOut";
58
+ bluxUsersSignOut.path = `${applicationsRoot}/blux-users/{blux_user_id}/sign-out`;
59
+ bluxUsersSignOut.method = HttpMethod.PUT;
60
+ bluxUsersSignOut.bodySchema = z.object({
61
+ device_id: objectIdSchema,
62
+ });
63
+ bluxUsersSignOut.pathSchema = z.object({
64
+ application_id: z.string().optional(),
65
+ blux_user_id: objectIdSchema,
66
+ });
67
+ })(bluxUsersSignOut = APIs.bluxUsersSignOut || (APIs.bluxUsersSignOut = {}));
68
+ let bluxUsersCollectEvents;
69
+ (function (bluxUsersCollectEvents) {
70
+ bluxUsersCollectEvents.name = "bluxUsersCollectEvents";
71
+ bluxUsersCollectEvents.path = `${applicationsRoot}/blux-users/{blux_user_id}/collect-events`;
72
+ bluxUsersCollectEvents.method = HttpMethod.POST;
73
+ bluxUsersCollectEvents.pathSchema = z.object({
74
+ application_id: objectIdSchema,
75
+ blux_user_id: objectIdSchema,
76
+ });
77
+ bluxUsersCollectEvents.bodySchema = z.object({
78
+ events: z.array(z.object({
79
+ device_id: objectIdSchema.optional(),
80
+ event_type: z.string(),
81
+ event_value: z.string().optional(),
82
+ item_id: z.string().optional(),
83
+ event_properties: customPropertiesSchema.optional(),
84
+ custom_event_properties: customPropertiesSchema.optional(),
85
+ internal_event_properties: z
86
+ .object({
87
+ url: z.string().optional(),
88
+ ref: z.string().optional(),
89
+ })
90
+ .optional(),
91
+ captured_at: dateSchema,
92
+ })),
93
+ });
94
+ })(bluxUsersCollectEvents = APIs.bluxUsersCollectEvents || (APIs.bluxUsersCollectEvents = {}));
95
+ let bluxUsersGetItemRecommendations;
96
+ (function (bluxUsersGetItemRecommendations) {
97
+ bluxUsersGetItemRecommendations.name = "bluxUsersGetItemRecommendations";
98
+ bluxUsersGetItemRecommendations.path = `${applicationsRoot}/blux-users/{blux_user_id}/item-recommendations`;
99
+ bluxUsersGetItemRecommendations.method = HttpMethod.POST;
100
+ bluxUsersGetItemRecommendations.bodySchema = z.object({
101
+ call_type: z.string(),
102
+ limit: z.number(),
103
+ offset: z.number().default(0),
104
+ item_ids: z.array(z.string()).optional(),
105
+ });
106
+ bluxUsersGetItemRecommendations.pathSchema = z.object({
107
+ application_id: objectIdSchema,
108
+ blux_user_id: objectIdSchema,
109
+ });
110
+ })(bluxUsersGetItemRecommendations = APIs.bluxUsersGetItemRecommendations || (APIs.bluxUsersGetItemRecommendations = {}));
111
+ let bluxUsersUpdateUserProperties;
112
+ (function (bluxUsersUpdateUserProperties) {
113
+ bluxUsersUpdateUserProperties.name = "bluxUsersUpdateUserProperties";
114
+ bluxUsersUpdateUserProperties.path = `${applicationsRoot}/blux-users/{blux_user_id}/update-user-properties`;
115
+ bluxUsersUpdateUserProperties.method = HttpMethod.PUT;
116
+ bluxUsersUpdateUserProperties.bodySchema = z.object({
117
+ properties: z.object({
118
+ phone_number: z.string().nullable().optional(),
119
+ email_address: z.string().nullable().optional(),
120
+ nighttime_notification_consent: z.boolean().nullable().optional(),
121
+ marketing_notification_consent: z.boolean().nullable().optional(),
122
+ sms_consent: z.boolean().nullable().optional(),
123
+ email_consent: z.boolean().nullable().optional(),
124
+ }),
125
+ });
126
+ bluxUsersUpdateUserProperties.pathSchema = z.object({
127
+ application_id: z.string().optional(),
128
+ blux_user_id: objectIdSchema,
129
+ });
130
+ })(bluxUsersUpdateUserProperties = APIs.bluxUsersUpdateUserProperties || (APIs.bluxUsersUpdateUserProperties = {}));
131
+ let bluxUsersUpdateCustomUserProperties;
132
+ (function (bluxUsersUpdateCustomUserProperties) {
133
+ bluxUsersUpdateCustomUserProperties.name = "bluxUsersUpdateCustomUserProperties";
134
+ bluxUsersUpdateCustomUserProperties.path = `${applicationsRoot}/blux-users/{blux_user_id}/update-custom-user-properties`;
135
+ bluxUsersUpdateCustomUserProperties.method = HttpMethod.PUT;
136
+ bluxUsersUpdateCustomUserProperties.bodySchema = z.object({
137
+ properties: customPropertiesRequestSchema,
138
+ });
139
+ bluxUsersUpdateCustomUserProperties.pathSchema = z.object({
140
+ application_id: z.string().optional(),
141
+ blux_user_id: objectIdSchema,
142
+ });
143
+ })(bluxUsersUpdateCustomUserProperties = APIs.bluxUsersUpdateCustomUserProperties || (APIs.bluxUsersUpdateCustomUserProperties = {}));
144
+ })(APIs || (APIs = {}));
145
+ //# sourceMappingURL=APIs.js.map
@@ -0,0 +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;AACxB,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC7B,sBAAsB,EACtB,UAAU,EACV,cAAc,GACf,MAAM,qBAAqB,CAAC;AAG7B,IAAK,UAKJ;AALD,WAAK,UAAU;IACb,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,+BAAiB,CAAA;AACnB,CAAC,EALI,UAAU,KAAV,UAAU,QAKd;AAED,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;AACrB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,MAAM,gBAAgB,GAAG,gCAAgC,CAAC;AAE1D,MAAM,KAAW,IAAI,CA4LpB;AA5LD,WAAiB,IAAI;IACnB,IAAiB,mBAAmB,CA4BnC;IA5BD,WAAiB,mBAAmB;QACrB,wBAAI,GAAG,qBAAqB,CAAC;QAC7B,wBAAI,GAAG,GAAG,gBAAgB,wBAAwB,CAAC;QACnD,0BAAM,GAAG,UAAU,CAAC,IAAI,CAAC;QAEzB,8BAAU,GAAG,CAAC,CAAC,MAAM,CAAC;YACjC,SAAS,EAAE,cAAc,CAAC,QAAQ,EAAE;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,IAAI,QA4LpB","sourcesContent":["/* eslint-disable @typescript-eslint/no-namespace */\nimport { z } from \"zod\";\nimport {\n countryCodeWithLowerCaseSchema,\n customPropertiesRequestSchema,\n customPropertiesSchema,\n dateSchema,\n objectIdSchema,\n} from \"../utils/zodSchemas\";\nimport type { Serialize } from \"../utils/Base\";\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}\";\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 });\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: 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,\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(), // todo: 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_value: z.string().optional(),\n item_id: z.string().optional(),\n event_properties: customPropertiesSchema.optional(), // todo : remove this\n custom_event_properties: customPropertiesSchema.optional(),\n internal_event_properties: z\n .object({\n url: z.string().optional(),\n ref: z.string().optional(),\n })\n .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 bluxUsersGetItemRecommendations {\n export const name = \"bluxUsersGetItemRecommendations\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/item-recommendations`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = z.object({\n call_type: z.string(),\n limit: z.number(),\n offset: z.number().default(0),\n item_ids: z.array(z.string()).optional(),\n });\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 = {\n recommendation_id?: string;\n items: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metadata: Record<string, any>;\n status: {\n is_success: boolean;\n code: number;\n message?: string;\n };\n };\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 sms_consent: z.boolean().nullable().optional(),\n email_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"]}
@@ -0,0 +1,4 @@
1
+ import type { AxiosInstance } from "axios";
2
+ import { APIs } from "./APIs";
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>>;
@@ -0,0 +1,7 @@
1
+ import { APIs } from "./APIs";
2
+ import { getPath } from "../utils/getPath";
3
+ var API = APIs.bluxUsersCollectEvents;
4
+ export const collectEvent = (instance, pathParams, body, headers) => {
5
+ return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
+ };
7
+ //# sourceMappingURL=createEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createEvent.js","sourceRoot":"/","sources":["src/apis/createEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,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 type { AxiosInstance } from \"axios\";\nimport { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\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"]}
@@ -0,0 +1,4 @@
1
+ import type { AxiosInstance } from "axios";
2
+ import { APIs } from "./APIs";
3
+ import API = APIs.bluxUsersGetItemRecommendations;
4
+ export declare const getItemRecommendation: (instance: AxiosInstance, pathParams: API.PathParam, body: API.Body, headers: Record<string, string>) => Promise<import("axios").AxiosResponse<API.ResponseData, any>>;
@@ -0,0 +1,7 @@
1
+ import { APIs } from "./APIs";
2
+ import { getPath } from "../utils/getPath";
3
+ var API = APIs.bluxUsersGetItemRecommendations;
4
+ export const getItemRecommendation = (instance, pathParams, body, headers) => {
5
+ return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
+ };
7
+ //# sourceMappingURL=getItemRecommendation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getItemRecommendation.js","sourceRoot":"/","sources":["src/apis/getItemRecommendation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,IAAO,GAAG,GAAG,IAAI,CAAC,+BAA+B,CAAC;AAElD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,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 type { AxiosInstance } from \"axios\";\nimport { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport API = APIs.bluxUsersGetItemRecommendations;\n\nexport const getItemRecommendation = (\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 type { AxiosInstance } from "axios";
2
+ import { APIs } from "./APIs";
3
+ import API = APIs.bluxUsersInitialize;
4
+ export declare const initialize: (instance: AxiosInstance, pathParams: API.PathParam, body: API.Body, headers: Record<string, string>) => Promise<import("axios").AxiosResponse<API.ResponseData, any>>;
@@ -0,0 +1,7 @@
1
+ import { APIs } from "./APIs";
2
+ import { getPath } from "../utils/getPath";
3
+ var API = APIs.bluxUsersInitialize;
4
+ export const initialize = (instance, pathParams, body, headers) => {
5
+ return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
+ };
7
+ //# sourceMappingURL=initialize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialize.js","sourceRoot":"/","sources":["src/apis/initialize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,IAAO,GAAG,GAAG,IAAI,CAAC,mBAAmB,CAAC;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,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 type { AxiosInstance } from \"axios\";\nimport { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport API = APIs.bluxUsersInitialize;\n\nexport const initialize = (\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 type { AxiosInstance } from "axios";
2
+ import { APIs } from "./APIs";
3
+ import API = APIs.bluxUsersSignIn;
4
+ export declare const signIn: (instance: AxiosInstance, pathParams: API.PathParam, body: API.Body, headers: Record<string, string>) => Promise<import("axios").AxiosResponse<API.ResponseData, any>>;
@@ -0,0 +1,7 @@
1
+ import { APIs } from "./APIs";
2
+ import { getPath } from "../utils/getPath";
3
+ var API = APIs.bluxUsersSignIn;
4
+ export const signIn = (instance, pathParams, body, headers) => {
5
+ return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
+ };
7
+ //# sourceMappingURL=signIn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signIn.js","sourceRoot":"/","sources":["src/apis/signIn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,IAAO,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC;AAElC,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,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 type { AxiosInstance } from \"axios\";\nimport { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport API = APIs.bluxUsersSignIn;\n\nexport const signIn = (\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 type { AxiosInstance } from "axios";
2
+ import { APIs } from "./APIs";
3
+ import API = APIs.bluxUsersSignOut;
4
+ export declare const signOut: (instance: AxiosInstance, pathParams: API.PathParam, body: API.Body, headers: Record<string, string>) => Promise<import("axios").AxiosResponse<API.ResponseData, any>>;
@@ -0,0 +1,7 @@
1
+ import { APIs } from "./APIs";
2
+ import { getPath } from "../utils/getPath";
3
+ var API = APIs.bluxUsersSignOut;
4
+ export const signOut = (instance, pathParams, body, headers) => {
5
+ return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
+ };
7
+ //# sourceMappingURL=signOut.js.map