Skip to content

Commit

Permalink
feat(javascript): expose models (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Mar 15, 2022
1 parent dfc6644 commit 1c71efd
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
# The patterns follow closely to .gitignore or .dockerignore.

git_push.sh
model/models.ts
.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
# The patterns follow closely to .gitignore or .dockerignore.

git_push.sh
model/models.ts
.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
# The patterns follow closely to .gitignore or .dockerignore.

git_push.sh
model/models.ts
.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
# The patterns follow closely to .gitignore or .dockerignore.

git_push.sh
model/models.ts
.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
# The patterns follow closely to .gitignore or .dockerignore.

git_push.sh
model/models.ts
.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
# The patterns follow closely to .gitignore or .dockerignore.

git_push.sh
model/models.ts
.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
# The patterns follow closely to .gitignore or .dockerignore.

git_push.sh
model/models.ts
.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
# The patterns follow closely to .gitignore or .dockerignore.

git_push.sh
model/models.ts
.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
# The patterns follow closely to .gitignore or .dockerignore.

git_push.sh
model/models.ts
.gitignore
4 changes: 3 additions & 1 deletion playground/javascript/node/algoliasearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { algoliasearch } from '@experimental-api-clients-automation/algoliasearc
import { ApiError } from '@experimental-api-clients-automation/client-common';
import dotenv from 'dotenv';

import type { SearchResponse } from '@experimental-api-clients-automation/client-search';

dotenv.config({ path: '../../.env' });

const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
Expand Down Expand Up @@ -29,7 +31,7 @@ client.addUserAgent('algoliasearch node playground', '0.0.1');

async function testAlgoliasearch() {
try {
const res = await client.search({
const res: SearchResponse = await client.search({
indexName: searchIndex,
searchParams: { query: searchQuery },
});
Expand Down
1 change: 1 addition & 0 deletions templates/javascript/api-single.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import type {
import { {{classname}} } from '{{filename}}';
{{/imports}}

export * from '../model/models';
export const apiClientVersion = '{{packageVersion}}';

{{#operations}}
Expand Down
5 changes: 5 additions & 0 deletions templates/javascript/models.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{#models}}
{{#model}}
export * from '{{{ classFilename }}}';
{{/model}}
{{/models}}

0 comments on commit 1c71efd

Please sign in to comment.