@uniformdev/mesh-sdk 20.72.3-alpha.3 → 20.72.3-alpha.5

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.
package/dist/index.esm.js CHANGED
@@ -7,7 +7,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
7
7
 
8
8
  // src/clients/IntegrationDefinitionClient.ts
9
9
  import { ApiClient } from "@uniformdev/context/api";
10
- var _url;
10
+ var _url, _credentialsUrl;
11
11
  var _IntegrationDefinitionClient = class _IntegrationDefinitionClient extends ApiClient {
12
12
  constructor(options) {
13
13
  super(options);
@@ -18,7 +18,7 @@ var _IntegrationDefinitionClient = class _IntegrationDefinitionClient extends Ap
18
18
  const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url), { ...options, teamId });
19
19
  return await this.apiClient(fetchUri);
20
20
  }
21
- /** Creates or updates a mesh app definition on a team */
21
+ /** Creates or updates a mesh app definition on a team. Identity-delegation credentials must be minted separately via {@link rotateCredential}. */
22
22
  async upsert(body) {
23
23
  const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
24
24
  return await this.apiClient(fetchUri, {
@@ -35,9 +35,37 @@ var _IntegrationDefinitionClient = class _IntegrationDefinitionClient extends Ap
35
35
  expectNoContent: true
36
36
  });
37
37
  }
38
+ /**
39
+ * Mints or rotates an identity-delegation credential for an integration definition. The plaintext
40
+ * `appSecret` is returned exactly once and is not retrievable afterwards — Uniform stores only
41
+ * the hash. A successful response invalidates any previously-issued secret of the same kind.
42
+ * Caller must be a team admin.
43
+ */
44
+ async rotateCredential(body) {
45
+ const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _credentialsUrl));
46
+ return await this.apiClient(fetchUri, {
47
+ method: "POST",
48
+ body: JSON.stringify({ ...body, teamId: this.options.teamId })
49
+ });
50
+ }
51
+ /**
52
+ * Revokes an identity-delegation credential. Future delegation grants and refreshes will fail
53
+ * until a new credential is minted; in-flight delegation tokens remain valid until natural
54
+ * expiry (up to ~15 minutes). Caller must be a team admin.
55
+ */
56
+ async revokeCredential(body) {
57
+ const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _credentialsUrl));
58
+ await this.apiClient(fetchUri, {
59
+ method: "DELETE",
60
+ body: JSON.stringify({ ...body, teamId: this.options.teamId }),
61
+ expectNoContent: true
62
+ });
63
+ }
38
64
  };
39
65
  _url = new WeakMap();
66
+ _credentialsUrl = new WeakMap();
40
67
  __privateAdd(_IntegrationDefinitionClient, _url, "/api/v1/integration-definitions");
68
+ __privateAdd(_IntegrationDefinitionClient, _credentialsUrl, "/api/v1/integration-credentials");
41
69
  var IntegrationDefinitionClient = _IntegrationDefinitionClient;
42
70
 
43
71
  // src/clients/IntegrationInstallationClient.ts
@@ -86,6 +114,10 @@ _url2 = new WeakMap();
86
114
  __privateAdd(_IntegrationInstallationClient, _url2, "/api/v1/integration-installations");
87
115
  var IntegrationInstallationClient = _IntegrationInstallationClient;
88
116
 
117
+ // src/delegation/csrfConstants.ts
118
+ var CSRF_HEADER_NAME = "x-mesh-csrf";
119
+ var CSRF_HEADER_VALUE = "1";
120
+
89
121
  // src/locations/aiAgents.ts
90
122
  var functionCallSystemParameters = ["pageHtml"];
91
123
  function parseFunctionCall(request) {
@@ -488,56 +520,63 @@ async function connectToParent({
488
520
  });
489
521
  client.onRequest("metadata-value", onMetadataUpdated);
490
522
  client.onRequest("external-value-update", onValueExternallyUpdated);
523
+ const parent = {
524
+ resize: async ({ height }) => {
525
+ await client.request("resize", { height });
526
+ },
527
+ setValue: async (value) => {
528
+ await client.request("setValue", value);
529
+ },
530
+ openDialog: async (message) => {
531
+ const res = await client.request(
532
+ "openDialog",
533
+ message
534
+ );
535
+ const dialogId = res == null ? void 0 : res.dialogId;
536
+ if (!dialogId) {
537
+ return;
538
+ }
539
+ return new Promise((resolve, reject) => {
540
+ dialogResponseHandlers[dialogId] = { resolve, reject };
541
+ });
542
+ },
543
+ closeDialog: async (message) => {
544
+ await client.request("closeDialog", message);
545
+ },
546
+ getDataResource: async (message) => {
547
+ return await client.request("getDataResource", message, {
548
+ timeout: 3e4
549
+ });
550
+ },
551
+ navigate: async (message) => {
552
+ await client.request("navigate", message);
553
+ },
554
+ reloadLocation: async () => {
555
+ await client.request("reload");
556
+ },
557
+ editConnectedData: async (message) => {
558
+ return await client.request(
559
+ "editConnectedData",
560
+ message,
561
+ {
562
+ timeout: (
563
+ // 24 hours in ms
564
+ 864e5
565
+ )
566
+ }
567
+ );
568
+ },
569
+ getSessionToken: async () => {
570
+ return await client.request("getSessionToken", void 0, {
571
+ // Delegation may wait on consent UI + token API; default framepost timeout (5s) is too short.
572
+ timeout: 12e4
573
+ });
574
+ },
575
+ editorState: createEditorStateApi(client)
576
+ };
491
577
  return {
492
578
  initData,
493
- parent: {
494
- resize: async ({ height }) => {
495
- await client.request("resize", { height });
496
- },
497
- setValue: async (value) => {
498
- await client.request("setValue", value);
499
- },
500
- openDialog: async (message) => {
501
- const res = await client.request(
502
- "openDialog",
503
- message
504
- );
505
- const dialogId = res == null ? void 0 : res.dialogId;
506
- if (!dialogId) {
507
- return;
508
- }
509
- return new Promise((resolve, reject) => {
510
- dialogResponseHandlers[dialogId] = { resolve, reject };
511
- });
512
- },
513
- closeDialog: async (message) => {
514
- await client.request("closeDialog", message);
515
- },
516
- getDataResource: async (message) => {
517
- return await client.request("getDataResource", message, {
518
- timeout: 3e4
519
- });
520
- },
521
- navigate: async (message) => {
522
- await client.request("navigate", message);
523
- },
524
- reloadLocation: async () => {
525
- await client.request("reload");
526
- },
527
- editConnectedData: async (message) => {
528
- return await client.request(
529
- "editConnectedData",
530
- message,
531
- {
532
- timeout: (
533
- // 24 hours in ms
534
- 864e5
535
- )
536
- }
537
- );
538
- },
539
- editorState: createEditorStateApi(client)
540
- }
579
+ parent
541
580
  };
542
581
  }
543
582
  function createEditorStateApi(client) {
@@ -923,7 +962,8 @@ async function initializeUniformMeshSDK({
923
962
  },
924
963
  closeCurrentLocationDialog: async () => {
925
964
  await parent.closeDialog({ dialogId: void 0, dialogType: "currentLocation" });
926
- }
965
+ },
966
+ getSessionToken: () => parent.getSessionToken()
927
967
  };
928
968
  window.UniformMeshSDK = sdk;
929
969
  initializing = false;
@@ -945,6 +985,8 @@ var hasRole = (role, user) => {
945
985
  return user.roles.some((userRole) => userRole.name === role || userRole.id === role);
946
986
  };
947
987
  export {
988
+ CSRF_HEADER_NAME,
989
+ CSRF_HEADER_VALUE,
948
990
  IntegrationDefinitionClient,
949
991
  IntegrationInstallationClient,
950
992
  functionCallSystemParameters,
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ if (typeof process !== 'undefined' && process.emitWarning) { process.emitWarning('@uniformdev/mesh-sdk CommonJS entry is deprecated and will be removed in v21; Node.js 18 support will also be removed in v21 (Node.js 20+ required). Import the ESM build instead.', { type: 'DeprecationWarning', code: 'UNIFORM_MESH_SDK_CJS' }); }
1
2
  "use strict";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
@@ -36,6 +37,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
36
37
  // src/index.ts
37
38
  var index_exports = {};
38
39
  __export(index_exports, {
40
+ CSRF_HEADER_NAME: () => CSRF_HEADER_NAME,
41
+ CSRF_HEADER_VALUE: () => CSRF_HEADER_VALUE,
39
42
  IntegrationDefinitionClient: () => IntegrationDefinitionClient,
40
43
  IntegrationInstallationClient: () => IntegrationInstallationClient,
41
44
  functionCallSystemParameters: () => functionCallSystemParameters,
@@ -48,7 +51,7 @@ module.exports = __toCommonJS(index_exports);
48
51
 
49
52
  // src/clients/IntegrationDefinitionClient.ts
50
53
  var import_api = require("@uniformdev/context/api");
51
- var _url;
54
+ var _url, _credentialsUrl;
52
55
  var _IntegrationDefinitionClient = class _IntegrationDefinitionClient extends import_api.ApiClient {
53
56
  constructor(options) {
54
57
  super(options);
@@ -59,7 +62,7 @@ var _IntegrationDefinitionClient = class _IntegrationDefinitionClient extends im
59
62
  const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url), { ...options, teamId });
60
63
  return await this.apiClient(fetchUri);
61
64
  }
62
- /** Creates or updates a mesh app definition on a team */
65
+ /** Creates or updates a mesh app definition on a team. Identity-delegation credentials must be minted separately via {@link rotateCredential}. */
63
66
  async upsert(body) {
64
67
  const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
65
68
  return await this.apiClient(fetchUri, {
@@ -76,9 +79,37 @@ var _IntegrationDefinitionClient = class _IntegrationDefinitionClient extends im
76
79
  expectNoContent: true
77
80
  });
78
81
  }
82
+ /**
83
+ * Mints or rotates an identity-delegation credential for an integration definition. The plaintext
84
+ * `appSecret` is returned exactly once and is not retrievable afterwards — Uniform stores only
85
+ * the hash. A successful response invalidates any previously-issued secret of the same kind.
86
+ * Caller must be a team admin.
87
+ */
88
+ async rotateCredential(body) {
89
+ const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _credentialsUrl));
90
+ return await this.apiClient(fetchUri, {
91
+ method: "POST",
92
+ body: JSON.stringify({ ...body, teamId: this.options.teamId })
93
+ });
94
+ }
95
+ /**
96
+ * Revokes an identity-delegation credential. Future delegation grants and refreshes will fail
97
+ * until a new credential is minted; in-flight delegation tokens remain valid until natural
98
+ * expiry (up to ~15 minutes). Caller must be a team admin.
99
+ */
100
+ async revokeCredential(body) {
101
+ const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _credentialsUrl));
102
+ await this.apiClient(fetchUri, {
103
+ method: "DELETE",
104
+ body: JSON.stringify({ ...body, teamId: this.options.teamId }),
105
+ expectNoContent: true
106
+ });
107
+ }
79
108
  };
80
109
  _url = new WeakMap();
110
+ _credentialsUrl = new WeakMap();
81
111
  __privateAdd(_IntegrationDefinitionClient, _url, "/api/v1/integration-definitions");
112
+ __privateAdd(_IntegrationDefinitionClient, _credentialsUrl, "/api/v1/integration-credentials");
82
113
  var IntegrationDefinitionClient = _IntegrationDefinitionClient;
83
114
 
84
115
  // src/clients/IntegrationInstallationClient.ts
@@ -127,6 +158,10 @@ _url2 = new WeakMap();
127
158
  __privateAdd(_IntegrationInstallationClient, _url2, "/api/v1/integration-installations");
128
159
  var IntegrationInstallationClient = _IntegrationInstallationClient;
129
160
 
161
+ // src/delegation/csrfConstants.ts
162
+ var CSRF_HEADER_NAME = "x-mesh-csrf";
163
+ var CSRF_HEADER_VALUE = "1";
164
+
130
165
  // src/locations/aiAgents.ts
131
166
  var functionCallSystemParameters = ["pageHtml"];
132
167
  function parseFunctionCall(request) {
@@ -529,56 +564,63 @@ async function connectToParent({
529
564
  });
530
565
  client.onRequest("metadata-value", onMetadataUpdated);
531
566
  client.onRequest("external-value-update", onValueExternallyUpdated);
567
+ const parent = {
568
+ resize: async ({ height }) => {
569
+ await client.request("resize", { height });
570
+ },
571
+ setValue: async (value) => {
572
+ await client.request("setValue", value);
573
+ },
574
+ openDialog: async (message) => {
575
+ const res = await client.request(
576
+ "openDialog",
577
+ message
578
+ );
579
+ const dialogId = res == null ? void 0 : res.dialogId;
580
+ if (!dialogId) {
581
+ return;
582
+ }
583
+ return new Promise((resolve, reject) => {
584
+ dialogResponseHandlers[dialogId] = { resolve, reject };
585
+ });
586
+ },
587
+ closeDialog: async (message) => {
588
+ await client.request("closeDialog", message);
589
+ },
590
+ getDataResource: async (message) => {
591
+ return await client.request("getDataResource", message, {
592
+ timeout: 3e4
593
+ });
594
+ },
595
+ navigate: async (message) => {
596
+ await client.request("navigate", message);
597
+ },
598
+ reloadLocation: async () => {
599
+ await client.request("reload");
600
+ },
601
+ editConnectedData: async (message) => {
602
+ return await client.request(
603
+ "editConnectedData",
604
+ message,
605
+ {
606
+ timeout: (
607
+ // 24 hours in ms
608
+ 864e5
609
+ )
610
+ }
611
+ );
612
+ },
613
+ getSessionToken: async () => {
614
+ return await client.request("getSessionToken", void 0, {
615
+ // Delegation may wait on consent UI + token API; default framepost timeout (5s) is too short.
616
+ timeout: 12e4
617
+ });
618
+ },
619
+ editorState: createEditorStateApi(client)
620
+ };
532
621
  return {
533
622
  initData,
534
- parent: {
535
- resize: async ({ height }) => {
536
- await client.request("resize", { height });
537
- },
538
- setValue: async (value) => {
539
- await client.request("setValue", value);
540
- },
541
- openDialog: async (message) => {
542
- const res = await client.request(
543
- "openDialog",
544
- message
545
- );
546
- const dialogId = res == null ? void 0 : res.dialogId;
547
- if (!dialogId) {
548
- return;
549
- }
550
- return new Promise((resolve, reject) => {
551
- dialogResponseHandlers[dialogId] = { resolve, reject };
552
- });
553
- },
554
- closeDialog: async (message) => {
555
- await client.request("closeDialog", message);
556
- },
557
- getDataResource: async (message) => {
558
- return await client.request("getDataResource", message, {
559
- timeout: 3e4
560
- });
561
- },
562
- navigate: async (message) => {
563
- await client.request("navigate", message);
564
- },
565
- reloadLocation: async () => {
566
- await client.request("reload");
567
- },
568
- editConnectedData: async (message) => {
569
- return await client.request(
570
- "editConnectedData",
571
- message,
572
- {
573
- timeout: (
574
- // 24 hours in ms
575
- 864e5
576
- )
577
- }
578
- );
579
- },
580
- editorState: createEditorStateApi(client)
581
- }
623
+ parent
582
624
  };
583
625
  }
584
626
  function createEditorStateApi(client) {
@@ -964,7 +1006,8 @@ async function initializeUniformMeshSDK({
964
1006
  },
965
1007
  closeCurrentLocationDialog: async () => {
966
1008
  await parent.closeDialog({ dialogId: void 0, dialogType: "currentLocation" });
967
- }
1009
+ },
1010
+ getSessionToken: () => parent.getSessionToken()
968
1011
  };
969
1012
  window.UniformMeshSDK = sdk;
970
1013
  initializing = false;
@@ -987,6 +1030,8 @@ var hasRole = (role, user) => {
987
1030
  };
988
1031
  // Annotate the CommonJS export names for ESM import in node:
989
1032
  0 && (module.exports = {
1033
+ CSRF_HEADER_NAME,
1034
+ CSRF_HEADER_VALUE,
990
1035
  IntegrationDefinitionClient,
991
1036
  IntegrationInstallationClient,
992
1037
  functionCallSystemParameters,
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
7
7
 
8
8
  // src/clients/IntegrationDefinitionClient.ts
9
9
  import { ApiClient } from "@uniformdev/context/api";
10
- var _url;
10
+ var _url, _credentialsUrl;
11
11
  var _IntegrationDefinitionClient = class _IntegrationDefinitionClient extends ApiClient {
12
12
  constructor(options) {
13
13
  super(options);
@@ -18,7 +18,7 @@ var _IntegrationDefinitionClient = class _IntegrationDefinitionClient extends Ap
18
18
  const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url), { ...options, teamId });
19
19
  return await this.apiClient(fetchUri);
20
20
  }
21
- /** Creates or updates a mesh app definition on a team */
21
+ /** Creates or updates a mesh app definition on a team. Identity-delegation credentials must be minted separately via {@link rotateCredential}. */
22
22
  async upsert(body) {
23
23
  const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
24
24
  return await this.apiClient(fetchUri, {
@@ -35,9 +35,37 @@ var _IntegrationDefinitionClient = class _IntegrationDefinitionClient extends Ap
35
35
  expectNoContent: true
36
36
  });
37
37
  }
38
+ /**
39
+ * Mints or rotates an identity-delegation credential for an integration definition. The plaintext
40
+ * `appSecret` is returned exactly once and is not retrievable afterwards — Uniform stores only
41
+ * the hash. A successful response invalidates any previously-issued secret of the same kind.
42
+ * Caller must be a team admin.
43
+ */
44
+ async rotateCredential(body) {
45
+ const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _credentialsUrl));
46
+ return await this.apiClient(fetchUri, {
47
+ method: "POST",
48
+ body: JSON.stringify({ ...body, teamId: this.options.teamId })
49
+ });
50
+ }
51
+ /**
52
+ * Revokes an identity-delegation credential. Future delegation grants and refreshes will fail
53
+ * until a new credential is minted; in-flight delegation tokens remain valid until natural
54
+ * expiry (up to ~15 minutes). Caller must be a team admin.
55
+ */
56
+ async revokeCredential(body) {
57
+ const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _credentialsUrl));
58
+ await this.apiClient(fetchUri, {
59
+ method: "DELETE",
60
+ body: JSON.stringify({ ...body, teamId: this.options.teamId }),
61
+ expectNoContent: true
62
+ });
63
+ }
38
64
  };
39
65
  _url = new WeakMap();
66
+ _credentialsUrl = new WeakMap();
40
67
  __privateAdd(_IntegrationDefinitionClient, _url, "/api/v1/integration-definitions");
68
+ __privateAdd(_IntegrationDefinitionClient, _credentialsUrl, "/api/v1/integration-credentials");
41
69
  var IntegrationDefinitionClient = _IntegrationDefinitionClient;
42
70
 
43
71
  // src/clients/IntegrationInstallationClient.ts
@@ -86,6 +114,10 @@ _url2 = new WeakMap();
86
114
  __privateAdd(_IntegrationInstallationClient, _url2, "/api/v1/integration-installations");
87
115
  var IntegrationInstallationClient = _IntegrationInstallationClient;
88
116
 
117
+ // src/delegation/csrfConstants.ts
118
+ var CSRF_HEADER_NAME = "x-mesh-csrf";
119
+ var CSRF_HEADER_VALUE = "1";
120
+
89
121
  // src/locations/aiAgents.ts
90
122
  var functionCallSystemParameters = ["pageHtml"];
91
123
  function parseFunctionCall(request) {
@@ -488,56 +520,63 @@ async function connectToParent({
488
520
  });
489
521
  client.onRequest("metadata-value", onMetadataUpdated);
490
522
  client.onRequest("external-value-update", onValueExternallyUpdated);
523
+ const parent = {
524
+ resize: async ({ height }) => {
525
+ await client.request("resize", { height });
526
+ },
527
+ setValue: async (value) => {
528
+ await client.request("setValue", value);
529
+ },
530
+ openDialog: async (message) => {
531
+ const res = await client.request(
532
+ "openDialog",
533
+ message
534
+ );
535
+ const dialogId = res == null ? void 0 : res.dialogId;
536
+ if (!dialogId) {
537
+ return;
538
+ }
539
+ return new Promise((resolve, reject) => {
540
+ dialogResponseHandlers[dialogId] = { resolve, reject };
541
+ });
542
+ },
543
+ closeDialog: async (message) => {
544
+ await client.request("closeDialog", message);
545
+ },
546
+ getDataResource: async (message) => {
547
+ return await client.request("getDataResource", message, {
548
+ timeout: 3e4
549
+ });
550
+ },
551
+ navigate: async (message) => {
552
+ await client.request("navigate", message);
553
+ },
554
+ reloadLocation: async () => {
555
+ await client.request("reload");
556
+ },
557
+ editConnectedData: async (message) => {
558
+ return await client.request(
559
+ "editConnectedData",
560
+ message,
561
+ {
562
+ timeout: (
563
+ // 24 hours in ms
564
+ 864e5
565
+ )
566
+ }
567
+ );
568
+ },
569
+ getSessionToken: async () => {
570
+ return await client.request("getSessionToken", void 0, {
571
+ // Delegation may wait on consent UI + token API; default framepost timeout (5s) is too short.
572
+ timeout: 12e4
573
+ });
574
+ },
575
+ editorState: createEditorStateApi(client)
576
+ };
491
577
  return {
492
578
  initData,
493
- parent: {
494
- resize: async ({ height }) => {
495
- await client.request("resize", { height });
496
- },
497
- setValue: async (value) => {
498
- await client.request("setValue", value);
499
- },
500
- openDialog: async (message) => {
501
- const res = await client.request(
502
- "openDialog",
503
- message
504
- );
505
- const dialogId = res == null ? void 0 : res.dialogId;
506
- if (!dialogId) {
507
- return;
508
- }
509
- return new Promise((resolve, reject) => {
510
- dialogResponseHandlers[dialogId] = { resolve, reject };
511
- });
512
- },
513
- closeDialog: async (message) => {
514
- await client.request("closeDialog", message);
515
- },
516
- getDataResource: async (message) => {
517
- return await client.request("getDataResource", message, {
518
- timeout: 3e4
519
- });
520
- },
521
- navigate: async (message) => {
522
- await client.request("navigate", message);
523
- },
524
- reloadLocation: async () => {
525
- await client.request("reload");
526
- },
527
- editConnectedData: async (message) => {
528
- return await client.request(
529
- "editConnectedData",
530
- message,
531
- {
532
- timeout: (
533
- // 24 hours in ms
534
- 864e5
535
- )
536
- }
537
- );
538
- },
539
- editorState: createEditorStateApi(client)
540
- }
579
+ parent
541
580
  };
542
581
  }
543
582
  function createEditorStateApi(client) {
@@ -923,7 +962,8 @@ async function initializeUniformMeshSDK({
923
962
  },
924
963
  closeCurrentLocationDialog: async () => {
925
964
  await parent.closeDialog({ dialogId: void 0, dialogType: "currentLocation" });
926
- }
965
+ },
966
+ getSessionToken: () => parent.getSessionToken()
927
967
  };
928
968
  window.UniformMeshSDK = sdk;
929
969
  initializing = false;
@@ -945,6 +985,8 @@ var hasRole = (role, user) => {
945
985
  return user.roles.some((userRole) => userRole.name === role || userRole.id === role);
946
986
  };
947
987
  export {
988
+ CSRF_HEADER_NAME,
989
+ CSRF_HEADER_VALUE,
948
990
  IntegrationDefinitionClient,
949
991
  IntegrationInstallationClient,
950
992
  functionCallSystemParameters,