@wix/crm 1.0.84 → 1.0.86

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 (229) hide show
  1. package/build/cjs/context.d.ts +5 -5
  2. package/build/cjs/context.js +5 -5
  3. package/build/cjs/context.js.map +1 -1
  4. package/build/cjs/index.d.ts +5 -5
  5. package/build/cjs/index.js +5 -5
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +5 -5
  8. package/build/cjs/meta.js +5 -5
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/context.d.ts +5 -5
  11. package/build/es/context.js +5 -5
  12. package/build/es/context.js.map +1 -1
  13. package/build/es/index.d.ts +5 -5
  14. package/build/es/index.js +5 -5
  15. package/build/es/index.js.map +1 -1
  16. package/build/es/meta.d.ts +5 -5
  17. package/build/es/meta.js +5 -5
  18. package/build/es/meta.js.map +1 -1
  19. package/package.json +15 -9
  20. package/build/cjs/index.typings.d.ts +0 -5
  21. package/build/cjs/index.typings.js +0 -32
  22. package/build/cjs/index.typings.js.map +0 -1
  23. package/build/cjs/src/contacts-v4-contact.context.d.ts +0 -9
  24. package/build/cjs/src/contacts-v4-contact.context.js +0 -82
  25. package/build/cjs/src/contacts-v4-contact.context.js.map +0 -1
  26. package/build/cjs/src/contacts-v4-contact.http.d.ts +0 -95
  27. package/build/cjs/src/contacts-v4-contact.http.js +0 -485
  28. package/build/cjs/src/contacts-v4-contact.http.js.map +0 -1
  29. package/build/cjs/src/contacts-v4-contact.meta.d.ts +0 -31
  30. package/build/cjs/src/contacts-v4-contact.meta.js +0 -161
  31. package/build/cjs/src/contacts-v4-contact.meta.js.map +0 -1
  32. package/build/cjs/src/contacts-v4-contact.public.d.ts +0 -49
  33. package/build/cjs/src/contacts-v4-contact.public.js +0 -76
  34. package/build/cjs/src/contacts-v4-contact.public.js.map +0 -1
  35. package/build/cjs/src/contacts-v4-contact.types.d.ts +0 -2185
  36. package/build/cjs/src/contacts-v4-contact.types.js +0 -270
  37. package/build/cjs/src/contacts-v4-contact.types.js.map +0 -1
  38. package/build/cjs/src/contacts-v4-contact.universal.d.ts +0 -2055
  39. package/build/cjs/src/contacts-v4-contact.universal.js +0 -930
  40. package/build/cjs/src/contacts-v4-contact.universal.js.map +0 -1
  41. package/build/cjs/src/contacts-v4-extended-field.context.d.ts +0 -7
  42. package/build/cjs/src/contacts-v4-extended-field.context.js +0 -60
  43. package/build/cjs/src/contacts-v4-extended-field.context.js.map +0 -1
  44. package/build/cjs/src/contacts-v4-extended-field.http.d.ts +0 -53
  45. package/build/cjs/src/contacts-v4-extended-field.http.js +0 -234
  46. package/build/cjs/src/contacts-v4-extended-field.http.js.map +0 -1
  47. package/build/cjs/src/contacts-v4-extended-field.meta.d.ts +0 -23
  48. package/build/cjs/src/contacts-v4-extended-field.meta.js +0 -123
  49. package/build/cjs/src/contacts-v4-extended-field.meta.js.map +0 -1
  50. package/build/cjs/src/contacts-v4-extended-field.public.d.ts +0 -23
  51. package/build/cjs/src/contacts-v4-extended-field.public.js +0 -44
  52. package/build/cjs/src/contacts-v4-extended-field.public.js.map +0 -1
  53. package/build/cjs/src/contacts-v4-extended-field.types.d.ts +0 -357
  54. package/build/cjs/src/contacts-v4-extended-field.types.js +0 -23
  55. package/build/cjs/src/contacts-v4-extended-field.types.js.map +0 -1
  56. package/build/cjs/src/contacts-v4-extended-field.universal.d.ts +0 -623
  57. package/build/cjs/src/contacts-v4-extended-field.universal.js +0 -434
  58. package/build/cjs/src/contacts-v4-extended-field.universal.js.map +0 -1
  59. package/build/cjs/src/contacts-v4-label.context.d.ts +0 -7
  60. package/build/cjs/src/contacts-v4-label.context.js +0 -60
  61. package/build/cjs/src/contacts-v4-label.context.js.map +0 -1
  62. package/build/cjs/src/contacts-v4-label.http.d.ts +0 -54
  63. package/build/cjs/src/contacts-v4-label.http.js +0 -235
  64. package/build/cjs/src/contacts-v4-label.http.js.map +0 -1
  65. package/build/cjs/src/contacts-v4-label.meta.d.ts +0 -23
  66. package/build/cjs/src/contacts-v4-label.meta.js +0 -123
  67. package/build/cjs/src/contacts-v4-label.meta.js.map +0 -1
  68. package/build/cjs/src/contacts-v4-label.public.d.ts +0 -21
  69. package/build/cjs/src/contacts-v4-label.public.js +0 -43
  70. package/build/cjs/src/contacts-v4-label.public.js.map +0 -1
  71. package/build/cjs/src/contacts-v4-label.types.d.ts +0 -349
  72. package/build/cjs/src/contacts-v4-label.types.js +0 -17
  73. package/build/cjs/src/contacts-v4-label.types.js.map +0 -1
  74. package/build/cjs/src/contacts-v4-label.universal.d.ts +0 -627
  75. package/build/cjs/src/contacts-v4-label.universal.js +0 -428
  76. package/build/cjs/src/contacts-v4-label.universal.js.map +0 -1
  77. package/build/cjs/src/contacts-v4-submit-contact.context.d.ts +0 -3
  78. package/build/cjs/src/contacts-v4-submit-contact.context.js +0 -16
  79. package/build/cjs/src/contacts-v4-submit-contact.context.js.map +0 -1
  80. package/build/cjs/src/contacts-v4-submit-contact.http.d.ts +0 -9
  81. package/build/cjs/src/contacts-v4-submit-contact.http.js +0 -90
  82. package/build/cjs/src/contacts-v4-submit-contact.http.js.map +0 -1
  83. package/build/cjs/src/contacts-v4-submit-contact.meta.d.ts +0 -13
  84. package/build/cjs/src/contacts-v4-submit-contact.meta.js +0 -47
  85. package/build/cjs/src/contacts-v4-submit-contact.meta.js.map +0 -1
  86. package/build/cjs/src/contacts-v4-submit-contact.public.d.ts +0 -8
  87. package/build/cjs/src/contacts-v4-submit-contact.public.js +0 -22
  88. package/build/cjs/src/contacts-v4-submit-contact.public.js.map +0 -1
  89. package/build/cjs/src/contacts-v4-submit-contact.types.d.ts +0 -541
  90. package/build/cjs/src/contacts-v4-submit-contact.types.js +0 -174
  91. package/build/cjs/src/contacts-v4-submit-contact.types.js.map +0 -1
  92. package/build/cjs/src/contacts-v4-submit-contact.universal.d.ts +0 -555
  93. package/build/cjs/src/contacts-v4-submit-contact.universal.js +0 -288
  94. package/build/cjs/src/contacts-v4-submit-contact.universal.js.map +0 -1
  95. package/build/cjs/src/crm-tasks-v2-task.context.d.ts +0 -9
  96. package/build/cjs/src/crm-tasks-v2-task.context.js +0 -82
  97. package/build/cjs/src/crm-tasks-v2-task.context.js.map +0 -1
  98. package/build/cjs/src/crm-tasks-v2-task.http.d.ts +0 -60
  99. package/build/cjs/src/crm-tasks-v2-task.http.js +0 -268
  100. package/build/cjs/src/crm-tasks-v2-task.http.js.map +0 -1
  101. package/build/cjs/src/crm-tasks-v2-task.meta.d.ts +0 -27
  102. package/build/cjs/src/crm-tasks-v2-task.meta.js +0 -161
  103. package/build/cjs/src/crm-tasks-v2-task.meta.js.map +0 -1
  104. package/build/cjs/src/crm-tasks-v2-task.public.d.ts +0 -30
  105. package/build/cjs/src/crm-tasks-v2-task.public.js +0 -58
  106. package/build/cjs/src/crm-tasks-v2-task.public.js.map +0 -1
  107. package/build/cjs/src/crm-tasks-v2-task.types.d.ts +0 -430
  108. package/build/cjs/src/crm-tasks-v2-task.types.js +0 -29
  109. package/build/cjs/src/crm-tasks-v2-task.types.js.map +0 -1
  110. package/build/cjs/src/crm-tasks-v2-task.universal.d.ts +0 -678
  111. package/build/cjs/src/crm-tasks-v2-task.universal.js +0 -520
  112. package/build/cjs/src/crm-tasks-v2-task.universal.js.map +0 -1
  113. package/build/cjs/src/ping-notifications-v3-notification.http.d.ts +0 -15
  114. package/build/cjs/src/ping-notifications-v3-notification.http.js +0 -87
  115. package/build/cjs/src/ping-notifications-v3-notification.http.js.map +0 -1
  116. package/build/cjs/src/ping-notifications-v3-notification.public.d.ts +0 -8
  117. package/build/cjs/src/ping-notifications-v3-notification.public.js +0 -14
  118. package/build/cjs/src/ping-notifications-v3-notification.public.js.map +0 -1
  119. package/build/cjs/src/ping-notifications-v3-notification.types.d.ts +0 -113
  120. package/build/cjs/src/ping-notifications-v3-notification.types.js +0 -15
  121. package/build/cjs/src/ping-notifications-v3-notification.types.js.map +0 -1
  122. package/build/cjs/src/ping-notifications-v3-notification.universal.d.ts +0 -146
  123. package/build/cjs/src/ping-notifications-v3-notification.universal.js +0 -136
  124. package/build/cjs/src/ping-notifications-v3-notification.universal.js.map +0 -1
  125. package/build/es/index.typings.d.ts +0 -5
  126. package/build/es/index.typings.js +0 -6
  127. package/build/es/index.typings.js.map +0 -1
  128. package/build/es/src/contacts-v4-contact.context.d.ts +0 -9
  129. package/build/es/src/contacts-v4-contact.context.js +0 -72
  130. package/build/es/src/contacts-v4-contact.context.js.map +0 -1
  131. package/build/es/src/contacts-v4-contact.http.d.ts +0 -95
  132. package/build/es/src/contacts-v4-contact.http.js +0 -475
  133. package/build/es/src/contacts-v4-contact.http.js.map +0 -1
  134. package/build/es/src/contacts-v4-contact.meta.d.ts +0 -31
  135. package/build/es/src/contacts-v4-contact.meta.js +0 -128
  136. package/build/es/src/contacts-v4-contact.meta.js.map +0 -1
  137. package/build/es/src/contacts-v4-contact.public.d.ts +0 -49
  138. package/build/es/src/contacts-v4-contact.public.js +0 -40
  139. package/build/es/src/contacts-v4-contact.public.js.map +0 -1
  140. package/build/es/src/contacts-v4-contact.types.d.ts +0 -2185
  141. package/build/es/src/contacts-v4-contact.types.js +0 -267
  142. package/build/es/src/contacts-v4-contact.types.js.map +0 -1
  143. package/build/es/src/contacts-v4-contact.universal.d.ts +0 -2055
  144. package/build/es/src/contacts-v4-contact.universal.js +0 -897
  145. package/build/es/src/contacts-v4-contact.universal.js.map +0 -1
  146. package/build/es/src/contacts-v4-extended-field.context.d.ts +0 -7
  147. package/build/es/src/contacts-v4-extended-field.context.js +0 -52
  148. package/build/es/src/contacts-v4-extended-field.context.js.map +0 -1
  149. package/build/es/src/contacts-v4-extended-field.http.d.ts +0 -53
  150. package/build/es/src/contacts-v4-extended-field.http.js +0 -226
  151. package/build/es/src/contacts-v4-extended-field.http.js.map +0 -1
  152. package/build/es/src/contacts-v4-extended-field.meta.d.ts +0 -23
  153. package/build/es/src/contacts-v4-extended-field.meta.js +0 -92
  154. package/build/es/src/contacts-v4-extended-field.meta.js.map +0 -1
  155. package/build/es/src/contacts-v4-extended-field.public.d.ts +0 -23
  156. package/build/es/src/contacts-v4-extended-field.public.js +0 -30
  157. package/build/es/src/contacts-v4-extended-field.public.js.map +0 -1
  158. package/build/es/src/contacts-v4-extended-field.types.d.ts +0 -357
  159. package/build/es/src/contacts-v4-extended-field.types.js +0 -20
  160. package/build/es/src/contacts-v4-extended-field.types.js.map +0 -1
  161. package/build/es/src/contacts-v4-extended-field.universal.d.ts +0 -623
  162. package/build/es/src/contacts-v4-extended-field.universal.js +0 -403
  163. package/build/es/src/contacts-v4-extended-field.universal.js.map +0 -1
  164. package/build/es/src/contacts-v4-label.context.d.ts +0 -7
  165. package/build/es/src/contacts-v4-label.context.js +0 -52
  166. package/build/es/src/contacts-v4-label.context.js.map +0 -1
  167. package/build/es/src/contacts-v4-label.http.d.ts +0 -54
  168. package/build/es/src/contacts-v4-label.http.js +0 -227
  169. package/build/es/src/contacts-v4-label.http.js.map +0 -1
  170. package/build/es/src/contacts-v4-label.meta.d.ts +0 -23
  171. package/build/es/src/contacts-v4-label.meta.js +0 -92
  172. package/build/es/src/contacts-v4-label.meta.js.map +0 -1
  173. package/build/es/src/contacts-v4-label.public.d.ts +0 -21
  174. package/build/es/src/contacts-v4-label.public.js +0 -30
  175. package/build/es/src/contacts-v4-label.public.js.map +0 -1
  176. package/build/es/src/contacts-v4-label.types.d.ts +0 -349
  177. package/build/es/src/contacts-v4-label.types.js +0 -14
  178. package/build/es/src/contacts-v4-label.types.js.map +0 -1
  179. package/build/es/src/contacts-v4-label.universal.d.ts +0 -627
  180. package/build/es/src/contacts-v4-label.universal.js +0 -397
  181. package/build/es/src/contacts-v4-label.universal.js.map +0 -1
  182. package/build/es/src/contacts-v4-submit-contact.context.d.ts +0 -3
  183. package/build/es/src/contacts-v4-submit-contact.context.js +0 -12
  184. package/build/es/src/contacts-v4-submit-contact.context.js.map +0 -1
  185. package/build/es/src/contacts-v4-submit-contact.http.d.ts +0 -9
  186. package/build/es/src/contacts-v4-submit-contact.http.js +0 -86
  187. package/build/es/src/contacts-v4-submit-contact.http.js.map +0 -1
  188. package/build/es/src/contacts-v4-submit-contact.meta.d.ts +0 -13
  189. package/build/es/src/contacts-v4-submit-contact.meta.js +0 -20
  190. package/build/es/src/contacts-v4-submit-contact.meta.js.map +0 -1
  191. package/build/es/src/contacts-v4-submit-contact.public.d.ts +0 -8
  192. package/build/es/src/contacts-v4-submit-contact.public.js +0 -9
  193. package/build/es/src/contacts-v4-submit-contact.public.js.map +0 -1
  194. package/build/es/src/contacts-v4-submit-contact.types.d.ts +0 -541
  195. package/build/es/src/contacts-v4-submit-contact.types.js +0 -171
  196. package/build/es/src/contacts-v4-submit-contact.types.js.map +0 -1
  197. package/build/es/src/contacts-v4-submit-contact.universal.d.ts +0 -555
  198. package/build/es/src/contacts-v4-submit-contact.universal.js +0 -261
  199. package/build/es/src/contacts-v4-submit-contact.universal.js.map +0 -1
  200. package/build/es/src/crm-tasks-v2-task.context.d.ts +0 -9
  201. package/build/es/src/crm-tasks-v2-task.context.js +0 -72
  202. package/build/es/src/crm-tasks-v2-task.context.js.map +0 -1
  203. package/build/es/src/crm-tasks-v2-task.http.d.ts +0 -60
  204. package/build/es/src/crm-tasks-v2-task.http.js +0 -258
  205. package/build/es/src/crm-tasks-v2-task.http.js.map +0 -1
  206. package/build/es/src/crm-tasks-v2-task.meta.d.ts +0 -27
  207. package/build/es/src/crm-tasks-v2-task.meta.js +0 -128
  208. package/build/es/src/crm-tasks-v2-task.meta.js.map +0 -1
  209. package/build/es/src/crm-tasks-v2-task.public.d.ts +0 -30
  210. package/build/es/src/crm-tasks-v2-task.public.js +0 -40
  211. package/build/es/src/crm-tasks-v2-task.public.js.map +0 -1
  212. package/build/es/src/crm-tasks-v2-task.types.d.ts +0 -430
  213. package/build/es/src/crm-tasks-v2-task.types.js +0 -26
  214. package/build/es/src/crm-tasks-v2-task.types.js.map +0 -1
  215. package/build/es/src/crm-tasks-v2-task.universal.d.ts +0 -678
  216. package/build/es/src/crm-tasks-v2-task.universal.js +0 -487
  217. package/build/es/src/crm-tasks-v2-task.universal.js.map +0 -1
  218. package/build/es/src/ping-notifications-v3-notification.http.d.ts +0 -15
  219. package/build/es/src/ping-notifications-v3-notification.http.js +0 -83
  220. package/build/es/src/ping-notifications-v3-notification.http.js.map +0 -1
  221. package/build/es/src/ping-notifications-v3-notification.public.d.ts +0 -8
  222. package/build/es/src/ping-notifications-v3-notification.public.js +0 -9
  223. package/build/es/src/ping-notifications-v3-notification.public.js.map +0 -1
  224. package/build/es/src/ping-notifications-v3-notification.types.d.ts +0 -113
  225. package/build/es/src/ping-notifications-v3-notification.types.js +0 -12
  226. package/build/es/src/ping-notifications-v3-notification.types.js.map +0 -1
  227. package/build/es/src/ping-notifications-v3-notification.universal.d.ts +0 -146
  228. package/build/es/src/ping-notifications-v3-notification.universal.js +0 -109
  229. package/build/es/src/ping-notifications-v3-notification.universal.js.map +0 -1
@@ -1,113 +0,0 @@
1
- export interface Notification {
2
- /** The id of the notification */
3
- id?: string;
4
- }
5
- export interface NotifyRequest {
6
- /**
7
- * Notification template ID. A notification template specifies the text and recipients for notifications.
8
- * To obtain a notification template ID, [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center.
9
- */
10
- notificationTemplateId: string;
11
- /**
12
- * Each key is a placeholder name you specify when [creating a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template).
13
- * The value is an object containing the text to replace the placeholder in the notifications.
14
- */
15
- dynamicValues?: Record<string, DynamicValue>;
16
- }
17
- export interface DynamicValue extends DynamicValueOfTypeOneOf {
18
- /** Text to be integrated into the notification. */
19
- text?: string;
20
- }
21
- /** @oneof */
22
- export interface DynamicValueOfTypeOneOf {
23
- /** Text to be integrated into the notification. */
24
- text?: string;
25
- }
26
- /**
27
- * Money.
28
- * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
29
- */
30
- export interface Money {
31
- /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. */
32
- value?: string;
33
- /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
34
- currency?: string;
35
- /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
36
- formattedValue?: string | null;
37
- }
38
- export interface MapDynamicValue {
39
- /** items */
40
- items?: Record<string, DynamicValue>;
41
- }
42
- export interface ArrayDynamicValue {
43
- /** items */
44
- items?: DynamicValue[];
45
- }
46
- export interface AttachmentDynamicValue {
47
- /** file name */
48
- fileName?: string;
49
- /** download url */
50
- downloadUrl?: string;
51
- }
52
- export interface NotifyResponse {
53
- /** ID of the batch of notifications triggered by one request. */
54
- notificationBatchId?: string;
55
- }
56
- export interface NotifyByAppRequest {
57
- /** notification_template_id */
58
- notificationTemplateId?: string;
59
- /** app_def_id */
60
- appDefId?: string;
61
- /** dynamic_values */
62
- dynamicValues?: Record<string, DynamicValue>;
63
- /** template tenant */
64
- templateTenant?: string | null;
65
- /** overrides */
66
- overrides?: Overrides;
67
- /** channels content */
68
- channelsData?: ChannelsData;
69
- }
70
- export interface Overrides {
71
- /** excluded_channels */
72
- excludedChannels?: TemplateChannel[];
73
- /** excluded_audiences */
74
- excludedAudiences?: ExcludedAudiences;
75
- /** content overrides */
76
- content?: ChannelsContent;
77
- }
78
- export declare enum TemplateChannel {
79
- WEB_FEED = "WEB_FEED",
80
- MOBILE_FEED = "MOBILE_FEED",
81
- MOBILE_PUSH = "MOBILE_PUSH",
82
- BROWSER = "BROWSER",
83
- SMS = "SMS",
84
- EMAIL = "EMAIL",
85
- KAFKA = "KAFKA",
86
- VOICE = "VOICE"
87
- }
88
- export interface ExcludedAudiences {
89
- /** audience_key */
90
- audienceKey?: string[];
91
- }
92
- export interface ChannelsContent {
93
- /** mobile push override */
94
- mobileContent?: MobileContent;
95
- }
96
- export interface MobileContent {
97
- /** title override of mobile push content */
98
- title?: string;
99
- /** body override of mobile push content */
100
- body?: string;
101
- }
102
- export interface ChannelsData {
103
- /** email data */
104
- emailData?: EmailData;
105
- }
106
- export interface EmailData {
107
- /** shoutout action config */
108
- shoutoutActionConfig?: Record<string, any> | null;
109
- }
110
- export interface NotifyByAppResponse {
111
- /** notification_batch_id */
112
- notificationBatchId?: string;
113
- }
@@ -1,12 +0,0 @@
1
- export var TemplateChannel;
2
- (function (TemplateChannel) {
3
- TemplateChannel["WEB_FEED"] = "WEB_FEED";
4
- TemplateChannel["MOBILE_FEED"] = "MOBILE_FEED";
5
- TemplateChannel["MOBILE_PUSH"] = "MOBILE_PUSH";
6
- TemplateChannel["BROWSER"] = "BROWSER";
7
- TemplateChannel["SMS"] = "SMS";
8
- TemplateChannel["EMAIL"] = "EMAIL";
9
- TemplateChannel["KAFKA"] = "KAFKA";
10
- TemplateChannel["VOICE"] = "VOICE";
11
- })(TemplateChannel || (TemplateChannel = {}));
12
- //# sourceMappingURL=ping-notifications-v3-notification.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ping-notifications-v3-notification.types.js","sourceRoot":"","sources":["../../../src/ping-notifications-v3-notification.types.ts"],"names":[],"mappings":"AAwFA,MAAM,CAAN,IAAY,eASX;AATD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,8CAA2B,CAAA;IAC3B,8CAA2B,CAAA;IAC3B,sCAAmB,CAAA;IACnB,8BAAW,CAAA;IACX,kCAAe,CAAA;IACf,kCAAe,CAAA;IACf,kCAAe,CAAA;AACjB,CAAC,EATW,eAAe,KAAf,eAAe,QAS1B"}
@@ -1,146 +0,0 @@
1
- export declare const __debug: {
2
- verboseLogging: {
3
- on: () => boolean;
4
- off: () => boolean;
5
- };
6
- };
7
- export interface Notification {
8
- /** The id of the notification */
9
- _id?: string;
10
- }
11
- export interface NotifyRequest {
12
- /**
13
- * Notification template ID. A notification template specifies the text and recipients for notifications.
14
- * To obtain a notification template ID, [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center.
15
- */
16
- notificationTemplateId: string;
17
- /**
18
- * Each key is a placeholder name you specify when [creating a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template).
19
- * The value is an object containing the text to replace the placeholder in the notifications.
20
- */
21
- dynamicValues?: Record<string, DynamicValue>;
22
- }
23
- export interface DynamicValue extends DynamicValueOfTypeOneOf {
24
- /** Text to be integrated into the notification. */
25
- text?: string;
26
- }
27
- /** @oneof */
28
- export interface DynamicValueOfTypeOneOf {
29
- /** Text to be integrated into the notification. */
30
- text?: string;
31
- }
32
- /**
33
- * Money.
34
- * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
35
- */
36
- export interface Money {
37
- /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. */
38
- value?: string;
39
- /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
40
- currency?: string;
41
- /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
42
- formattedValue?: string | null;
43
- }
44
- export interface MapDynamicValue {
45
- /** items */
46
- items?: Record<string, DynamicValue>;
47
- }
48
- export interface ArrayDynamicValue {
49
- /** items */
50
- items?: DynamicValue[];
51
- }
52
- export interface AttachmentDynamicValue {
53
- /** file name */
54
- fileName?: string;
55
- /** download url */
56
- downloadUrl?: string;
57
- }
58
- export interface NotifyResponse {
59
- /** ID of the batch of notifications triggered by one request. */
60
- notificationBatchId?: string;
61
- }
62
- export interface NotifyByAppRequest {
63
- /** notification_template_id */
64
- notificationTemplateId?: string;
65
- /** app_def_id */
66
- appDefId?: string;
67
- /** dynamic_values */
68
- dynamicValues?: Record<string, DynamicValue>;
69
- /** template tenant */
70
- templateTenant?: string | null;
71
- /** overrides */
72
- overrides?: Overrides;
73
- /** channels content */
74
- channelsData?: ChannelsData;
75
- }
76
- export interface Overrides {
77
- /** excluded_channels */
78
- excludedChannels?: TemplateChannel[];
79
- /** excluded_audiences */
80
- excludedAudiences?: ExcludedAudiences;
81
- /** content overrides */
82
- content?: ChannelsContent;
83
- }
84
- export declare enum TemplateChannel {
85
- WEB_FEED = "WEB_FEED",
86
- MOBILE_FEED = "MOBILE_FEED",
87
- MOBILE_PUSH = "MOBILE_PUSH",
88
- BROWSER = "BROWSER",
89
- SMS = "SMS",
90
- EMAIL = "EMAIL",
91
- KAFKA = "KAFKA",
92
- VOICE = "VOICE"
93
- }
94
- export interface ExcludedAudiences {
95
- /** audience_key */
96
- audienceKey?: string[];
97
- }
98
- export interface ChannelsContent {
99
- /** mobile push override */
100
- mobileContent?: MobileContent;
101
- }
102
- export interface MobileContent {
103
- /** title override of mobile push content */
104
- title?: string;
105
- /** body override of mobile push content */
106
- body?: string;
107
- }
108
- export interface ChannelsData {
109
- /** email data */
110
- emailData?: EmailData;
111
- }
112
- export interface EmailData {
113
- /** shoutout action config */
114
- shoutoutActionConfig?: Record<string, any> | null;
115
- }
116
- export interface NotifyByAppResponse {
117
- /** notification_batch_id */
118
- notificationBatchId?: string;
119
- }
120
- /**
121
- * Sends notifications based on the template and dynamic values provided.
122
- *
123
- * > This feature is not yet available to all users.
124
- *
125
- * An app can call this endpoint up to 100,000 times per month for each site.
126
- *
127
- * When you [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center, you are given a notification template ID.
128
- * Call the Notify endpoint with this ID as `notificationTemplateID` to trigger notifications based on the notification template.
129
- * If the notification template contains placeholders for dynamic values, provide those values as key-value pairs in the `dynamicValues` array.
130
- * The values you specify are incorporated seamlessly in the notifications sent out.
131
- * @param notificationTemplateId - Notification template ID. A notification template specifies the text and recipients for notifications.
132
- * To obtain a notification template ID, [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center.
133
- * @public
134
- * @documentationMaturity preview
135
- * @requiredField notificationTemplateId
136
- * @permissionScope Manage Notifications
137
- * @applicableIdentity APP
138
- */
139
- export declare function notify(notificationTemplateId: string, options?: NotifyOptions): Promise<NotifyResponse>;
140
- export interface NotifyOptions {
141
- /**
142
- * Each key is a placeholder name you specify when [creating a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template).
143
- * The value is an object containing the text to replace the placeholder in the notifications.
144
- */
145
- dynamicValues?: Record<string, DynamicValue>;
146
- }
@@ -1,109 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { serializer, transformError } from '@wix/metro-runtime/velo';
11
- import * as ambassadorWixPingNotificationsV3Notification from './ping-notifications-v3-notification.http';
12
- let __verbose = false;
13
- function __log(...args) {
14
- __verbose && console.log(...args);
15
- }
16
- function __inspect(obj) {
17
- return obj;
18
- }
19
- export const __debug = {
20
- verboseLogging: {
21
- on: () => (__verbose = true),
22
- off: () => (__verbose = false),
23
- },
24
- };
25
- const _toVeloEntity = '$';
26
- const _fromVeloEntity = '$';
27
- export var TemplateChannel;
28
- (function (TemplateChannel) {
29
- TemplateChannel["WEB_FEED"] = "WEB_FEED";
30
- TemplateChannel["MOBILE_FEED"] = "MOBILE_FEED";
31
- TemplateChannel["MOBILE_PUSH"] = "MOBILE_PUSH";
32
- TemplateChannel["BROWSER"] = "BROWSER";
33
- TemplateChannel["SMS"] = "SMS";
34
- TemplateChannel["EMAIL"] = "EMAIL";
35
- TemplateChannel["KAFKA"] = "KAFKA";
36
- TemplateChannel["VOICE"] = "VOICE";
37
- })(TemplateChannel || (TemplateChannel = {}));
38
- const _arrayDynamicValue = { items: '_dynamicValue' };
39
- const _dynamicValue = { map: '_mapDynamicValue', array: '_arrayDynamicValue' };
40
- const _mapDynamicValue = { items: 'Map#_dynamicValue' };
41
- const _notifyRequest = { dynamicValues: 'Map#_dynamicValue' };
42
- const _notifyResponse = {};
43
- /**
44
- * Sends notifications based on the template and dynamic values provided.
45
- *
46
- * > This feature is not yet available to all users.
47
- *
48
- * An app can call this endpoint up to 100,000 times per month for each site.
49
- *
50
- * When you [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center, you are given a notification template ID.
51
- * Call the Notify endpoint with this ID as `notificationTemplateID` to trigger notifications based on the notification template.
52
- * If the notification template contains placeholders for dynamic values, provide those values as key-value pairs in the `dynamicValues` array.
53
- * The values you specify are incorporated seamlessly in the notifications sent out.
54
- * @param notificationTemplateId - Notification template ID. A notification template specifies the text and recipients for notifications.
55
- * To obtain a notification template ID, [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center.
56
- * @public
57
- * @documentationMaturity preview
58
- * @requiredField notificationTemplateId
59
- * @permissionScope Manage Notifications
60
- * @applicableIdentity APP
61
- */
62
- export function notify(notificationTemplateId, options) {
63
- var _a, _b, _c;
64
- return __awaiter(this, arguments, void 0, function* () {
65
- const requestTransformation = {
66
- notificationTemplateId: '$[0]',
67
- dynamicValues: '$[1].dynamicValues',
68
- };
69
- const responseTransformation = '$';
70
- // @ts-ignore
71
- const { httpClient, sideEffects } = arguments[2];
72
- const { toAmbassadorRequest } = serializer({
73
- rootSchema: _notifyRequest,
74
- depSchemas: { _arrayDynamicValue, _dynamicValue, _mapDynamicValue },
75
- fqdnTransformation: {
76
- paths: [],
77
- transformation: _fromVeloEntity,
78
- },
79
- customTransformation: requestTransformation,
80
- });
81
- const { fromJSON } = serializer({
82
- rootSchema: _notifyResponse,
83
- depSchemas: {},
84
- fqdnTransformation: {
85
- paths: [],
86
- transformation: _toVeloEntity,
87
- },
88
- customTransformation: responseTransformation,
89
- });
90
- const payload = toAmbassadorRequest([notificationTemplateId, options]);
91
- const reqOpts = ambassadorWixPingNotificationsV3Notification.notify(payload);
92
- __log(`"Notify" sending request with: ${__inspect(reqOpts)}`);
93
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
94
- try {
95
- const result = yield httpClient.request(reqOpts);
96
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
97
- return fromJSON(result.data);
98
- }
99
- catch (err) {
100
- const transformedError = transformError(err, requestTransformation, [
101
- 'notificationTemplateId',
102
- 'options',
103
- ]);
104
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
105
- throw transformedError;
106
- }
107
- });
108
- }
109
- //# sourceMappingURL=ping-notifications-v3-notification.universal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ping-notifications-v3-notification.universal.js","sourceRoot":"","sources":["../../../src/ping-notifications-v3-notification.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,4CAA4C,MAAM,2CAA2C,CAAC;AAE1G,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,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