New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@datocms/cma-client

Package Overview
Dependencies
Maintainers
5
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datocms/cma-client - npm Package Compare versions

Comparing version 0.1.8 to 1.0.0

7

dist/cjs/generated/resources/Site.js

@@ -56,4 +56,4 @@ "use strict";

*/
Site.prototype.find = function () {
return this.rawFind().then(function (body) {
Site.prototype.find = function (queryParams) {
return this.rawFind(queryParams).then(function (body) {
return Utils.deserializeResponseBody(body);

@@ -67,6 +67,7 @@ });

*/
Site.prototype.rawFind = function () {
Site.prototype.rawFind = function (queryParams) {
return this.client.request({
method: 'GET',
url: "/site",
queryParams: queryParams,
});

@@ -73,0 +74,0 @@ };

@@ -104,4 +104,4 @@ "use strict";

*/
User.prototype.find = function (userId) {
return this.rawFind(Utils.toId(userId)).then(function (body) {
User.prototype.find = function (userId, queryParams) {
return this.rawFind(Utils.toId(userId), queryParams).then(function (body) {
return Utils.deserializeResponseBody(body);

@@ -115,9 +115,32 @@ });

*/
User.prototype.rawFind = function (userId) {
User.prototype.rawFind = function (userId, queryParams) {
return this.client.request({
method: 'GET',
url: "/users/".concat(userId),
queryParams: queryParams,
});
};
/**
* Retrieve current signed-in user
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/user/me
*/
User.prototype.findMe = function (queryParams) {
return this.rawFindMe(queryParams).then(function (body) {
return Utils.deserializeResponseBody(body);
});
};
/**
* Retrieve current signed-in user
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/user/me
*/
User.prototype.rawFindMe = function (queryParams) {
return this.client.request({
method: 'GET',
url: "/users/me",
queryParams: queryParams,
});
};
/**
* Delete a collaborator

@@ -124,0 +147,0 @@ *

@@ -26,5 +26,5 @@ import * as SimpleSchemaTypes from './generated/SimpleSchemaTypes';

creator?: {
data: SchemaTypes.UserData | SchemaTypes.SsoUserData | SchemaTypes.AccountData | SchemaTypes.AccessTokenData;
data: SchemaTypes.UserData | SchemaTypes.SsoUserData | SchemaTypes.AccessTokenData | SchemaTypes.AccountData;
} | undefined;
} | undefined;
};

@@ -11,3 +11,3 @@ import * as SchemaTypes from '../SchemaTypes';

*/
find(): Promise<SimpleSchemaTypes.Site>;
find(queryParams?: SimpleSchemaTypes.SiteSelfHrefSchema): Promise<SimpleSchemaTypes.Site>;
/**

@@ -18,3 +18,3 @@ * Retrieve the site

*/
rawFind(): Promise<SchemaTypes.SiteSelfTargetSchema>;
rawFind(queryParams?: SchemaTypes.SiteSelfHrefSchema): Promise<SchemaTypes.SiteSelfTargetSchema>;
/**

@@ -21,0 +21,0 @@ * Update the site's settings

@@ -28,4 +28,4 @@ var __extends = (this && this.__extends) || (function () {

*/
Site.prototype.find = function () {
return this.rawFind().then(function (body) {
Site.prototype.find = function (queryParams) {
return this.rawFind(queryParams).then(function (body) {
return Utils.deserializeResponseBody(body);

@@ -39,6 +39,7 @@ });

*/
Site.prototype.rawFind = function () {
Site.prototype.rawFind = function (queryParams) {
return this.client.request({
method: 'GET',
url: "/site",
queryParams: queryParams,
});

@@ -45,0 +46,0 @@ };

@@ -35,3 +35,3 @@ import * as SchemaTypes from '../SchemaTypes';

*/
find(userId: string | SimpleSchemaTypes.UserData): Promise<SimpleSchemaTypes.User>;
find(userId: string | SimpleSchemaTypes.UserData, queryParams?: SimpleSchemaTypes.UserSelfHrefSchema): Promise<SimpleSchemaTypes.User>;
/**

@@ -42,4 +42,16 @@ * Retrieve a collaborator

*/
rawFind(userId: string): Promise<SchemaTypes.UserSelfTargetSchema>;
rawFind(userId: string, queryParams?: SchemaTypes.UserSelfHrefSchema): Promise<SchemaTypes.UserSelfTargetSchema>;
/**
* Retrieve current signed-in user
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/user/me
*/
findMe(queryParams?: SimpleSchemaTypes.UserMeHrefSchema): Promise<SimpleSchemaTypes.User | SimpleSchemaTypes.SsoUser | SimpleSchemaTypes.AccessToken | SimpleSchemaTypes.Account>;
/**
* Retrieve current signed-in user
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/user/me
*/
rawFindMe(queryParams?: SchemaTypes.UserMeHrefSchema): Promise<SchemaTypes.UserMeTargetSchema>;
/**
* Delete a collaborator

@@ -46,0 +58,0 @@ *

@@ -76,4 +76,4 @@ var __extends = (this && this.__extends) || (function () {

*/
User.prototype.find = function (userId) {
return this.rawFind(Utils.toId(userId)).then(function (body) {
User.prototype.find = function (userId, queryParams) {
return this.rawFind(Utils.toId(userId), queryParams).then(function (body) {
return Utils.deserializeResponseBody(body);

@@ -87,9 +87,32 @@ });

*/
User.prototype.rawFind = function (userId) {
User.prototype.rawFind = function (userId, queryParams) {
return this.client.request({
method: 'GET',
url: "/users/".concat(userId),
queryParams: queryParams,
});
};
/**
* Retrieve current signed-in user
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/user/me
*/
User.prototype.findMe = function (queryParams) {
return this.rawFindMe(queryParams).then(function (body) {
return Utils.deserializeResponseBody(body);
});
};
/**
* Retrieve current signed-in user
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/user/me
*/
User.prototype.rawFindMe = function (queryParams) {
return this.client.request({
method: 'GET',
url: "/users/me",
queryParams: queryParams,
});
};
/**
* Delete a collaborator

@@ -96,0 +119,0 @@ *

@@ -26,5 +26,5 @@ import * as SimpleSchemaTypes from './generated/SimpleSchemaTypes';

creator?: {
data: SchemaTypes.UserData | SchemaTypes.SsoUserData | SchemaTypes.AccountData | SchemaTypes.AccessTokenData;
data: SchemaTypes.UserData | SchemaTypes.SsoUserData | SchemaTypes.AccessTokenData | SchemaTypes.AccountData;
} | undefined;
} | undefined;
};

@@ -11,3 +11,3 @@ import * as SchemaTypes from '../SchemaTypes';

*/
find(): Promise<SimpleSchemaTypes.Site>;
find(queryParams?: SimpleSchemaTypes.SiteSelfHrefSchema): Promise<SimpleSchemaTypes.Site>;
/**

@@ -18,3 +18,3 @@ * Retrieve the site

*/
rawFind(): Promise<SchemaTypes.SiteSelfTargetSchema>;
rawFind(queryParams?: SchemaTypes.SiteSelfHrefSchema): Promise<SchemaTypes.SiteSelfTargetSchema>;
/**

@@ -21,0 +21,0 @@ * Update the site's settings

@@ -35,3 +35,3 @@ import * as SchemaTypes from '../SchemaTypes';

*/
find(userId: string | SimpleSchemaTypes.UserData): Promise<SimpleSchemaTypes.User>;
find(userId: string | SimpleSchemaTypes.UserData, queryParams?: SimpleSchemaTypes.UserSelfHrefSchema): Promise<SimpleSchemaTypes.User>;
/**

@@ -42,4 +42,16 @@ * Retrieve a collaborator

*/
rawFind(userId: string): Promise<SchemaTypes.UserSelfTargetSchema>;
rawFind(userId: string, queryParams?: SchemaTypes.UserSelfHrefSchema): Promise<SchemaTypes.UserSelfTargetSchema>;
/**
* Retrieve current signed-in user
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/user/me
*/
findMe(queryParams?: SimpleSchemaTypes.UserMeHrefSchema): Promise<SimpleSchemaTypes.User | SimpleSchemaTypes.SsoUser | SimpleSchemaTypes.AccessToken | SimpleSchemaTypes.Account>;
/**
* Retrieve current signed-in user
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/user/me
*/
rawFindMe(queryParams?: SchemaTypes.UserMeHrefSchema): Promise<SchemaTypes.UserMeTargetSchema>;
/**
* Delete a collaborator

@@ -46,0 +58,0 @@ *

{
"name": "@datocms/cma-client",
"version": "0.1.8",
"version": "1.0.0",
"description": "JS client for DatoCMS REST Content Management API",

@@ -40,8 +40,8 @@ "keywords": [

"dependencies": {
"@datocms/rest-client-utils": "^0.1.8"
"@datocms/rest-client-utils": "^1.0.0"
},
"devDependencies": {
"@datocms/dashboard-client": "^0.1.8"
"@datocms/dashboard-client": "^1.0.0"
},
"gitHead": "ffb2f67a843f695e97dd14e2ca493f9dc9c87823"
"gitHead": "7972ee65694bd9e6eb5579fa6c32aa630092ce7c"
}

@@ -61,2 +61,8 @@ [

{
"rel": "me",
"returnsCollection": false,
"name": "findMe",
"rawName": "rawFindMe"
},
{
"rel": "destroy",

@@ -63,0 +69,0 @@ "returnsCollection": false,

@@ -14,4 +14,4 @@ import * as Utils from '@datocms/rest-client-utils';

*/
find() {
return this.rawFind().then((body) =>
find(queryParams?: SimpleSchemaTypes.SiteSelfHrefSchema) {
return this.rawFind(queryParams).then((body) =>
Utils.deserializeResponseBody<SimpleSchemaTypes.SiteSelfTargetSchema>(

@@ -28,6 +28,9 @@ body,

*/
rawFind(): Promise<SchemaTypes.SiteSelfTargetSchema> {
rawFind(
queryParams?: SchemaTypes.SiteSelfHrefSchema,
): Promise<SchemaTypes.SiteSelfTargetSchema> {
return this.client.request<SchemaTypes.SiteSelfTargetSchema>({
method: 'GET',
url: `/site`,
queryParams,
});

@@ -34,0 +37,0 @@ }

@@ -79,4 +79,7 @@ import * as Utils from '@datocms/rest-client-utils';

*/
find(userId: string | SimpleSchemaTypes.UserData) {
return this.rawFind(Utils.toId(userId)).then((body) =>
find(
userId: string | SimpleSchemaTypes.UserData,
queryParams?: SimpleSchemaTypes.UserSelfHrefSchema,
) {
return this.rawFind(Utils.toId(userId), queryParams).then((body) =>
Utils.deserializeResponseBody<SimpleSchemaTypes.UserSelfTargetSchema>(

@@ -93,6 +96,10 @@ body,

*/
rawFind(userId: string): Promise<SchemaTypes.UserSelfTargetSchema> {
rawFind(
userId: string,
queryParams?: SchemaTypes.UserSelfHrefSchema,
): Promise<SchemaTypes.UserSelfTargetSchema> {
return this.client.request<SchemaTypes.UserSelfTargetSchema>({
method: 'GET',
url: `/users/${userId}`,
queryParams,
});

@@ -102,2 +109,28 @@ }

/**
* Retrieve current signed-in user
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/user/me
*/
findMe(queryParams?: SimpleSchemaTypes.UserMeHrefSchema) {
return this.rawFindMe(queryParams).then((body) =>
Utils.deserializeResponseBody<SimpleSchemaTypes.UserMeTargetSchema>(body),
);
}
/**
* Retrieve current signed-in user
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/user/me
*/
rawFindMe(
queryParams?: SchemaTypes.UserMeHrefSchema,
): Promise<SchemaTypes.UserMeTargetSchema> {
return this.client.request<SchemaTypes.UserMeTargetSchema>({
method: 'GET',
url: `/users/me`,
queryParams,
});
}
/**
* Delete a collaborator

@@ -104,0 +137,0 @@ *

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 too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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