@epilot/automation-client 1.3.2 → 1.4.0

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
@@ -146,6 +146,34 @@ declare namespace Components {
146
146
  * }
147
147
  */
148
148
  SendEmailAction | AutomationAction;
149
+ export interface AppendValueMapper {
150
+ mode: /**
151
+ * - copy_if_exists - it replaces the target attribute with the source value
152
+ * - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.
153
+ * - set_value - it sets a value to a predefined value. Must be used together with value property.
154
+ *
155
+ */
156
+ MappingAttributeMode;
157
+ /**
158
+ * JSON like target path for the attribute. Eg. last_name
159
+ */
160
+ target: string;
161
+ /**
162
+ * JSON source path for the value to be extracted from. Eg: steps[1].['Product Info'].price
163
+ *
164
+ */
165
+ source?: string;
166
+ /**
167
+ * To be provided only when mapping json objects into a target attribute. Eg array of addresses.
168
+ *
169
+ */
170
+ value_json: string;
171
+ /**
172
+ * Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]
173
+ *
174
+ */
175
+ target_unique?: string[];
176
+ }
149
177
  /**
150
178
  * example:
151
179
  * [
@@ -291,6 +319,24 @@ declare namespace Components {
291
319
  */
292
320
  export type AutomationFlowId = string;
293
321
  export type Comparison = "equals" | "any_of" | "not_empty" | "is_empty";
322
+ export interface CopyValueMapper {
323
+ mode: /**
324
+ * - copy_if_exists - it replaces the target attribute with the source value
325
+ * - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.
326
+ * - set_value - it sets a value to a predefined value. Must be used together with value property.
327
+ *
328
+ */
329
+ MappingAttributeMode;
330
+ /**
331
+ * JSON like target path for the attribute. Eg. last_name
332
+ */
333
+ target: string;
334
+ /**
335
+ * JSON source path for the value to be extracted from. Eg: steps[1].['Product Info'].price
336
+ *
337
+ */
338
+ source: string;
339
+ }
294
340
  /**
295
341
  * example:
296
342
  * {
@@ -480,49 +526,70 @@ declare namespace Components {
480
526
  target_unique?: string[];
481
527
  mapping_attributes?: MappingAttribute[];
482
528
  relation_attributes?: RelationAttribute[];
483
- reference_attributes?: ReferenceAttribute[];
484
- }
485
- export interface MappingAttribute {
486
- /**
487
- * JSON like target path for the attribute. Eg. last_name
488
- */
489
- target: string;
490
- /**
491
- * - copy_if_exists - it replaces the target attribute with the source value
492
- * - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.
493
- * - set_value - it sets a value to a predefined value. Must be used together with value property.
494
- *
495
- */
496
- mode: "copy_if_exists" | "append_if_exists" | "set_value";
497
- /**
498
- * JSON source path for the value to be extracted from. Eg: steps[1].['Product Info'].price
499
- *
500
- */
501
- source: string;
502
- /**
503
- * To be provided only when mapping json objects into a target attribute. Eg array of addresses.
504
- *
505
- */
506
- value_json?: string;
507
- /**
508
- * Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.
509
- *
529
+ reference_attributes?: /**
530
+ * example:
531
+ * {
532
+ * "target": {
533
+ * "key": "addresses"
534
+ * },
535
+ * "source": {
536
+ * "schema": "contact",
537
+ * "tag": "primary",
538
+ * "key": "address",
539
+ * "value_tag": "billing"
540
+ * }
541
+ * }
510
542
  */
511
- value?: any;
543
+ ReferenceAttribute[];
512
544
  }
545
+ export type MappingAttribute = SetValueMapper | CopyValueMapper | AppendValueMapper;
546
+ /**
547
+ * - copy_if_exists - it replaces the target attribute with the source value
548
+ * - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.
549
+ * - set_value - it sets a value to a predefined value. Must be used together with value property.
550
+ *
551
+ */
552
+ export type MappingAttributeMode = "copy_if_exists" | "append_if_exists" | "set_value";
513
553
  /**
514
554
  * example:
515
555
  * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
516
556
  */
517
557
  export type OrganizationId = string;
558
+ /**
559
+ * example:
560
+ * {
561
+ * "target": {
562
+ * "key": "addresses"
563
+ * },
564
+ * "source": {
565
+ * "schema": "contact",
566
+ * "tag": "primary",
567
+ * "key": "address",
568
+ * "value_tag": "billing"
569
+ * }
570
+ * }
571
+ */
518
572
  export interface ReferenceAttribute {
519
573
  target: {
520
574
  key: string;
521
- path: string;
522
575
  };
523
576
  source: {
577
+ /**
578
+ * Schema of source object. eg contact
579
+ */
524
580
  schema: string;
581
+ /**
582
+ * identifier tag of source object. eg primary
583
+ */
525
584
  tag: string;
585
+ /**
586
+ * location of source data. eg address
587
+ */
588
+ key: string;
589
+ /**
590
+ * identifier tag of source data. eg billing
591
+ */
592
+ value_tag: string;
526
593
  };
527
594
  }
528
595
  export interface RelationAttribute {
@@ -580,6 +647,24 @@ declare namespace Components {
580
647
  email_template_id?: string;
581
648
  language_code?: "de" | "en";
582
649
  }
650
+ export interface SetValueMapper {
651
+ mode: /**
652
+ * - copy_if_exists - it replaces the target attribute with the source value
653
+ * - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.
654
+ * - set_value - it sets a value to a predefined value. Must be used together with value property.
655
+ *
656
+ */
657
+ MappingAttributeMode;
658
+ /**
659
+ * JSON like target path for the attribute. Eg. last_name
660
+ */
661
+ target: string;
662
+ /**
663
+ * Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.
664
+ *
665
+ */
666
+ value: any;
667
+ }
583
668
  export interface StartExecutionRequest {
584
669
  entity_id?: /**
585
670
  * example:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
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
@@ -146,6 +146,34 @@ declare namespace Components {
146
146
  * }
147
147
  */
148
148
  SendEmailAction | AutomationAction;
149
+ export interface AppendValueMapper {
150
+ mode: /**
151
+ * - copy_if_exists - it replaces the target attribute with the source value
152
+ * - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.
153
+ * - set_value - it sets a value to a predefined value. Must be used together with value property.
154
+ *
155
+ */
156
+ MappingAttributeMode;
157
+ /**
158
+ * JSON like target path for the attribute. Eg. last_name
159
+ */
160
+ target: string;
161
+ /**
162
+ * JSON source path for the value to be extracted from. Eg: steps[1].['Product Info'].price
163
+ *
164
+ */
165
+ source?: string;
166
+ /**
167
+ * To be provided only when mapping json objects into a target attribute. Eg array of addresses.
168
+ *
169
+ */
170
+ value_json: string;
171
+ /**
172
+ * Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]
173
+ *
174
+ */
175
+ target_unique?: string[];
176
+ }
149
177
  /**
150
178
  * example:
151
179
  * [
@@ -291,6 +319,24 @@ declare namespace Components {
291
319
  */
292
320
  export type AutomationFlowId = string;
293
321
  export type Comparison = "equals" | "any_of" | "not_empty" | "is_empty";
322
+ export interface CopyValueMapper {
323
+ mode: /**
324
+ * - copy_if_exists - it replaces the target attribute with the source value
325
+ * - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.
326
+ * - set_value - it sets a value to a predefined value. Must be used together with value property.
327
+ *
328
+ */
329
+ MappingAttributeMode;
330
+ /**
331
+ * JSON like target path for the attribute. Eg. last_name
332
+ */
333
+ target: string;
334
+ /**
335
+ * JSON source path for the value to be extracted from. Eg: steps[1].['Product Info'].price
336
+ *
337
+ */
338
+ source: string;
339
+ }
294
340
  /**
295
341
  * example:
296
342
  * {
@@ -480,49 +526,70 @@ declare namespace Components {
480
526
  target_unique?: string[];
481
527
  mapping_attributes?: MappingAttribute[];
482
528
  relation_attributes?: RelationAttribute[];
483
- reference_attributes?: ReferenceAttribute[];
484
- }
485
- export interface MappingAttribute {
486
- /**
487
- * JSON like target path for the attribute. Eg. last_name
488
- */
489
- target: string;
490
- /**
491
- * - copy_if_exists - it replaces the target attribute with the source value
492
- * - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.
493
- * - set_value - it sets a value to a predefined value. Must be used together with value property.
494
- *
495
- */
496
- mode: "copy_if_exists" | "append_if_exists" | "set_value";
497
- /**
498
- * JSON source path for the value to be extracted from. Eg: steps[1].['Product Info'].price
499
- *
500
- */
501
- source: string;
502
- /**
503
- * To be provided only when mapping json objects into a target attribute. Eg array of addresses.
504
- *
505
- */
506
- value_json?: string;
507
- /**
508
- * Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.
509
- *
529
+ reference_attributes?: /**
530
+ * example:
531
+ * {
532
+ * "target": {
533
+ * "key": "addresses"
534
+ * },
535
+ * "source": {
536
+ * "schema": "contact",
537
+ * "tag": "primary",
538
+ * "key": "address",
539
+ * "value_tag": "billing"
540
+ * }
541
+ * }
510
542
  */
511
- value?: any;
543
+ ReferenceAttribute[];
512
544
  }
545
+ export type MappingAttribute = SetValueMapper | CopyValueMapper | AppendValueMapper;
546
+ /**
547
+ * - copy_if_exists - it replaces the target attribute with the source value
548
+ * - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.
549
+ * - set_value - it sets a value to a predefined value. Must be used together with value property.
550
+ *
551
+ */
552
+ export type MappingAttributeMode = "copy_if_exists" | "append_if_exists" | "set_value";
513
553
  /**
514
554
  * example:
515
555
  * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
516
556
  */
517
557
  export type OrganizationId = string;
558
+ /**
559
+ * example:
560
+ * {
561
+ * "target": {
562
+ * "key": "addresses"
563
+ * },
564
+ * "source": {
565
+ * "schema": "contact",
566
+ * "tag": "primary",
567
+ * "key": "address",
568
+ * "value_tag": "billing"
569
+ * }
570
+ * }
571
+ */
518
572
  export interface ReferenceAttribute {
519
573
  target: {
520
574
  key: string;
521
- path: string;
522
575
  };
523
576
  source: {
577
+ /**
578
+ * Schema of source object. eg contact
579
+ */
524
580
  schema: string;
581
+ /**
582
+ * identifier tag of source object. eg primary
583
+ */
525
584
  tag: string;
585
+ /**
586
+ * location of source data. eg address
587
+ */
588
+ key: string;
589
+ /**
590
+ * identifier tag of source data. eg billing
591
+ */
592
+ value_tag: string;
526
593
  };
527
594
  }
528
595
  export interface RelationAttribute {
@@ -580,6 +647,24 @@ declare namespace Components {
580
647
  email_template_id?: string;
581
648
  language_code?: "de" | "en";
582
649
  }
650
+ export interface SetValueMapper {
651
+ mode: /**
652
+ * - copy_if_exists - it replaces the target attribute with the source value
653
+ * - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.
654
+ * - set_value - it sets a value to a predefined value. Must be used together with value property.
655
+ *
656
+ */
657
+ MappingAttributeMode;
658
+ /**
659
+ * JSON like target path for the attribute. Eg. last_name
660
+ */
661
+ target: string;
662
+ /**
663
+ * Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.
664
+ *
665
+ */
666
+ value: any;
667
+ }
583
668
  export interface StartExecutionRequest {
584
669
  entity_id?: /**
585
670
  * example: