@marteye/studiojs 1.1.47 → 1.1.48-beta.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.
- package/README.md +101 -23
- package/dist/__tests__/activity.test.d.ts +1 -0
- package/dist/__tests__/cattlePassport.test.d.ts +1 -0
- package/dist/__tests__/customerLists.test.d.ts +1 -0
- package/dist/__tests__/customerLists.unit.test.d.ts +1 -0
- package/dist/__tests__/eartag.test.d.ts +1 -0
- package/dist/__tests__/lot-util.test.d.ts +1 -0
- package/dist/__tests__/lots.test.d.ts +1 -0
- package/dist/__tests__/markets.test.d.ts +1 -0
- package/dist/__tests__/media.test.d.ts +1 -0
- package/dist/__tests__/sales.test.d.ts +1 -0
- package/dist/__tests__/studio.test.d.ts +311 -0
- package/dist/index.d.ts +13 -2706
- package/dist/index.esm.js +90 -90
- package/dist/index.js +90 -90
- package/dist/resources/broadcast.d.ts +7 -0
- package/dist/resources/sales.d.ts +2 -0
- package/dist/resources.d.ts +6 -4
- package/dist/studio.d.ts +6 -4
- package/dist/types.d.ts +81 -0
- package/package.json +3 -2
- package/dist/resources/sms.d.ts +0 -7
package/dist/resources.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ export default function resources(httpClient: HttpClient): {
|
|
|
5
5
|
list: (marketId: string, params?: import("./resources/activity").ActivityListParams | undefined) => Promise<import("./resources/activity").ActivityListResponse>;
|
|
6
6
|
get: (marketId: string, activityId: string) => Promise<import("./types").ActivityLog>;
|
|
7
7
|
};
|
|
8
|
+
broadcast: {
|
|
9
|
+
send: (marketId: string, data: import("./types").BroadcastPayload) => Promise<import("./types").BroadcastSendResponse>;
|
|
10
|
+
get: (marketId: string, type: import("./types").BroadcastType, taskId: string) => Promise<import("./types").BroadcastTask>;
|
|
11
|
+
};
|
|
8
12
|
markets: {
|
|
9
13
|
get: (marketId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").Market>;
|
|
10
14
|
};
|
|
@@ -33,6 +37,7 @@ export default function resources(httpClient: HttpClient): {
|
|
|
33
37
|
image?: string | null | undefined;
|
|
34
38
|
cover?: string | null | undefined;
|
|
35
39
|
templateId?: string | null | undefined;
|
|
40
|
+
enableLotGrouping?: boolean | undefined;
|
|
36
41
|
attributeDefaults?: {
|
|
37
42
|
[attributekey: string]: string | number | boolean;
|
|
38
43
|
} | undefined;
|
|
@@ -46,6 +51,7 @@ export default function resources(httpClient: HttpClient): {
|
|
|
46
51
|
defaultProductCode?: string | undefined;
|
|
47
52
|
attributeDefaults?: Record<string, any> | undefined;
|
|
48
53
|
publishStatus?: import("./types").SalePublishStatus | undefined;
|
|
54
|
+
enableLotGrouping?: boolean | undefined;
|
|
49
55
|
marteyeSettings?: {
|
|
50
56
|
description?: string | undefined;
|
|
51
57
|
image?: string | undefined;
|
|
@@ -294,8 +300,4 @@ export default function resources(httpClient: HttpClient): {
|
|
|
294
300
|
getLatestTransaction: (marketId: string, account: string) => Promise<import("./resources/ledger").LedgerTransaction>;
|
|
295
301
|
listTransactions: (marketId: string, params: import("./resources/ledger").ListTransactionsParams) => Promise<import("./resources/ledger").TransactionsListResponse>;
|
|
296
302
|
};
|
|
297
|
-
sms: {
|
|
298
|
-
sendSMS: (marketId: string, data: import("./types").SendSMSPayload) => Promise<import("./types").SMSTask>;
|
|
299
|
-
getSMS: (marketId: string, smsId: string) => Promise<import("./types").SMSTask>;
|
|
300
|
-
};
|
|
301
303
|
};
|
package/dist/studio.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export declare function Studio(info?: {
|
|
|
14
14
|
list: (marketId: string, params?: import("./resources/activity").ActivityListParams | undefined) => Promise<import("./resources/activity").ActivityListResponse>;
|
|
15
15
|
get: (marketId: string, activityId: string) => Promise<import("./types").ActivityLog>;
|
|
16
16
|
};
|
|
17
|
+
broadcast: {
|
|
18
|
+
send: (marketId: string, data: import("./types").BroadcastPayload) => Promise<import("./types").BroadcastSendResponse>;
|
|
19
|
+
get: (marketId: string, type: import("./types").BroadcastType, taskId: string) => Promise<import("./types").BroadcastTask>;
|
|
20
|
+
};
|
|
17
21
|
markets: {
|
|
18
22
|
get: (marketId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").Market>;
|
|
19
23
|
};
|
|
@@ -42,6 +46,7 @@ export declare function Studio(info?: {
|
|
|
42
46
|
image?: string | null | undefined;
|
|
43
47
|
cover?: string | null | undefined;
|
|
44
48
|
templateId?: string | null | undefined;
|
|
49
|
+
enableLotGrouping?: boolean | undefined;
|
|
45
50
|
attributeDefaults?: {
|
|
46
51
|
[attributekey: string]: string | number | boolean;
|
|
47
52
|
} | undefined;
|
|
@@ -55,6 +60,7 @@ export declare function Studio(info?: {
|
|
|
55
60
|
defaultProductCode?: string | undefined;
|
|
56
61
|
attributeDefaults?: Record<string, any> | undefined;
|
|
57
62
|
publishStatus?: import("./types").SalePublishStatus | undefined;
|
|
63
|
+
enableLotGrouping?: boolean | undefined;
|
|
58
64
|
marteyeSettings?: {
|
|
59
65
|
description?: string | undefined;
|
|
60
66
|
image?: string | undefined;
|
|
@@ -303,8 +309,4 @@ export declare function Studio(info?: {
|
|
|
303
309
|
getLatestTransaction: (marketId: string, account: string) => Promise<import("./resources/ledger").LedgerTransaction>;
|
|
304
310
|
listTransactions: (marketId: string, params: import("./resources/ledger").ListTransactionsParams) => Promise<import("./resources/ledger").TransactionsListResponse>;
|
|
305
311
|
};
|
|
306
|
-
sms: {
|
|
307
|
-
sendSMS: (marketId: string, data: import("./types").SendSMSPayload) => Promise<import("./types").SMSTask>;
|
|
308
|
-
getSMS: (marketId: string, smsId: string) => Promise<import("./types").SMSTask>;
|
|
309
|
-
};
|
|
310
312
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export interface SettingsMarketDefaults {
|
|
|
46
46
|
defaultUnitOfSale: UnitOfSale;
|
|
47
47
|
defaultSuperType?: SuperType | null;
|
|
48
48
|
defaultSettleDebtsFirst?: boolean;
|
|
49
|
+
showInvoiceAveragesAndStats?: boolean;
|
|
49
50
|
liveEmailsEnabled?: boolean;
|
|
50
51
|
lotDescriptionTemplateMap?: {
|
|
51
52
|
default: string | undefined;
|
|
@@ -211,6 +212,7 @@ export interface Sale {
|
|
|
211
212
|
*/
|
|
212
213
|
publishStatus?: SalePublishStatus;
|
|
213
214
|
enableLuckMoney?: boolean;
|
|
215
|
+
enableLotGrouping?: boolean;
|
|
214
216
|
}
|
|
215
217
|
export interface TemplateSaleData {
|
|
216
218
|
name?: string;
|
|
@@ -225,6 +227,7 @@ export interface TemplateSaleData {
|
|
|
225
227
|
};
|
|
226
228
|
marteyeSettings?: MartEyeTimedSaleSettings | MartEyeLiveSaleSettings | null;
|
|
227
229
|
enableLuckMoney?: boolean;
|
|
230
|
+
enableLotGrouping?: boolean;
|
|
228
231
|
}
|
|
229
232
|
export interface SaleTemplate {
|
|
230
233
|
id: string;
|
|
@@ -1196,12 +1199,57 @@ export interface SendSMSPayload {
|
|
|
1196
1199
|
reference?: string;
|
|
1197
1200
|
senderName?: string;
|
|
1198
1201
|
}
|
|
1202
|
+
export type BroadcastType = "sms" | "email";
|
|
1203
|
+
export type BroadcastKind = "broadcast" | "statement";
|
|
1204
|
+
export type EmailDeliveryClass = "transactional" | "broadcast";
|
|
1205
|
+
export type PostmarkMessageStream = "outbound" | "broadcast";
|
|
1206
|
+
export interface BroadcastRecipient {
|
|
1207
|
+
customerId: string;
|
|
1208
|
+
displayName?: string;
|
|
1209
|
+
accountNumber?: string;
|
|
1210
|
+
phoneNumbers?: string[];
|
|
1211
|
+
emails?: string[];
|
|
1212
|
+
}
|
|
1213
|
+
export interface SMSBroadcastPayload {
|
|
1214
|
+
type: "sms";
|
|
1215
|
+
kind?: BroadcastKind;
|
|
1216
|
+
message?: string;
|
|
1217
|
+
senderName?: string;
|
|
1218
|
+
recipients: BroadcastRecipient[];
|
|
1219
|
+
}
|
|
1220
|
+
export interface EmailBroadcastPayload {
|
|
1221
|
+
type: "email";
|
|
1222
|
+
kind?: BroadcastKind;
|
|
1223
|
+
message?: string;
|
|
1224
|
+
subject?: string;
|
|
1225
|
+
subdomain?: string;
|
|
1226
|
+
recipients: BroadcastRecipient[];
|
|
1227
|
+
}
|
|
1228
|
+
export type BroadcastPayload = SMSBroadcastPayload | EmailBroadcastPayload;
|
|
1229
|
+
export interface BroadcastSendResultItem {
|
|
1230
|
+
customerId: string;
|
|
1231
|
+
taskId?: string;
|
|
1232
|
+
status: "queued" | "skipped" | "failed";
|
|
1233
|
+
recipientCount: number;
|
|
1234
|
+
reason?: string;
|
|
1235
|
+
}
|
|
1236
|
+
export interface BroadcastSendResponse {
|
|
1237
|
+
success: boolean;
|
|
1238
|
+
type: BroadcastType;
|
|
1239
|
+
kind: BroadcastKind;
|
|
1240
|
+
broadcastId: string;
|
|
1241
|
+
sent: number;
|
|
1242
|
+
skipped: number;
|
|
1243
|
+
results: BroadcastSendResultItem[];
|
|
1244
|
+
}
|
|
1199
1245
|
export interface SMSTask {
|
|
1200
1246
|
id: string;
|
|
1201
1247
|
marketId: string;
|
|
1248
|
+
broadcastId?: string;
|
|
1202
1249
|
to: string[];
|
|
1203
1250
|
message: string;
|
|
1204
1251
|
customerId?: string;
|
|
1252
|
+
accountNumber?: string;
|
|
1205
1253
|
reference?: string;
|
|
1206
1254
|
senderName?: string;
|
|
1207
1255
|
metadata?: Record<string, any>;
|
|
@@ -1224,4 +1272,37 @@ export interface SMSTask {
|
|
|
1224
1272
|
};
|
|
1225
1273
|
};
|
|
1226
1274
|
}
|
|
1275
|
+
export interface EmailTask {
|
|
1276
|
+
id: string;
|
|
1277
|
+
marketId: string;
|
|
1278
|
+
broadcastId?: string;
|
|
1279
|
+
marketName: string;
|
|
1280
|
+
replyTo: string;
|
|
1281
|
+
customerId: string;
|
|
1282
|
+
accountNumber?: string;
|
|
1283
|
+
templateId: string;
|
|
1284
|
+
deliveryClass?: EmailDeliveryClass;
|
|
1285
|
+
postmarkMessageStream?: PostmarkMessageStream;
|
|
1286
|
+
to: string[];
|
|
1287
|
+
documents?: string[];
|
|
1288
|
+
data: Record<string, any>;
|
|
1289
|
+
status: "failed" | "pending" | "sent" | "delivered" | "opened" | "bounced" | "spam-complaint";
|
|
1290
|
+
errorCode?: number;
|
|
1291
|
+
errorMessage?: string;
|
|
1292
|
+
providerMessageId?: string;
|
|
1293
|
+
createdAt: Timestamp;
|
|
1294
|
+
updatedAt: Timestamp;
|
|
1295
|
+
sentAt?: Timestamp;
|
|
1296
|
+
deliveredAt?: Timestamp;
|
|
1297
|
+
openedAt?: Timestamp;
|
|
1298
|
+
bouncedAt?: Timestamp;
|
|
1299
|
+
subject?: string;
|
|
1300
|
+
events?: {
|
|
1301
|
+
id: string;
|
|
1302
|
+
timestamp: Timestamp;
|
|
1303
|
+
type: string;
|
|
1304
|
+
recipient: string;
|
|
1305
|
+
}[];
|
|
1306
|
+
}
|
|
1307
|
+
export type BroadcastTask = SMSTask | EmailTask;
|
|
1227
1308
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marteye/studiojs",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.48-beta.1",
|
|
4
4
|
"description": "MartEye Studio JavaScript SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"test": "jest --coverage",
|
|
28
28
|
"test:watch": "jest --watch",
|
|
29
29
|
"build:types": "tsc --emitDeclarationOnly",
|
|
30
|
-
"build:publish": "npm run build && npm publish --access public"
|
|
30
|
+
"build:publish": "npm run build && npm publish --access public",
|
|
31
|
+
"build:publish:beta": "npm run build && npm publish --tag beta --access public"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@rollup/plugin-commonjs": "^25.0.0",
|
package/dist/resources/sms.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from "../net/http";
|
|
2
|
-
import { SendSMSPayload, SMSTask } from "../types";
|
|
3
|
-
export default function create(httpClient: HttpClient): {
|
|
4
|
-
sendSMS: (marketId: string, data: SendSMSPayload) => Promise<SMSTask>;
|
|
5
|
-
getSMS: (marketId: string, smsId: string) => Promise<SMSTask>;
|
|
6
|
-
};
|
|
7
|
-
export type SMS = ReturnType<typeof create>;
|