@ottoai/documents 1.0.11 → 1.0.13
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/dist/create/pdf/united-states/constants.d.ts +2 -0
- package/dist/create/pdf/united-states/constants.js +4 -2
- package/dist/create/pdf/united-states/constants.js.map +1 -1
- package/dist/create/pdf/united-states/w9-form/index.d.ts +19 -0
- package/dist/create/pdf/united-states/w9-form/index.js +54 -0
- package/dist/create/pdf/united-states/w9-form/index.js.map +1 -0
- package/dist/create/pdf/united-states/w9-form/schema.json +739 -0
- package/dist/create/pdf/united-states/w9-form/template.pdf +0 -0
- package/dist/create/pdf/util/pdf-editor.d.ts +25 -6
- package/dist/create/pdf/util/pdf-editor.js +17 -34
- package/dist/create/pdf/util/pdf-editor.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -26
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/create/pdf/united-states/fw9-template.pdf +0 -0
- package/dist/create/pdf/united-states/w9-form.d.ts +0 -14
- package/dist/create/pdf/united-states/w9-form.js +0 -80
- package/dist/create/pdf/united-states/w9-form.js.map +0 -1
- package/dist/test.d.ts +0 -1
- package/dist/test.js +0 -37
- package/dist/test.js.map +0 -1
|
Binary file
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PDFDocument } from 'pdf-lib';
|
|
2
1
|
export interface Field {
|
|
3
2
|
value: string;
|
|
4
3
|
x: number;
|
|
@@ -7,11 +6,31 @@ export interface Field {
|
|
|
7
6
|
isImage?: boolean;
|
|
8
7
|
size?: number;
|
|
9
8
|
}
|
|
10
|
-
interface DocConfig {
|
|
11
|
-
size: number;
|
|
12
|
-
}
|
|
13
9
|
export type PdfCoordinates = {
|
|
14
10
|
[name: string]: Field;
|
|
15
11
|
};
|
|
16
|
-
export
|
|
17
|
-
|
|
12
|
+
export interface Address {
|
|
13
|
+
city: string | null;
|
|
14
|
+
state: string | null;
|
|
15
|
+
postal_code: string | null;
|
|
16
|
+
address_line_1: string | null;
|
|
17
|
+
address_line_2?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export declare enum FedralTaxClassification {
|
|
20
|
+
IndividualSoleProprietor = "solo",
|
|
21
|
+
CCorporation = "c_corporation",
|
|
22
|
+
SCorporation = "s_corporation",
|
|
23
|
+
Partnership = "partnership",
|
|
24
|
+
TrustEstate = "trust",
|
|
25
|
+
LLC = "llc",
|
|
26
|
+
Other = "other"
|
|
27
|
+
}
|
|
28
|
+
export declare enum TaxClassification {
|
|
29
|
+
CCorporation = "c_corporation",
|
|
30
|
+
SCorporation = "s_corporation",
|
|
31
|
+
Partnership = "partnership"
|
|
32
|
+
}
|
|
33
|
+
export interface Requester {
|
|
34
|
+
name: string;
|
|
35
|
+
address: Address;
|
|
36
|
+
}
|
|
@@ -1,37 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
page.drawImage(image, {
|
|
21
|
-
x: field.x,
|
|
22
|
-
y: height - field.y,
|
|
23
|
-
width: scaled.width,
|
|
24
|
-
height: scaled.height,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
page.drawText(field.value.toString(), {
|
|
29
|
-
x: field.x,
|
|
30
|
-
y: height - field.y,
|
|
31
|
-
size: field.size || docConfig.size,
|
|
32
|
-
lineHeight: field.size || docConfig.size,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
exports.editPdf = editPdf;
|
|
3
|
+
exports.TaxClassification = exports.FedralTaxClassification = void 0;
|
|
4
|
+
var FedralTaxClassification;
|
|
5
|
+
(function (FedralTaxClassification) {
|
|
6
|
+
FedralTaxClassification["IndividualSoleProprietor"] = "solo";
|
|
7
|
+
FedralTaxClassification["CCorporation"] = "c_corporation";
|
|
8
|
+
FedralTaxClassification["SCorporation"] = "s_corporation";
|
|
9
|
+
FedralTaxClassification["Partnership"] = "partnership";
|
|
10
|
+
FedralTaxClassification["TrustEstate"] = "trust";
|
|
11
|
+
FedralTaxClassification["LLC"] = "llc";
|
|
12
|
+
FedralTaxClassification["Other"] = "other";
|
|
13
|
+
})(FedralTaxClassification || (exports.FedralTaxClassification = FedralTaxClassification = {}));
|
|
14
|
+
var TaxClassification;
|
|
15
|
+
(function (TaxClassification) {
|
|
16
|
+
TaxClassification["CCorporation"] = "c_corporation";
|
|
17
|
+
TaxClassification["SCorporation"] = "s_corporation";
|
|
18
|
+
TaxClassification["Partnership"] = "partnership";
|
|
19
|
+
})(TaxClassification || (exports.TaxClassification = TaxClassification = {}));
|
|
37
20
|
//# sourceMappingURL=pdf-editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdf-editor.js","sourceRoot":"","sources":["../../../../src/create/pdf/util/pdf-editor.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"pdf-editor.js","sourceRoot":"","sources":["../../../../src/create/pdf/util/pdf-editor.ts"],"names":[],"mappings":";;;AAqBA,IAAY,uBAQX;AARD,WAAY,uBAAuB;IACjC,4DAAiC,CAAA;IACjC,yDAA8B,CAAA;IAC9B,yDAA8B,CAAA;IAC9B,sDAA2B,CAAA;IAC3B,gDAAqB,CAAA;IACrB,sCAAW,CAAA;IACX,0CAAe,CAAA;AACjB,CAAC,EARW,uBAAuB,uCAAvB,uBAAuB,QAQlC;AAED,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,mDAA8B,CAAA;IAC9B,mDAA8B,CAAA;IAC9B,gDAA2B,CAAA;AAC7B,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
declare const helloworld: () => void;
|
|
2
|
+
export { helloworld };
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
const
|
|
28
|
-
|
|
3
|
+
exports.helloworld = void 0;
|
|
4
|
+
const helloworld = () => {
|
|
5
|
+
console.log('hello');
|
|
6
|
+
};
|
|
7
|
+
exports.helloworld = helloworld;
|
|
29
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAIA,MAAM,UAAU,GAAG,GAAG,EAAE;IACpB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC,CAAA;AAEQ,gCAAU"}
|