-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/new-base-slider
- Loading branch information
Showing
41 changed files
with
363 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,46 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [1.0.0-alpha.57](https://github.com/empathyco/x/compare/[email protected]@1.0.0-alpha.57) (2024-10-31) | ||
|
||
**Note:** Version bump only for package vue3-migration-test | ||
|
||
|
||
|
||
|
||
|
||
## [1.0.0-alpha.56](https://github.com/empathyco/x/compare/[email protected]@1.0.0-alpha.56) (2024-10-31) | ||
|
||
**Note:** Version bump only for package vue3-migration-test | ||
|
||
|
||
|
||
|
||
|
||
## [1.0.0-alpha.55](https://github.com/empathyco/x/compare/[email protected]@1.0.0-alpha.55) (2024-10-31) | ||
|
||
**Note:** Version bump only for package vue3-migration-test | ||
|
||
|
||
|
||
|
||
|
||
## [1.0.0-alpha.54](https://github.com/empathyco/x/compare/[email protected]@1.0.0-alpha.54) (2024-10-28) | ||
|
||
**Note:** Version bump only for package vue3-migration-test | ||
|
||
|
||
|
||
|
||
|
||
## [1.0.0-alpha.53](https://github.com/empathyco/x/compare/[email protected]@1.0.0-alpha.53) (2024-10-28) | ||
|
||
**Note:** Version bump only for package vue3-migration-test | ||
|
||
|
||
|
||
|
||
|
||
## [1.0.0-alpha.52](https://github.com/empathyco/x/compare/[email protected]@1.0.0-alpha.52) (2024-10-24) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,50 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [1.1.0-alpha.8](https://github.com/empathyco/x/compare/@empathyco/[email protected]...@empathyco/[email protected]) (2024-10-31) | ||
|
||
|
||
### Features | ||
|
||
* add stats to search adapter (#1649) ([14b94ec](https://github.com/empathyco/x/commit/14b94ecf4c4a1f642232c74c22a50f4110976519)) | ||
|
||
|
||
|
||
## [1.1.0-alpha.7](https://github.com/empathyco/x/compare/@empathyco/[email protected]...@empathyco/[email protected]) (2024-10-31) | ||
|
||
**Note:** Version bump only for package @empathyco/x-adapter-platform | ||
|
||
|
||
|
||
|
||
|
||
## [1.1.0-alpha.6](https://github.com/empathyco/x/compare/@empathyco/[email protected]...@empathyco/[email protected]) (2024-10-31) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* change related prompts endpoint (#1652) ([61468cd](https://github.com/empathyco/x/commit/61468cd6b7fae02bb37f765490b8680e583de113)) | ||
|
||
|
||
|
||
## [1.1.0-alpha.5](https://github.com/empathyco/x/compare/@empathyco/[email protected]...@empathyco/[email protected]) (2024-10-28) | ||
|
||
|
||
### Features | ||
|
||
* add adapter for related prompts (#1641) ([8066983](https://github.com/empathyco/x/commit/80669835142a5e8d3823d42d599adb51ffc5849a)) | ||
|
||
|
||
|
||
## [1.1.0-alpha.4](https://github.com/empathyco/x/compare/@empathyco/[email protected]...@empathyco/[email protected]) (2024-10-28) | ||
|
||
|
||
### Features | ||
|
||
* add types for related prompts (#1640) ([9822c28](https://github.com/empathyco/x/commit/9822c285410f6d308a8a0e43f47e951b052592a2)) | ||
|
||
|
||
|
||
## [1.1.0-alpha.3](https://github.com/empathyco/x/compare/@empathyco/[email protected]...@empathyco/[email protected]) (2024-05-21) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/x-adapter-platform/src/endpoint-adapters/related-prompts.endpoint-adapter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { endpointAdapterFactory, interpolate } from '@empathyco/x-adapter'; | ||
import { RelatedPromptsRequest, RelatedPromptsResponse } from '@empathyco/x-types'; | ||
import { relatedPromptsRequestMapper } from '../mappers/requests/related-prompts-request.mapper'; | ||
import { relatedPromptsResponseMapper } from '../mappers/responses/related-prompts-response.mapper'; | ||
import { getBeaconServiceUrl } from './utils'; | ||
|
||
/** | ||
* Default adapter for the related prompt endpoint. | ||
* This endpoint does not support pagination in the request. | ||
* | ||
* @public | ||
*/ | ||
export const relatedPromptsEndpointAdapter = endpointAdapterFactory< | ||
RelatedPromptsRequest, | ||
RelatedPromptsResponse | ||
>({ | ||
endpoint: from => | ||
interpolate(`${getBeaconServiceUrl(from)}/relatedprompts/{extraParams.instance}`, from), | ||
requestMapper: relatedPromptsRequestMapper, | ||
responseMapper: relatedPromptsResponseMapper, | ||
defaultRequestOptions: { | ||
id: 'related-prompts', | ||
parameters: { | ||
internal: true | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/x-adapter-platform/src/mappers/requests/related-prompts-request.mapper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { schemaMapperFactory } from '@empathyco/x-adapter'; | ||
import { RelatedPromptsRequest } from '@empathyco/x-types'; | ||
import { PlatformRelatedPromptsRequest } from '../../types/requests/related-prompts-request.model'; | ||
import { relatedPromptsRequestSchema } from '../../schemas/requests/related-prompts-request.schema'; | ||
|
||
/** | ||
* Default implementation for the RelatedPromptsRequestMapper. | ||
*/ | ||
export const relatedPromptsRequestMapper = schemaMapperFactory< | ||
RelatedPromptsRequest, | ||
PlatformRelatedPromptsRequest | ||
>(relatedPromptsRequestSchema); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/x-adapter-platform/src/mappers/responses/related-prompts-response.mapper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { schemaMapperFactory } from '@empathyco/x-adapter'; | ||
import { RelatedPromptsResponse } from '@empathyco/x-types'; | ||
// eslint-disable-next-line max-len | ||
import { PlatformRelatedPromptsResponse } from '../../types/responses/related-prompts-response.model'; | ||
// eslint-disable-next-line max-len | ||
import { relatedPromptsResponseSchema } from '../../schemas/responses/related-prompts-response.schema'; | ||
|
||
/** | ||
* Default implementation for the RelatedPromptsResponseMapper. | ||
*/ | ||
export const relatedPromptsResponseMapper = schemaMapperFactory< | ||
PlatformRelatedPromptsResponse, | ||
RelatedPromptsResponse | ||
>(relatedPromptsResponseSchema); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/x-adapter-platform/src/schemas/models/related-prompt.schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { createMutableSchema } from '@empathyco/x-adapter'; | ||
import { RelatedPrompt } from '@empathyco/x-types'; | ||
import { PlatformRelatedPrompt } from '../../types/models/related-prompt.model'; | ||
|
||
/** | ||
* Default implementation for the RelatedPromptSchema. | ||
*/ | ||
export const relatedPromptSchema = createMutableSchema<PlatformRelatedPrompt, RelatedPrompt>({ | ||
modelName: () => 'RelatedPrompt', | ||
nextQueries: 'nextQueries', | ||
suggestionText: 'suggestionText', | ||
type: 'type' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/x-adapter-platform/src/schemas/requests/related-prompts-request.schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { createMutableSchema } from '@empathyco/x-adapter'; | ||
import { RelatedPromptsRequest } from '@empathyco/x-types'; | ||
import { PlatformRelatedPromptsRequest } from '../../types/requests/related-prompts-request.model'; | ||
|
||
/** | ||
* Default implementation for the RelatedPromptsRequestSchema. | ||
*/ | ||
export const relatedPromptsRequestSchema = createMutableSchema< | ||
RelatedPromptsRequest, | ||
PlatformRelatedPromptsRequest | ||
>({ | ||
query: 'query', | ||
extraParams: 'extraParams' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/x-adapter-platform/src/schemas/responses/related-prompts-response.schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { createMutableSchema } from '@empathyco/x-adapter'; | ||
import { RelatedPromptsResponse } from '@empathyco/x-types'; | ||
// eslint-disable-next-line max-len | ||
import { PlatformRelatedPromptsResponse } from '../../types/responses/related-prompts-response.model'; | ||
import { relatedPromptSchema } from '../models/related-prompt.schema'; | ||
|
||
/** | ||
* Default implementation for the RelatedPromptsResponseSchema. | ||
*/ | ||
export const relatedPromptsResponseSchema = createMutableSchema< | ||
PlatformRelatedPromptsResponse, | ||
RelatedPromptsResponse | ||
>({ | ||
relatedPrompts: { | ||
$path: 'data.relatedprompts', | ||
$subSchema: relatedPromptSchema | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
packages/x-adapter-platform/src/types/models/related-prompt.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* Related prompt model for the `platform` API. | ||
*/ | ||
export interface PlatformRelatedPrompt { | ||
nextQueries: string[]; | ||
suggestionText: string; | ||
type: 'SYNTHETIC' | 'CURATED'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/x-adapter-platform/src/types/requests/related-prompts-request.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { PlatformExtraParamsRequest, PlatformQueryableRequest } from './request.types'; | ||
|
||
/** | ||
* Request for the `related prompts` endpoint with `extra params`. | ||
* | ||
* @public | ||
*/ | ||
export interface PlatformRelatedPromptsRequest | ||
extends PlatformQueryableRequest, | ||
PlatformExtraParamsRequest {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/x-adapter-platform/src/types/responses/related-prompts-response.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { PlatformRelatedPrompt } from '../models/related-prompt.model'; | ||
|
||
/** | ||
* Response for the `related prompts` endpoint. | ||
*/ | ||
export interface PlatformRelatedPromptsResponse { | ||
data: { | ||
relatedprompts: PlatformRelatedPrompt[]; | ||
}; | ||
status: number; | ||
} |
Oops, something went wrong.