ultracart_rest_api_v2_typescript 4.1.12 → 4.1.13
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/README.md +3 -2
- package/dist/models/Conversation.d.ts +12 -0
- package/dist/models/Conversation.js +4 -0
- package/dist/models/ItemRestriction.d.ts +6 -0
- package/dist/models/ItemRestriction.js +2 -0
- package/package.json +1 -1
- package/src/models/Conversation.ts +16 -0
- package/src/models/ItemRestriction.ts +8 -0
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# UltraCart Typescript SDK
|
|
2
|
-
## ultracart_rest_api_v2_typescript@4.1.
|
|
2
|
+
## ultracart_rest_api_v2_typescript@4.1.13
|
|
3
3
|
|
|
4
4
|
Every API method call has a sample for every language SDK. See https://github.com/UltraCart/sdk_samples
|
|
5
5
|
|
|
6
6
|
Installation
|
|
7
7
|
|
|
8
8
|
```
|
|
9
|
-
npm install ultracart_rest_api_v2_typescript@4.1.
|
|
9
|
+
npm install ultracart_rest_api_v2_typescript@4.1.13 --save
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
@@ -83,6 +83,7 @@ Not every change is committed to every SDK.
|
|
|
83
83
|
|
|
84
84
|
| Version | Date | Comments |
|
|
85
85
|
| --: | :-: | --- |
|
|
86
|
+
| 4.1.13 | 05/20/2025 | conversation - virtual agent flag and virtual agent cost |
|
|
86
87
|
| 4.1.12 | 05/19/2025 | conversations - AI agent capabilities method |
|
|
87
88
|
| 4.1.11 | 05/19/2025 | conversations - virtual AI budgets |
|
|
88
89
|
| 4.1.10 | 05/06/2025 | conversation - ConversationAgentProfile.user_id added for agent profiles call |
|
|
@@ -126,6 +126,18 @@ export interface Conversation {
|
|
|
126
126
|
* @memberof Conversation
|
|
127
127
|
*/
|
|
128
128
|
unread_messages?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* True if a virtual agent answered the conversation
|
|
131
|
+
* @type {boolean}
|
|
132
|
+
* @memberof Conversation
|
|
133
|
+
*/
|
|
134
|
+
virtual_agent?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* The cost of this conversation performed by the virtual agent
|
|
137
|
+
* @type {number}
|
|
138
|
+
* @memberof Conversation
|
|
139
|
+
*/
|
|
140
|
+
virtual_agent_cost?: number;
|
|
129
141
|
/**
|
|
130
142
|
*
|
|
131
143
|
* @type {boolean}
|
|
@@ -60,6 +60,8 @@ function ConversationFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
60
60
|
'sentiment': !(0, runtime_1.exists)(json, 'sentiment') ? undefined : (0, ConversationSentiment_1.ConversationSentimentFromJSON)(json['sentiment']),
|
|
61
61
|
'start_dts': !(0, runtime_1.exists)(json, 'start_dts') ? undefined : json['start_dts'],
|
|
62
62
|
'unread_messages': !(0, runtime_1.exists)(json, 'unread_messages') ? undefined : json['unread_messages'],
|
|
63
|
+
'virtual_agent': !(0, runtime_1.exists)(json, 'virtual_agent') ? undefined : json['virtual_agent'],
|
|
64
|
+
'virtual_agent_cost': !(0, runtime_1.exists)(json, 'virtual_agent_cost') ? undefined : json['virtual_agent_cost'],
|
|
63
65
|
'visible': !(0, runtime_1.exists)(json, 'visible') ? undefined : json['visible'],
|
|
64
66
|
};
|
|
65
67
|
}
|
|
@@ -90,6 +92,8 @@ function ConversationToJSON(value) {
|
|
|
90
92
|
'sentiment': (0, ConversationSentiment_1.ConversationSentimentToJSON)(value.sentiment),
|
|
91
93
|
'start_dts': value.start_dts,
|
|
92
94
|
'unread_messages': value.unread_messages,
|
|
95
|
+
'virtual_agent': value.virtual_agent,
|
|
96
|
+
'virtual_agent_cost': value.virtual_agent_cost,
|
|
93
97
|
'visible': value.visible,
|
|
94
98
|
};
|
|
95
99
|
}
|
|
@@ -28,6 +28,12 @@ export interface ItemRestriction {
|
|
|
28
28
|
* @memberof ItemRestriction
|
|
29
29
|
*/
|
|
30
30
|
exclude_from_free_promotion?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Exclude from loyalty. Must be set to true or false to save. Null is ignored for backwards SDK compatibility
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
* @memberof ItemRestriction
|
|
35
|
+
*/
|
|
36
|
+
exclude_from_loyalty?: boolean;
|
|
31
37
|
/**
|
|
32
38
|
* Items
|
|
33
39
|
* @type {Array<ItemRestrictionItem>}
|
|
@@ -35,6 +35,7 @@ function ItemRestrictionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
35
|
return {
|
|
36
36
|
'exclude_coupon': !(0, runtime_1.exists)(json, 'exclude_coupon') ? undefined : json['exclude_coupon'],
|
|
37
37
|
'exclude_from_free_promotion': !(0, runtime_1.exists)(json, 'exclude_from_free_promotion') ? undefined : json['exclude_from_free_promotion'],
|
|
38
|
+
'exclude_from_loyalty': !(0, runtime_1.exists)(json, 'exclude_from_loyalty') ? undefined : json['exclude_from_loyalty'],
|
|
38
39
|
'items': !(0, runtime_1.exists)(json, 'items') ? undefined : (json['items'].map(ItemRestrictionItem_1.ItemRestrictionItemFromJSON)),
|
|
39
40
|
'maximum_quantity': !(0, runtime_1.exists)(json, 'maximum_quantity') ? undefined : json['maximum_quantity'],
|
|
40
41
|
'minimum_quantity': !(0, runtime_1.exists)(json, 'minimum_quantity') ? undefined : json['minimum_quantity'],
|
|
@@ -54,6 +55,7 @@ function ItemRestrictionToJSON(value) {
|
|
|
54
55
|
return {
|
|
55
56
|
'exclude_coupon': value.exclude_coupon,
|
|
56
57
|
'exclude_from_free_promotion': value.exclude_from_free_promotion,
|
|
58
|
+
'exclude_from_loyalty': value.exclude_from_loyalty,
|
|
57
59
|
'items': value.items === undefined ? undefined : (value.items.map(ItemRestrictionItem_1.ItemRestrictionItemToJSON)),
|
|
58
60
|
'maximum_quantity': value.maximum_quantity,
|
|
59
61
|
'minimum_quantity': value.minimum_quantity,
|
package/package.json
CHANGED
|
@@ -146,6 +146,18 @@ export interface Conversation {
|
|
|
146
146
|
* @memberof Conversation
|
|
147
147
|
*/
|
|
148
148
|
unread_messages?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* True if a virtual agent answered the conversation
|
|
151
|
+
* @type {boolean}
|
|
152
|
+
* @memberof Conversation
|
|
153
|
+
*/
|
|
154
|
+
virtual_agent?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* The cost of this conversation performed by the virtual agent
|
|
157
|
+
* @type {number}
|
|
158
|
+
* @memberof Conversation
|
|
159
|
+
*/
|
|
160
|
+
virtual_agent_cost?: number;
|
|
149
161
|
/**
|
|
150
162
|
*
|
|
151
163
|
* @type {boolean}
|
|
@@ -203,6 +215,8 @@ export function ConversationFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
203
215
|
'sentiment': !exists(json, 'sentiment') ? undefined : ConversationSentimentFromJSON(json['sentiment']),
|
|
204
216
|
'start_dts': !exists(json, 'start_dts') ? undefined : json['start_dts'],
|
|
205
217
|
'unread_messages': !exists(json, 'unread_messages') ? undefined : json['unread_messages'],
|
|
218
|
+
'virtual_agent': !exists(json, 'virtual_agent') ? undefined : json['virtual_agent'],
|
|
219
|
+
'virtual_agent_cost': !exists(json, 'virtual_agent_cost') ? undefined : json['virtual_agent_cost'],
|
|
206
220
|
'visible': !exists(json, 'visible') ? undefined : json['visible'],
|
|
207
221
|
};
|
|
208
222
|
}
|
|
@@ -234,6 +248,8 @@ export function ConversationToJSON(value?: Conversation | null): any {
|
|
|
234
248
|
'sentiment': ConversationSentimentToJSON(value.sentiment),
|
|
235
249
|
'start_dts': value.start_dts,
|
|
236
250
|
'unread_messages': value.unread_messages,
|
|
251
|
+
'virtual_agent': value.virtual_agent,
|
|
252
|
+
'virtual_agent_cost': value.virtual_agent_cost,
|
|
237
253
|
'visible': value.visible,
|
|
238
254
|
};
|
|
239
255
|
}
|
|
@@ -38,6 +38,12 @@ export interface ItemRestriction {
|
|
|
38
38
|
* @memberof ItemRestriction
|
|
39
39
|
*/
|
|
40
40
|
exclude_from_free_promotion?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Exclude from loyalty. Must be set to true or false to save. Null is ignored for backwards SDK compatibility
|
|
43
|
+
* @type {boolean}
|
|
44
|
+
* @memberof ItemRestriction
|
|
45
|
+
*/
|
|
46
|
+
exclude_from_loyalty?: boolean;
|
|
41
47
|
/**
|
|
42
48
|
* Items
|
|
43
49
|
* @type {Array<ItemRestrictionItem>}
|
|
@@ -99,6 +105,7 @@ export function ItemRestrictionFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
99
105
|
|
|
100
106
|
'exclude_coupon': !exists(json, 'exclude_coupon') ? undefined : json['exclude_coupon'],
|
|
101
107
|
'exclude_from_free_promotion': !exists(json, 'exclude_from_free_promotion') ? undefined : json['exclude_from_free_promotion'],
|
|
108
|
+
'exclude_from_loyalty': !exists(json, 'exclude_from_loyalty') ? undefined : json['exclude_from_loyalty'],
|
|
102
109
|
'items': !exists(json, 'items') ? undefined : ((json['items'] as Array<any>).map(ItemRestrictionItemFromJSON)),
|
|
103
110
|
'maximum_quantity': !exists(json, 'maximum_quantity') ? undefined : json['maximum_quantity'],
|
|
104
111
|
'minimum_quantity': !exists(json, 'minimum_quantity') ? undefined : json['minimum_quantity'],
|
|
@@ -119,6 +126,7 @@ export function ItemRestrictionToJSON(value?: ItemRestriction | null): any {
|
|
|
119
126
|
|
|
120
127
|
'exclude_coupon': value.exclude_coupon,
|
|
121
128
|
'exclude_from_free_promotion': value.exclude_from_free_promotion,
|
|
129
|
+
'exclude_from_loyalty': value.exclude_from_loyalty,
|
|
122
130
|
'items': value.items === undefined ? undefined : ((value.items as Array<any>).map(ItemRestrictionItemToJSON)),
|
|
123
131
|
'maximum_quantity': value.maximum_quantity,
|
|
124
132
|
'minimum_quantity': value.minimum_quantity,
|