@epilot/automation-client 0.7.5 → 0.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openapi.d.ts CHANGED
@@ -80,6 +80,12 @@ declare namespace Components {
80
80
  * Handle contact form
81
81
  */
82
82
  flow_name?: string;
83
+ /**
84
+ * Number of automation executions that ran
85
+ * example:
86
+ * 7
87
+ */
88
+ runs?: number;
83
89
  triggers?: (FrontendSubmitTrigger | JourneySubmitTrigger | EntityOperationTrigger)[];
84
90
  trigger_conditions?: TriggerCondition[];
85
91
  /**
@@ -184,8 +190,17 @@ declare namespace Components {
184
190
  * "mapping_attributes": [
185
191
  * {
186
192
  * "target": "email",
187
- * "mode": "copy_if_exists",
188
- * "source": "billing_contact.email"
193
+ * "mode": "append_if_exists",
194
+ * "source": "billing_contact",
195
+ * "value_json": "{\n \"email\": \"billing_contact.email\"\n}"
196
+ * },
197
+ * {
198
+ * "target": "_tags",
199
+ * "mode": "set_value",
200
+ * "value": [
201
+ * "primary",
202
+ * "payer"
203
+ * ]
189
204
  * },
190
205
  * {
191
206
  * "target": "first_name",
@@ -198,16 +213,21 @@ declare namespace Components {
198
213
  * "source": "billing_contact.last_name"
199
214
  * },
200
215
  * {
216
+ * "target": "contact_type",
217
+ * "mode": "set_value",
218
+ * "value": "customer"
219
+ * },
220
+ * {
201
221
  * "target": "addresses",
202
222
  * "mode": "append_if_exists",
203
223
  * "source": "billing_contact",
204
- * "value_json": "{\n \"street_name\": \"{{billing_contact.street_name}}\",\n \"street_number\": \"{{billing_contact.street_number}}\",\n \"city\": \"{{billing_contact.city}}\",\n \"postal_code\": \"{{billing_contact.postal_code}}\",\n \"country\": \"{{billing_contact.country}}\",\n}"
224
+ * "value_json": "{\n \"street_name\": \"billing_contact.street_name\",\n \"street_number\": \"billing_contact.street_number\",\n \"city\": \"billing_contact.city\",\n \"postal_code\": \"billing_contact.postal_code\",\n \"country\": \"billing_contact.country\",\n \"_tags\": [\"billing\", \"primary\"]\n}"
205
225
  * },
206
226
  * {
207
227
  * "target": "addresses",
208
228
  * "mode": "append_if_exists",
209
229
  * "source": "delivery_contact",
210
- * "value_json": "{\n \"street_name\": \"{{delivery_contact.street_name}}\",\n \"street_number\": \"{{delivery_contact.street_number}}\",\n \"city\": \"{{delivery_contact.city}}\",\n \"postal_code\": \"{{delivery_contact.postal_code}}\",\n \"country\": \"{{delivery_contact.country}}\",\n}"
230
+ * "value_json": "{\n \"street_name\": \"delivery_contact.street_name\",\n \"street_number\": \"delivery_contact.street_number\",\n \"city\": \"delivery_contact.city\",\n \"postal_code\": \"delivery_contact.postal_code\",\n \"country\": \"delivery_contact.country\",\n \"_tags\": [\"delivery\", \"secondary\"]\n}"
211
231
  * }
212
232
  * ]
213
233
  * }
@@ -231,10 +251,33 @@ declare namespace Components {
231
251
  mapping_attributes?: MappingAttribute[];
232
252
  }
233
253
  export interface MappingAttribute {
254
+ /**
255
+ * JSON like target path for the attribute. Eg. last_name
256
+ */
234
257
  target: string;
235
- mode: "copy_if_exists" | "append_if_exists";
258
+ /**
259
+ * - copy_if_exists - it replaces the target attribute with the source value
260
+ * - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.
261
+ * - set_value - it sets a value to a predefined value. Must be used together with value property.
262
+ *
263
+ */
264
+ mode: "copy_if_exists" | "append_if_exists" | "set_value";
265
+ /**
266
+ * JSON source path for the value to be extracted from. Eg: steps[1].['Product Info'].price
267
+ *
268
+ */
236
269
  source: string;
270
+ /**
271
+ * To be provided only when mapping json objects into a target attribute. Eg array of addresses.
272
+ *
273
+ */
237
274
  value_json?: string;
275
+ /**
276
+ * Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.
277
+ *
278
+ */
279
+ value?: {
280
+ };
238
281
  }
239
282
  /**
240
283
  * example:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "description": "API Client for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/openapi.d.ts CHANGED
@@ -80,6 +80,12 @@ declare namespace Components {
80
80
  * Handle contact form
81
81
  */
82
82
  flow_name?: string;
83
+ /**
84
+ * Number of automation executions that ran
85
+ * example:
86
+ * 7
87
+ */
88
+ runs?: number;
83
89
  triggers?: (FrontendSubmitTrigger | JourneySubmitTrigger | EntityOperationTrigger)[];
84
90
  trigger_conditions?: TriggerCondition[];
85
91
  /**
@@ -184,8 +190,17 @@ declare namespace Components {
184
190
  * "mapping_attributes": [
185
191
  * {
186
192
  * "target": "email",
187
- * "mode": "copy_if_exists",
188
- * "source": "billing_contact.email"
193
+ * "mode": "append_if_exists",
194
+ * "source": "billing_contact",
195
+ * "value_json": "{\n \"email\": \"billing_contact.email\"\n}"
196
+ * },
197
+ * {
198
+ * "target": "_tags",
199
+ * "mode": "set_value",
200
+ * "value": [
201
+ * "primary",
202
+ * "payer"
203
+ * ]
189
204
  * },
190
205
  * {
191
206
  * "target": "first_name",
@@ -198,16 +213,21 @@ declare namespace Components {
198
213
  * "source": "billing_contact.last_name"
199
214
  * },
200
215
  * {
216
+ * "target": "contact_type",
217
+ * "mode": "set_value",
218
+ * "value": "customer"
219
+ * },
220
+ * {
201
221
  * "target": "addresses",
202
222
  * "mode": "append_if_exists",
203
223
  * "source": "billing_contact",
204
- * "value_json": "{\n \"street_name\": \"{{billing_contact.street_name}}\",\n \"street_number\": \"{{billing_contact.street_number}}\",\n \"city\": \"{{billing_contact.city}}\",\n \"postal_code\": \"{{billing_contact.postal_code}}\",\n \"country\": \"{{billing_contact.country}}\",\n}"
224
+ * "value_json": "{\n \"street_name\": \"billing_contact.street_name\",\n \"street_number\": \"billing_contact.street_number\",\n \"city\": \"billing_contact.city\",\n \"postal_code\": \"billing_contact.postal_code\",\n \"country\": \"billing_contact.country\",\n \"_tags\": [\"billing\", \"primary\"]\n}"
205
225
  * },
206
226
  * {
207
227
  * "target": "addresses",
208
228
  * "mode": "append_if_exists",
209
229
  * "source": "delivery_contact",
210
- * "value_json": "{\n \"street_name\": \"{{delivery_contact.street_name}}\",\n \"street_number\": \"{{delivery_contact.street_number}}\",\n \"city\": \"{{delivery_contact.city}}\",\n \"postal_code\": \"{{delivery_contact.postal_code}}\",\n \"country\": \"{{delivery_contact.country}}\",\n}"
230
+ * "value_json": "{\n \"street_name\": \"delivery_contact.street_name\",\n \"street_number\": \"delivery_contact.street_number\",\n \"city\": \"delivery_contact.city\",\n \"postal_code\": \"delivery_contact.postal_code\",\n \"country\": \"delivery_contact.country\",\n \"_tags\": [\"delivery\", \"secondary\"]\n}"
211
231
  * }
212
232
  * ]
213
233
  * }
@@ -231,10 +251,33 @@ declare namespace Components {
231
251
  mapping_attributes?: MappingAttribute[];
232
252
  }
233
253
  export interface MappingAttribute {
254
+ /**
255
+ * JSON like target path for the attribute. Eg. last_name
256
+ */
234
257
  target: string;
235
- mode: "copy_if_exists" | "append_if_exists";
258
+ /**
259
+ * - copy_if_exists - it replaces the target attribute with the source value
260
+ * - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.
261
+ * - set_value - it sets a value to a predefined value. Must be used together with value property.
262
+ *
263
+ */
264
+ mode: "copy_if_exists" | "append_if_exists" | "set_value";
265
+ /**
266
+ * JSON source path for the value to be extracted from. Eg: steps[1].['Product Info'].price
267
+ *
268
+ */
236
269
  source: string;
270
+ /**
271
+ * To be provided only when mapping json objects into a target attribute. Eg array of addresses.
272
+ *
273
+ */
237
274
  value_json?: string;
275
+ /**
276
+ * Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.
277
+ *
278
+ */
279
+ value?: {
280
+ };
238
281
  }
239
282
  /**
240
283
  * example: