@arrowsphere/api-client 3.5.0 → 3.8.0-rc.0
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/CHANGELOG.md +25 -0
- package/build/abstractClient.d.ts +1 -0
- package/build/abstractClient.js +6 -0
- package/build/campaign/campaignClient.d.ts +12 -0
- package/build/campaign/campaignClient.js +26 -0
- package/build/campaign/entities/campaign/banners/banners.d.ts +28 -0
- package/build/campaign/entities/campaign/banners/banners.js +75 -0
- package/build/campaign/entities/campaign/campaign.d.ts +52 -0
- package/build/campaign/entities/campaign/campaign.js +130 -0
- package/build/campaign/entities/campaign/landingPage/landingPage.d.ts +25 -0
- package/build/campaign/entities/campaign/landingPage/landingPage.js +67 -0
- package/build/campaign/entities/campaign/landingPage/landingPageBody.d.ts +34 -0
- package/build/campaign/entities/campaign/landingPage/landingPageBody.js +90 -0
- package/build/campaign/entities/campaign/landingPage/landingPageFooter/landingPageFooter.d.ts +29 -0
- package/build/campaign/entities/campaign/landingPage/landingPageFooter/landingPageFooter.js +78 -0
- package/build/campaign/entities/campaign/landingPage/landingPageFooter/landingPageFooterFeature.d.ts +22 -0
- package/build/campaign/entities/campaign/landingPage/landingPageFooter/landingPageFooterFeature.js +61 -0
- package/build/campaign/entities/campaign/landingPage/landingPageHeader.d.ts +28 -0
- package/build/campaign/entities/campaign/landingPage/landingPageHeader.js +76 -0
- package/build/campaign/entities/campaign/rules/rules.d.ts +28 -0
- package/build/campaign/entities/campaign/rules/rules.js +75 -0
- package/build/campaign/entities/campaignAssets/assets/assets.d.ts +16 -0
- package/build/campaign/entities/campaignAssets/assets/assets.js +47 -0
- package/build/campaign/entities/campaignAssets/campaignAssets.d.ts +14 -0
- package/build/campaign/entities/campaignAssets/campaignAssets.js +41 -0
- package/build/campaign/index.d.ts +11 -0
- package/build/campaign/index.js +24 -0
- package/build/contact/contactClient.d.ts +37 -0
- package/build/contact/contactClient.js +49 -0
- package/build/contact/entities/contact.d.ts +43 -0
- package/build/contact/entities/contact.js +110 -0
- package/build/contact/entities/contactCreate.d.ts +13 -0
- package/build/contact/entities/contactCreate.js +40 -0
- package/build/contact/entities/contactList.d.ts +9 -0
- package/build/contact/entities/contactList.js +35 -0
- package/build/contact/index.d.ts +4 -0
- package/build/contact/index.js +17 -0
- package/build/customers/customersClient.d.ts +4 -2
- package/build/customers/customersClient.js +10 -4
- package/build/index.d.ts +2 -0
- package/build/index.js +15 -0
- package/build/publicApiClient.d.ts +12 -0
- package/build/publicApiClient.js +20 -0
- package/package.json +2 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../abstractEntity';
|
|
2
|
+
export declare enum ContactFields {
|
|
3
|
+
COLUMN_ID = "id",
|
|
4
|
+
COLUMN_COMPANY_ID = "companyId",
|
|
5
|
+
COLUMN_RESELLER = "reseller",
|
|
6
|
+
COLUMN_FIRSTNAME = "firstname",
|
|
7
|
+
COLUMN_LASTNAME = "lastname",
|
|
8
|
+
COLUMN_EMAIL = "email",
|
|
9
|
+
COLUMN_PHONE = "phone",
|
|
10
|
+
COLUMN_ERP_ID = "erpId",
|
|
11
|
+
COLUMN_TYPE = "type",
|
|
12
|
+
COLUMN_ROLE = "role",
|
|
13
|
+
COLUMN_STATUS = "status"
|
|
14
|
+
}
|
|
15
|
+
export declare type ContactType = {
|
|
16
|
+
[ContactFields.COLUMN_ID]: number;
|
|
17
|
+
[ContactFields.COLUMN_COMPANY_ID]: number;
|
|
18
|
+
[ContactFields.COLUMN_RESELLER]: string;
|
|
19
|
+
[ContactFields.COLUMN_FIRSTNAME]: string;
|
|
20
|
+
[ContactFields.COLUMN_LASTNAME]: string;
|
|
21
|
+
[ContactFields.COLUMN_EMAIL]: string;
|
|
22
|
+
[ContactFields.COLUMN_PHONE]: string;
|
|
23
|
+
[ContactFields.COLUMN_ERP_ID]: string;
|
|
24
|
+
[ContactFields.COLUMN_TYPE]: string;
|
|
25
|
+
[ContactFields.COLUMN_ROLE]: string;
|
|
26
|
+
[ContactFields.COLUMN_STATUS]: string;
|
|
27
|
+
};
|
|
28
|
+
export declare class Contact extends AbstractEntity<ContactType> {
|
|
29
|
+
#private;
|
|
30
|
+
constructor(contactDataInput: ContactType);
|
|
31
|
+
get id(): number;
|
|
32
|
+
get companyId(): number;
|
|
33
|
+
get reseller(): string;
|
|
34
|
+
get firstname(): string;
|
|
35
|
+
get lastname(): string;
|
|
36
|
+
get email(): string;
|
|
37
|
+
get phone(): string;
|
|
38
|
+
get erpId(): string;
|
|
39
|
+
get type(): string;
|
|
40
|
+
get role(): string;
|
|
41
|
+
get status(): string;
|
|
42
|
+
toJSON(): ContactType;
|
|
43
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _id, _companyId, _reseller, _firstname, _lastname, _email, _phone, _erpId, _type, _role, _status;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Contact = exports.ContactFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../abstractEntity");
|
|
19
|
+
var ContactFields;
|
|
20
|
+
(function (ContactFields) {
|
|
21
|
+
ContactFields["COLUMN_ID"] = "id";
|
|
22
|
+
ContactFields["COLUMN_COMPANY_ID"] = "companyId";
|
|
23
|
+
ContactFields["COLUMN_RESELLER"] = "reseller";
|
|
24
|
+
ContactFields["COLUMN_FIRSTNAME"] = "firstname";
|
|
25
|
+
ContactFields["COLUMN_LASTNAME"] = "lastname";
|
|
26
|
+
ContactFields["COLUMN_EMAIL"] = "email";
|
|
27
|
+
ContactFields["COLUMN_PHONE"] = "phone";
|
|
28
|
+
ContactFields["COLUMN_ERP_ID"] = "erpId";
|
|
29
|
+
ContactFields["COLUMN_TYPE"] = "type";
|
|
30
|
+
ContactFields["COLUMN_ROLE"] = "role";
|
|
31
|
+
ContactFields["COLUMN_STATUS"] = "status";
|
|
32
|
+
})(ContactFields = exports.ContactFields || (exports.ContactFields = {}));
|
|
33
|
+
class Contact extends abstractEntity_1.AbstractEntity {
|
|
34
|
+
constructor(contactDataInput) {
|
|
35
|
+
super(contactDataInput);
|
|
36
|
+
_id.set(this, void 0);
|
|
37
|
+
_companyId.set(this, void 0);
|
|
38
|
+
_reseller.set(this, void 0);
|
|
39
|
+
_firstname.set(this, void 0);
|
|
40
|
+
_lastname.set(this, void 0);
|
|
41
|
+
_email.set(this, void 0);
|
|
42
|
+
_phone.set(this, void 0);
|
|
43
|
+
_erpId.set(this, void 0);
|
|
44
|
+
_type.set(this, void 0);
|
|
45
|
+
_role.set(this, void 0);
|
|
46
|
+
_status.set(this, void 0);
|
|
47
|
+
__classPrivateFieldSet(this, _id, contactDataInput[ContactFields.COLUMN_ID]);
|
|
48
|
+
__classPrivateFieldSet(this, _companyId, contactDataInput[ContactFields.COLUMN_COMPANY_ID]);
|
|
49
|
+
__classPrivateFieldSet(this, _reseller, contactDataInput[ContactFields.COLUMN_RESELLER]);
|
|
50
|
+
__classPrivateFieldSet(this, _firstname, contactDataInput[ContactFields.COLUMN_FIRSTNAME]);
|
|
51
|
+
__classPrivateFieldSet(this, _lastname, contactDataInput[ContactFields.COLUMN_LASTNAME]);
|
|
52
|
+
__classPrivateFieldSet(this, _email, contactDataInput[ContactFields.COLUMN_EMAIL]);
|
|
53
|
+
__classPrivateFieldSet(this, _phone, contactDataInput[ContactFields.COLUMN_PHONE]);
|
|
54
|
+
__classPrivateFieldSet(this, _erpId, contactDataInput[ContactFields.COLUMN_ERP_ID]);
|
|
55
|
+
__classPrivateFieldSet(this, _type, contactDataInput[ContactFields.COLUMN_TYPE]);
|
|
56
|
+
__classPrivateFieldSet(this, _role, contactDataInput[ContactFields.COLUMN_ROLE]);
|
|
57
|
+
__classPrivateFieldSet(this, _status, contactDataInput[ContactFields.COLUMN_STATUS]);
|
|
58
|
+
}
|
|
59
|
+
get id() {
|
|
60
|
+
return __classPrivateFieldGet(this, _id);
|
|
61
|
+
}
|
|
62
|
+
get companyId() {
|
|
63
|
+
return __classPrivateFieldGet(this, _companyId);
|
|
64
|
+
}
|
|
65
|
+
get reseller() {
|
|
66
|
+
return __classPrivateFieldGet(this, _reseller);
|
|
67
|
+
}
|
|
68
|
+
get firstname() {
|
|
69
|
+
return __classPrivateFieldGet(this, _firstname);
|
|
70
|
+
}
|
|
71
|
+
get lastname() {
|
|
72
|
+
return __classPrivateFieldGet(this, _lastname);
|
|
73
|
+
}
|
|
74
|
+
get email() {
|
|
75
|
+
return __classPrivateFieldGet(this, _email);
|
|
76
|
+
}
|
|
77
|
+
get phone() {
|
|
78
|
+
return __classPrivateFieldGet(this, _phone);
|
|
79
|
+
}
|
|
80
|
+
get erpId() {
|
|
81
|
+
return __classPrivateFieldGet(this, _erpId);
|
|
82
|
+
}
|
|
83
|
+
get type() {
|
|
84
|
+
return __classPrivateFieldGet(this, _type);
|
|
85
|
+
}
|
|
86
|
+
get role() {
|
|
87
|
+
return __classPrivateFieldGet(this, _role);
|
|
88
|
+
}
|
|
89
|
+
get status() {
|
|
90
|
+
return __classPrivateFieldGet(this, _status);
|
|
91
|
+
}
|
|
92
|
+
toJSON() {
|
|
93
|
+
return {
|
|
94
|
+
[ContactFields.COLUMN_ID]: this.id,
|
|
95
|
+
[ContactFields.COLUMN_COMPANY_ID]: this.companyId,
|
|
96
|
+
[ContactFields.COLUMN_RESELLER]: this.reseller,
|
|
97
|
+
[ContactFields.COLUMN_FIRSTNAME]: this.firstname,
|
|
98
|
+
[ContactFields.COLUMN_LASTNAME]: this.lastname,
|
|
99
|
+
[ContactFields.COLUMN_EMAIL]: this.email,
|
|
100
|
+
[ContactFields.COLUMN_PHONE]: this.phone,
|
|
101
|
+
[ContactFields.COLUMN_ERP_ID]: this.erpId,
|
|
102
|
+
[ContactFields.COLUMN_TYPE]: this.type,
|
|
103
|
+
[ContactFields.COLUMN_ROLE]: this.role,
|
|
104
|
+
[ContactFields.COLUMN_STATUS]: this.status,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.Contact = Contact;
|
|
109
|
+
_id = new WeakMap(), _companyId = new WeakMap(), _reseller = new WeakMap(), _firstname = new WeakMap(), _lastname = new WeakMap(), _email = new WeakMap(), _phone = new WeakMap(), _erpId = new WeakMap(), _type = new WeakMap(), _role = new WeakMap(), _status = new WeakMap();
|
|
110
|
+
//# sourceMappingURL=contact.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../abstractEntity';
|
|
2
|
+
export declare enum ContactCreateFields {
|
|
3
|
+
COLUMN_ID = "id"
|
|
4
|
+
}
|
|
5
|
+
export declare type ContactCreateType = {
|
|
6
|
+
[ContactCreateFields.COLUMN_ID]: number;
|
|
7
|
+
};
|
|
8
|
+
export declare class ContactCreate extends AbstractEntity<ContactCreateType> {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(createContactResponse: ContactCreateType);
|
|
11
|
+
get id(): number;
|
|
12
|
+
toJSON(): ContactCreateType;
|
|
13
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _id;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ContactCreate = exports.ContactCreateFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../abstractEntity");
|
|
19
|
+
var ContactCreateFields;
|
|
20
|
+
(function (ContactCreateFields) {
|
|
21
|
+
ContactCreateFields["COLUMN_ID"] = "id";
|
|
22
|
+
})(ContactCreateFields = exports.ContactCreateFields || (exports.ContactCreateFields = {}));
|
|
23
|
+
class ContactCreate extends abstractEntity_1.AbstractEntity {
|
|
24
|
+
constructor(createContactResponse) {
|
|
25
|
+
super(createContactResponse);
|
|
26
|
+
_id.set(this, void 0);
|
|
27
|
+
__classPrivateFieldSet(this, _id, createContactResponse[ContactCreateFields.COLUMN_ID]);
|
|
28
|
+
}
|
|
29
|
+
get id() {
|
|
30
|
+
return __classPrivateFieldGet(this, _id);
|
|
31
|
+
}
|
|
32
|
+
toJSON() {
|
|
33
|
+
return {
|
|
34
|
+
[ContactCreateFields.COLUMN_ID]: this.id,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.ContactCreate = ContactCreate;
|
|
39
|
+
_id = new WeakMap();
|
|
40
|
+
//# sourceMappingURL=contactCreate.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../abstractEntity';
|
|
2
|
+
import { Contact, ContactType } from './contact';
|
|
3
|
+
export declare type ContactListType = Array<ContactType>;
|
|
4
|
+
export declare class ContactList extends AbstractEntity<ContactListType> {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(contactListDataInput: Array<ContactType>);
|
|
7
|
+
get contactList(): Array<Contact>;
|
|
8
|
+
toJSON(): ContactListType;
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _contactList;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ContactList = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../abstractEntity");
|
|
19
|
+
const contact_1 = require("./contact");
|
|
20
|
+
class ContactList extends abstractEntity_1.AbstractEntity {
|
|
21
|
+
constructor(contactListDataInput) {
|
|
22
|
+
super(contactListDataInput);
|
|
23
|
+
_contactList.set(this, void 0);
|
|
24
|
+
__classPrivateFieldSet(this, _contactList, contactListDataInput.map((contact) => new contact_1.Contact(contact)));
|
|
25
|
+
}
|
|
26
|
+
get contactList() {
|
|
27
|
+
return __classPrivateFieldGet(this, _contactList);
|
|
28
|
+
}
|
|
29
|
+
toJSON() {
|
|
30
|
+
return this.contactList.map((contact) => contact.toJSON());
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.ContactList = ContactList;
|
|
34
|
+
_contactList = new WeakMap();
|
|
35
|
+
//# sourceMappingURL=contactList.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./entities/contactCreate"), exports);
|
|
14
|
+
__exportStar(require("./entities/contactList"), exports);
|
|
15
|
+
__exportStar(require("./entities/contact"), exports);
|
|
16
|
+
__exportStar(require("./contactClient"), exports);
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -2,11 +2,13 @@ import { AbstractClient, Parameters } from '../abstractClient';
|
|
|
2
2
|
import { GetResult } from '../getResult';
|
|
3
3
|
import { DataCustomers } from './entities/dataCustomers';
|
|
4
4
|
import { DataInvitation } from './entities/dataInvitation';
|
|
5
|
+
import { DataListOrders } from '../orders';
|
|
5
6
|
export declare class CustomersClient extends AbstractClient {
|
|
6
7
|
/**
|
|
7
|
-
* The base path of the
|
|
8
|
+
* The base path of the API
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
protected basePath: string;
|
|
10
11
|
getCustomers(parameters?: Parameters): Promise<GetResult<DataCustomers>>;
|
|
12
|
+
getCustomerOrders(customerRef: string, perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<DataListOrders>>;
|
|
11
13
|
getCustomerInvitation(codeInvitation: string, parameters?: Parameters): Promise<GetResult<DataInvitation>>;
|
|
12
14
|
}
|
|
@@ -5,20 +5,26 @@ const abstractClient_1 = require("../abstractClient");
|
|
|
5
5
|
const getResult_1 = require("../getResult");
|
|
6
6
|
const dataCustomers_1 = require("./entities/dataCustomers");
|
|
7
7
|
const dataInvitation_1 = require("./entities/dataInvitation");
|
|
8
|
+
const orders_1 = require("../orders");
|
|
8
9
|
class CustomersClient extends abstractClient_1.AbstractClient {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
11
12
|
/**
|
|
12
|
-
* The base path of the
|
|
13
|
+
* The base path of the API
|
|
13
14
|
*/
|
|
14
|
-
this.
|
|
15
|
+
this.basePath = '/customers';
|
|
15
16
|
}
|
|
16
17
|
async getCustomers(parameters = {}) {
|
|
17
|
-
this.path = this.ROOT_PATH;
|
|
18
18
|
return new getResult_1.GetResult(dataCustomers_1.DataCustomers, await this.get(parameters));
|
|
19
19
|
}
|
|
20
|
+
async getCustomerOrders(customerRef, perPage = 25, page = 1, parameters = {}) {
|
|
21
|
+
this.setPerPage(perPage);
|
|
22
|
+
this.setPage(page);
|
|
23
|
+
this.path = `/${customerRef}/orders`;
|
|
24
|
+
return new getResult_1.GetResult(orders_1.DataListOrders, await this.get(parameters));
|
|
25
|
+
}
|
|
20
26
|
async getCustomerInvitation(codeInvitation, parameters = {}) {
|
|
21
|
-
this.path =
|
|
27
|
+
this.path = `/invitations/${codeInvitation}`;
|
|
22
28
|
return new getResult_1.GetResult(dataInvitation_1.DataInvitation, await this.get(parameters));
|
|
23
29
|
}
|
|
24
30
|
}
|
package/build/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import * as ContactInformation from './contact';
|
|
1
2
|
export * from './publicApiClient';
|
|
2
3
|
export * from './publicGraphQLClient';
|
|
3
4
|
export * from './abstractEntity';
|
|
4
5
|
export * from './abstractClient';
|
|
5
6
|
export * from './abstractGraphQLClient';
|
|
6
7
|
export * from './catalog/';
|
|
8
|
+
export { ContactInformation };
|
|
7
9
|
export * from './customers/';
|
|
8
10
|
export * from './general/';
|
|
9
11
|
export * from './licenses/';
|
package/build/index.js
CHANGED
|
@@ -6,10 +6,25 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
6
6
|
if (k2 === undefined) k2 = k;
|
|
7
7
|
o[k2] = m[k];
|
|
8
8
|
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
9
21
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
22
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
23
|
};
|
|
12
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ContactInformation = void 0;
|
|
26
|
+
const ContactInformation = __importStar(require("./contact"));
|
|
27
|
+
exports.ContactInformation = ContactInformation;
|
|
13
28
|
__exportStar(require("./publicApiClient"), exports);
|
|
14
29
|
__exportStar(require("./publicGraphQLClient"), exports);
|
|
15
30
|
__exportStar(require("./abstractEntity"), exports);
|
|
@@ -4,6 +4,8 @@ import { LicensesClient } from './licenses/licensesClient';
|
|
|
4
4
|
import { SubscriptionsClient } from './subscriptions/subscriptionsClient';
|
|
5
5
|
import { CustomersClient } from './customers/customersClient';
|
|
6
6
|
import { OrdersClient } from './orders';
|
|
7
|
+
import { ContactClient } from './contact/contactClient';
|
|
8
|
+
import { CampaignClient } from './campaign';
|
|
7
9
|
/**
|
|
8
10
|
* Public API Client class, should be the main entry point for your calls
|
|
9
11
|
*/
|
|
@@ -39,5 +41,15 @@ export declare class PublicApiClient extends AbstractClient {
|
|
|
39
41
|
* @returns {@link OrdersClient}
|
|
40
42
|
*/
|
|
41
43
|
getOrdersClient(): OrdersClient;
|
|
44
|
+
/**
|
|
45
|
+
* Creates a new {@link ContactClient} instance and returns it
|
|
46
|
+
* @returns {@link ContactClient}
|
|
47
|
+
*/
|
|
48
|
+
getContactClient(): ContactClient;
|
|
49
|
+
/**
|
|
50
|
+
* Creates a new {@link ContactClient} instance and returns it
|
|
51
|
+
* @returns {@link ContactClient}
|
|
52
|
+
*/
|
|
53
|
+
getCampaignClient(): CampaignClient;
|
|
42
54
|
}
|
|
43
55
|
export default PublicApiClient;
|
package/build/publicApiClient.js
CHANGED
|
@@ -7,6 +7,8 @@ const licensesClient_1 = require("./licenses/licensesClient");
|
|
|
7
7
|
const subscriptionsClient_1 = require("./subscriptions/subscriptionsClient");
|
|
8
8
|
const customersClient_1 = require("./customers/customersClient");
|
|
9
9
|
const orders_1 = require("./orders");
|
|
10
|
+
const contactClient_1 = require("./contact/contactClient");
|
|
11
|
+
const campaign_1 = require("./campaign");
|
|
10
12
|
/**
|
|
11
13
|
* Public API Client class, should be the main entry point for your calls
|
|
12
14
|
*/
|
|
@@ -68,6 +70,24 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
68
70
|
.setUrl(this.url)
|
|
69
71
|
.setApiKey(this.apiKey);
|
|
70
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Creates a new {@link ContactClient} instance and returns it
|
|
75
|
+
* @returns {@link ContactClient}
|
|
76
|
+
*/
|
|
77
|
+
getContactClient() {
|
|
78
|
+
return new contactClient_1.ContactClient(this.client)
|
|
79
|
+
.setUrl(this.url)
|
|
80
|
+
.setApiKey(this.apiKey);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Creates a new {@link ContactClient} instance and returns it
|
|
84
|
+
* @returns {@link ContactClient}
|
|
85
|
+
*/
|
|
86
|
+
getCampaignClient() {
|
|
87
|
+
return new campaign_1.CampaignClient(this.client)
|
|
88
|
+
.setUrl(this.url)
|
|
89
|
+
.setApiKey(this.apiKey);
|
|
90
|
+
}
|
|
71
91
|
}
|
|
72
92
|
exports.PublicApiClient = PublicApiClient;
|
|
73
93
|
exports.default = PublicApiClient;
|
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.8.0-rc.0",
|
|
8
8
|
"description": "Node.js client for ArrowSphere's public API",
|
|
9
9
|
"main": "build/index.js",
|
|
10
10
|
"types": "build/index.d.ts",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@types/validatorjs": "3.15.0",
|
|
82
82
|
"axios": "0.21.1",
|
|
83
83
|
"graphql": "^16.3.0",
|
|
84
|
-
"graphql-request": "
|
|
84
|
+
"graphql-request": "4.2.0",
|
|
85
85
|
"validatorjs": "3.22.1"
|
|
86
86
|
}
|
|
87
87
|
}
|