Skip to content

Commit

Permalink
chore: Namananand/ins 2271 update sdk params (#28)
Browse files Browse the repository at this point in the history
Because

- update SDK params

This commit

- update SDK params
  • Loading branch information
iamnamananand996 authored Oct 6, 2023
1 parent 046c5c0 commit 2079be3
Showing 1 changed file with 38 additions and 54 deletions.
92 changes: 38 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,38 +64,24 @@ import InstillClient, {
export default function TypescriptSdkDemo() {
const [user, setUser] = useState<User[]>([]);
const [token, setToken] = useState<Nullable<string>>(null);
const client = new InstillClient("http://localhost:8080", "v1alpha", token);
const login = async () => {
const userToken = await client.Auth.authLoginAction({
payload: {
username: "admin",
password: "password",
},
});
setToken(userToken);
};
const client = new InstillClient(
"http://localhost:8080",
"v1alpha",
"" // get console API token from `http://localhost:3000/settings`
);
useEffect(() => {
login();
client.Auth.getUserQuery()
.then((data: any) => {
console.log("data", data);
setUser(data);
})
.catch((error: any) => {
console.log("error", error);
});
}, []);
useEffect(() => {
if (token) {
client.Auth.getUserQuery()
.then((data: any) => {
console.log("data", data);
setUser(data);
})
.catch((error: any) => {
console.log("error", error);
});
}
}, [token]);
return (
<>
<h1>User Data</h1>
Expand Down Expand Up @@ -166,7 +152,6 @@ export default function TypescriptSdkDemo() {
}
```


### Next APP

- [next-app](./examples/next-app/)
Expand All @@ -179,10 +164,10 @@ export default function TypescriptSdkDemo() {

### Pipelines

| function | params |
| :------------------------------------ | :----------------------------------------------------------: |
| function | params |
| :------------------------------------ | :---------------------------------------------: |
| listPipelinesQuery | pageSize, nextPageToken |
| listUserPipelinesQuery | pageSize, nextPageToken, userName |
| listUserPipelinesQuery | pageSize, nextPageToken, userName |
| getUserPipelineQuery | pipelineName |
| ListUserPipelineReleasesQuery | userName, pipelineName, pageSize, nextPageToken |
| getUserPipelineReleaseQuery | pipelineReleaseName |
Expand All @@ -194,30 +179,30 @@ export default function TypescriptSdkDemo() {
| createUserPipelineReleaseMutation | pipelineName, payload |
| updateUserPipelineReleaseMutation | pipelineReleaseName, payload |
| deleteUserPipelineReleaseMutation | pipelineReleaseName |
| triggerUserPipelineAction | pipelineName, payload, returnTraces |
| triggerAsyncUserPipelineAction | pipelineName, payload, returnTraces |
| triggerUserPipelineAction | pipelineName, payload, returnTraces |
| triggerAsyncUserPipelineAction | pipelineName, payload, returnTraces |
| setDefaultUserPipelineReleaseMutation | pipelineReleaseName |
| restoreUserPipelineReleaseMutation | pipelineReleaseName |
| triggerUserPipelineReleaseAction | pipelineReleaseName, payload, returnTraces |
| triggerAsyncUserPipelineReleaseAction | pipelineReleaseName, payload, returnTraces |
| triggerUserPipelineReleaseAction | pipelineReleaseName, payload, returnTraces |
| triggerAsyncUserPipelineReleaseAction | pipelineReleaseName, payload, returnTraces |

### Connector

| function | params |
| :---------------------------------------- | :---------------------------------------: |
| listConnectorResourcesQuery | userName, pageSize, nextPageToken, filter |
| listUserConnectorResourcesQuery | pageSize, nextPageToken, filter |
| listConnectorDefinitionsQuery | connectorDefinitionName |
| getConnectorDefinitionQuery | connectorDefinitionName |
| getUserConnectorResourceQuery | connectorDefinitionName |
| watchUserConnectorResource | userName, payload |
| createUserConnectorResourceMutation | connectorDefinitionName |
| deleteUserConnectorResourceMutation | payload |
| updateUserConnectorResourceMutation | payload |
| renameUserConnectorResource | payload |
| testUserConnectorResourceConnectionAction | connectorDefinitionName |
| connectUserConnectorResourceAction | connectorDefinitionName |
| disconnectUserConnectorResourceAction | connectorDefinitionName |
| listConnectorDefinitionsQuery | connectorDefinitionName |
| getConnectorDefinitionQuery | connectorDefinitionName |
| getUserConnectorResourceQuery | connectorDefinitionName |
| watchUserConnectorResource | userName, payload |
| createUserConnectorResourceMutation | connectorDefinitionName |
| deleteUserConnectorResourceMutation | payload |
| updateUserConnectorResourceMutation | payload |
| renameUserConnectorResource | payload |
| testUserConnectorResourceConnectionAction | connectorDefinitionName |
| connectUserConnectorResourceAction | connectorDefinitionName |
| disconnectUserConnectorResourceAction | connectorDefinitionName |

### Metric

Expand All @@ -231,8 +216,8 @@ modelDefinitionName,

### Model

| function | params |
| :------------------------ | :--------------------------------------------: |
| function | params |
| :------------------------ | :-------------------------------: |
| getModelDefinitionQuery | modelDefinitionName |
| listModelDefinitionsQuery | pageSize, nextPageToken |
| getUserModelQuery | modelName |
Expand All @@ -248,24 +233,23 @@ modelDefinitionName,

### Operation

| function | params |
| :------------------------ | :------------------------: |
| function | params |
| :------------------------ | :-----------: |
| getOperationQuery | operationName |
| checkUntilOperationIsDoen | operationName |

### Mgmt

| function | params |
| :--------------------- | :----------------------------------: |
| getUserQuery | apiToken |
| function | params |
| :--------------------- | :---------------------: |
| getUserQuery | |
| checkUserIdExist | id |
| getApiTokenQuery | tokenName |
| listApiTokensQuery | pageSize, nextPageToken |
| updateUserMutation | payload |
| createApiTokenMutation | payload |
| deleteApiTokenMutation | tokenName |


## Contribution Guidelines:

Please refer to the [Contributing Guidelines](./.github/CONTRIBUTING.md) for more details.
Expand Down

0 comments on commit 2079be3

Please sign in to comment.