files.com 1.2.298 → 1.2.299

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/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.298
1
+ 1.2.299
@@ -10,9 +10,9 @@
10
10
  "user_id": 1,
11
11
  "public_key_md5": "7f8bc1210b09b9ddf469e6b6b8920e76",
12
12
  "private_key_md5": "ab236cfe4a195f0226bc2e674afdd6b0",
13
- "public_key": "7f8bc1210b09b9ddf469e6b6b8920e76",
14
- "private_key": "ab236cfe4a195f0226bc2e674afdd6b0",
15
- "private_key_password": "[your GPG private key password]"
13
+ "generated_public_key": "7f8bc1210b09b9ddf469e6b6b8920e76",
14
+ "generated_private_key": "ab236cfe4a195f0226bc2e674afdd6b0",
15
+ "private_key_password_md5": "[your GPG private key password]"
16
16
  }
17
17
  ```
18
18
 
@@ -22,8 +22,11 @@
22
22
  * `user_id` (int64): GPG owner's user id
23
23
  * `public_key_md5` (string): MD5 hash of your GPG public key
24
24
  * `private_key_md5` (string): MD5 hash of your GPG private key.
25
- * `public_key` (string): Your GPG public key
26
- * `private_key` (string): Your GPG private key.
25
+ * `generated_public_key` (string): Your GPG public key
26
+ * `generated_private_key` (string): Your GPG private key.
27
+ * `private_key_password_md5` (string): Your GPG private key password. Only required for password protected keys.
28
+ * `public_key` (string): MD5 hash of your GPG public key
29
+ * `private_key` (string): MD5 hash of your GPG private key.
27
30
  * `private_key_password` (string): Your GPG private key password. Only required for password protected keys.
28
31
  * `generate_expires_at` (string): Expiration date of the key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
29
32
  * `generate_keypair` (boolean): If true, generate a new GPG key pair. Can not be used with `public_key`/`private_key`
@@ -125,9 +128,9 @@ await gpg_key.update({
125
128
  "user_id": 1,
126
129
  "public_key_md5": "7f8bc1210b09b9ddf469e6b6b8920e76",
127
130
  "private_key_md5": "ab236cfe4a195f0226bc2e674afdd6b0",
128
- "public_key": "7f8bc1210b09b9ddf469e6b6b8920e76",
129
- "private_key": "ab236cfe4a195f0226bc2e674afdd6b0",
130
- "private_key_password": "[your GPG private key password]"
131
+ "generated_public_key": "7f8bc1210b09b9ddf469e6b6b8920e76",
132
+ "generated_private_key": "ab236cfe4a195f0226bc2e674afdd6b0",
133
+ "private_key_password_md5": "[your GPG private key password]"
131
134
  }
132
135
  ```
133
136
 
@@ -11,8 +11,8 @@
11
11
  "fingerprint_sha256": "V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX",
12
12
  "status": "complete",
13
13
  "last_login_at": "2000-01-01T01:00:00Z",
14
- "private_key": "example",
15
- "public_key": "example",
14
+ "generated_private_key": "example",
15
+ "generated_public_key": "example",
16
16
  "username": "User",
17
17
  "user_id": 1
18
18
  }
@@ -25,10 +25,11 @@
25
25
  * `fingerprint_sha256` (string): Public key fingerprint (SHA256)
26
26
  * `status` (string): Only returned when generating keys. Can be invalid, not_generated, generating, complete
27
27
  * `last_login_at` (date-time): Key's most recent login time via SFTP
28
- * `private_key` (string): Only returned when generating keys. Private key generated for the user.
29
- * `public_key` (string): Only returned when generating keys. Public key generated for the user.
28
+ * `generated_private_key` (string): Only returned when generating keys. Private key generated for the user.
29
+ * `generated_public_key` (string): Only returned when generating keys. Public key generated for the user.
30
30
  * `username` (string): Username of the user this public key is associated with
31
31
  * `user_id` (int64): User ID this public key is associated with
32
+ * `public_key` (string): Actual contents of SSH key.
32
33
  * `generate_keypair` (boolean): If true, generate a new SSH key pair. Can not be used with `public_key`
33
34
  * `generate_private_key_password` (string): Password for the private key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
34
35
  * `generate_algorithm` (string): Type of key to generate. One of rsa, dsa, ecdsa, ed25519. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
@@ -77,7 +78,6 @@ await PublicKey.find(id)
77
78
  await PublicKey.create({
78
79
  'user_id': 1,
79
80
  'title': "My Main Key",
80
- 'public_key': "example",
81
81
  'generate_keypair': false,
82
82
  'generate_private_key_password': "[your private key password]",
83
83
  'generate_algorithm': "rsa",
@@ -124,8 +124,8 @@ await public_key.update({
124
124
  "fingerprint_sha256": "V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX",
125
125
  "status": "complete",
126
126
  "last_login_at": "2000-01-01T01:00:00Z",
127
- "private_key": "example",
128
- "public_key": "example",
127
+ "generated_private_key": "example",
128
+ "generated_public_key": "example",
129
129
  "username": "User",
130
130
  "user_id": 1
131
131
  }
package/lib/Files.js CHANGED
@@ -12,7 +12,7 @@ var apiKey;
12
12
  var baseUrl = 'https://app.files.com';
13
13
  var sessionId = null;
14
14
  var language = null;
15
- var version = '1.2.298';
15
+ var version = '1.2.299';
16
16
  var userAgent = "Files.com JavaScript SDK v".concat(version);
17
17
  var logLevel = _Logger.LogLevel.INFO;
18
18
  var debugRequest = false;
@@ -75,13 +75,34 @@ var GpgKey = /*#__PURE__*/(0, _createClass2.default)(function GpgKey() {
75
75
  _this.attributes.private_key_md5 = value;
76
76
  });
77
77
  // string # Your GPG public key
78
+ (0, _defineProperty2.default)(this, "getGeneratedPublicKey", function () {
79
+ return _this.attributes.generated_public_key;
80
+ });
81
+ (0, _defineProperty2.default)(this, "setGeneratedPublicKey", function (value) {
82
+ _this.attributes.generated_public_key = value;
83
+ });
84
+ // string # Your GPG private key.
85
+ (0, _defineProperty2.default)(this, "getGeneratedPrivateKey", function () {
86
+ return _this.attributes.generated_private_key;
87
+ });
88
+ (0, _defineProperty2.default)(this, "setGeneratedPrivateKey", function (value) {
89
+ _this.attributes.generated_private_key = value;
90
+ });
91
+ // string # Your GPG private key password. Only required for password protected keys.
92
+ (0, _defineProperty2.default)(this, "getPrivateKeyPasswordMd5", function () {
93
+ return _this.attributes.private_key_password_md5;
94
+ });
95
+ (0, _defineProperty2.default)(this, "setPrivateKeyPasswordMd5", function (value) {
96
+ _this.attributes.private_key_password_md5 = value;
97
+ });
98
+ // string # MD5 hash of your GPG public key
78
99
  (0, _defineProperty2.default)(this, "getPublicKey", function () {
79
100
  return _this.attributes.public_key;
80
101
  });
81
102
  (0, _defineProperty2.default)(this, "setPublicKey", function (value) {
82
103
  _this.attributes.public_key = value;
83
104
  });
84
- // string # Your GPG private key.
105
+ // string # MD5 hash of your GPG private key.
85
106
  (0, _defineProperty2.default)(this, "getPrivateKey", function () {
86
107
  return _this.attributes.private_key;
87
108
  });
@@ -79,18 +79,18 @@ var PublicKey = /*#__PURE__*/(0, _createClass2.default)(function PublicKey() {
79
79
  _this.attributes.last_login_at = value;
80
80
  });
81
81
  // string # Only returned when generating keys. Private key generated for the user.
82
- (0, _defineProperty2.default)(this, "getPrivateKey", function () {
83
- return _this.attributes.private_key;
82
+ (0, _defineProperty2.default)(this, "getGeneratedPrivateKey", function () {
83
+ return _this.attributes.generated_private_key;
84
84
  });
85
- (0, _defineProperty2.default)(this, "setPrivateKey", function (value) {
86
- _this.attributes.private_key = value;
85
+ (0, _defineProperty2.default)(this, "setGeneratedPrivateKey", function (value) {
86
+ _this.attributes.generated_private_key = value;
87
87
  });
88
88
  // string # Only returned when generating keys. Public key generated for the user.
89
- (0, _defineProperty2.default)(this, "getPublicKey", function () {
90
- return _this.attributes.public_key;
89
+ (0, _defineProperty2.default)(this, "getGeneratedPublicKey", function () {
90
+ return _this.attributes.generated_public_key;
91
91
  });
92
- (0, _defineProperty2.default)(this, "setPublicKey", function (value) {
93
- _this.attributes.public_key = value;
92
+ (0, _defineProperty2.default)(this, "setGeneratedPublicKey", function (value) {
93
+ _this.attributes.generated_public_key = value;
94
94
  });
95
95
  // string # Username of the user this public key is associated with
96
96
  (0, _defineProperty2.default)(this, "getUsername", function () {
@@ -106,6 +106,13 @@ var PublicKey = /*#__PURE__*/(0, _createClass2.default)(function PublicKey() {
106
106
  (0, _defineProperty2.default)(this, "setUserId", function (value) {
107
107
  _this.attributes.user_id = value;
108
108
  });
109
+ // string # Actual contents of SSH key.
110
+ (0, _defineProperty2.default)(this, "getPublicKey", function () {
111
+ return _this.attributes.public_key;
112
+ });
113
+ (0, _defineProperty2.default)(this, "setPublicKey", function (value) {
114
+ _this.attributes.public_key = value;
115
+ });
109
116
  // boolean # If true, generate a new SSH key pair. Can not be used with `public_key`
110
117
  (0, _defineProperty2.default)(this, "getGenerateKeypair", function () {
111
118
  return _this.attributes.generate_keypair;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.298",
3
+ "version": "1.2.299",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Files.js CHANGED
@@ -6,7 +6,7 @@ let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
8
  let language = null
9
- const version = '1.2.298'
9
+ const version = '1.2.299'
10
10
  let userAgent = `Files.com JavaScript SDK v${version}`
11
11
 
12
12
  let logLevel = LogLevel.INFO
@@ -71,13 +71,34 @@ class GpgKey {
71
71
  }
72
72
 
73
73
  // string # Your GPG public key
74
+ getGeneratedPublicKey = () => this.attributes.generated_public_key
75
+
76
+ setGeneratedPublicKey = value => {
77
+ this.attributes.generated_public_key = value
78
+ }
79
+
80
+ // string # Your GPG private key.
81
+ getGeneratedPrivateKey = () => this.attributes.generated_private_key
82
+
83
+ setGeneratedPrivateKey = value => {
84
+ this.attributes.generated_private_key = value
85
+ }
86
+
87
+ // string # Your GPG private key password. Only required for password protected keys.
88
+ getPrivateKeyPasswordMd5 = () => this.attributes.private_key_password_md5
89
+
90
+ setPrivateKeyPasswordMd5 = value => {
91
+ this.attributes.private_key_password_md5 = value
92
+ }
93
+
94
+ // string # MD5 hash of your GPG public key
74
95
  getPublicKey = () => this.attributes.public_key
75
96
 
76
97
  setPublicKey = value => {
77
98
  this.attributes.public_key = value
78
99
  }
79
100
 
80
- // string # Your GPG private key.
101
+ // string # MD5 hash of your GPG private key.
81
102
  getPrivateKey = () => this.attributes.private_key
82
103
 
83
104
  setPrivateKey = value => {
@@ -74,17 +74,17 @@ class PublicKey {
74
74
  }
75
75
 
76
76
  // string # Only returned when generating keys. Private key generated for the user.
77
- getPrivateKey = () => this.attributes.private_key
77
+ getGeneratedPrivateKey = () => this.attributes.generated_private_key
78
78
 
79
- setPrivateKey = value => {
80
- this.attributes.private_key = value
79
+ setGeneratedPrivateKey = value => {
80
+ this.attributes.generated_private_key = value
81
81
  }
82
82
 
83
83
  // string # Only returned when generating keys. Public key generated for the user.
84
- getPublicKey = () => this.attributes.public_key
84
+ getGeneratedPublicKey = () => this.attributes.generated_public_key
85
85
 
86
- setPublicKey = value => {
87
- this.attributes.public_key = value
86
+ setGeneratedPublicKey = value => {
87
+ this.attributes.generated_public_key = value
88
88
  }
89
89
 
90
90
  // string # Username of the user this public key is associated with
@@ -101,6 +101,13 @@ class PublicKey {
101
101
  this.attributes.user_id = value
102
102
  }
103
103
 
104
+ // string # Actual contents of SSH key.
105
+ getPublicKey = () => this.attributes.public_key
106
+
107
+ setPublicKey = value => {
108
+ this.attributes.public_key = value
109
+ }
110
+
104
111
  // boolean # If true, generate a new SSH key pair. Can not be used with `public_key`
105
112
  getGenerateKeypair = () => this.attributes.generate_keypair
106
113