This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from superfaceai/feature/codegen
feat: Add Generate command
- Loading branch information
Showing
45 changed files
with
846 additions
and
84 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 |
---|---|---|
|
@@ -8,11 +8,12 @@ jobs: | |
steps: | ||
# Setup environment and checkout the project master | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v1.4.4 | ||
uses: actions/setup-node@v2 | ||
with: | ||
registry-url: "https://npm.pkg.github.com" | ||
scope: "@superfaceai" | ||
always-auth: true | ||
node-version: '14' | ||
|
||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -42,11 +43,12 @@ jobs: | |
steps: | ||
# Setup environment and checkout the project master | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v1.4.4 | ||
uses: actions/setup-node@v2 | ||
with: | ||
registry-url: "https://npm.pkg.github.com" | ||
scope: "@superfaceai" | ||
always-auth: true | ||
node-version: '14' | ||
|
||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -76,11 +78,12 @@ jobs: | |
steps: | ||
# Setup environment and checkout the project master | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v1.4.4 | ||
uses: actions/setup-node@v2 | ||
with: | ||
registry-url: "https://npm.pkg.github.com" | ||
scope: "@superfaceai" | ||
always-auth: true | ||
node-version: '14' | ||
|
||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
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 |
---|---|---|
|
@@ -11,11 +11,13 @@ jobs: | |
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v1.4.4 | ||
uses: actions/setup-node@v2 | ||
with: | ||
registry-url: "https://npm.pkg.github.com" | ||
# Defaults to the user or organization that owns the workflow file | ||
scope: "@superfaceai" | ||
node-version: '14' | ||
|
||
|
||
# Install dependencies and run test | ||
- name: Install dependencies | ||
|
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
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
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,6 @@ | ||
import { createTypedClient } from "@superfaceai/one-sdk"; | ||
import { starwarsCharacterInformation } from "./types/starwars/character-information"; | ||
export const typeDefinitions = { | ||
...starwarsCharacterInformation | ||
}; | ||
export const SuperfaceClient = createTypedClient(typeDefinitions); |
16 changes: 16 additions & 0 deletions
16
fixtures/install/playground/superface/types/starwars/character-information.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,16 @@ | ||
import { typeHelper } from '@superfaceai/one-sdk'; | ||
/** Starwars **/ | ||
export interface RetrieveCharacterInformationInput { | ||
characterName?: unknown; | ||
} | ||
/** Starwars **/ | ||
export interface RetrieveCharacterInformationResult { | ||
height?: unknown; | ||
weight?: unknown; | ||
yearOfBirth?: unknown; | ||
} | ||
export const starwarsCharacterInformation = { | ||
"starwars/character-information": { | ||
"RetrieveCharacterInformation": typeHelper<RetrieveCharacterInformationInput, RetrieveCharacterInformationResult>() | ||
} | ||
}; |
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
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
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
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
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
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
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
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,5 @@ | ||
export const enum ErrorCodes { | ||
INVALID_PROFILE_NAME = 1001, | ||
INVALID_VALUE_UNTYPED_TYPE = 1002, | ||
INVALID_PROFILE = 1003, | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export type LogCallback = (message: string) => void; |
Oops, something went wrong.