merchi_sdk_ts 1.10.0 → 1.11.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/dist/entities/job.js +4 -0
- package/dist/entities/job_note.js +3 -3
- package/dist/entities/job_operation_log.js +82 -0
- package/dist/entities/job_operation_log.test.js +6 -0
- package/dist/entities/notification.js +4 -0
- package/dist/entities/user.js +4 -0
- package/dist/index.js +2 -1
- package/dist/merchi.js +2 -0
- package/package.json +1 -1
- package/src/entities/job.ts +4 -0
- package/src/entities/job_note.ts +3 -3
- package/src/entities/job_operation_log.test.ts +7 -0
- package/src/entities/job_operation_log.ts +41 -0
- package/src/entities/notification.ts +3 -0
- package/src/entities/user.ts +4 -0
- package/src/index.ts +2 -0
- package/src/merchi.ts +3 -0
package/dist/entities/job.js
CHANGED
|
@@ -110,6 +110,10 @@ var Job = /** @class */ (function (_super) {
|
|
|
110
110
|
Job.property({ arrayType: 'JobNote' }),
|
|
111
111
|
__metadata("design:type", Array)
|
|
112
112
|
], Job.prototype, "jobNotes", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
Job.property({ arrayType: 'JobOperationLog' }),
|
|
115
|
+
__metadata("design:type", Array)
|
|
116
|
+
], Job.prototype, "operationLogs", void 0);
|
|
113
117
|
__decorate([
|
|
114
118
|
Job.property({ type: String }),
|
|
115
119
|
__metadata("design:type", Object)
|
|
@@ -62,15 +62,15 @@ var JobNote = /** @class */ (function (_super) {
|
|
|
62
62
|
__metadata("design:type", Array)
|
|
63
63
|
], JobNote.prototype, "files", void 0);
|
|
64
64
|
__decorate([
|
|
65
|
-
JobNote.property({ type:
|
|
65
|
+
JobNote.property({ type: 'Job' }),
|
|
66
66
|
__metadata("design:type", Job)
|
|
67
67
|
], JobNote.prototype, "job", void 0);
|
|
68
68
|
__decorate([
|
|
69
|
-
JobNote.property({ type:
|
|
69
|
+
JobNote.property({ type: 'User' }),
|
|
70
70
|
__metadata("design:type", User)
|
|
71
71
|
], JobNote.prototype, "createdBy", void 0);
|
|
72
72
|
__decorate([
|
|
73
|
-
JobNote.property({ type:
|
|
73
|
+
JobNote.property({ type: 'User' }),
|
|
74
74
|
__metadata("design:type", User)
|
|
75
75
|
], JobNote.prototype, "lastEditedBy", void 0);
|
|
76
76
|
return JobNote;
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
import { User } from './user.js';
|
|
27
|
+
var jsonPropertyType = /** @class */ (function () {
|
|
28
|
+
function jsonPropertyType() {
|
|
29
|
+
}
|
|
30
|
+
return jsonPropertyType;
|
|
31
|
+
}());
|
|
32
|
+
var JobOperationLog = /** @class */ (function (_super) {
|
|
33
|
+
__extends(JobOperationLog, _super);
|
|
34
|
+
function JobOperationLog() {
|
|
35
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
36
|
+
}
|
|
37
|
+
JobOperationLog.resourceName = 'job_operation_logs';
|
|
38
|
+
JobOperationLog.singularName = 'jobOperationLog';
|
|
39
|
+
JobOperationLog.pluralName = 'jobOperationLogs';
|
|
40
|
+
__decorate([
|
|
41
|
+
JobOperationLog.property({ type: String }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], JobOperationLog.prototype, "id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
JobOperationLog.property({ type: 'Job' }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], JobOperationLog.prototype, "job", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
JobOperationLog.property({ type: User }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], JobOperationLog.prototype, "user", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
JobOperationLog.property({ type: String }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], JobOperationLog.prototype, "sourceType", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
JobOperationLog.property({ type: Boolean }),
|
|
58
|
+
__metadata("design:type", Boolean)
|
|
59
|
+
], JobOperationLog.prototype, "aiInvolved", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
JobOperationLog.property({ type: String }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], JobOperationLog.prototype, "action", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
JobOperationLog.property({ type: jsonPropertyType }),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], JobOperationLog.prototype, "payloadJson", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
JobOperationLog.property({ type: jsonPropertyType }),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], JobOperationLog.prototype, "changesJson", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
JobOperationLog.property({ type: jsonPropertyType }),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], JobOperationLog.prototype, "operationJson", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
JobOperationLog.property({ type: Date }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], JobOperationLog.prototype, "createdAt", void 0);
|
|
80
|
+
return JobOperationLog;
|
|
81
|
+
}(Entity));
|
|
82
|
+
export { JobOperationLog };
|
|
@@ -58,6 +58,10 @@ var Notification = /** @class */ (function (_super) {
|
|
|
58
58
|
Notification.property(),
|
|
59
59
|
__metadata("design:type", Date)
|
|
60
60
|
], Notification.prototype, "date", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
Notification.property({ type: Date }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], Notification.prototype, "emailOpenedAt", void 0);
|
|
61
65
|
__decorate([
|
|
62
66
|
Notification.property(),
|
|
63
67
|
__metadata("design:type", Boolean)
|
package/dist/entities/user.js
CHANGED
|
@@ -327,6 +327,10 @@ var User = /** @class */ (function (_super) {
|
|
|
327
327
|
User.property({ arrayType: 'JobComment' }),
|
|
328
328
|
__metadata("design:type", Array)
|
|
329
329
|
], User.prototype, "jobComments", void 0);
|
|
330
|
+
__decorate([
|
|
331
|
+
User.property({ arrayType: 'JobOperationLog' }),
|
|
332
|
+
__metadata("design:type", Array)
|
|
333
|
+
], User.prototype, "jobOperationLogs", void 0);
|
|
330
334
|
__decorate([
|
|
331
335
|
User.property({ arrayType: 'ShipmentLog' }),
|
|
332
336
|
__metadata("design:type", Array)
|
package/dist/index.js
CHANGED
|
@@ -41,6 +41,7 @@ import { Item } from './entities/item.js';
|
|
|
41
41
|
import { Job } from './entities/job.js';
|
|
42
42
|
import { JobComment } from './entities/job_comment.js';
|
|
43
43
|
import { JobNote } from './entities/job_note.js';
|
|
44
|
+
import { JobOperationLog } from './entities/job_operation_log.js';
|
|
44
45
|
import { MatchingInventory } from './entities/matching_inventory.js';
|
|
45
46
|
import { Menu } from './entities/menu.js';
|
|
46
47
|
import { MenuItem } from './entities/menu_item.js';
|
|
@@ -84,4 +85,4 @@ import * as constants from './constants/index.js';
|
|
|
84
85
|
import * as request from './request.js';
|
|
85
86
|
import * as util from './util/index.js';
|
|
86
87
|
import { toastNotifications } from './toasts.js';
|
|
87
|
-
export { constants, request, util, toastNotifications, Address, AgentConversation, AgentSkill, AgentSkillVersion, AgentSkillApproval, 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, JobNote, MatchingInventory, Menu, MenuItem, Merchi, MerchiFile, Notification, Page, Payment, PaymentDevice, PhoneNumber, Product, ProductReview, ProductionComment, Quote, QuoteItem, Reminder, apiFetch, apiFetchWithProgress, Session, Shipment, ShipmentLog, ShipmentItem, ShipmentItemFulfillment, ShipmentMethod, ShipmentMethodVariation, ShortUrl, SubscriptionPlan, SupplyDomain, SystemRole, Theme, ThemeCssSetting, User, UserCompany, Variation, VariationField, VariationFieldsOption, VariationOption, VariationsGroup, generateUUID, getCookie };
|
|
88
|
+
export { constants, request, util, toastNotifications, Address, AgentConversation, AgentSkill, AgentSkillVersion, AgentSkillApproval, 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, JobNote, JobOperationLog, MatchingInventory, Menu, MenuItem, Merchi, MerchiFile, Notification, Page, Payment, PaymentDevice, PhoneNumber, Product, ProductReview, ProductionComment, Quote, QuoteItem, Reminder, apiFetch, apiFetchWithProgress, Session, Shipment, ShipmentLog, ShipmentItem, ShipmentItemFulfillment, ShipmentMethod, ShipmentMethodVariation, ShortUrl, SubscriptionPlan, SupplyDomain, SystemRole, Theme, ThemeCssSetting, User, UserCompany, Variation, VariationField, VariationFieldsOption, VariationOption, VariationsGroup, generateUUID, getCookie };
|
package/dist/merchi.js
CHANGED
|
@@ -13,6 +13,7 @@ import { AutomaticPaymentRelationship } from './entities/automatic_payment_relat
|
|
|
13
13
|
import { Session } from './entities/session.js';
|
|
14
14
|
import { JobComment } from './entities/job_comment.js';
|
|
15
15
|
import { JobNote } from './entities/job_note.js';
|
|
16
|
+
import { JobOperationLog } from './entities/job_operation_log.js';
|
|
16
17
|
import { Domain } from './entities/domain.js';
|
|
17
18
|
import { ExchangeRate } from './entities/exchange_rate.js';
|
|
18
19
|
import { Job } from './entities/job.js';
|
|
@@ -288,6 +289,7 @@ var Merchi = /** @class */ (function () {
|
|
|
288
289
|
this.User = this.setupClass(User);
|
|
289
290
|
this.JobComment = this.setupClass(JobComment);
|
|
290
291
|
this.JobNote = this.setupClass(JobNote);
|
|
292
|
+
this.JobOperationLog = this.setupClass(JobOperationLog);
|
|
291
293
|
this.VariationOption = this.setupClass(VariationOption);
|
|
292
294
|
this.MatchingInventory = this.setupClass(MatchingInventory);
|
|
293
295
|
this.SubscriptionPlan = this.setupClass(SubscriptionPlan);
|
package/package.json
CHANGED
package/src/entities/job.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { InternalTag } from './internal_tag.js';
|
|
|
14
14
|
import { Invoice } from './invoice.js';
|
|
15
15
|
import { JobComment } from './job_comment.js';
|
|
16
16
|
import { JobNote } from './job_note.js';
|
|
17
|
+
import { JobOperationLog } from './job_operation_log.js';
|
|
17
18
|
import { Notification } from './notification.js';
|
|
18
19
|
import { PhoneNumber } from './phone_number.js';
|
|
19
20
|
import { Product } from './product.js';
|
|
@@ -50,6 +51,9 @@ export class Job extends Entity {
|
|
|
50
51
|
@Job.property({arrayType: 'JobNote'})
|
|
51
52
|
public jobNotes?: JobNote[];
|
|
52
53
|
|
|
54
|
+
@Job.property({arrayType: 'JobOperationLog'})
|
|
55
|
+
public operationLogs?: JobOperationLog[];
|
|
56
|
+
|
|
53
57
|
@Job.property({type: String})
|
|
54
58
|
public shopifyShopUrl?: string | null;
|
|
55
59
|
|
package/src/entities/job_note.ts
CHANGED
|
@@ -29,12 +29,12 @@ export class JobNote extends Entity {
|
|
|
29
29
|
@JobNote.property({arrayType: 'MerchiFile'})
|
|
30
30
|
public files?: MerchiFile[];
|
|
31
31
|
|
|
32
|
-
@JobNote.property({type:
|
|
32
|
+
@JobNote.property({type: 'Job'})
|
|
33
33
|
public job?: Job;
|
|
34
34
|
|
|
35
|
-
@JobNote.property({type:
|
|
35
|
+
@JobNote.property({type: 'User'})
|
|
36
36
|
public createdBy?: User;
|
|
37
37
|
|
|
38
|
-
@JobNote.property({type:
|
|
38
|
+
@JobNote.property({type: 'User'})
|
|
39
39
|
public lastEditedBy?: User;
|
|
40
40
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Entity } from '../entity.js';
|
|
2
|
+
import type { Job } from './job.js';
|
|
3
|
+
import { User } from './user.js';
|
|
4
|
+
|
|
5
|
+
const jsonPropertyType = class {};
|
|
6
|
+
|
|
7
|
+
export class JobOperationLog extends Entity {
|
|
8
|
+
protected static resourceName = 'job_operation_logs';
|
|
9
|
+
protected static singularName = 'jobOperationLog';
|
|
10
|
+
protected static pluralName = 'jobOperationLogs';
|
|
11
|
+
|
|
12
|
+
@JobOperationLog.property({type: String})
|
|
13
|
+
public id?: string;
|
|
14
|
+
|
|
15
|
+
@JobOperationLog.property({type: 'Job'})
|
|
16
|
+
public job?: Job | null;
|
|
17
|
+
|
|
18
|
+
@JobOperationLog.property({type: User})
|
|
19
|
+
public user?: User | null;
|
|
20
|
+
|
|
21
|
+
@JobOperationLog.property({type: String})
|
|
22
|
+
public sourceType?: string;
|
|
23
|
+
|
|
24
|
+
@JobOperationLog.property({type: Boolean})
|
|
25
|
+
public aiInvolved?: boolean;
|
|
26
|
+
|
|
27
|
+
@JobOperationLog.property({type: String})
|
|
28
|
+
public action?: string;
|
|
29
|
+
|
|
30
|
+
@JobOperationLog.property({type: jsonPropertyType})
|
|
31
|
+
public payloadJson?: Record<string, unknown> | null;
|
|
32
|
+
|
|
33
|
+
@JobOperationLog.property({type: jsonPropertyType})
|
|
34
|
+
public changesJson?: Record<string, unknown> | null;
|
|
35
|
+
|
|
36
|
+
@JobOperationLog.property({type: jsonPropertyType})
|
|
37
|
+
public operationJson?: Record<string, unknown> | null;
|
|
38
|
+
|
|
39
|
+
@JobOperationLog.property({type: Date})
|
|
40
|
+
public createdAt?: Date | null;
|
|
41
|
+
}
|
package/src/entities/user.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { MerchiFile } from './file.js';
|
|
|
14
14
|
import { Invoice } from './invoice.js';
|
|
15
15
|
import { Job } from './job.js';
|
|
16
16
|
import { JobComment } from './job_comment.js';
|
|
17
|
+
import { JobOperationLog } from './job_operation_log.js';
|
|
17
18
|
import { Notification } from './notification.js';
|
|
18
19
|
import { Payment } from './payment.js';
|
|
19
20
|
import { PhoneNumber } from './phone_number.js';
|
|
@@ -168,6 +169,9 @@ export class User extends Entity {
|
|
|
168
169
|
@User.property({ arrayType: 'JobComment' })
|
|
169
170
|
public jobComments?: JobComment[];
|
|
170
171
|
|
|
172
|
+
@User.property({ arrayType: 'JobOperationLog' })
|
|
173
|
+
public jobOperationLogs?: JobOperationLog[];
|
|
174
|
+
|
|
171
175
|
@User.property({ arrayType: 'ShipmentLog' })
|
|
172
176
|
public shipmentLogs?: ShipmentLog[];
|
|
173
177
|
|
package/src/index.ts
CHANGED
|
@@ -41,6 +41,7 @@ import { Item } from './entities/item.js';
|
|
|
41
41
|
import { Job } from './entities/job.js';
|
|
42
42
|
import { JobComment } from './entities/job_comment.js';
|
|
43
43
|
import { JobNote } from './entities/job_note.js';
|
|
44
|
+
import { JobOperationLog } from './entities/job_operation_log.js';
|
|
44
45
|
import { MatchingInventory } from './entities/matching_inventory.js';
|
|
45
46
|
import { Menu } from './entities/menu.js';
|
|
46
47
|
import { MenuItem } from './entities/menu_item.js';
|
|
@@ -138,6 +139,7 @@ export {
|
|
|
138
139
|
Job,
|
|
139
140
|
JobComment,
|
|
140
141
|
JobNote,
|
|
142
|
+
JobOperationLog,
|
|
141
143
|
MatchingInventory,
|
|
142
144
|
Menu,
|
|
143
145
|
MenuItem,
|
package/src/merchi.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { AutomaticPaymentRelationship } from './entities/automatic_payment_relat
|
|
|
7
7
|
import { Session } from './entities/session.js';
|
|
8
8
|
import { JobComment } from './entities/job_comment.js';
|
|
9
9
|
import { JobNote } from './entities/job_note.js';
|
|
10
|
+
import { JobOperationLog } from './entities/job_operation_log.js';
|
|
10
11
|
import { Domain } from './entities/domain.js';
|
|
11
12
|
import { ExchangeRate } from './entities/exchange_rate.js';
|
|
12
13
|
import { Job } from './entities/job.js';
|
|
@@ -135,6 +136,7 @@ export class Merchi {
|
|
|
135
136
|
public InventoryGroup: typeof InventoryGroup;
|
|
136
137
|
public JobComment: typeof JobComment;
|
|
137
138
|
public JobNote: typeof JobNote;
|
|
139
|
+
public JobOperationLog: typeof JobOperationLog;
|
|
138
140
|
public VariationOption: typeof VariationOption;
|
|
139
141
|
public SupplyDomain: typeof SupplyDomain;
|
|
140
142
|
public ProductionComment: typeof ProductionComment;
|
|
@@ -376,6 +378,7 @@ export class Merchi {
|
|
|
376
378
|
this.User = this.setupClass(User) as typeof User;
|
|
377
379
|
this.JobComment = this.setupClass(JobComment) as typeof JobComment;
|
|
378
380
|
this.JobNote = this.setupClass(JobNote) as typeof JobNote;
|
|
381
|
+
this.JobOperationLog = this.setupClass(JobOperationLog) as typeof JobOperationLog;
|
|
379
382
|
this.VariationOption = this.setupClass(
|
|
380
383
|
VariationOption
|
|
381
384
|
) as typeof VariationOption;
|