Skip to content

Versions for API based Datasources #1103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Aug 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6b54810
add version field to plugin definition.
goldants Aug 2, 2024
da3c0aa
refactor code and test with twilio plugin
goldants Aug 2, 2024
733591c
Add s3 spec version
goldants Aug 5, 2024
a3fc994
Add dynamo spec version
goldants Aug 5, 2024
f4a3592
Add firebase spec version
goldants Aug 5, 2024
7059b79
Add couchdb spec version
goldants Aug 5, 2024
10d5859
Add woocommerce spec version
goldants Aug 5, 2024
ceeec59
Add openai spec version
goldants Aug 5, 2024
df93bd8
Add gcstorage spec version
goldants Aug 5, 2024
70101b7
Add stripe spec version
goldants Aug 5, 2024
e3866a9
Add asana, circleci spec version
goldants Aug 5, 2024
cd4c117
Add front, github spec version
goldants Aug 5, 2024
222cf9c
Add huggingface, jira, onesignal spec version
goldants Aug 5, 2024
206e03c
Add cloudinary, datadog, lowcoder, notion, postmanecho, sendgrid spec…
goldants Aug 5, 2024
998625e
remove test code
goldants Aug 5, 2024
13212ef
backward compatibility when no version is selected
goldants Aug 6, 2024
3819c30
Merge branch 'dev' into feature/spec_version
goldants Aug 6, 2024
21bf504
resolve test issue
goldants Aug 6, 2024
c158d44
Merge branch 'dev' into feature/spec_version
goldants Aug 6, 2024
03688bf
add test case
goldants Aug 7, 2024
1ca3b02
Merge branch 'versions-for-datasources' into feature/spec_version
FalkWolsky Aug 9, 2024
15e33f0
Merge pull request #1078 from goldants/feature/spec_version
FalkWolsky Aug 9, 2024
b831451
Sorting Twilio into Versions
Aug 10, 2024
1a50316
Merge branch 'dev' into versions-for-datasources
FalkWolsky Aug 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add woocommerce spec version
  • Loading branch information
Thomasr committed Aug 5, 2024
commit 10d5859fb89f9857b1b14c32fa404e93ccea1f9c
6 changes: 3 additions & 3 deletions server/node-service/src/plugins/woocommerce/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ const wooCommercePlugin: DataSourcePlugin<any, DataSourceConfigType> = {
icon: "woocommerce.svg",
category: "api",
dataSourceConfig,
queryConfig: async () => {
const { actions, categories } = await parseOpenApi(spec as OpenAPI.Document, parseOptions);
queryConfig: async (data) => {
const { actions, categories } = await parseOpenApi(specs[data.specVersion as keyof typeof specs] as OpenAPI.Document, parseOptions);
return {
type: "query",
label: "Operation",
Expand All @@ -98,7 +98,7 @@ const wooCommercePlugin: DataSourcePlugin<any, DataSourceConfigType> = {
dynamicParamsConfig: otherDataSourceConfig,
specVersion: dataSourceConfig.specVersion
};
return runOpenApi(actionData, runApiDsConfig, spec as unknown as OpenAPIV2.Document);
return runOpenApi(actionData, runApiDsConfig, specs[dataSourceConfig.specVersion as keyof typeof specs] as unknown as OpenAPIV2.Document);
},
};

Expand Down