@jsforce/jsforce-node 3.6.6 → 3.7.0

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/lib/VERSION.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "3.6.6";
1
+ declare const _default: "3.7.0";
2
2
  export default _default;
package/lib/VERSION.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '3.6.6';
3
+ exports.default = '3.7.0';
@@ -121,9 +121,10 @@ export declare class MetadataApi<S extends Schema> {
121
121
  */
122
122
  deploy(zipInput: Readable | Buffer | string, options?: Partial<DeployOptions>): DeployResultLocator<S>;
123
123
  /**
124
- * Checks the status of declarative metadata call deploy()
124
+ * Checks the status of declarative metadata call deploy(), using either
125
+ * SOAP or REST APIs. SOAP is the default.
125
126
  */
126
- checkDeployStatus(asyncProcessId: string, includeDetails?: boolean): Promise<DeployResult>;
127
+ checkDeployStatus(asyncProcessId: string, includeDetails?: boolean, rest?: boolean): Promise<DeployResult>;
127
128
  cancelDeploy(id: string): Promise<CancelDeployResult>;
128
129
  }
129
130
  /**
@@ -254,13 +254,20 @@ class MetadataApi {
254
254
  return new DeployResultLocator(this, res);
255
255
  }
256
256
  /**
257
- * Checks the status of declarative metadata call deploy()
257
+ * Checks the status of declarative metadata call deploy(), using either
258
+ * SOAP or REST APIs. SOAP is the default.
258
259
  */
259
- checkDeployStatus(asyncProcessId, includeDetails = false) {
260
- return this._invoke('checkDeployStatus', {
261
- asyncProcessId,
262
- includeDetails,
263
- }, schema_1.ApiSchemas.DeployResult);
260
+ async checkDeployStatus(asyncProcessId, includeDetails = false, rest = false) {
261
+ if (rest) {
262
+ const url = `/metadata/deployRequest/${asyncProcessId}${includeDetails ? '?includeDetails=true' : ''}`;
263
+ return (await this._conn.requestGet(url)).deployResult;
264
+ }
265
+ else {
266
+ return this._invoke('checkDeployStatus', {
267
+ asyncProcessId,
268
+ includeDetails,
269
+ }, schema_1.ApiSchemas.DeployResult);
270
+ }
264
271
  }
265
272
  async cancelDeploy(id) {
266
273
  return this._invoke('cancelDeploy', { id });
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "database.com"
11
11
  ],
12
12
  "homepage": "http://github.com/jsforce/jsforce",
13
- "version": "3.6.6",
13
+ "version": "3.7.0",
14
14
  "repository": {
15
15
  "type": "git",
16
16
  "url": "git://github.com/jsforce/jsforce.git"