Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@foo-software/foo-api-client

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@foo-software/foo-api-client - npm Package Compare versions

Comparing version 0.0.43 to 0.0.44

20

dist/ApiClient.js

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

return __awaiter(this, void 0, void 0, function* () {
return createAlert_1.default({
return (0, createAlert_1.default)({
parameters: {

@@ -48,3 +48,3 @@ apiToken: this.apiToken,

return __awaiter(this, void 0, void 0, function* () {
return createPage_1.default({
return (0, createPage_1.default)({
parameters: {

@@ -60,3 +60,3 @@ apiToken: this.apiToken,

return __awaiter(this, void 0, void 0, function* () {
return createPageQueueItem_1.default({
return (0, createPageQueueItem_1.default)({
parameters: Object.assign(Object.assign({}, parameters), { apiToken: this.apiToken, apiUrl: this.apiUrl }),

@@ -69,3 +69,3 @@ payload,

return __awaiter(this, void 0, void 0, function* () {
return findPageLighthouseAudits_1.default({
return (0, findPageLighthouseAudits_1.default)({
parameters: Object.assign(Object.assign({}, parameters), { apiToken: this.apiToken, apiUrl: this.apiUrl }),

@@ -77,3 +77,3 @@ });

return __awaiter(this, void 0, void 0, function* () {
return findPageQueueItems_1.default({
return (0, findPageQueueItems_1.default)({
parameters: Object.assign(Object.assign({}, parameters), { apiToken: this.apiToken, apiUrl: this.apiUrl }),

@@ -85,3 +85,3 @@ });

return __awaiter(this, void 0, void 0, function* () {
return findPages_1.default({
return (0, findPages_1.default)({
parameters: Object.assign(Object.assign({}, parameters), { apiToken: this.apiToken, apiUrl: this.apiUrl }),

@@ -93,3 +93,3 @@ });

return __awaiter(this, void 0, void 0, function* () {
return removeLighthouseAudit_1.default({
return (0, removeLighthouseAudit_1.default)({
parameters: Object.assign(Object.assign({}, parameters), { apiToken: this.apiToken, apiUrl: this.apiUrl }),

@@ -101,3 +101,3 @@ });

return __awaiter(this, void 0, void 0, function* () {
return removePage_1.default({
return (0, removePage_1.default)({
parameters: Object.assign(Object.assign({}, parameters), { apiToken: this.apiToken, apiUrl: this.apiUrl }),

@@ -109,3 +109,3 @@ });

return __awaiter(this, void 0, void 0, function* () {
return updateLighthouseAudit_1.default({
return (0, updateLighthouseAudit_1.default)({
parameters: Object.assign(Object.assign({}, parameters), { apiToken: this.apiToken, apiUrl: this.apiUrl }),

@@ -118,3 +118,3 @@ payload,

return __awaiter(this, void 0, void 0, function* () {
return updatePage_1.default({
return (0, updatePage_1.default)({
parameters: Object.assign(Object.assign({}, parameters), { apiToken: this.apiToken, apiUrl: this.apiUrl }),

@@ -121,0 +121,0 @@ payload,

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

exports.default = ({ parameters: { apiToken, apiUrl = constants_1.LATEST_API_URL }, payload, }) => __awaiter(void 0, void 0, void 0, function* () {
const error = helpers_1.getMissingRequiredFieldErrors({
const error = (0, helpers_1.getMissingRequiredFieldErrors)({
fields: ['apiToken', 'dynamicTemplateData', 'templateId'],

@@ -33,3 +33,3 @@ data: {

}
const result = yield node_fetch_1.default(`${apiUrl}/alerts`, {
const result = yield (0, node_fetch_1.default)(`${apiUrl}/alerts`, {
method: 'post',

@@ -36,0 +36,0 @@ headers: {

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

beforeEach(() => {
utils_1.mocked(node_fetch_1.default).mockClear();
(0, utils_1.mocked)(node_fetch_1.default).mockClear();
});

@@ -36,4 +36,4 @@ it('requests the corresponding endpoint correctly', () => __awaiter(void 0, void 0, void 0, function* () {

};
testHelpers_1.setMockResponse(utils_1.mocked(node_fetch_1.default), mockApiResponse);
const response = yield createAlert_1.default({
(0, testHelpers_1.setMockResponse)((0, utils_1.mocked)(node_fetch_1.default), mockApiResponse);
const response = yield (0, createAlert_1.default)({
parameters: {

@@ -40,0 +40,0 @@ apiToken: '123',

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

exports.default = ({ parameters: { apiToken, apiUrl = constants_1.LATEST_API_URL }, payload, }) => __awaiter(void 0, void 0, void 0, function* () {
const error = helpers_1.getMissingRequiredFieldErrors({
const error = (0, helpers_1.getMissingRequiredFieldErrors)({
fields: ['apiToken', 'name', 'url'],

@@ -33,3 +33,3 @@ data: {

}
const result = yield node_fetch_1.default(`${apiUrl}/pages`, {
const result = yield (0, node_fetch_1.default)(`${apiUrl}/pages`, {
method: 'post',

@@ -36,0 +36,0 @@ headers: {

@@ -22,8 +22,8 @@ "use strict";

beforeEach(() => {
utils_1.mocked(node_fetch_1.default).mockClear();
(0, utils_1.mocked)(node_fetch_1.default).mockClear();
});
it('requests the corresponding endpoint correctly', () => __awaiter(void 0, void 0, void 0, function* () {
const mockApiResponse = { data: { id: '1234' } };
testHelpers_1.setMockResponse(utils_1.mocked(node_fetch_1.default), mockApiResponse);
const response = yield createPage_1.default({
(0, testHelpers_1.setMockResponse)((0, utils_1.mocked)(node_fetch_1.default), mockApiResponse);
const response = yield (0, createPage_1.default)({
parameters: {

@@ -30,0 +30,0 @@ apiToken: '123',

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

exports.default = ({ parameters: { apiToken, apiUrl = constants_1.LATEST_API_URL, id }, payload, }) => __awaiter(void 0, void 0, void 0, function* () {
const error = helpers_1.getMissingRequiredFieldErrors({
const error = (0, helpers_1.getMissingRequiredFieldErrors)({
fields: ['apiToken', 'id'],

@@ -32,3 +32,3 @@ data: {

}
const result = yield node_fetch_1.default(`${apiUrl}/pages/${id}/queueItems`, {
const result = yield (0, node_fetch_1.default)(`${apiUrl}/pages/${id}/queueItems`, {
method: 'post',

@@ -35,0 +35,0 @@ headers: {

@@ -22,8 +22,8 @@ "use strict";

beforeEach(() => {
utils_1.mocked(node_fetch_1.default).mockClear();
(0, utils_1.mocked)(node_fetch_1.default).mockClear();
});
it('requests the corresponding endpoint correctly', () => __awaiter(void 0, void 0, void 0, function* () {
const mockApiResponse = { data: { id: '1234' } };
testHelpers_1.setMockResponse(utils_1.mocked(node_fetch_1.default), mockApiResponse);
const response = yield createPageQueueItem_1.default({
(0, testHelpers_1.setMockResponse)((0, utils_1.mocked)(node_fetch_1.default), mockApiResponse);
const response = yield (0, createPageQueueItem_1.default)({
parameters: {

@@ -30,0 +30,0 @@ apiToken: '123',

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

_b = _a.parameters, { apiToken, apiUrl = constants_1.LATEST_API_URL, id } = _b, parameters = __rest(_b, ["apiToken", "apiUrl", "id"]);
const error = helpers_2.getMissingRequiredFieldErrors({
const error = (0, helpers_2.getMissingRequiredFieldErrors)({
fields: ['apiToken', 'id'],

@@ -45,3 +45,3 @@ data: {

}
const result = yield node_fetch_1.default(`${apiUrl}/pages/${id}/lighthouseAudits${helpers_1.getQueryString(parameters)}`, {
const result = yield (0, node_fetch_1.default)(`${apiUrl}/pages/${id}/lighthouseAudits${(0, helpers_1.getQueryString)(parameters)}`, {
method: 'get',

@@ -48,0 +48,0 @@ headers: {

@@ -22,8 +22,8 @@ "use strict";

beforeEach(() => {
utils_1.mocked(node_fetch_1.default).mockClear();
(0, utils_1.mocked)(node_fetch_1.default).mockClear();
});
it('requests the corresponding endpoint correctly', () => __awaiter(void 0, void 0, void 0, function* () {
const mockApiResponse = { data: [{ id: '1234' }] };
testHelpers_1.setMockResponse(utils_1.mocked(node_fetch_1.default), mockApiResponse);
const response = yield findPageLighthouseAudits_1.default({
(0, testHelpers_1.setMockResponse)((0, utils_1.mocked)(node_fetch_1.default), mockApiResponse);
const response = yield (0, findPageLighthouseAudits_1.default)({
parameters: {

@@ -45,4 +45,4 @@ apiToken: '123',

const mockApiResponse = { data: [{ id: '1234' }] };
testHelpers_1.setMockResponse(utils_1.mocked(node_fetch_1.default), mockApiResponse);
const response = yield findPageLighthouseAudits_1.default({
(0, testHelpers_1.setMockResponse)((0, utils_1.mocked)(node_fetch_1.default), mockApiResponse);
const response = yield (0, findPageLighthouseAudits_1.default)({
parameters: {

@@ -49,0 +49,0 @@ apiToken: '123',

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

exports.default = ({ parameters: { apiToken, apiUrl = constants_1.LATEST_API_URL, id }, }) => __awaiter(void 0, void 0, void 0, function* () {
const error = helpers_1.getMissingRequiredFieldErrors({
const error = (0, helpers_1.getMissingRequiredFieldErrors)({
fields: ['apiToken', 'id'],

@@ -32,3 +32,3 @@ data: {

}
const result = yield node_fetch_1.default(`${apiUrl}/pages/${id}/queueItems`, {
const result = yield (0, node_fetch_1.default)(`${apiUrl}/pages/${id}/queueItems`, {
method: 'get',

@@ -35,0 +35,0 @@ headers: {

@@ -22,8 +22,8 @@ "use strict";

beforeEach(() => {
utils_1.mocked(node_fetch_1.default).mockClear();
(0, utils_1.mocked)(node_fetch_1.default).mockClear();
});
it('requests the corresponding endpoint correctly', () => __awaiter(void 0, void 0, void 0, function* () {
const mockApiResponse = { data: [{ id: '1234' }] };
testHelpers_1.setMockResponse(utils_1.mocked(node_fetch_1.default), mockApiResponse);
const response = yield findPageQueueItems_1.default({
(0, testHelpers_1.setMockResponse)((0, utils_1.mocked)(node_fetch_1.default), mockApiResponse);
const response = yield (0, findPageQueueItems_1.default)({
parameters: {

@@ -30,0 +30,0 @@ apiToken: '123',

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

_b = _a.parameters, { apiToken, apiUrl = constants_1.LATEST_API_URL } = _b, parameters = __rest(_b, ["apiToken", "apiUrl"]);
const error = helpers_2.getMissingRequiredFieldErrors({
const error = (0, helpers_2.getMissingRequiredFieldErrors)({
fields: ['apiToken'],

@@ -44,3 +44,3 @@ data: {

}
const result = yield node_fetch_1.default(`${apiUrl}/pages${helpers_1.getQueryString(parameters)}`, {
const result = yield (0, node_fetch_1.default)(`${apiUrl}/pages${(0, helpers_1.getQueryString)(parameters)}`, {
method: 'get',

@@ -47,0 +47,0 @@ headers: {

@@ -22,8 +22,8 @@ "use strict";

beforeEach(() => {
utils_1.mocked(node_fetch_1.default).mockClear();
(0, utils_1.mocked)(node_fetch_1.default).mockClear();
});
it('requests the corresponding endpoint correctly', () => __awaiter(void 0, void 0, void 0, function* () {
const mockApiResponse = { data: [{ id: '1234' }] };
testHelpers_1.setMockResponse(utils_1.mocked(node_fetch_1.default), mockApiResponse);
const response = yield findPages_1.default({
(0, testHelpers_1.setMockResponse)((0, utils_1.mocked)(node_fetch_1.default), mockApiResponse);
const response = yield (0, findPages_1.default)({
parameters: {

@@ -44,4 +44,4 @@ apiToken: '123',

const mockApiResponse = { data: [{ id: '1234' }] };
testHelpers_1.setMockResponse(utils_1.mocked(node_fetch_1.default), mockApiResponse);
const response = yield findPages_1.default({
(0, testHelpers_1.setMockResponse)((0, utils_1.mocked)(node_fetch_1.default), mockApiResponse);
const response = yield (0, findPages_1.default)({
parameters: {

@@ -48,0 +48,0 @@ apiToken: '123',

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

const expected = '?hello=world&foo=bar';
const actual = helpers_1.getQueryString({
const actual = (0, helpers_1.getQueryString)({
hello: 'world',

@@ -28,3 +28,3 @@ foo: 'bar',

const expected = 'missing the following required fields: "ipsum", "lorem"';
const actual = helpers_1.getMissingRequiredFieldErrors({
const actual = (0, helpers_1.getMissingRequiredFieldErrors)({
data: {

@@ -31,0 +31,0 @@ hello: 'world',

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

exports.default = ({ parameters: { apiToken, apiUrl = constants_1.LATEST_API_URL, id }, }) => __awaiter(void 0, void 0, void 0, function* () {
const error = helpers_1.getMissingRequiredFieldErrors({
const error = (0, helpers_1.getMissingRequiredFieldErrors)({
fields: ['apiToken', 'id'],

@@ -32,3 +32,3 @@ data: {

}
const result = yield node_fetch_1.default(`${apiUrl}/lighthouseAudits/${id}`, {
const result = yield (0, node_fetch_1.default)(`${apiUrl}/lighthouseAudits/${id}`, {
method: 'delete',

@@ -35,0 +35,0 @@ headers: {

@@ -22,8 +22,8 @@ "use strict";

beforeEach(() => {
utils_1.mocked(node_fetch_1.default).mockClear();
(0, utils_1.mocked)(node_fetch_1.default).mockClear();
});
it('requests the corresponding endpoint correctly', () => __awaiter(void 0, void 0, void 0, function* () {
const mockApiResponse = { data: { id: '1234' } };
testHelpers_1.setMockResponse(utils_1.mocked(node_fetch_1.default), mockApiResponse);
const response = yield removeLighthouseAudit_1.default({
(0, testHelpers_1.setMockResponse)((0, utils_1.mocked)(node_fetch_1.default), mockApiResponse);
const response = yield (0, removeLighthouseAudit_1.default)({
parameters: {

@@ -30,0 +30,0 @@ apiToken: '123',

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

exports.default = ({ parameters: { apiToken, apiUrl = constants_1.LATEST_API_URL, id }, }) => __awaiter(void 0, void 0, void 0, function* () {
const error = helpers_1.getMissingRequiredFieldErrors({
const error = (0, helpers_1.getMissingRequiredFieldErrors)({
fields: ['apiToken', 'id'],

@@ -32,3 +32,3 @@ data: {

}
const result = yield node_fetch_1.default(`${apiUrl}/pages/${id}`, {
const result = yield (0, node_fetch_1.default)(`${apiUrl}/pages/${id}`, {
method: 'delete',

@@ -35,0 +35,0 @@ headers: {

@@ -22,8 +22,8 @@ "use strict";

beforeEach(() => {
utils_1.mocked(node_fetch_1.default).mockClear();
(0, utils_1.mocked)(node_fetch_1.default).mockClear();
});
it('requests the corresponding endpoint correctly', () => __awaiter(void 0, void 0, void 0, function* () {
const mockApiResponse = { data: { id: '1234' } };
testHelpers_1.setMockResponse(utils_1.mocked(node_fetch_1.default), mockApiResponse);
const response = yield removePage_1.default({
(0, testHelpers_1.setMockResponse)((0, utils_1.mocked)(node_fetch_1.default), mockApiResponse);
const response = yield (0, removePage_1.default)({
parameters: {

@@ -30,0 +30,0 @@ apiToken: '123',

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

exports.default = ({ parameters: { apiToken, apiUrl = constants_1.LATEST_API_URL, id }, payload, }) => __awaiter(void 0, void 0, void 0, function* () {
const error = helpers_1.getMissingRequiredFieldErrors({
const error = (0, helpers_1.getMissingRequiredFieldErrors)({
fields: ['apiToken', 'id'],

@@ -32,3 +32,3 @@ data: {

}
const result = yield node_fetch_1.default(`${apiUrl}/lighthouseAudits/${id}`, {
const result = yield (0, node_fetch_1.default)(`${apiUrl}/lighthouseAudits/${id}`, {
method: 'put',

@@ -35,0 +35,0 @@ headers: {

@@ -22,8 +22,8 @@ "use strict";

beforeEach(() => {
utils_1.mocked(node_fetch_1.default).mockClear();
(0, utils_1.mocked)(node_fetch_1.default).mockClear();
});
it('requests the corresponding endpoint correctly', () => __awaiter(void 0, void 0, void 0, function* () {
const mockApiResponse = { data: { id: '1234' } };
testHelpers_1.setMockResponse(utils_1.mocked(node_fetch_1.default), mockApiResponse);
const response = yield updateLighthouseAudit_1.default({
(0, testHelpers_1.setMockResponse)((0, utils_1.mocked)(node_fetch_1.default), mockApiResponse);
const response = yield (0, updateLighthouseAudit_1.default)({
parameters: {

@@ -30,0 +30,0 @@ apiToken: '123',

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

exports.default = ({ parameters: { apiToken, apiUrl = constants_1.LATEST_API_URL, id }, payload, }) => __awaiter(void 0, void 0, void 0, function* () {
const error = helpers_1.getMissingRequiredFieldErrors({
const error = (0, helpers_1.getMissingRequiredFieldErrors)({
fields: ['apiToken', 'id'],

@@ -32,3 +32,3 @@ data: {

}
const result = yield node_fetch_1.default(`${apiUrl}/pages/${id}`, {
const result = yield (0, node_fetch_1.default)(`${apiUrl}/pages/${id}`, {
method: 'put',

@@ -35,0 +35,0 @@ headers: {

@@ -22,8 +22,8 @@ "use strict";

beforeEach(() => {
utils_1.mocked(node_fetch_1.default).mockClear();
(0, utils_1.mocked)(node_fetch_1.default).mockClear();
});
it('requests the corresponding endpoint correctly', () => __awaiter(void 0, void 0, void 0, function* () {
const mockApiResponse = { data: { id: '1234' } };
testHelpers_1.setMockResponse(utils_1.mocked(node_fetch_1.default), mockApiResponse);
const response = yield updatePage_1.default({
(0, testHelpers_1.setMockResponse)((0, utils_1.mocked)(node_fetch_1.default), mockApiResponse);
const response = yield (0, updatePage_1.default)({
parameters: {

@@ -30,0 +30,0 @@ apiToken: '123',

{
"name": "@foo-software/foo-api-client",
"version": "0.0.43",
"version": "0.0.44",
"author": "Adam Henson <adamhenson1979@gmail.com> (https://github.com/adamhenson)",

@@ -39,3 +39,3 @@ "description": "An API client to communicate with Foo's REST API endpoints. Foo provides website quality monitoring with tools such as Lighthouse.",

},
"gitHead": "b5088f6e77822b89084268ac6186706fe9a0489b"
"gitHead": "f8b5ac362c970f04cee65ad76657301c764db25c"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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