merchi_sdk_ts 1.3.1 → 1.3.2
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/domain.js +5 -0
- package/dist/entities/domain_chat_settings.js +82 -0
- package/dist/entities/support_conversation.js +65 -0
- package/dist/entities/support_message.js +60 -0
- package/dist/index.js +4 -1
- package/dist/merchi.js +6 -0
- package/package.json +1 -1
- package/src/entities/domain.ts +4 -0
- package/src/entities/domain_chat_settings.ts +42 -0
- package/src/entities/support_conversation.ts +31 -0
- package/src/entities/support_message.ts +26 -0
- package/src/index.ts +6 -0
- package/src/merchi.ts +9 -0
package/dist/entities/domain.js
CHANGED
|
@@ -25,6 +25,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
25
25
|
import { Company } from './company.js';
|
|
26
26
|
import { Entity } from '../entity.js';
|
|
27
27
|
import { MerchiFile } from './file.js';
|
|
28
|
+
import { DomainChatSettings } from './domain_chat_settings.js';
|
|
28
29
|
import { Theme } from './theme.js';
|
|
29
30
|
import { DomainType } from '../constants/domain_types.js';
|
|
30
31
|
var Domain = /** @class */ (function (_super) {
|
|
@@ -361,6 +362,10 @@ var Domain = /** @class */ (function (_super) {
|
|
|
361
362
|
Domain.property({ arrayType: 'SeoDomainPage' }),
|
|
362
363
|
__metadata("design:type", Array)
|
|
363
364
|
], Domain.prototype, "seoDomainPages", void 0);
|
|
365
|
+
__decorate([
|
|
366
|
+
Domain.property({ type: DomainChatSettings }),
|
|
367
|
+
__metadata("design:type", Object)
|
|
368
|
+
], Domain.prototype, "domainChatSettings", void 0);
|
|
364
369
|
__decorate([
|
|
365
370
|
Domain.property({ arrayType: 'Theme' }),
|
|
366
371
|
__metadata("design:type", Array)
|
|
@@ -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 { Domain } from './domain.js';
|
|
26
|
+
import { Entity } from '../entity.js';
|
|
27
|
+
import { MerchiFile } from './file.js';
|
|
28
|
+
var DomainChatSettings = /** @class */ (function (_super) {
|
|
29
|
+
__extends(DomainChatSettings, _super);
|
|
30
|
+
function DomainChatSettings() {
|
|
31
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
32
|
+
}
|
|
33
|
+
DomainChatSettings.resourceName = 'domain_chat_settings';
|
|
34
|
+
DomainChatSettings.singularName = 'domainChatSettings';
|
|
35
|
+
DomainChatSettings.pluralName = 'domainChatSettingsList';
|
|
36
|
+
__decorate([
|
|
37
|
+
DomainChatSettings.property(),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], DomainChatSettings.prototype, "id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
DomainChatSettings.property(),
|
|
42
|
+
__metadata("design:type", Domain)
|
|
43
|
+
], DomainChatSettings.prototype, "domain", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
DomainChatSettings.property(),
|
|
46
|
+
__metadata("design:type", Boolean)
|
|
47
|
+
], DomainChatSettings.prototype, "enabled", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
DomainChatSettings.property(),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], DomainChatSettings.prototype, "displayName", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
DomainChatSettings.property({ type: MerchiFile }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], DomainChatSettings.prototype, "avatar", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
DomainChatSettings.property(),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], DomainChatSettings.prototype, "welcomeMessage", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
DomainChatSettings.property(),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], DomainChatSettings.prototype, "privacyPolicyUrl", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
DomainChatSettings.property(),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], DomainChatSettings.prototype, "workingHours", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
DomainChatSettings.property(),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], DomainChatSettings.prototype, "awayMessage", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
DomainChatSettings.property(),
|
|
74
|
+
__metadata("design:type", Boolean)
|
|
75
|
+
], DomainChatSettings.prototype, "notifyEmailNewConversation", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
DomainChatSettings.property(),
|
|
78
|
+
__metadata("design:type", Boolean)
|
|
79
|
+
], DomainChatSettings.prototype, "notifyEmailNewMessage", void 0);
|
|
80
|
+
return DomainChatSettings;
|
|
81
|
+
}(Entity));
|
|
82
|
+
export { DomainChatSettings };
|
|
@@ -0,0 +1,65 @@
|
|
|
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 { Domain } from './domain.js';
|
|
26
|
+
import { Entity } from '../entity.js';
|
|
27
|
+
var SupportConversation = /** @class */ (function (_super) {
|
|
28
|
+
__extends(SupportConversation, _super);
|
|
29
|
+
function SupportConversation() {
|
|
30
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
31
|
+
}
|
|
32
|
+
SupportConversation.resourceName = 'support_conversations';
|
|
33
|
+
SupportConversation.singularName = 'supportConversation';
|
|
34
|
+
SupportConversation.pluralName = 'supportConversations';
|
|
35
|
+
__decorate([
|
|
36
|
+
SupportConversation.property(),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], SupportConversation.prototype, "id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
SupportConversation.property({ type: Date }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], SupportConversation.prototype, "creationDate", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
SupportConversation.property({ type: Date }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], SupportConversation.prototype, "lastMessageAt", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
SupportConversation.property(),
|
|
49
|
+
__metadata("design:type", Domain)
|
|
50
|
+
], SupportConversation.prototype, "domain", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
SupportConversation.property(),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], SupportConversation.prototype, "guestId", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
SupportConversation.property(),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], SupportConversation.prototype, "user", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
SupportConversation.property({ arrayType: 'SupportMessage' }),
|
|
61
|
+
__metadata("design:type", Array)
|
|
62
|
+
], SupportConversation.prototype, "messages", void 0);
|
|
63
|
+
return SupportConversation;
|
|
64
|
+
}(Entity));
|
|
65
|
+
export { SupportConversation };
|
|
@@ -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 SupportMessage = /** @class */ (function (_super) {
|
|
27
|
+
__extends(SupportMessage, _super);
|
|
28
|
+
function SupportMessage() {
|
|
29
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
SupportMessage.resourceName = 'support_messages';
|
|
32
|
+
SupportMessage.singularName = 'supportMessage';
|
|
33
|
+
SupportMessage.pluralName = 'supportMessages';
|
|
34
|
+
__decorate([
|
|
35
|
+
SupportMessage.property(),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], SupportMessage.prototype, "id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
SupportMessage.property(),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], SupportMessage.prototype, "conversationId", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
SupportMessage.property(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], SupportMessage.prototype, "senderType", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
SupportMessage.property(),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], SupportMessage.prototype, "user", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
SupportMessage.property(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], SupportMessage.prototype, "content", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
SupportMessage.property({ type: Date }),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], SupportMessage.prototype, "creationDate", void 0);
|
|
58
|
+
return SupportMessage;
|
|
59
|
+
}(Entity));
|
|
60
|
+
export { SupportMessage };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Address } from './entities/address.js';
|
|
2
2
|
import { AgentConversation } from './entities/agent_conversation.js';
|
|
3
|
+
import { DomainChatSettings } from './entities/domain_chat_settings.js';
|
|
4
|
+
import { SupportConversation } from './entities/support_conversation.js';
|
|
5
|
+
import { SupportMessage } from './entities/support_message.js';
|
|
3
6
|
import { Assignment } from './entities/assignment.js';
|
|
4
7
|
import { AutomaticPaymentRelationship } from './entities/automatic_payment_relationship.js';
|
|
5
8
|
import { Bank } from './entities/bank.js';
|
|
@@ -75,4 +78,4 @@ import * as constants from './constants/index.js';
|
|
|
75
78
|
import * as request from './request.js';
|
|
76
79
|
import * as util from './util/index.js';
|
|
77
80
|
import { toastNotifications } from './toasts.js';
|
|
78
|
-
export { constants, request, util, toastNotifications, Address, AgentConversation, 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 };
|
|
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 };
|
package/dist/merchi.js
CHANGED
|
@@ -78,6 +78,9 @@ import { Variation } from './entities/variation.js';
|
|
|
78
78
|
import { CartItem } from './entities/cart_item.js';
|
|
79
79
|
import { Address } from './entities/address.js';
|
|
80
80
|
import { AgentConversation } from './entities/agent_conversation.js';
|
|
81
|
+
import { DomainChatSettings } from './entities/domain_chat_settings.js';
|
|
82
|
+
import { SupportConversation } from './entities/support_conversation.js';
|
|
83
|
+
import { SupportMessage } from './entities/support_message.js';
|
|
81
84
|
import { Assignment } from './entities/assignment.js';
|
|
82
85
|
import { MatchingInventory } from './entities/matching_inventory.js';
|
|
83
86
|
import { SubscriptionPlan } from './entities/subscription_plan.js';
|
|
@@ -253,6 +256,9 @@ var Merchi = /** @class */ (function () {
|
|
|
253
256
|
this.VariationFieldsOption = this.setupClass(VariationFieldsOption);
|
|
254
257
|
this.Address = this.setupClass(Address);
|
|
255
258
|
this.AgentConversation = this.setupClass(AgentConversation);
|
|
259
|
+
this.DomainChatSettings = this.setupClass(DomainChatSettings);
|
|
260
|
+
this.SupportConversation = this.setupClass(SupportConversation);
|
|
261
|
+
this.SupportMessage = this.setupClass(SupportMessage);
|
|
256
262
|
this.Item = this.setupClass(Item);
|
|
257
263
|
this.SupplyDomain = this.setupClass(SupplyDomain);
|
|
258
264
|
this.DomainInvitation = this.setupClass(DomainInvitation);
|
package/package.json
CHANGED
package/src/entities/domain.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { Reminder } from './reminder.js';
|
|
|
17
17
|
import { Session } from './session.js';
|
|
18
18
|
import { SupplyDomain } from './supply_domain.js';
|
|
19
19
|
import { SeoDomainPage } from './seo_domain_page.js';
|
|
20
|
+
import { DomainChatSettings } from './domain_chat_settings.js';
|
|
20
21
|
import { Theme } from './theme.js';
|
|
21
22
|
import { DomainType } from '../constants/domain_types.js';
|
|
22
23
|
import { ShipmentMethod } from './shipment_method.js';
|
|
@@ -257,6 +258,9 @@ export class Domain extends Entity {
|
|
|
257
258
|
@Domain.property({arrayType: 'SeoDomainPage'})
|
|
258
259
|
public seoDomainPages?: SeoDomainPage[];
|
|
259
260
|
|
|
261
|
+
@Domain.property({ type: DomainChatSettings })
|
|
262
|
+
public domainChatSettings?: DomainChatSettings | null;
|
|
263
|
+
|
|
260
264
|
@Domain.property({arrayType: 'Theme'})
|
|
261
265
|
public themes?: Theme[];
|
|
262
266
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Domain } from './domain.js';
|
|
2
|
+
import { Entity } from '../entity.js';
|
|
3
|
+
import { MerchiFile } from './file.js';
|
|
4
|
+
|
|
5
|
+
export class DomainChatSettings extends Entity {
|
|
6
|
+
protected static resourceName = 'domain_chat_settings';
|
|
7
|
+
protected static singularName = 'domainChatSettings';
|
|
8
|
+
protected static pluralName = 'domainChatSettingsList';
|
|
9
|
+
|
|
10
|
+
@DomainChatSettings.property()
|
|
11
|
+
public id?: number;
|
|
12
|
+
|
|
13
|
+
@DomainChatSettings.property()
|
|
14
|
+
public domain?: Domain;
|
|
15
|
+
|
|
16
|
+
@DomainChatSettings.property()
|
|
17
|
+
public enabled?: boolean;
|
|
18
|
+
|
|
19
|
+
@DomainChatSettings.property()
|
|
20
|
+
public displayName?: string | null;
|
|
21
|
+
|
|
22
|
+
@DomainChatSettings.property({ type: MerchiFile })
|
|
23
|
+
public avatar?: MerchiFile | null;
|
|
24
|
+
|
|
25
|
+
@DomainChatSettings.property()
|
|
26
|
+
public welcomeMessage?: string | null;
|
|
27
|
+
|
|
28
|
+
@DomainChatSettings.property()
|
|
29
|
+
public privacyPolicyUrl?: string | null;
|
|
30
|
+
|
|
31
|
+
@DomainChatSettings.property()
|
|
32
|
+
public workingHours?: any | null;
|
|
33
|
+
|
|
34
|
+
@DomainChatSettings.property()
|
|
35
|
+
public awayMessage?: string | null;
|
|
36
|
+
|
|
37
|
+
@DomainChatSettings.property()
|
|
38
|
+
public notifyEmailNewConversation?: boolean;
|
|
39
|
+
|
|
40
|
+
@DomainChatSettings.property()
|
|
41
|
+
public notifyEmailNewMessage?: boolean;
|
|
42
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Domain } from './domain.js';
|
|
2
|
+
import { Entity } from '../entity.js';
|
|
3
|
+
import { User } from './user.js';
|
|
4
|
+
import { SupportMessage } from './support_message.js';
|
|
5
|
+
|
|
6
|
+
export class SupportConversation extends Entity {
|
|
7
|
+
protected static resourceName = 'support_conversations';
|
|
8
|
+
protected static singularName = 'supportConversation';
|
|
9
|
+
protected static pluralName = 'supportConversations';
|
|
10
|
+
|
|
11
|
+
@SupportConversation.property()
|
|
12
|
+
public id?: number;
|
|
13
|
+
|
|
14
|
+
@SupportConversation.property({ type: Date })
|
|
15
|
+
public creationDate?: Date | null;
|
|
16
|
+
|
|
17
|
+
@SupportConversation.property({ type: Date })
|
|
18
|
+
public lastMessageAt?: Date | null;
|
|
19
|
+
|
|
20
|
+
@SupportConversation.property()
|
|
21
|
+
public domain?: Domain;
|
|
22
|
+
|
|
23
|
+
@SupportConversation.property()
|
|
24
|
+
public guestId?: string | null;
|
|
25
|
+
|
|
26
|
+
@SupportConversation.property()
|
|
27
|
+
public user?: User | null;
|
|
28
|
+
|
|
29
|
+
@SupportConversation.property({ arrayType: 'SupportMessage' })
|
|
30
|
+
public messages?: SupportMessage[];
|
|
31
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Entity } from '../entity.js';
|
|
2
|
+
import { User } from './user.js';
|
|
3
|
+
|
|
4
|
+
export class SupportMessage extends Entity {
|
|
5
|
+
protected static resourceName = 'support_messages';
|
|
6
|
+
protected static singularName = 'supportMessage';
|
|
7
|
+
protected static pluralName = 'supportMessages';
|
|
8
|
+
|
|
9
|
+
@SupportMessage.property()
|
|
10
|
+
public id?: number;
|
|
11
|
+
|
|
12
|
+
@SupportMessage.property()
|
|
13
|
+
public conversationId?: number;
|
|
14
|
+
|
|
15
|
+
@SupportMessage.property()
|
|
16
|
+
public senderType?: string; // 'guest' | 'manager'
|
|
17
|
+
|
|
18
|
+
@SupportMessage.property()
|
|
19
|
+
public user?: User | null;
|
|
20
|
+
|
|
21
|
+
@SupportMessage.property()
|
|
22
|
+
public content?: string;
|
|
23
|
+
|
|
24
|
+
@SupportMessage.property({ type: Date })
|
|
25
|
+
public creationDate?: Date | null;
|
|
26
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Address } from './entities/address.js';
|
|
2
2
|
import { AgentConversation } from './entities/agent_conversation.js';
|
|
3
|
+
import { DomainChatSettings } from './entities/domain_chat_settings.js';
|
|
4
|
+
import { SupportConversation } from './entities/support_conversation.js';
|
|
5
|
+
import { SupportMessage } from './entities/support_message.js';
|
|
3
6
|
import { Assignment } from './entities/assignment.js';
|
|
4
7
|
import { AutomaticPaymentRelationship } from './entities/automatic_payment_relationship.js';
|
|
5
8
|
import { Bank } from './entities/bank.js';
|
|
@@ -83,6 +86,9 @@ export {
|
|
|
83
86
|
toastNotifications,
|
|
84
87
|
Address,
|
|
85
88
|
AgentConversation,
|
|
89
|
+
DomainChatSettings,
|
|
90
|
+
SupportConversation,
|
|
91
|
+
SupportMessage,
|
|
86
92
|
Assignment,
|
|
87
93
|
AutomaticPaymentRelationship,
|
|
88
94
|
Bank,
|
package/src/merchi.ts
CHANGED
|
@@ -72,6 +72,9 @@ import { Variation } from './entities/variation.js';
|
|
|
72
72
|
import { CartItem } from './entities/cart_item.js';
|
|
73
73
|
import { Address } from './entities/address.js';
|
|
74
74
|
import { AgentConversation } from './entities/agent_conversation.js';
|
|
75
|
+
import { DomainChatSettings } from './entities/domain_chat_settings.js';
|
|
76
|
+
import { SupportConversation } from './entities/support_conversation.js';
|
|
77
|
+
import { SupportMessage } from './entities/support_message.js';
|
|
75
78
|
import { Assignment } from './entities/assignment.js';
|
|
76
79
|
import { MatchingInventory } from './entities/matching_inventory.js';
|
|
77
80
|
import { SubscriptionPlan } from './entities/subscription_plan.js';
|
|
@@ -153,6 +156,9 @@ export class Merchi {
|
|
|
153
156
|
public Company: typeof Company;
|
|
154
157
|
public Address: typeof Address;
|
|
155
158
|
public AgentConversation: typeof AgentConversation;
|
|
159
|
+
public DomainChatSettings: typeof DomainChatSettings;
|
|
160
|
+
public SupportConversation: typeof SupportConversation;
|
|
161
|
+
public SupportMessage: typeof SupportMessage;
|
|
156
162
|
public ComponentTag: typeof ComponentTag;
|
|
157
163
|
public Discount: typeof Discount;
|
|
158
164
|
public DiscountGroup: typeof DiscountGroup;
|
|
@@ -324,6 +330,9 @@ export class Merchi {
|
|
|
324
330
|
) as typeof VariationFieldsOption;
|
|
325
331
|
this.Address = this.setupClass(Address) as typeof Address;
|
|
326
332
|
this.AgentConversation = this.setupClass(AgentConversation) as typeof AgentConversation;
|
|
333
|
+
this.DomainChatSettings = this.setupClass(DomainChatSettings) as typeof DomainChatSettings;
|
|
334
|
+
this.SupportConversation = this.setupClass(SupportConversation) as typeof SupportConversation;
|
|
335
|
+
this.SupportMessage = this.setupClass(SupportMessage) as typeof SupportMessage;
|
|
327
336
|
this.Item = this.setupClass(Item) as typeof Item;
|
|
328
337
|
this.SupplyDomain = this.setupClass(SupplyDomain) as typeof SupplyDomain;
|
|
329
338
|
this.DomainInvitation = this.setupClass(
|