@artaio/node-api 1.1.1 → 1.2.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/lib/arta.d.ts +2 -0
- package/dist/lib/arta.js +2 -0
- package/dist/lib/endpoint/requests.d.ts +3 -0
- package/dist/lib/endpoint/requests.js +15 -0
- package/dist/lib/endpoint/shipments.d.ts +3 -0
- package/dist/lib/endpoint/shipments.js +9 -0
- package/dist/lib/endpoint/tags.d.ts +17 -0
- package/dist/lib/endpoint/tags.js +27 -0
- package/dist/lib/types.d.ts +72 -30
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/lib/arta.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { WebhooksEndpoint } from './endpoint/webhooks';
|
|
|
16
16
|
import { TrackingsEndpoint } from './endpoint/trackings';
|
|
17
17
|
import { QuoteRequestsEndpoint } from './endpoint/requests';
|
|
18
18
|
import { ShipmentsEndpoint } from './endpoint/shipments';
|
|
19
|
+
import { TagsEndpoint } from './endpoint/tags';
|
|
19
20
|
export interface ArtaConfig {
|
|
20
21
|
host: string;
|
|
21
22
|
verbosity: LoggerVerbosity;
|
|
@@ -37,6 +38,7 @@ export declare class Arta {
|
|
|
37
38
|
payments: PaymentsEndpoint;
|
|
38
39
|
requests: QuoteRequestsEndpoint;
|
|
39
40
|
shipments: ShipmentsEndpoint;
|
|
41
|
+
tags: TagsEndpoint;
|
|
40
42
|
trackings: TrackingsEndpoint;
|
|
41
43
|
uploads: UploadsEndpoint;
|
|
42
44
|
webhook_deliveries: WebhookDeliveriesEndpoint;
|
package/dist/lib/arta.js
CHANGED
|
@@ -21,6 +21,7 @@ var webhooks_1 = require("./endpoint/webhooks");
|
|
|
21
21
|
var trackings_1 = require("./endpoint/trackings");
|
|
22
22
|
var requests_1 = require("./endpoint/requests");
|
|
23
23
|
var shipments_1 = require("./endpoint/shipments");
|
|
24
|
+
var tags_1 = require("./endpoint/tags");
|
|
24
25
|
var defaultConfig = {
|
|
25
26
|
host: 'api.arta.io',
|
|
26
27
|
verbosity: 'ERROR',
|
|
@@ -47,6 +48,7 @@ var Arta = /** @class */ (function () {
|
|
|
47
48
|
this.payments = new payments_1.PaymentsEndpoint(this.artaClient);
|
|
48
49
|
this.requests = new requests_1.QuoteRequestsEndpoint(this.artaClient);
|
|
49
50
|
this.shipments = new shipments_1.ShipmentsEndpoint(this.artaClient);
|
|
51
|
+
this.tags = new tags_1.TagsEndpoint(this.artaClient);
|
|
50
52
|
this.trackings = new trackings_1.TrackingsEndpoint(this.artaClient);
|
|
51
53
|
this.uploads = new uploads_1.UploadsEndpoint(this.artaClient);
|
|
52
54
|
this.webhook_deliveries = new webhookDeliveries_1.WebhookDeliveriesEndpoint(this.artaClient);
|
|
@@ -40,6 +40,9 @@ export declare class QuoteRequestsEndpoint {
|
|
|
40
40
|
getById(id: string, auth?: string): Promise<EnrichRequest<QuoteRequest>>;
|
|
41
41
|
list(search?: RequestsSearch, page?: number, pageSize?: number, auth?: string): Promise<Page<EnrichRequest<QuoteRequestListItem>>>;
|
|
42
42
|
create(payload: QuoteRequestCreateBody, auth?: string): Promise<EnrichRequest<QuoteRequest>>;
|
|
43
|
+
update(id: QuoteRequest['id'], payload: Partial<Pick<QuoteRequest, 'destination' | 'internal_reference' | 'origin' | 'payment_process' | 'public_reference'> & {
|
|
44
|
+
tags: Array<string>;
|
|
45
|
+
}>, auth?: string): Promise<EnrichRequest<QuoteRequest>>;
|
|
43
46
|
updateContacts(id: string, contacts: UpdateRequestsContactsBody, auth?: string): Promise<EnrichRequest<QuoteRequest>>;
|
|
44
47
|
requireCustomQuotes(id: string, customQuote: CustomQuotePayload, auth?: string): Promise<QuoteRequest>;
|
|
45
48
|
cancel(id: string, auth?: string): Promise<QuoteRequest>;
|
|
@@ -63,7 +63,19 @@ var QuoteRequestsEndpoint = /** @class */ (function () {
|
|
|
63
63
|
q.total = Number(q.total);
|
|
64
64
|
q.included_services.forEach(utils_1.parseService);
|
|
65
65
|
q.optional_services.forEach(utils_1.parseService);
|
|
66
|
+
if (q.tags) {
|
|
67
|
+
q.tags.forEach(function (t) {
|
|
68
|
+
q.created_at = (0, utils_1.createDateAsUTC)(t.created_at);
|
|
69
|
+
q.updated_at = (0, utils_1.createDateAsUTC)(t.updated_at);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
66
72
|
});
|
|
73
|
+
if (resource.tags) {
|
|
74
|
+
resource.tags.forEach(function (t) {
|
|
75
|
+
t.created_at = (0, utils_1.createDateAsUTC)(t.created_at);
|
|
76
|
+
t.updated_at = (0, utils_1.createDateAsUTC)(t.updated_at);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
67
79
|
}
|
|
68
80
|
var updateContacts = function (contacts, auth) { return _this.updateContacts(resource.id, contacts, auth); };
|
|
69
81
|
var requireCustomQuotes = function (customQuote, auth) { return _this.requireCustomQuotes(resource.id, customQuote, auth); };
|
|
@@ -81,6 +93,9 @@ var QuoteRequestsEndpoint = /** @class */ (function () {
|
|
|
81
93
|
QuoteRequestsEndpoint.prototype.create = function (payload, auth) {
|
|
82
94
|
return this.defaultEndpoint.create({ request: payload }, auth);
|
|
83
95
|
};
|
|
96
|
+
QuoteRequestsEndpoint.prototype.update = function (id, payload, auth) {
|
|
97
|
+
return this.defaultEndpoint.update(id, { request: payload }, auth);
|
|
98
|
+
};
|
|
84
99
|
QuoteRequestsEndpoint.prototype.updateContacts = function (id, contacts, auth) {
|
|
85
100
|
return __awaiter(this, void 0, void 0, function () {
|
|
86
101
|
var rawReq;
|
|
@@ -22,4 +22,7 @@ export declare class ShipmentsEndpoint {
|
|
|
22
22
|
getById(id: ArtaID, auth?: string): Promise<Shipment>;
|
|
23
23
|
list(search?: ShipmentsSearch, page?: number, pageSize?: number, auth?: string): Promise<Page<Shipment>>;
|
|
24
24
|
create(payload: ShipmentCreateBody, auth?: string): Promise<Shipment>;
|
|
25
|
+
update(id: Shipment['id'], payload: Partial<Pick<Shipment, 'internal_reference' | 'payment_process' | 'public_reference'> & {
|
|
26
|
+
tags: Array<string>;
|
|
27
|
+
}>, auth?: string): Promise<Shipment>;
|
|
25
28
|
}
|
|
@@ -34,6 +34,12 @@ var ShipmentsEndpoint = /** @class */ (function () {
|
|
|
34
34
|
e.updated_at = (0, utils_1.createDateAsUTC)(e.updated_at);
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
+
if (s.tags) {
|
|
38
|
+
s.tags.forEach(function (t) {
|
|
39
|
+
t.created_at = (0, utils_1.createDateAsUTC)(t.created_at);
|
|
40
|
+
t.updated_at = (0, utils_1.createDateAsUTC)(t.updated_at);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
37
43
|
s.services && s.services.forEach(utils_1.parseService);
|
|
38
44
|
return s;
|
|
39
45
|
};
|
|
@@ -48,6 +54,9 @@ var ShipmentsEndpoint = /** @class */ (function () {
|
|
|
48
54
|
ShipmentsEndpoint.prototype.create = function (payload, auth) {
|
|
49
55
|
return this.defaultEndpoint.create({ shipment: payload }, auth);
|
|
50
56
|
};
|
|
57
|
+
ShipmentsEndpoint.prototype.update = function (id, payload, auth) {
|
|
58
|
+
return this.defaultEndpoint.update(id, { shipment: payload }, auth);
|
|
59
|
+
};
|
|
51
60
|
return ShipmentsEndpoint;
|
|
52
61
|
}());
|
|
53
62
|
exports.ShipmentsEndpoint = ShipmentsEndpoint;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RestClient } from '../net/RestClient';
|
|
2
|
+
import type { Page } from '../pagination';
|
|
3
|
+
import type { Tag } from '../types';
|
|
4
|
+
export type TagCreateBody = Omit<Tag, 'id' | 'created_at' | 'updated_at'>;
|
|
5
|
+
export interface TagCreate {
|
|
6
|
+
tag: TagCreateBody;
|
|
7
|
+
}
|
|
8
|
+
export declare class TagsEndpoint {
|
|
9
|
+
private readonly artaClient;
|
|
10
|
+
private readonly defaultEndpoint;
|
|
11
|
+
private readonly path;
|
|
12
|
+
constructor(artaClient: RestClient);
|
|
13
|
+
getByName(name: Tag['name'], auth?: string): Promise<Tag>;
|
|
14
|
+
list(page?: number, pageSize?: number, auth?: string): Promise<Page<Tag>>;
|
|
15
|
+
create(payload: TagCreateBody, auth?: string): Promise<Tag>;
|
|
16
|
+
update(name: Tag['name'], payload: Partial<TagCreateBody>, auth?: string): Promise<Tag>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TagsEndpoint = void 0;
|
|
4
|
+
var endpoint_1 = require("./endpoint");
|
|
5
|
+
var TagsEndpoint = /** @class */ (function () {
|
|
6
|
+
function TagsEndpoint(artaClient) {
|
|
7
|
+
this.artaClient = artaClient;
|
|
8
|
+
this.path = '/tags';
|
|
9
|
+
this.defaultEndpoint = new endpoint_1.DefaultEndpoint(this.path, this.artaClient);
|
|
10
|
+
}
|
|
11
|
+
TagsEndpoint.prototype.getByName = function (name, auth) {
|
|
12
|
+
return this.defaultEndpoint.getById(name, auth);
|
|
13
|
+
};
|
|
14
|
+
TagsEndpoint.prototype.list = function (page, pageSize, auth) {
|
|
15
|
+
if (page === void 0) { page = 1; }
|
|
16
|
+
if (pageSize === void 0) { pageSize = 20; }
|
|
17
|
+
return this.defaultEndpoint.list({ page: page, page_size: pageSize }, auth);
|
|
18
|
+
};
|
|
19
|
+
TagsEndpoint.prototype.create = function (payload, auth) {
|
|
20
|
+
return this.defaultEndpoint.create({ tag: payload }, auth);
|
|
21
|
+
};
|
|
22
|
+
TagsEndpoint.prototype.update = function (name, payload, auth) {
|
|
23
|
+
return this.defaultEndpoint.update(name, { tag: payload }, auth);
|
|
24
|
+
};
|
|
25
|
+
return TagsEndpoint;
|
|
26
|
+
}());
|
|
27
|
+
exports.TagsEndpoint = TagsEndpoint;
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
export type Tag = {
|
|
2
|
+
updated_at: Date;
|
|
3
|
+
created_at: Date;
|
|
4
|
+
id: string;
|
|
5
|
+
created_by?: (number | null) | undefined;
|
|
6
|
+
description?: (string | null) | undefined;
|
|
7
|
+
name: string;
|
|
8
|
+
updated_by?: (number | null) | undefined;
|
|
9
|
+
color: string;
|
|
10
|
+
is_active: boolean;
|
|
11
|
+
};
|
|
1
12
|
export type Attachment = {
|
|
2
13
|
updated_at: Date;
|
|
3
14
|
created_at: Date;
|
|
@@ -61,8 +72,18 @@ export type QuoteRequest = {
|
|
|
61
72
|
quote_types: ("parcel" | "premium" | "select" | "self_ship")[];
|
|
62
73
|
shortcode: string;
|
|
63
74
|
status: "cancelled" | "closed" | "disqualified" | "expired" | "in_progress" | "pending" | "quoted";
|
|
64
|
-
tags
|
|
65
|
-
|
|
75
|
+
tags: {
|
|
76
|
+
updated_at: Date;
|
|
77
|
+
created_at: Date;
|
|
78
|
+
id: string;
|
|
79
|
+
created_by?: (number | null) | undefined;
|
|
80
|
+
description?: (string | null) | undefined;
|
|
81
|
+
name: string;
|
|
82
|
+
updated_by?: (number | null) | undefined;
|
|
83
|
+
color: string;
|
|
84
|
+
is_active: boolean;
|
|
85
|
+
}[];
|
|
86
|
+
currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
66
87
|
additional_services: ("assembly" | "debris_disposal" | "deinstallation" | "destination_additional_labor" | "destination_building_coi" | "destination_condition_check" | "destination_full_condition_report" | "destination_unpacking" | "double_blind_bols" | "installation" | "origin_building_coi" | "origin_condition_check" | "origin_full_condition_report" | "placement" | "signature_delivery" | "tarmac_supervision")[];
|
|
67
88
|
disqualifications: {
|
|
68
89
|
quote_types: ("parcel" | "premium" | "select" | "self_ship")[];
|
|
@@ -91,7 +112,7 @@ export type QuoteRequest = {
|
|
|
91
112
|
subtype: "painting_unframed" | "painting_framed" | "painting_framed_plexi" | "painting_framed_glass" | "work_on_paper_unframed" | "work_on_paper_framed" | "work_on_paper_framed_plexi" | "work_on_paper_framed_glass" | "mixed_media_unframed" | "mixed_media_framed" | "mixed_media_framed_plexi" | "mixed_media_framed_glass" | "photograph_unframed" | "photograph_framed" | "photograph_framed_plexi" | "photograph_framed_glass" | "new_media" | "sculpture" | "pedestal" | "pedestal_case_glass" | "pedestal_case_plexi" | "ceramic" | "neon" | "tapestry" | "other_art" | "table" | "chair" | "sofa_loveseat_chaise" | "floor_lamp" | "floor_lamp_shade" | "table_lamp" | "table_lamp_shade" | "sconce" | "ottoman" | "bookcase_storage" | "nightstand" | "armoire_dresser" | "carpet_rug" | "mirror" | "chandelier" | "bedframe" | "headboard" | "desk_vanity" | "media_console" | "other_furniture" | "earrings" | "necklace" | "bracelet" | "ring" | "brooch" | "watch" | "cufflinks" | "eyeglasses" | "set" | "precious_stones" | "snuff_box_cigarette_case" | "other_jewelry" | "vase_vessel" | "bowl" | "plaque" | "object_of_vertu" | "candelabra_candlestick" | "dinnerware" | "flatware" | "glassware" | "serveware" | "porcelain_plate" | "porcelain_bowl" | "tabletop_accessory" | "clock" | "other_decorative_arts" | "stamp" | "book" | "coin" | "document_manuscript" | "toy" | "miniature_model" | "figurine_doll" | "neon_sign" | "memorabilia" | "camera_electrical" | "other_collectibles" | "wine_bottle" | "spirits_bottle" | "beer_bottle" | "wine_case" | "spirits_case" | "beer_case" | "wine_barrel" | "spirits_barrel" | "beer_barrel" | "other_alcohols" | "car" | "motorcycle" | "bus" | "van" | "limousine" | "carriage" | "trailer" | "sidecar" | "other_automotive" | "clothing" | "footwear" | "handbag" | "accessories" | "other_fashion" | "musical_instrument" | "firearm_weapon" | "hunting_fishing" | "medical_equipment" | "other";
|
|
92
113
|
unit_of_measurement?: (string | null) | undefined;
|
|
93
114
|
weight_unit?: (string | null) | undefined;
|
|
94
|
-
value_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
115
|
+
value_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
95
116
|
}[];
|
|
96
117
|
payment_process: "checkout" | "checkout_direct" | "invoicing";
|
|
97
118
|
preferred_quote_types?: (("parcel" | "premium" | "select" | "self_ship")[] | null) | undefined;
|
|
@@ -100,7 +121,7 @@ export type QuoteRequest = {
|
|
|
100
121
|
id: number;
|
|
101
122
|
included_services: {
|
|
102
123
|
amount: number;
|
|
103
|
-
amount_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
124
|
+
amount_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
104
125
|
is_requested?: boolean | undefined;
|
|
105
126
|
is_required?: boolean | undefined;
|
|
106
127
|
name: string;
|
|
@@ -111,14 +132,14 @@ export type QuoteRequest = {
|
|
|
111
132
|
}[];
|
|
112
133
|
included_insurance_policy?: ({
|
|
113
134
|
amount: number;
|
|
114
|
-
amount_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
135
|
+
amount_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
115
136
|
id: string;
|
|
116
137
|
insured_value: number;
|
|
117
|
-
insured_value_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
138
|
+
insured_value_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
118
139
|
} | null) | undefined;
|
|
119
140
|
optional_services: {
|
|
120
141
|
amount: number;
|
|
121
|
-
amount_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
142
|
+
amount_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
122
143
|
is_requested?: boolean | undefined;
|
|
123
144
|
is_required?: boolean | undefined;
|
|
124
145
|
name: string;
|
|
@@ -130,7 +151,7 @@ export type QuoteRequest = {
|
|
|
130
151
|
quote_type: "parcel" | "premium" | "select" | "self_ship";
|
|
131
152
|
status: string;
|
|
132
153
|
total: number;
|
|
133
|
-
total_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
154
|
+
total_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
134
155
|
}[];
|
|
135
156
|
};
|
|
136
157
|
export type Key = {
|
|
@@ -181,10 +202,10 @@ export type Shipment = {
|
|
|
181
202
|
hosted_session_id?: (number | null) | undefined;
|
|
182
203
|
insurance_policy?: ({
|
|
183
204
|
amount: number;
|
|
184
|
-
amount_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
205
|
+
amount_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
185
206
|
id: string;
|
|
186
207
|
insured_value: number;
|
|
187
|
-
insured_value_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
208
|
+
insured_value_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
188
209
|
} | null) | undefined;
|
|
189
210
|
internal_reference?: (string | null) | undefined;
|
|
190
211
|
log_request_id?: (string | null) | undefined;
|
|
@@ -238,7 +259,7 @@ export type Shipment = {
|
|
|
238
259
|
subtype: "painting_unframed" | "painting_framed" | "painting_framed_plexi" | "painting_framed_glass" | "work_on_paper_unframed" | "work_on_paper_framed" | "work_on_paper_framed_plexi" | "work_on_paper_framed_glass" | "mixed_media_unframed" | "mixed_media_framed" | "mixed_media_framed_plexi" | "mixed_media_framed_glass" | "photograph_unframed" | "photograph_framed" | "photograph_framed_plexi" | "photograph_framed_glass" | "new_media" | "sculpture" | "pedestal" | "pedestal_case_glass" | "pedestal_case_plexi" | "ceramic" | "neon" | "tapestry" | "other_art" | "table" | "chair" | "sofa_loveseat_chaise" | "floor_lamp" | "floor_lamp_shade" | "table_lamp" | "table_lamp_shade" | "sconce" | "ottoman" | "bookcase_storage" | "nightstand" | "armoire_dresser" | "carpet_rug" | "mirror" | "chandelier" | "bedframe" | "headboard" | "desk_vanity" | "media_console" | "other_furniture" | "earrings" | "necklace" | "bracelet" | "ring" | "brooch" | "watch" | "cufflinks" | "eyeglasses" | "set" | "precious_stones" | "snuff_box_cigarette_case" | "other_jewelry" | "vase_vessel" | "bowl" | "plaque" | "object_of_vertu" | "candelabra_candlestick" | "dinnerware" | "flatware" | "glassware" | "serveware" | "porcelain_plate" | "porcelain_bowl" | "tabletop_accessory" | "clock" | "other_decorative_arts" | "stamp" | "book" | "coin" | "document_manuscript" | "toy" | "miniature_model" | "figurine_doll" | "neon_sign" | "memorabilia" | "camera_electrical" | "other_collectibles" | "wine_bottle" | "spirits_bottle" | "beer_bottle" | "wine_case" | "spirits_case" | "beer_case" | "wine_barrel" | "spirits_barrel" | "beer_barrel" | "other_alcohols" | "car" | "motorcycle" | "bus" | "van" | "limousine" | "carriage" | "trailer" | "sidecar" | "other_automotive" | "clothing" | "footwear" | "handbag" | "accessories" | "other_fashion" | "musical_instrument" | "firearm_weapon" | "hunting_fishing" | "medical_equipment" | "other";
|
|
239
260
|
unit_of_measurement?: (string | null) | undefined;
|
|
240
261
|
weight_unit?: (string | null) | undefined;
|
|
241
|
-
value_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
262
|
+
value_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
242
263
|
}[];
|
|
243
264
|
packing_materials: ("alcohol_case" | "lay_flat_wine_box" | "blanket" | "wardrobe_box" | "cardboard_box" | "chandelier_box" | "chair_box" | "cbin_closed" | "cbin_open" | "ply_box" | "fine_art_econo_crate" | "fine_art_international_crate" | "econo_crate" | "international_econo_crate" | "furniture_crate" | "international_furniture_crate" | "parcel_crate" | "museum_crate" | "international_museum_crate" | "foam_lined_box" | "cavity_box" | "strongbox" | "double_box" | "travel_frame" | "travel_frame_art" | "travel_frame_other" | "a_frame" | "slat_crate" | "tri_wall_crate" | "lockbox" | "no_packing" | "pallet" | "international_pallet" | "portfolio" | "rug_rolled" | "shadow_box" | "slipcase" | "slipcase_glass_tape" | "poly_cardboard" | "bubble_cardboard" | "garment_bag" | "poly_only" | "dartek_only" | "bubble_only" | "cling_wrap" | "cbin_communal" | "sonotube" | "stabilizing_box" | "shipping_tube_small" | "shipping_tube_large")[];
|
|
244
265
|
status?: (("pending" | "transit" | "out_for_delivery" | "delivered" | "unknown" | "notfound" | "undelivered" | "exception" | "expired") | null) | undefined;
|
|
@@ -260,7 +281,7 @@ export type Shipment = {
|
|
|
260
281
|
} | null) | undefined;
|
|
261
282
|
services?: ({
|
|
262
283
|
amount: number;
|
|
263
|
-
amount_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
284
|
+
amount_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
264
285
|
is_requested?: boolean | undefined;
|
|
265
286
|
is_required?: boolean | undefined;
|
|
266
287
|
name: string;
|
|
@@ -273,7 +294,18 @@ export type Shipment = {
|
|
|
273
294
|
shortcode: string;
|
|
274
295
|
status: "pending" | "confirmed" | "collected" | "in_transit" | "completed";
|
|
275
296
|
total: number;
|
|
276
|
-
|
|
297
|
+
tags: {
|
|
298
|
+
updated_at: Date;
|
|
299
|
+
created_at: Date;
|
|
300
|
+
id: string;
|
|
301
|
+
created_by?: (number | null) | undefined;
|
|
302
|
+
description?: (string | null) | undefined;
|
|
303
|
+
name: string;
|
|
304
|
+
updated_by?: (number | null) | undefined;
|
|
305
|
+
color: string;
|
|
306
|
+
is_active: boolean;
|
|
307
|
+
}[];
|
|
308
|
+
total_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
277
309
|
url?: (string | null) | undefined;
|
|
278
310
|
tracking?: ({
|
|
279
311
|
carrier_name: string;
|
|
@@ -347,7 +379,7 @@ export type HostedSession = {
|
|
|
347
379
|
subtype: "painting_unframed" | "painting_framed" | "painting_framed_plexi" | "painting_framed_glass" | "work_on_paper_unframed" | "work_on_paper_framed" | "work_on_paper_framed_plexi" | "work_on_paper_framed_glass" | "mixed_media_unframed" | "mixed_media_framed" | "mixed_media_framed_plexi" | "mixed_media_framed_glass" | "photograph_unframed" | "photograph_framed" | "photograph_framed_plexi" | "photograph_framed_glass" | "new_media" | "sculpture" | "pedestal" | "pedestal_case_glass" | "pedestal_case_plexi" | "ceramic" | "neon" | "tapestry" | "other_art" | "table" | "chair" | "sofa_loveseat_chaise" | "floor_lamp" | "floor_lamp_shade" | "table_lamp" | "table_lamp_shade" | "sconce" | "ottoman" | "bookcase_storage" | "nightstand" | "armoire_dresser" | "carpet_rug" | "mirror" | "chandelier" | "bedframe" | "headboard" | "desk_vanity" | "media_console" | "other_furniture" | "earrings" | "necklace" | "bracelet" | "ring" | "brooch" | "watch" | "cufflinks" | "eyeglasses" | "set" | "precious_stones" | "snuff_box_cigarette_case" | "other_jewelry" | "vase_vessel" | "bowl" | "plaque" | "object_of_vertu" | "candelabra_candlestick" | "dinnerware" | "flatware" | "glassware" | "serveware" | "porcelain_plate" | "porcelain_bowl" | "tabletop_accessory" | "clock" | "other_decorative_arts" | "stamp" | "book" | "coin" | "document_manuscript" | "toy" | "miniature_model" | "figurine_doll" | "neon_sign" | "memorabilia" | "camera_electrical" | "other_collectibles" | "wine_bottle" | "spirits_bottle" | "beer_bottle" | "wine_case" | "spirits_case" | "beer_case" | "wine_barrel" | "spirits_barrel" | "beer_barrel" | "other_alcohols" | "car" | "motorcycle" | "bus" | "van" | "limousine" | "carriage" | "trailer" | "sidecar" | "other_automotive" | "clothing" | "footwear" | "handbag" | "accessories" | "other_fashion" | "musical_instrument" | "firearm_weapon" | "hunting_fishing" | "medical_equipment" | "other";
|
|
348
380
|
unit_of_measurement?: (string | null) | undefined;
|
|
349
381
|
weight_unit?: (string | null) | undefined;
|
|
350
|
-
value_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
382
|
+
value_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
351
383
|
}[];
|
|
352
384
|
origin: {
|
|
353
385
|
access_restrictions?: (("elevator_only" | "freight_elevator" | "loading_dock" | "loading_dock_low" | "low_clearance" | "non_paved" | "stairs_only" | "steep_gradient")[] | null) | undefined;
|
|
@@ -383,7 +415,7 @@ export type InvoicePayment = {
|
|
|
383
415
|
created_at: Date;
|
|
384
416
|
id: number;
|
|
385
417
|
amount: number;
|
|
386
|
-
amount_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
418
|
+
amount_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
387
419
|
credit_id?: (string | null) | undefined;
|
|
388
420
|
invoice_id?: (string | null) | undefined;
|
|
389
421
|
paid_on: Date;
|
|
@@ -395,9 +427,9 @@ export type Invoice = {
|
|
|
395
427
|
created_at: Date;
|
|
396
428
|
id: number;
|
|
397
429
|
amount_owed: number;
|
|
398
|
-
amount_owed_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
430
|
+
amount_owed_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
399
431
|
amount_paid: number;
|
|
400
|
-
amount_paid_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
432
|
+
amount_paid_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
401
433
|
issued_on?: (Date | null) | undefined;
|
|
402
434
|
shipment_id?: (string | null) | undefined;
|
|
403
435
|
status: string;
|
|
@@ -437,7 +469,7 @@ export type Payment = {
|
|
|
437
469
|
created_at: Date;
|
|
438
470
|
id: number;
|
|
439
471
|
amount: number;
|
|
440
|
-
amount_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
472
|
+
amount_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
441
473
|
context: "hosted_checkout" | "invoiced";
|
|
442
474
|
paid_on: Date;
|
|
443
475
|
};
|
|
@@ -504,7 +536,7 @@ export type Webhook = {
|
|
|
504
536
|
};
|
|
505
537
|
export type ArtaService = {
|
|
506
538
|
amount: number;
|
|
507
|
-
amount_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
539
|
+
amount_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
508
540
|
is_requested?: boolean | undefined;
|
|
509
541
|
is_required?: boolean | undefined;
|
|
510
542
|
name: string;
|
|
@@ -528,7 +560,7 @@ export type Detail = {
|
|
|
528
560
|
is_cites?: (boolean | null) | undefined;
|
|
529
561
|
};
|
|
530
562
|
export type AdditionalService = "assembly" | "debris_disposal" | "deinstallation" | "destination_additional_labor" | "destination_building_coi" | "destination_condition_check" | "destination_full_condition_report" | "destination_unpacking" | "double_blind_bols" | "installation" | "origin_building_coi" | "origin_condition_check" | "origin_full_condition_report" | "placement" | "signature_delivery" | "tarmac_supervision";
|
|
531
|
-
export type SupportedCurrency = "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
563
|
+
export type SupportedCurrency = "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
532
564
|
export type ArtaLocation = {
|
|
533
565
|
access_restrictions?: (("elevator_only" | "freight_elevator" | "loading_dock" | "loading_dock_low" | "low_clearance" | "non_paved" | "stairs_only" | "steep_gradient")[] | null) | undefined;
|
|
534
566
|
address_line_1?: (string | null) | undefined;
|
|
@@ -571,7 +603,7 @@ export type ArtaObject = {
|
|
|
571
603
|
subtype: "painting_unframed" | "painting_framed" | "painting_framed_plexi" | "painting_framed_glass" | "work_on_paper_unframed" | "work_on_paper_framed" | "work_on_paper_framed_plexi" | "work_on_paper_framed_glass" | "mixed_media_unframed" | "mixed_media_framed" | "mixed_media_framed_plexi" | "mixed_media_framed_glass" | "photograph_unframed" | "photograph_framed" | "photograph_framed_plexi" | "photograph_framed_glass" | "new_media" | "sculpture" | "pedestal" | "pedestal_case_glass" | "pedestal_case_plexi" | "ceramic" | "neon" | "tapestry" | "other_art" | "table" | "chair" | "sofa_loveseat_chaise" | "floor_lamp" | "floor_lamp_shade" | "table_lamp" | "table_lamp_shade" | "sconce" | "ottoman" | "bookcase_storage" | "nightstand" | "armoire_dresser" | "carpet_rug" | "mirror" | "chandelier" | "bedframe" | "headboard" | "desk_vanity" | "media_console" | "other_furniture" | "earrings" | "necklace" | "bracelet" | "ring" | "brooch" | "watch" | "cufflinks" | "eyeglasses" | "set" | "precious_stones" | "snuff_box_cigarette_case" | "other_jewelry" | "vase_vessel" | "bowl" | "plaque" | "object_of_vertu" | "candelabra_candlestick" | "dinnerware" | "flatware" | "glassware" | "serveware" | "porcelain_plate" | "porcelain_bowl" | "tabletop_accessory" | "clock" | "other_decorative_arts" | "stamp" | "book" | "coin" | "document_manuscript" | "toy" | "miniature_model" | "figurine_doll" | "neon_sign" | "memorabilia" | "camera_electrical" | "other_collectibles" | "wine_bottle" | "spirits_bottle" | "beer_bottle" | "wine_case" | "spirits_case" | "beer_case" | "wine_barrel" | "spirits_barrel" | "beer_barrel" | "other_alcohols" | "car" | "motorcycle" | "bus" | "van" | "limousine" | "carriage" | "trailer" | "sidecar" | "other_automotive" | "clothing" | "footwear" | "handbag" | "accessories" | "other_fashion" | "musical_instrument" | "firearm_weapon" | "hunting_fishing" | "medical_equipment" | "other";
|
|
572
604
|
unit_of_measurement?: (string | null) | undefined;
|
|
573
605
|
weight_unit?: (string | null) | undefined;
|
|
574
|
-
value_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
606
|
+
value_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
575
607
|
};
|
|
576
608
|
export type QuoteType = "parcel" | "premium" | "select" | "self_ship";
|
|
577
609
|
export type Contact = {
|
|
@@ -610,7 +642,7 @@ export type Package = {
|
|
|
610
642
|
subtype: "painting_unframed" | "painting_framed" | "painting_framed_plexi" | "painting_framed_glass" | "work_on_paper_unframed" | "work_on_paper_framed" | "work_on_paper_framed_plexi" | "work_on_paper_framed_glass" | "mixed_media_unframed" | "mixed_media_framed" | "mixed_media_framed_plexi" | "mixed_media_framed_glass" | "photograph_unframed" | "photograph_framed" | "photograph_framed_plexi" | "photograph_framed_glass" | "new_media" | "sculpture" | "pedestal" | "pedestal_case_glass" | "pedestal_case_plexi" | "ceramic" | "neon" | "tapestry" | "other_art" | "table" | "chair" | "sofa_loveseat_chaise" | "floor_lamp" | "floor_lamp_shade" | "table_lamp" | "table_lamp_shade" | "sconce" | "ottoman" | "bookcase_storage" | "nightstand" | "armoire_dresser" | "carpet_rug" | "mirror" | "chandelier" | "bedframe" | "headboard" | "desk_vanity" | "media_console" | "other_furniture" | "earrings" | "necklace" | "bracelet" | "ring" | "brooch" | "watch" | "cufflinks" | "eyeglasses" | "set" | "precious_stones" | "snuff_box_cigarette_case" | "other_jewelry" | "vase_vessel" | "bowl" | "plaque" | "object_of_vertu" | "candelabra_candlestick" | "dinnerware" | "flatware" | "glassware" | "serveware" | "porcelain_plate" | "porcelain_bowl" | "tabletop_accessory" | "clock" | "other_decorative_arts" | "stamp" | "book" | "coin" | "document_manuscript" | "toy" | "miniature_model" | "figurine_doll" | "neon_sign" | "memorabilia" | "camera_electrical" | "other_collectibles" | "wine_bottle" | "spirits_bottle" | "beer_bottle" | "wine_case" | "spirits_case" | "beer_case" | "wine_barrel" | "spirits_barrel" | "beer_barrel" | "other_alcohols" | "car" | "motorcycle" | "bus" | "van" | "limousine" | "carriage" | "trailer" | "sidecar" | "other_automotive" | "clothing" | "footwear" | "handbag" | "accessories" | "other_fashion" | "musical_instrument" | "firearm_weapon" | "hunting_fishing" | "medical_equipment" | "other";
|
|
611
643
|
unit_of_measurement?: (string | null) | undefined;
|
|
612
644
|
weight_unit?: (string | null) | undefined;
|
|
613
|
-
value_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
645
|
+
value_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
614
646
|
}[];
|
|
615
647
|
packing_materials: ("alcohol_case" | "lay_flat_wine_box" | "blanket" | "wardrobe_box" | "cardboard_box" | "chandelier_box" | "chair_box" | "cbin_closed" | "cbin_open" | "ply_box" | "fine_art_econo_crate" | "fine_art_international_crate" | "econo_crate" | "international_econo_crate" | "furniture_crate" | "international_furniture_crate" | "parcel_crate" | "museum_crate" | "international_museum_crate" | "foam_lined_box" | "cavity_box" | "strongbox" | "double_box" | "travel_frame" | "travel_frame_art" | "travel_frame_other" | "a_frame" | "slat_crate" | "tri_wall_crate" | "lockbox" | "no_packing" | "pallet" | "international_pallet" | "portfolio" | "rug_rolled" | "shadow_box" | "slipcase" | "slipcase_glass_tape" | "poly_cardboard" | "bubble_cardboard" | "garment_bag" | "poly_only" | "dartek_only" | "bubble_only" | "cling_wrap" | "cbin_communal" | "sonotube" | "stabilizing_box" | "shipping_tube_small" | "shipping_tube_large")[];
|
|
616
648
|
status?: (("pending" | "transit" | "out_for_delivery" | "delivered" | "unknown" | "notfound" | "undelivered" | "exception" | "expired") | null) | undefined;
|
|
@@ -647,16 +679,16 @@ export type ShipmentTracking = {
|
|
|
647
679
|
};
|
|
648
680
|
export type InsurancePolicy = {
|
|
649
681
|
amount: number;
|
|
650
|
-
amount_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
682
|
+
amount_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
651
683
|
id: string;
|
|
652
684
|
insured_value: number;
|
|
653
|
-
insured_value_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
685
|
+
insured_value_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
654
686
|
};
|
|
655
687
|
export type Quote = {
|
|
656
688
|
id: number;
|
|
657
689
|
included_services: {
|
|
658
690
|
amount: number;
|
|
659
|
-
amount_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
691
|
+
amount_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
660
692
|
is_requested?: boolean | undefined;
|
|
661
693
|
is_required?: boolean | undefined;
|
|
662
694
|
name: string;
|
|
@@ -667,14 +699,14 @@ export type Quote = {
|
|
|
667
699
|
}[];
|
|
668
700
|
included_insurance_policy?: ({
|
|
669
701
|
amount: number;
|
|
670
|
-
amount_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
702
|
+
amount_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
671
703
|
id: string;
|
|
672
704
|
insured_value: number;
|
|
673
|
-
insured_value_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
705
|
+
insured_value_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
674
706
|
} | null) | undefined;
|
|
675
707
|
optional_services: {
|
|
676
708
|
amount: number;
|
|
677
|
-
amount_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
709
|
+
amount_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
678
710
|
is_requested?: boolean | undefined;
|
|
679
711
|
is_required?: boolean | undefined;
|
|
680
712
|
name: string;
|
|
@@ -686,7 +718,7 @@ export type Quote = {
|
|
|
686
718
|
quote_type: "parcel" | "premium" | "select" | "self_ship";
|
|
687
719
|
status: string;
|
|
688
720
|
total: number;
|
|
689
|
-
total_currency: "CAD" | "EUR" | "GBP" | "HKD" | "USD";
|
|
721
|
+
total_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
|
|
690
722
|
};
|
|
691
723
|
export type QuoteRequestListItem = {
|
|
692
724
|
updated_at: Date;
|
|
@@ -743,7 +775,17 @@ export type QuoteRequestListItem = {
|
|
|
743
775
|
quote_types: ("parcel" | "premium" | "select" | "self_ship")[];
|
|
744
776
|
shortcode: string;
|
|
745
777
|
status: "cancelled" | "closed" | "disqualified" | "expired" | "in_progress" | "pending" | "quoted";
|
|
746
|
-
tags
|
|
778
|
+
tags: {
|
|
779
|
+
updated_at: Date;
|
|
780
|
+
created_at: Date;
|
|
781
|
+
id: string;
|
|
782
|
+
created_by?: (number | null) | undefined;
|
|
783
|
+
description?: (string | null) | undefined;
|
|
784
|
+
name: string;
|
|
785
|
+
updated_by?: (number | null) | undefined;
|
|
786
|
+
color: string;
|
|
787
|
+
is_active: boolean;
|
|
788
|
+
}[];
|
|
747
789
|
};
|
|
748
790
|
export type EmailNotificationId = "booking" | "cancelled" | "collected" | "collection" | "complete" | "custom_quoted_dashboard" | "in_transit" | "invoice" | "self_ship_label" | "payment" | "scheduling" | "eei";
|
|
749
791
|
export type Recipient = "payer" | "origin" | "destination";
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artaio/node-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "The Arta Node library provides a seamless integration to Arta API for backend applications using both Typescript or Javascript.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run build:types && tsc -p tsconfig-build.json",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artaio/node-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "The Arta Node library provides a seamless integration to Arta API for backend applications using both Typescript or Javascript.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run build:types && tsc -p tsconfig-build.json",
|