Skip to content

Commit

Permalink
upgrade sdk-xero
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinsandilya committed Apr 1, 2024
1 parent 609ee7a commit 4f700f7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions connectors/connector-xero/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"sideEffects": [],
"module": "./index.ts",
"dependencies": {
"@opensdks/runtime": "^0.0.16",
"@opensdks/sdk-xero": "^0.0.5",
"@opensdks/runtime": "^0.0.19",
"@opensdks/sdk-xero": "^0.0.6",
"@opensdks/util-zod": "^0.0.15",
"@usevenice/cdk": "workspace:*",
"@usevenice/util": "workspace:*"
Expand Down
11 changes: 5 additions & 6 deletions connectors/connector-xero/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,25 @@ export const xeroServer = {
},
sourceSync: ({instance: xero}) => {
// TODO(@jatin): Add logic here to handle sync.
// TODO: ensure instance has typesafety for some reason the types are not present here :/.
console.log('[xero] Starting sync', xero)
console.log('[xero] Starting sync')
const getAll = async () => {
const result = await xero.client.GET('/Accounts', {
const result = await xero.GET('/Accounts', {
params: {
header: {
'xero-tenant-id': '35325d8f-5087-4c6d-b413-c3f740c26f2e', // TODO: Remove hardcoding
},
},
})
console.log('result', result)
return result.data?.Accounts
return result
}

getAll()
.then((res) => console.log('[data test]', res))
.catch((err) => console.log('error', err))

return rxjs.empty()
return rxjs.empty() // TODO: replace with data above.
},
} satisfies ConnectorServer<typeof xeroSchemas>
} satisfies ConnectorServer<typeof xeroSchemas, ReturnType<typeof initXeroSDK>>

export default xeroServer
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

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

0 comments on commit 4f700f7

Please sign in to comment.