Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@12stonechurch/omnihive-worker-documents

Package Overview
Dependencies
Maintainers
5
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@12stonechurch/omnihive-worker-documents - npm Package Compare versions

Comparing version 2.0.67 to 2.0.68

1

graph/generateDocument.d.ts

@@ -7,4 +7,5 @@ import { IGraphEndpointWorker } from "@withonevision/omnihive-core/interfaces/IGraphEndpointWorker";

private getDocuSignTemplateId;
private createMpEnvelopeData;
private storeEnvelopeData;
}
//# sourceMappingURL=generateDocument.d.ts.map

31

graph/generateDocument.js

@@ -32,4 +32,5 @@ "use strict";

if (docusignWorker) {
const envelopeData = yield docusignWorker.createEnvelope(templateId, email, name, customArgs.role);
yield this.storeEnvelopeData(customArgs.templateId, contactData.id, envelopeData);
const mpId = yield this.createMpEnvelopeData(customArgs.templateId, contactData.id);
const envelopeData = yield docusignWorker.createEnvelope(templateId, email, name, customArgs.role, mpId);
yield this.storeEnvelopeData(mpId, envelopeData);
const url = yield docusignWorker.getEnvelopeUrl(customArgs.redirectUrl, email, name, envelopeData.envelopeId);

@@ -54,3 +55,4 @@ return { envelopeUrl: url };

});
this.storeEnvelopeData = (formId, contactId, data) => __awaiter(this, void 0, void 0, function* () {
this.createMpEnvelopeData = (formId, contactId) => __awaiter(this, void 0, void 0, function* () {
var _a, _b, _c;
const databaseWorker = this.getWorker(HiveWorkerType_1.HiveWorkerType.Database, "dbMinistryPlatform");

@@ -60,8 +62,22 @@ if (!databaseWorker) {

}
const dateCreated = dayjs_1.default(data.statusDateTime).format("YYYY-MM-DD hh:mm:ssa");
const insertData = {
Form_ID: formId,
Contact_ID: contactId,
Form_ID: formId,
Status_ID: 1,
Domain_ID: 1,
};
const queryBuilder = databaseWorker === null || databaseWorker === void 0 ? void 0 : databaseWorker.connection.queryBuilder();
queryBuilder.from("DocuSign_Envelopes");
queryBuilder.insert(insertData, ["DocuSign_Envelope_ID"]);
return (_c = (_b = (_a = (yield databaseWorker.executeQuery(queryBuilder.toString()))) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.DocuSign_Envelope_ID;
});
this.storeEnvelopeData = (mpId, data) => __awaiter(this, void 0, void 0, function* () {
const databaseWorker = this.getWorker(HiveWorkerType_1.HiveWorkerType.Database, "dbMinistryPlatform");
if (!databaseWorker) {
throw new Error("Database worker not configured");
}
const dateCreated = dayjs_1.default(data.statusDateTime).format("YYYY-MM-DD hh:mm:ssa");
const updateData = {
Envelope_ID: data.envelopeId,
Created_Date: dateCreated,
Status_ID: 2,
Last_Updated_Date: dateCreated,

@@ -72,3 +88,4 @@ Domain_ID: 1,

queryBuilder.from("DocuSign_Envelopes");
queryBuilder.insert(insertData);
queryBuilder.update(updateData);
queryBuilder.where("DocuSign_Envelope_ID", mpId);
yield databaseWorker.executeQuery(queryBuilder.toString());

@@ -75,0 +92,0 @@ });

{
"name": "@12stonechurch/omnihive-worker-documents",
"version": "2.0.67",
"version": "2.0.68",
"description": "OmniHive Custom Function package",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc