@isomorph.ai/app-sdk 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -673,8 +673,11 @@ export function createClient(options = {}) {
673
673
  method: 'POST', body: JSON.stringify({ connection, operation, resource, ...(input !== undefined ? { input } : {}), ...(idempotencyKey !== undefined ? { idempotencyKey } : {}), ...(operation === 'slack.message.post' && mode !== undefined ? { mode } : {}) }),
674
674
  });
675
675
  },
676
+ // In a browser the consent returns the person to this page (without its
677
+ // fragment); governance accepts it only as a registered page of this app
678
+ // (ADR 0030). Outside a browser there is no page, and none is sent.
676
679
  connect: (connection) => transport.json('/_harbour/integrations/connect', {
677
- method: 'POST', body: JSON.stringify({ connection }),
680
+ method: 'POST', body: JSON.stringify({ connection, ...(typeof location !== 'undefined' && typeof location.href === 'string' ? { returnUrl: location.href.split('#')[0] } : {}) }),
678
681
  }),
679
682
  disconnect: (connection) => transport.json('/_harbour/integrations/connect', {
680
683
  method: 'DELETE', body: JSON.stringify({ connection }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isomorph.ai/app-sdk",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",