merchi_sdk_ts 1.9.12 → 1.10.1

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.
@@ -149,6 +149,10 @@ var MerchiFile = /** @class */ (function (_super) {
149
149
  MerchiFile.property({ arrayType: 'JobComment' }),
150
150
  __metadata("design:type", Array)
151
151
  ], MerchiFile.prototype, "jobComments", void 0);
152
+ __decorate([
153
+ MerchiFile.property({ arrayType: 'JobNote' }),
154
+ __metadata("design:type", Array)
155
+ ], MerchiFile.prototype, "jobNotes", void 0);
152
156
  __decorate([
153
157
  MerchiFile.property({ arrayType: 'Job' }),
154
158
  __metadata("design:type", Array)
@@ -107,13 +107,9 @@ var Job = /** @class */ (function (_super) {
107
107
  __metadata("design:type", String)
108
108
  ], Job.prototype, "currency", void 0);
109
109
  __decorate([
110
- Job.property({ type: String }),
111
- __metadata("design:type", Object)
112
- ], Job.prototype, "notes", void 0);
113
- __decorate([
114
- Job.property({ type: String }),
115
- __metadata("design:type", Object)
116
- ], Job.prototype, "productionNotes", void 0);
110
+ Job.property({ arrayType: 'JobNote' }),
111
+ __metadata("design:type", Array)
112
+ ], Job.prototype, "jobNotes", void 0);
117
113
  __decorate([
118
114
  Job.property({ type: String }),
119
115
  __metadata("design:type", Object)
@@ -0,0 +1,78 @@
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 { Job } from './job.js';
27
+ import { User } from './user.js';
28
+ var JobNote = /** @class */ (function (_super) {
29
+ __extends(JobNote, _super);
30
+ function JobNote() {
31
+ return _super !== null && _super.apply(this, arguments) || this;
32
+ }
33
+ JobNote.resourceName = 'job_notes';
34
+ JobNote.singularName = 'jobNote';
35
+ JobNote.pluralName = 'jobNotes';
36
+ __decorate([
37
+ JobNote.property({ type: Date }),
38
+ __metadata("design:type", Object)
39
+ ], JobNote.prototype, "archived", void 0);
40
+ __decorate([
41
+ JobNote.property(),
42
+ __metadata("design:type", Number)
43
+ ], JobNote.prototype, "id", void 0);
44
+ __decorate([
45
+ JobNote.property(),
46
+ __metadata("design:type", Number)
47
+ ], JobNote.prototype, "noteType", void 0);
48
+ __decorate([
49
+ JobNote.property(),
50
+ __metadata("design:type", String)
51
+ ], JobNote.prototype, "richText", void 0);
52
+ __decorate([
53
+ JobNote.property({ type: Date }),
54
+ __metadata("design:type", Object)
55
+ ], JobNote.prototype, "creationDate", void 0);
56
+ __decorate([
57
+ JobNote.property({ type: Date }),
58
+ __metadata("design:type", Object)
59
+ ], JobNote.prototype, "lastEditedTime", void 0);
60
+ __decorate([
61
+ JobNote.property({ arrayType: 'MerchiFile' }),
62
+ __metadata("design:type", Array)
63
+ ], JobNote.prototype, "files", void 0);
64
+ __decorate([
65
+ JobNote.property({ type: 'Job' }),
66
+ __metadata("design:type", Job)
67
+ ], JobNote.prototype, "job", void 0);
68
+ __decorate([
69
+ JobNote.property({ type: 'User' }),
70
+ __metadata("design:type", User)
71
+ ], JobNote.prototype, "createdBy", void 0);
72
+ __decorate([
73
+ JobNote.property({ type: 'User' }),
74
+ __metadata("design:type", User)
75
+ ], JobNote.prototype, "lastEditedBy", void 0);
76
+ return JobNote;
77
+ }(Entity));
78
+ export { JobNote };
@@ -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/entity.js CHANGED
@@ -668,6 +668,9 @@ var Entity = /** @class */ (function () {
668
668
  if (options.asRole !== undefined) {
669
669
  fetchOptions.query.push(['as_role', options.asRole.toString()]);
670
670
  }
671
+ if (options.isJobManager !== undefined) {
672
+ fetchOptions.query.push(['is_job_manager', options.isJobManager.toString()]);
673
+ }
671
674
  if (options.groupBuyOnly !== undefined) {
672
675
  fetchOptions.query.push(['group_buy_only', options.groupBuyOnly.toString()]);
673
676
  }
package/dist/index.js CHANGED
@@ -40,6 +40,7 @@ import { Invoice } from './entities/invoice.js';
40
40
  import { Item } from './entities/item.js';
41
41
  import { Job } from './entities/job.js';
42
42
  import { JobComment } from './entities/job_comment.js';
43
+ import { JobNote } from './entities/job_note.js';
43
44
  import { MatchingInventory } from './entities/matching_inventory.js';
44
45
  import { Menu } from './entities/menu.js';
45
46
  import { MenuItem } from './entities/menu_item.js';
@@ -83,4 +84,4 @@ import * as constants from './constants/index.js';
83
84
  import * as request from './request.js';
84
85
  import * as util from './util/index.js';
85
86
  import { toastNotifications } from './toasts.js';
86
- 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, 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 };
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 };
package/dist/merchi.js CHANGED
@@ -12,6 +12,7 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { AutomaticPaymentRelationship } from './entities/automatic_payment_relationship.js';
13
13
  import { Session } from './entities/session.js';
14
14
  import { JobComment } from './entities/job_comment.js';
15
+ import { JobNote } from './entities/job_note.js';
15
16
  import { Domain } from './entities/domain.js';
16
17
  import { ExchangeRate } from './entities/exchange_rate.js';
17
18
  import { Job } from './entities/job.js';
@@ -286,6 +287,7 @@ var Merchi = /** @class */ (function () {
286
287
  this.MerchiFile = this.setupClass(MerchiFile);
287
288
  this.User = this.setupClass(User);
288
289
  this.JobComment = this.setupClass(JobComment);
290
+ this.JobNote = this.setupClass(JobNote);
289
291
  this.VariationOption = this.setupClass(VariationOption);
290
292
  this.MatchingInventory = this.setupClass(MatchingInventory);
291
293
  this.SubscriptionPlan = this.setupClass(SubscriptionPlan);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "merchi_sdk_ts",
3
- "version": "1.9.12",
3
+ "version": "1.10.1",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "repository": "git@github.com:merchisdk/merchi_sdk_ts.git",
@@ -7,6 +7,7 @@ import { Entity } from '../entity.js';
7
7
  import { Invoice } from './invoice.js';
8
8
  import { Job } from './job.js';
9
9
  import { JobComment } from './job_comment.js';
10
+ import { JobNote } from './job_note.js';
10
11
  import { Notification } from './notification.js';
11
12
  import { Product } from './product.js';
12
13
  import { ProductionComment } from './production_comment.js';
@@ -104,6 +105,9 @@ export class MerchiFile extends Entity {
104
105
  @MerchiFile.property({arrayType: 'JobComment'})
105
106
  public jobComments?: JobComment[];
106
107
 
108
+ @MerchiFile.property({arrayType: 'JobNote'})
109
+ public jobNotes?: JobNote[];
110
+
107
111
  @MerchiFile.property({arrayType: 'Job'})
108
112
  public jobs?: Job[];
109
113
 
@@ -13,6 +13,7 @@ import { MatchingInventory } from './matching_inventory.js';
13
13
  import { InternalTag } from './internal_tag.js';
14
14
  import { Invoice } from './invoice.js';
15
15
  import { JobComment } from './job_comment.js';
16
+ import { JobNote } from './job_note.js';
16
17
  import { Notification } from './notification.js';
17
18
  import { PhoneNumber } from './phone_number.js';
18
19
  import { Product } from './product.js';
@@ -46,11 +47,8 @@ export class Job extends Entity {
46
47
  @Job.property()
47
48
  public currency?: string;
48
49
 
49
- @Job.property({type: String})
50
- public notes?: string | null;
51
-
52
- @Job.property({type: String})
53
- public productionNotes?: string | null;
50
+ @Job.property({arrayType: 'JobNote'})
51
+ public jobNotes?: JobNote[];
54
52
 
55
53
  @Job.property({type: String})
56
54
  public shopifyShopUrl?: string | null;
@@ -0,0 +1,40 @@
1
+ import { Entity } from '../entity.js';
2
+ import { MerchiFile } from './file.js';
3
+ import { Job } from './job.js';
4
+ import { User } from './user.js';
5
+
6
+ export class JobNote extends Entity {
7
+ protected static resourceName = 'job_notes';
8
+ protected static singularName = 'jobNote';
9
+ protected static pluralName = 'jobNotes';
10
+
11
+ @JobNote.property({type: Date})
12
+ public archived?: Date | null;
13
+
14
+ @JobNote.property()
15
+ public id?: number;
16
+
17
+ @JobNote.property()
18
+ public noteType?: number;
19
+
20
+ @JobNote.property()
21
+ public richText?: string;
22
+
23
+ @JobNote.property({type: Date})
24
+ public creationDate?: Date | null;
25
+
26
+ @JobNote.property({type: Date})
27
+ public lastEditedTime?: Date | null;
28
+
29
+ @JobNote.property({arrayType: 'MerchiFile'})
30
+ public files?: MerchiFile[];
31
+
32
+ @JobNote.property({type: 'Job'})
33
+ public job?: Job;
34
+
35
+ @JobNote.property({type: 'User'})
36
+ public createdBy?: User;
37
+
38
+ @JobNote.property({type: 'User'})
39
+ public lastEditedBy?: User;
40
+ }
@@ -29,6 +29,9 @@ export class Notification extends Entity {
29
29
  @Notification.property()
30
30
  public date?: Date;
31
31
 
32
+ @Notification.property({type: Date})
33
+ public emailOpenedAt?: Date | null;
34
+
32
35
  @Notification.property()
33
36
  public seen?: boolean;
34
37
 
package/src/index.ts CHANGED
@@ -40,6 +40,7 @@ import { Invoice } from './entities/invoice.js';
40
40
  import { Item } from './entities/item.js';
41
41
  import { Job } from './entities/job.js';
42
42
  import { JobComment } from './entities/job_comment.js';
43
+ import { JobNote } from './entities/job_note.js';
43
44
  import { MatchingInventory } from './entities/matching_inventory.js';
44
45
  import { Menu } from './entities/menu.js';
45
46
  import { MenuItem } from './entities/menu_item.js';
@@ -136,6 +137,7 @@ export {
136
137
  Item,
137
138
  Job,
138
139
  JobComment,
140
+ JobNote,
139
141
  MatchingInventory,
140
142
  Menu,
141
143
  MenuItem,
package/src/merchi.ts CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  import { AutomaticPaymentRelationship } from './entities/automatic_payment_relationship.js';
7
7
  import { Session } from './entities/session.js';
8
8
  import { JobComment } from './entities/job_comment.js';
9
+ import { JobNote } from './entities/job_note.js';
9
10
  import { Domain } from './entities/domain.js';
10
11
  import { ExchangeRate } from './entities/exchange_rate.js';
11
12
  import { Job } from './entities/job.js';
@@ -133,6 +134,7 @@ export class Merchi {
133
134
  public Inventory: typeof Inventory;
134
135
  public InventoryGroup: typeof InventoryGroup;
135
136
  public JobComment: typeof JobComment;
137
+ public JobNote: typeof JobNote;
136
138
  public VariationOption: typeof VariationOption;
137
139
  public SupplyDomain: typeof SupplyDomain;
138
140
  public ProductionComment: typeof ProductionComment;
@@ -373,6 +375,7 @@ export class Merchi {
373
375
  this.MerchiFile = this.setupClass(MerchiFile) as typeof MerchiFile;
374
376
  this.User = this.setupClass(User) as typeof User;
375
377
  this.JobComment = this.setupClass(JobComment) as typeof JobComment;
378
+ this.JobNote = this.setupClass(JobNote) as typeof JobNote;
376
379
  this.VariationOption = this.setupClass(
377
380
  VariationOption
378
381
  ) as typeof VariationOption;