@artaio/node-api 1.2.3 → 1.3.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.
|
@@ -26,6 +26,7 @@ export interface BaseMetadata<T> {
|
|
|
26
26
|
id: T;
|
|
27
27
|
name: string;
|
|
28
28
|
}
|
|
29
|
+
type GenericMetadata = Pick<BaseMetadata<string>, 'id' | 'name'>;
|
|
29
30
|
export type InsurancesMetadata = BaseMetadata<Insurance>;
|
|
30
31
|
export type LocationAccessRestrictionMetadata = BaseMetadata<AccessRestriction>;
|
|
31
32
|
export type ObjectMaterialsMetadata = BaseMetadata<ObjectMaterial>;
|
|
@@ -66,8 +67,11 @@ export declare class MetadataEndpoint {
|
|
|
66
67
|
parcelTransportServices(auth?: string): Promise<ParcelTransportServicesMetadata[]>;
|
|
67
68
|
paymentProcessTypes(auth?: string): Promise<PaymentProcessTypeMetadata[]>;
|
|
68
69
|
quotes(auth?: string): Promise<QuotesMetadata[]>;
|
|
70
|
+
referenceRateProviders(auth?: string): Promise<GenericMetadata[]>;
|
|
71
|
+
referenceRateServiceLevels(auth?: string): Promise<GenericMetadata[]>;
|
|
69
72
|
requestStatuses(auth?: string): Promise<RequestStatusesMetadata[]>;
|
|
70
73
|
services(auth?: string): Promise<ServicesMetadata[]>;
|
|
71
74
|
shipmentExceptionTypes(auth?: string): Promise<ShipmentExceptionTypeMetadata[]>;
|
|
72
75
|
shipmentStatuses(auth?: string): Promise<ShipmentStatusesMetadata[]>;
|
|
73
76
|
}
|
|
77
|
+
export {};
|
|
@@ -42,6 +42,12 @@ var MetadataEndpoint = /** @class */ (function () {
|
|
|
42
42
|
MetadataEndpoint.prototype.quotes = function (auth) {
|
|
43
43
|
return this.artaClient.get("".concat(this.path, "/quotes"), auth);
|
|
44
44
|
};
|
|
45
|
+
MetadataEndpoint.prototype.referenceRateProviders = function (auth) {
|
|
46
|
+
return this.artaClient.get("".concat(this.path, "/reference_rate_providers"), auth);
|
|
47
|
+
};
|
|
48
|
+
MetadataEndpoint.prototype.referenceRateServiceLevels = function (auth) {
|
|
49
|
+
return this.artaClient.get("".concat(this.path, "/reference_rate_service_levels"), auth);
|
|
50
|
+
};
|
|
45
51
|
MetadataEndpoint.prototype.requestStatuses = function (auth) {
|
|
46
52
|
return this.artaClient.get("".concat(this.path, "/request_statuses"), auth);
|
|
47
53
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { RestClient } from '../net/RestClient';
|
|
2
2
|
import type { Page } from '../pagination';
|
|
3
|
+
import type { TagsSearch } from '../search';
|
|
3
4
|
import type { Tag } from '../types';
|
|
4
5
|
export type TagCreateBody = Omit<Tag, 'id' | 'created_at' | 'updated_at'>;
|
|
5
6
|
export interface TagCreate {
|
|
@@ -11,7 +12,7 @@ export declare class TagsEndpoint {
|
|
|
11
12
|
private readonly path;
|
|
12
13
|
constructor(artaClient: RestClient);
|
|
13
14
|
getByName(name: Tag['name'], auth?: string): Promise<Tag>;
|
|
14
|
-
list(page?: number, pageSize?: number, auth?: string): Promise<Page<Tag>>;
|
|
15
|
+
list(search?: TagsSearch, page?: number, pageSize?: number, auth?: string): Promise<Page<Tag>>;
|
|
15
16
|
create(payload: TagCreateBody, auth?: string): Promise<Tag>;
|
|
16
17
|
update(name: Tag['name'], payload: Partial<TagCreateBody>, auth?: string): Promise<Tag>;
|
|
17
18
|
}
|
|
@@ -11,10 +11,10 @@ var TagsEndpoint = /** @class */ (function () {
|
|
|
11
11
|
TagsEndpoint.prototype.getByName = function (name, auth) {
|
|
12
12
|
return this.defaultEndpoint.getById(name, auth);
|
|
13
13
|
};
|
|
14
|
-
TagsEndpoint.prototype.list = function (page, pageSize, auth) {
|
|
14
|
+
TagsEndpoint.prototype.list = function (search, page, pageSize, auth) {
|
|
15
15
|
if (page === void 0) { page = 1; }
|
|
16
16
|
if (pageSize === void 0) { pageSize = 20; }
|
|
17
|
-
return this.defaultEndpoint.list({ page: page, page_size: pageSize }, auth);
|
|
17
|
+
return this.defaultEndpoint.list({ page: page, page_size: pageSize, search: search }, auth);
|
|
18
18
|
};
|
|
19
19
|
TagsEndpoint.prototype.create = function (payload, auth) {
|
|
20
20
|
return this.defaultEndpoint.create({ tag: payload }, auth);
|
package/dist/lib/search.d.ts
CHANGED
package/dist/lib/types.d.ts
CHANGED
|
@@ -129,6 +129,9 @@ export type QuoteRequest = {
|
|
|
129
129
|
subtype: "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";
|
|
130
130
|
type: "transport" | "location" | "handling" | "packing" | "storage" | "administration" | "taxes_duties_fees" | "security" | "equipment";
|
|
131
131
|
included_services: any[];
|
|
132
|
+
metadata: {
|
|
133
|
+
[x: string]: unknown;
|
|
134
|
+
};
|
|
132
135
|
}[];
|
|
133
136
|
included_insurance_policy?: ({
|
|
134
137
|
amount: number;
|
|
@@ -289,6 +292,9 @@ export type Shipment = {
|
|
|
289
292
|
subtype: "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";
|
|
290
293
|
type: "transport" | "location" | "handling" | "packing" | "storage" | "administration" | "taxes_duties_fees" | "security" | "equipment";
|
|
291
294
|
included_services: any[];
|
|
295
|
+
metadata: {
|
|
296
|
+
[x: string]: unknown;
|
|
297
|
+
};
|
|
292
298
|
}[] | null) | undefined;
|
|
293
299
|
shipping_notes?: (string | null) | undefined;
|
|
294
300
|
shortcode: string;
|
|
@@ -696,6 +702,9 @@ export type Quote = {
|
|
|
696
702
|
subtype: "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";
|
|
697
703
|
type: "transport" | "location" | "handling" | "packing" | "storage" | "administration" | "taxes_duties_fees" | "security" | "equipment";
|
|
698
704
|
included_services: any[];
|
|
705
|
+
metadata: {
|
|
706
|
+
[x: string]: unknown;
|
|
707
|
+
};
|
|
699
708
|
}[];
|
|
700
709
|
included_insurance_policy?: ({
|
|
701
710
|
amount: number;
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artaio/node-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
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",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"eslint-plugin-promise": "^6.1.1",
|
|
48
48
|
"husky": "^9.0.11",
|
|
49
49
|
"jest": "^29.7.0",
|
|
50
|
-
"nock": "^14.0.
|
|
50
|
+
"nock": "^14.0.1",
|
|
51
51
|
"pinst": "^3.0.0",
|
|
52
52
|
"prettier": "3.0.3",
|
|
53
53
|
"ts-jest": "^29.1.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artaio/node-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
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",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"eslint-plugin-promise": "^6.1.1",
|
|
48
48
|
"husky": "^9.0.11",
|
|
49
49
|
"jest": "^29.7.0",
|
|
50
|
-
"nock": "^14.0.
|
|
50
|
+
"nock": "^14.0.1",
|
|
51
51
|
"pinst": "^3.0.0",
|
|
52
52
|
"prettier": "3.0.3",
|
|
53
53
|
"ts-jest": "^29.1.1",
|