@arrowsphere/api-client 3.185.0-rc-bdj-3 → 3.186.0-rc-bdj-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/orders/entities/orders/attachment.d.ts +34 -0
- package/build/orders/entities/orders/attachment.js +80 -0
- package/build/orders/ordersClient.d.ts +2 -0
- package/build/orders/ordersClient.js +11 -0
- package/build/partner/partnerClient.d.ts +0 -7
- package/build/partner/partnerClient.js +1 -9
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
export declare enum AttachmentOrderFields {
|
|
3
|
+
COLUMN_LAST_MODIFIED = "lastModified",
|
|
4
|
+
COLUMN_METADATA = "metadata",
|
|
5
|
+
COLUMN_NAME = "name",
|
|
6
|
+
COLUMN_URL = "url"
|
|
7
|
+
}
|
|
8
|
+
export declare type AttachmentOrderType = {
|
|
9
|
+
[AttachmentOrderFields.COLUMN_LAST_MODIFIED]: string;
|
|
10
|
+
[AttachmentOrderFields.COLUMN_METADATA]?: Record<string, string>;
|
|
11
|
+
[AttachmentOrderFields.COLUMN_NAME]: string;
|
|
12
|
+
[AttachmentOrderFields.COLUMN_URL]: string;
|
|
13
|
+
};
|
|
14
|
+
export declare enum AttachmentsOrderListFields {
|
|
15
|
+
COLUMN_ATTACHMENTS = "attachments"
|
|
16
|
+
}
|
|
17
|
+
export declare type AttachmentsOrderListType = {
|
|
18
|
+
[AttachmentsOrderListFields.COLUMN_ATTACHMENTS]: AttachmentOrderType[];
|
|
19
|
+
};
|
|
20
|
+
export declare class AttachmentOrder extends AbstractEntity<AttachmentOrderType> {
|
|
21
|
+
#private;
|
|
22
|
+
constructor(attachmentOrderTypeInput: AttachmentOrderType);
|
|
23
|
+
get lastModified(): string;
|
|
24
|
+
get metadata(): Record<string, string> | undefined;
|
|
25
|
+
get name(): string;
|
|
26
|
+
get url(): string;
|
|
27
|
+
toJSON(): AttachmentOrderType;
|
|
28
|
+
}
|
|
29
|
+
export declare class AttachmentsListOrder extends AbstractEntity<AttachmentsOrderListType> {
|
|
30
|
+
#private;
|
|
31
|
+
constructor(attachmentsListOrderTypeInput: AttachmentsOrderListType);
|
|
32
|
+
get attachments(): AttachmentOrder[];
|
|
33
|
+
toJSON(): AttachmentsOrderListType;
|
|
34
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var _AttachmentOrder_lastModified, _AttachmentOrder_metadata, _AttachmentOrder_name, _AttachmentOrder_url, _AttachmentsListOrder_attachments;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AttachmentsListOrder = exports.AttachmentOrder = exports.AttachmentsOrderListFields = exports.AttachmentOrderFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
17
|
+
var AttachmentOrderFields;
|
|
18
|
+
(function (AttachmentOrderFields) {
|
|
19
|
+
AttachmentOrderFields["COLUMN_LAST_MODIFIED"] = "lastModified";
|
|
20
|
+
AttachmentOrderFields["COLUMN_METADATA"] = "metadata";
|
|
21
|
+
AttachmentOrderFields["COLUMN_NAME"] = "name";
|
|
22
|
+
AttachmentOrderFields["COLUMN_URL"] = "url";
|
|
23
|
+
})(AttachmentOrderFields = exports.AttachmentOrderFields || (exports.AttachmentOrderFields = {}));
|
|
24
|
+
var AttachmentsOrderListFields;
|
|
25
|
+
(function (AttachmentsOrderListFields) {
|
|
26
|
+
AttachmentsOrderListFields["COLUMN_ATTACHMENTS"] = "attachments";
|
|
27
|
+
})(AttachmentsOrderListFields = exports.AttachmentsOrderListFields || (exports.AttachmentsOrderListFields = {}));
|
|
28
|
+
class AttachmentOrder extends abstractEntity_1.AbstractEntity {
|
|
29
|
+
constructor(attachmentOrderTypeInput) {
|
|
30
|
+
super(attachmentOrderTypeInput);
|
|
31
|
+
_AttachmentOrder_lastModified.set(this, void 0);
|
|
32
|
+
_AttachmentOrder_metadata.set(this, void 0);
|
|
33
|
+
_AttachmentOrder_name.set(this, void 0);
|
|
34
|
+
_AttachmentOrder_url.set(this, void 0);
|
|
35
|
+
__classPrivateFieldSet(this, _AttachmentOrder_lastModified, attachmentOrderTypeInput[AttachmentOrderFields.COLUMN_LAST_MODIFIED], "f");
|
|
36
|
+
__classPrivateFieldSet(this, _AttachmentOrder_metadata, attachmentOrderTypeInput[AttachmentOrderFields.COLUMN_METADATA], "f");
|
|
37
|
+
__classPrivateFieldSet(this, _AttachmentOrder_name, attachmentOrderTypeInput[AttachmentOrderFields.COLUMN_NAME], "f");
|
|
38
|
+
__classPrivateFieldSet(this, _AttachmentOrder_url, attachmentOrderTypeInput[AttachmentOrderFields.COLUMN_URL], "f");
|
|
39
|
+
}
|
|
40
|
+
get lastModified() {
|
|
41
|
+
return __classPrivateFieldGet(this, _AttachmentOrder_lastModified, "f");
|
|
42
|
+
}
|
|
43
|
+
get metadata() {
|
|
44
|
+
return __classPrivateFieldGet(this, _AttachmentOrder_metadata, "f");
|
|
45
|
+
}
|
|
46
|
+
get name() {
|
|
47
|
+
return __classPrivateFieldGet(this, _AttachmentOrder_name, "f");
|
|
48
|
+
}
|
|
49
|
+
get url() {
|
|
50
|
+
return __classPrivateFieldGet(this, _AttachmentOrder_url, "f");
|
|
51
|
+
}
|
|
52
|
+
toJSON() {
|
|
53
|
+
return {
|
|
54
|
+
[AttachmentOrderFields.COLUMN_LAST_MODIFIED]: this.lastModified,
|
|
55
|
+
[AttachmentOrderFields.COLUMN_METADATA]: this.metadata,
|
|
56
|
+
[AttachmentOrderFields.COLUMN_NAME]: this.name,
|
|
57
|
+
[AttachmentOrderFields.COLUMN_URL]: this.url,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.AttachmentOrder = AttachmentOrder;
|
|
62
|
+
_AttachmentOrder_lastModified = new WeakMap(), _AttachmentOrder_metadata = new WeakMap(), _AttachmentOrder_name = new WeakMap(), _AttachmentOrder_url = new WeakMap();
|
|
63
|
+
class AttachmentsListOrder extends abstractEntity_1.AbstractEntity {
|
|
64
|
+
constructor(attachmentsListOrderTypeInput) {
|
|
65
|
+
super(attachmentsListOrderTypeInput);
|
|
66
|
+
_AttachmentsListOrder_attachments.set(this, void 0);
|
|
67
|
+
__classPrivateFieldSet(this, _AttachmentsListOrder_attachments, attachmentsListOrderTypeInput[AttachmentsOrderListFields.COLUMN_ATTACHMENTS].map((attachment) => new AttachmentOrder(attachment)), "f");
|
|
68
|
+
}
|
|
69
|
+
get attachments() {
|
|
70
|
+
return __classPrivateFieldGet(this, _AttachmentsListOrder_attachments, "f");
|
|
71
|
+
}
|
|
72
|
+
toJSON() {
|
|
73
|
+
return {
|
|
74
|
+
[AttachmentsOrderListFields.COLUMN_ATTACHMENTS]: this.attachments.map((attachment) => attachment.toJSON()),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.AttachmentsListOrder = AttachmentsListOrder;
|
|
79
|
+
_AttachmentsListOrder_attachments = new WeakMap();
|
|
80
|
+
//# sourceMappingURL=attachment.js.map
|
|
@@ -3,6 +3,7 @@ import { GetResult } from '../getResult';
|
|
|
3
3
|
import { DataListOrders } from './entities/dataListOrders';
|
|
4
4
|
import { ReferenceLink } from './entities/referenceLink';
|
|
5
5
|
import { UpdateOrderResult } from './entities/orders/updateOrderResult';
|
|
6
|
+
import { AttachmentsListOrder } from './entities/orders/attachment';
|
|
6
7
|
export declare enum CreateOrderInputFields {
|
|
7
8
|
COLUMN_CUSTOMER = "customer",
|
|
8
9
|
COLUMN_REFERENCE = "reference",
|
|
@@ -180,4 +181,5 @@ export declare class OrdersClient extends AbstractRestfulClient {
|
|
|
180
181
|
validateOrder(orderReference: string, parameters?: Parameters): Promise<void>;
|
|
181
182
|
updateStaffContributorsOrder(orderReference: string, payload: UpdateContributorOrderInputType, parameters?: Parameters): Promise<void>;
|
|
182
183
|
updateAdditionalInformationOrder(orderReference: string, payload: UpdateAdditionalInformationOrderInputType, parameters?: Parameters): Promise<void>;
|
|
184
|
+
getAttachmentsOrder(orderReference: string, perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<AttachmentsListOrder>>;
|
|
183
185
|
}
|
|
@@ -6,6 +6,7 @@ const getResult_1 = require("../getResult");
|
|
|
6
6
|
const dataListOrders_1 = require("./entities/dataListOrders");
|
|
7
7
|
const referenceLink_1 = require("./entities/referenceLink");
|
|
8
8
|
const updateOrderResult_1 = require("./entities/orders/updateOrderResult");
|
|
9
|
+
const attachment_1 = require("./entities/orders/attachment");
|
|
9
10
|
var CreateOrderInputFields;
|
|
10
11
|
(function (CreateOrderInputFields) {
|
|
11
12
|
CreateOrderInputFields["COLUMN_CUSTOMER"] = "customer";
|
|
@@ -138,6 +139,16 @@ class OrdersClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
138
139
|
this.path = `/${orderReference}/additionalInformation`;
|
|
139
140
|
await this.patch(payload, parameters);
|
|
140
141
|
}
|
|
142
|
+
async getAttachmentsOrder(orderReference, perPage, page, parameters = {}) {
|
|
143
|
+
this.path = `/${orderReference}/attachments`;
|
|
144
|
+
if (perPage) {
|
|
145
|
+
this.setPerPage(perPage);
|
|
146
|
+
}
|
|
147
|
+
if (page) {
|
|
148
|
+
this.setPage(page);
|
|
149
|
+
}
|
|
150
|
+
return new getResult_1.GetResult(attachment_1.AttachmentsListOrder, await this.get(parameters));
|
|
151
|
+
}
|
|
141
152
|
}
|
|
142
153
|
exports.OrdersClient = OrdersClient;
|
|
143
154
|
//# sourceMappingURL=ordersClient.js.map
|
|
@@ -106,12 +106,6 @@ export declare type PostPartnerPayload = {
|
|
|
106
106
|
[PartnerFields.COLUMN_COMPANY]?: PartnerCompanyPayload;
|
|
107
107
|
[PartnerFields.COLUMN_RECAPTCHA_TOKEN]: string;
|
|
108
108
|
};
|
|
109
|
-
export declare enum PartnerAnonymizeContactsPayloadFields {
|
|
110
|
-
COLUMN_CONTACTS = "contacts"
|
|
111
|
-
}
|
|
112
|
-
export declare type PartnerAnonymizeContactsPayload = {
|
|
113
|
-
[PartnerAnonymizeContactsPayloadFields.COLUMN_CONTACTS]: number[];
|
|
114
|
-
};
|
|
115
109
|
export declare class PartnerClient extends AbstractRestfulClient {
|
|
116
110
|
protected basePath: string;
|
|
117
111
|
deletePartner(partnerReference: string, parameters?: Parameters): Promise<void>;
|
|
@@ -127,5 +121,4 @@ export declare class PartnerClient extends AbstractRestfulClient {
|
|
|
127
121
|
updateScopeUser(partnerReference: string, userReference: string, payload: UpdateScopeUserPayload, parameters?: Parameters): Promise<void>;
|
|
128
122
|
getUserImpersonations(partnerReference: string, userReference: string, parameters?: Parameters): Promise<GetResult<GetUserImpersonationsResult>>;
|
|
129
123
|
postPartner(payload: PostPartnerPayload, parameters?: Parameters): Promise<GetResult<DataPartner>>;
|
|
130
|
-
anonymizeContacts(partnerReference: string, payload: PartnerAnonymizeContactsPayload, parameters?: Parameters): Promise<void>;
|
|
131
124
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PartnerClient = exports.
|
|
3
|
+
exports.PartnerClient = exports.PartnerCompanyPayloadFields = exports.PartnerAddressFields = exports.PartnerContactPayloadFields = exports.PartnerUserPayloadFields = exports.PartnerFields = exports.PatchUserPayloadFields = void 0;
|
|
4
4
|
const abstractRestfulClient_1 = require("../abstractRestfulClient");
|
|
5
5
|
const getResult_1 = require("../getResult");
|
|
6
6
|
const getUserImpersonationsResult_1 = require("./types/getUserImpersonationsResult");
|
|
@@ -64,10 +64,6 @@ var PartnerCompanyPayloadFields;
|
|
|
64
64
|
PartnerCompanyPayloadFields["COLUMN_REGISTRATION_NUMBER"] = "registrationNumber";
|
|
65
65
|
PartnerCompanyPayloadFields["COLUMN_VAT_NUMBER"] = "vatNumber";
|
|
66
66
|
})(PartnerCompanyPayloadFields = exports.PartnerCompanyPayloadFields || (exports.PartnerCompanyPayloadFields = {}));
|
|
67
|
-
var PartnerAnonymizeContactsPayloadFields;
|
|
68
|
-
(function (PartnerAnonymizeContactsPayloadFields) {
|
|
69
|
-
PartnerAnonymizeContactsPayloadFields["COLUMN_CONTACTS"] = "contacts";
|
|
70
|
-
})(PartnerAnonymizeContactsPayloadFields = exports.PartnerAnonymizeContactsPayloadFields || (exports.PartnerAnonymizeContactsPayloadFields = {}));
|
|
71
67
|
class PartnerClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
72
68
|
constructor() {
|
|
73
69
|
super(...arguments);
|
|
@@ -120,10 +116,6 @@ class PartnerClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
120
116
|
this.path = `/v1/register`;
|
|
121
117
|
return new getResult_1.GetResult(dataPartner_1.DataPartner, await this.post(payload, parameters));
|
|
122
118
|
}
|
|
123
|
-
async anonymizeContacts(partnerReference, payload, parameters = {}) {
|
|
124
|
-
this.path = `/${partnerReference}/contact/anonymize`;
|
|
125
|
-
await this.patch(payload, parameters);
|
|
126
|
-
}
|
|
127
119
|
}
|
|
128
120
|
exports.PartnerClient = PartnerClient;
|
|
129
121
|
//# sourceMappingURL=partnerClient.js.map
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "https://github.com/ArrowSphere/nodejs-api-client.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "3.
|
|
7
|
+
"version": "3.186.0-rc-bdj-1",
|
|
8
8
|
"description": "Node.js client for ArrowSphere's public API",
|
|
9
9
|
"main": "build/index.js",
|
|
10
10
|
"types": "build/index.d.ts",
|