@ottoai/documents 1.5.17 → 1.5.19
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/types/common.dto.d.ts +12 -0
- package/dist/create/pdf/types/common.dto.js +60 -0
- package/dist/create/pdf/types/common.dto.js.map +1 -0
- package/dist/create/pdf/united-states/form-1099-misc/form.dto.d.ts +31 -0
- package/dist/create/pdf/united-states/form-1099-misc/form.dto.js +171 -0
- package/dist/create/pdf/united-states/form-1099-misc/form.dto.js.map +1 -0
- package/dist/create/pdf/united-states/form-1099-misc/index.d.ts +2 -0
- package/dist/create/pdf/united-states/form-1099-misc/index.js +62 -0
- package/dist/create/pdf/united-states/form-1099-misc/index.js.map +1 -0
- package/dist/create/pdf/united-states/form-1099-misc/schema.json +1639 -0
- package/dist/create/pdf/united-states/form-1099-nec/form.dto.d.ts +1 -12
- package/dist/create/pdf/united-states/form-1099-nec/form.dto.js +5 -50
- package/dist/create/pdf/united-states/form-1099-nec/form.dto.js.map +1 -1
- package/dist/create/pdf/united-states/form-2553/form.dto.d.ts +1 -8
- package/dist/create/pdf/united-states/form-2553/form.dto.js +4 -42
- package/dist/create/pdf/united-states/form-2553/form.dto.js.map +1 -1
- package/dist/create/pdf/united-states/form-w8ben/form.dto.d.ts +1 -8
- package/dist/create/pdf/united-states/form-w8ben/form.dto.js +4 -36
- package/dist/create/pdf/united-states/form-w8ben/form.dto.js.map +1 -1
- package/dist/create/pdf/united-states/form-w8bene/form.dto.d.ts +1 -8
- package/dist/create/pdf/united-states/form-w8bene/form.dto.js +5 -37
- package/dist/create/pdf/united-states/form-w8bene/form.dto.js.map +1 -1
- package/dist/create/pdf/united-states/form-w9/form.dto.d.ts +1 -8
- package/dist/create/pdf/united-states/form-w9/form.dto.js +4 -36
- package/dist/create/pdf/united-states/form-w9/form.dto.js.map +1 -1
- package/dist/create/pdf/united-states/form_w4/form.dto.d.ts +1 -8
- package/dist/create/pdf/united-states/form_w4/form.dto.js +4 -36
- package/dist/create/pdf/united-states/form_w4/form.dto.js.map +1 -1
- package/dist/create/pdf/united-states/index.d.ts +6 -2
- package/dist/create/pdf/united-states/index.js +23 -17
- package/dist/create/pdf/united-states/index.js.map +1 -1
- package/dist/create/pdf/util/format.d.ts +1 -1
- package/dist/create/pdf/util/format.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class PhoneDto {
|
|
2
|
+
phone: string;
|
|
3
|
+
country_code: number;
|
|
4
|
+
}
|
|
5
|
+
export declare class AddressDto {
|
|
6
|
+
city: string | null;
|
|
7
|
+
state: string | null;
|
|
8
|
+
postal_code: string | null;
|
|
9
|
+
address_line_1: string | null;
|
|
10
|
+
address_line_2?: string | null;
|
|
11
|
+
country?: string | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AddressDto = exports.PhoneDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class PhoneDto {
|
|
15
|
+
}
|
|
16
|
+
exports.PhoneDto = PhoneDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.MinLength)(10),
|
|
19
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], PhoneDto.prototype, "phone", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.Min)(1),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], PhoneDto.prototype, "country_code", void 0);
|
|
27
|
+
class AddressDto {
|
|
28
|
+
}
|
|
29
|
+
exports.AddressDto = AddressDto;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], AddressDto.prototype, "city", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], AddressDto.prototype, "state", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], AddressDto.prototype, "postal_code", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsString)(),
|
|
47
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], AddressDto.prototype, "address_line_1", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsOptional)(),
|
|
52
|
+
(0, class_validator_1.IsString)(),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], AddressDto.prototype, "address_line_2", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, class_validator_1.IsOptional)(),
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], AddressDto.prototype, "country", void 0);
|
|
60
|
+
//# sourceMappingURL=common.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.dto.js","sourceRoot":"","sources":["../../../../src/create/pdf/types/common.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;AAEzB,MAAa,QAAQ;CAQpB;AARD,4BAQC;AALC;IAFC,IAAA,2BAAS,EAAC,EAAE,CAAC;IACb,IAAA,4BAAU,GAAE;;uCACC;AAId;IAFC,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;8CACQ;AAGvB,MAAa,UAAU;CAwBtB;AAxBD,gCAwBC;AArBC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wCACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yCACQ;AAIrB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACc;AAI3B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACiB;AAI9B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kDACoB;AAI/B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2CACa"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AddressDto, PhoneDto } from "../../types/common.dto";
|
|
2
|
+
export declare class Form1099MiscDto {
|
|
3
|
+
isVoid: boolean;
|
|
4
|
+
isCorrected: boolean;
|
|
5
|
+
accountNumber?: string;
|
|
6
|
+
calendarYear: number;
|
|
7
|
+
payerName: string;
|
|
8
|
+
payerTin: string;
|
|
9
|
+
payerPhone: PhoneDto;
|
|
10
|
+
payerAddress: AddressDto;
|
|
11
|
+
recipientName: string;
|
|
12
|
+
recipientTin: string;
|
|
13
|
+
recipientAddress: AddressDto;
|
|
14
|
+
rents?: number;
|
|
15
|
+
royalties?: number;
|
|
16
|
+
otherIncome?: number;
|
|
17
|
+
federalIncomeTaxWithheld?: number;
|
|
18
|
+
fishingBoatProceeds?: number;
|
|
19
|
+
medicalHealthCarePayments?: number;
|
|
20
|
+
directSalesOver5000: boolean;
|
|
21
|
+
substitutePayments?: number;
|
|
22
|
+
cropInsuranceProceeds?: number;
|
|
23
|
+
fishPurchasedForResale?: number;
|
|
24
|
+
section409ADeferrals?: number;
|
|
25
|
+
grossProceedsAttorney?: number;
|
|
26
|
+
nonqualifiedDeferredCompensation?: number;
|
|
27
|
+
fatcaFilingRequirement?: boolean;
|
|
28
|
+
stateTaxWithheld?: number;
|
|
29
|
+
stateNumber?: string;
|
|
30
|
+
stateIncome?: number;
|
|
31
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Form1099MiscDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const common_dto_1 = require("../../types/common.dto");
|
|
15
|
+
class Form1099MiscDto {
|
|
16
|
+
}
|
|
17
|
+
exports.Form1099MiscDto = Form1099MiscDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsBoolean)(),
|
|
20
|
+
__metadata("design:type", Boolean)
|
|
21
|
+
], Form1099MiscDto.prototype, "isVoid", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsBoolean)(),
|
|
24
|
+
__metadata("design:type", Boolean)
|
|
25
|
+
], Form1099MiscDto.prototype, "isCorrected", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], Form1099MiscDto.prototype, "accountNumber", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsNumber)(),
|
|
33
|
+
(0, class_validator_1.Min)(2000),
|
|
34
|
+
(0, class_validator_1.Max)(2100),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], Form1099MiscDto.prototype, "calendarYear", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], Form1099MiscDto.prototype, "payerName", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
(0, class_validator_1.Length)(9, 9, { message: "TIN must be exactly 9 digits" }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], Form1099MiscDto.prototype, "payerTin", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_validator_1.IsObject)(),
|
|
48
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
49
|
+
(0, class_validator_1.ValidateIf)((o) => !(0, class_validator_1.isEmpty)(o.payerPhone)),
|
|
50
|
+
__metadata("design:type", common_dto_1.PhoneDto)
|
|
51
|
+
], Form1099MiscDto.prototype, "payerPhone", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsObject)(),
|
|
54
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
55
|
+
(0, class_validator_1.ValidateIf)((o) => !(0, class_validator_1.isEmpty)(o.payerAddress)),
|
|
56
|
+
__metadata("design:type", common_dto_1.AddressDto)
|
|
57
|
+
], Form1099MiscDto.prototype, "payerAddress", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsString)(),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], Form1099MiscDto.prototype, "recipientName", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_validator_1.IsString)(),
|
|
64
|
+
(0, class_validator_1.Length)(9, 9, { message: "TIN must be exactly 9 digits" }),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], Form1099MiscDto.prototype, "recipientTin", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, class_validator_1.IsObject)(),
|
|
69
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
70
|
+
(0, class_validator_1.ValidateIf)((o) => !(0, class_validator_1.isEmpty)(o.recipientAddress)),
|
|
71
|
+
__metadata("design:type", common_dto_1.AddressDto)
|
|
72
|
+
], Form1099MiscDto.prototype, "recipientAddress", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsNumber)(),
|
|
75
|
+
(0, class_validator_1.Min)(0),
|
|
76
|
+
(0, class_validator_1.IsOptional)(),
|
|
77
|
+
__metadata("design:type", Number)
|
|
78
|
+
], Form1099MiscDto.prototype, "rents", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, class_validator_1.IsNumber)(),
|
|
81
|
+
(0, class_validator_1.Min)(0),
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], Form1099MiscDto.prototype, "royalties", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, class_validator_1.IsNumber)(),
|
|
87
|
+
(0, class_validator_1.Min)(0),
|
|
88
|
+
(0, class_validator_1.IsOptional)(),
|
|
89
|
+
__metadata("design:type", Number)
|
|
90
|
+
], Form1099MiscDto.prototype, "otherIncome", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, class_validator_1.IsNumber)(),
|
|
93
|
+
(0, class_validator_1.Min)(0),
|
|
94
|
+
(0, class_validator_1.IsOptional)(),
|
|
95
|
+
__metadata("design:type", Number)
|
|
96
|
+
], Form1099MiscDto.prototype, "federalIncomeTaxWithheld", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, class_validator_1.IsNumber)(),
|
|
99
|
+
(0, class_validator_1.Min)(0),
|
|
100
|
+
(0, class_validator_1.IsOptional)(),
|
|
101
|
+
__metadata("design:type", Number)
|
|
102
|
+
], Form1099MiscDto.prototype, "fishingBoatProceeds", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_validator_1.IsNumber)(),
|
|
105
|
+
(0, class_validator_1.Min)(0),
|
|
106
|
+
(0, class_validator_1.IsOptional)(),
|
|
107
|
+
__metadata("design:type", Number)
|
|
108
|
+
], Form1099MiscDto.prototype, "medicalHealthCarePayments", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, class_validator_1.IsBoolean)(),
|
|
111
|
+
__metadata("design:type", Boolean)
|
|
112
|
+
], Form1099MiscDto.prototype, "directSalesOver5000", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, class_validator_1.IsNumber)(),
|
|
115
|
+
(0, class_validator_1.Min)(0),
|
|
116
|
+
(0, class_validator_1.IsOptional)(),
|
|
117
|
+
__metadata("design:type", Number)
|
|
118
|
+
], Form1099MiscDto.prototype, "substitutePayments", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, class_validator_1.IsNumber)(),
|
|
121
|
+
(0, class_validator_1.Min)(0),
|
|
122
|
+
(0, class_validator_1.IsOptional)(),
|
|
123
|
+
__metadata("design:type", Number)
|
|
124
|
+
], Form1099MiscDto.prototype, "cropInsuranceProceeds", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, class_validator_1.IsNumber)(),
|
|
127
|
+
(0, class_validator_1.Min)(0),
|
|
128
|
+
(0, class_validator_1.IsOptional)(),
|
|
129
|
+
__metadata("design:type", Number)
|
|
130
|
+
], Form1099MiscDto.prototype, "fishPurchasedForResale", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, class_validator_1.IsNumber)(),
|
|
133
|
+
(0, class_validator_1.Min)(0),
|
|
134
|
+
(0, class_validator_1.IsOptional)(),
|
|
135
|
+
__metadata("design:type", Number)
|
|
136
|
+
], Form1099MiscDto.prototype, "section409ADeferrals", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, class_validator_1.IsNumber)(),
|
|
139
|
+
(0, class_validator_1.Min)(0),
|
|
140
|
+
(0, class_validator_1.IsOptional)(),
|
|
141
|
+
__metadata("design:type", Number)
|
|
142
|
+
], Form1099MiscDto.prototype, "grossProceedsAttorney", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, class_validator_1.IsNumber)(),
|
|
145
|
+
(0, class_validator_1.Min)(0),
|
|
146
|
+
(0, class_validator_1.IsOptional)(),
|
|
147
|
+
__metadata("design:type", Number)
|
|
148
|
+
], Form1099MiscDto.prototype, "nonqualifiedDeferredCompensation", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
(0, class_validator_1.IsBoolean)(),
|
|
151
|
+
(0, class_validator_1.IsOptional)(),
|
|
152
|
+
__metadata("design:type", Boolean)
|
|
153
|
+
], Form1099MiscDto.prototype, "fatcaFilingRequirement", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
(0, class_validator_1.IsNumber)(),
|
|
156
|
+
(0, class_validator_1.Min)(0),
|
|
157
|
+
(0, class_validator_1.IsOptional)(),
|
|
158
|
+
__metadata("design:type", Number)
|
|
159
|
+
], Form1099MiscDto.prototype, "stateTaxWithheld", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, class_validator_1.IsString)(),
|
|
162
|
+
(0, class_validator_1.IsOptional)(),
|
|
163
|
+
__metadata("design:type", String)
|
|
164
|
+
], Form1099MiscDto.prototype, "stateNumber", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
(0, class_validator_1.IsNumber)(),
|
|
167
|
+
(0, class_validator_1.Min)(0),
|
|
168
|
+
(0, class_validator_1.IsOptional)(),
|
|
169
|
+
__metadata("design:type", Number)
|
|
170
|
+
], Form1099MiscDto.prototype, "stateIncome", void 0);
|
|
171
|
+
//# sourceMappingURL=form.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.dto.js","sourceRoot":"","sources":["../../../../../src/create/pdf/united-states/form-1099-misc/form.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAYyB;AACzB,uDAA8D;AAE9D,MAAa,eAAe;CA6H3B;AA7HD,0CA6HC;AA3HC;IADC,IAAA,2BAAS,GAAE;;+CACI;AAGhB;IADC,IAAA,2BAAS,GAAE;;oDACS;AAIrB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACU;AAKvB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,IAAI,CAAC;IACT,IAAA,qBAAG,EAAC,IAAI,CAAC;;qDACW;AAGrB;IADC,IAAA,0BAAQ,GAAE;;kDACO;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;;iDACzC;AAKjB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAA,yBAAO,EAAC,CAAC,CAAC,UAAU,CAAC,CAAC;8BAC9B,qBAAQ;mDAAC;AAKrB;IAHC,IAAA,0BAAQ,GA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AC,CAAC;IACN,IAAA,4BAAU,GAAE;;2DACe;AAK5B;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;8DACkB;AAK/B;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;+DACmB;AAKhC;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;6DACiB;AAK9B;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;8DACkB;AAK/B;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;yEAC6B;AAI1C;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;+DACoB;AAKjC;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;yDACa;AAI1B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oDACQ;AAKrB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;oDACQ"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.form1099Misc = void 0;
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const util_1 = require("util");
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
const util_2 = require("../../util");
|
|
11
|
+
const schema_json_1 = __importDefault(require("./schema.json"));
|
|
12
|
+
const custom_generate_1 = require("../../custom-generate");
|
|
13
|
+
const readFilePromise = (0, util_1.promisify)(fs_1.readFile);
|
|
14
|
+
const formCoordinates = (data) => {
|
|
15
|
+
const page3 = {
|
|
16
|
+
isVoid: data.isVoid ? util_2.CHECKED_IMAGE : "",
|
|
17
|
+
isCorrected: data.isCorrected ? util_2.CHECKED_IMAGE : "",
|
|
18
|
+
directSalesOver5000: data.directSalesOver5000 ? util_2.CHECKED_IMAGE : "",
|
|
19
|
+
fatcaFilingRequirement: data.fatcaFilingRequirement ? util_2.CHECKED_IMAGE : "",
|
|
20
|
+
payerDetails: (0, util_2.formatPayerDetails)(data.payerName, data.payerAddress, data.payerPhone),
|
|
21
|
+
payerTin: data.payerTin,
|
|
22
|
+
recipientTin: data.recipientTin,
|
|
23
|
+
recipientName: data.recipientName,
|
|
24
|
+
recipientStreetAddress: data.recipientAddress.address_line_1 || "",
|
|
25
|
+
recipientFullAddress: (0, util_2.formatAddress)({
|
|
26
|
+
...data.recipientAddress,
|
|
27
|
+
address_line_1: "",
|
|
28
|
+
address_line_2: "",
|
|
29
|
+
}),
|
|
30
|
+
accountNumber: data.accountNumber || "",
|
|
31
|
+
calendarYear: data.calendarYear?.toString(),
|
|
32
|
+
rents: data.rents?.toString() || "",
|
|
33
|
+
royalties: data.royalties?.toString() || "",
|
|
34
|
+
otherIncome: data.otherIncome?.toString() || "",
|
|
35
|
+
federalIncomeTaxWithheld: data.federalIncomeTaxWithheld?.toString() || "",
|
|
36
|
+
fishingBoatProceeds: data.fishingBoatProceeds?.toString() || "",
|
|
37
|
+
medicalHealthCarePayments: data.medicalHealthCarePayments?.toString() || "",
|
|
38
|
+
substitutePayments: data.substitutePayments?.toString() || "",
|
|
39
|
+
cropInsuranceProceeds: data.cropInsuranceProceeds?.toString() || "",
|
|
40
|
+
fishPurchasedForResale: data.fishPurchasedForResale?.toString() || "",
|
|
41
|
+
section409ADeferrals: data.section409ADeferrals?.toString() || "",
|
|
42
|
+
grossProceedsAttorney: data.grossProceedsAttorney?.toString() || "",
|
|
43
|
+
nonqualifiedDeferredCompensation: data.nonqualifiedDeferredCompensation?.toString() || "",
|
|
44
|
+
stateTaxWithheld: data.stateTaxWithheld?.toString() || "",
|
|
45
|
+
stateNumber: data.stateNumber?.toString() || "",
|
|
46
|
+
stateIncome: data.stateIncome?.toString() || "",
|
|
47
|
+
};
|
|
48
|
+
return [page3];
|
|
49
|
+
};
|
|
50
|
+
let pdfBufferInstance;
|
|
51
|
+
const getPDFInstance = async () => {
|
|
52
|
+
if (!pdfBufferInstance) {
|
|
53
|
+
pdfBufferInstance = await readFilePromise((0, path_1.resolve)(__dirname, "./template.pdf"));
|
|
54
|
+
}
|
|
55
|
+
return pdfBufferInstance;
|
|
56
|
+
};
|
|
57
|
+
const form1099Misc = async (data) => {
|
|
58
|
+
const pdfBuffer = await getPDFInstance();
|
|
59
|
+
return (0, custom_generate_1.generatePdf)(data, pdfBuffer, schema_json_1.default, formCoordinates);
|
|
60
|
+
};
|
|
61
|
+
exports.form1099Misc = form1099Misc;
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/create/pdf/united-states/form-1099-misc/index.ts"],"names":[],"mappings":";;;;;;AAAA,2BAA8B;AAC9B,+BAAiC;AACjC,+BAA+B;AAC/B,qCAA8E;AAC9E,gEAAuC;AAEvC,2DAAoD;AAEpD,MAAM,eAAe,GAAG,IAAA,gBAAS,EAAC,aAAQ,CAAC,CAAC;AAE5C,MAAM,eAAe,GAAG,CAAC,IAAqB,EAA4B,EAAE;IAC1E,MAAM,KAAK,GAAG;QACZ,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,oBAAa,CAAC,CAAC,CAAC,EAAE;QACxC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,oBAAa,CAAC,CAAC,C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