@artaio/node-api
Advanced tools
Comparing version 1.2.0 to 1.2.2
@@ -19,2 +19,3 @@ import type { Logger, LoggerVerbosity } from './logging'; | ||
import { ShipmentsEndpoint } from './endpoint/shipments'; | ||
import { TagsEndpoint } from './endpoint/tags'; | ||
export interface ArtaConfig { | ||
@@ -41,2 +42,3 @@ host: string; | ||
shipments: ShipmentsEndpoint; | ||
tags: TagsEndpoint; | ||
trackings: TrackingsEndpoint; | ||
@@ -43,0 +45,0 @@ uploads: UploadsEndpoint; |
@@ -24,2 +24,3 @@ "use strict"; | ||
var shipments_1 = require("./endpoint/shipments"); | ||
var tags_1 = require("./endpoint/tags"); | ||
var defaultConfig = { | ||
@@ -51,2 +52,3 @@ host: 'api.arta.io', | ||
this.shipments = new shipments_1.ShipmentsEndpoint(this.artaClient); | ||
this.tags = new tags_1.TagsEndpoint(this.artaClient); | ||
this.trackings = new trackings_1.TrackingsEndpoint(this.artaClient); | ||
@@ -53,0 +55,0 @@ this.uploads = new uploads_1.UploadsEndpoint(this.artaClient); |
@@ -43,2 +43,5 @@ import type { AdditionalService, ArtaLocation, ArtaObject, Contact, Insurance, QuoteType, SupportedCurrency } from '../types'; | ||
create(payload: QuoteRequestCreateBody, auth?: string): Promise<EnrichRequest<QuoteRequest>>; | ||
update(id: QuoteRequest['id'], payload: Partial<Pick<QuoteRequest, 'destination' | 'internal_reference' | 'origin' | 'payment_process' | 'public_reference'> & { | ||
tags: Array<string>; | ||
}>, auth?: string): Promise<EnrichRequest<QuoteRequest>>; | ||
updateContacts(id: string, contacts: UpdateRequestsContactsBody, auth?: string): Promise<EnrichRequest<QuoteRequest>>; | ||
@@ -45,0 +48,0 @@ requireCustomQuotes(id: string, customQuote: CustomQuotePayload, auth?: string): Promise<QuoteRequest>; |
@@ -66,3 +66,15 @@ "use strict"; | ||
q.optional_services.forEach(utils_1.parseService); | ||
if (q.tags) { | ||
q.tags.forEach(function (t) { | ||
q.created_at = (0, utils_1.createDateAsUTC)(t.created_at); | ||
q.updated_at = (0, utils_1.createDateAsUTC)(t.updated_at); | ||
}); | ||
} | ||
}); | ||
if (resource.tags) { | ||
resource.tags.forEach(function (t) { | ||
t.created_at = (0, utils_1.createDateAsUTC)(t.created_at); | ||
t.updated_at = (0, utils_1.createDateAsUTC)(t.updated_at); | ||
}); | ||
} | ||
} | ||
@@ -85,2 +97,5 @@ var updateContacts = function (contacts, auth) { return _this.updateContacts(resource.id, contacts, auth); }; | ||
}; | ||
QuoteRequestsEndpoint.prototype.update = function (id, payload, auth) { | ||
return this.defaultEndpoint.update(id, { request: payload }, auth); | ||
}; | ||
QuoteRequestsEndpoint.prototype.updateContacts = function (id, contacts, auth) { | ||
@@ -87,0 +102,0 @@ return __awaiter(this, void 0, void 0, function () { |
@@ -25,2 +25,5 @@ import type { ArtaID } from '../ArtaClient'; | ||
create(payload: ShipmentCreateBody, auth?: string): Promise<Shipment>; | ||
update(id: Shipment['id'], payload: Partial<Pick<Shipment, 'internal_reference' | 'payment_process' | 'public_reference'> & { | ||
tags: Array<string>; | ||
}>, auth?: string): Promise<Shipment>; | ||
} |
@@ -37,2 +37,8 @@ "use strict"; | ||
} | ||
if (s.tags) { | ||
s.tags.forEach(function (t) { | ||
t.created_at = (0, utils_1.createDateAsUTC)(t.created_at); | ||
t.updated_at = (0, utils_1.createDateAsUTC)(t.updated_at); | ||
}); | ||
} | ||
s.services && s.services.forEach(utils_1.parseService); | ||
@@ -52,4 +58,7 @@ return s; | ||
}; | ||
ShipmentsEndpoint.prototype.update = function (id, payload, auth) { | ||
return this.defaultEndpoint.update(id, { shipment: payload }, auth); | ||
}; | ||
return ShipmentsEndpoint; | ||
}()); | ||
exports.ShipmentsEndpoint = ShipmentsEndpoint; |
@@ -0,1 +1,12 @@ | ||
export type Tag = { | ||
updated_at: Date; | ||
created_at: Date; | ||
id: string; | ||
created_by?: (number | null) | undefined; | ||
description?: (string | null) | undefined; | ||
name: string; | ||
updated_by?: (number | null) | undefined; | ||
color: string; | ||
is_active: boolean; | ||
}; | ||
export type Attachment = { | ||
@@ -64,3 +75,13 @@ updated_at: Date; | ||
status: "cancelled" | "closed" | "disqualified" | "expired" | "in_progress" | "pending" | "quoted"; | ||
tags?: any; | ||
tags: { | ||
updated_at: Date; | ||
created_at: Date; | ||
id: string; | ||
created_by?: (number | null) | undefined; | ||
description?: (string | null) | undefined; | ||
name: string; | ||
updated_by?: (number | null) | undefined; | ||
color: string; | ||
is_active: boolean; | ||
}[]; | ||
currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD"; | ||
@@ -277,2 +298,13 @@ 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")[]; | ||
total: number; | ||
tags: { | ||
updated_at: Date; | ||
created_at: Date; | ||
id: string; | ||
created_by?: (number | null) | undefined; | ||
description?: (string | null) | undefined; | ||
name: string; | ||
updated_by?: (number | null) | undefined; | ||
color: string; | ||
is_active: boolean; | ||
}[]; | ||
total_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD"; | ||
@@ -748,3 +780,13 @@ url?: (string | null) | undefined; | ||
status: "cancelled" | "closed" | "disqualified" | "expired" | "in_progress" | "pending" | "quoted"; | ||
tags?: any; | ||
tags: { | ||
updated_at: Date; | ||
created_at: Date; | ||
id: string; | ||
created_by?: (number | null) | undefined; | ||
description?: (string | null) | undefined; | ||
name: string; | ||
updated_by?: (number | null) | undefined; | ||
color: string; | ||
is_active: boolean; | ||
}[]; | ||
}; | ||
@@ -751,0 +793,0 @@ export type EmailNotificationId = "booking" | "cancelled" | "collected" | "collection" | "complete" | "custom_quoted_dashboard" | "in_transit" | "invoice" | "self_ship_label" | "payment" | "scheduling" | "eei"; |
{ | ||
"name": "@artaio/node-api", | ||
"version": "1.2.0", | ||
"version": "1.2.2", | ||
"description": "The Arta Node library provides a seamless integration to Arta API for backend applications using both Typescript or Javascript.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
{ | ||
"name": "@artaio/node-api", | ||
"version": "1.2.0", | ||
"version": "1.2.2", | ||
"description": "The Arta Node library provides a seamless integration to Arta API for backend applications using both Typescript or Javascript.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
185474
70
3290