merchi_sdk_ts 1.6.14 → 1.6.16
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/entities/company.js +4 -0
- package/dist/entities/company_invoice_settings.js +80 -0
- package/dist/entities/company_invoice_settings_version.js +64 -0
- package/dist/entities/invoice.js +14 -3
- package/dist/entities/invoice_template.js +60 -0
- package/dist/entities/invoice_template_version.js +52 -0
- package/dist/index.js +5 -1
- package/dist/merchi.js +8 -0
- package/package.json +1 -1
- package/src/entities/company.ts +4 -0
- package/src/entities/company_invoice_settings.ts +43 -0
- package/src/entities/company_invoice_settings_version.ts +30 -0
- package/src/entities/invoice.ts +13 -2
- package/src/entities/invoice_template.ts +26 -0
- package/src/entities/invoice_template_version.ts +20 -0
- package/src/index.ts +8 -0
- package/src/merchi.ts +12 -0
package/dist/entities/company.js
CHANGED
|
@@ -366,6 +366,10 @@ var Company = /** @class */ (function (_super) {
|
|
|
366
366
|
Company.property({ arrayType: 'Invoice' }),
|
|
367
367
|
__metadata("design:type", Array)
|
|
368
368
|
], Company.prototype, "subscriptionInvoices", void 0);
|
|
369
|
+
__decorate([
|
|
370
|
+
Company.property({ type: 'CompanyInvoiceSettings' }),
|
|
371
|
+
__metadata("design:type", Object)
|
|
372
|
+
], Company.prototype, "invoiceSettings", void 0);
|
|
369
373
|
__decorate([
|
|
370
374
|
Company.property({ arrayType: 'Address' }),
|
|
371
375
|
__metadata("design:type", Array)
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
17
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
19
|
+
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;
|
|
20
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
+
};
|
|
22
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
23
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
24
|
+
};
|
|
25
|
+
import { Entity } from '../entity.js';
|
|
26
|
+
var CompanyInvoiceSettings = /** @class */ (function (_super) {
|
|
27
|
+
__extends(CompanyInvoiceSettings, _super);
|
|
28
|
+
function CompanyInvoiceSettings() {
|
|
29
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
CompanyInvoiceSettings.resourceName = 'company-invoice-settings';
|
|
32
|
+
CompanyInvoiceSettings.singularName = 'companyInvoiceSettings';
|
|
33
|
+
CompanyInvoiceSettings.pluralName = 'companyInvoiceSettingsList';
|
|
34
|
+
__decorate([
|
|
35
|
+
CompanyInvoiceSettings.property(),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], CompanyInvoiceSettings.prototype, "id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
CompanyInvoiceSettings.property({ type: 'Company' }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], CompanyInvoiceSettings.prototype, "company", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
CompanyInvoiceSettings.property({ type: 'InvoiceTemplate' }),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], CompanyInvoiceSettings.prototype, "selectedTemplate", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
CompanyInvoiceSettings.property(),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], CompanyInvoiceSettings.prototype, "themeOverrides", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
CompanyInvoiceSettings.property(),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], CompanyInvoiceSettings.prototype, "blockOverrides", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
CompanyInvoiceSettings.property(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], CompanyInvoiceSettings.prototype, "customCss", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
CompanyInvoiceSettings.property(),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], CompanyInvoiceSettings.prototype, "draftThemeOverrides", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
CompanyInvoiceSettings.property(),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], CompanyInvoiceSettings.prototype, "draftBlockOverrides", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
CompanyInvoiceSettings.property(),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], CompanyInvoiceSettings.prototype, "draftCustomCss", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
CompanyInvoiceSettings.property({ type: 'CompanyInvoiceSettingsVersion' }),
|
|
72
|
+
__metadata("design:type", Object)
|
|
73
|
+
], CompanyInvoiceSettings.prototype, "publishedVersion", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
CompanyInvoiceSettings.property({ arrayType: 'CompanyInvoiceSettingsVersion' }),
|
|
76
|
+
__metadata("design:type", Array)
|
|
77
|
+
], CompanyInvoiceSettings.prototype, "versions", void 0);
|
|
78
|
+
return CompanyInvoiceSettings;
|
|
79
|
+
}(Entity));
|
|
80
|
+
export { CompanyInvoiceSettings };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
17
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
19
|
+
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;
|
|
20
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
+
};
|
|
22
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
23
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
24
|
+
};
|
|
25
|
+
import { Entity } from '../entity.js';
|
|
26
|
+
var CompanyInvoiceSettingsVersion = /** @class */ (function (_super) {
|
|
27
|
+
__extends(CompanyInvoiceSettingsVersion, _super);
|
|
28
|
+
function CompanyInvoiceSettingsVersion() {
|
|
29
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
CompanyInvoiceSettingsVersion.resourceName = 'company-invoice-settings-versions';
|
|
32
|
+
CompanyInvoiceSettingsVersion.singularName = 'companyInvoiceSettingsVersion';
|
|
33
|
+
CompanyInvoiceSettingsVersion.pluralName = 'companyInvoiceSettingsVersions';
|
|
34
|
+
__decorate([
|
|
35
|
+
CompanyInvoiceSettingsVersion.property(),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], CompanyInvoiceSettingsVersion.prototype, "id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
CompanyInvoiceSettingsVersion.property({ type: 'CompanyInvoiceSettings' }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], CompanyInvoiceSettingsVersion.prototype, "settings", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
CompanyInvoiceSettingsVersion.property({ type: 'InvoiceTemplate' }),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], CompanyInvoiceSettingsVersion.prototype, "template", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
CompanyInvoiceSettingsVersion.property(),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], CompanyInvoiceSettingsVersion.prototype, "themeOverrides", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
CompanyInvoiceSettingsVersion.property(),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], CompanyInvoiceSettingsVersion.prototype, "blockOverrides", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
CompanyInvoiceSettingsVersion.property(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], CompanyInvoiceSettingsVersion.prototype, "customCss", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
CompanyInvoiceSettingsVersion.property({ type: Date }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], CompanyInvoiceSettingsVersion.prototype, "creationDate", void 0);
|
|
62
|
+
return CompanyInvoiceSettingsVersion;
|
|
63
|
+
}(Entity));
|
|
64
|
+
export { CompanyInvoiceSettingsVersion };
|
package/dist/entities/invoice.js
CHANGED
|
@@ -24,7 +24,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
24
24
|
};
|
|
25
25
|
import { Address } from './address.js';
|
|
26
26
|
import { Cart } from './cart.js';
|
|
27
|
-
import { Company } from './company.js';
|
|
28
27
|
import { Domain } from './domain.js';
|
|
29
28
|
import { EmailAddress } from './email_address.js';
|
|
30
29
|
import { Entity } from '../entity.js';
|
|
@@ -163,6 +162,10 @@ var Invoice = /** @class */ (function (_super) {
|
|
|
163
162
|
Invoice.property({ embeddedByDefault: false }),
|
|
164
163
|
__metadata("design:type", Boolean)
|
|
165
164
|
], Invoice.prototype, "isCompletelyPaid", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
Invoice.property({ embeddedByDefault: false }),
|
|
167
|
+
__metadata("design:type", String)
|
|
168
|
+
], Invoice.prototype, "rendererUsed", void 0);
|
|
166
169
|
__decorate([
|
|
167
170
|
Invoice.property({ type: User }),
|
|
168
171
|
__metadata("design:type", Object)
|
|
@@ -176,11 +179,11 @@ var Invoice = /** @class */ (function (_super) {
|
|
|
176
179
|
__metadata("design:type", User)
|
|
177
180
|
], Invoice.prototype, "client", void 0);
|
|
178
181
|
__decorate([
|
|
179
|
-
Invoice.property({ type: Company }),
|
|
182
|
+
Invoice.property({ type: 'Company' }),
|
|
180
183
|
__metadata("design:type", Object)
|
|
181
184
|
], Invoice.prototype, "clientCompany", void 0);
|
|
182
185
|
__decorate([
|
|
183
|
-
|
|
186
|
+
Invoice.property({ arrayType: 'Company' }),
|
|
184
187
|
__metadata("design:type", Array)
|
|
185
188
|
], Invoice.prototype, "subscriptionCompanies", void 0);
|
|
186
189
|
__decorate([
|
|
@@ -203,6 +206,14 @@ var Invoice = /** @class */ (function (_super) {
|
|
|
203
206
|
Invoice.property({ type: MerchiFile }),
|
|
204
207
|
__metadata("design:type", Object)
|
|
205
208
|
], Invoice.prototype, "receipt", void 0);
|
|
209
|
+
__decorate([
|
|
210
|
+
Invoice.property({ type: 'InvoiceTemplateVersion' }),
|
|
211
|
+
__metadata("design:type", Object)
|
|
212
|
+
], Invoice.prototype, "templateVersion", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
Invoice.property({ type: 'CompanyInvoiceSettingsVersion' }),
|
|
215
|
+
__metadata("design:type", Object)
|
|
216
|
+
], Invoice.prototype, "settingsVersion", void 0);
|
|
206
217
|
__decorate([
|
|
207
218
|
Invoice.property({ type: PhoneNumber }),
|
|
208
219
|
__metadata("design:type", Object)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
17
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
19
|
+
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;
|
|
20
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
+
};
|
|
22
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
23
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
24
|
+
};
|
|
25
|
+
import { Entity } from '../entity.js';
|
|
26
|
+
var InvoiceTemplate = /** @class */ (function (_super) {
|
|
27
|
+
__extends(InvoiceTemplate, _super);
|
|
28
|
+
function InvoiceTemplate() {
|
|
29
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
InvoiceTemplate.resourceName = 'invoice-templates';
|
|
32
|
+
InvoiceTemplate.singularName = 'invoiceTemplate';
|
|
33
|
+
InvoiceTemplate.pluralName = 'invoiceTemplates';
|
|
34
|
+
__decorate([
|
|
35
|
+
InvoiceTemplate.property(),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], InvoiceTemplate.prototype, "id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
InvoiceTemplate.property(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], InvoiceTemplate.prototype, "slug", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
InvoiceTemplate.property(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], InvoiceTemplate.prototype, "name", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
InvoiceTemplate.property(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], InvoiceTemplate.prototype, "baseCss", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
InvoiceTemplate.property({ type: 'InvoiceTemplateVersion' }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], InvoiceTemplate.prototype, "activeVersion", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
InvoiceTemplate.property({ arrayType: 'InvoiceTemplateVersion' }),
|
|
56
|
+
__metadata("design:type", Array)
|
|
57
|
+
], InvoiceTemplate.prototype, "versions", void 0);
|
|
58
|
+
return InvoiceTemplate;
|
|
59
|
+
}(Entity));
|
|
60
|
+
export { InvoiceTemplate };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
17
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
19
|
+
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;
|
|
20
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
+
};
|
|
22
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
23
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
24
|
+
};
|
|
25
|
+
import { Entity } from '../entity.js';
|
|
26
|
+
var InvoiceTemplateVersion = /** @class */ (function (_super) {
|
|
27
|
+
__extends(InvoiceTemplateVersion, _super);
|
|
28
|
+
function InvoiceTemplateVersion() {
|
|
29
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
InvoiceTemplateVersion.resourceName = 'invoice-template-versions';
|
|
32
|
+
InvoiceTemplateVersion.singularName = 'invoiceTemplateVersion';
|
|
33
|
+
InvoiceTemplateVersion.pluralName = 'invoiceTemplateVersions';
|
|
34
|
+
__decorate([
|
|
35
|
+
InvoiceTemplateVersion.property(),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], InvoiceTemplateVersion.prototype, "id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
InvoiceTemplateVersion.property({ type: 'InvoiceTemplate' }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], InvoiceTemplateVersion.prototype, "template", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
InvoiceTemplateVersion.property(),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], InvoiceTemplateVersion.prototype, "blocksJson", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
InvoiceTemplateVersion.property({ type: Date }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], InvoiceTemplateVersion.prototype, "creationDate", void 0);
|
|
50
|
+
return InvoiceTemplateVersion;
|
|
51
|
+
}(Entity));
|
|
52
|
+
export { InvoiceTemplateVersion };
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,8 @@ import { CartShipmentGroup } from './entities/cart_shipment_group.js';
|
|
|
12
12
|
import { CartShipmentQuote } from './entities/cart_shipment_quote.js';
|
|
13
13
|
import { Category } from './entities/category.js';
|
|
14
14
|
import { Company } from './entities/company.js';
|
|
15
|
+
import { CompanyInvoiceSettings } from './entities/company_invoice_settings.js';
|
|
16
|
+
import { CompanyInvoiceSettingsVersion } from './entities/company_invoice_settings_version.js';
|
|
15
17
|
import { CompanyInvitation } from './entities/company_invitation.js';
|
|
16
18
|
import { Component } from './entities/component.js';
|
|
17
19
|
import { ComponentTag } from './entities/component_tag.js';
|
|
@@ -34,6 +36,8 @@ import { InternalTag } from './entities/internal_tag.js';
|
|
|
34
36
|
import { Inventory } from './entities/inventory.js';
|
|
35
37
|
import { InventoryUnitVariation } from './entities/inventory_unit_variation.js';
|
|
36
38
|
import { Invoice } from './entities/invoice.js';
|
|
39
|
+
import { InvoiceTemplate } from './entities/invoice_template.js';
|
|
40
|
+
import { InvoiceTemplateVersion } from './entities/invoice_template_version.js';
|
|
37
41
|
import { Item } from './entities/item.js';
|
|
38
42
|
import { Job } from './entities/job.js';
|
|
39
43
|
import { JobComment } from './entities/job_comment.js';
|
|
@@ -78,4 +82,4 @@ import * as constants from './constants/index.js';
|
|
|
78
82
|
import * as request from './request.js';
|
|
79
83
|
import * as util from './util/index.js';
|
|
80
84
|
import { toastNotifications } from './toasts.js';
|
|
81
|
-
export { constants, request, util, toastNotifications, Address, AgentConversation, DomainChatSettings, SupportConversation, SupportMessage, Assignment, AutomaticPaymentRelationship, Bank, Cart, CartItem, CartShipmentGroup, CartShipmentQuote, Category, Company, CompanyInvitation, Component, ComponentTag, ComponentVersion, CountryTax, Discount, DiscountGroup, Domain, DomainInvitation, DomainTag, Draft, DraftComment, DraftTemplate, EmailAddress, EmailCounter, EnrolledDomain, Entity, ExchangeRate, InternalTag, Inventory, InventoryUnitVariation, Invoice, Item, Job, JobComment, MatchingInventory, Menu, MenuItem, Merchi, MerchiFile, Notification, Page, Payment, PaymentDevice, PhoneNumber, Product, ProductionComment, Quote, QuoteItem, Reminder, apiFetch, apiFetchWithProgress, Session, Shipment, ShipmentItem, ShipmentItemFulfillment, ShipmentMethod, ShipmentMethodVariation, ShortUrl, SubscriptionPlan, SupplyDomain, SystemRole, Theme, ThemeCssSetting, User, UserCompany, Variation, VariationField, VariationFieldsOption, VariationOption, VariationsGroup, generateUUID, getCookie };
|
|
85
|
+
export { constants, request, util, toastNotifications, Address, AgentConversation, DomainChatSettings, SupportConversation, SupportMessage, Assignment, AutomaticPaymentRelationship, Bank, Cart, CartItem, CartShipmentGroup, CartShipmentQuote, Category, Company, CompanyInvoiceSettings, CompanyInvoiceSettingsVersion, CompanyInvitation, Component, ComponentTag, ComponentVersion, CountryTax, Discount, DiscountGroup, Domain, DomainInvitation, DomainTag, Draft, DraftComment, DraftTemplate, EmailAddress, EmailCounter, EnrolledDomain, Entity, ExchangeRate, InternalTag, Inventory, InventoryUnitVariation, Invoice, InvoiceTemplate, InvoiceTemplateVersion, Item, Job, JobComment, MatchingInventory, Menu, MenuItem, Merchi, MerchiFile, Notification, Page, Payment, PaymentDevice, PhoneNumber, Product, ProductionComment, Quote, QuoteItem, Reminder, apiFetch, apiFetchWithProgress, Session, Shipment, ShipmentItem, ShipmentItemFulfillment, ShipmentMethod, ShipmentMethodVariation, ShortUrl, SubscriptionPlan, SupplyDomain, SystemRole, Theme, ThemeCssSetting, User, UserCompany, Variation, VariationField, VariationFieldsOption, VariationOption, VariationsGroup, generateUUID, getCookie };
|
package/dist/merchi.js
CHANGED
|
@@ -26,6 +26,8 @@ import { InventoryGroup } from './entities/inventory_group.js';
|
|
|
26
26
|
import { QuoteItem } from './entities/quote_item.js';
|
|
27
27
|
import { Category } from './entities/category.js';
|
|
28
28
|
import { Invoice } from './entities/invoice.js';
|
|
29
|
+
import { InvoiceTemplate } from './entities/invoice_template.js';
|
|
30
|
+
import { InvoiceTemplateVersion } from './entities/invoice_template_version.js';
|
|
29
31
|
import { UserCompany } from './entities/user_company.js';
|
|
30
32
|
import { InventoryUnitVariation } from './entities/inventory_unit_variation.js';
|
|
31
33
|
import { VariationFieldsOption } from './entities/variation_fields_option.js';
|
|
@@ -61,6 +63,8 @@ import { Discount } from './entities/discount.js';
|
|
|
61
63
|
import { DiscountGroup } from './entities/discount_group.js';
|
|
62
64
|
import { User } from './entities/user.js';
|
|
63
65
|
import { Company } from './entities/company.js';
|
|
66
|
+
import { CompanyInvoiceSettings } from './entities/company_invoice_settings.js';
|
|
67
|
+
import { CompanyInvoiceSettingsVersion } from './entities/company_invoice_settings_version.js';
|
|
64
68
|
import { ComponentTag } from './entities/component_tag.js';
|
|
65
69
|
import { EnrolledDomain } from './entities/enrolled_domain.js';
|
|
66
70
|
import { CountryTax } from './entities/country_tax.js';
|
|
@@ -225,6 +229,10 @@ var Merchi = /** @class */ (function () {
|
|
|
225
229
|
this.Domain = this.setupClass(Domain);
|
|
226
230
|
this.ExchangeRate = this.setupClass(ExchangeRate);
|
|
227
231
|
this.Invoice = this.setupClass(Invoice);
|
|
232
|
+
this.InvoiceTemplate = this.setupClass(InvoiceTemplate);
|
|
233
|
+
this.InvoiceTemplateVersion = this.setupClass(InvoiceTemplateVersion);
|
|
234
|
+
this.CompanyInvoiceSettings = this.setupClass(CompanyInvoiceSettings);
|
|
235
|
+
this.CompanyInvoiceSettingsVersion = this.setupClass(CompanyInvoiceSettingsVersion);
|
|
228
236
|
this.Job = this.setupClass(Job);
|
|
229
237
|
this.ComponentTag = this.setupClass(ComponentTag);
|
|
230
238
|
this.Category = this.setupClass(Category);
|
package/package.json
CHANGED
package/src/entities/company.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { AutomaticPaymentRelationship } from './automatic_payment_relationship.j
|
|
|
3
3
|
import { Bank } from './bank.js';
|
|
4
4
|
import { Cart } from './cart.js';
|
|
5
5
|
import { CompanyInvitation } from './company_invitation.js';
|
|
6
|
+
import { CompanyInvoiceSettings } from './company_invoice_settings.js';
|
|
6
7
|
import { CountryTax } from './country_tax.js';
|
|
7
8
|
import { Domain } from './domain.js';
|
|
8
9
|
import { EmailAddress } from './email_address.js';
|
|
@@ -274,6 +275,9 @@ export class Company extends Entity {
|
|
|
274
275
|
@Company.property({arrayType: 'Invoice'})
|
|
275
276
|
public subscriptionInvoices?: Invoice[];
|
|
276
277
|
|
|
278
|
+
@Company.property({type: 'CompanyInvoiceSettings'})
|
|
279
|
+
public invoiceSettings?: CompanyInvoiceSettings | null;
|
|
280
|
+
|
|
277
281
|
@Company.property({arrayType: 'Address'})
|
|
278
282
|
public addresses?: Address[];
|
|
279
283
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Entity } from '../entity.js';
|
|
2
|
+
import { Company } from './company.js';
|
|
3
|
+
import { InvoiceTemplate } from './invoice_template.js';
|
|
4
|
+
import { CompanyInvoiceSettingsVersion } from './company_invoice_settings_version.js';
|
|
5
|
+
|
|
6
|
+
export class CompanyInvoiceSettings extends Entity {
|
|
7
|
+
protected static resourceName = 'company-invoice-settings';
|
|
8
|
+
protected static singularName = 'companyInvoiceSettings';
|
|
9
|
+
protected static pluralName = 'companyInvoiceSettingsList';
|
|
10
|
+
|
|
11
|
+
@CompanyInvoiceSettings.property()
|
|
12
|
+
public id?: number;
|
|
13
|
+
|
|
14
|
+
@CompanyInvoiceSettings.property({type: 'Company'})
|
|
15
|
+
public company?: Company | null;
|
|
16
|
+
|
|
17
|
+
@CompanyInvoiceSettings.property({type: 'InvoiceTemplate'})
|
|
18
|
+
public selectedTemplate?: InvoiceTemplate | null;
|
|
19
|
+
|
|
20
|
+
@CompanyInvoiceSettings.property()
|
|
21
|
+
public themeOverrides?: any;
|
|
22
|
+
|
|
23
|
+
@CompanyInvoiceSettings.property()
|
|
24
|
+
public blockOverrides?: any;
|
|
25
|
+
|
|
26
|
+
@CompanyInvoiceSettings.property()
|
|
27
|
+
public customCss?: string;
|
|
28
|
+
|
|
29
|
+
@CompanyInvoiceSettings.property()
|
|
30
|
+
public draftThemeOverrides?: any;
|
|
31
|
+
|
|
32
|
+
@CompanyInvoiceSettings.property()
|
|
33
|
+
public draftBlockOverrides?: any;
|
|
34
|
+
|
|
35
|
+
@CompanyInvoiceSettings.property()
|
|
36
|
+
public draftCustomCss?: string;
|
|
37
|
+
|
|
38
|
+
@CompanyInvoiceSettings.property({type: 'CompanyInvoiceSettingsVersion'})
|
|
39
|
+
public publishedVersion?: CompanyInvoiceSettingsVersion | null;
|
|
40
|
+
|
|
41
|
+
@CompanyInvoiceSettings.property({arrayType: 'CompanyInvoiceSettingsVersion'})
|
|
42
|
+
public versions?: CompanyInvoiceSettingsVersion[];
|
|
43
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Entity } from '../entity.js';
|
|
2
|
+
import { CompanyInvoiceSettings } from './company_invoice_settings.js';
|
|
3
|
+
import { InvoiceTemplate } from './invoice_template.js';
|
|
4
|
+
|
|
5
|
+
export class CompanyInvoiceSettingsVersion extends Entity {
|
|
6
|
+
protected static resourceName = 'company-invoice-settings-versions';
|
|
7
|
+
protected static singularName = 'companyInvoiceSettingsVersion';
|
|
8
|
+
protected static pluralName = 'companyInvoiceSettingsVersions';
|
|
9
|
+
|
|
10
|
+
@CompanyInvoiceSettingsVersion.property()
|
|
11
|
+
public id?: number;
|
|
12
|
+
|
|
13
|
+
@CompanyInvoiceSettingsVersion.property({type: 'CompanyInvoiceSettings'})
|
|
14
|
+
public settings?: CompanyInvoiceSettings | null;
|
|
15
|
+
|
|
16
|
+
@CompanyInvoiceSettingsVersion.property({type: 'InvoiceTemplate'})
|
|
17
|
+
public template?: InvoiceTemplate | null;
|
|
18
|
+
|
|
19
|
+
@CompanyInvoiceSettingsVersion.property()
|
|
20
|
+
public themeOverrides?: any;
|
|
21
|
+
|
|
22
|
+
@CompanyInvoiceSettingsVersion.property()
|
|
23
|
+
public blockOverrides?: any;
|
|
24
|
+
|
|
25
|
+
@CompanyInvoiceSettingsVersion.property()
|
|
26
|
+
public customCss?: string;
|
|
27
|
+
|
|
28
|
+
@CompanyInvoiceSettingsVersion.property({type: Date})
|
|
29
|
+
public creationDate?: Date | null;
|
|
30
|
+
}
|
package/src/entities/invoice.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Address } from './address.js';
|
|
2
2
|
import { Cart } from './cart.js';
|
|
3
3
|
import { Company } from './company.js';
|
|
4
|
+
import { CompanyInvoiceSettingsVersion } from './company_invoice_settings_version.js';
|
|
4
5
|
import { Domain } from './domain.js';
|
|
5
6
|
import { DomainTag } from './domain_tag.js';
|
|
6
7
|
import { EmailAddress } from './email_address.js';
|
|
7
8
|
import { Entity } from '../entity.js';
|
|
8
9
|
import { MerchiFile } from './file.js';
|
|
9
10
|
import { InternalTag } from './internal_tag.js';
|
|
11
|
+
import { InvoiceTemplateVersion } from './invoice_template_version.js';
|
|
10
12
|
import { Item } from './item.js';
|
|
11
13
|
import { Job } from './job.js';
|
|
12
14
|
import { Quote } from './quote.js';
|
|
@@ -115,6 +117,9 @@ export class Invoice extends Entity {
|
|
|
115
117
|
@Invoice.property({embeddedByDefault: false})
|
|
116
118
|
public isCompletelyPaid?: boolean;
|
|
117
119
|
|
|
120
|
+
@Invoice.property({embeddedByDefault: false})
|
|
121
|
+
public rendererUsed?: string;
|
|
122
|
+
|
|
118
123
|
@Invoice.property({type: User})
|
|
119
124
|
public responsibleManager?: User | null;
|
|
120
125
|
|
|
@@ -124,10 +129,10 @@ export class Invoice extends Entity {
|
|
|
124
129
|
@Invoice.property()
|
|
125
130
|
public client?: User;
|
|
126
131
|
|
|
127
|
-
@Invoice.property({type: Company})
|
|
132
|
+
@Invoice.property({type: 'Company'})
|
|
128
133
|
public clientCompany?: Company | null;
|
|
129
134
|
|
|
130
|
-
@
|
|
135
|
+
@Invoice.property({arrayType: 'Company'})
|
|
131
136
|
public subscriptionCompanies?: Company[];
|
|
132
137
|
|
|
133
138
|
@Invoice.property({type: Address})
|
|
@@ -145,6 +150,12 @@ export class Invoice extends Entity {
|
|
|
145
150
|
@Invoice.property({type: MerchiFile})
|
|
146
151
|
public receipt?: MerchiFile | null;
|
|
147
152
|
|
|
153
|
+
@Invoice.property({type: 'InvoiceTemplateVersion'})
|
|
154
|
+
public templateVersion?: InvoiceTemplateVersion | null;
|
|
155
|
+
|
|
156
|
+
@Invoice.property({type: 'CompanyInvoiceSettingsVersion'})
|
|
157
|
+
public settingsVersion?: CompanyInvoiceSettingsVersion | null;
|
|
158
|
+
|
|
148
159
|
@Invoice.property({type: PhoneNumber})
|
|
149
160
|
public clientPhone?: PhoneNumber | null;
|
|
150
161
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Entity } from '../entity.js';
|
|
2
|
+
import { InvoiceTemplateVersion } from './invoice_template_version.js';
|
|
3
|
+
|
|
4
|
+
export class InvoiceTemplate extends Entity {
|
|
5
|
+
protected static resourceName = 'invoice-templates';
|
|
6
|
+
protected static singularName = 'invoiceTemplate';
|
|
7
|
+
protected static pluralName = 'invoiceTemplates';
|
|
8
|
+
|
|
9
|
+
@InvoiceTemplate.property()
|
|
10
|
+
public id?: number;
|
|
11
|
+
|
|
12
|
+
@InvoiceTemplate.property()
|
|
13
|
+
public slug?: string;
|
|
14
|
+
|
|
15
|
+
@InvoiceTemplate.property()
|
|
16
|
+
public name?: string;
|
|
17
|
+
|
|
18
|
+
@InvoiceTemplate.property()
|
|
19
|
+
public baseCss?: string;
|
|
20
|
+
|
|
21
|
+
@InvoiceTemplate.property({type: 'InvoiceTemplateVersion'})
|
|
22
|
+
public activeVersion?: InvoiceTemplateVersion | null;
|
|
23
|
+
|
|
24
|
+
@InvoiceTemplate.property({arrayType: 'InvoiceTemplateVersion'})
|
|
25
|
+
public versions?: InvoiceTemplateVersion[];
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Entity } from '../entity.js';
|
|
2
|
+
import { InvoiceTemplate } from './invoice_template.js';
|
|
3
|
+
|
|
4
|
+
export class InvoiceTemplateVersion extends Entity {
|
|
5
|
+
protected static resourceName = 'invoice-template-versions';
|
|
6
|
+
protected static singularName = 'invoiceTemplateVersion';
|
|
7
|
+
protected static pluralName = 'invoiceTemplateVersions';
|
|
8
|
+
|
|
9
|
+
@InvoiceTemplateVersion.property()
|
|
10
|
+
public id?: number;
|
|
11
|
+
|
|
12
|
+
@InvoiceTemplateVersion.property({type: 'InvoiceTemplate'})
|
|
13
|
+
public template?: InvoiceTemplate | null;
|
|
14
|
+
|
|
15
|
+
@InvoiceTemplateVersion.property()
|
|
16
|
+
public blocksJson?: any;
|
|
17
|
+
|
|
18
|
+
@InvoiceTemplateVersion.property({type: Date})
|
|
19
|
+
public creationDate?: Date | null;
|
|
20
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -12,6 +12,8 @@ import { CartShipmentGroup } from './entities/cart_shipment_group.js';
|
|
|
12
12
|
import { CartShipmentQuote } from './entities/cart_shipment_quote.js';
|
|
13
13
|
import { Category } from './entities/category.js';
|
|
14
14
|
import { Company } from './entities/company.js';
|
|
15
|
+
import { CompanyInvoiceSettings } from './entities/company_invoice_settings.js';
|
|
16
|
+
import { CompanyInvoiceSettingsVersion } from './entities/company_invoice_settings_version.js';
|
|
15
17
|
import { CompanyInvitation } from './entities/company_invitation.js';
|
|
16
18
|
import { Component } from './entities/component.js';
|
|
17
19
|
import { ComponentTag } from './entities/component_tag.js';
|
|
@@ -34,6 +36,8 @@ import { InternalTag } from './entities/internal_tag.js';
|
|
|
34
36
|
import { Inventory } from './entities/inventory.js';
|
|
35
37
|
import { InventoryUnitVariation } from './entities/inventory_unit_variation.js';
|
|
36
38
|
import { Invoice } from './entities/invoice.js';
|
|
39
|
+
import { InvoiceTemplate } from './entities/invoice_template.js';
|
|
40
|
+
import { InvoiceTemplateVersion } from './entities/invoice_template_version.js';
|
|
37
41
|
import { Item } from './entities/item.js';
|
|
38
42
|
import { Job } from './entities/job.js';
|
|
39
43
|
import { JobComment } from './entities/job_comment.js';
|
|
@@ -98,6 +102,8 @@ export {
|
|
|
98
102
|
CartShipmentQuote,
|
|
99
103
|
Category,
|
|
100
104
|
Company,
|
|
105
|
+
CompanyInvoiceSettings,
|
|
106
|
+
CompanyInvoiceSettingsVersion,
|
|
101
107
|
CompanyInvitation,
|
|
102
108
|
Component,
|
|
103
109
|
ComponentTag,
|
|
@@ -121,6 +127,8 @@ export {
|
|
|
121
127
|
Inventory,
|
|
122
128
|
InventoryUnitVariation,
|
|
123
129
|
Invoice,
|
|
130
|
+
InvoiceTemplate,
|
|
131
|
+
InvoiceTemplateVersion,
|
|
124
132
|
Item,
|
|
125
133
|
Job,
|
|
126
134
|
JobComment,
|
package/src/merchi.ts
CHANGED
|
@@ -20,6 +20,8 @@ import { InventoryGroup } from './entities/inventory_group.js';
|
|
|
20
20
|
import { QuoteItem } from './entities/quote_item.js';
|
|
21
21
|
import { Category } from './entities/category.js';
|
|
22
22
|
import { Invoice } from './entities/invoice.js';
|
|
23
|
+
import { InvoiceTemplate } from './entities/invoice_template.js';
|
|
24
|
+
import { InvoiceTemplateVersion } from './entities/invoice_template_version.js';
|
|
23
25
|
import { UserCompany } from './entities/user_company.js';
|
|
24
26
|
import { InventoryUnitVariation } from './entities/inventory_unit_variation.js';
|
|
25
27
|
import { VariationFieldsOption } from './entities/variation_fields_option.js';
|
|
@@ -55,6 +57,8 @@ import { Discount } from './entities/discount.js';
|
|
|
55
57
|
import { DiscountGroup } from './entities/discount_group.js';
|
|
56
58
|
import { User } from './entities/user.js';
|
|
57
59
|
import { Company } from './entities/company.js';
|
|
60
|
+
import { CompanyInvoiceSettings } from './entities/company_invoice_settings.js';
|
|
61
|
+
import { CompanyInvoiceSettingsVersion } from './entities/company_invoice_settings_version.js';
|
|
58
62
|
import { ComponentTag } from './entities/component_tag.js';
|
|
59
63
|
import { EnrolledDomain } from './entities/enrolled_domain.js';
|
|
60
64
|
import { CountryTax } from './entities/country_tax.js';
|
|
@@ -145,6 +149,10 @@ export class Merchi {
|
|
|
145
149
|
public Category: typeof Category;
|
|
146
150
|
public MerchiFile: typeof MerchiFile;
|
|
147
151
|
public Invoice: typeof Invoice;
|
|
152
|
+
public InvoiceTemplate: typeof InvoiceTemplate;
|
|
153
|
+
public InvoiceTemplateVersion: typeof InvoiceTemplateVersion;
|
|
154
|
+
public CompanyInvoiceSettings: typeof CompanyInvoiceSettings;
|
|
155
|
+
public CompanyInvoiceSettingsVersion: typeof CompanyInvoiceSettingsVersion;
|
|
148
156
|
public CompanyInvitation: typeof CompanyInvitation;
|
|
149
157
|
public Bank: typeof Bank;
|
|
150
158
|
public Job: typeof Job;
|
|
@@ -285,6 +293,10 @@ export class Merchi {
|
|
|
285
293
|
this.Domain = this.setupClass(Domain) as typeof Domain;
|
|
286
294
|
this.ExchangeRate = this.setupClass(ExchangeRate) as typeof ExchangeRate;
|
|
287
295
|
this.Invoice = this.setupClass(Invoice) as typeof Invoice;
|
|
296
|
+
this.InvoiceTemplate = this.setupClass(InvoiceTemplate) as typeof InvoiceTemplate;
|
|
297
|
+
this.InvoiceTemplateVersion = this.setupClass(InvoiceTemplateVersion) as typeof InvoiceTemplateVersion;
|
|
298
|
+
this.CompanyInvoiceSettings = this.setupClass(CompanyInvoiceSettings) as typeof CompanyInvoiceSettings;
|
|
299
|
+
this.CompanyInvoiceSettingsVersion = this.setupClass(CompanyInvoiceSettingsVersion) as typeof CompanyInvoiceSettingsVersion;
|
|
288
300
|
this.Job = this.setupClass(Job) as typeof Job;
|
|
289
301
|
this.ComponentTag = this.setupClass(ComponentTag) as typeof ComponentTag;
|
|
290
302
|
this.Category = this.setupClass(Category) as typeof Category;
|