merchi_sdk_ts 1.2.8 → 1.2.10
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/agent_conversation.js +70 -0
- package/dist/entities/agent_conversation.test.js +6 -0
- package/dist/entities/variation.js +4 -0
- package/dist/entities/variation_field.js +4 -0
- package/dist/entities/variation_fields_option.js +4 -0
- package/dist/entities/variation_option.js +4 -0
- package/dist/index.js +2 -1
- package/dist/merchi.js +2 -0
- package/package.json +1 -1
- package/src/entities/agent_conversation.test.ts +7 -0
- package/src/entities/agent_conversation.ts +33 -0
- package/src/entities/variation.ts +3 -0
- package/src/entities/variation_field.ts +3 -0
- package/src/entities/variation_fields_option.ts +3 -0
- package/src/entities/variation_option.ts +3 -0
- package/src/index.ts +2 -0
- package/src/merchi.ts +3 -0
|
@@ -0,0 +1,70 @@
|
|
|
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 { User } from './user.js';
|
|
28
|
+
var AgentConversation = /** @class */ (function (_super) {
|
|
29
|
+
__extends(AgentConversation, _super);
|
|
30
|
+
function AgentConversation() {
|
|
31
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
32
|
+
}
|
|
33
|
+
AgentConversation.resourceName = 'agent_conversations';
|
|
34
|
+
AgentConversation.singularName = 'agentConversation';
|
|
35
|
+
AgentConversation.pluralName = 'agentConversations';
|
|
36
|
+
__decorate([
|
|
37
|
+
AgentConversation.property({ type: Date }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], AgentConversation.prototype, "archived", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
AgentConversation.property(),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], AgentConversation.prototype, "id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
AgentConversation.property(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], AgentConversation.prototype, "conversationId", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
AgentConversation.property(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], AgentConversation.prototype, "initialPrompt", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
AgentConversation.property({ type: Date }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], AgentConversation.prototype, "creationDate", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
AgentConversation.property(),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], AgentConversation.prototype, "serviceProvider", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
AgentConversation.property(),
|
|
62
|
+
__metadata("design:type", User)
|
|
63
|
+
], AgentConversation.prototype, "user", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
AgentConversation.property(),
|
|
66
|
+
__metadata("design:type", Domain)
|
|
67
|
+
], AgentConversation.prototype, "domain", void 0);
|
|
68
|
+
return AgentConversation;
|
|
69
|
+
}(Entity));
|
|
70
|
+
export { AgentConversation };
|
|
@@ -71,6 +71,10 @@ var Variation = /** @class */ (function (_super) {
|
|
|
71
71
|
Variation.property(),
|
|
72
72
|
__metadata("design:type", Number)
|
|
73
73
|
], Variation.prototype, "unitCostTotal", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
Variation.property(),
|
|
76
|
+
__metadata("design:type", Boolean)
|
|
77
|
+
], Variation.prototype, "isVisible", void 0);
|
|
74
78
|
__decorate([
|
|
75
79
|
Variation.property(),
|
|
76
80
|
__metadata("design:type", VariationField)
|
|
@@ -242,6 +242,10 @@ var VariationField = /** @class */ (function (_super) {
|
|
|
242
242
|
VariationField.property(),
|
|
243
243
|
__metadata("design:type", Product)
|
|
244
244
|
], VariationField.prototype, "product", void 0);
|
|
245
|
+
__decorate([
|
|
246
|
+
VariationField.property({ arrayType: 'VariationFieldsOption' }),
|
|
247
|
+
__metadata("design:type", Array)
|
|
248
|
+
], VariationField.prototype, "selectedBy", void 0);
|
|
245
249
|
__decorate([
|
|
246
250
|
VariationField.property({ type: 'InventoryGroup' }),
|
|
247
251
|
__metadata("design:type", InventoryGroup)
|
|
@@ -136,6 +136,10 @@ var VariationFieldsOption = /** @class */ (function (_super) {
|
|
|
136
136
|
VariationFieldsOption.property({ arrayType: 'InventoryUnitVariation' }),
|
|
137
137
|
__metadata("design:type", Array)
|
|
138
138
|
], VariationFieldsOption.prototype, "inventoryUnitVariations", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
VariationFieldsOption.property({ arrayType: 'VariationFieldsOption' }),
|
|
141
|
+
__metadata("design:type", Array)
|
|
142
|
+
], VariationFieldsOption.prototype, "selectedBy", void 0);
|
|
139
143
|
return VariationFieldsOption;
|
|
140
144
|
}(Entity));
|
|
141
145
|
export { VariationFieldsOption };
|
|
@@ -59,6 +59,10 @@ var VariationOption = /** @class */ (function (_super) {
|
|
|
59
59
|
VariationOption.property(),
|
|
60
60
|
__metadata("design:type", Boolean)
|
|
61
61
|
], VariationOption.prototype, "include", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
VariationOption.property(),
|
|
64
|
+
__metadata("design:type", Boolean)
|
|
65
|
+
], VariationOption.prototype, "isVisible", void 0);
|
|
62
66
|
__decorate([
|
|
63
67
|
VariationOption.property({ type: MerchiFile }),
|
|
64
68
|
__metadata("design:type", Object)
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Address } from './entities/address.js';
|
|
2
|
+
import { AgentConversation } from './entities/agent_conversation.js';
|
|
2
3
|
import { Assignment } from './entities/assignment.js';
|
|
3
4
|
import { AutomaticPaymentRelationship } from './entities/automatic_payment_relationship.js';
|
|
4
5
|
import { Bank } from './entities/bank.js';
|
|
@@ -73,4 +74,4 @@ import * as constants from './constants/index.js';
|
|
|
73
74
|
import * as request from './request.js';
|
|
74
75
|
import * as util from './util/index.js';
|
|
75
76
|
import { toastNotifications } from './toasts.js';
|
|
76
|
-
export { constants, request, util, toastNotifications, Address, 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, apiFetch, apiFetchWithProgress, Session, Shipment, ShipmentItem, ShipmentItemFulfillment, ShipmentMethod, ShipmentMethodVariation, ShortUrl, SubscriptionPlan, SupplyDomain, SystemRole, Theme, ThemeCssSetting, User, UserCompany, Variation, VariationField, VariationFieldsOption, VariationOption, VariationsGroup, generateUUID, getCookie };
|
|
77
|
+
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, 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
|
@@ -76,6 +76,7 @@ import { PhoneNumber } from './entities/phone_number.js';
|
|
|
76
76
|
import { Variation } from './entities/variation.js';
|
|
77
77
|
import { CartItem } from './entities/cart_item.js';
|
|
78
78
|
import { Address } from './entities/address.js';
|
|
79
|
+
import { AgentConversation } from './entities/agent_conversation.js';
|
|
79
80
|
import { Assignment } from './entities/assignment.js';
|
|
80
81
|
import { MatchingInventory } from './entities/matching_inventory.js';
|
|
81
82
|
import { SubscriptionPlan } from './entities/subscription_plan.js';
|
|
@@ -249,6 +250,7 @@ var Merchi = /** @class */ (function () {
|
|
|
249
250
|
this.DomainTag = this.setupClass(DomainTag);
|
|
250
251
|
this.VariationFieldsOption = this.setupClass(VariationFieldsOption);
|
|
251
252
|
this.Address = this.setupClass(Address);
|
|
253
|
+
this.AgentConversation = this.setupClass(AgentConversation);
|
|
252
254
|
this.Item = this.setupClass(Item);
|
|
253
255
|
this.SupplyDomain = this.setupClass(SupplyDomain);
|
|
254
256
|
this.DomainInvitation = this.setupClass(DomainInvitation);
|
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Domain } from './domain.js';
|
|
2
|
+
import { Entity } from '../entity.js';
|
|
3
|
+
import { User } from './user.js';
|
|
4
|
+
|
|
5
|
+
export class AgentConversation extends Entity {
|
|
6
|
+
protected static resourceName = 'agent_conversations';
|
|
7
|
+
protected static singularName = 'agentConversation';
|
|
8
|
+
protected static pluralName = 'agentConversations';
|
|
9
|
+
|
|
10
|
+
@AgentConversation.property({type: Date})
|
|
11
|
+
public archived?: Date | null;
|
|
12
|
+
|
|
13
|
+
@AgentConversation.property()
|
|
14
|
+
public id?: number;
|
|
15
|
+
|
|
16
|
+
@AgentConversation.property()
|
|
17
|
+
public conversationId?: string;
|
|
18
|
+
|
|
19
|
+
@AgentConversation.property()
|
|
20
|
+
public initialPrompt?: string;
|
|
21
|
+
|
|
22
|
+
@AgentConversation.property({type: Date})
|
|
23
|
+
public creationDate?: Date | null;
|
|
24
|
+
|
|
25
|
+
@AgentConversation.property()
|
|
26
|
+
public serviceProvider?: number;
|
|
27
|
+
|
|
28
|
+
@AgentConversation.property()
|
|
29
|
+
public user?: User;
|
|
30
|
+
|
|
31
|
+
@AgentConversation.property()
|
|
32
|
+
public domain?: Domain;
|
|
33
|
+
}
|
|
@@ -108,6 +108,9 @@ export class VariationField extends Entity {
|
|
|
108
108
|
@VariationField.property()
|
|
109
109
|
public product?: Product;
|
|
110
110
|
|
|
111
|
+
@VariationField.property({arrayType: 'VariationFieldsOption'})
|
|
112
|
+
public selectedBy?: VariationFieldsOption[];
|
|
113
|
+
|
|
111
114
|
@VariationField.property({type: 'InventoryGroup'})
|
|
112
115
|
public inventoryGroup?: InventoryGroup;
|
|
113
116
|
|
|
@@ -67,6 +67,9 @@ export class VariationFieldsOption extends Entity {
|
|
|
67
67
|
@VariationFieldsOption.property({arrayType: 'InventoryUnitVariation'})
|
|
68
68
|
public inventoryUnitVariations?: InventoryUnitVariation[];
|
|
69
69
|
|
|
70
|
+
@VariationFieldsOption.property({arrayType: 'VariationFieldsOption'})
|
|
71
|
+
public selectedBy?: VariationFieldsOption[];
|
|
72
|
+
|
|
70
73
|
public totalCost = (quantity: number) => {
|
|
71
74
|
if (this.variationCost === undefined) {
|
|
72
75
|
throw new Error('variationCost is unknown');
|
|
@@ -26,6 +26,9 @@ export class VariationOption extends Entity {
|
|
|
26
26
|
@VariationOption.property()
|
|
27
27
|
public include?: boolean;
|
|
28
28
|
|
|
29
|
+
@VariationOption.property()
|
|
30
|
+
public isVisible?: boolean;
|
|
31
|
+
|
|
29
32
|
@VariationOption.property({type: MerchiFile})
|
|
30
33
|
public linkedFile?: MerchiFile | null;
|
|
31
34
|
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Address } from './entities/address.js';
|
|
2
|
+
import { AgentConversation } from './entities/agent_conversation.js';
|
|
2
3
|
import { Assignment } from './entities/assignment.js';
|
|
3
4
|
import { AutomaticPaymentRelationship } from './entities/automatic_payment_relationship.js';
|
|
4
5
|
import { Bank } from './entities/bank.js';
|
|
@@ -80,6 +81,7 @@ export {
|
|
|
80
81
|
util,
|
|
81
82
|
toastNotifications,
|
|
82
83
|
Address,
|
|
84
|
+
AgentConversation,
|
|
83
85
|
Assignment,
|
|
84
86
|
AutomaticPaymentRelationship,
|
|
85
87
|
Bank,
|
package/src/merchi.ts
CHANGED
|
@@ -70,6 +70,7 @@ import { PhoneNumber } from './entities/phone_number.js';
|
|
|
70
70
|
import { Variation } from './entities/variation.js';
|
|
71
71
|
import { CartItem } from './entities/cart_item.js';
|
|
72
72
|
import { Address } from './entities/address.js';
|
|
73
|
+
import { AgentConversation } from './entities/agent_conversation.js';
|
|
73
74
|
import { Assignment } from './entities/assignment.js';
|
|
74
75
|
import { MatchingInventory } from './entities/matching_inventory.js';
|
|
75
76
|
import { SubscriptionPlan } from './entities/subscription_plan.js';
|
|
@@ -150,6 +151,7 @@ export class Merchi {
|
|
|
150
151
|
public PhoneNumber: typeof PhoneNumber;
|
|
151
152
|
public Company: typeof Company;
|
|
152
153
|
public Address: typeof Address;
|
|
154
|
+
public AgentConversation: typeof AgentConversation;
|
|
153
155
|
public ComponentTag: typeof ComponentTag;
|
|
154
156
|
public Discount: typeof Discount;
|
|
155
157
|
public DiscountGroup: typeof DiscountGroup;
|
|
@@ -318,6 +320,7 @@ export class Merchi {
|
|
|
318
320
|
VariationFieldsOption
|
|
319
321
|
) as typeof VariationFieldsOption;
|
|
320
322
|
this.Address = this.setupClass(Address) as typeof Address;
|
|
323
|
+
this.AgentConversation = this.setupClass(AgentConversation) as typeof AgentConversation;
|
|
321
324
|
this.Item = this.setupClass(Item) as typeof Item;
|
|
322
325
|
this.SupplyDomain = this.setupClass(SupplyDomain) as typeof SupplyDomain;
|
|
323
326
|
this.DomainInvitation = this.setupClass(
|