New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@artaio/node-api

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@artaio/node-api - npm Package Compare versions

Comparing version 0.31.0 to 0.32.0

dist/lib/net/FetchHttpClient.d.ts

2

dist/lib/arta.d.ts

@@ -1,2 +0,2 @@

import { Logger, LoggerVerbosity } from './logging';
import type { Logger, LoggerVerbosity } from './logging';
import { AttachmentsEndpoint } from './endpoint/attachment';

@@ -3,0 +3,0 @@ import { EmailRulesEndpoint } from './endpoint/emailRules';

@@ -6,3 +6,3 @@ "use strict";

var logging_1 = require("./logging");
var NodeHttpClient_1 = require("./net/NodeHttpClient");
var FetchHttpClient_1 = require("./net/FetchHttpClient");
var attachment_1 = require("./endpoint/attachment");

@@ -34,3 +34,3 @@ var emailRules_1 = require("./endpoint/emailRules");

(0, logging_1.initLogger)(this.config.logger, this.config.verbosity);
this.artaClient = new ArtaClient_1.ArtaClient(new NodeHttpClient_1.NodeHttpClient(), {
this.artaClient = new ArtaClient_1.ArtaClient(new FetchHttpClient_1.FetchHttpClient(), {
apiKey: apiKey,

@@ -37,0 +37,0 @@ host: this.config.host,

@@ -57,3 +57,6 @@ "use strict";

if (params.headers == null) {
params.headers = {};
params.headers = {
'Content-Type': 'application/json',
'User-Agent': "ARTA/v1 arta-node/".concat(package_json_1.version),
};
}

@@ -87,2 +90,3 @@ if (params.headers.Authorization == null) {

'User-Agent': "ARTA/v1 arta-node/".concat(package_json_1.version),
'Content-Type': 'application/json'
},

@@ -92,3 +96,6 @@ };

if (reqParams.headers == null) {
reqParams.headers = {};
reqParams.headers = {
'User-Agent': "ARTA/v1 arta-node/".concat(package_json_1.version),
'Content-Type': 'application/json'
};
}

@@ -111,3 +118,3 @@ reqParams.headers.Authorization = this.makeArtaAuthHeader(auth);

case 0:
reqParams = this.makeReqParams(path, 'get', auth);
reqParams = this.makeReqParams(path, 'GET', auth);
return [4 /*yield*/, this.request(reqParams)];

@@ -127,3 +134,3 @@ case 1:

case 0:
reqParams = this.makeReqParams(path, 'post', auth, JSON.stringify(payload));
reqParams = this.makeReqParams(path, 'POST', auth, JSON.stringify(payload));
return [4 /*yield*/, this.request(reqParams)];

@@ -143,3 +150,3 @@ case 1:

case 0:
reqParams = this.makeReqParams(path, 'patch', auth, JSON.stringify(payload));
reqParams = this.makeReqParams(path, 'PATCH', auth, JSON.stringify(payload));
return [4 /*yield*/, this.request(reqParams)];

@@ -157,3 +164,3 @@ case 1:

switch (_a.label) {
case 0: return [4 /*yield*/, this.request(this.makeReqParams(path, 'delete', auth))];
case 0: return [4 /*yield*/, this.request(this.makeReqParams(path, 'DELETE', auth))];
case 1:

@@ -160,0 +167,0 @@ _a.sent();

@@ -1,11 +0,5 @@

import { ArtaID } from '../ArtaClient';
import { RestClient } from '../net/RestClient';
import { DatedInterface, NullableString } from '../utils';
import { Page } from '../pagination';
export interface Attachment extends DatedInterface {
id: ArtaID;
upload_id: number;
request_id?: NullableString;
shipment_id?: NullableString;
}
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { Attachment } from '../types';
export interface AttachmentCreateBodyRequest {

@@ -12,0 +6,0 @@ upload_id: number;

@@ -1,14 +0,8 @@

import { ArtaID } from '../ArtaClient';
import { RestClient } from '../net/RestClient';
import { DatedInterface } from '../utils';
import { Page } from '../pagination';
import { EmailNotificationId, Recipients } from '../MetadataTypes';
export interface EmailRule extends DatedInterface {
id: ArtaID;
email_notification_id: EmailNotificationId;
recipients: Recipients[];
}
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { EmailNotificationId, EmailRule, Recipient } from '../types';
export interface EmailRuleCreateBody {
email_notification_id: EmailNotificationId;
recipients: Recipients[];
recipients: Recipient[];
}

@@ -26,3 +20,3 @@ export interface EmailRuleCreate {

update(id: ArtaID, payload: {
recipients: Recipients[];
recipients: Recipient[];
}, auth?: string): Promise<EmailRule>;

@@ -29,0 +23,0 @@ create(payload: EmailRuleCreateBody, auth?: string): Promise<EmailRule>;

@@ -1,14 +0,8 @@

import { ArtaID } from '../ArtaClient';
import { RestClient } from '../net/RestClient';
import { DatedInterface, NullableString } from '../utils';
import { Page } from '../pagination';
import { EmailNotificationId } from '../MetadataTypes';
export interface EmailSubscription extends DatedInterface {
id: ArtaID;
email_notification_ids: EmailNotificationId;
email_address: string;
name?: NullableString;
}
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { NullableString } from '../utils';
import type { Page } from '../pagination';
import type { EmailNotificationId, EmailSubscription } from '../types';
export interface EmailSubscriptionCreateBody {
email_notification_ids: EmailNotificationId;
email_notification_ids: EmailNotificationId[];
email_address: string;

@@ -15,0 +9,0 @@ name?: NullableString;

@@ -1,6 +0,6 @@

import { ArtaID } from '../ArtaClient';
import { RestClient } from '../net/RestClient';
import { DatedInterface } from '../utils';
import { Page } from '../pagination';
import { QueryParameters } from '../queryParams';
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { DatedInterface } from '../utils';
import type { Page } from '../pagination';
import type { QueryParameters } from '../queryParams';
export interface Endpoint<T, U> {

@@ -7,0 +7,0 @@ list: (queryParam?: QueryParameters, auth?: string) => Promise<Page<T>>;

@@ -42,4 +42,5 @@ "use strict";

var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }

@@ -46,0 +47,0 @@ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }

@@ -1,27 +0,10 @@

import { ArtaID } from '../ArtaClient';
import { RestClient } from '../net/RestClient';
import { Page } from '../pagination';
import { AdditionalService, ArtaLocation, ArtaObject, Insurance, PaymentProcessType, QuoteType, QuoteRequestStatus } from '../MetadataTypes';
import { type DatedInterface, type Nullable, type NullableString } from '../utils';
import { HostedSessionsSearch } from '../search';
export interface HostedSession extends DatedInterface {
id: ArtaID;
additional_services?: Nullable<AdditionalService[]>;
cancel_url?: NullableString;
destination?: Nullable<ArtaLocation>;
insurance?: Nullable<Insurance>;
internal_reference?: NullableString;
objects: ArtaObject[];
origin: ArtaLocation;
preferred_quote_types?: Nullable<QuoteType[]>;
public_reference?: NullableString;
shipping_notes?: NullableString;
success_url?: NullableString;
payment_process: PaymentProcessType;
private_token: string;
shortcode: string;
status: QuoteRequestStatus;
url?: NullableString;
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { AdditionalService, ArtaLocation, ArtaObject, HostedSession, Insurance, QuoteType } from '../MetadataTypes';
import { type Nullable, type NullableString } from '../utils';
import type { HostedSessionsSearch } from '../search';
export type EnrichedHostedSession = HostedSession & {
cancel: (auth?: string) => Promise<HostedSession>;
}
};
export interface HostedSessionCreateBody {

@@ -49,6 +32,6 @@ additional_services?: Nullable<AdditionalService[]>;

private withFunctionCalls;
getById(id: ArtaID, auth?: string): Promise<HostedSession>;
list(search?: HostedSessionsSearch, page?: number, pageSize?: number, auth?: string): Promise<Page<HostedSession>>;
create(payload: HostedSessionCreateBody, auth?: string): Promise<HostedSession>;
cancel(id: ArtaID, auth?: string): Promise<HostedSession>;
getById(id: ArtaID, auth?: string): Promise<EnrichedHostedSession>;
list(search?: HostedSessionsSearch, page?: number, pageSize?: number, auth?: string): Promise<Page<EnrichedHostedSession>>;
create(payload: HostedSessionCreateBody, auth?: string): Promise<EnrichedHostedSession>;
cancel(id: ArtaID, auth?: string): Promise<EnrichedHostedSession>;
}

@@ -1,16 +0,5 @@

import { ArtaID } from '../ArtaClient';
import { SupportedCurrency } from '../MetadataTypes';
import { RestClient } from '../net/RestClient';
import { Page } from '../pagination';
import { DatedInterface, NullableString } from '../utils';
export interface InvoicePayment extends DatedInterface {
id: ArtaID;
amount: number;
amount_currency: SupportedCurrency;
credit_id: NullableString;
invoice_id: NullableString;
paid_on: Date;
payment_id?: NullableString;
shipment_id?: NullableString;
}
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { InvoicePayment } from '../types';
export interface UnparsedInvoicePayment extends Omit<InvoicePayment, 'paid_on' | 'amount'> {

@@ -17,0 +6,0 @@ paid_on: string;

@@ -1,19 +0,5 @@

import { ArtaID } from '../ArtaClient';
import { SupportedCurrency } from '../MetadataTypes';
import { RestClient } from '../net/RestClient';
import { Page } from '../pagination';
import { DatedInterface, Nullable, NullableString } from '../utils';
export interface Invoice extends DatedInterface {
amount_owed: number;
amount_owed_currency: SupportedCurrency;
amount_paid: number;
amount_paid_currency: SupportedCurrency;
created_at: Date;
invoice_url?: NullableString;
id: ArtaID;
issued_on: Nullable<Date>;
shipment_id: NullableString;
status: string;
updated_at: Date;
}
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { Invoice } from '../types';
export declare class InvoicesEndpoint {

@@ -20,0 +6,0 @@ private readonly artaClient;

@@ -1,15 +0,5 @@

import { ArtaID } from '../ArtaClient';
import { RestClient } from '../net/RestClient';
import { DatedInterface, NullableString } from '../utils';
import { Page } from '../pagination';
export interface Key extends DatedInterface {
id: ArtaID;
is_testing: boolean;
name?: NullableString;
token: string;
}
export interface KeyCreateBody {
is_testing: boolean;
name?: NullableString;
}
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { Key } from '../types';
export type KeyCreateBody = Pick<Key, 'is_testing' | 'name'>;
export interface KeyCreate {

@@ -23,7 +13,7 @@ api_key: KeyCreateBody;

constructor(artaClient: RestClient);
getById(id: ArtaID, auth?: string): Promise<Key>;
getById(id: Key['id'], auth?: string): Promise<Key>;
list(page?: number, pageSize?: number, auth?: string): Promise<Page<Key>>;
listAll(auth?: string): AsyncGenerator<Key>;
create(payload: KeyCreateBody, auth?: string): Promise<Key>;
remove(id: ArtaID, auth?: string): Promise<void>;
remove(id: Key['id'], auth?: string): Promise<void>;
}

@@ -1,21 +0,5 @@

import { ArtaID } from '../ArtaClient';
import { RestClient } from '../net/RestClient';
import { Page } from '../pagination';
import { DatedInterface, NullableString } from '../utils';
export interface Log extends DatedInterface {
api_key_id: number;
arta_version: string;
end_at: Date;
id: ArtaID;
created_at: Date;
method: string;
path: string;
query_params: string;
request_body?: NullableString;
request_id: string;
response_body?: NullableString;
start_at: Date;
status: number;
updated_at: Date;
}
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { Log } from '../types';
export interface UnparsedLog extends Omit<Log, 'start_at' | 'end_at'> {

@@ -22,0 +6,0 @@ start_at: string;

@@ -1,3 +0,3 @@

import { AccessRestriction, APIStatus, ArtaTrackingServiceSubSubType, ArtaTrackingServiceSubType, ArtaTrackingServiceType, AuthTypes, EmailNotificationId, Insurance, ObjectMaterial, ObjectSubType, ObjectType, PackageStatus, PackingSubType, PackingType, ParcelTransportServices, PaymentProcessType, QuoteRequestStatus, QuoteType, Recipients, ShipmentExceptionTypeId, ShipmentStatus, SupportedCurrency } from '../MetadataTypes';
import { RestClient } from '../net/RestClient';
import type { AccessRestriction, APIStatus, ArtaTrackingServiceSubSubType, ArtaTrackingServiceSubType, ArtaTrackingServiceType, AuthTypes, EmailNotificationId, Insurance, ObjectMaterial, ObjectSubType, ObjectType, PackageStatus, PackingSubType, PackingType, ParcelTransportServices, PaymentProcessType, QuoteRequestStatus, QuoteType, Recipient, ShipmentExceptionTypeId, ShipmentStatus, SupportedCurrency } from '../MetadataTypes';
import type { RestClient } from '../net/RestClient';
export interface APIVersionMetadata {

@@ -16,3 +16,3 @@ authentication: AuthTypes[];

description: string;
optional_recipients: Recipients;
optional_recipients: Recipient[];
id: EmailNotificationId;

@@ -19,0 +19,0 @@ }

@@ -1,15 +0,3 @@

import { ArtaID } from '../ArtaClient';
import { RestClient } from '../net/RestClient';
import { DatedInterface, NullableString } from '../utils';
export interface Organization extends DatedInterface {
api_version: string;
id: ArtaID;
name: string;
billing_terms?: NullableString;
company_name?: NullableString;
display_name?: NullableString;
shortcode?: NullableString;
status?: NullableString;
stripe_customer_id?: NullableString;
}
import type { RestClient } from '../net/RestClient';
import type { Organization } from '../types';
export declare class OrganizationsEndpoint {

@@ -16,0 +4,0 @@ private readonly artaClient;

@@ -1,13 +0,5 @@

import { ArtaID } from '../ArtaClient';
import { PaymentContext, SupportedCurrency } from '../MetadataTypes';
import { RestClient } from '../net/RestClient';
import { Page } from '../pagination';
import { DatedInterface } from '../utils';
export interface Payment extends DatedInterface {
id: ArtaID;
amount: number;
amount_currency: SupportedCurrency;
context: PaymentContext;
paid_on: Date;
}
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { Payment } from '../types';
export interface UnparsedPayment extends Omit<Payment, 'paid_on' | 'amount'> {

@@ -14,0 +6,0 @@ paid_on: string;

@@ -1,36 +0,12 @@

import { ArtaID } from '../ArtaClient';
import { AdditionalService, ArtaLocation, ArtaObject, Contact, Disqualification, Insurance, PaymentProcessType, Quote, QuoteRequestStatus, QuoteType, SupportedCurrency } from '../MetadataTypes';
import { RestClient } from '../net/RestClient';
import { Page } from '../pagination';
import { RequestsSearch } from '../search';
import { DatedInterface, Nullable, NullableString } from '../utils';
export interface QuoteRequest extends DatedInterface {
id: ArtaID;
currency: SupportedCurrency;
additional_services: AdditionalService[];
bookable: {
missing: string[];
ready: boolean;
};
destination: ArtaLocation;
disqualifications: Disqualification[];
insurance: Nullable<Insurance>;
internal_reference: NullableString;
log_request_id: string;
hosted_session_id: Nullable<number>;
object_count: number;
objects: ArtaObject[];
origin: ArtaLocation;
payment_process: PaymentProcessType;
preferred_quote_types?: Nullable<QuoteType[]>;
public_reference?: NullableString;
quote_types: QuoteType[];
shipping_notes?: NullableString;
shortcode: string;
quotes: Quote[];
status: QuoteRequestStatus;
updateContacts: (contacts: UpdateRequestsContactsBody, auth?: string) => Promise<QuoteRequest>;
requireCustomQuotes: (customQuote: CustomQuotePayload, auth?: string) => Promise<QuoteRequest>;
cancel: (auth?: string) => Promise<QuoteRequest>;
}
import type { AdditionalService, ArtaLocation, ArtaObject, Contact, Insurance, QuoteType, SupportedCurrency } from '../types';
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { RequestsSearch } from '../search';
import type { QuoteRequest, QuoteRequestListItem } from '../types';
import type { Nullable, NullableString } from '../utils';
export type EnrichRequest<T> = T & {
updateContacts: (contacts: UpdateRequestsContactsBody, auth?: string) => Promise<T>;
requireCustomQuotes: (customQuote: CustomQuotePayload, auth?: string) => Promise<T>;
cancel: (auth?: string) => Promise<T>;
};
export interface QuoteRequestCreateBody {

@@ -64,8 +40,8 @@ additional_services?: Nullable<AdditionalService[]>;

private enrichFields;
getById(id: ArtaID, auth?: string): Promise<QuoteRequest>;
list(search?: RequestsSearch, page?: number, pageSize?: number, auth?: string): Promise<Page<QuoteRequest>>;
create(payload: QuoteRequestCreateBody, auth?: string): Promise<QuoteRequest>;
updateContacts(id: ArtaID, contacts: UpdateRequestsContactsBody, auth?: string): Promise<QuoteRequest>;
requireCustomQuotes(id: ArtaID, customQuote: CustomQuotePayload, auth?: string): Promise<QuoteRequest>;
cancel(id: ArtaID, auth?: string): Promise<QuoteRequest>;
getById(id: string, auth?: string): Promise<EnrichRequest<QuoteRequest>>;
list(search?: RequestsSearch, page?: number, pageSize?: number, auth?: string): Promise<Page<EnrichRequest<QuoteRequestListItem>>>;
create(payload: QuoteRequestCreateBody, auth?: string): Promise<EnrichRequest<QuoteRequest>>;
updateContacts(id: string, contacts: UpdateRequestsContactsBody, auth?: string): Promise<EnrichRequest<QuoteRequest>>;
requireCustomQuotes(id: string, customQuote: CustomQuotePayload, auth?: string): Promise<QuoteRequest>;
cancel(id: string, auth?: string): Promise<QuoteRequest>;
}
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -50,3 +61,3 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

var _this = this;
resource.quotes &&
if (Object.prototype.hasOwnProperty.call(resource, 'quotes')) {
resource.quotes.forEach(function (q) {

@@ -57,6 +68,7 @@ q.total = Number(q.total);

});
resource.updateContacts = function (contacts, auth) { return _this.updateContacts(resource.id, contacts, auth); };
resource.requireCustomQuotes = function (customQuote, auth) { return _this.requireCustomQuotes(resource.id, customQuote, auth); };
resource.cancel = function (auth) { return _this.cancel(resource.id, auth); };
return resource;
}
var updateContacts = function (contacts, auth) { return _this.updateContacts(resource.id, contacts, auth); };
var requireCustomQuotes = function (customQuote, auth) { return _this.requireCustomQuotes(resource.id, customQuote, auth); };
var cancel = function (auth) { return _this.cancel(resource.id, auth); };
return __assign(__assign({}, resource), { updateContacts: updateContacts, requireCustomQuotes: requireCustomQuotes, cancel: cancel });
};

@@ -63,0 +75,0 @@ QuoteRequestsEndpoint.prototype.getById = function (id, auth) {

@@ -1,74 +0,7 @@

import { ArtaID } from '../ArtaClient';
import { ArtaLocation, ArtaObject, ArtaService, EEIFormStatus, InsurancePolicy, PackageStatus, PackingSubType, PaymentProcessType, QuoteType, ShipmentStatus, ShipmentExceptionTypeId, SupportedCurrency } from '../MetadataTypes';
import { RestClient } from '../net/RestClient';
import { Page } from '../pagination';
import { ShipmentsSearch } from '../search';
import { DatedInterface, Nullable, NullableString } from '../utils';
export interface Package {
depth: number;
eta: string;
handle_with_care: boolean;
height: number;
id: number;
is_sufficiently_packed: boolean;
objects: ArtaObject[];
packing_materials: PackingSubType[];
status: Nullable<PackageStatus>;
unit_of_measurement?: NullableString;
weight: number;
weight_unit: string;
width: number;
}
export type ShipmentExceptionStatus = 'in_progress' | 'new' | 'resolved';
export interface ShipmentException extends DatedInterface {
exception_type_label: NullableString;
id: ArtaID;
package_id: Nullable<number>;
resolution: NullableString;
status: ShipmentExceptionStatus;
type: ShipmentExceptionTypeId;
}
export interface ShipmentSchedule {
delivery_end: Nullable<Date>;
delivery_start: Nullable<Date>;
delivery_window_modifier: string;
pickup_end: Nullable<Date>;
pickup_start: Nullable<Date>;
pickup_window_modifier: string;
}
export interface ShipmentTracking {
carrier_name: string;
label_url?: NullableString;
package_id: number;
tracking_number: string;
url: string;
}
export interface Shipment extends DatedInterface {
id: ArtaID;
destination: ArtaLocation;
eei_form_status?: Nullable<EEIFormStatus>;
emissions?: Nullable<number>;
emissions_unit?: NullableString;
exceptions?: Nullable<ShipmentException[]>;
hosted_session_id?: Nullable<number>;
insurance_policy?: Nullable<InsurancePolicy>;
internal_reference?: NullableString;
log_request_id?: NullableString;
object_count: number;
origin: ArtaLocation;
package_count: number;
packages?: Nullable<Package[]>;
payment_process?: Nullable<PaymentProcessType>;
public_reference?: NullableString;
quote_type: QuoteType;
schedule?: Nullable<ShipmentSchedule>;
services?: Nullable<ArtaService[]>;
shipping_notes?: NullableString;
shortcode: string;
status: ShipmentStatus;
total: number;
total_currency: SupportedCurrency;
url?: NullableString;
tracking?: Nullable<ShipmentTracking[]>;
}
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { ShipmentsSearch } from '../search';
import type { NullableString } from '../utils';
import type { Shipment } from '../types';
export interface ShipmentCreateBody {

@@ -75,0 +8,0 @@ internal_reference?: NullableString;

@@ -12,15 +12,15 @@ "use strict";

}
ShipmentsEndpoint.prototype.enrichFields = function (r) {
r.total = Number(r.total);
if (r.emissions) {
r.emissions = Number(r.emissions);
ShipmentsEndpoint.prototype.enrichFields = function (s) {
s.total = Number(s.total);
if (s.emissions) {
s.emissions = Number(s.emissions);
}
if (r.schedule) {
r.schedule.delivery_end = (0, utils_1.createDateAsUTC)(r.schedule.delivery_end);
r.schedule.delivery_start = (0, utils_1.createDateAsUTC)(r.schedule.delivery_start);
r.schedule.pickup_end = (0, utils_1.createDateAsUTC)(r.schedule.pickup_end);
r.schedule.pickup_start = (0, utils_1.createDateAsUTC)(r.schedule.pickup_start);
if (s.schedule) {
s.schedule.delivery_end = (0, utils_1.createDateAsUTC)(s.schedule.delivery_end);
s.schedule.delivery_start = (0, utils_1.createDateAsUTC)(s.schedule.delivery_start);
s.schedule.pickup_end = (0, utils_1.createDateAsUTC)(s.schedule.pickup_end);
s.schedule.pickup_start = (0, utils_1.createDateAsUTC)(s.schedule.pickup_start);
}
if (r.packages) {
r.packages.forEach(function (p) {
if (s.packages) {
s.packages.forEach(function (p) {
p.depth = Number(p.depth);

@@ -32,4 +32,10 @@ p.height = Number(p.height);

}
r.services && r.services.forEach(utils_1.parseService);
return r;
if (s.exceptions) {
s.exceptions.forEach(function (e) {
e.created_at = (0, utils_1.createDateAsUTC)(e.created_at);
e.updated_at = (0, utils_1.createDateAsUTC)(e.updated_at);
});
}
s.services && s.services.forEach(utils_1.parseService);
return s;
};

@@ -36,0 +42,0 @@ ShipmentsEndpoint.prototype.getById = function (id, auth) {

@@ -1,20 +0,4 @@

import { ArtaID } from '../ArtaClient';
import { RestClient } from '../net/RestClient';
export interface Carrier {
code: string;
name: string;
phone_number: string;
url: string;
}
export interface TrackingEvent {
date: Date;
location: string;
summary: string;
}
export interface Tracking {
carrier: Carrier;
events: TrackingEvent[];
status: string;
tracking_number: string;
}
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { Tracking } from '../types';
export declare class TrackingsEndpoint {

@@ -21,0 +5,0 @@ private readonly artaClient;

@@ -1,23 +0,12 @@

import { ArtaID } from '../ArtaClient';
import { RestClient } from '../net/RestClient';
import { Page } from '../pagination';
import { DocumentType, MimeType } from '../MetadataTypes';
import { DatedInterface, NullableString } from '../utils';
export interface Upload extends DatedInterface {
id: ArtaID;
document_type: DocumentType;
document_type_label?: NullableString;
download_url: NullableString;
file_name: string;
mime_type: MimeType;
size: number;
status: string;
presigned_url: string;
}
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { ArtaDocumentType, ArtaMimeType, Upload } from '../MetadataTypes';
import type { NullableString } from '../utils';
export interface UploadCreateBody {
document_type: DocumentType;
document_type: ArtaDocumentType;
document_type_label?: NullableString;
file_name: boolean;
size: string;
mime_type: MimeType;
mime_type: ArtaMimeType;
}

@@ -24,0 +13,0 @@ export interface UploadCreate {

@@ -1,19 +0,5 @@

import { ArtaID } from '../ArtaClient';
import { WebhookDeliveryStatus, WebhookDeliveryType, WebhookResourceType } from '../MetadataTypes';
import { RestClient } from '../net/RestClient';
import { Page } from '../pagination';
import { DatedInterface, NullableString } from '../utils';
export interface WebhookDelivery extends DatedInterface {
id: ArtaID;
resource_id: number;
resource_type: WebhookResourceType;
response_status_code: number;
status: WebhookDeliveryStatus;
type: WebhookDeliveryType;
webhook_id: number;
webhook_url: string;
next_retry?: NullableString;
request_body?: NullableString;
response_body?: NullableString;
}
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { WebhookDelivery } from '../types';
export declare class WebhookDeliveriesEndpoint {

@@ -20,0 +6,0 @@ private readonly artaClient;

@@ -1,9 +0,6 @@

import { ArtaID } from '../ArtaClient';
import { RestClient } from '../net/RestClient';
import { DatedInterface } from '../utils';
import { Page } from '../pagination';
export interface Webhook extends DatedInterface {
id: ArtaID;
name: string;
url: string;
import type { ArtaID } from '../ArtaClient';
import type { RestClient } from '../net/RestClient';
import type { Page } from '../pagination';
import type { Webhook } from '../types';
export interface ExtendedWebhook extends Webhook {
ping: (auth?: string) => Promise<void>;

@@ -26,7 +23,7 @@ getSecret: (auth?: string) => Promise<string>;

private withFunctionCalls;
getById(id: ArtaID, auth?: string): Promise<Webhook>;
list(page?: number, pageSize?: number, auth?: string): Promise<Page<Webhook>>;
listAll(auth?: string): AsyncGenerator<Webhook>;
create(payload: WebhookCreateBody, auth?: string): Promise<Webhook>;
update(id: ArtaID, payload: Partial<WebhookCreateBody> | Partial<Webhook>, auth?: string): Promise<Webhook>;
getById(id: ArtaID, auth?: string): Promise<ExtendedWebhook>;
list(page?: number, pageSize?: number, auth?: string): Promise<Page<ExtendedWebhook>>;
listAll(auth?: string): AsyncGenerator<ExtendedWebhook>;
create(payload: WebhookCreateBody, auth?: string): Promise<ExtendedWebhook>;
update(id: ArtaID, payload: Partial<WebhookCreateBody> | Partial<ExtendedWebhook>, auth?: string): Promise<ExtendedWebhook>;
remove(id: ArtaID, auth?: string): Promise<void>;

@@ -33,0 +30,0 @@ ping(id: ArtaID, auth?: string): Promise<void>;

export { Arta } from './arta';
export { Logger, LoggerVerbosity } from './logging';
export { Attachment, AttachmentCreateBodyRequest, AttachmentCreateBodyShipment, AttachmentCreateBody, } from './endpoint/attachment';
export { EmailRule, EmailRuleCreateBody } from './endpoint/emailRules';
export { EmailSubscription, EmailSubscriptionCreateBody, } from './endpoint/emailSubscriptions';
export { HostedSession, HostedSessionCreateBody, } from './endpoint/hostedSessions';
export { InvoicePayment } from './endpoint/invoicePayments';
export { Invoice } from './endpoint/invoices';
export { Key, KeyCreateBody } from './endpoint/keys';
export { Log } from './endpoint/logs';
export { AttachmentCreateBodyRequest, AttachmentCreateBodyShipment, AttachmentCreateBody, } from './endpoint/attachment';
export { EmailRuleCreateBody } from './endpoint/emailRules';
export { EmailSubscriptionCreateBody, } from './endpoint/emailSubscriptions';
export { HostedSessionCreateBody, } from './endpoint/hostedSessions';
export { KeyCreateBody } from './endpoint/keys';
export * from './MetadataTypes';
export { Organization } from './endpoint/organization';
export { Payment } from './endpoint/payments';
export { Upload, UploadCreateBody } from './endpoint/uploads';
export { WebhookDelivery } from './endpoint/webhookDeliveries';
export { Webhook, WebhookCreate } from './endpoint/webhooks';
export { Tracking, TrackingEvent, Carrier } from './endpoint/trackings';
export { QuoteRequest, QuoteRequestCreateBody, UpdateRequestsContactsBody, CustomQuotePayload, } from './endpoint/requests';
export { Package, ShipmentSchedule, ShipmentTracking, Shipment, ShipmentCreateBody, } from './endpoint/shipments';
export { UploadCreateBody } from './endpoint/uploads';
export { ExtendedWebhook as Webhook, WebhookCreate } from './endpoint/webhooks';
export { QuoteRequestCreateBody, UpdateRequestsContactsBody, CustomQuotePayload, } from './endpoint/requests';
export { ShipmentCreateBody, } from './endpoint/shipments';

@@ -1,12 +0,5 @@

import { Nullable, NullableString } from './utils';
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';
export * from './types';
export type AccessRestriction = 'elevator_only' | 'freight_elevator' | 'loading_dock' | 'loading_dock_low' | 'low_clearance' | 'non_paved' | 'stairs_only' | 'steep_gradient';
export type Insurance = 'arta_transit_insurance' | 'no_arta_insurance';
export type PaymentProcessType = 'checkout' | 'checkout_direct' | 'invoicing';
export type QuoteType = 'parcel' | 'premium' | 'select' | 'self_ship';
export type QuoteRequestStatus = 'cancelled' | 'closed' | 'disqualified' | 'expired' | 'in_progress' | 'pending' | 'quoted';
export type EmailNotificationId = 'booking' | 'cancelled' | 'collected' | 'collection' | 'complete' | 'custom_quoted_dashboard' | 'in_transit' | 'invoice' | 'self_ship_label' | 'payment' | 'scheduling' | 'eei';
export type Recipients = 'payer' | 'origin' | 'destination';
export type MimeType = 'application/pdf' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'image/jpeg' | 'image/png' | 'text/csv' | 'video/mp4' | 'video/quicktime' | 'application/msword';
export type DocumentType = 'bill_of_lading' | 'certificate_of_insurance' | 'certificate_of_insurance_template' | 'condition_report' | 'condition_check' | 'image' | 'instructions' | 'airway_bill' | 'commercial_invoice' | 'power_of_attorney' | 'proof_of_export' | 'proof_of_delivery' | 'quote' | 'shipping_label' | 'other';
export type PackingType = 'alcohol_case' | 'blanket' | 'box' | 'cbin_closed' | 'cbin_open' | 'crate' | 'foam_lined_box' | 'frame' | 'lockbox' | 'no_packing' | 'pallet' | 'portfolio' | 'rug_roll' | 'shadow_box' | 'slipcase' | 'soft_packing' | 'soft_wrap' | 'sonotube' | 'stabilizing_box' | 'tube';

@@ -17,95 +10,10 @@ export type PackingSubType = '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';

export type ParcelTransportServices = 'economy' | 'economy_freight' | 'ground' | 'next_day_air' | 'priority' | 'priority_freight' | 'second_day_air' | 'standard';
export type WebhookDeliveryType = 'request.created' | 'request.status.updated' | 'shipment.created' | 'shipment.eei_form_status.updated' | 'shipment.schedule.updated' | 'shipment.status.updated' | 'shipment.tracking.updated' | 'ping';
export type ObjectMaterial = 'stone_marble' | 'precious_stones' | 'fiber_synthetic' | 'fabric_natural' | 'taxidermy' | 'carbon_fiber' | 'live_animal' | 'paper' | 'glass' | 'presious_metals' | 'particleboard' | 'styrofoam' | 'wood' | 'photo_film' | 'sand' | 'metal' | 'plexiglass' | 'aquatic_life' | 'canvas' | 'drywall' | 'hard_plastic' | 'vinyl' | 'soft_plastic' | 'leather' | 'rubber' | 'concreate' | 'paint' | 'electronics' | 'fiber_natural' | 'gas' | 'fabric_synthetic' | 'CITES' | 'liquids' | 'salts';
export type ShipmentExceptionTypeId = 'change_of_address_request' | 'customs_information_required' | 'damaged_items' | 'direct_payment_required' | 'held_at_customs' | 'inaccurate_object_details' | 'incorrect_address' | 'lost_in_transit' | 'not_ready_for_delivery' | 'not_ready_for_release' | 'other' | 'prepayment_required' | 'requested_hold_to_collect' | 'requested_hold_to_deliver' | 'wrong_item';
export type ArtaTrackingServiceType = 'transport' | 'location' | 'handling' | 'packing' | 'storage' | 'administration' | 'taxes_duties_fees' | 'security' | 'equipment';
export type ArtaTrackingServiceSubType = 'specialized' | 'consolidated' | 'freight' | 'parcel' | 'collection' | 'delivery' | 'location' | 'unpacking' | 'condition' | 'installation' | 'deinstallation' | 'debris_disposal' | 'site_visit' | 'handling' | 'packing' | 'packing_materials' | 'receive_release' | 'warehouse' | 'customs' | 'coi' | 'administration' | 'taxes_duties' | 'fees' | 'security' | 'equipment';
export type ArtaTrackingServiceSubSubType = 'armored_transport' | 'dedicated_transport' | 'specialized_shuttle' | 'road_groupage' | 'sea_groupage' | 'sea_freight' | 'ltl_freight' | 'ftl_freight' | 'air_freight' | 'cargo_air_freight' | 'parcel' | 'priority_freight' | 'economy_freight' | 'collection' | 'art_fair_collection' | 'residential_collection' | 'airport_collection' | 'port_collection' | 'dock_collection' | 'consolidated_collection' | 'failed_collection' | 'recollection' | 'delivery' | 'inside_delivery' | 'art_fair_delivery' | 'room_of_choice_delivery' | 'curbside_delivery' | 'residential_delivery' | 'signature_delivery' | 'saturday_delivery' | 'sunday_delivery' | 'scheduled_delivery' | 'after_hours_delivery' | 'airport_delivery' | 'port_delivery' | 'dock_delivery' | 'failed_delivery' | 'redelivery' | 'origin_additional_stops' | 'destination_additional_stops' | 'origin_off_route' | 'destination_off_route' | 'must_fly' | 'origin_unpacking_soft' | 'destination_unpacking_soft' | 'origin_unpacking_wood' | 'destination_unpacking_wood' | 'origin_unpacking' | 'destination_unpacking' | 'origin_full_condition_report' | 'destination_full_condition_report' | 'origin_condition_check' | 'destination_condition_check' | 'installation' | 'placement' | 'assembly' | 'deinstallation' | 'disassembly' | 'debris_disposal' | 'crate_disposal' | 'soft_packed_disposal' | 'origin_site_visit' | 'destination_site_visit' | 'origin_additional_labor' | 'destination_additional_labor' | 'airport_handling' | 'origin_oversized_handling' | 'destination_oversized_handling' | 'origin_additional_stairs' | 'destination_additional_stairs' | 'packing_labor' | 'crate_fabrication' | 't_frame_fabrication' | 'fabrication' | 'retrofitting' | 'additional_packing' | 'pack_into' | 'poly' | 'dartek' | 'bubble' | 'cling_wrap' | 'cbin_communal' | 'blanket' | 'portfolio' | 'poly_cardboard' | 'bubble_cardboard' | 'rug_rolled' | 'cbin_closed' | 'cbin_open' | 'garment_bag' | 'wardrobe_box' | 'cardboard_box' | 'chandelier_box' | 'chair_box' | 'slipcase' | 'glass_tape' | 'stabilizing_box' | 'shadow_box' | 'foam_lined_box' | 'cavity_box' | 'strongbox' | 'double_box' | 'shipping_tube_small' | 'shipping_tube_large' | 'sonotube' | 'alcohol_case' | 'lay_flat_wine_box' | 'lockbox' | 'travel_frame' | 'travel_frame_art' | 'travel_frame_other' | 'a_frame' | 'slat_crate' | 'tri_wall_crate' | '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' | 'pallet' | 'international_pallet' | 'warehouse_handling' | 'receive_in_fee' | 'release_fee' | 'storage' | 'temp_storage' | 'viewing_room' | 'staging' | 'import_customs_formalities' | 'export_customs_formalities' | 'origin_building_coi' | 'destination_building_coi' | 'double_blind_bols' | 'power_of_attorney' | 'administrative' | 'mpf' | 'bond' | 'duties' | 'taxes' | 'disbursement' | 'temporary_customs_entry' | 'fuel_surcharge' | 'tarmac_supervision' | 'courier_onboard' | 'fork_lift' | 'gantry' | 'pallet_jack' | 'scaffolding' | 'rigging' | 'lift_gate' | 'ramp' | 'floor_protection';
export type DisqualificationReasonCode = 'external_service_unavailable' | 'client_timeout_reached';
export type PackageStatus = 'pending' | 'transit' | 'out_for_delivery' | 'delivered' | 'unknown' | 'notfound' | 'undelivered' | 'exception' | 'expired';
export type EEIFormStatus = 'pending' | 'cleared' | 'approved' | 'rejected' | 'submitted';
export type ShipmentStatus = 'pending' | 'confirmed' | 'collected' | 'in_transit' | 'completed';
export type WebhookResourceType = 'ping' | 'request' | 'shipment';
export type WebhookDeliveryStatus = 'delivered' | 'failed';
export type PaymentContext = 'hosted_checkout' | 'invoiced';
export type SupportedCurrency = 'CAD' | 'EUR' | 'GBP' | 'HKD' | 'USD';
export type AuthTypes = 'api_key';
export type APIStatus = 'active' | 'beta' | 'deprecated';
export interface Contact {
name: string;
email_address?: NullableString;
phone_number?: NullableString;
}
export interface ArtaLocation {
access_restrictions?: Nullable<AccessRestriction[]>;
address_line_1?: NullableString;
address_line_2?: NullableString;
address_line_3?: NullableString;
city?: NullableString;
region?: NullableString;
postal_code?: NullableString;
country: string;
title?: NullableString;
contacts?: Nullable<Contact[]>;
estimated_country?: string;
estimated_region?: string;
estimated_city?: string;
}
export type Details = {
materials?: Nullable<ObjectMaterial[]>;
creation_date?: NullableString;
creator?: NullableString;
notes?: NullableString;
title?: NullableString;
is_fragile?: Nullable<boolean>;
is_cites?: Nullable<boolean>;
};
export interface ArtaObject {
internal_reference?: NullableString;
current_packing?: Nullable<PackingSubType[]>;
details?: Nullable<Details>;
height: number | string;
width: number | string;
weight?: Nullable<number | string>;
value: number | string;
depth?: Nullable<number | string>;
images?: Nullable<string[]>;
public_reference?: string;
subtype: ObjectSubType;
unit_of_measurement?: NullableString;
weight_unit?: NullableString;
value_currency: SupportedCurrency;
}
export interface Disqualification {
quote_types: QuoteType[];
reason?: NullableString;
reason_code: DisqualificationReasonCode;
}
export interface InsurancePolicy {
amount: number;
amount_currency: SupportedCurrency;
id: string;
insured_value: number;
insured_value_currency: SupportedCurrency;
}
export interface ArtaService {
amount: number;
amount_currency: SupportedCurrency;
included_services: ArtaService[];
is_requested: boolean;
is_required: boolean;
name: string;
sub_subtype: ArtaTrackingServiceSubSubType;
subtype: ArtaTrackingServiceSubType;
type: ArtaTrackingServiceType;
}
export interface Quote {
id: number;
included_services: ArtaService[];
included_insurance_policy?: Nullable<InsurancePolicy>;
optional_services: ArtaService[];
quote_type: QuoteType;
status: string;
total: number;
total_currency: SupportedCurrency;
}
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./types"), exports);

@@ -1,9 +0,6 @@

export type HttpMethod = 'get' | 'post' | 'patch' | 'put' | 'delete';
export interface HttpClientHeaders {
[key: string]: string | string[] | undefined;
}
export type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
export type HttpClientHeaders = Record<string, string>;
export interface HttpClientResponse {
statusCode?: number;
headers?: HttpClientHeaders;
body: () => Promise<string>;
json: <T>() => Promise<T>;

@@ -17,3 +14,3 @@ }

headers: HttpClientHeaders;
requestData: string;
requestData: string | null;
timeout: number;

@@ -20,0 +17,0 @@ }

{
"name": "@artaio/node-api",
"version": "0.31.0",
"version": "0.32.0",
"description": "The Arta Node library provides a seamless integration to Arta API for applications running on Node.js using both Typescript or Javascript.",
"scripts": {
"build": "tsc -p tsconfig-build.json",
"test": "npm run lint && jest --coverage --detectOpenHandles --verbose",
"build": "npm run build:types && tsc -p tsconfig-build.json",
"build:types": "npx ts-node ./schemas/generate.ts > lib/types.ts",
"test": "npm run lint && npm run test:unit",
"test:unit": "jest --coverage --detectOpenHandles --verbose ./test/",
"test:integration": "jest --coverage --verbose --testTimeout 30000 ./test-integration/",
"lint": "eslint .",

@@ -12,3 +15,4 @@ "lint:fix": "prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\"",

"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
"postpublish": "pinst --enable",
"prepare": "node -e \"try { (await import('husky')).default() } catch (e) { if (e.code !== 'ERR_MODULE_NOT_FOUND') throw e }\" --input-type module"
},

@@ -38,4 +42,2 @@ "types": "dist/lib/index.d.ts",

"@types/jest": "^29.5.7",
"@types/nock": "^11.1.0",
"@types/node": "^20.8.10",
"@typescript-eslint/eslint-plugin": "^6.9.1",

@@ -48,9 +50,12 @@ "@typescript-eslint/parser": "^6.9.1",

"eslint-plugin-promise": "^6.1.1",
"husky": "^8.0.3",
"husky": "^9.0.11",
"jest": "^29.7.0",
"nock": "^13.3.8",
"nock": "^14.0.0-beta.5",
"pinst": "^3.0.0",
"prettier": "3.0.3",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
"ts-node": "^10.9.2",
"typescript": "^5.2.2",
"zod": "^3.22.4",
"zod-to-ts": "^1.2.0"
},

@@ -61,5 +66,5 @@ "bugs": {

"engines": {
"node": ">=14.x"
"node": ">=18.x"
},
"license": "MIT"
}
{
"name": "@artaio/node-api",
"version": "0.31.0",
"version": "0.32.0",
"description": "The Arta Node library provides a seamless integration to Arta API for applications running on Node.js using both Typescript or Javascript.",
"scripts": {
"build": "tsc -p tsconfig-build.json",
"test": "npm run lint && jest --coverage --detectOpenHandles --verbose",
"build": "npm run build:types && tsc -p tsconfig-build.json",
"build:types": "npx ts-node ./schemas/generate.ts > lib/types.ts",
"test": "npm run lint && npm run test:unit",
"test:unit": "jest --coverage --detectOpenHandles --verbose ./test/",
"test:integration": "jest --coverage --verbose --testTimeout 30000 ./test-integration/",
"lint": "eslint .",

@@ -12,3 +15,4 @@ "lint:fix": "prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\"",

"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
"postpublish": "pinst --enable",
"prepare": "node -e \"try { (await import('husky')).default() } catch (e) { if (e.code !== 'ERR_MODULE_NOT_FOUND') throw e }\" --input-type module"
},

@@ -38,4 +42,2 @@ "types": "dist/lib/index.d.ts",

"@types/jest": "^29.5.7",
"@types/nock": "^11.1.0",
"@types/node": "^20.8.10",
"@typescript-eslint/eslint-plugin": "^6.9.1",

@@ -48,9 +50,12 @@ "@typescript-eslint/parser": "^6.9.1",

"eslint-plugin-promise": "^6.1.1",
"husky": "^8.0.3",
"husky": "^9.0.11",
"jest": "^29.7.0",
"nock": "^13.3.8",
"nock": "^14.0.0-beta.5",
"pinst": "^3.0.0",
"prettier": "3.0.3",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
"ts-node": "^10.9.2",
"typescript": "^5.2.2",
"zod": "^3.22.4",
"zod-to-ts": "^1.2.0"
},

@@ -61,5 +66,5 @@ "bugs": {

"engines": {
"node": ">=14.x"
"node": ">=18.x"
},
"license": "MIT"
}

@@ -8,4 +8,6 @@ ### Pre-release notice

The Arta Node library provides a seamless integration to Arta API for applications running on Node.js using both Typescript or Javascript.
The Arta Node library provides a seamless integration to Arta API for applications running on Node.js 18+ or any platform using [Serverless JS](https://www.cloudflare.com/learning/serverless/serverless-javascript/) using both Typescript or Javascript.
It is a very light package with zero runtime dependencies using only the [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) Web API.
## Documentation

@@ -12,0 +14,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc