Skip to content

Commit

Permalink
chore: update example (#84)
Browse files Browse the repository at this point in the history
Because

- update example

This commit

- update example
  • Loading branch information
iamnamananand996 authored May 24, 2024
1 parent 4b08bad commit 564b030
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 65 deletions.
104 changes: 51 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default function TypescriptSdkDemo() {
);
useEffect(() => {
client.Auth.getUserQuery()
client.Auth.getUserQuery({ userName: "users/admin" })
.then((data: any) => {
console.log("data", data);
setUser(data);
Expand Down Expand Up @@ -229,27 +229,27 @@ client.PipelineClient.createUserPipelineMutation("<userName>",
```

| function | params |
| :------------------------------------ | :---------------------------------------------: |
| listPipelinesQuery | pageSize, nextPageToken, enablePagination |
| function | params |
| :------------------------------------ | :-------------------------------------------------: |
| listPipelinesQuery | pageSize, nextPageToken, enablePagination |
| listUserPipelinesQuery | pageSize, nextPageToken, userName, enablePagination |
| getUserPipelineQuery | pipelineName |
| ListUserPipelineReleasesQuery | userName, pipelineName, pageSize, nextPageToken |
| getUserPipelineReleaseQuery | pipelineReleaseName |
| watchUserPipelineReleaseQuery | pipelineReleaseName |
| createUserPipelineMutation | userName, payload |
| updateUserPipelineMutation | payload |
| deleteUserPipelineMutation | pipelineName |
| renameUserPipelineMutation | payload |
| createUserPipelineReleaseMutation | pipelineName, payload |
| updateUserPipelineReleaseMutation | pipelineReleaseName, payload |
| deleteUserPipelineReleaseMutation | pipelineReleaseName |
| getUserPipelineQuery | pipelineName |
| ListUserPipelineReleasesQuery | userName, pipelineName, pageSize, nextPageToken |
| getUserPipelineReleaseQuery | pipelineReleaseName |
| watchUserPipelineReleaseQuery | pipelineReleaseName |
| createUserPipelineMutation | userName, payload |
| updateUserPipelineMutation | payload |
| deleteUserPipelineMutation | pipelineName |
| renameUserPipelineMutation | payload |
| createUserPipelineReleaseMutation | pipelineName, payload |
| updateUserPipelineReleaseMutation | pipelineReleaseName, payload |
| deleteUserPipelineReleaseMutation | pipelineReleaseName |
| triggerUserPipelineAction | pipelineName, payload, returnTraces, shareCode |
| triggerAsyncUserPipelineAction | pipelineName, payload, returnTraces |
| setDefaultUserPipelineReleaseMutation | pipelineReleaseName |
| restoreUserPipelineReleaseMutation | pipelineReleaseName |
| triggerUserPipelineReleaseAction | pipelineReleaseName, payload, returnTraces |
| triggerAsyncUserPipelineReleaseAction | pipelineReleaseName, payload, returnTraces |
| triggerAsyncUserPipelineAction | pipelineName, payload, returnTraces |
| setDefaultUserPipelineReleaseMutation | pipelineReleaseName |
| restoreUserPipelineReleaseMutation | pipelineReleaseName |
| triggerUserPipelineReleaseAction | pipelineReleaseName, payload, returnTraces |
| triggerAsyncUserPipelineReleaseAction | pipelineReleaseName, payload, returnTraces |

### Connector

Expand All @@ -275,21 +275,21 @@ query.ConnectorClient.createUserConnectorMutation("<userName>",
})
```

| function | params |
| :---------------------------------------- | :---------------------------------------: |
| listConnectorsQuery | pageSize, nextPageToken, filter |
| listUserConnectorsQuery | userName, pageSize, nextPageToken, filter |
| listConnectorDefinitionsQuery | connectorDefinitionName |
| getConnectorDefinitionQuery | connectorDefinitionName |
| getUserConnectorQuery | connectorName |
| watchUserConnector | connectorName |
| createUserConnectorMutation | entityName, payload |
| deleteUserConnectorMutation | connectorName |
| updateUserConnectorMutation | payload |
| renameUserConnector | payload |
| testUserConnectorConnectionAction | connectorName |
| connectUserConnectorAction | connectorName |
| disconnectUserConnectorAction | connectorName |
| function | params |
| :-------------------------------- | :---------------------------------------: |
| listConnectorsQuery | pageSize, nextPageToken, filter |
| listUserConnectorsQuery | userName, pageSize, nextPageToken, filter |
| listConnectorDefinitionsQuery | connectorDefinitionName |
| getConnectorDefinitionQuery | connectorDefinitionName |
| getUserConnectorQuery | connectorName |
| watchUserConnector | connectorName |
| createUserConnectorMutation | entityName, payload |
| deleteUserConnectorMutation | connectorName |
| updateUserConnectorMutation | payload |
| renameUserConnector | payload |
| testUserConnectorConnectionAction | connectorName |
| connectUserConnectorAction | connectorName |
| disconnectUserConnectorAction | connectorName |

### Metric

Expand Down Expand Up @@ -323,23 +323,21 @@ query.ConnectorClient.createUserConnectorMutation("<userName>",
| getOperationQuery | operationName |
| checkUntilOperationIsDoen | operationName |


### Oraganization

| function | params |
| :--------------------------------- | :-----------------------------: |
| getOrganizationMembershipQuery | organizationID, userID |
| getOrganizationQuery | organizationID |
| getUserMembershipQuery | organizationID, userID |
| getUserMembershipsQuery | userID |
| listOrganizationsQuery | pageSize, nextPageToken, filter |
| createOrganizationMutation | payload |
| deleteOrganizationMutation | organizationName |
| deleteUserMembershipMutation | organizationID, userID |
| updateOrganizationMembershipMutation | payload |
| updateOrganizationMutation | payload |
| updateUserMembershipMutation | payload |

| function | params |
| :----------------------------------- | :-----------------------------: |
| getOrganizationMembershipQuery | organizationID, userID |
| getOrganizationQuery | organizationID |
| getUserMembershipQuery | organizationID, userID |
| getUserMembershipsQuery | userID |
| listOrganizationsQuery | pageSize, nextPageToken, filter |
| createOrganizationMutation | payload |
| deleteOrganizationMutation | organizationName |
| deleteUserMembershipMutation | organizationID, userID |
| updateOrganizationMembershipMutation | payload |
| updateOrganizationMutation | payload |
| updateUserMembershipMutation | payload |

### Mgmt

Expand All @@ -360,16 +358,16 @@ client.AuthClient.createApiTokenMutation({
```

| function | params |
| :--------------------- | :---------------------: |
| :------------------------------ | :---------------------: |
| getUserQuery | userName |
| getAuthenticatedUserQuery | |
| getAuthenticatedUserQuery | |
| checkUserIdExist | id |
| getApiTokenQuery | tokenName |
| listApiTokensQuery | pageSize, nextPageToken |
| updateAuthenticatedUserMutation | payload |
| createApiTokenMutation | payload |
| deleteApiTokenMutation | tokenName |
| checkNamespace | id |
| checkNamespace | id |

## Contribution Guidelines:

Expand Down
2 changes: 1 addition & 1 deletion examples/next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"instill-sdk": "0.0.6",
"instill-sdk": "0.0.7",
"next": "^14.2.3",
"react": "latest",
"react-dom": "latest"
Expand Down
8 changes: 4 additions & 4 deletions examples/next-app/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/next-app/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function TypescriptSdkDemo() {
);

useEffect(() => {
client.Auth.getUserQuery()
client.Auth.getUserQuery({ userName: "users/admin" })
.then((data: any) => {
console.log("data", data);
setUser(data);
Expand Down
2 changes: 1 addition & 1 deletion examples/node-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "index.js",
"dependencies": {
"instill-sdk": "0.0.6",
"instill-sdk": "0.0.7",
"express": "^4.19.2"
},
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions examples/node-app/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/node-app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const client = new InstillClient(
// Define a route for listing pipelines using the SDK
app.get("/", async (req, res) => {
try {
const data = await client.Auth.getUserQuery();
const data = await client.Auth.getUserQuery({ userName: "users/admin" });
res.json(data);
} catch (error) {
console.error("Error:", error);
Expand Down

0 comments on commit 564b030

Please sign in to comment.