Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@simpleview/dam-client
Advanced tools
DAM (Digital Asset Management) client for accessing DAM resources.
npm install @simpleview/dam-client
The DAM supports the upload of private assets. As long as an asset is marked as private, it will not appear in any query unless the correct id of the asset is supplied in the query filter.
DamPrefix
can be loaded into sv-graphql-client
GraphServer
to use as a client library for managing assets. The DAM client requires authentication.
const { GraphServer } = require("@simpleview/sv-graphql-client");
const { AuthPrefix } = require("@simpleview/sv-auth-client");
const { DamPrefix } = require('@simpleview/dam-client');
const prefixes = [AuthPrefix, DamPrefix];
const server = new GraphServer({ graphUrl, prefixes });
Queries for assets allowing sorting and filtering operations.
const supaSecretAsset = await server.dam.assets({
{ filter : { id : '000000000000000000000001'} },
{ `docs { asset_url }` },
{ token, acct_id }
});
const assetsPage2 = await server.dam.assets({
{ filter : { }, options : { limit : 5, skip : 5, sort : { field : 'file_name' dir : 'asc' } } },
{ `docs { asset_url }` },
{ token, acct_id }
});
Allows for creating new assets and updating existing assets.
const upsertResult = await server.dam.assets_upsert({
{ fileObject },
{ `success id` },
{ token, acct_id }
});
Allows for the soft delete of assets from the DAM.
const upsertResult = await server.dam.assets_remove({
{ id : '000000000000000000000001' },
{ `success message` },
{ token, acct_id }
});
Converts a browser's File into a DAM FileObject.
const file = document.body.querySelector('[data-file-picker]').files[0];
const damFileObject = await server.dam.convertFileToFileObject({ file });
This section is provided to provide additional information about the GraphQL endpoints. To see the input parameters and output of each endpoint, please view the Schema in the GraphQL Explorer at https://graphql.simpleviewinc.com/.
All GraphQL endpoints for the DAM require an auth bearer token and an account id
Returns an object containing an array of assets and a count of the assets found. Supports a filter for selecting specific assets and options for limiting the return.
{
dam(acct_id: "1") {
assets{
count
docs {
id
asset_url
}
}
}
}
Requires a filter object and performs a soft delete on a matching assets in the system. Returns an object containing a success boolean and a message relating to the removal.
mutation {
dam(acct_id: "1") {
assets_remove(
filter : {
id : "000000000000000000000001"
}
){
success
message
}
}
}
Requires an dam_assets_upsert object and either inserts or updates an asset based on whether or not an existing id is provided.
mutation {
dam(acct_id: "1") {
assets_upsert(
input : {
id : "000000000000000000000001",
file_name : "cutePuppyInPuddle.jpg",
file_type : "image",
cdn_id : "dam/clients/dam/kbrid7wjepu7ljc8n3sa"
}
){
success
message
doc {
id
acct_id
asset_url
file_name
}
}
}
}
dam-kube
sudo npm run publish SEMVER
FAQs
Client for communicating with dam-kube
We found that @simpleview/dam-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.