sequenzy 2.1.58 → 2.1.80

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 (827) hide show
  1. package/dist/cjs/api/resources/abTests/client/Client.d.ts +1 -1
  2. package/dist/cjs/api/resources/abTests/client/Client.js +1 -1
  3. package/dist/cjs/api/resources/abTests/client/requests/UpdateAbTestsRequest.d.ts +1 -1
  4. package/dist/cjs/api/resources/analytics/client/Client.d.ts +40 -0
  5. package/dist/cjs/api/resources/analytics/client/Client.js +156 -0
  6. package/dist/cjs/api/resources/analytics/client/requests/ListCampaignRepliesLegacyRequest.d.ts +14 -0
  7. package/dist/cjs/api/resources/analytics/client/requests/ListCampaignRepliesLegacyRequest.js +3 -0
  8. package/dist/cjs/api/resources/analytics/client/requests/ListCampaignRepliesRequest.d.ts +14 -0
  9. package/dist/cjs/api/resources/analytics/client/requests/ListCampaignRepliesRequest.js +3 -0
  10. package/dist/cjs/api/resources/analytics/client/requests/index.d.ts +2 -0
  11. package/dist/cjs/api/resources/analytics/types/ListCampaignRepliesLegacyResponse.d.ts +7 -0
  12. package/dist/cjs/api/resources/analytics/types/ListCampaignRepliesLegacyResponse.js +3 -0
  13. package/dist/cjs/api/resources/analytics/types/ListCampaignRepliesResponse.d.ts +7 -0
  14. package/dist/cjs/api/resources/analytics/types/ListCampaignRepliesResponse.js +3 -0
  15. package/dist/cjs/api/resources/analytics/types/index.d.ts +2 -0
  16. package/dist/cjs/api/resources/analytics/types/index.js +2 -0
  17. package/dist/cjs/api/resources/campaigns/client/Client.d.ts +1 -1
  18. package/dist/cjs/api/resources/campaigns/client/Client.js +1 -1
  19. package/dist/cjs/api/resources/campaigns/client/requests/ResumeCampaignsRequest.d.ts +1 -1
  20. package/dist/cjs/api/resources/campaigns/client/requests/ScheduleCampaignsRequest.d.ts +1 -1
  21. package/dist/cjs/api/resources/inApp/client/Client.d.ts +326 -1
  22. package/dist/cjs/api/resources/inApp/client/Client.js +1295 -83
  23. package/dist/cjs/api/resources/inApp/client/requests/CreateInAppCampaignRequest.d.ts +15 -0
  24. package/dist/cjs/api/resources/inApp/client/requests/CreateInAppCampaignRequest.js +3 -0
  25. package/dist/cjs/api/resources/inApp/client/requests/CreateInAppPlacementRequest.d.ts +10 -0
  26. package/dist/cjs/api/resources/inApp/client/requests/CreateInAppPlacementRequest.js +3 -0
  27. package/dist/cjs/api/resources/inApp/client/requests/DeleteInAppPlacementRequest.d.ts +10 -0
  28. package/dist/cjs/api/resources/inApp/client/requests/DeleteInAppPlacementRequest.js +3 -0
  29. package/dist/cjs/api/resources/inApp/client/requests/DuplicateInAppCampaignRequest.d.ts +11 -0
  30. package/dist/cjs/api/resources/inApp/client/requests/DuplicateInAppCampaignRequest.js +3 -0
  31. package/dist/cjs/api/resources/inApp/client/requests/EstimateInAppCampaignRecipientsRequest.d.ts +12 -0
  32. package/dist/cjs/api/resources/inApp/client/requests/EstimateInAppCampaignRecipientsRequest.js +3 -0
  33. package/dist/cjs/api/resources/inApp/client/requests/GetInAppCampaignRequest.d.ts +9 -0
  34. package/dist/cjs/api/resources/inApp/client/requests/GetInAppCampaignRequest.js +3 -0
  35. package/dist/cjs/api/resources/inApp/client/requests/GetInAppCampaignStatsRequest.d.ts +9 -0
  36. package/dist/cjs/api/resources/inApp/client/requests/GetInAppCampaignStatsRequest.js +3 -0
  37. package/dist/cjs/api/resources/inApp/client/requests/GetInAppPlacementContentRequest.d.ts +15 -0
  38. package/dist/cjs/api/resources/inApp/client/requests/GetInAppPlacementContentRequest.js +3 -0
  39. package/dist/cjs/api/resources/inApp/client/requests/GetInAppPlacementRequest.d.ts +10 -0
  40. package/dist/cjs/api/resources/inApp/client/requests/GetInAppPlacementRequest.js +3 -0
  41. package/dist/cjs/api/resources/inApp/client/requests/ListInAppCampaignsRequest.d.ts +11 -0
  42. package/dist/cjs/api/resources/inApp/client/requests/ListInAppCampaignsRequest.js +3 -0
  43. package/dist/cjs/api/resources/inApp/client/requests/ListInAppMessagesRequest.d.ts +3 -0
  44. package/dist/cjs/api/resources/inApp/client/requests/SendInAppCampaignRequest.d.ts +11 -0
  45. package/dist/cjs/api/resources/inApp/client/requests/SendInAppCampaignRequest.js +3 -0
  46. package/dist/cjs/api/resources/inApp/client/requests/StopInAppCampaignRequest.d.ts +9 -0
  47. package/dist/cjs/api/resources/inApp/client/requests/StopInAppCampaignRequest.js +3 -0
  48. package/dist/cjs/api/resources/inApp/client/requests/UnscheduleInAppCampaignRequest.d.ts +9 -0
  49. package/dist/cjs/api/resources/inApp/client/requests/UnscheduleInAppCampaignRequest.js +3 -0
  50. package/dist/cjs/api/resources/inApp/client/requests/UpdateInAppCampaignRequest.d.ts +18 -0
  51. package/dist/cjs/api/resources/inApp/client/requests/UpdateInAppCampaignRequest.js +3 -0
  52. package/dist/cjs/api/resources/inApp/client/requests/UpdateInAppPlacementRequest.d.ts +13 -0
  53. package/dist/cjs/api/resources/inApp/client/requests/UpdateInAppPlacementRequest.js +3 -0
  54. package/dist/cjs/api/resources/inApp/client/requests/index.d.ts +15 -0
  55. package/dist/cjs/api/resources/inApp/types/CreateInAppCampaignRequestPriority.d.ts +7 -0
  56. package/dist/cjs/api/resources/inApp/types/CreateInAppCampaignRequestPriority.js +10 -0
  57. package/dist/cjs/api/resources/inApp/types/CreateInAppCampaignResponse.d.ts +5 -0
  58. package/dist/cjs/api/resources/inApp/types/CreateInAppCampaignResponse.js +3 -0
  59. package/dist/cjs/api/resources/inApp/types/CreateInAppPlacementResponse.d.ts +5 -0
  60. package/dist/cjs/api/resources/inApp/types/CreateInAppPlacementResponse.js +3 -0
  61. package/dist/cjs/api/resources/inApp/types/DeleteInAppPlacementResponse.d.ts +5 -0
  62. package/dist/cjs/api/resources/inApp/types/DeleteInAppPlacementResponse.js +3 -0
  63. package/dist/cjs/api/resources/inApp/types/DuplicateInAppCampaignResponse.d.ts +5 -0
  64. package/dist/cjs/api/resources/inApp/types/DuplicateInAppCampaignResponse.js +3 -0
  65. package/dist/cjs/api/resources/inApp/types/EstimateInAppCampaignRecipientsResponse.d.ts +4 -0
  66. package/dist/cjs/api/resources/inApp/types/EstimateInAppCampaignRecipientsResponse.js +3 -0
  67. package/dist/cjs/api/resources/inApp/types/GetInAppCampaignResponse.d.ts +6 -0
  68. package/dist/cjs/api/resources/inApp/types/GetInAppCampaignResponse.js +3 -0
  69. package/dist/cjs/api/resources/inApp/types/GetInAppCampaignStatsResponse.d.ts +10 -0
  70. package/dist/cjs/api/resources/inApp/types/GetInAppCampaignStatsResponse.js +3 -0
  71. package/dist/cjs/api/resources/inApp/types/GetInAppCampaignStatsResponseState.d.ts +8 -0
  72. package/dist/cjs/api/resources/inApp/types/GetInAppCampaignStatsResponseState.js +11 -0
  73. package/dist/cjs/api/resources/inApp/types/GetInAppCampaignStatsResponseStatus.d.ts +7 -0
  74. package/dist/cjs/api/resources/inApp/types/GetInAppCampaignStatsResponseStatus.js +10 -0
  75. package/dist/cjs/api/resources/inApp/types/GetInAppPlacementContentResponse.d.ts +6 -0
  76. package/dist/cjs/api/resources/inApp/types/GetInAppPlacementContentResponse.js +3 -0
  77. package/dist/cjs/api/resources/inApp/types/GetInAppPlacementContentResponsePlacementsItem.d.ts +5 -0
  78. package/dist/cjs/api/resources/inApp/types/GetInAppPlacementContentResponsePlacementsItem.js +3 -0
  79. package/dist/cjs/api/resources/inApp/types/GetInAppPlacementResponse.d.ts +5 -0
  80. package/dist/cjs/api/resources/inApp/types/GetInAppPlacementResponse.js +3 -0
  81. package/dist/cjs/api/resources/inApp/types/ListInAppCampaignsRequestStatus.d.ts +7 -0
  82. package/dist/cjs/api/resources/inApp/types/ListInAppCampaignsRequestStatus.js +10 -0
  83. package/dist/cjs/api/resources/inApp/types/ListInAppCampaignsResponse.d.ts +6 -0
  84. package/dist/cjs/api/resources/inApp/types/ListInAppCampaignsResponse.js +3 -0
  85. package/dist/cjs/api/resources/inApp/types/ListInAppMessagesRequestDeliver.d.ts +5 -0
  86. package/dist/cjs/api/resources/inApp/types/ListInAppMessagesRequestDeliver.js +8 -0
  87. package/dist/cjs/api/resources/inApp/types/ListInAppMessagesRequestKind.d.ts +1 -0
  88. package/dist/cjs/api/resources/inApp/types/ListInAppMessagesRequestKind.js +1 -0
  89. package/dist/cjs/api/resources/inApp/types/ListInAppPlacementsResponse.d.ts +5 -0
  90. package/dist/cjs/api/resources/inApp/types/ListInAppPlacementsResponse.js +3 -0
  91. package/dist/cjs/api/resources/inApp/types/SendInAppCampaignResponse.d.ts +6 -0
  92. package/dist/cjs/api/resources/inApp/types/SendInAppCampaignResponse.js +3 -0
  93. package/dist/cjs/api/resources/inApp/types/StopInAppCampaignResponse.d.ts +5 -0
  94. package/dist/cjs/api/resources/inApp/types/StopInAppCampaignResponse.js +3 -0
  95. package/dist/cjs/api/resources/inApp/types/UnscheduleInAppCampaignResponse.d.ts +5 -0
  96. package/dist/cjs/api/resources/inApp/types/UnscheduleInAppCampaignResponse.js +3 -0
  97. package/dist/cjs/api/resources/inApp/types/UpdateInAppCampaignRequestPriority.d.ts +7 -0
  98. package/dist/cjs/api/resources/inApp/types/UpdateInAppCampaignRequestPriority.js +10 -0
  99. package/dist/cjs/api/resources/inApp/types/UpdateInAppCampaignResponse.d.ts +5 -0
  100. package/dist/cjs/api/resources/inApp/types/UpdateInAppCampaignResponse.js +3 -0
  101. package/dist/cjs/api/resources/inApp/types/UpdateInAppPlacementResponse.d.ts +5 -0
  102. package/dist/cjs/api/resources/inApp/types/UpdateInAppPlacementResponse.js +3 -0
  103. package/dist/cjs/api/resources/inApp/types/index.d.ts +23 -0
  104. package/dist/cjs/api/resources/inApp/types/index.js +23 -0
  105. package/dist/cjs/api/resources/push/client/Client.d.ts +46 -6
  106. package/dist/cjs/api/resources/push/client/Client.js +168 -7
  107. package/dist/cjs/api/resources/push/client/requests/CreatePushCampaignRequest.d.ts +1 -0
  108. package/dist/cjs/api/resources/push/client/requests/EndLiveActivityRequest.d.ts +3 -1
  109. package/dist/cjs/api/resources/push/client/requests/EstimatePushCampaignRecipientsRequest.d.ts +2 -0
  110. package/dist/cjs/api/resources/push/client/requests/ListLiveActivitiesRequest.d.ts +2 -0
  111. package/dist/cjs/api/resources/push/client/requests/SendPushCampaignRequest.d.ts +8 -0
  112. package/dist/cjs/api/resources/push/client/requests/StartLiveActivityRequest.d.ts +7 -1
  113. package/dist/cjs/api/resources/push/client/requests/TranslatePushCampaignRequest.d.ts +14 -0
  114. package/dist/cjs/api/resources/push/client/requests/TranslatePushCampaignRequest.js +3 -0
  115. package/dist/cjs/api/resources/push/client/requests/TranslatePushContentRequest.d.ts +16 -0
  116. package/dist/cjs/api/resources/push/client/requests/TranslatePushContentRequest.js +3 -0
  117. package/dist/cjs/api/resources/push/client/requests/UpdateLiveActivityRequest.d.ts +3 -1
  118. package/dist/cjs/api/resources/push/client/requests/UpdatePushCampaignRequest.d.ts +9 -0
  119. package/dist/cjs/api/resources/push/client/requests/index.d.ts +2 -0
  120. package/dist/cjs/api/resources/push/types/EstimatePushCampaignRecipientsResponse.d.ts +3 -0
  121. package/dist/cjs/api/resources/push/types/EstimatePushCampaignRecipientsResponseTimingCoverage.d.ts +11 -0
  122. package/dist/cjs/api/resources/push/types/EstimatePushCampaignRecipientsResponseTimingCoverage.js +3 -0
  123. package/dist/cjs/api/resources/push/types/ListLiveActivitiesRequestPlatform.d.ts +5 -0
  124. package/dist/cjs/api/resources/push/types/ListLiveActivitiesRequestPlatform.js +8 -0
  125. package/dist/cjs/api/resources/push/types/TranslatePushCampaignResponse.d.ts +4 -0
  126. package/dist/cjs/api/resources/push/types/TranslatePushCampaignResponse.js +3 -0
  127. package/dist/cjs/api/resources/push/types/TranslatePushContentResponse.d.ts +5 -0
  128. package/dist/cjs/api/resources/push/types/TranslatePushContentResponse.js +3 -0
  129. package/dist/cjs/api/resources/push/types/index.d.ts +4 -0
  130. package/dist/cjs/api/resources/push/types/index.js +4 -0
  131. package/dist/cjs/api/resources/templates/types/GetLocalizationCoverageTemplatesResponse.d.ts +2 -0
  132. package/dist/cjs/api/resources/templates/types/GetLocalizationCoverageTemplatesResponsePush.d.ts +9 -0
  133. package/dist/cjs/api/resources/templates/types/GetLocalizationCoverageTemplatesResponsePush.js +3 -0
  134. package/dist/cjs/api/resources/templates/types/GetLocalizationCoverageTemplatesResponsePushLocalesItem.d.ts +13 -0
  135. package/dist/cjs/api/resources/templates/types/GetLocalizationCoverageTemplatesResponsePushLocalesItem.js +3 -0
  136. package/dist/cjs/api/resources/templates/types/TranslateMissingLocalizationsTemplatesResponse.d.ts +4 -0
  137. package/dist/cjs/api/resources/templates/types/index.d.ts +2 -0
  138. package/dist/cjs/api/resources/templates/types/index.js +2 -0
  139. package/dist/cjs/api/resources/trackingSettings/client/requests/UpdateTrackingSettingsRequest.d.ts +1 -1
  140. package/dist/cjs/api/resources/webTrackingKeys/client/Client.d.ts +4 -5
  141. package/dist/cjs/api/resources/webTrackingKeys/client/Client.js +7 -6
  142. package/dist/cjs/api/resources/webTrackingKeys/client/requests/MintIdentityWebTrackingKeysRequest.d.ts +5 -4
  143. package/dist/cjs/api/resources/webTrackingKeys/types/MintIdentityWebTrackingKeysResponse.d.ts +3 -2
  144. package/dist/cjs/api/types/CampaignChannel.d.ts +2 -1
  145. package/dist/cjs/api/types/CampaignChannel.js +2 -1
  146. package/dist/cjs/api/types/CampaignReply.d.ts +19 -0
  147. package/dist/cjs/api/types/CampaignReply.js +3 -0
  148. package/dist/cjs/api/types/InAppCampaign.d.ts +20 -0
  149. package/dist/cjs/api/types/InAppCampaign.js +3 -0
  150. package/dist/cjs/api/types/InAppCampaignMessage.d.ts +28 -0
  151. package/dist/cjs/api/types/InAppCampaignMessage.js +3 -0
  152. package/dist/cjs/api/types/InAppCampaignMessageButtonsItem.d.ts +7 -0
  153. package/dist/cjs/api/types/InAppCampaignMessageButtonsItem.js +3 -0
  154. package/dist/cjs/api/types/InAppCampaignMessageButtonsItemAction.d.ts +6 -0
  155. package/dist/cjs/api/types/InAppCampaignMessageButtonsItemAction.js +9 -0
  156. package/dist/cjs/api/types/InAppCampaignMessageFormat.d.ts +8 -0
  157. package/dist/cjs/api/types/InAppCampaignMessageFormat.js +11 -0
  158. package/dist/cjs/api/types/InAppCampaignMessageImagePlacement.d.ts +5 -0
  159. package/dist/cjs/api/types/InAppCampaignMessageImagePlacement.js +8 -0
  160. package/dist/cjs/api/types/InAppCampaignMessageKind.d.ts +5 -0
  161. package/dist/cjs/api/types/InAppCampaignMessageKind.js +8 -0
  162. package/dist/cjs/api/types/InAppCampaignMessagePosition.d.ts +7 -0
  163. package/dist/cjs/api/types/InAppCampaignMessagePosition.js +10 -0
  164. package/dist/cjs/api/types/InAppCampaignPriority.d.ts +6 -0
  165. package/dist/cjs/api/types/InAppCampaignPriority.js +9 -0
  166. package/dist/cjs/api/types/InAppCampaignState.d.ts +9 -0
  167. package/dist/cjs/api/types/InAppCampaignState.js +12 -0
  168. package/dist/cjs/api/types/InAppCampaignStats.d.ts +16 -0
  169. package/dist/cjs/api/types/InAppCampaignStats.js +3 -0
  170. package/dist/cjs/api/types/InAppCampaignStatsButtonsItem.d.ts +4 -0
  171. package/dist/cjs/api/types/InAppCampaignStatsButtonsItem.js +3 -0
  172. package/dist/cjs/api/types/InAppCampaignStatus.d.ts +8 -0
  173. package/dist/cjs/api/types/InAppCampaignStatus.js +11 -0
  174. package/dist/cjs/api/types/InAppCampaignType.d.ts +4 -0
  175. package/dist/cjs/api/types/InAppCampaignType.js +7 -0
  176. package/dist/cjs/api/types/InAppMessage.d.ts +9 -1
  177. package/dist/cjs/api/types/InAppMessageKind.d.ts +2 -1
  178. package/dist/cjs/api/types/InAppMessageKind.js +2 -1
  179. package/dist/cjs/api/types/InAppMessageLayout.d.ts +7 -0
  180. package/dist/cjs/api/types/InAppMessageLayout.js +10 -0
  181. package/dist/cjs/api/types/InAppMessagePriority.d.ts +7 -0
  182. package/dist/cjs/api/types/InAppMessagePriority.js +10 -0
  183. package/dist/cjs/api/types/InAppPlacement.d.ts +16 -0
  184. package/dist/cjs/api/types/InAppPlacement.js +3 -0
  185. package/dist/cjs/api/types/InAppPlacementInput.d.ts +6 -0
  186. package/dist/cjs/api/types/InAppPlacementInput.js +3 -0
  187. package/dist/cjs/api/types/InAppPlacementStats.d.ts +16 -0
  188. package/dist/cjs/api/types/InAppPlacementStats.js +3 -0
  189. package/dist/cjs/api/types/InAppPlacementWithStats.d.ts +4 -0
  190. package/dist/cjs/api/types/InAppPlacementWithStats.js +3 -0
  191. package/dist/cjs/api/types/LiveActivityDispatch.d.ts +4 -0
  192. package/dist/cjs/api/types/LiveActivityDispatchPlatforms.d.ts +7 -0
  193. package/dist/cjs/api/types/LiveActivityDispatchPlatforms.js +3 -0
  194. package/dist/cjs/api/types/LiveActivityToken.d.ts +5 -3
  195. package/dist/cjs/api/types/LiveActivityTokenPlatform.d.ts +6 -0
  196. package/dist/cjs/api/types/LiveActivityTokenPlatform.js +9 -0
  197. package/dist/cjs/api/types/PushCampaign.d.ts +8 -0
  198. package/dist/cjs/api/types/PushCampaignContent.d.ts +2 -0
  199. package/dist/cjs/api/types/PushLocalization.d.ts +20 -0
  200. package/dist/cjs/api/types/PushLocalization.js +3 -0
  201. package/dist/cjs/api/types/PushLocalizationList.d.ts +5 -0
  202. package/dist/cjs/api/types/PushLocalizationList.js +3 -0
  203. package/dist/cjs/api/types/PushLocalizationOrigin.d.ts +6 -0
  204. package/dist/cjs/api/types/PushLocalizationOrigin.js +9 -0
  205. package/dist/cjs/api/types/PushTranslationResult.d.ts +11 -0
  206. package/dist/cjs/api/types/PushTranslationResult.js +3 -0
  207. package/dist/cjs/api/types/PushTranslationResultFailedItem.d.ts +4 -0
  208. package/dist/cjs/api/types/PushTranslationResultFailedItem.js +3 -0
  209. package/dist/cjs/api/types/PushTranslationResultSkippedItem.d.ts +6 -0
  210. package/dist/cjs/api/types/PushTranslationResultSkippedItem.js +3 -0
  211. package/dist/cjs/api/types/PushTranslationResultSkippedItemReason.d.ts +6 -0
  212. package/dist/cjs/api/types/PushTranslationResultSkippedItemReason.js +9 -0
  213. package/dist/cjs/api/types/SequenceBranchPathStepInput.d.ts +2 -0
  214. package/dist/cjs/api/types/SequenceStepInput.d.ts +2 -0
  215. package/dist/cjs/api/types/TrackingSettingsTracking.d.ts +1 -1
  216. package/dist/cjs/api/types/index.d.ts +30 -0
  217. package/dist/cjs/api/types/index.js +30 -0
  218. package/dist/cjs/serialization/resources/analytics/types/ListCampaignRepliesLegacyResponse.d.ts +14 -0
  219. package/dist/cjs/serialization/resources/analytics/types/ListCampaignRepliesLegacyResponse.js +36 -0
  220. package/dist/cjs/serialization/resources/analytics/types/ListCampaignRepliesResponse.d.ts +14 -0
  221. package/dist/cjs/serialization/resources/analytics/types/ListCampaignRepliesResponse.js +36 -0
  222. package/dist/cjs/serialization/resources/analytics/types/index.d.ts +2 -0
  223. package/dist/cjs/serialization/resources/analytics/types/index.js +2 -0
  224. package/dist/cjs/serialization/resources/inApp/client/requests/CreateInAppCampaignRequest.d.ts +15 -0
  225. package/dist/cjs/serialization/resources/inApp/client/requests/CreateInAppCampaignRequest.js +37 -0
  226. package/dist/cjs/serialization/resources/inApp/client/requests/CreateInAppPlacementRequest.d.ts +10 -0
  227. package/dist/cjs/serialization/resources/inApp/client/requests/CreateInAppPlacementRequest.js +34 -0
  228. package/dist/cjs/serialization/resources/inApp/client/requests/DuplicateInAppCampaignRequest.d.ts +9 -0
  229. package/dist/cjs/serialization/resources/inApp/client/requests/DuplicateInAppCampaignRequest.js +31 -0
  230. package/dist/cjs/serialization/resources/inApp/client/requests/EstimateInAppCampaignRecipientsRequest.d.ts +9 -0
  231. package/dist/cjs/serialization/resources/inApp/client/requests/EstimateInAppCampaignRecipientsRequest.js +31 -0
  232. package/dist/cjs/serialization/resources/inApp/client/requests/SendInAppCampaignRequest.d.ts +9 -0
  233. package/dist/cjs/serialization/resources/inApp/client/requests/SendInAppCampaignRequest.js +31 -0
  234. package/dist/cjs/serialization/resources/inApp/client/requests/UpdateInAppCampaignRequest.d.ts +15 -0
  235. package/dist/cjs/serialization/resources/inApp/client/requests/UpdateInAppCampaignRequest.js +37 -0
  236. package/dist/cjs/serialization/resources/inApp/client/requests/index.d.ts +6 -0
  237. package/dist/cjs/serialization/resources/inApp/client/requests/index.js +13 -1
  238. package/dist/cjs/serialization/resources/inApp/types/CreateInAppCampaignRequestPriority.d.ts +7 -0
  239. package/dist/cjs/serialization/resources/inApp/types/CreateInAppCampaignRequestPriority.js +29 -0
  240. package/dist/cjs/serialization/resources/inApp/types/CreateInAppCampaignResponse.d.ts +11 -0
  241. package/dist/cjs/serialization/resources/inApp/types/CreateInAppCampaignResponse.js +33 -0
  242. package/dist/cjs/serialization/resources/inApp/types/CreateInAppPlacementResponse.d.ts +11 -0
  243. package/dist/cjs/serialization/resources/inApp/types/CreateInAppPlacementResponse.js +33 -0
  244. package/dist/cjs/serialization/resources/inApp/types/DeleteInAppPlacementResponse.d.ts +11 -0
  245. package/dist/cjs/serialization/resources/inApp/types/DeleteInAppPlacementResponse.js +33 -0
  246. package/dist/cjs/serialization/resources/inApp/types/DuplicateInAppCampaignResponse.d.ts +11 -0
  247. package/dist/cjs/serialization/resources/inApp/types/DuplicateInAppCampaignResponse.js +33 -0
  248. package/dist/cjs/serialization/resources/inApp/types/EstimateInAppCampaignRecipientsResponse.d.ts +10 -0
  249. package/dist/cjs/serialization/resources/inApp/types/EstimateInAppCampaignRecipientsResponse.js +32 -0
  250. package/dist/cjs/serialization/resources/inApp/types/GetInAppCampaignResponse.d.ts +13 -0
  251. package/dist/cjs/serialization/resources/inApp/types/GetInAppCampaignResponse.js +35 -0
  252. package/dist/cjs/serialization/resources/inApp/types/GetInAppCampaignStatsResponse.d.ts +17 -0
  253. package/dist/cjs/serialization/resources/inApp/types/GetInAppCampaignStatsResponse.js +39 -0
  254. package/dist/cjs/serialization/resources/inApp/types/GetInAppCampaignStatsResponseState.d.ts +7 -0
  255. package/dist/cjs/serialization/resources/inApp/types/GetInAppCampaignStatsResponseState.js +29 -0
  256. package/dist/cjs/serialization/resources/inApp/types/GetInAppCampaignStatsResponseStatus.d.ts +7 -0
  257. package/dist/cjs/serialization/resources/inApp/types/GetInAppCampaignStatsResponseStatus.js +29 -0
  258. package/dist/cjs/serialization/resources/inApp/types/GetInAppPlacementContentResponse.d.ts +12 -0
  259. package/dist/cjs/serialization/resources/inApp/types/GetInAppPlacementContentResponse.js +34 -0
  260. package/dist/cjs/serialization/resources/inApp/types/GetInAppPlacementContentResponsePlacementsItem.d.ts +11 -0
  261. package/dist/cjs/serialization/resources/inApp/types/GetInAppPlacementContentResponsePlacementsItem.js +33 -0
  262. package/dist/cjs/serialization/resources/inApp/types/GetInAppPlacementResponse.d.ts +11 -0
  263. package/dist/cjs/serialization/resources/inApp/types/GetInAppPlacementResponse.js +33 -0
  264. package/dist/cjs/serialization/resources/inApp/types/ListInAppCampaignsRequestStatus.d.ts +7 -0
  265. package/dist/cjs/serialization/resources/inApp/types/ListInAppCampaignsRequestStatus.js +29 -0
  266. package/dist/cjs/serialization/resources/inApp/types/ListInAppCampaignsResponse.d.ts +12 -0
  267. package/dist/cjs/serialization/resources/inApp/types/ListInAppCampaignsResponse.js +34 -0
  268. package/dist/cjs/serialization/resources/inApp/types/ListInAppMessagesRequestDeliver.d.ts +7 -0
  269. package/dist/cjs/serialization/resources/inApp/types/ListInAppMessagesRequestDeliver.js +29 -0
  270. package/dist/cjs/serialization/resources/inApp/types/ListInAppMessagesRequestKind.d.ts +1 -1
  271. package/dist/cjs/serialization/resources/inApp/types/ListInAppMessagesRequestKind.js +1 -1
  272. package/dist/cjs/serialization/resources/inApp/types/ListInAppPlacementsResponse.d.ts +11 -0
  273. package/dist/cjs/serialization/resources/inApp/types/ListInAppPlacementsResponse.js +33 -0
  274. package/dist/cjs/serialization/resources/inApp/types/SendInAppCampaignResponse.d.ts +12 -0
  275. package/dist/cjs/serialization/resources/inApp/types/SendInAppCampaignResponse.js +34 -0
  276. package/dist/cjs/serialization/resources/inApp/types/StopInAppCampaignResponse.d.ts +11 -0
  277. package/dist/cjs/serialization/resources/inApp/types/StopInAppCampaignResponse.js +33 -0
  278. package/dist/cjs/serialization/resources/inApp/types/UnscheduleInAppCampaignResponse.d.ts +11 -0
  279. package/dist/cjs/serialization/resources/inApp/types/UnscheduleInAppCampaignResponse.js +33 -0
  280. package/dist/cjs/serialization/resources/inApp/types/UpdateInAppCampaignRequestPriority.d.ts +7 -0
  281. package/dist/cjs/serialization/resources/inApp/types/UpdateInAppCampaignRequestPriority.js +29 -0
  282. package/dist/cjs/serialization/resources/inApp/types/UpdateInAppCampaignResponse.d.ts +11 -0
  283. package/dist/cjs/serialization/resources/inApp/types/UpdateInAppCampaignResponse.js +33 -0
  284. package/dist/cjs/serialization/resources/inApp/types/UpdateInAppPlacementResponse.d.ts +11 -0
  285. package/dist/cjs/serialization/resources/inApp/types/UpdateInAppPlacementResponse.js +33 -0
  286. package/dist/cjs/serialization/resources/inApp/types/index.d.ts +23 -0
  287. package/dist/cjs/serialization/resources/inApp/types/index.js +23 -0
  288. package/dist/cjs/serialization/resources/push/client/requests/CreatePushCampaignRequest.d.ts +2 -0
  289. package/dist/cjs/serialization/resources/push/client/requests/CreatePushCampaignRequest.js +2 -0
  290. package/dist/cjs/serialization/resources/push/client/requests/EndLiveActivityRequest.d.ts +1 -0
  291. package/dist/cjs/serialization/resources/push/client/requests/EndLiveActivityRequest.js +1 -0
  292. package/dist/cjs/serialization/resources/push/client/requests/EstimatePushCampaignRecipientsRequest.d.ts +1 -0
  293. package/dist/cjs/serialization/resources/push/client/requests/EstimatePushCampaignRecipientsRequest.js +1 -0
  294. package/dist/cjs/serialization/resources/push/client/requests/SendPushCampaignRequest.d.ts +4 -0
  295. package/dist/cjs/serialization/resources/push/client/requests/SendPushCampaignRequest.js +4 -0
  296. package/dist/cjs/serialization/resources/push/client/requests/StartLiveActivityRequest.d.ts +3 -0
  297. package/dist/cjs/serialization/resources/push/client/requests/StartLiveActivityRequest.js +3 -0
  298. package/dist/cjs/serialization/resources/push/client/requests/TranslatePushCampaignRequest.d.ts +10 -0
  299. package/dist/cjs/serialization/resources/push/client/requests/TranslatePushCampaignRequest.js +32 -0
  300. package/dist/cjs/serialization/resources/push/client/requests/TranslatePushContentRequest.d.ts +14 -0
  301. package/dist/cjs/serialization/resources/push/client/requests/TranslatePushContentRequest.js +36 -0
  302. package/dist/cjs/serialization/resources/push/client/requests/UpdateLiveActivityRequest.d.ts +1 -0
  303. package/dist/cjs/serialization/resources/push/client/requests/UpdateLiveActivityRequest.js +1 -0
  304. package/dist/cjs/serialization/resources/push/client/requests/UpdatePushCampaignRequest.d.ts +6 -0
  305. package/dist/cjs/serialization/resources/push/client/requests/UpdatePushCampaignRequest.js +6 -0
  306. package/dist/cjs/serialization/resources/push/client/requests/index.d.ts +2 -0
  307. package/dist/cjs/serialization/resources/push/client/requests/index.js +5 -1
  308. package/dist/cjs/serialization/resources/push/types/EstimatePushCampaignRecipientsResponse.d.ts +2 -0
  309. package/dist/cjs/serialization/resources/push/types/EstimatePushCampaignRecipientsResponse.js +2 -0
  310. package/dist/cjs/serialization/resources/push/types/EstimatePushCampaignRecipientsResponseTimingCoverage.d.ts +11 -0
  311. package/dist/cjs/serialization/resources/push/types/EstimatePushCampaignRecipientsResponseTimingCoverage.js +33 -0
  312. package/dist/cjs/serialization/resources/push/types/ListLiveActivitiesRequestPlatform.d.ts +7 -0
  313. package/dist/cjs/serialization/resources/push/types/ListLiveActivitiesRequestPlatform.js +29 -0
  314. package/dist/cjs/serialization/resources/push/types/TranslatePushCampaignResponse.d.ts +11 -0
  315. package/dist/cjs/serialization/resources/push/types/TranslatePushCampaignResponse.js +35 -0
  316. package/dist/cjs/serialization/resources/push/types/TranslatePushContentResponse.d.ts +11 -0
  317. package/dist/cjs/serialization/resources/push/types/TranslatePushContentResponse.js +35 -0
  318. package/dist/cjs/serialization/resources/push/types/index.d.ts +4 -0
  319. package/dist/cjs/serialization/resources/push/types/index.js +4 -0
  320. package/dist/cjs/serialization/resources/templates/types/GetLocalizationCoverageTemplatesResponse.d.ts +2 -0
  321. package/dist/cjs/serialization/resources/templates/types/GetLocalizationCoverageTemplatesResponse.js +2 -0
  322. package/dist/cjs/serialization/resources/templates/types/GetLocalizationCoverageTemplatesResponsePush.d.ts +11 -0
  323. package/dist/cjs/serialization/resources/templates/types/GetLocalizationCoverageTemplatesResponsePush.js +33 -0
  324. package/dist/cjs/serialization/resources/templates/types/GetLocalizationCoverageTemplatesResponsePushLocalesItem.d.ts +15 -0
  325. package/dist/cjs/serialization/resources/templates/types/GetLocalizationCoverageTemplatesResponsePushLocalesItem.js +37 -0
  326. package/dist/cjs/serialization/resources/templates/types/TranslateMissingLocalizationsTemplatesResponse.d.ts +2 -0
  327. package/dist/cjs/serialization/resources/templates/types/TranslateMissingLocalizationsTemplatesResponse.js +2 -0
  328. package/dist/cjs/serialization/resources/templates/types/index.d.ts +2 -0
  329. package/dist/cjs/serialization/resources/templates/types/index.js +2 -0
  330. package/dist/cjs/serialization/resources/webTrackingKeys/client/requests/MintIdentityWebTrackingKeysRequest.d.ts +2 -1
  331. package/dist/cjs/serialization/resources/webTrackingKeys/client/requests/MintIdentityWebTrackingKeysRequest.js +2 -1
  332. package/dist/cjs/serialization/resources/webTrackingKeys/types/MintIdentityWebTrackingKeysResponse.d.ts +2 -1
  333. package/dist/cjs/serialization/resources/webTrackingKeys/types/MintIdentityWebTrackingKeysResponse.js +2 -1
  334. package/dist/cjs/serialization/types/CampaignChannel.d.ts +1 -1
  335. package/dist/cjs/serialization/types/CampaignChannel.js +1 -1
  336. package/dist/cjs/serialization/types/CampaignReply.d.ts +19 -0
  337. package/dist/cjs/serialization/types/CampaignReply.js +41 -0
  338. package/dist/cjs/serialization/types/InAppCampaign.d.ts +26 -0
  339. package/dist/cjs/serialization/types/InAppCampaign.js +50 -0
  340. package/dist/cjs/serialization/types/InAppCampaignMessage.d.ts +29 -0
  341. package/dist/cjs/serialization/types/InAppCampaignMessage.js +51 -0
  342. package/dist/cjs/serialization/types/InAppCampaignMessageButtonsItem.d.ts +12 -0
  343. package/dist/cjs/serialization/types/InAppCampaignMessageButtonsItem.js +34 -0
  344. package/dist/cjs/serialization/types/InAppCampaignMessageButtonsItemAction.d.ts +7 -0
  345. package/dist/cjs/serialization/types/InAppCampaignMessageButtonsItemAction.js +29 -0
  346. package/dist/cjs/serialization/types/InAppCampaignMessageFormat.d.ts +7 -0
  347. package/dist/cjs/serialization/types/InAppCampaignMessageFormat.js +29 -0
  348. package/dist/cjs/serialization/types/InAppCampaignMessageImagePlacement.d.ts +7 -0
  349. package/dist/cjs/serialization/types/InAppCampaignMessageImagePlacement.js +29 -0
  350. package/dist/cjs/serialization/types/InAppCampaignMessageKind.d.ts +7 -0
  351. package/dist/cjs/serialization/types/InAppCampaignMessageKind.js +29 -0
  352. package/dist/cjs/serialization/types/InAppCampaignMessagePosition.d.ts +7 -0
  353. package/dist/cjs/serialization/types/InAppCampaignMessagePosition.js +29 -0
  354. package/dist/cjs/serialization/types/InAppCampaignPriority.d.ts +7 -0
  355. package/dist/cjs/serialization/types/InAppCampaignPriority.js +29 -0
  356. package/dist/cjs/serialization/types/InAppCampaignState.d.ts +7 -0
  357. package/dist/cjs/serialization/types/InAppCampaignState.js +29 -0
  358. package/dist/cjs/serialization/types/InAppCampaignStats.d.ts +17 -0
  359. package/dist/cjs/serialization/types/InAppCampaignStats.js +39 -0
  360. package/dist/cjs/serialization/types/InAppCampaignStatsButtonsItem.d.ts +10 -0
  361. package/dist/cjs/serialization/types/InAppCampaignStatsButtonsItem.js +32 -0
  362. package/dist/cjs/serialization/types/InAppCampaignStatus.d.ts +7 -0
  363. package/dist/cjs/serialization/types/InAppCampaignStatus.js +29 -0
  364. package/dist/cjs/serialization/types/InAppCampaignType.d.ts +7 -0
  365. package/dist/cjs/serialization/types/InAppCampaignType.js +29 -0
  366. package/dist/cjs/serialization/types/InAppMessage.d.ts +6 -0
  367. package/dist/cjs/serialization/types/InAppMessage.js +6 -0
  368. package/dist/cjs/serialization/types/InAppMessageKind.d.ts +1 -1
  369. package/dist/cjs/serialization/types/InAppMessageKind.js +1 -1
  370. package/dist/cjs/serialization/types/InAppMessageLayout.d.ts +7 -0
  371. package/dist/cjs/serialization/types/InAppMessageLayout.js +29 -0
  372. package/dist/cjs/serialization/types/InAppMessagePriority.d.ts +7 -0
  373. package/dist/cjs/serialization/types/InAppMessagePriority.js +29 -0
  374. package/dist/cjs/serialization/types/InAppPlacement.d.ts +15 -0
  375. package/dist/cjs/serialization/types/InAppPlacement.js +37 -0
  376. package/dist/cjs/serialization/types/InAppPlacementInput.d.ts +12 -0
  377. package/dist/cjs/serialization/types/InAppPlacementInput.js +34 -0
  378. package/dist/cjs/serialization/types/InAppPlacementStats.d.ts +14 -0
  379. package/dist/cjs/serialization/types/InAppPlacementStats.js +36 -0
  380. package/dist/cjs/serialization/types/InAppPlacementWithStats.d.ts +11 -0
  381. package/dist/cjs/serialization/types/InAppPlacementWithStats.js +35 -0
  382. package/dist/cjs/serialization/types/LiveActivityDispatch.d.ts +3 -0
  383. package/dist/cjs/serialization/types/LiveActivityDispatch.js +3 -0
  384. package/dist/cjs/serialization/types/LiveActivityDispatchPlatforms.d.ts +10 -0
  385. package/dist/cjs/serialization/types/LiveActivityDispatchPlatforms.js +32 -0
  386. package/dist/cjs/serialization/types/LiveActivityToken.d.ts +2 -0
  387. package/dist/cjs/serialization/types/LiveActivityToken.js +2 -0
  388. package/dist/cjs/serialization/types/LiveActivityTokenPlatform.d.ts +7 -0
  389. package/dist/cjs/serialization/types/LiveActivityTokenPlatform.js +29 -0
  390. package/dist/cjs/serialization/types/PushCampaign.d.ts +4 -0
  391. package/dist/cjs/serialization/types/PushCampaign.js +4 -0
  392. package/dist/cjs/serialization/types/PushCampaignContent.d.ts +2 -0
  393. package/dist/cjs/serialization/types/PushCampaignContent.js +2 -0
  394. package/dist/cjs/serialization/types/PushLocalization.d.ts +16 -0
  395. package/dist/cjs/serialization/types/PushLocalization.js +38 -0
  396. package/dist/cjs/serialization/types/PushLocalizationList.d.ts +8 -0
  397. package/dist/cjs/serialization/types/PushLocalizationList.js +30 -0
  398. package/dist/cjs/serialization/types/PushLocalizationOrigin.d.ts +7 -0
  399. package/dist/cjs/serialization/types/PushLocalizationOrigin.js +29 -0
  400. package/dist/cjs/serialization/types/PushTranslationResult.d.ts +15 -0
  401. package/dist/cjs/serialization/types/PushTranslationResult.js +37 -0
  402. package/dist/cjs/serialization/types/PushTranslationResultFailedItem.d.ts +10 -0
  403. package/dist/cjs/serialization/types/PushTranslationResultFailedItem.js +32 -0
  404. package/dist/cjs/serialization/types/PushTranslationResultSkippedItem.d.ts +11 -0
  405. package/dist/cjs/serialization/types/PushTranslationResultSkippedItem.js +33 -0
  406. package/dist/cjs/serialization/types/PushTranslationResultSkippedItemReason.d.ts +7 -0
  407. package/dist/cjs/serialization/types/PushTranslationResultSkippedItemReason.js +29 -0
  408. package/dist/cjs/serialization/types/SequenceBranchPathStepInput.d.ts +2 -0
  409. package/dist/cjs/serialization/types/SequenceBranchPathStepInput.js +2 -0
  410. package/dist/cjs/serialization/types/SequenceStepInput.d.ts +2 -0
  411. package/dist/cjs/serialization/types/SequenceStepInput.js +2 -0
  412. package/dist/cjs/serialization/types/index.d.ts +30 -0
  413. package/dist/cjs/serialization/types/index.js +30 -0
  414. package/dist/esm/api/resources/abTests/client/Client.d.ts +1 -1
  415. package/dist/esm/api/resources/abTests/client/Client.js +1 -1
  416. package/dist/esm/api/resources/abTests/client/requests/UpdateAbTestsRequest.d.ts +1 -1
  417. package/dist/esm/api/resources/analytics/client/Client.d.ts +40 -0
  418. package/dist/esm/api/resources/analytics/client/Client.js +156 -0
  419. package/dist/esm/api/resources/analytics/client/requests/ListCampaignRepliesLegacyRequest.d.ts +14 -0
  420. package/dist/esm/api/resources/analytics/client/requests/ListCampaignRepliesLegacyRequest.js +2 -0
  421. package/dist/esm/api/resources/analytics/client/requests/ListCampaignRepliesRequest.d.ts +14 -0
  422. package/dist/esm/api/resources/analytics/client/requests/ListCampaignRepliesRequest.js +2 -0
  423. package/dist/esm/api/resources/analytics/client/requests/index.d.ts +2 -0
  424. package/dist/esm/api/resources/analytics/types/ListCampaignRepliesLegacyResponse.d.ts +7 -0
  425. package/dist/esm/api/resources/analytics/types/ListCampaignRepliesLegacyResponse.js +2 -0
  426. package/dist/esm/api/resources/analytics/types/ListCampaignRepliesResponse.d.ts +7 -0
  427. package/dist/esm/api/resources/analytics/types/ListCampaignRepliesResponse.js +2 -0
  428. package/dist/esm/api/resources/analytics/types/index.d.ts +2 -0
  429. package/dist/esm/api/resources/analytics/types/index.js +2 -0
  430. package/dist/esm/api/resources/campaigns/client/Client.d.ts +1 -1
  431. package/dist/esm/api/resources/campaigns/client/Client.js +1 -1
  432. package/dist/esm/api/resources/campaigns/client/requests/ResumeCampaignsRequest.d.ts +1 -1
  433. package/dist/esm/api/resources/campaigns/client/requests/ScheduleCampaignsRequest.d.ts +1 -1
  434. package/dist/esm/api/resources/inApp/client/Client.d.ts +326 -1
  435. package/dist/esm/api/resources/inApp/client/Client.js +1295 -83
  436. package/dist/esm/api/resources/inApp/client/requests/CreateInAppCampaignRequest.d.ts +15 -0
  437. package/dist/esm/api/resources/inApp/client/requests/CreateInAppCampaignRequest.js +2 -0
  438. package/dist/esm/api/resources/inApp/client/requests/CreateInAppPlacementRequest.d.ts +10 -0
  439. package/dist/esm/api/resources/inApp/client/requests/CreateInAppPlacementRequest.js +2 -0
  440. package/dist/esm/api/resources/inApp/client/requests/DeleteInAppPlacementRequest.d.ts +10 -0
  441. package/dist/esm/api/resources/inApp/client/requests/DeleteInAppPlacementRequest.js +2 -0
  442. package/dist/esm/api/resources/inApp/client/requests/DuplicateInAppCampaignRequest.d.ts +11 -0
  443. package/dist/esm/api/resources/inApp/client/requests/DuplicateInAppCampaignRequest.js +2 -0
  444. package/dist/esm/api/resources/inApp/client/requests/EstimateInAppCampaignRecipientsRequest.d.ts +12 -0
  445. package/dist/esm/api/resources/inApp/client/requests/EstimateInAppCampaignRecipientsRequest.js +2 -0
  446. package/dist/esm/api/resources/inApp/client/requests/GetInAppCampaignRequest.d.ts +9 -0
  447. package/dist/esm/api/resources/inApp/client/requests/GetInAppCampaignRequest.js +2 -0
  448. package/dist/esm/api/resources/inApp/client/requests/GetInAppCampaignStatsRequest.d.ts +9 -0
  449. package/dist/esm/api/resources/inApp/client/requests/GetInAppCampaignStatsRequest.js +2 -0
  450. package/dist/esm/api/resources/inApp/client/requests/GetInAppPlacementContentRequest.d.ts +15 -0
  451. package/dist/esm/api/resources/inApp/client/requests/GetInAppPlacementContentRequest.js +2 -0
  452. package/dist/esm/api/resources/inApp/client/requests/GetInAppPlacementRequest.d.ts +10 -0
  453. package/dist/esm/api/resources/inApp/client/requests/GetInAppPlacementRequest.js +2 -0
  454. package/dist/esm/api/resources/inApp/client/requests/ListInAppCampaignsRequest.d.ts +11 -0
  455. package/dist/esm/api/resources/inApp/client/requests/ListInAppCampaignsRequest.js +2 -0
  456. package/dist/esm/api/resources/inApp/client/requests/ListInAppMessagesRequest.d.ts +3 -0
  457. package/dist/esm/api/resources/inApp/client/requests/SendInAppCampaignRequest.d.ts +11 -0
  458. package/dist/esm/api/resources/inApp/client/requests/SendInAppCampaignRequest.js +2 -0
  459. package/dist/esm/api/resources/inApp/client/requests/StopInAppCampaignRequest.d.ts +9 -0
  460. package/dist/esm/api/resources/inApp/client/requests/StopInAppCampaignRequest.js +2 -0
  461. package/dist/esm/api/resources/inApp/client/requests/UnscheduleInAppCampaignRequest.d.ts +9 -0
  462. package/dist/esm/api/resources/inApp/client/requests/UnscheduleInAppCampaignRequest.js +2 -0
  463. package/dist/esm/api/resources/inApp/client/requests/UpdateInAppCampaignRequest.d.ts +18 -0
  464. package/dist/esm/api/resources/inApp/client/requests/UpdateInAppCampaignRequest.js +2 -0
  465. package/dist/esm/api/resources/inApp/client/requests/UpdateInAppPlacementRequest.d.ts +13 -0
  466. package/dist/esm/api/resources/inApp/client/requests/UpdateInAppPlacementRequest.js +2 -0
  467. package/dist/esm/api/resources/inApp/client/requests/index.d.ts +15 -0
  468. package/dist/esm/api/resources/inApp/types/CreateInAppCampaignRequestPriority.d.ts +7 -0
  469. package/dist/esm/api/resources/inApp/types/CreateInAppCampaignRequestPriority.js +7 -0
  470. package/dist/esm/api/resources/inApp/types/CreateInAppCampaignResponse.d.ts +5 -0
  471. package/dist/esm/api/resources/inApp/types/CreateInAppCampaignResponse.js +2 -0
  472. package/dist/esm/api/resources/inApp/types/CreateInAppPlacementResponse.d.ts +5 -0
  473. package/dist/esm/api/resources/inApp/types/CreateInAppPlacementResponse.js +2 -0
  474. package/dist/esm/api/resources/inApp/types/DeleteInAppPlacementResponse.d.ts +5 -0
  475. package/dist/esm/api/resources/inApp/types/DeleteInAppPlacementResponse.js +2 -0
  476. package/dist/esm/api/resources/inApp/types/DuplicateInAppCampaignResponse.d.ts +5 -0
  477. package/dist/esm/api/resources/inApp/types/DuplicateInAppCampaignResponse.js +2 -0
  478. package/dist/esm/api/resources/inApp/types/EstimateInAppCampaignRecipientsResponse.d.ts +4 -0
  479. package/dist/esm/api/resources/inApp/types/EstimateInAppCampaignRecipientsResponse.js +2 -0
  480. package/dist/esm/api/resources/inApp/types/GetInAppCampaignResponse.d.ts +6 -0
  481. package/dist/esm/api/resources/inApp/types/GetInAppCampaignResponse.js +2 -0
  482. package/dist/esm/api/resources/inApp/types/GetInAppCampaignStatsResponse.d.ts +10 -0
  483. package/dist/esm/api/resources/inApp/types/GetInAppCampaignStatsResponse.js +2 -0
  484. package/dist/esm/api/resources/inApp/types/GetInAppCampaignStatsResponseState.d.ts +8 -0
  485. package/dist/esm/api/resources/inApp/types/GetInAppCampaignStatsResponseState.js +8 -0
  486. package/dist/esm/api/resources/inApp/types/GetInAppCampaignStatsResponseStatus.d.ts +7 -0
  487. package/dist/esm/api/resources/inApp/types/GetInAppCampaignStatsResponseStatus.js +7 -0
  488. package/dist/esm/api/resources/inApp/types/GetInAppPlacementContentResponse.d.ts +6 -0
  489. package/dist/esm/api/resources/inApp/types/GetInAppPlacementContentResponse.js +2 -0
  490. package/dist/esm/api/resources/inApp/types/GetInAppPlacementContentResponsePlacementsItem.d.ts +5 -0
  491. package/dist/esm/api/resources/inApp/types/GetInAppPlacementContentResponsePlacementsItem.js +2 -0
  492. package/dist/esm/api/resources/inApp/types/GetInAppPlacementResponse.d.ts +5 -0
  493. package/dist/esm/api/resources/inApp/types/GetInAppPlacementResponse.js +2 -0
  494. package/dist/esm/api/resources/inApp/types/ListInAppCampaignsRequestStatus.d.ts +7 -0
  495. package/dist/esm/api/resources/inApp/types/ListInAppCampaignsRequestStatus.js +7 -0
  496. package/dist/esm/api/resources/inApp/types/ListInAppCampaignsResponse.d.ts +6 -0
  497. package/dist/esm/api/resources/inApp/types/ListInAppCampaignsResponse.js +2 -0
  498. package/dist/esm/api/resources/inApp/types/ListInAppMessagesRequestDeliver.d.ts +5 -0
  499. package/dist/esm/api/resources/inApp/types/ListInAppMessagesRequestDeliver.js +5 -0
  500. package/dist/esm/api/resources/inApp/types/ListInAppMessagesRequestKind.d.ts +1 -0
  501. package/dist/esm/api/resources/inApp/types/ListInAppMessagesRequestKind.js +1 -0
  502. package/dist/esm/api/resources/inApp/types/ListInAppPlacementsResponse.d.ts +5 -0
  503. package/dist/esm/api/resources/inApp/types/ListInAppPlacementsResponse.js +2 -0
  504. package/dist/esm/api/resources/inApp/types/SendInAppCampaignResponse.d.ts +6 -0
  505. package/dist/esm/api/resources/inApp/types/SendInAppCampaignResponse.js +2 -0
  506. package/dist/esm/api/resources/inApp/types/StopInAppCampaignResponse.d.ts +5 -0
  507. package/dist/esm/api/resources/inApp/types/StopInAppCampaignResponse.js +2 -0
  508. package/dist/esm/api/resources/inApp/types/UnscheduleInAppCampaignResponse.d.ts +5 -0
  509. package/dist/esm/api/resources/inApp/types/UnscheduleInAppCampaignResponse.js +2 -0
  510. package/dist/esm/api/resources/inApp/types/UpdateInAppCampaignRequestPriority.d.ts +7 -0
  511. package/dist/esm/api/resources/inApp/types/UpdateInAppCampaignRequestPriority.js +7 -0
  512. package/dist/esm/api/resources/inApp/types/UpdateInAppCampaignResponse.d.ts +5 -0
  513. package/dist/esm/api/resources/inApp/types/UpdateInAppCampaignResponse.js +2 -0
  514. package/dist/esm/api/resources/inApp/types/UpdateInAppPlacementResponse.d.ts +5 -0
  515. package/dist/esm/api/resources/inApp/types/UpdateInAppPlacementResponse.js +2 -0
  516. package/dist/esm/api/resources/inApp/types/index.d.ts +23 -0
  517. package/dist/esm/api/resources/inApp/types/index.js +23 -0
  518. package/dist/esm/api/resources/push/client/Client.d.ts +46 -6
  519. package/dist/esm/api/resources/push/client/Client.js +168 -7
  520. package/dist/esm/api/resources/push/client/requests/CreatePushCampaignRequest.d.ts +1 -0
  521. package/dist/esm/api/resources/push/client/requests/EndLiveActivityRequest.d.ts +3 -1
  522. package/dist/esm/api/resources/push/client/requests/EstimatePushCampaignRecipientsRequest.d.ts +2 -0
  523. package/dist/esm/api/resources/push/client/requests/ListLiveActivitiesRequest.d.ts +2 -0
  524. package/dist/esm/api/resources/push/client/requests/SendPushCampaignRequest.d.ts +8 -0
  525. package/dist/esm/api/resources/push/client/requests/StartLiveActivityRequest.d.ts +7 -1
  526. package/dist/esm/api/resources/push/client/requests/TranslatePushCampaignRequest.d.ts +14 -0
  527. package/dist/esm/api/resources/push/client/requests/TranslatePushCampaignRequest.js +2 -0
  528. package/dist/esm/api/resources/push/client/requests/TranslatePushContentRequest.d.ts +16 -0
  529. package/dist/esm/api/resources/push/client/requests/TranslatePushContentRequest.js +2 -0
  530. package/dist/esm/api/resources/push/client/requests/UpdateLiveActivityRequest.d.ts +3 -1
  531. package/dist/esm/api/resources/push/client/requests/UpdatePushCampaignRequest.d.ts +9 -0
  532. package/dist/esm/api/resources/push/client/requests/index.d.ts +2 -0
  533. package/dist/esm/api/resources/push/types/EstimatePushCampaignRecipientsResponse.d.ts +3 -0
  534. package/dist/esm/api/resources/push/types/EstimatePushCampaignRecipientsResponseTimingCoverage.d.ts +11 -0
  535. package/dist/esm/api/resources/push/types/EstimatePushCampaignRecipientsResponseTimingCoverage.js +2 -0
  536. package/dist/esm/api/resources/push/types/ListLiveActivitiesRequestPlatform.d.ts +5 -0
  537. package/dist/esm/api/resources/push/types/ListLiveActivitiesRequestPlatform.js +5 -0
  538. package/dist/esm/api/resources/push/types/TranslatePushCampaignResponse.d.ts +4 -0
  539. package/dist/esm/api/resources/push/types/TranslatePushCampaignResponse.js +2 -0
  540. package/dist/esm/api/resources/push/types/TranslatePushContentResponse.d.ts +5 -0
  541. package/dist/esm/api/resources/push/types/TranslatePushContentResponse.js +2 -0
  542. package/dist/esm/api/resources/push/types/index.d.ts +4 -0
  543. package/dist/esm/api/resources/push/types/index.js +4 -0
  544. package/dist/esm/api/resources/templates/types/GetLocalizationCoverageTemplatesResponse.d.ts +2 -0
  545. package/dist/esm/api/resources/templates/types/GetLocalizationCoverageTemplatesResponsePush.d.ts +9 -0
  546. package/dist/esm/api/resources/templates/types/GetLocalizationCoverageTemplatesResponsePush.js +2 -0
  547. package/dist/esm/api/resources/templates/types/GetLocalizationCoverageTemplatesResponsePushLocalesItem.d.ts +13 -0
  548. package/dist/esm/api/resources/templates/types/GetLocalizationCoverageTemplatesResponsePushLocalesItem.js +2 -0
  549. package/dist/esm/api/resources/templates/types/TranslateMissingLocalizationsTemplatesResponse.d.ts +4 -0
  550. package/dist/esm/api/resources/templates/types/index.d.ts +2 -0
  551. package/dist/esm/api/resources/templates/types/index.js +2 -0
  552. package/dist/esm/api/resources/trackingSettings/client/requests/UpdateTrackingSettingsRequest.d.ts +1 -1
  553. package/dist/esm/api/resources/webTrackingKeys/client/Client.d.ts +4 -5
  554. package/dist/esm/api/resources/webTrackingKeys/client/Client.js +7 -6
  555. package/dist/esm/api/resources/webTrackingKeys/client/requests/MintIdentityWebTrackingKeysRequest.d.ts +5 -4
  556. package/dist/esm/api/resources/webTrackingKeys/types/MintIdentityWebTrackingKeysResponse.d.ts +3 -2
  557. package/dist/esm/api/types/CampaignChannel.d.ts +2 -1
  558. package/dist/esm/api/types/CampaignChannel.js +2 -1
  559. package/dist/esm/api/types/CampaignReply.d.ts +19 -0
  560. package/dist/esm/api/types/CampaignReply.js +2 -0
  561. package/dist/esm/api/types/InAppCampaign.d.ts +20 -0
  562. package/dist/esm/api/types/InAppCampaign.js +2 -0
  563. package/dist/esm/api/types/InAppCampaignMessage.d.ts +28 -0
  564. package/dist/esm/api/types/InAppCampaignMessage.js +2 -0
  565. package/dist/esm/api/types/InAppCampaignMessageButtonsItem.d.ts +7 -0
  566. package/dist/esm/api/types/InAppCampaignMessageButtonsItem.js +2 -0
  567. package/dist/esm/api/types/InAppCampaignMessageButtonsItemAction.d.ts +6 -0
  568. package/dist/esm/api/types/InAppCampaignMessageButtonsItemAction.js +6 -0
  569. package/dist/esm/api/types/InAppCampaignMessageFormat.d.ts +8 -0
  570. package/dist/esm/api/types/InAppCampaignMessageFormat.js +8 -0
  571. package/dist/esm/api/types/InAppCampaignMessageImagePlacement.d.ts +5 -0
  572. package/dist/esm/api/types/InAppCampaignMessageImagePlacement.js +5 -0
  573. package/dist/esm/api/types/InAppCampaignMessageKind.d.ts +5 -0
  574. package/dist/esm/api/types/InAppCampaignMessageKind.js +5 -0
  575. package/dist/esm/api/types/InAppCampaignMessagePosition.d.ts +7 -0
  576. package/dist/esm/api/types/InAppCampaignMessagePosition.js +7 -0
  577. package/dist/esm/api/types/InAppCampaignPriority.d.ts +6 -0
  578. package/dist/esm/api/types/InAppCampaignPriority.js +6 -0
  579. package/dist/esm/api/types/InAppCampaignState.d.ts +9 -0
  580. package/dist/esm/api/types/InAppCampaignState.js +9 -0
  581. package/dist/esm/api/types/InAppCampaignStats.d.ts +16 -0
  582. package/dist/esm/api/types/InAppCampaignStats.js +2 -0
  583. package/dist/esm/api/types/InAppCampaignStatsButtonsItem.d.ts +4 -0
  584. package/dist/esm/api/types/InAppCampaignStatsButtonsItem.js +2 -0
  585. package/dist/esm/api/types/InAppCampaignStatus.d.ts +8 -0
  586. package/dist/esm/api/types/InAppCampaignStatus.js +8 -0
  587. package/dist/esm/api/types/InAppCampaignType.d.ts +4 -0
  588. package/dist/esm/api/types/InAppCampaignType.js +4 -0
  589. package/dist/esm/api/types/InAppMessage.d.ts +9 -1
  590. package/dist/esm/api/types/InAppMessageKind.d.ts +2 -1
  591. package/dist/esm/api/types/InAppMessageKind.js +2 -1
  592. package/dist/esm/api/types/InAppMessageLayout.d.ts +7 -0
  593. package/dist/esm/api/types/InAppMessageLayout.js +7 -0
  594. package/dist/esm/api/types/InAppMessagePriority.d.ts +7 -0
  595. package/dist/esm/api/types/InAppMessagePriority.js +7 -0
  596. package/dist/esm/api/types/InAppPlacement.d.ts +16 -0
  597. package/dist/esm/api/types/InAppPlacement.js +2 -0
  598. package/dist/esm/api/types/InAppPlacementInput.d.ts +6 -0
  599. package/dist/esm/api/types/InAppPlacementInput.js +2 -0
  600. package/dist/esm/api/types/InAppPlacementStats.d.ts +16 -0
  601. package/dist/esm/api/types/InAppPlacementStats.js +2 -0
  602. package/dist/esm/api/types/InAppPlacementWithStats.d.ts +4 -0
  603. package/dist/esm/api/types/InAppPlacementWithStats.js +2 -0
  604. package/dist/esm/api/types/LiveActivityDispatch.d.ts +4 -0
  605. package/dist/esm/api/types/LiveActivityDispatchPlatforms.d.ts +7 -0
  606. package/dist/esm/api/types/LiveActivityDispatchPlatforms.js +2 -0
  607. package/dist/esm/api/types/LiveActivityToken.d.ts +5 -3
  608. package/dist/esm/api/types/LiveActivityTokenPlatform.d.ts +6 -0
  609. package/dist/esm/api/types/LiveActivityTokenPlatform.js +6 -0
  610. package/dist/esm/api/types/PushCampaign.d.ts +8 -0
  611. package/dist/esm/api/types/PushCampaignContent.d.ts +2 -0
  612. package/dist/esm/api/types/PushLocalization.d.ts +20 -0
  613. package/dist/esm/api/types/PushLocalization.js +2 -0
  614. package/dist/esm/api/types/PushLocalizationList.d.ts +5 -0
  615. package/dist/esm/api/types/PushLocalizationList.js +2 -0
  616. package/dist/esm/api/types/PushLocalizationOrigin.d.ts +6 -0
  617. package/dist/esm/api/types/PushLocalizationOrigin.js +6 -0
  618. package/dist/esm/api/types/PushTranslationResult.d.ts +11 -0
  619. package/dist/esm/api/types/PushTranslationResult.js +2 -0
  620. package/dist/esm/api/types/PushTranslationResultFailedItem.d.ts +4 -0
  621. package/dist/esm/api/types/PushTranslationResultFailedItem.js +2 -0
  622. package/dist/esm/api/types/PushTranslationResultSkippedItem.d.ts +6 -0
  623. package/dist/esm/api/types/PushTranslationResultSkippedItem.js +2 -0
  624. package/dist/esm/api/types/PushTranslationResultSkippedItemReason.d.ts +6 -0
  625. package/dist/esm/api/types/PushTranslationResultSkippedItemReason.js +6 -0
  626. package/dist/esm/api/types/SequenceBranchPathStepInput.d.ts +2 -0
  627. package/dist/esm/api/types/SequenceStepInput.d.ts +2 -0
  628. package/dist/esm/api/types/TrackingSettingsTracking.d.ts +1 -1
  629. package/dist/esm/api/types/index.d.ts +30 -0
  630. package/dist/esm/api/types/index.js +30 -0
  631. package/dist/esm/serialization/resources/analytics/types/ListCampaignRepliesLegacyResponse.d.ts +14 -0
  632. package/dist/esm/serialization/resources/analytics/types/ListCampaignRepliesLegacyResponse.js +10 -0
  633. package/dist/esm/serialization/resources/analytics/types/ListCampaignRepliesResponse.d.ts +14 -0
  634. package/dist/esm/serialization/resources/analytics/types/ListCampaignRepliesResponse.js +10 -0
  635. package/dist/esm/serialization/resources/analytics/types/index.d.ts +2 -0
  636. package/dist/esm/serialization/resources/analytics/types/index.js +2 -0
  637. package/dist/esm/serialization/resources/inApp/client/requests/CreateInAppCampaignRequest.d.ts +15 -0
  638. package/dist/esm/serialization/resources/inApp/client/requests/CreateInAppCampaignRequest.js +11 -0
  639. package/dist/esm/serialization/resources/inApp/client/requests/CreateInAppPlacementRequest.d.ts +10 -0
  640. package/dist/esm/serialization/resources/inApp/client/requests/CreateInAppPlacementRequest.js +8 -0
  641. package/dist/esm/serialization/resources/inApp/client/requests/DuplicateInAppCampaignRequest.d.ts +9 -0
  642. package/dist/esm/serialization/resources/inApp/client/requests/DuplicateInAppCampaignRequest.js +5 -0
  643. package/dist/esm/serialization/resources/inApp/client/requests/EstimateInAppCampaignRecipientsRequest.d.ts +9 -0
  644. package/dist/esm/serialization/resources/inApp/client/requests/EstimateInAppCampaignRecipientsRequest.js +5 -0
  645. package/dist/esm/serialization/resources/inApp/client/requests/SendInAppCampaignRequest.d.ts +9 -0
  646. package/dist/esm/serialization/resources/inApp/client/requests/SendInAppCampaignRequest.js +5 -0
  647. package/dist/esm/serialization/resources/inApp/client/requests/UpdateInAppCampaignRequest.d.ts +15 -0
  648. package/dist/esm/serialization/resources/inApp/client/requests/UpdateInAppCampaignRequest.js +11 -0
  649. package/dist/esm/serialization/resources/inApp/client/requests/index.d.ts +6 -0
  650. package/dist/esm/serialization/resources/inApp/client/requests/index.js +6 -0
  651. package/dist/esm/serialization/resources/inApp/types/CreateInAppCampaignRequestPriority.d.ts +7 -0
  652. package/dist/esm/serialization/resources/inApp/types/CreateInAppCampaignRequestPriority.js +3 -0
  653. package/dist/esm/serialization/resources/inApp/types/CreateInAppCampaignResponse.d.ts +11 -0
  654. package/dist/esm/serialization/resources/inApp/types/CreateInAppCampaignResponse.js +7 -0
  655. package/dist/esm/serialization/resources/inApp/types/CreateInAppPlacementResponse.d.ts +11 -0
  656. package/dist/esm/serialization/resources/inApp/types/CreateInAppPlacementResponse.js +7 -0
  657. package/dist/esm/serialization/resources/inApp/types/DeleteInAppPlacementResponse.d.ts +11 -0
  658. package/dist/esm/serialization/resources/inApp/types/DeleteInAppPlacementResponse.js +7 -0
  659. package/dist/esm/serialization/resources/inApp/types/DuplicateInAppCampaignResponse.d.ts +11 -0
  660. package/dist/esm/serialization/resources/inApp/types/DuplicateInAppCampaignResponse.js +7 -0
  661. package/dist/esm/serialization/resources/inApp/types/EstimateInAppCampaignRecipientsResponse.d.ts +10 -0
  662. package/dist/esm/serialization/resources/inApp/types/EstimateInAppCampaignRecipientsResponse.js +6 -0
  663. package/dist/esm/serialization/resources/inApp/types/GetInAppCampaignResponse.d.ts +13 -0
  664. package/dist/esm/serialization/resources/inApp/types/GetInAppCampaignResponse.js +9 -0
  665. package/dist/esm/serialization/resources/inApp/types/GetInAppCampaignStatsResponse.d.ts +17 -0
  666. package/dist/esm/serialization/resources/inApp/types/GetInAppCampaignStatsResponse.js +13 -0
  667. package/dist/esm/serialization/resources/inApp/types/GetInAppCampaignStatsResponseState.d.ts +7 -0
  668. package/dist/esm/serialization/resources/inApp/types/GetInAppCampaignStatsResponseState.js +3 -0
  669. package/dist/esm/serialization/resources/inApp/types/GetInAppCampaignStatsResponseStatus.d.ts +7 -0
  670. package/dist/esm/serialization/resources/inApp/types/GetInAppCampaignStatsResponseStatus.js +3 -0
  671. package/dist/esm/serialization/resources/inApp/types/GetInAppPlacementContentResponse.d.ts +12 -0
  672. package/dist/esm/serialization/resources/inApp/types/GetInAppPlacementContentResponse.js +8 -0
  673. package/dist/esm/serialization/resources/inApp/types/GetInAppPlacementContentResponsePlacementsItem.d.ts +11 -0
  674. package/dist/esm/serialization/resources/inApp/types/GetInAppPlacementContentResponsePlacementsItem.js +7 -0
  675. package/dist/esm/serialization/resources/inApp/types/GetInAppPlacementResponse.d.ts +11 -0
  676. package/dist/esm/serialization/resources/inApp/types/GetInAppPlacementResponse.js +7 -0
  677. package/dist/esm/serialization/resources/inApp/types/ListInAppCampaignsRequestStatus.d.ts +7 -0
  678. package/dist/esm/serialization/resources/inApp/types/ListInAppCampaignsRequestStatus.js +3 -0
  679. package/dist/esm/serialization/resources/inApp/types/ListInAppCampaignsResponse.d.ts +12 -0
  680. package/dist/esm/serialization/resources/inApp/types/ListInAppCampaignsResponse.js +8 -0
  681. package/dist/esm/serialization/resources/inApp/types/ListInAppMessagesRequestDeliver.d.ts +7 -0
  682. package/dist/esm/serialization/resources/inApp/types/ListInAppMessagesRequestDeliver.js +3 -0
  683. package/dist/esm/serialization/resources/inApp/types/ListInAppMessagesRequestKind.d.ts +1 -1
  684. package/dist/esm/serialization/resources/inApp/types/ListInAppMessagesRequestKind.js +1 -1
  685. package/dist/esm/serialization/resources/inApp/types/ListInAppPlacementsResponse.d.ts +11 -0
  686. package/dist/esm/serialization/resources/inApp/types/ListInAppPlacementsResponse.js +7 -0
  687. package/dist/esm/serialization/resources/inApp/types/SendInAppCampaignResponse.d.ts +12 -0
  688. package/dist/esm/serialization/resources/inApp/types/SendInAppCampaignResponse.js +8 -0
  689. package/dist/esm/serialization/resources/inApp/types/StopInAppCampaignResponse.d.ts +11 -0
  690. package/dist/esm/serialization/resources/inApp/types/StopInAppCampaignResponse.js +7 -0
  691. package/dist/esm/serialization/resources/inApp/types/UnscheduleInAppCampaignResponse.d.ts +11 -0
  692. package/dist/esm/serialization/resources/inApp/types/UnscheduleInAppCampaignResponse.js +7 -0
  693. package/dist/esm/serialization/resources/inApp/types/UpdateInAppCampaignRequestPriority.d.ts +7 -0
  694. package/dist/esm/serialization/resources/inApp/types/UpdateInAppCampaignRequestPriority.js +3 -0
  695. package/dist/esm/serialization/resources/inApp/types/UpdateInAppCampaignResponse.d.ts +11 -0
  696. package/dist/esm/serialization/resources/inApp/types/UpdateInAppCampaignResponse.js +7 -0
  697. package/dist/esm/serialization/resources/inApp/types/UpdateInAppPlacementResponse.d.ts +11 -0
  698. package/dist/esm/serialization/resources/inApp/types/UpdateInAppPlacementResponse.js +7 -0
  699. package/dist/esm/serialization/resources/inApp/types/index.d.ts +23 -0
  700. package/dist/esm/serialization/resources/inApp/types/index.js +23 -0
  701. package/dist/esm/serialization/resources/push/client/requests/CreatePushCampaignRequest.d.ts +2 -0
  702. package/dist/esm/serialization/resources/push/client/requests/CreatePushCampaignRequest.js +2 -0
  703. package/dist/esm/serialization/resources/push/client/requests/EndLiveActivityRequest.d.ts +1 -0
  704. package/dist/esm/serialization/resources/push/client/requests/EndLiveActivityRequest.js +1 -0
  705. package/dist/esm/serialization/resources/push/client/requests/EstimatePushCampaignRecipientsRequest.d.ts +1 -0
  706. package/dist/esm/serialization/resources/push/client/requests/EstimatePushCampaignRecipientsRequest.js +1 -0
  707. package/dist/esm/serialization/resources/push/client/requests/SendPushCampaignRequest.d.ts +4 -0
  708. package/dist/esm/serialization/resources/push/client/requests/SendPushCampaignRequest.js +4 -0
  709. package/dist/esm/serialization/resources/push/client/requests/StartLiveActivityRequest.d.ts +3 -0
  710. package/dist/esm/serialization/resources/push/client/requests/StartLiveActivityRequest.js +3 -0
  711. package/dist/esm/serialization/resources/push/client/requests/TranslatePushCampaignRequest.d.ts +10 -0
  712. package/dist/esm/serialization/resources/push/client/requests/TranslatePushCampaignRequest.js +6 -0
  713. package/dist/esm/serialization/resources/push/client/requests/TranslatePushContentRequest.d.ts +14 -0
  714. package/dist/esm/serialization/resources/push/client/requests/TranslatePushContentRequest.js +10 -0
  715. package/dist/esm/serialization/resources/push/client/requests/UpdateLiveActivityRequest.d.ts +1 -0
  716. package/dist/esm/serialization/resources/push/client/requests/UpdateLiveActivityRequest.js +1 -0
  717. package/dist/esm/serialization/resources/push/client/requests/UpdatePushCampaignRequest.d.ts +6 -0
  718. package/dist/esm/serialization/resources/push/client/requests/UpdatePushCampaignRequest.js +6 -0
  719. package/dist/esm/serialization/resources/push/client/requests/index.d.ts +2 -0
  720. package/dist/esm/serialization/resources/push/client/requests/index.js +2 -0
  721. package/dist/esm/serialization/resources/push/types/EstimatePushCampaignRecipientsResponse.d.ts +2 -0
  722. package/dist/esm/serialization/resources/push/types/EstimatePushCampaignRecipientsResponse.js +2 -0
  723. package/dist/esm/serialization/resources/push/types/EstimatePushCampaignRecipientsResponseTimingCoverage.d.ts +11 -0
  724. package/dist/esm/serialization/resources/push/types/EstimatePushCampaignRecipientsResponseTimingCoverage.js +7 -0
  725. package/dist/esm/serialization/resources/push/types/ListLiveActivitiesRequestPlatform.d.ts +7 -0
  726. package/dist/esm/serialization/resources/push/types/ListLiveActivitiesRequestPlatform.js +3 -0
  727. package/dist/esm/serialization/resources/push/types/TranslatePushCampaignResponse.d.ts +11 -0
  728. package/dist/esm/serialization/resources/push/types/TranslatePushCampaignResponse.js +9 -0
  729. package/dist/esm/serialization/resources/push/types/TranslatePushContentResponse.d.ts +11 -0
  730. package/dist/esm/serialization/resources/push/types/TranslatePushContentResponse.js +9 -0
  731. package/dist/esm/serialization/resources/push/types/index.d.ts +4 -0
  732. package/dist/esm/serialization/resources/push/types/index.js +4 -0
  733. package/dist/esm/serialization/resources/templates/types/GetLocalizationCoverageTemplatesResponse.d.ts +2 -0
  734. package/dist/esm/serialization/resources/templates/types/GetLocalizationCoverageTemplatesResponse.js +2 -0
  735. package/dist/esm/serialization/resources/templates/types/GetLocalizationCoverageTemplatesResponsePush.d.ts +11 -0
  736. package/dist/esm/serialization/resources/templates/types/GetLocalizationCoverageTemplatesResponsePush.js +7 -0
  737. package/dist/esm/serialization/resources/templates/types/GetLocalizationCoverageTemplatesResponsePushLocalesItem.d.ts +15 -0
  738. package/dist/esm/serialization/resources/templates/types/GetLocalizationCoverageTemplatesResponsePushLocalesItem.js +11 -0
  739. package/dist/esm/serialization/resources/templates/types/TranslateMissingLocalizationsTemplatesResponse.d.ts +2 -0
  740. package/dist/esm/serialization/resources/templates/types/TranslateMissingLocalizationsTemplatesResponse.js +2 -0
  741. package/dist/esm/serialization/resources/templates/types/index.d.ts +2 -0
  742. package/dist/esm/serialization/resources/templates/types/index.js +2 -0
  743. package/dist/esm/serialization/resources/webTrackingKeys/client/requests/MintIdentityWebTrackingKeysRequest.d.ts +2 -1
  744. package/dist/esm/serialization/resources/webTrackingKeys/client/requests/MintIdentityWebTrackingKeysRequest.js +2 -1
  745. package/dist/esm/serialization/resources/webTrackingKeys/types/MintIdentityWebTrackingKeysResponse.d.ts +2 -1
  746. package/dist/esm/serialization/resources/webTrackingKeys/types/MintIdentityWebTrackingKeysResponse.js +2 -1
  747. package/dist/esm/serialization/types/CampaignChannel.d.ts +1 -1
  748. package/dist/esm/serialization/types/CampaignChannel.js +1 -1
  749. package/dist/esm/serialization/types/CampaignReply.d.ts +19 -0
  750. package/dist/esm/serialization/types/CampaignReply.js +15 -0
  751. package/dist/esm/serialization/types/InAppCampaign.d.ts +26 -0
  752. package/dist/esm/serialization/types/InAppCampaign.js +24 -0
  753. package/dist/esm/serialization/types/InAppCampaignMessage.d.ts +29 -0
  754. package/dist/esm/serialization/types/InAppCampaignMessage.js +25 -0
  755. package/dist/esm/serialization/types/InAppCampaignMessageButtonsItem.d.ts +12 -0
  756. package/dist/esm/serialization/types/InAppCampaignMessageButtonsItem.js +8 -0
  757. package/dist/esm/serialization/types/InAppCampaignMessageButtonsItemAction.d.ts +7 -0
  758. package/dist/esm/serialization/types/InAppCampaignMessageButtonsItemAction.js +3 -0
  759. package/dist/esm/serialization/types/InAppCampaignMessageFormat.d.ts +7 -0
  760. package/dist/esm/serialization/types/InAppCampaignMessageFormat.js +3 -0
  761. package/dist/esm/serialization/types/InAppCampaignMessageImagePlacement.d.ts +7 -0
  762. package/dist/esm/serialization/types/InAppCampaignMessageImagePlacement.js +3 -0
  763. package/dist/esm/serialization/types/InAppCampaignMessageKind.d.ts +7 -0
  764. package/dist/esm/serialization/types/InAppCampaignMessageKind.js +3 -0
  765. package/dist/esm/serialization/types/InAppCampaignMessagePosition.d.ts +7 -0
  766. package/dist/esm/serialization/types/InAppCampaignMessagePosition.js +3 -0
  767. package/dist/esm/serialization/types/InAppCampaignPriority.d.ts +7 -0
  768. package/dist/esm/serialization/types/InAppCampaignPriority.js +3 -0
  769. package/dist/esm/serialization/types/InAppCampaignState.d.ts +7 -0
  770. package/dist/esm/serialization/types/InAppCampaignState.js +3 -0
  771. package/dist/esm/serialization/types/InAppCampaignStats.d.ts +17 -0
  772. package/dist/esm/serialization/types/InAppCampaignStats.js +13 -0
  773. package/dist/esm/serialization/types/InAppCampaignStatsButtonsItem.d.ts +10 -0
  774. package/dist/esm/serialization/types/InAppCampaignStatsButtonsItem.js +6 -0
  775. package/dist/esm/serialization/types/InAppCampaignStatus.d.ts +7 -0
  776. package/dist/esm/serialization/types/InAppCampaignStatus.js +3 -0
  777. package/dist/esm/serialization/types/InAppCampaignType.d.ts +7 -0
  778. package/dist/esm/serialization/types/InAppCampaignType.js +3 -0
  779. package/dist/esm/serialization/types/InAppMessage.d.ts +6 -0
  780. package/dist/esm/serialization/types/InAppMessage.js +6 -0
  781. package/dist/esm/serialization/types/InAppMessageKind.d.ts +1 -1
  782. package/dist/esm/serialization/types/InAppMessageKind.js +1 -1
  783. package/dist/esm/serialization/types/InAppMessageLayout.d.ts +7 -0
  784. package/dist/esm/serialization/types/InAppMessageLayout.js +3 -0
  785. package/dist/esm/serialization/types/InAppMessagePriority.d.ts +7 -0
  786. package/dist/esm/serialization/types/InAppMessagePriority.js +3 -0
  787. package/dist/esm/serialization/types/InAppPlacement.d.ts +15 -0
  788. package/dist/esm/serialization/types/InAppPlacement.js +11 -0
  789. package/dist/esm/serialization/types/InAppPlacementInput.d.ts +12 -0
  790. package/dist/esm/serialization/types/InAppPlacementInput.js +8 -0
  791. package/dist/esm/serialization/types/InAppPlacementStats.d.ts +14 -0
  792. package/dist/esm/serialization/types/InAppPlacementStats.js +10 -0
  793. package/dist/esm/serialization/types/InAppPlacementWithStats.d.ts +11 -0
  794. package/dist/esm/serialization/types/InAppPlacementWithStats.js +9 -0
  795. package/dist/esm/serialization/types/LiveActivityDispatch.d.ts +3 -0
  796. package/dist/esm/serialization/types/LiveActivityDispatch.js +3 -0
  797. package/dist/esm/serialization/types/LiveActivityDispatchPlatforms.d.ts +10 -0
  798. package/dist/esm/serialization/types/LiveActivityDispatchPlatforms.js +6 -0
  799. package/dist/esm/serialization/types/LiveActivityToken.d.ts +2 -0
  800. package/dist/esm/serialization/types/LiveActivityToken.js +2 -0
  801. package/dist/esm/serialization/types/LiveActivityTokenPlatform.d.ts +7 -0
  802. package/dist/esm/serialization/types/LiveActivityTokenPlatform.js +3 -0
  803. package/dist/esm/serialization/types/PushCampaign.d.ts +4 -0
  804. package/dist/esm/serialization/types/PushCampaign.js +4 -0
  805. package/dist/esm/serialization/types/PushCampaignContent.d.ts +2 -0
  806. package/dist/esm/serialization/types/PushCampaignContent.js +2 -0
  807. package/dist/esm/serialization/types/PushLocalization.d.ts +16 -0
  808. package/dist/esm/serialization/types/PushLocalization.js +12 -0
  809. package/dist/esm/serialization/types/PushLocalizationList.d.ts +8 -0
  810. package/dist/esm/serialization/types/PushLocalizationList.js +4 -0
  811. package/dist/esm/serialization/types/PushLocalizationOrigin.d.ts +7 -0
  812. package/dist/esm/serialization/types/PushLocalizationOrigin.js +3 -0
  813. package/dist/esm/serialization/types/PushTranslationResult.d.ts +15 -0
  814. package/dist/esm/serialization/types/PushTranslationResult.js +11 -0
  815. package/dist/esm/serialization/types/PushTranslationResultFailedItem.d.ts +10 -0
  816. package/dist/esm/serialization/types/PushTranslationResultFailedItem.js +6 -0
  817. package/dist/esm/serialization/types/PushTranslationResultSkippedItem.d.ts +11 -0
  818. package/dist/esm/serialization/types/PushTranslationResultSkippedItem.js +7 -0
  819. package/dist/esm/serialization/types/PushTranslationResultSkippedItemReason.d.ts +7 -0
  820. package/dist/esm/serialization/types/PushTranslationResultSkippedItemReason.js +3 -0
  821. package/dist/esm/serialization/types/SequenceBranchPathStepInput.d.ts +2 -0
  822. package/dist/esm/serialization/types/SequenceBranchPathStepInput.js +2 -0
  823. package/dist/esm/serialization/types/SequenceStepInput.d.ts +2 -0
  824. package/dist/esm/serialization/types/SequenceStepInput.js +2 -0
  825. package/dist/esm/serialization/types/index.d.ts +30 -0
  826. package/dist/esm/serialization/types/index.js +30 -0
  827. package/package.json +1 -1
@@ -41,6 +41,157 @@ class InAppClient {
41
41
  constructor(options = {}) {
42
42
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
43
43
  }
44
+ /**
45
+ * Creates an in-app campaign draft, one in-app message or content card for an audience. The message, priority, end time and audience can be set now or later. Requires the campaigns:write scope.
46
+ *
47
+ * @param {Sequenzy.CreateInAppCampaignRequest} request
48
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
49
+ *
50
+ * @throws {@link Sequenzy.BadRequestError}
51
+ * @throws {@link Sequenzy.UnauthorizedError}
52
+ * @throws {@link Sequenzy.ForbiddenError}
53
+ * @throws {@link Sequenzy.InternalServerError}
54
+ * @throws {@link errors.SequenzyError}
55
+ * @throws {@link errors.SequenzyTimeoutError}
56
+ *
57
+ * @example
58
+ * await client.inApp.createInAppCampaign()
59
+ */
60
+ createInAppCampaign(request = {}, requestOptions) {
61
+ return core.HttpResponsePromise.fromPromise(this.__createInAppCampaign(request, requestOptions));
62
+ }
63
+ async __createInAppCampaign(request = {}, requestOptions) {
64
+ const _authRequest = await this._options.authProvider.getAuthRequest();
65
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
66
+ const _response = await core.fetcher({
67
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
68
+ (await core.Supplier.get(this._options.environment)) ??
69
+ environments.SequenzyEnvironment.Default, "in-app/campaigns"),
70
+ method: "POST",
71
+ headers: _headers,
72
+ contentType: "application/json",
73
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
74
+ requestType: "json",
75
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(serializers.CreateInAppCampaignRequest.jsonOrThrow(request, {
76
+ unrecognizedObjectKeys: "strip",
77
+ omitUndefined: true,
78
+ }), requestOptions?.additionalBodyParameters),
79
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
80
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
81
+ abortSignal: requestOptions?.abortSignal,
82
+ fetchFn: this._options?.fetch,
83
+ logging: this._options.logging,
84
+ });
85
+ if (_response.ok) {
86
+ return {
87
+ data: serializers.CreateInAppCampaignResponse.parseOrThrow(_response.body, {
88
+ unrecognizedObjectKeys: "passthrough",
89
+ allowUnrecognizedUnionMembers: true,
90
+ allowUnrecognizedEnumValues: true,
91
+ skipValidation: true,
92
+ breadcrumbsPrefix: ["response"],
93
+ }),
94
+ rawResponse: _response.rawResponse,
95
+ };
96
+ }
97
+ if (_response.error.reason === "status-code") {
98
+ switch (_response.error.statusCode) {
99
+ case 400:
100
+ throw new Sequenzy.BadRequestError(_response.error.body, _response.rawResponse);
101
+ case 401:
102
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
103
+ case 403:
104
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
105
+ case 500:
106
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
107
+ default:
108
+ throw new errors.SequenzyError({
109
+ statusCode: _response.error.statusCode,
110
+ body: _response.error.body,
111
+ rawResponse: _response.rawResponse,
112
+ });
113
+ }
114
+ }
115
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/in-app/campaigns");
116
+ }
117
+ /**
118
+ * Creates a placement, a slot in your app that shows in-app content inline. The key never changes. A workspace can have up to 50 placements. Requires the sequences:write scope.
119
+ *
120
+ * @param {Sequenzy.CreateInAppPlacementRequest} request
121
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
122
+ *
123
+ * @throws {@link Sequenzy.BadRequestError}
124
+ * @throws {@link Sequenzy.UnauthorizedError}
125
+ * @throws {@link Sequenzy.ForbiddenError}
126
+ * @throws {@link Sequenzy.ConflictError}
127
+ * @throws {@link Sequenzy.InternalServerError}
128
+ * @throws {@link errors.SequenzyError}
129
+ * @throws {@link errors.SequenzyTimeoutError}
130
+ *
131
+ * @example
132
+ * await client.inApp.createInAppPlacement({
133
+ * key: "home_hero"
134
+ * })
135
+ */
136
+ createInAppPlacement(request, requestOptions) {
137
+ return core.HttpResponsePromise.fromPromise(this.__createInAppPlacement(request, requestOptions));
138
+ }
139
+ async __createInAppPlacement(request, requestOptions) {
140
+ const _authRequest = await this._options.authProvider.getAuthRequest();
141
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
142
+ const _response = await core.fetcher({
143
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
144
+ (await core.Supplier.get(this._options.environment)) ??
145
+ environments.SequenzyEnvironment.Default, "in-app/placements"),
146
+ method: "POST",
147
+ headers: _headers,
148
+ contentType: "application/json",
149
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
150
+ requestType: "json",
151
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(serializers.CreateInAppPlacementRequest.jsonOrThrow(request, {
152
+ unrecognizedObjectKeys: "strip",
153
+ omitUndefined: true,
154
+ }), requestOptions?.additionalBodyParameters),
155
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
156
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
157
+ abortSignal: requestOptions?.abortSignal,
158
+ fetchFn: this._options?.fetch,
159
+ logging: this._options.logging,
160
+ });
161
+ if (_response.ok) {
162
+ return {
163
+ data: serializers.CreateInAppPlacementResponse.parseOrThrow(_response.body, {
164
+ unrecognizedObjectKeys: "passthrough",
165
+ allowUnrecognizedUnionMembers: true,
166
+ allowUnrecognizedEnumValues: true,
167
+ skipValidation: true,
168
+ breadcrumbsPrefix: ["response"],
169
+ }),
170
+ rawResponse: _response.rawResponse,
171
+ };
172
+ }
173
+ if (_response.error.reason === "status-code") {
174
+ switch (_response.error.statusCode) {
175
+ case 400:
176
+ throw new Sequenzy.BadRequestError(_response.error.body, _response.rawResponse);
177
+ case 401:
178
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
179
+ case 403:
180
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
181
+ case 409:
182
+ throw new Sequenzy.ConflictError(_response.error.body, _response.rawResponse);
183
+ case 500:
184
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
185
+ default:
186
+ throw new errors.SequenzyError({
187
+ statusCode: _response.error.statusCode,
188
+ body: _response.error.body,
189
+ rawResponse: _response.rawResponse,
190
+ });
191
+ }
192
+ }
193
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/in-app/placements");
194
+ }
44
195
  /**
45
196
  * Deletes an item so the contact's app stops showing it the next time it fetches the feed. Its engagement no longer counts in step stats. Requires the subscribers:write scope.
46
197
  *
@@ -112,9 +263,9 @@ class InAppClient {
112
263
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/in-app/messages/{messageId}");
113
264
  }
114
265
  /**
115
- * Created, displayed, clicked and dismissed counts for one in_app sequence step, plus push primer permission results. Requires the sequences:read scope.
266
+ * Deletes a placement. Its slots collapse in your app on the next refresh, and in-app steps that target it skip contacts until a placement with the same key exists again. Items already created stay in contact history and never show again, even under a placement created later with the same key. Requires the sequences:delete scope.
116
267
  *
117
- * @param {Sequenzy.GetInAppStepStatsRequest} request
268
+ * @param {Sequenzy.DeleteInAppPlacementRequest} request
118
269
  * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
119
270
  *
120
271
  * @throws {@link Sequenzy.UnauthorizedError}
@@ -125,22 +276,22 @@ class InAppClient {
125
276
  * @throws {@link errors.SequenzyTimeoutError}
126
277
  *
127
278
  * @example
128
- * await client.inApp.getInAppStepStats({
129
- * stepId: "stepId"
279
+ * await client.inApp.deleteInAppPlacement({
280
+ * key: "key"
130
281
  * })
131
282
  */
132
- getInAppStepStats(request, requestOptions) {
133
- return core.HttpResponsePromise.fromPromise(this.__getInAppStepStats(request, requestOptions));
283
+ deleteInAppPlacement(request, requestOptions) {
284
+ return core.HttpResponsePromise.fromPromise(this.__deleteInAppPlacement(request, requestOptions));
134
285
  }
135
- async __getInAppStepStats(request, requestOptions) {
136
- const { stepId } = request;
286
+ async __deleteInAppPlacement(request, requestOptions) {
287
+ const { key } = request;
137
288
  const _authRequest = await this._options.authProvider.getAuthRequest();
138
289
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
139
290
  const _response = await core.fetcher({
140
291
  url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
141
292
  (await core.Supplier.get(this._options.environment)) ??
142
- environments.SequenzyEnvironment.Default, `in-app/steps/${core.url.encodePathParam(stepId)}/stats`),
143
- method: "GET",
293
+ environments.SequenzyEnvironment.Default, `in-app/placements/${core.url.encodePathParam(key)}`),
294
+ method: "DELETE",
144
295
  headers: _headers,
145
296
  queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
146
297
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
@@ -151,7 +302,7 @@ class InAppClient {
151
302
  });
152
303
  if (_response.ok) {
153
304
  return {
154
- data: serializers.GetInAppStepStatsResponse.parseOrThrow(_response.body, {
305
+ data: serializers.DeleteInAppPlacementResponse.parseOrThrow(_response.body, {
155
306
  unrecognizedObjectKeys: "passthrough",
156
307
  allowUnrecognizedUnionMembers: true,
157
308
  allowUnrecognizedEnumValues: true,
@@ -179,12 +330,12 @@ class InAppClient {
179
330
  });
180
331
  }
181
332
  }
182
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/in-app/steps/{stepId}/stats");
333
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/in-app/placements/{key}");
183
334
  }
184
335
  /**
185
- * Lists a contact's in-app messages and content cards, created by in_app sequence steps. With status open (default) it returns what the app should show now: messages not yet displayed, clicked or dismissed, and cards not dismissed, excluding expired items, messages first, then pinned cards, then newest. With status all it returns history, newest first. Identify the contact with email, externalId or subscriberId. Requires the subscribers:read scope.
336
+ * Copies an in-app campaign's message, priority, audience and labels into a new draft. An end time that has passed is not copied. Requires the campaigns:write scope.
186
337
  *
187
- * @param {Sequenzy.ListInAppMessagesRequest} request
338
+ * @param {Sequenzy.DuplicateInAppCampaignRequest} request
188
339
  * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
189
340
  *
190
341
  * @throws {@link Sequenzy.BadRequestError}
@@ -196,48 +347,30 @@ class InAppClient {
196
347
  * @throws {@link errors.SequenzyTimeoutError}
197
348
  *
198
349
  * @example
199
- * await client.inApp.listInAppMessages({
200
- * actions: "request_push_permission"
350
+ * await client.inApp.duplicateInAppCampaign({
351
+ * campaignId: "campaignId"
201
352
  * })
202
353
  */
203
- listInAppMessages(request = {}, requestOptions) {
204
- return core.HttpResponsePromise.fromPromise(this.__listInAppMessages(request, requestOptions));
354
+ duplicateInAppCampaign(request, requestOptions) {
355
+ return core.HttpResponsePromise.fromPromise(this.__duplicateInAppCampaign(request, requestOptions));
205
356
  }
206
- async __listInAppMessages(request = {}, requestOptions) {
207
- const { actions, email, externalId, formats, kind, limit, status, subscriberId } = request;
208
- const _queryParams = {
209
- actions,
210
- email,
211
- externalId,
212
- formats,
213
- kind: kind != null
214
- ? serializers.ListInAppMessagesRequestKind.jsonOrThrow(kind, {
215
- unrecognizedObjectKeys: "strip",
216
- omitUndefined: true,
217
- })
218
- : undefined,
219
- limit,
220
- status: status != null
221
- ? serializers.ListInAppMessagesRequestStatus.jsonOrThrow(status, {
222
- unrecognizedObjectKeys: "strip",
223
- omitUndefined: true,
224
- })
225
- : undefined,
226
- subscriberId,
227
- };
357
+ async __duplicateInAppCampaign(request, requestOptions) {
358
+ const { campaignId, ..._body } = request;
228
359
  const _authRequest = await this._options.authProvider.getAuthRequest();
229
360
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
230
361
  const _response = await core.fetcher({
231
362
  url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
232
363
  (await core.Supplier.get(this._options.environment)) ??
233
- environments.SequenzyEnvironment.Default, "in-app/messages"),
234
- method: "GET",
364
+ environments.SequenzyEnvironment.Default, `in-app/campaigns/${core.url.encodePathParam(campaignId)}/duplicate`),
365
+ method: "POST",
235
366
  headers: _headers,
236
- queryString: core.url
237
- .queryBuilder()
238
- .addMany(_queryParams)
239
- .mergeAdditional(requestOptions?.queryParams)
240
- .build(),
367
+ contentType: "application/json",
368
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
369
+ requestType: "json",
370
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(serializers.DuplicateInAppCampaignRequest.jsonOrThrow(_body, {
371
+ unrecognizedObjectKeys: "strip",
372
+ omitUndefined: true,
373
+ }), requestOptions?.additionalBodyParameters),
241
374
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
242
375
  maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
243
376
  abortSignal: requestOptions?.abortSignal,
@@ -246,7 +379,7 @@ class InAppClient {
246
379
  });
247
380
  if (_response.ok) {
248
381
  return {
249
- data: serializers.ListInAppMessagesResponse.parseOrThrow(_response.body, {
382
+ data: serializers.DuplicateInAppCampaignResponse.parseOrThrow(_response.body, {
250
383
  unrecognizedObjectKeys: "passthrough",
251
384
  allowUnrecognizedUnionMembers: true,
252
385
  allowUnrecognizedEnumValues: true,
@@ -276,34 +409,47 @@ class InAppClient {
276
409
  });
277
410
  }
278
411
  }
279
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/in-app/messages");
412
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/in-app/campaigns/{campaignId}/duplicate");
280
413
  }
281
414
  /**
282
- * Built-in starting points for in_app sequence steps. Each config is a complete step without a label; link buttons have no url until you add one. Requires the sequences:read scope.
415
+ * Counts the contacts who match an audience now. Contacts who join the audience while the campaign is live get it too. Requires the campaigns:read scope.
283
416
  *
417
+ * @param {Sequenzy.EstimateInAppCampaignRecipientsRequest} request
284
418
  * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
285
419
  *
420
+ * @throws {@link Sequenzy.BadRequestError}
286
421
  * @throws {@link Sequenzy.UnauthorizedError}
287
422
  * @throws {@link Sequenzy.ForbiddenError}
423
+ * @throws {@link Sequenzy.InternalServerError}
288
424
  * @throws {@link errors.SequenzyError}
289
425
  * @throws {@link errors.SequenzyTimeoutError}
290
426
  *
291
427
  * @example
292
- * await client.inApp.listInAppTemplates()
428
+ * await client.inApp.estimateInAppCampaignRecipients({
429
+ * targetLists: {
430
+ * "key": "value"
431
+ * }
432
+ * })
293
433
  */
294
- listInAppTemplates(requestOptions) {
295
- return core.HttpResponsePromise.fromPromise(this.__listInAppTemplates(requestOptions));
434
+ estimateInAppCampaignRecipients(request, requestOptions) {
435
+ return core.HttpResponsePromise.fromPromise(this.__estimateInAppCampaignRecipients(request, requestOptions));
296
436
  }
297
- async __listInAppTemplates(requestOptions) {
437
+ async __estimateInAppCampaignRecipients(request, requestOptions) {
298
438
  const _authRequest = await this._options.authProvider.getAuthRequest();
299
439
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
300
440
  const _response = await core.fetcher({
301
441
  url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
302
442
  (await core.Supplier.get(this._options.environment)) ??
303
- environments.SequenzyEnvironment.Default, "in-app/templates"),
304
- method: "GET",
443
+ environments.SequenzyEnvironment.Default, "in-app/campaigns/estimate"),
444
+ method: "POST",
305
445
  headers: _headers,
446
+ contentType: "application/json",
306
447
  queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
448
+ requestType: "json",
449
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(serializers.EstimateInAppCampaignRecipientsRequest.jsonOrThrow(request, {
450
+ unrecognizedObjectKeys: "strip",
451
+ omitUndefined: true,
452
+ }), requestOptions?.additionalBodyParameters),
307
453
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
308
454
  maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
309
455
  abortSignal: requestOptions?.abortSignal,
@@ -312,7 +458,7 @@ class InAppClient {
312
458
  });
313
459
  if (_response.ok) {
314
460
  return {
315
- data: serializers.ListInAppTemplatesResponse.parseOrThrow(_response.body, {
461
+ data: serializers.EstimateInAppCampaignRecipientsResponse.parseOrThrow(_response.body, {
316
462
  unrecognizedObjectKeys: "passthrough",
317
463
  allowUnrecognizedUnionMembers: true,
318
464
  allowUnrecognizedEnumValues: true,
@@ -324,10 +470,14 @@ class InAppClient {
324
470
  }
325
471
  if (_response.error.reason === "status-code") {
326
472
  switch (_response.error.statusCode) {
473
+ case 400:
474
+ throw new Sequenzy.BadRequestError(_response.error.body, _response.rawResponse);
327
475
  case 401:
328
476
  throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
329
477
  case 403:
330
478
  throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
479
+ case 500:
480
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
331
481
  default:
332
482
  throw new errors.SequenzyError({
333
483
  statusCode: _response.error.statusCode,
@@ -336,49 +486,40 @@ class InAppClient {
336
486
  });
337
487
  }
338
488
  }
339
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/in-app/templates");
489
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/in-app/campaigns/estimate");
340
490
  }
341
491
  /**
342
- * Records that the app displayed, clicked, dismissed or read an item. The first report of each type sets its timestamp; repeats change nothing except clickCount, and recorded is false. Clicks, dismissals and reads also mark the item displayed. Messages leave the open feed once displayed, clicked or dismissed; cards once dismissed. Requires the subscribers:write scope.
492
+ * Returns an in-app campaign's message, audience, priority, schedule, end time and state, plus reach and engagement once it has launched (null for drafts and scheduled campaigns). Requires the campaigns:read scope.
343
493
  *
344
- * @param {Sequenzy.RecordInAppEventRequest} request
494
+ * @param {Sequenzy.GetInAppCampaignRequest} request
345
495
  * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
346
496
  *
347
- * @throws {@link Sequenzy.BadRequestError}
348
497
  * @throws {@link Sequenzy.UnauthorizedError}
349
498
  * @throws {@link Sequenzy.ForbiddenError}
350
499
  * @throws {@link Sequenzy.NotFoundError}
351
- * @throws {@link Sequenzy.UnprocessableEntityError}
352
500
  * @throws {@link Sequenzy.InternalServerError}
353
501
  * @throws {@link errors.SequenzyError}
354
502
  * @throws {@link errors.SequenzyTimeoutError}
355
503
  *
356
504
  * @example
357
- * await client.inApp.recordInAppEvent({
358
- * messageId: "messageId",
359
- * type: "displayed"
505
+ * await client.inApp.getInAppCampaign({
506
+ * campaignId: "campaignId"
360
507
  * })
361
508
  */
362
- recordInAppEvent(request, requestOptions) {
363
- return core.HttpResponsePromise.fromPromise(this.__recordInAppEvent(request, requestOptions));
509
+ getInAppCampaign(request, requestOptions) {
510
+ return core.HttpResponsePromise.fromPromise(this.__getInAppCampaign(request, requestOptions));
364
511
  }
365
- async __recordInAppEvent(request, requestOptions) {
366
- const { messageId, ..._body } = request;
512
+ async __getInAppCampaign(request, requestOptions) {
513
+ const { campaignId } = request;
367
514
  const _authRequest = await this._options.authProvider.getAuthRequest();
368
515
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
369
516
  const _response = await core.fetcher({
370
517
  url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
371
518
  (await core.Supplier.get(this._options.environment)) ??
372
- environments.SequenzyEnvironment.Default, `in-app/messages/${core.url.encodePathParam(messageId)}/events`),
373
- method: "POST",
519
+ environments.SequenzyEnvironment.Default, `in-app/campaigns/${core.url.encodePathParam(campaignId)}`),
520
+ method: "GET",
374
521
  headers: _headers,
375
- contentType: "application/json",
376
522
  queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
377
- requestType: "json",
378
- body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(serializers.RecordInAppEventRequest.jsonOrThrow(_body, {
379
- unrecognizedObjectKeys: "strip",
380
- omitUndefined: true,
381
- }), requestOptions?.additionalBodyParameters),
382
523
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
383
524
  maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
384
525
  abortSignal: requestOptions?.abortSignal,
@@ -387,7 +528,7 @@ class InAppClient {
387
528
  });
388
529
  if (_response.ok) {
389
530
  return {
390
- data: serializers.RecordInAppEventResponse.parseOrThrow(_response.body, {
531
+ data: serializers.GetInAppCampaignResponse.parseOrThrow(_response.body, {
391
532
  unrecognizedObjectKeys: "passthrough",
392
533
  allowUnrecognizedUnionMembers: true,
393
534
  allowUnrecognizedEnumValues: true,
@@ -399,16 +540,12 @@ class InAppClient {
399
540
  }
400
541
  if (_response.error.reason === "status-code") {
401
542
  switch (_response.error.statusCode) {
402
- case 400:
403
- throw new Sequenzy.BadRequestError(_response.error.body, _response.rawResponse);
404
543
  case 401:
405
544
  throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
406
545
  case 403:
407
546
  throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
408
547
  case 404:
409
548
  throw new Sequenzy.NotFoundError(_response.error.body, _response.rawResponse);
410
- case 422:
411
- throw new Sequenzy.UnprocessableEntityError(_response.error.body, _response.rawResponse);
412
549
  case 500:
413
550
  throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
414
551
  default:
@@ -419,7 +556,1082 @@ class InAppClient {
419
556
  });
420
557
  }
421
558
  }
422
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/in-app/messages/{messageId}/events");
559
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/in-app/campaigns/{campaignId}");
560
+ }
561
+ /**
562
+ * Returns reach and engagement for an in-app campaign, counted from the messages it delivered. Requires the campaigns:read scope.
563
+ *
564
+ * @param {Sequenzy.GetInAppCampaignStatsRequest} request
565
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
566
+ *
567
+ * @throws {@link Sequenzy.UnauthorizedError}
568
+ * @throws {@link Sequenzy.ForbiddenError}
569
+ * @throws {@link Sequenzy.NotFoundError}
570
+ * @throws {@link Sequenzy.InternalServerError}
571
+ * @throws {@link errors.SequenzyError}
572
+ * @throws {@link errors.SequenzyTimeoutError}
573
+ *
574
+ * @example
575
+ * await client.inApp.getInAppCampaignStats({
576
+ * campaignId: "campaignId"
577
+ * })
578
+ */
579
+ getInAppCampaignStats(request, requestOptions) {
580
+ return core.HttpResponsePromise.fromPromise(this.__getInAppCampaignStats(request, requestOptions));
581
+ }
582
+ async __getInAppCampaignStats(request, requestOptions) {
583
+ const { campaignId } = request;
584
+ const _authRequest = await this._options.authProvider.getAuthRequest();
585
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
586
+ const _response = await core.fetcher({
587
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
588
+ (await core.Supplier.get(this._options.environment)) ??
589
+ environments.SequenzyEnvironment.Default, `in-app/campaigns/${core.url.encodePathParam(campaignId)}/stats`),
590
+ method: "GET",
591
+ headers: _headers,
592
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
593
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
594
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
595
+ abortSignal: requestOptions?.abortSignal,
596
+ fetchFn: this._options?.fetch,
597
+ logging: this._options.logging,
598
+ });
599
+ if (_response.ok) {
600
+ return {
601
+ data: serializers.GetInAppCampaignStatsResponse.parseOrThrow(_response.body, {
602
+ unrecognizedObjectKeys: "passthrough",
603
+ allowUnrecognizedUnionMembers: true,
604
+ allowUnrecognizedEnumValues: true,
605
+ skipValidation: true,
606
+ breadcrumbsPrefix: ["response"],
607
+ }),
608
+ rawResponse: _response.rawResponse,
609
+ };
610
+ }
611
+ if (_response.error.reason === "status-code") {
612
+ switch (_response.error.statusCode) {
613
+ case 401:
614
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
615
+ case 403:
616
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
617
+ case 404:
618
+ throw new Sequenzy.NotFoundError(_response.error.body, _response.rawResponse);
619
+ case 500:
620
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
621
+ default:
622
+ throw new errors.SequenzyError({
623
+ statusCode: _response.error.statusCode,
624
+ body: _response.error.body,
625
+ rawResponse: _response.rawResponse,
626
+ });
627
+ }
628
+ }
629
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/in-app/campaigns/{campaignId}/stats");
630
+ }
631
+ /**
632
+ * One placement with its all-time item counts. Requires the sequences:read scope.
633
+ *
634
+ * @param {Sequenzy.GetInAppPlacementRequest} request
635
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
636
+ *
637
+ * @throws {@link Sequenzy.UnauthorizedError}
638
+ * @throws {@link Sequenzy.ForbiddenError}
639
+ * @throws {@link Sequenzy.NotFoundError}
640
+ * @throws {@link Sequenzy.InternalServerError}
641
+ * @throws {@link errors.SequenzyError}
642
+ * @throws {@link errors.SequenzyTimeoutError}
643
+ *
644
+ * @example
645
+ * await client.inApp.getInAppPlacement({
646
+ * key: "key"
647
+ * })
648
+ */
649
+ getInAppPlacement(request, requestOptions) {
650
+ return core.HttpResponsePromise.fromPromise(this.__getInAppPlacement(request, requestOptions));
651
+ }
652
+ async __getInAppPlacement(request, requestOptions) {
653
+ const { key } = request;
654
+ const _authRequest = await this._options.authProvider.getAuthRequest();
655
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
656
+ const _response = await core.fetcher({
657
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
658
+ (await core.Supplier.get(this._options.environment)) ??
659
+ environments.SequenzyEnvironment.Default, `in-app/placements/${core.url.encodePathParam(key)}`),
660
+ method: "GET",
661
+ headers: _headers,
662
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
663
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
664
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
665
+ abortSignal: requestOptions?.abortSignal,
666
+ fetchFn: this._options?.fetch,
667
+ logging: this._options.logging,
668
+ });
669
+ if (_response.ok) {
670
+ return {
671
+ data: serializers.GetInAppPlacementResponse.parseOrThrow(_response.body, {
672
+ unrecognizedObjectKeys: "passthrough",
673
+ allowUnrecognizedUnionMembers: true,
674
+ allowUnrecognizedEnumValues: true,
675
+ skipValidation: true,
676
+ breadcrumbsPrefix: ["response"],
677
+ }),
678
+ rawResponse: _response.rawResponse,
679
+ };
680
+ }
681
+ if (_response.error.reason === "status-code") {
682
+ switch (_response.error.statusCode) {
683
+ case 401:
684
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
685
+ case 403:
686
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
687
+ case 404:
688
+ throw new Sequenzy.NotFoundError(_response.error.body, _response.rawResponse);
689
+ case 500:
690
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
691
+ default:
692
+ throw new errors.SequenzyError({
693
+ statusCode: _response.error.statusCode,
694
+ body: _response.error.body,
695
+ rawResponse: _response.rawResponse,
696
+ });
697
+ }
698
+ }
699
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/in-app/placements/{key}");
700
+ }
701
+ /**
702
+ * What each requested placement shows one contact now: their highest-priority open placement item (ties go to the newest), or null so your app collapses the slot. Keys the workspace has not defined always return null. Reading marks nothing displayed. Identify the contact with email, externalId or subscriberId. Requires the subscribers:read scope.
703
+ *
704
+ * @param {Sequenzy.GetInAppPlacementContentRequest} request
705
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
706
+ *
707
+ * @throws {@link Sequenzy.BadRequestError}
708
+ * @throws {@link Sequenzy.UnauthorizedError}
709
+ * @throws {@link Sequenzy.ForbiddenError}
710
+ * @throws {@link Sequenzy.NotFoundError}
711
+ * @throws {@link Sequenzy.InternalServerError}
712
+ * @throws {@link errors.SequenzyError}
713
+ * @throws {@link errors.SequenzyTimeoutError}
714
+ *
715
+ * @example
716
+ * await client.inApp.getInAppPlacementContent({
717
+ * placements: "home_hero,checkout_upsell"
718
+ * })
719
+ */
720
+ getInAppPlacementContent(request, requestOptions) {
721
+ return core.HttpResponsePromise.fromPromise(this.__getInAppPlacementContent(request, requestOptions));
722
+ }
723
+ async __getInAppPlacementContent(request, requestOptions) {
724
+ const { actions, email, externalId, placements, subscriberId } = request;
725
+ const _queryParams = {
726
+ actions,
727
+ email,
728
+ externalId,
729
+ placements,
730
+ subscriberId,
731
+ };
732
+ const _authRequest = await this._options.authProvider.getAuthRequest();
733
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
734
+ const _response = await core.fetcher({
735
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
736
+ (await core.Supplier.get(this._options.environment)) ??
737
+ environments.SequenzyEnvironment.Default, "in-app/placement-feed"),
738
+ method: "GET",
739
+ headers: _headers,
740
+ queryString: core.url
741
+ .queryBuilder()
742
+ .addMany(_queryParams)
743
+ .mergeAdditional(requestOptions?.queryParams)
744
+ .build(),
745
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
746
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
747
+ abortSignal: requestOptions?.abortSignal,
748
+ fetchFn: this._options?.fetch,
749
+ logging: this._options.logging,
750
+ });
751
+ if (_response.ok) {
752
+ return {
753
+ data: serializers.GetInAppPlacementContentResponse.parseOrThrow(_response.body, {
754
+ unrecognizedObjectKeys: "passthrough",
755
+ allowUnrecognizedUnionMembers: true,
756
+ allowUnrecognizedEnumValues: true,
757
+ skipValidation: true,
758
+ breadcrumbsPrefix: ["response"],
759
+ }),
760
+ rawResponse: _response.rawResponse,
761
+ };
762
+ }
763
+ if (_response.error.reason === "status-code") {
764
+ switch (_response.error.statusCode) {
765
+ case 400:
766
+ throw new Sequenzy.BadRequestError(_response.error.body, _response.rawResponse);
767
+ case 401:
768
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
769
+ case 403:
770
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
771
+ case 404:
772
+ throw new Sequenzy.NotFoundError(_response.error.body, _response.rawResponse);
773
+ case 500:
774
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
775
+ default:
776
+ throw new errors.SequenzyError({
777
+ statusCode: _response.error.statusCode,
778
+ body: _response.error.body,
779
+ rawResponse: _response.rawResponse,
780
+ });
781
+ }
782
+ }
783
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/in-app/placement-feed");
784
+ }
785
+ /**
786
+ * Created, displayed, clicked and dismissed counts for one in_app sequence step, plus push primer permission results. Requires the sequences:read scope.
787
+ *
788
+ * @param {Sequenzy.GetInAppStepStatsRequest} request
789
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
790
+ *
791
+ * @throws {@link Sequenzy.UnauthorizedError}
792
+ * @throws {@link Sequenzy.ForbiddenError}
793
+ * @throws {@link Sequenzy.NotFoundError}
794
+ * @throws {@link Sequenzy.InternalServerError}
795
+ * @throws {@link errors.SequenzyError}
796
+ * @throws {@link errors.SequenzyTimeoutError}
797
+ *
798
+ * @example
799
+ * await client.inApp.getInAppStepStats({
800
+ * stepId: "stepId"
801
+ * })
802
+ */
803
+ getInAppStepStats(request, requestOptions) {
804
+ return core.HttpResponsePromise.fromPromise(this.__getInAppStepStats(request, requestOptions));
805
+ }
806
+ async __getInAppStepStats(request, requestOptions) {
807
+ const { stepId } = request;
808
+ const _authRequest = await this._options.authProvider.getAuthRequest();
809
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
810
+ const _response = await core.fetcher({
811
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
812
+ (await core.Supplier.get(this._options.environment)) ??
813
+ environments.SequenzyEnvironment.Default, `in-app/steps/${core.url.encodePathParam(stepId)}/stats`),
814
+ method: "GET",
815
+ headers: _headers,
816
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
817
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
818
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
819
+ abortSignal: requestOptions?.abortSignal,
820
+ fetchFn: this._options?.fetch,
821
+ logging: this._options.logging,
822
+ });
823
+ if (_response.ok) {
824
+ return {
825
+ data: serializers.GetInAppStepStatsResponse.parseOrThrow(_response.body, {
826
+ unrecognizedObjectKeys: "passthrough",
827
+ allowUnrecognizedUnionMembers: true,
828
+ allowUnrecognizedEnumValues: true,
829
+ skipValidation: true,
830
+ breadcrumbsPrefix: ["response"],
831
+ }),
832
+ rawResponse: _response.rawResponse,
833
+ };
834
+ }
835
+ if (_response.error.reason === "status-code") {
836
+ switch (_response.error.statusCode) {
837
+ case 401:
838
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
839
+ case 403:
840
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
841
+ case 404:
842
+ throw new Sequenzy.NotFoundError(_response.error.body, _response.rawResponse);
843
+ case 500:
844
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
845
+ default:
846
+ throw new errors.SequenzyError({
847
+ statusCode: _response.error.statusCode,
848
+ body: _response.error.body,
849
+ rawResponse: _response.rawResponse,
850
+ });
851
+ }
852
+ }
853
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/in-app/steps/{stepId}/stats");
854
+ }
855
+ /**
856
+ * Lists in-app campaigns, newest first. Each carries its stored status and a state (draft, scheduled, live, ended, stopped). In-app campaigns also appear in GET /campaigns with type in_app. Requires the campaigns:read scope.
857
+ *
858
+ * @param {Sequenzy.ListInAppCampaignsRequest} request
859
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
860
+ *
861
+ * @throws {@link Sequenzy.BadRequestError}
862
+ * @throws {@link Sequenzy.UnauthorizedError}
863
+ * @throws {@link Sequenzy.ForbiddenError}
864
+ * @throws {@link Sequenzy.InternalServerError}
865
+ * @throws {@link errors.SequenzyError}
866
+ * @throws {@link errors.SequenzyTimeoutError}
867
+ *
868
+ * @example
869
+ * await client.inApp.listInAppCampaigns()
870
+ */
871
+ listInAppCampaigns(request = {}, requestOptions) {
872
+ return core.HttpResponsePromise.fromPromise(this.__listInAppCampaigns(request, requestOptions));
873
+ }
874
+ async __listInAppCampaigns(request = {}, requestOptions) {
875
+ const { limit, offset, status } = request;
876
+ const _queryParams = {
877
+ limit,
878
+ offset,
879
+ status: status != null
880
+ ? serializers.ListInAppCampaignsRequestStatus.jsonOrThrow(status, {
881
+ unrecognizedObjectKeys: "strip",
882
+ omitUndefined: true,
883
+ })
884
+ : undefined,
885
+ };
886
+ const _authRequest = await this._options.authProvider.getAuthRequest();
887
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
888
+ const _response = await core.fetcher({
889
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
890
+ (await core.Supplier.get(this._options.environment)) ??
891
+ environments.SequenzyEnvironment.Default, "in-app/campaigns"),
892
+ method: "GET",
893
+ headers: _headers,
894
+ queryString: core.url
895
+ .queryBuilder()
896
+ .addMany(_queryParams)
897
+ .mergeAdditional(requestOptions?.queryParams)
898
+ .build(),
899
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
900
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
901
+ abortSignal: requestOptions?.abortSignal,
902
+ fetchFn: this._options?.fetch,
903
+ logging: this._options.logging,
904
+ });
905
+ if (_response.ok) {
906
+ return {
907
+ data: serializers.ListInAppCampaignsResponse.parseOrThrow(_response.body, {
908
+ unrecognizedObjectKeys: "passthrough",
909
+ allowUnrecognizedUnionMembers: true,
910
+ allowUnrecognizedEnumValues: true,
911
+ skipValidation: true,
912
+ breadcrumbsPrefix: ["response"],
913
+ }),
914
+ rawResponse: _response.rawResponse,
915
+ };
916
+ }
917
+ if (_response.error.reason === "status-code") {
918
+ switch (_response.error.statusCode) {
919
+ case 400:
920
+ throw new Sequenzy.BadRequestError(_response.error.body, _response.rawResponse);
921
+ case 401:
922
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
923
+ case 403:
924
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
925
+ case 500:
926
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
927
+ default:
928
+ throw new errors.SequenzyError({
929
+ statusCode: _response.error.statusCode,
930
+ body: _response.error.body,
931
+ rawResponse: _response.rawResponse,
932
+ });
933
+ }
934
+ }
935
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/in-app/campaigns");
936
+ }
937
+ /**
938
+ * Lists a contact's in-app messages and content cards, created by in_app sequence steps and in-app campaigns. With status open (default) it first delivers live in-app campaigns the contact qualifies for, as the app's own feed does, then returns what the app should show now: messages not yet displayed, clicked or dismissed, and cards not dismissed, excluding expired items, messages first, then higher campaign priority, then pinned cards, then newest. With status all it returns history, newest first. Identify the contact with email, externalId or subscriberId. Requires the subscribers:read scope.
939
+ *
940
+ * @param {Sequenzy.ListInAppMessagesRequest} request
941
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
942
+ *
943
+ * @throws {@link Sequenzy.BadRequestError}
944
+ * @throws {@link Sequenzy.UnauthorizedError}
945
+ * @throws {@link Sequenzy.ForbiddenError}
946
+ * @throws {@link Sequenzy.NotFoundError}
947
+ * @throws {@link Sequenzy.InternalServerError}
948
+ * @throws {@link errors.SequenzyError}
949
+ * @throws {@link errors.SequenzyTimeoutError}
950
+ *
951
+ * @example
952
+ * await client.inApp.listInAppMessages({
953
+ * actions: "request_push_permission"
954
+ * })
955
+ */
956
+ listInAppMessages(request = {}, requestOptions) {
957
+ return core.HttpResponsePromise.fromPromise(this.__listInAppMessages(request, requestOptions));
958
+ }
959
+ async __listInAppMessages(request = {}, requestOptions) {
960
+ const { actions, deliver, email, externalId, formats, kind, limit, status, subscriberId } = request;
961
+ const _queryParams = {
962
+ actions,
963
+ deliver: deliver != null
964
+ ? serializers.ListInAppMessagesRequestDeliver.jsonOrThrow(deliver, {
965
+ unrecognizedObjectKeys: "strip",
966
+ omitUndefined: true,
967
+ })
968
+ : undefined,
969
+ email,
970
+ externalId,
971
+ formats,
972
+ kind: kind != null
973
+ ? serializers.ListInAppMessagesRequestKind.jsonOrThrow(kind, {
974
+ unrecognizedObjectKeys: "strip",
975
+ omitUndefined: true,
976
+ })
977
+ : undefined,
978
+ limit,
979
+ status: status != null
980
+ ? serializers.ListInAppMessagesRequestStatus.jsonOrThrow(status, {
981
+ unrecognizedObjectKeys: "strip",
982
+ omitUndefined: true,
983
+ })
984
+ : undefined,
985
+ subscriberId,
986
+ };
987
+ const _authRequest = await this._options.authProvider.getAuthRequest();
988
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
989
+ const _response = await core.fetcher({
990
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
991
+ (await core.Supplier.get(this._options.environment)) ??
992
+ environments.SequenzyEnvironment.Default, "in-app/messages"),
993
+ method: "GET",
994
+ headers: _headers,
995
+ queryString: core.url
996
+ .queryBuilder()
997
+ .addMany(_queryParams)
998
+ .mergeAdditional(requestOptions?.queryParams)
999
+ .build(),
1000
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1001
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1002
+ abortSignal: requestOptions?.abortSignal,
1003
+ fetchFn: this._options?.fetch,
1004
+ logging: this._options.logging,
1005
+ });
1006
+ if (_response.ok) {
1007
+ return {
1008
+ data: serializers.ListInAppMessagesResponse.parseOrThrow(_response.body, {
1009
+ unrecognizedObjectKeys: "passthrough",
1010
+ allowUnrecognizedUnionMembers: true,
1011
+ allowUnrecognizedEnumValues: true,
1012
+ skipValidation: true,
1013
+ breadcrumbsPrefix: ["response"],
1014
+ }),
1015
+ rawResponse: _response.rawResponse,
1016
+ };
1017
+ }
1018
+ if (_response.error.reason === "status-code") {
1019
+ switch (_response.error.statusCode) {
1020
+ case 400:
1021
+ throw new Sequenzy.BadRequestError(_response.error.body, _response.rawResponse);
1022
+ case 401:
1023
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
1024
+ case 403:
1025
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
1026
+ case 404:
1027
+ throw new Sequenzy.NotFoundError(_response.error.body, _response.rawResponse);
1028
+ case 500:
1029
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
1030
+ default:
1031
+ throw new errors.SequenzyError({
1032
+ statusCode: _response.error.statusCode,
1033
+ body: _response.error.body,
1034
+ rawResponse: _response.rawResponse,
1035
+ });
1036
+ }
1037
+ }
1038
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/in-app/messages");
1039
+ }
1040
+ /**
1041
+ * Lists the workspace's placements, sorted by name, each with all-time item counts. Requires the sequences:read scope.
1042
+ *
1043
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
1044
+ *
1045
+ * @throws {@link Sequenzy.UnauthorizedError}
1046
+ * @throws {@link Sequenzy.ForbiddenError}
1047
+ * @throws {@link Sequenzy.InternalServerError}
1048
+ * @throws {@link errors.SequenzyError}
1049
+ * @throws {@link errors.SequenzyTimeoutError}
1050
+ *
1051
+ * @example
1052
+ * await client.inApp.listInAppPlacements()
1053
+ */
1054
+ listInAppPlacements(requestOptions) {
1055
+ return core.HttpResponsePromise.fromPromise(this.__listInAppPlacements(requestOptions));
1056
+ }
1057
+ async __listInAppPlacements(requestOptions) {
1058
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1059
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1060
+ const _response = await core.fetcher({
1061
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1062
+ (await core.Supplier.get(this._options.environment)) ??
1063
+ environments.SequenzyEnvironment.Default, "in-app/placements"),
1064
+ method: "GET",
1065
+ headers: _headers,
1066
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1067
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1068
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1069
+ abortSignal: requestOptions?.abortSignal,
1070
+ fetchFn: this._options?.fetch,
1071
+ logging: this._options.logging,
1072
+ });
1073
+ if (_response.ok) {
1074
+ return {
1075
+ data: serializers.ListInAppPlacementsResponse.parseOrThrow(_response.body, {
1076
+ unrecognizedObjectKeys: "passthrough",
1077
+ allowUnrecognizedUnionMembers: true,
1078
+ allowUnrecognizedEnumValues: true,
1079
+ skipValidation: true,
1080
+ breadcrumbsPrefix: ["response"],
1081
+ }),
1082
+ rawResponse: _response.rawResponse,
1083
+ };
1084
+ }
1085
+ if (_response.error.reason === "status-code") {
1086
+ switch (_response.error.statusCode) {
1087
+ case 401:
1088
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
1089
+ case 403:
1090
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
1091
+ case 500:
1092
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
1093
+ default:
1094
+ throw new errors.SequenzyError({
1095
+ statusCode: _response.error.statusCode,
1096
+ body: _response.error.body,
1097
+ rawResponse: _response.rawResponse,
1098
+ });
1099
+ }
1100
+ }
1101
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/in-app/placements");
1102
+ }
1103
+ /**
1104
+ * Built-in starting points for in_app sequence steps. Each config is a complete step without a label; link buttons have no url until you add one. Requires the sequences:read scope.
1105
+ *
1106
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
1107
+ *
1108
+ * @throws {@link Sequenzy.UnauthorizedError}
1109
+ * @throws {@link Sequenzy.ForbiddenError}
1110
+ * @throws {@link errors.SequenzyError}
1111
+ * @throws {@link errors.SequenzyTimeoutError}
1112
+ *
1113
+ * @example
1114
+ * await client.inApp.listInAppTemplates()
1115
+ */
1116
+ listInAppTemplates(requestOptions) {
1117
+ return core.HttpResponsePromise.fromPromise(this.__listInAppTemplates(requestOptions));
1118
+ }
1119
+ async __listInAppTemplates(requestOptions) {
1120
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1121
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1122
+ const _response = await core.fetcher({
1123
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1124
+ (await core.Supplier.get(this._options.environment)) ??
1125
+ environments.SequenzyEnvironment.Default, "in-app/templates"),
1126
+ method: "GET",
1127
+ headers: _headers,
1128
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1129
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1130
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1131
+ abortSignal: requestOptions?.abortSignal,
1132
+ fetchFn: this._options?.fetch,
1133
+ logging: this._options.logging,
1134
+ });
1135
+ if (_response.ok) {
1136
+ return {
1137
+ data: serializers.ListInAppTemplatesResponse.parseOrThrow(_response.body, {
1138
+ unrecognizedObjectKeys: "passthrough",
1139
+ allowUnrecognizedUnionMembers: true,
1140
+ allowUnrecognizedEnumValues: true,
1141
+ skipValidation: true,
1142
+ breadcrumbsPrefix: ["response"],
1143
+ }),
1144
+ rawResponse: _response.rawResponse,
1145
+ };
1146
+ }
1147
+ if (_response.error.reason === "status-code") {
1148
+ switch (_response.error.statusCode) {
1149
+ case 401:
1150
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
1151
+ case 403:
1152
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
1153
+ default:
1154
+ throw new errors.SequenzyError({
1155
+ statusCode: _response.error.statusCode,
1156
+ body: _response.error.body,
1157
+ rawResponse: _response.rawResponse,
1158
+ });
1159
+ }
1160
+ }
1161
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/in-app/templates");
1162
+ }
1163
+ /**
1164
+ * Records that the app displayed, clicked, dismissed or read an item. The first report of each type sets its timestamp; repeats change nothing except clickCount, and recorded is false. Clicks, dismissals and reads also mark the item displayed. Messages leave the open feed once displayed, clicked or dismissed; cards once dismissed. Requires the subscribers:write scope.
1165
+ *
1166
+ * @param {Sequenzy.RecordInAppEventRequest} request
1167
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
1168
+ *
1169
+ * @throws {@link Sequenzy.BadRequestError}
1170
+ * @throws {@link Sequenzy.UnauthorizedError}
1171
+ * @throws {@link Sequenzy.ForbiddenError}
1172
+ * @throws {@link Sequenzy.NotFoundError}
1173
+ * @throws {@link Sequenzy.UnprocessableEntityError}
1174
+ * @throws {@link Sequenzy.InternalServerError}
1175
+ * @throws {@link errors.SequenzyError}
1176
+ * @throws {@link errors.SequenzyTimeoutError}
1177
+ *
1178
+ * @example
1179
+ * await client.inApp.recordInAppEvent({
1180
+ * messageId: "messageId",
1181
+ * type: "displayed"
1182
+ * })
1183
+ */
1184
+ recordInAppEvent(request, requestOptions) {
1185
+ return core.HttpResponsePromise.fromPromise(this.__recordInAppEvent(request, requestOptions));
1186
+ }
1187
+ async __recordInAppEvent(request, requestOptions) {
1188
+ const { messageId, ..._body } = request;
1189
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1190
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1191
+ const _response = await core.fetcher({
1192
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1193
+ (await core.Supplier.get(this._options.environment)) ??
1194
+ environments.SequenzyEnvironment.Default, `in-app/messages/${core.url.encodePathParam(messageId)}/events`),
1195
+ method: "POST",
1196
+ headers: _headers,
1197
+ contentType: "application/json",
1198
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1199
+ requestType: "json",
1200
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(serializers.RecordInAppEventRequest.jsonOrThrow(_body, {
1201
+ unrecognizedObjectKeys: "strip",
1202
+ omitUndefined: true,
1203
+ }), requestOptions?.additionalBodyParameters),
1204
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1205
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1206
+ abortSignal: requestOptions?.abortSignal,
1207
+ fetchFn: this._options?.fetch,
1208
+ logging: this._options.logging,
1209
+ });
1210
+ if (_response.ok) {
1211
+ return {
1212
+ data: serializers.RecordInAppEventResponse.parseOrThrow(_response.body, {
1213
+ unrecognizedObjectKeys: "passthrough",
1214
+ allowUnrecognizedUnionMembers: true,
1215
+ allowUnrecognizedEnumValues: true,
1216
+ skipValidation: true,
1217
+ breadcrumbsPrefix: ["response"],
1218
+ }),
1219
+ rawResponse: _response.rawResponse,
1220
+ };
1221
+ }
1222
+ if (_response.error.reason === "status-code") {
1223
+ switch (_response.error.statusCode) {
1224
+ case 400:
1225
+ throw new Sequenzy.BadRequestError(_response.error.body, _response.rawResponse);
1226
+ case 401:
1227
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
1228
+ case 403:
1229
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
1230
+ case 404:
1231
+ throw new Sequenzy.NotFoundError(_response.error.body, _response.rawResponse);
1232
+ case 422:
1233
+ throw new Sequenzy.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1234
+ case 500:
1235
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
1236
+ default:
1237
+ throw new errors.SequenzyError({
1238
+ statusCode: _response.error.statusCode,
1239
+ body: _response.error.body,
1240
+ rawResponse: _response.rawResponse,
1241
+ });
1242
+ }
1243
+ }
1244
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/in-app/messages/{messageId}/events");
1245
+ }
1246
+ /**
1247
+ * Launches a draft or scheduled in-app campaign now, or schedules it when scheduledAt is a future ISO 8601 time. Launching writes nothing per contact. While the campaign is live, each contact in the audience gets the message the first time their app fetches its feed (SDK feed, browser feed or GET /in-app/messages), including contacts who join the audience later or open the app days later. Callers that cannot render the message's format or button actions do not use it up. Requires a message, an audience and an end time after the start. Requires the campaigns:send scope.
1248
+ *
1249
+ * @param {Sequenzy.SendInAppCampaignRequest} request
1250
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
1251
+ *
1252
+ * @throws {@link Sequenzy.BadRequestError}
1253
+ * @throws {@link Sequenzy.UnauthorizedError}
1254
+ * @throws {@link Sequenzy.ForbiddenError}
1255
+ * @throws {@link Sequenzy.NotFoundError}
1256
+ * @throws {@link Sequenzy.ConflictError}
1257
+ * @throws {@link Sequenzy.InternalServerError}
1258
+ * @throws {@link errors.SequenzyError}
1259
+ * @throws {@link errors.SequenzyTimeoutError}
1260
+ *
1261
+ * @example
1262
+ * await client.inApp.sendInAppCampaign({
1263
+ * campaignId: "campaignId"
1264
+ * })
1265
+ */
1266
+ sendInAppCampaign(request, requestOptions) {
1267
+ return core.HttpResponsePromise.fromPromise(this.__sendInAppCampaign(request, requestOptions));
1268
+ }
1269
+ async __sendInAppCampaign(request, requestOptions) {
1270
+ const { campaignId, ..._body } = request;
1271
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1272
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1273
+ const _response = await core.fetcher({
1274
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1275
+ (await core.Supplier.get(this._options.environment)) ??
1276
+ environments.SequenzyEnvironment.Default, `in-app/campaigns/${core.url.encodePathParam(campaignId)}/send`),
1277
+ method: "POST",
1278
+ headers: _headers,
1279
+ contentType: "application/json",
1280
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1281
+ requestType: "json",
1282
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(serializers.SendInAppCampaignRequest.jsonOrThrow(_body, {
1283
+ unrecognizedObjectKeys: "strip",
1284
+ omitUndefined: true,
1285
+ }), requestOptions?.additionalBodyParameters),
1286
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1287
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1288
+ abortSignal: requestOptions?.abortSignal,
1289
+ fetchFn: this._options?.fetch,
1290
+ logging: this._options.logging,
1291
+ });
1292
+ if (_response.ok) {
1293
+ return {
1294
+ data: serializers.SendInAppCampaignResponse.parseOrThrow(_response.body, {
1295
+ unrecognizedObjectKeys: "passthrough",
1296
+ allowUnrecognizedUnionMembers: true,
1297
+ allowUnrecognizedEnumValues: true,
1298
+ skipValidation: true,
1299
+ breadcrumbsPrefix: ["response"],
1300
+ }),
1301
+ rawResponse: _response.rawResponse,
1302
+ };
1303
+ }
1304
+ if (_response.error.reason === "status-code") {
1305
+ switch (_response.error.statusCode) {
1306
+ case 400:
1307
+ throw new Sequenzy.BadRequestError(_response.error.body, _response.rawResponse);
1308
+ case 401:
1309
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
1310
+ case 403:
1311
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
1312
+ case 404:
1313
+ throw new Sequenzy.NotFoundError(_response.error.body, _response.rawResponse);
1314
+ case 409:
1315
+ throw new Sequenzy.ConflictError(_response.error.body, _response.rawResponse);
1316
+ case 500:
1317
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
1318
+ default:
1319
+ throw new errors.SequenzyError({
1320
+ statusCode: _response.error.statusCode,
1321
+ body: _response.error.body,
1322
+ rawResponse: _response.rawResponse,
1323
+ });
1324
+ }
1325
+ }
1326
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/in-app/campaigns/{campaignId}/send");
1327
+ }
1328
+ /**
1329
+ * Stops a scheduled or live in-app campaign. Nobody new gets it, and it leaves every feed that still has it, including cards contacts have seen but not dismissed. Stats are kept. Stopping is final; duplicate the campaign to run it again. Stopping a stopped campaign succeeds and ends its items again; a campaign past its end time has already ended (409). POST /campaigns/{campaignId}/cancel does the same for in-app campaigns. Requires the campaigns:send scope.
1330
+ *
1331
+ * @param {Sequenzy.StopInAppCampaignRequest} request
1332
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
1333
+ *
1334
+ * @throws {@link Sequenzy.UnauthorizedError}
1335
+ * @throws {@link Sequenzy.ForbiddenError}
1336
+ * @throws {@link Sequenzy.NotFoundError}
1337
+ * @throws {@link Sequenzy.ConflictError}
1338
+ * @throws {@link Sequenzy.InternalServerError}
1339
+ * @throws {@link errors.SequenzyError}
1340
+ * @throws {@link errors.SequenzyTimeoutError}
1341
+ *
1342
+ * @example
1343
+ * await client.inApp.stopInAppCampaign({
1344
+ * campaignId: "campaignId"
1345
+ * })
1346
+ */
1347
+ stopInAppCampaign(request, requestOptions) {
1348
+ return core.HttpResponsePromise.fromPromise(this.__stopInAppCampaign(request, requestOptions));
1349
+ }
1350
+ async __stopInAppCampaign(request, requestOptions) {
1351
+ const { campaignId } = request;
1352
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1353
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1354
+ const _response = await core.fetcher({
1355
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1356
+ (await core.Supplier.get(this._options.environment)) ??
1357
+ environments.SequenzyEnvironment.Default, `in-app/campaigns/${core.url.encodePathParam(campaignId)}/stop`),
1358
+ method: "POST",
1359
+ headers: _headers,
1360
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1361
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1362
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1363
+ abortSignal: requestOptions?.abortSignal,
1364
+ fetchFn: this._options?.fetch,
1365
+ logging: this._options.logging,
1366
+ });
1367
+ if (_response.ok) {
1368
+ return {
1369
+ data: serializers.StopInAppCampaignResponse.parseOrThrow(_response.body, {
1370
+ unrecognizedObjectKeys: "passthrough",
1371
+ allowUnrecognizedUnionMembers: true,
1372
+ allowUnrecognizedEnumValues: true,
1373
+ skipValidation: true,
1374
+ breadcrumbsPrefix: ["response"],
1375
+ }),
1376
+ rawResponse: _response.rawResponse,
1377
+ };
1378
+ }
1379
+ if (_response.error.reason === "status-code") {
1380
+ switch (_response.error.statusCode) {
1381
+ case 401:
1382
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
1383
+ case 403:
1384
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
1385
+ case 404:
1386
+ throw new Sequenzy.NotFoundError(_response.error.body, _response.rawResponse);
1387
+ case 409:
1388
+ throw new Sequenzy.ConflictError(_response.error.body, _response.rawResponse);
1389
+ case 500:
1390
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
1391
+ default:
1392
+ throw new errors.SequenzyError({
1393
+ statusCode: _response.error.statusCode,
1394
+ body: _response.error.body,
1395
+ rawResponse: _response.rawResponse,
1396
+ });
1397
+ }
1398
+ }
1399
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/in-app/campaigns/{campaignId}/stop");
1400
+ }
1401
+ /**
1402
+ * Moves a scheduled in-app campaign back to draft. Requires the campaigns:send scope.
1403
+ *
1404
+ * @param {Sequenzy.UnscheduleInAppCampaignRequest} request
1405
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
1406
+ *
1407
+ * @throws {@link Sequenzy.UnauthorizedError}
1408
+ * @throws {@link Sequenzy.ForbiddenError}
1409
+ * @throws {@link Sequenzy.NotFoundError}
1410
+ * @throws {@link Sequenzy.ConflictError}
1411
+ * @throws {@link Sequenzy.InternalServerError}
1412
+ * @throws {@link errors.SequenzyError}
1413
+ * @throws {@link errors.SequenzyTimeoutError}
1414
+ *
1415
+ * @example
1416
+ * await client.inApp.unscheduleInAppCampaign({
1417
+ * campaignId: "campaignId"
1418
+ * })
1419
+ */
1420
+ unscheduleInAppCampaign(request, requestOptions) {
1421
+ return core.HttpResponsePromise.fromPromise(this.__unscheduleInAppCampaign(request, requestOptions));
1422
+ }
1423
+ async __unscheduleInAppCampaign(request, requestOptions) {
1424
+ const { campaignId } = request;
1425
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1426
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1427
+ const _response = await core.fetcher({
1428
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1429
+ (await core.Supplier.get(this._options.environment)) ??
1430
+ environments.SequenzyEnvironment.Default, `in-app/campaigns/${core.url.encodePathParam(campaignId)}/unschedule`),
1431
+ method: "POST",
1432
+ headers: _headers,
1433
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1434
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1435
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1436
+ abortSignal: requestOptions?.abortSignal,
1437
+ fetchFn: this._options?.fetch,
1438
+ logging: this._options.logging,
1439
+ });
1440
+ if (_response.ok) {
1441
+ return {
1442
+ data: serializers.UnscheduleInAppCampaignResponse.parseOrThrow(_response.body, {
1443
+ unrecognizedObjectKeys: "passthrough",
1444
+ allowUnrecognizedUnionMembers: true,
1445
+ allowUnrecognizedEnumValues: true,
1446
+ skipValidation: true,
1447
+ breadcrumbsPrefix: ["response"],
1448
+ }),
1449
+ rawResponse: _response.rawResponse,
1450
+ };
1451
+ }
1452
+ if (_response.error.reason === "status-code") {
1453
+ switch (_response.error.statusCode) {
1454
+ case 401:
1455
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
1456
+ case 403:
1457
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
1458
+ case 404:
1459
+ throw new Sequenzy.NotFoundError(_response.error.body, _response.rawResponse);
1460
+ case 409:
1461
+ throw new Sequenzy.ConflictError(_response.error.body, _response.rawResponse);
1462
+ case 500:
1463
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
1464
+ default:
1465
+ throw new errors.SequenzyError({
1466
+ statusCode: _response.error.statusCode,
1467
+ body: _response.error.body,
1468
+ rawResponse: _response.rawResponse,
1469
+ });
1470
+ }
1471
+ }
1472
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/in-app/campaigns/{campaignId}/unschedule");
1473
+ }
1474
+ /**
1475
+ * Updates a draft or scheduled in-app campaign. Only the fields you pass change; message fields are merged over the stored message. Clear imageUrl, position, imagePlacement, expiresAfterDays, style, html or showCloseButton with null, eyebrow with "", buttons with [] and data with {}. A scheduled campaign must stay launchable. Live, ended and stopped campaigns cannot be edited; stop and duplicate them instead. Requires the campaigns:write scope.
1476
+ *
1477
+ * @param {Sequenzy.UpdateInAppCampaignRequest} request
1478
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
1479
+ *
1480
+ * @throws {@link Sequenzy.BadRequestError}
1481
+ * @throws {@link Sequenzy.UnauthorizedError}
1482
+ * @throws {@link Sequenzy.ForbiddenError}
1483
+ * @throws {@link Sequenzy.NotFoundError}
1484
+ * @throws {@link Sequenzy.ConflictError}
1485
+ * @throws {@link Sequenzy.InternalServerError}
1486
+ * @throws {@link errors.SequenzyError}
1487
+ * @throws {@link errors.SequenzyTimeoutError}
1488
+ *
1489
+ * @example
1490
+ * await client.inApp.updateInAppCampaign({
1491
+ * campaignId: "campaignId"
1492
+ * })
1493
+ */
1494
+ updateInAppCampaign(request, requestOptions) {
1495
+ return core.HttpResponsePromise.fromPromise(this.__updateInAppCampaign(request, requestOptions));
1496
+ }
1497
+ async __updateInAppCampaign(request, requestOptions) {
1498
+ const { campaignId, ..._body } = request;
1499
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1500
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1501
+ const _response = await core.fetcher({
1502
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1503
+ (await core.Supplier.get(this._options.environment)) ??
1504
+ environments.SequenzyEnvironment.Default, `in-app/campaigns/${core.url.encodePathParam(campaignId)}`),
1505
+ method: "PATCH",
1506
+ headers: _headers,
1507
+ contentType: "application/json",
1508
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1509
+ requestType: "json",
1510
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(serializers.UpdateInAppCampaignRequest.jsonOrThrow(_body, {
1511
+ unrecognizedObjectKeys: "strip",
1512
+ omitUndefined: true,
1513
+ }), requestOptions?.additionalBodyParameters),
1514
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1515
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1516
+ abortSignal: requestOptions?.abortSignal,
1517
+ fetchFn: this._options?.fetch,
1518
+ logging: this._options.logging,
1519
+ });
1520
+ if (_response.ok) {
1521
+ return {
1522
+ data: serializers.UpdateInAppCampaignResponse.parseOrThrow(_response.body, {
1523
+ unrecognizedObjectKeys: "passthrough",
1524
+ allowUnrecognizedUnionMembers: true,
1525
+ allowUnrecognizedEnumValues: true,
1526
+ skipValidation: true,
1527
+ breadcrumbsPrefix: ["response"],
1528
+ }),
1529
+ rawResponse: _response.rawResponse,
1530
+ };
1531
+ }
1532
+ if (_response.error.reason === "status-code") {
1533
+ switch (_response.error.statusCode) {
1534
+ case 400:
1535
+ throw new Sequenzy.BadRequestError(_response.error.body, _response.rawResponse);
1536
+ case 401:
1537
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
1538
+ case 403:
1539
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
1540
+ case 404:
1541
+ throw new Sequenzy.NotFoundError(_response.error.body, _response.rawResponse);
1542
+ case 409:
1543
+ throw new Sequenzy.ConflictError(_response.error.body, _response.rawResponse);
1544
+ case 500:
1545
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
1546
+ default:
1547
+ throw new errors.SequenzyError({
1548
+ statusCode: _response.error.statusCode,
1549
+ body: _response.error.body,
1550
+ rawResponse: _response.rawResponse,
1551
+ });
1552
+ }
1553
+ }
1554
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/in-app/campaigns/{campaignId}");
1555
+ }
1556
+ /**
1557
+ * Changes a placement's name, description or size hints; null clears a size hint. The key cannot change. Requires the sequences:write scope.
1558
+ *
1559
+ * @param {Sequenzy.UpdateInAppPlacementRequest} request
1560
+ * @param {InAppClient.RequestOptions} requestOptions - Request-specific configuration.
1561
+ *
1562
+ * @throws {@link Sequenzy.BadRequestError}
1563
+ * @throws {@link Sequenzy.UnauthorizedError}
1564
+ * @throws {@link Sequenzy.ForbiddenError}
1565
+ * @throws {@link Sequenzy.NotFoundError}
1566
+ * @throws {@link Sequenzy.InternalServerError}
1567
+ * @throws {@link errors.SequenzyError}
1568
+ * @throws {@link errors.SequenzyTimeoutError}
1569
+ *
1570
+ * @example
1571
+ * await client.inApp.updateInAppPlacement({
1572
+ * key: "key",
1573
+ * body: {}
1574
+ * })
1575
+ */
1576
+ updateInAppPlacement(request, requestOptions) {
1577
+ return core.HttpResponsePromise.fromPromise(this.__updateInAppPlacement(request, requestOptions));
1578
+ }
1579
+ async __updateInAppPlacement(request, requestOptions) {
1580
+ const { key, body: _body } = request;
1581
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1582
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1583
+ const _response = await core.fetcher({
1584
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1585
+ (await core.Supplier.get(this._options.environment)) ??
1586
+ environments.SequenzyEnvironment.Default, `in-app/placements/${core.url.encodePathParam(key)}`),
1587
+ method: "PATCH",
1588
+ headers: _headers,
1589
+ contentType: "application/json",
1590
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1591
+ requestType: "json",
1592
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(serializers.InAppPlacementInput.jsonOrThrow(_body, {
1593
+ unrecognizedObjectKeys: "strip",
1594
+ omitUndefined: true,
1595
+ }), requestOptions?.additionalBodyParameters),
1596
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1597
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1598
+ abortSignal: requestOptions?.abortSignal,
1599
+ fetchFn: this._options?.fetch,
1600
+ logging: this._options.logging,
1601
+ });
1602
+ if (_response.ok) {
1603
+ return {
1604
+ data: serializers.UpdateInAppPlacementResponse.parseOrThrow(_response.body, {
1605
+ unrecognizedObjectKeys: "passthrough",
1606
+ allowUnrecognizedUnionMembers: true,
1607
+ allowUnrecognizedEnumValues: true,
1608
+ skipValidation: true,
1609
+ breadcrumbsPrefix: ["response"],
1610
+ }),
1611
+ rawResponse: _response.rawResponse,
1612
+ };
1613
+ }
1614
+ if (_response.error.reason === "status-code") {
1615
+ switch (_response.error.statusCode) {
1616
+ case 400:
1617
+ throw new Sequenzy.BadRequestError(_response.error.body, _response.rawResponse);
1618
+ case 401:
1619
+ throw new Sequenzy.UnauthorizedError(_response.error.body, _response.rawResponse);
1620
+ case 403:
1621
+ throw new Sequenzy.ForbiddenError(_response.error.body, _response.rawResponse);
1622
+ case 404:
1623
+ throw new Sequenzy.NotFoundError(_response.error.body, _response.rawResponse);
1624
+ case 500:
1625
+ throw new Sequenzy.InternalServerError(_response.error.body, _response.rawResponse);
1626
+ default:
1627
+ throw new errors.SequenzyError({
1628
+ statusCode: _response.error.statusCode,
1629
+ body: _response.error.body,
1630
+ rawResponse: _response.rawResponse,
1631
+ });
1632
+ }
1633
+ }
1634
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/in-app/placements/{key}");
423
1635
  }
424
1636
  /**
425
1637
  * Checks a custom HTML in-app message document without saving anything: size against the 100 KB limit, Braze Liquid converted to Sequenzy merge tags, script hosts a website CSP must allow, whether it closes itself, warnings and blocking errors. Requires the sequences:read scope.