@@ -31,7 +31,10 @@ describe('Contacts', () => {
3131 it ( 'creates a contact' , async ( ) => {
3232 const payload : CreateContactOptions = {
333334- audienceId : '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222' ,
34+ properties : {
35+ country : 'Canada' ,
36+ edition : 1 ,
37+ } ,
3538 } ;
3639 const response : CreateContactResponseSuccess = {
3740 object : 'contact' ,
@@ -368,6 +371,7 @@ describe('Contacts', () => {
368371 last_name : '' ,
369372 created_at : '2024-01-16T18:12:26.514Z' ,
370373 unsubscribed : false ,
374+ properties : { } ,
371375 } ;
372376
373377 fetchMock . mockOnce ( JSON . stringify ( response ) , {
@@ -393,6 +397,7 @@ describe('Contacts', () => {
393397 "id": "fd61172c-cafc-40f5-b049-b45947779a29",
394398 "last_name": "",
395399 "object": "contact",
400+ "properties": {},
396401 "unsubscribed": false,
397402 },
398403 "error": null,
@@ -412,6 +417,7 @@ describe('Contacts', () => {
412417 last_name : '' ,
413418 created_at : '2024-01-16T18:12:26.514Z' ,
414419 unsubscribed : false ,
420+ properties : { } ,
415421 } ;
416422
417423 fetchMock . mockOnce ( JSON . stringify ( response ) , {
@@ -437,6 +443,7 @@ describe('Contacts', () => {
437443 "id": "fd61172c-cafc-40f5-b049-b45947779a29",
438444 "last_name": "",
439445 "object": "contact",
446+ "properties": {},
440447 "unsubscribed": false,
441448 },
442449 "error": null,
@@ -457,6 +464,16 @@ describe('Contacts', () => {
457464 last_name : '' ,
458465 created_at : '2024-01-16T18:12:26.514Z' ,
459466 unsubscribed : false ,
467+ properties : {
468+ country : {
469+ type : 'string' ,
470+ value : 'Canada' ,
471+ } ,
472+ edition : {
473+ type : 'number' ,
474+ value : 1 ,
475+ } ,
476+ } ,
460477 } ;
461478
462479 fetchMock . mockOnce ( JSON . stringify ( response ) , {
@@ -481,6 +498,16 @@ describe('Contacts', () => {
481498 "id": "fd61172c-cafc-40f5-b049-b45947779a29",
482499 "last_name": "",
483500 "object": "contact",
501+ "properties": {
502+ "country": {
503+ "type": "string",
504+ "value": "Canada",
505+ },
506+ "edition": {
507+ "type": "number",
508+ "value": 1,
509+ },
510+ },
484511 "unsubscribed": false,
485512 },
486513 "error": null,
@@ -500,6 +527,16 @@ describe('Contacts', () => {
500527 last_name : '' ,
501528 created_at : '2024-01-16T18:12:26.514Z' ,
502529 unsubscribed : false ,
530+ properties : {
531+ country : {
532+ type : 'string' ,
533+ value : 'Canada' ,
534+ } ,
535+ edition : {
536+ type : 'number' ,
537+ value : 1 ,
538+ } ,
539+ } ,
503540 } ;
504541
505542 fetchMock . mockOnce ( JSON . stringify ( response ) , {
@@ -524,6 +561,16 @@ describe('Contacts', () => {
524561 "id": "fd61172c-cafc-40f5-b049-b45947779a29",
525562 "last_name": "",
526563 "object": "contact",
564+ "properties": {
565+ "country": {
566+ "type": "string",
567+ "value": "Canada",
568+ },
569+ "edition": {
570+ "type": "number",
571+ "value": 1,
572+ },
573+ },
527574 "unsubscribed": false,
528575 },
529576 "error": null,
@@ -541,6 +588,16 @@ describe('Contacts', () => {
541588 first_name : '' ,
542589 last_name : '' ,
543590 created_at : '2024-01-16T18:12:26.514Z' ,
591+ properties : {
592+ country : {
593+ type : 'string' ,
594+ value : 'Canada' ,
595+ } ,
596+ edition : {
597+ type : 'number' ,
598+ value : 1 ,
599+ } ,
600+ } ,
544601 unsubscribed : false ,
545602 } ;
546603
@@ -563,6 +620,16 @@ describe('Contacts', () => {
563620 "id": "fd61172c-cafc-40f5-b049-b45947779a29",
564621 "last_name": "",
565622 "object": "contact",
623+ "properties": {
624+ "country": {
625+ "type": "string",
626+ "value": "Canada",
627+ },
628+ "edition": {
629+ "type": "number",
630+ "value": 1,
631+ },
632+ },
566633 "unsubscribed": false,
567634 },
568635 "error": null,
@@ -589,6 +656,16 @@ describe('Contacts', () => {
589656 first_name : '' ,
590657 last_name : '' ,
591658 created_at : '2024-01-16T18:12:26.514Z' ,
659+ properties : {
660+ country : {
661+ type : 'string' ,
662+ value : 'Canada' ,
663+ } ,
664+ edition : {
665+ type : 'number' ,
666+ value : 1 ,
667+ } ,
668+ } ,
592669 unsubscribed : false ,
593670 } ;
594671
@@ -611,6 +688,16 @@ describe('Contacts', () => {
611688 "id": "fd61172c-cafc-40f5-b049-b45947779a29",
612689 "last_name": "",
613690 "object": "contact",
691+ "properties": {
692+ "country": {
693+ "type": "string",
694+ "value": "Canada",
695+ },
696+ "edition": {
697+ "type": "number",
698+ "value": 1,
699+ },
700+ },
614701 "unsubscribed": false,
615702 },
616703 "error": null,
@@ -635,8 +722,11 @@ describe('Contacts', () => {
635722 it ( 'updates a contact' , async ( ) => {
636723 const payload : UpdateContactOptions = {
637724 id : '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87223' ,
638- audienceId : '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222' ,
639725 firstName : 'Bu' ,
726+ properties : {
727+ country : 'Canada' ,
728+ edition : 1 ,
729+ } ,
640730 } ;
641731 const response = {
642732 id : '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87223' ,
0 commit comments