@pageproof/sdk-pr 239.0.1606182427914 → 239.0.1606182892133

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,11 +1,18 @@
1
1
  # Changelog
2
2
 
3
- ## 2.0.0-beta.148
3
+ ## 2.0.0-beta.149
4
4
 
5
5
  Released on the 24th of November 2020.
6
6
 
7
7
  - [[#239](https://github.com/PageProofCom/sdk/pull/239)] Adds support for a `onFileDetails` callback option when uploading files. See [Files.upload](https://docs.pageproof.tech/@pageproof/sdk/beta/class/src/api/Files.js~Files.html#instance-method-upload).
8
8
 
9
+ ## 2.0.0-beta.148
10
+
11
+ Released on the 24th of November 2020.
12
+
13
+ - [[#289](https://github.com/PageProofCom/sdk/pull/289)] Adds support for default reminder user preferences. See [Preferences](https://docs.pageproof.tech/@pageproof/sdk/beta/class/src/api/Preferences.js~Preferences.html).
14
+ - Adds support for updating the configuration of integrations.
15
+
9
16
  ## 2.0.0-beta.147
10
17
 
11
18
  Released on the 23rd of November 2020.
@@ -15,9 +15,10 @@ declare class Integrations extends API {
15
15
  * const availableConfigurations = await client.profile.integrations.configurations();
16
16
  *
17
17
  * @since 2.0.0-beta.141
18
- * @returns {Promise<object|null>}
18
+ * @param {Array} [integrationKeys] The unique identifiers of the integrations to retrieve configurations for
19
+ * @returns {Promise<Array|null>}
19
20
  */
20
- configurations(): Promise<any>;
21
+ configurations(integrationKeys?: any[]): Promise<any[]>;
21
22
  /**
22
23
  * Gets the URL for setting up an integration
23
24
  *
@@ -48,9 +49,19 @@ declare class Integrations extends API {
48
49
  * await client.profile.integrations.disable('monday.com');
49
50
  *
50
51
  * @since 2.0.0-beta.144
51
- * @param {string} integrationKey The unique identifier/identifiers for the integration/integrations
52
+ * @param {string} integrationKey The unique identifier for the integration
52
53
  * @returns {Promise}
53
54
  */
54
55
  disable(integrationKey: string): Promise<any>;
56
+ /**
57
+ * Updates the configuration of an integration
58
+ *
59
+ * @since 2.0.0-beta.148
60
+ * @param {string} integrationKey The unique identifier for the integration
61
+ * @param {string} key The key of the configuration to be updated
62
+ * @param {string} value The value for the configuration to be updated to
63
+ * @returns {Promise}
64
+ */
65
+ updateConfiguration(integrationKey: string, key: string, value: string): Promise<any>;
55
66
  }
56
67
  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(){return this.client.request("integrations.get-configurations",{level:this.level}).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})}).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})};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})};return Integrations}(_API3.default);exports.default=Integrations;
@@ -25,8 +25,9 @@ declare class Preferences extends API {
25
25
  * PageProof.Enum.Preference.DEFAULT_DUE_DATE,
26
26
  * PageProof.Enum.Preference.DEFAULT_DUE_TIME,
27
27
  * PageProof.Enum.Preference.DEFAULT_MESSAGE_TO_REVIEWERS,
28
+ * PageProof.Enum.Preference.DEFAULT_REMINDER,
28
29
  * ]);
29
- * const [dueDate, dueTime, messageToReviewers] = preferences;
30
+ * const [dueDate, dueTime, messageToReviewers, proofReminders] = preferences;
30
31
  * console.log(messageToReviewers.getValueOrDefault());
31
32
  *
32
33
  * @example <caption>Retrieving a single preference</caption>
@@ -4,4 +4,5 @@ declare namespace Preference {
4
4
  export const DEFAULT_DUE_TIME: string;
5
5
  export const DEFAULT_MESSAGE_TO_REVIEWERS: string;
6
6
  export const ENABLE_COLOR_BLIND_UI: string;
7
+ export const DEFAULT_REMINDER: string;
7
8
  }
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var Preference={DEFAULT_DUE_DATE:"dueDate",DEFAULT_DUE_TIME:"dueTime",DEFAULT_MESSAGE_TO_REVIEWERS:"messageToReviewers",ENABLE_COLOR_BLIND_UI:"colorBlind"};exports.default=Preference;
1
+ "use strict";exports.__esModule=true;var Preference={DEFAULT_DUE_DATE:"dueDate",DEFAULT_DUE_TIME:"dueTime",DEFAULT_MESSAGE_TO_REVIEWERS:"messageToReviewers",ENABLE_COLOR_BLIND_UI:"colorBlind",DEFAULT_REMINDER:"proofReminders"};exports.default=Preference;
@@ -86,6 +86,7 @@
86
86
  "query": ["preferences"]
87
87
  },
88
88
  "preferences.update": {
89
+ "version": 2,
89
90
  "method": "POST",
90
91
  "path": "/api/users/preferences/update",
91
92
  "body": true
@@ -739,13 +740,19 @@
739
740
  "integrations.get-configurations": {
740
741
  "method": "GET",
741
742
  "path": "/api/integrations/configuration",
742
- "query": ["level"]
743
+ "query": ["level", "integration_keys"]
743
744
  },
744
745
  "integrations.disable": {
745
746
  "method": "POST",
746
747
  "path": "/api/integrations/disable",
747
748
  "query": ["level", "integration_key"]
748
749
  },
750
+ "integrations.update-configuration": {
751
+ "version": 2,
752
+ "method": "POST",
753
+ "path": "/api/integrations/configuration/update",
754
+ "body": ["level", "integrationKey", "key", "value"]
755
+ },
749
756
  "integrations.get-available-reference-integrations": {
750
757
  "method": "GET",
751
758
  "path": "/api/integrations/reference/available_integrations"