@@ -17,6 +17,7 @@ import {
1717 PostIndexEndpoint ,
1818 PutElementEndpoint ,
1919} from '../Endpoint/Element/index.js' ;
20+ import { PostSearchEndpoint } from '../Endpoint/Search/PostSearchEndpoint.js' ;
2021import {
2122 DeleteTokenEndpoint ,
2223 GetMeEndpoint ,
@@ -38,6 +39,8 @@ import {
3839 Uuid ,
3940} from '../Type/Definition/index.js' ;
4041import { ParsedResponse } from '../Type/Definition/Response/index.js' ;
42+ import { Step } from '../Type/Definition/Search/Step/index.js' ;
43+ import { StepResult } from '../Type/Definition/Search/StepResult/index.js' ;
4144import { ServiceIdentifier } from '../Type/Enum/index.js' ;
4245
4346class ApiWrapper {
@@ -60,6 +63,7 @@ class ApiWrapper {
6063 private postTokenEndpoint : PostTokenEndpoint ,
6164 private getTokenEndpoint : GetTokenEndpoint ,
6265 private deleteTokenEndpoint : DeleteTokenEndpoint ,
66+ private postSearchEndpoint : PostSearchEndpoint ,
6367 private elementCache : ElementCache ,
6468 private elementChildrenCache : ElementChildrenCache ,
6569 private elementParentsCache : ElementParentsCache ,
@@ -93,6 +97,7 @@ class ApiWrapper {
9397 serviceResolver . getServiceOrFail < PostTokenEndpoint > ( ServiceIdentifier . endpointUserPostTokenEndpoint ) ,
9498 serviceResolver . getServiceOrFail < GetTokenEndpoint > ( ServiceIdentifier . endpointUserGetTokenEndpoint ) ,
9599 serviceResolver . getServiceOrFail < DeleteTokenEndpoint > ( ServiceIdentifier . endpointUserDeleteTokenEndpoint ) ,
100+ serviceResolver . getServiceOrFail < PostSearchEndpoint > ( ServiceIdentifier . endpointSearchPostSearchEndpoint ) ,
96101 serviceResolver . getServiceOrFail < ElementCache > ( ServiceIdentifier . cacheElement ) ,
97102 serviceResolver . getServiceOrFail < ElementChildrenCache > ( ServiceIdentifier . cacheElementChildren ) ,
98103 serviceResolver . getServiceOrFail < ElementParentsCache > ( ServiceIdentifier . cacheElementParents ) ,
@@ -537,6 +542,18 @@ class ApiWrapper {
537542 public async deleteToken ( ) : Promise < void > {
538543 await this . deleteTokenEndpoint . deleteToken ( ) ;
539544 }
545+
546+ /**
547+ * @experimental
548+ */
549+ public async postSearch (
550+ steps : Step [ ] ,
551+ parameters : null | Record < string , unknown > = null ,
552+ debug : boolean = false ,
553+ ) : Promise < StepResult [ ] > {
554+ const parsedResponse = await this . postSearchEndpoint . postSearch ( steps , parameters , debug ) ;
555+ return parsedResponse . data ;
556+ }
540557}
541558
542559export { ApiWrapper } ;
0 commit comments