ninjapear 1.0.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.
@@ -0,0 +1,190 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
+ * NinjaPear API
16
+ * NinjaPear is a data platform that seeks to serve as the single source of truth for B2B data, be it to power your data-driven applications or your sales-driven workflow. As a data client of NinjaPear API, you can: 1. Look up the customers, investors, and partners/platforms of any business globally. 2. (FREE) Retrieve the logo of any company. 3. (FREE) Find out the nature of an email address. 4. (FREE) Check your credit balance.
17
+ *
18
+ * The version of the OpenAPI document: 1.0.0
19
+ * Contact: hello@nubela.co
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The CustomerCompany model module.
28
+ * @module model/CustomerCompany
29
+ * @version 1.0.0
30
+ */
31
+ var CustomerCompany = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>CustomerCompany</code>.
34
+ * @alias module:model/CustomerCompany
35
+ */
36
+ function CustomerCompany() {
37
+ _classCallCheck(this, CustomerCompany);
38
+ CustomerCompany.initialize(this);
39
+ }
40
+
41
+ /**
42
+ * Initializes the fields of this object.
43
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
+ * Only for internal use.
45
+ */
46
+ return _createClass(CustomerCompany, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>CustomerCompany</code> from a plain JavaScript object, optionally creating a new instance.
52
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
53
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
54
+ * @param {module:model/CustomerCompany} obj Optional instance to populate.
55
+ * @return {module:model/CustomerCompany} The populated <code>CustomerCompany</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new CustomerCompany();
62
+ if (data.hasOwnProperty('name')) {
63
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('description')) {
66
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
67
+ }
68
+ if (data.hasOwnProperty('tagline')) {
69
+ obj['tagline'] = _ApiClient["default"].convertToType(data['tagline'], 'String');
70
+ }
71
+ if (data.hasOwnProperty('website')) {
72
+ obj['website'] = _ApiClient["default"].convertToType(data['website'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('company_logo_url')) {
75
+ obj['company_logo_url'] = _ApiClient["default"].convertToType(data['company_logo_url'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('id')) {
78
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('industry')) {
81
+ obj['industry'] = _ApiClient["default"].convertToType(data['industry'], 'Number');
82
+ }
83
+ if (data.hasOwnProperty('specialties')) {
84
+ obj['specialties'] = _ApiClient["default"].convertToType(data['specialties'], ['String']);
85
+ }
86
+ if (data.hasOwnProperty('x_profile')) {
87
+ obj['x_profile'] = _ApiClient["default"].convertToType(data['x_profile'], 'String');
88
+ }
89
+ }
90
+ return obj;
91
+ }
92
+
93
+ /**
94
+ * Validates the JSON data with respect to <code>CustomerCompany</code>.
95
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
96
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomerCompany</code>.
97
+ */
98
+ }, {
99
+ key: "validateJSON",
100
+ value: function validateJSON(data) {
101
+ // ensure the json data is a string
102
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
103
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
104
+ }
105
+ // ensure the json data is a string
106
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
107
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
108
+ }
109
+ // ensure the json data is a string
110
+ if (data['tagline'] && !(typeof data['tagline'] === 'string' || data['tagline'] instanceof String)) {
111
+ throw new Error("Expected the field `tagline` to be a primitive type in the JSON string but got " + data['tagline']);
112
+ }
113
+ // ensure the json data is a string
114
+ if (data['website'] && !(typeof data['website'] === 'string' || data['website'] instanceof String)) {
115
+ throw new Error("Expected the field `website` to be a primitive type in the JSON string but got " + data['website']);
116
+ }
117
+ // ensure the json data is a string
118
+ if (data['company_logo_url'] && !(typeof data['company_logo_url'] === 'string' || data['company_logo_url'] instanceof String)) {
119
+ throw new Error("Expected the field `company_logo_url` to be a primitive type in the JSON string but got " + data['company_logo_url']);
120
+ }
121
+ // ensure the json data is a string
122
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
123
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
124
+ }
125
+ // ensure the json data is an array
126
+ if (!Array.isArray(data['specialties'])) {
127
+ throw new Error("Expected the field `specialties` to be an array in the JSON data but got " + data['specialties']);
128
+ }
129
+ // ensure the json data is a string
130
+ if (data['x_profile'] && !(typeof data['x_profile'] === 'string' || data['x_profile'] instanceof String)) {
131
+ throw new Error("Expected the field `x_profile` to be a primitive type in the JSON string but got " + data['x_profile']);
132
+ }
133
+ return true;
134
+ }
135
+ }]);
136
+ }();
137
+ /**
138
+ * Company name
139
+ * @member {String} name
140
+ */
141
+ CustomerCompany.prototype['name'] = undefined;
142
+
143
+ /**
144
+ * A brief description of the company
145
+ * @member {String} description
146
+ */
147
+ CustomerCompany.prototype['description'] = undefined;
148
+
149
+ /**
150
+ * Company tagline or slogan
151
+ * @member {String} tagline
152
+ */
153
+ CustomerCompany.prototype['tagline'] = undefined;
154
+
155
+ /**
156
+ * Company website URL
157
+ * @member {String} website
158
+ */
159
+ CustomerCompany.prototype['website'] = undefined;
160
+
161
+ /**
162
+ * URL to the Company Logo API for this company
163
+ * @member {String} company_logo_url
164
+ */
165
+ CustomerCompany.prototype['company_logo_url'] = undefined;
166
+
167
+ /**
168
+ * Unique identifier
169
+ * @member {String} id
170
+ */
171
+ CustomerCompany.prototype['id'] = undefined;
172
+
173
+ /**
174
+ * GICS 8-digit industry code
175
+ * @member {Number} industry
176
+ */
177
+ CustomerCompany.prototype['industry'] = undefined;
178
+
179
+ /**
180
+ * List of company specialties
181
+ * @member {Array.<String>} specialties
182
+ */
183
+ CustomerCompany.prototype['specialties'] = undefined;
184
+
185
+ /**
186
+ * X (Twitter) profile URL
187
+ * @member {String} x_profile
188
+ */
189
+ CustomerCompany.prototype['x_profile'] = undefined;
190
+ var _default = exports["default"] = CustomerCompany;
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _CustomerCompany = _interopRequireDefault(require("./CustomerCompany"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
12
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
13
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
+ * NinjaPear API
20
+ * NinjaPear is a data platform that seeks to serve as the single source of truth for B2B data, be it to power your data-driven applications or your sales-driven workflow. As a data client of NinjaPear API, you can: 1. Look up the customers, investors, and partners/platforms of any business globally. 2. (FREE) Retrieve the logo of any company. 3. (FREE) Find out the nature of an email address. 4. (FREE) Check your credit balance.
21
+ *
22
+ * The version of the OpenAPI document: 1.0.0
23
+ * Contact: hello@nubela.co
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The CustomerListingResponse model module.
32
+ * @module model/CustomerListingResponse
33
+ * @version 1.0.0
34
+ */
35
+ var CustomerListingResponse = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>CustomerListingResponse</code>.
38
+ * @alias module:model/CustomerListingResponse
39
+ */
40
+ function CustomerListingResponse() {
41
+ _classCallCheck(this, CustomerListingResponse);
42
+ CustomerListingResponse.initialize(this);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(CustomerListingResponse, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj) {}
53
+
54
+ /**
55
+ * Constructs a <code>CustomerListingResponse</code> from a plain JavaScript object, optionally creating a new instance.
56
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
57
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
58
+ * @param {module:model/CustomerListingResponse} obj Optional instance to populate.
59
+ * @return {module:model/CustomerListingResponse} The populated <code>CustomerListingResponse</code> instance.
60
+ */
61
+ }, {
62
+ key: "constructFromObject",
63
+ value: function constructFromObject(data, obj) {
64
+ if (data) {
65
+ obj = obj || new CustomerListingResponse();
66
+ if (data.hasOwnProperty('customers')) {
67
+ obj['customers'] = _ApiClient["default"].convertToType(data['customers'], [_CustomerCompany["default"]]);
68
+ }
69
+ if (data.hasOwnProperty('investors')) {
70
+ obj['investors'] = _ApiClient["default"].convertToType(data['investors'], [_CustomerCompany["default"]]);
71
+ }
72
+ if (data.hasOwnProperty('partner_platforms')) {
73
+ obj['partner_platforms'] = _ApiClient["default"].convertToType(data['partner_platforms'], [_CustomerCompany["default"]]);
74
+ }
75
+ if (data.hasOwnProperty('next_page')) {
76
+ obj['next_page'] = _ApiClient["default"].convertToType(data['next_page'], 'String');
77
+ }
78
+ }
79
+ return obj;
80
+ }
81
+
82
+ /**
83
+ * Validates the JSON data with respect to <code>CustomerListingResponse</code>.
84
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
85
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomerListingResponse</code>.
86
+ */
87
+ }, {
88
+ key: "validateJSON",
89
+ value: function validateJSON(data) {
90
+ if (data['customers']) {
91
+ // data not null
92
+ // ensure the json data is an array
93
+ if (!Array.isArray(data['customers'])) {
94
+ throw new Error("Expected the field `customers` to be an array in the JSON data but got " + data['customers']);
95
+ }
96
+ // validate the optional field `customers` (array)
97
+ var _iterator = _createForOfIteratorHelper(data['customers']),
98
+ _step;
99
+ try {
100
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
101
+ var item = _step.value;
102
+ _CustomerCompany["default"].validateJSON(item);
103
+ }
104
+ } catch (err) {
105
+ _iterator.e(err);
106
+ } finally {
107
+ _iterator.f();
108
+ }
109
+ ;
110
+ }
111
+ if (data['investors']) {
112
+ // data not null
113
+ // ensure the json data is an array
114
+ if (!Array.isArray(data['investors'])) {
115
+ throw new Error("Expected the field `investors` to be an array in the JSON data but got " + data['investors']);
116
+ }
117
+ // validate the optional field `investors` (array)
118
+ var _iterator2 = _createForOfIteratorHelper(data['investors']),
119
+ _step2;
120
+ try {
121
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
122
+ var _item = _step2.value;
123
+ _CustomerCompany["default"].validateJSON(_item);
124
+ }
125
+ } catch (err) {
126
+ _iterator2.e(err);
127
+ } finally {
128
+ _iterator2.f();
129
+ }
130
+ ;
131
+ }
132
+ if (data['partner_platforms']) {
133
+ // data not null
134
+ // ensure the json data is an array
135
+ if (!Array.isArray(data['partner_platforms'])) {
136
+ throw new Error("Expected the field `partner_platforms` to be an array in the JSON data but got " + data['partner_platforms']);
137
+ }
138
+ // validate the optional field `partner_platforms` (array)
139
+ var _iterator3 = _createForOfIteratorHelper(data['partner_platforms']),
140
+ _step3;
141
+ try {
142
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
143
+ var _item2 = _step3.value;
144
+ _CustomerCompany["default"].validateJSON(_item2);
145
+ }
146
+ } catch (err) {
147
+ _iterator3.e(err);
148
+ } finally {
149
+ _iterator3.f();
150
+ }
151
+ ;
152
+ }
153
+ // ensure the json data is a string
154
+ if (data['next_page'] && !(typeof data['next_page'] === 'string' || data['next_page'] instanceof String)) {
155
+ throw new Error("Expected the field `next_page` to be a primitive type in the JSON string but got " + data['next_page']);
156
+ }
157
+ return true;
158
+ }
159
+ }]);
160
+ }();
161
+ /**
162
+ * Companies that are probable customers of the target company
163
+ * @member {Array.<module:model/CustomerCompany>} customers
164
+ */
165
+ CustomerListingResponse.prototype['customers'] = undefined;
166
+
167
+ /**
168
+ * VC firms, PE funds, angel networks that have invested in the target company
169
+ * @member {Array.<module:model/CustomerCompany>} investors
170
+ */
171
+ CustomerListingResponse.prototype['investors'] = undefined;
172
+
173
+ /**
174
+ * Partners, platforms, or service providers the target company uses
175
+ * @member {Array.<module:model/CustomerCompany>} partner_platforms
176
+ */
177
+ CustomerListingResponse.prototype['partner_platforms'] = undefined;
178
+
179
+ /**
180
+ * Pagination URL for the next page of results
181
+ * @member {String} next_page
182
+ */
183
+ CustomerListingResponse.prototype['next_page'] = undefined;
184
+ var _default = exports["default"] = CustomerListingResponse;
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
+ * NinjaPear API
16
+ * NinjaPear is a data platform that seeks to serve as the single source of truth for B2B data, be it to power your data-driven applications or your sales-driven workflow. As a data client of NinjaPear API, you can: 1. Look up the customers, investors, and partners/platforms of any business globally. 2. (FREE) Retrieve the logo of any company. 3. (FREE) Find out the nature of an email address. 4. (FREE) Check your credit balance.
17
+ *
18
+ * The version of the OpenAPI document: 1.0.0
19
+ * Contact: hello@nubela.co
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The DisposableEmailResponse model module.
28
+ * @module model/DisposableEmailResponse
29
+ * @version 1.0.0
30
+ */
31
+ var DisposableEmailResponse = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>DisposableEmailResponse</code>.
34
+ * @alias module:model/DisposableEmailResponse
35
+ */
36
+ function DisposableEmailResponse() {
37
+ _classCallCheck(this, DisposableEmailResponse);
38
+ DisposableEmailResponse.initialize(this);
39
+ }
40
+
41
+ /**
42
+ * Initializes the fields of this object.
43
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
+ * Only for internal use.
45
+ */
46
+ return _createClass(DisposableEmailResponse, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>DisposableEmailResponse</code> from a plain JavaScript object, optionally creating a new instance.
52
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
53
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
54
+ * @param {module:model/DisposableEmailResponse} obj Optional instance to populate.
55
+ * @return {module:model/DisposableEmailResponse} The populated <code>DisposableEmailResponse</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new DisposableEmailResponse();
62
+ if (data.hasOwnProperty('email')) {
63
+ obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('is_disposable_email')) {
66
+ obj['is_disposable_email'] = _ApiClient["default"].convertToType(data['is_disposable_email'], 'Boolean');
67
+ }
68
+ if (data.hasOwnProperty('is_free_email')) {
69
+ obj['is_free_email'] = _ApiClient["default"].convertToType(data['is_free_email'], 'Boolean');
70
+ }
71
+ }
72
+ return obj;
73
+ }
74
+
75
+ /**
76
+ * Validates the JSON data with respect to <code>DisposableEmailResponse</code>.
77
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
78
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>DisposableEmailResponse</code>.
79
+ */
80
+ }, {
81
+ key: "validateJSON",
82
+ value: function validateJSON(data) {
83
+ // ensure the json data is a string
84
+ if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
85
+ throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
86
+ }
87
+ return true;
88
+ }
89
+ }]);
90
+ }();
91
+ /**
92
+ * The email address that was checked
93
+ * @member {String} email
94
+ */
95
+ DisposableEmailResponse.prototype['email'] = undefined;
96
+
97
+ /**
98
+ * Whether the email domain is a known disposable/temporary email provider
99
+ * @member {Boolean} is_disposable_email
100
+ */
101
+ DisposableEmailResponse.prototype['is_disposable_email'] = undefined;
102
+
103
+ /**
104
+ * Whether the email domain is a free email provider
105
+ * @member {Boolean} is_free_email
106
+ */
107
+ DisposableEmailResponse.prototype['is_free_email'] = undefined;
108
+ var _default = exports["default"] = DisposableEmailResponse;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
+ * NinjaPear API
16
+ * NinjaPear is a data platform that seeks to serve as the single source of truth for B2B data, be it to power your data-driven applications or your sales-driven workflow. As a data client of NinjaPear API, you can: 1. Look up the customers, investors, and partners/platforms of any business globally. 2. (FREE) Retrieve the logo of any company. 3. (FREE) Find out the nature of an email address. 4. (FREE) Check your credit balance.
17
+ *
18
+ * The version of the OpenAPI document: 1.0.0
19
+ * Contact: hello@nubela.co
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The Error model module.
28
+ * @module model/Error
29
+ * @version 1.0.0
30
+ */
31
+ var Error = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>Error</code>.
34
+ * @alias module:model/Error
35
+ */
36
+ function Error() {
37
+ _classCallCheck(this, Error);
38
+ Error.initialize(this);
39
+ }
40
+
41
+ /**
42
+ * Initializes the fields of this object.
43
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
+ * Only for internal use.
45
+ */
46
+ return _createClass(Error, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>Error</code> from a plain JavaScript object, optionally creating a new instance.
52
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
53
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
54
+ * @param {module:model/Error} obj Optional instance to populate.
55
+ * @return {module:model/Error} The populated <code>Error</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new Error();
62
+ if (data.hasOwnProperty('error')) {
63
+ obj['error'] = _ApiClient["default"].convertToType(data['error'], 'String');
64
+ }
65
+ }
66
+ return obj;
67
+ }
68
+
69
+ /**
70
+ * Validates the JSON data with respect to <code>Error</code>.
71
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
72
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Error</code>.
73
+ */
74
+ }, {
75
+ key: "validateJSON",
76
+ value: function validateJSON(data) {
77
+ // ensure the json data is a string
78
+ if (data['error'] && !(typeof data['error'] === 'string' || data['error'] instanceof String)) {
79
+ throw new Error("Expected the field `error` to be a primitive type in the JSON string but got " + data['error']);
80
+ }
81
+ return true;
82
+ }
83
+ }]);
84
+ }();
85
+ /**
86
+ * Error message
87
+ * @member {String} error
88
+ */
89
+ Error.prototype['error'] = undefined;
90
+ var _default = exports["default"] = Error;
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "ninjapear",
3
+ "version": "1.0.0",
4
+ "description": "JavaScript client for the NinjaPear API - B2B data platform for customer discovery, company logos, and email validation.",
5
+ "license": "MIT",
6
+ "author": {
7
+ "name": "NinjaPear",
8
+ "email": "hello@nubela.co"
9
+ },
10
+ "homepage": "https://nubela.co",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/nubelaco/ninjapear-js.git"
14
+ },
15
+ "keywords": [
16
+ "ninjapear",
17
+ "api",
18
+ "b2b",
19
+ "customer-discovery",
20
+ "company-logo",
21
+ "email-validation"
22
+ ],
23
+ "main": "dist/index.js",
24
+ "scripts": {
25
+ "build": "babel src -d dist",
26
+ "prepare": "npm run build",
27
+ "test": "mocha --require @babel/register --recursive"
28
+ },
29
+ "browser": {
30
+ "fs": false
31
+ },
32
+ "dependencies": {
33
+ "@babel/cli": "^7.0.0",
34
+ "superagent": "^5.3.0"
35
+ },
36
+ "devDependencies": {
37
+ "@babel/core": "^7.0.0",
38
+ "@babel/plugin-proposal-class-properties": "^7.0.0",
39
+ "@babel/plugin-proposal-decorators": "^7.0.0",
40
+ "@babel/plugin-proposal-do-expressions": "^7.0.0",
41
+ "@babel/plugin-proposal-export-default-from": "^7.0.0",
42
+ "@babel/plugin-proposal-export-namespace-from": "^7.0.0",
43
+ "@babel/plugin-proposal-function-bind": "^7.0.0",
44
+ "@babel/plugin-proposal-function-sent": "^7.0.0",
45
+ "@babel/plugin-proposal-json-strings": "^7.0.0",
46
+ "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
47
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
48
+ "@babel/plugin-proposal-numeric-separator": "^7.0.0",
49
+ "@babel/plugin-proposal-optional-chaining": "^7.0.0",
50
+ "@babel/plugin-proposal-pipeline-operator": "^7.0.0",
51
+ "@babel/plugin-proposal-throw-expressions": "^7.0.0",
52
+ "@babel/plugin-syntax-dynamic-import": "^7.0.0",
53
+ "@babel/plugin-syntax-import-meta": "^7.0.0",
54
+ "@babel/preset-env": "^7.0.0",
55
+ "@babel/register": "^7.0.0",
56
+ "expect.js": "^0.3.1",
57
+ "mocha": "^8.0.1",
58
+ "sinon": "^7.2.0"
59
+ },
60
+ "files": [
61
+ "dist"
62
+ ]
63
+ }