@pageproof/sdk-pr 694.0.1780001034445 → 694.0.1780973242024

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 2.19.0
2
+ Released on the 8th of June 2026.
3
+
4
+ [PP-10174] Added integration support with Jira.
5
+
6
+
1
7
  ## 2.18.0
2
8
 
3
9
  Released on the 8th of May 2026.
@@ -63,5 +63,44 @@ declare class Integrations extends API {
63
63
  * @returns {Promise}
64
64
  */
65
65
  updateConfiguration(integrationKey: string, key: string, value: string): Promise<any>;
66
+ /**
67
+ * Gets the list of Jira sites associated with a pending connection so the user
68
+ * can pick which one to finalise the integration against.
69
+ *
70
+ * Used when the OAuth callback found that the consenting user has access to more
71
+ * than one Atlassian site, and so the SDK consumer needs to prompt the user to
72
+ * pick which site to connect to.
73
+ *
74
+ * @example <caption>Retrieving the sites for a pending Jira connection</caption>
75
+ * const admin = await client.admin();
76
+ * const sites = await admin.team.integrations.getJiraPendingConnection(pendingId);
77
+ *
78
+ * @since 2.16.0
79
+ * @param {string} pendingId The id of the pending connection (returned from the OAuth callback)
80
+ * @returns {Promise<Array<{ cloudId: string, url: string, name: string, avatarUrl: string }>>}
81
+ */
82
+ getJiraPendingConnection(pendingId: string): Promise<Array<{
83
+ cloudId: string;
84
+ url: string;
85
+ name: string;
86
+ avatarUrl: string;
87
+ }>>;
88
+ /**
89
+ * Finalises a pending Jira connection by selecting which Atlassian site to use.
90
+ *
91
+ * The chosen `cloudId` must be one of the sites returned by
92
+ * {@link Integrations#getJiraPendingConnection}. On success the integration
93
+ * configuration is upserted and the pending connection is consumed.
94
+ *
95
+ * @example <caption>Completing a pending Jira connection</caption>
96
+ * const admin = await client.admin();
97
+ * await admin.team.integrations.completeJiraPendingConnection(pendingId, cloudId);
98
+ *
99
+ * @since 2.16.0
100
+ * @param {string} pendingId The id of the pending connection (returned from the OAuth callback)
101
+ * @param {string} cloudId The Atlassian cloud id of the site the user picked
102
+ * @returns {Promise}
103
+ */
104
+ completeJiraPendingConnection(pendingId: string, cloudId: string): Promise<any>;
66
105
  }
67
106
  import API from "./API";
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};var _API2=require("./API");var _API3=_interopRequireDefault(_API2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Integrations=function(_API){_inherits(Integrations,_API);function Integrations(client,level){_classCallCheck(this,Integrations);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.level=level;return _this}Integrations.prototype.configurations=function configurations(){var integrationKeys=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];return this.client.request("integrations.get-configurations",{level:this.level,integration_keys:integrationKeys.join(",")}).then(function(response){if(response.data){return response.data.integrations}return null})};Integrations.prototype.getSetupUrl=function getSetupUrl(integrationKey,params){return this.client.request("integrations.get-setup-url",{params:_extends({},params,{integration_key:integrationKey,level:this.level})}).then(function(response){return{url:response.data.url,windowFeatures:response.data.windowFeatures}})};Integrations.prototype.disable=function disable(integrationKey){return this.client.request("integrations.disable",{level:this.level,integration_key:integrationKey})};Integrations.prototype.updateConfiguration=function updateConfiguration(integrationKey,key,value){return this.client.request("integrations.update-configuration",{level:this.level,integrationKey:integrationKey,key:key,value:value})};return Integrations}(_API3.default);exports.default=Integrations;
1
+ "use strict";exports.__esModule=true;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};var _API2=require("./API");var _API3=_interopRequireDefault(_API2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Integrations=function(_API){_inherits(Integrations,_API);function Integrations(client,level){_classCallCheck(this,Integrations);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.level=level;return _this}Integrations.prototype.configurations=function configurations(){var integrationKeys=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];return this.client.request("integrations.get-configurations",{level:this.level,integration_keys:integrationKeys.join(",")}).then(function(response){if(response.data){return response.data.integrations}return null})};Integrations.prototype.getSetupUrl=function getSetupUrl(integrationKey,params){return this.client.request("integrations.get-setup-url",{params:_extends({},params,{integration_key:integrationKey,level:this.level})}).then(function(response){return{url:response.data.url,windowFeatures:response.data.windowFeatures}})};Integrations.prototype.disable=function disable(integrationKey){return this.client.request("integrations.disable",{level:this.level,integration_key:integrationKey})};Integrations.prototype.updateConfiguration=function updateConfiguration(integrationKey,key,value){return this.client.request("integrations.update-configuration",{level:this.level,integrationKey:integrationKey,key:key,value:value})};Integrations.prototype.getJiraPendingConnection=function getJiraPendingConnection(pendingId){return this.client.request("integrations.jira.get-pending-connection",{pendingId:pendingId}).then(function(response){return response.data.sites})};Integrations.prototype.completeJiraPendingConnection=function completeJiraPendingConnection(pendingId,cloudId){return this.client.request("integrations.jira.complete-pending-connection",{pendingId:pendingId,cloudId:cloudId})};return Integrations}(_API3.default);exports.default=Integrations;
@@ -955,6 +955,17 @@
955
955
  "path": "/api/integrations/configuration/update",
956
956
  "body": ["level", "integrationKey", "key", "value"]
957
957
  },
958
+ "integrations.jira.get-pending-connection": {
959
+ "method": "GET",
960
+ "path": "/api/integrations/jira/pending-connection",
961
+ "query": ["pendingId"]
962
+ },
963
+ "integrations.jira.complete-pending-connection": {
964
+ "version": 2,
965
+ "method": "POST",
966
+ "path": "/api/integrations/jira/pending-connection",
967
+ "body": ["pendingId", "cloudId"]
968
+ },
958
969
  "integrations.get-available-reference-integrations": {
959
970
  "method": "GET",
960
971
  "path": "/api/integrations/reference/available_integrations"