merchi_sdk_ts 1.10.1 → 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.
@@ -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)
@@ -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 };
@@ -0,0 +1,6 @@
1
+ import { Merchi } from '../merchi.js';
2
+ test('can make JobOperationLog', function () {
3
+ var merchi = new Merchi();
4
+ var log = new merchi.JobOperationLog();
5
+ expect(log).toBeTruthy();
6
+ });
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "merchi_sdk_ts",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "repository": "git@github.com:merchisdk/merchi_sdk_ts.git",
@@ -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
 
@@ -0,0 +1,7 @@
1
+ import { Merchi } from '../merchi.js';
2
+
3
+ test('can make JobOperationLog', () => {
4
+ const merchi = new Merchi();
5
+ const log = new merchi.JobOperationLog();
6
+ expect(log).toBeTruthy();
7
+ });
@@ -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
+ }
@@ -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;