@@ -12,8 +12,9 @@ import {
1212 ScheduleUpdateOptions ,
1313} from '@temporalio/client' ;
1414import { msToNumber } from '@temporalio/common/lib/time' ;
15- import { SearchAttributes , SearchAttributeType , TypedSearchAttributes } from '@temporalio/common' ;
15+ import { SearchAttributes , TypedSearchAttributes } from '@temporalio/common' ;
1616import { registerDefaultCustomSearchAttributes , RUN_INTEGRATION_TESTS } from './helpers' ;
17+ import { defaultSAKeys } from './helpers-integration' ;
1718
1819export interface Context {
1920 client : Client ;
@@ -168,9 +169,7 @@ if (RUN_INTEGRATION_TESTS) {
168169 searchAttributes : {
169170 CustomKeywordField : [ 'test-value2' ] ,
170171 } ,
171- typedSearchAttributes : new TypedSearchAttributes ( [
172- { key : { name : 'CustomIntField' , type : SearchAttributeType . INT } , value : 42 } ,
173- ] ) ,
172+ typedSearchAttributes : new TypedSearchAttributes ( [ { key : defaultSAKeys . CustomIntField , value : 42 } ] ) ,
174173 } ,
175174 } ) ;
176175
@@ -188,8 +187,8 @@ if (RUN_INTEGRATION_TESTS) {
188187 t . deepEqual (
189188 describedSchedule . action . typedSearchAttributes ,
190189 new TypedSearchAttributes ( [
191- { key : { name : 'CustomIntField' , type : SearchAttributeType . INT } , value : 42 } ,
192- { key : { name : 'CustomKeywordField' , type : SearchAttributeType . KEYWORD } , value : 'test-value2' } ,
190+ { key : defaultSAKeys . CustomIntField , value : 42 } ,
191+ { key : defaultSAKeys . CustomKeywordField , value : 'test-value2' } ,
193192 ] )
194193 ) ;
195194 } finally {
@@ -216,9 +215,7 @@ if (RUN_INTEGRATION_TESTS) {
216215 searchAttributes : {
217216 CustomKeywordField : [ 'test-value2' ] ,
218217 } ,
219- typedSearchAttributes : new TypedSearchAttributes ( [
220- { key : { name : 'CustomIntField' , type : SearchAttributeType . INT } , value : 42 } ,
221- ] ) ,
218+ typedSearchAttributes : new TypedSearchAttributes ( [ { key : defaultSAKeys . CustomIntField , value : 42 } ] ) ,
222219 } ,
223220 } ) ;
224221
@@ -237,8 +234,8 @@ if (RUN_INTEGRATION_TESTS) {
237234 t . deepEqual (
238235 describedSchedule . action . typedSearchAttributes ,
239236 new TypedSearchAttributes ( [
240- { key : { name : 'CustomIntField' , type : SearchAttributeType . INT } , value : 42 } ,
241- { key : { name : 'CustomKeywordField' , type : SearchAttributeType . KEYWORD } , value : 'test-value2' } ,
237+ { key : defaultSAKeys . CustomIntField , value : 42 } ,
238+ { key : defaultSAKeys . CustomKeywordField , value : 'test-value2' } ,
242239 ] )
243240 ) ;
244241 } finally {
@@ -351,9 +348,7 @@ if (RUN_INTEGRATION_TESTS) {
351348 searchAttributes : {
352349 CustomKeywordField : [ 'test-value2' ] ,
353350 } ,
354- typedSearchAttributes : new TypedSearchAttributes ( [
355- { key : { name : 'CustomIntField' , type : SearchAttributeType . INT } , value : 42 } ,
356- ] ) ,
351+ typedSearchAttributes : new TypedSearchAttributes ( [ { key : defaultSAKeys . CustomIntField , value : 42 } ] ) ,
357352 } ,
358353 } ) ;
359354
@@ -598,9 +593,7 @@ if (RUN_INTEGRATION_TESTS) {
598593 taskQueue,
599594 } ,
600595 searchAttributes,
601- typedSearchAttributes : new TypedSearchAttributes ( [
602- { key : { name : 'CustomIntField' , type : SearchAttributeType . INT } , value : 42 } ,
603- ] ) ,
596+ typedSearchAttributes : new TypedSearchAttributes ( [ { key : defaultSAKeys . CustomIntField , value : 42 } ] ) ,
604597 } )
605598 ) ;
606599 }
0 commit comments