@foxtware/mineral 0.1.27 → 0.1.28
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/.creds.yml.sample +17 -0
- package/AGENTS.md +17 -0
- package/api/fastsimon/.gitkeep +0 -0
- package/api/fastsimon/docs.md +14 -0
- package/api/fastsimon/fastsimon.constants.js +18 -0
- package/api/fastsimon/fastsimon.utils.js +246 -0
- package/api/fastsimon/fastsimonSearch.js +84 -0
- package/api/figma/docs.md +3 -3
- package/api/figma/figma.constants.js +1 -1
- package/api/figma/figma.utils.js +13 -2
- package/api/figma/figmaActivityLogsGet.js +44 -0
- package/api/figma/figmaAiUsageDailyGet.js +44 -0
- package/api/figma/figmaComponentGet.js +48 -0
- package/api/figma/figmaComponentSetGet.js +48 -0
- package/api/figma/figmaDevResourcesCreate.js +47 -0
- package/api/figma/figmaDevResourcesUpdate.js +47 -0
- package/api/figma/figmaDeveloperLogsCreate.js +47 -0
- package/api/figma/figmaDiscoveryGet.js +44 -0
- package/api/figma/figmaFileCommentCreate.js +50 -0
- package/api/figma/figmaFileCommentDelete.js +51 -0
- package/api/figma/figmaFileCommentReactionCreate.js +53 -0
- package/api/figma/figmaFileCommentReactionDelete.js +51 -0
- package/api/figma/figmaFileCommentReactionsGet.js +51 -0
- package/api/figma/figmaFileCommentsGet.js +48 -0
- package/api/figma/figmaFileComponentSetsGet.js +48 -0
- package/api/figma/figmaFileComponentsGet.js +48 -0
- package/api/figma/figmaFileDevResourceDelete.js +51 -0
- package/api/figma/figmaFileDevResourcesGet.js +48 -0
- package/api/figma/figmaFileGet.js +48 -0
- package/api/figma/figmaFileImageFillsGet.js +48 -0
- package/api/figma/figmaFileImagesGet.js +48 -0
- package/api/figma/figmaFileMetaGet.js +48 -0
- package/api/figma/figmaFileNodesGet.js +48 -0
- package/api/figma/figmaFileStylesGet.js +48 -0
- package/api/figma/figmaFileVersionsGet.js +48 -0
- package/api/figma/figmaFolderFilesGet.js +48 -0
- package/api/figma/figmaFolderFoldersGet.js +48 -0
- package/api/figma/figmaFolderMetaGet.js +48 -0
- package/api/figma/figmaGet.js +15 -63
- package/api/figma/figmaMeGet.js +53 -0
- package/api/figma/figmaOembedGet.js +44 -0
- package/api/figma/figmaPaymentsGet.js +44 -0
- package/api/figma/figmaProjectFilesGet.js +48 -0
- package/api/figma/figmaProjectMetaGet.js +48 -0
- package/api/figma/figmaStyleGet.js +48 -0
- package/api/figma/figmaTeamComponentSetsGet.js +48 -0
- package/api/figma/figmaTeamComponentsGet.js +48 -0
- package/api/figma/figmaTeamFoldersGet.js +48 -0
- package/api/figma/figmaTeamProjectsGet.js +48 -0
- package/api/figma/figmaTeamStylesGet.js +48 -0
- package/api/figma/figmaTeamWebhooksGet.js +47 -0
- package/api/figma/figmaVariablesLocalGet.js +48 -0
- package/api/figma/figmaVariablesPublishedGet.js +48 -0
- package/api/figma/figmaVariablesUpdate.js +50 -0
- package/api/figma/figmaWebhookCreate.js +47 -0
- package/api/figma/figmaWebhookDelete.js +48 -0
- package/api/figma/figmaWebhookGet.js +46 -0
- package/api/figma/figmaWebhookRequestsGet.js +47 -0
- package/api/figma/figmaWebhookUpdate.js +50 -0
- package/api/figma/figmaWebhooksGet.js +47 -0
- package/api/gorgias/gorgiasTicketCreate.js +1 -1
- package/api/gorgias/gorgiasTicketMessageCreate.js +1 -1
- package/api/gorgias/gorgiasTicketUpdate.js +1 -1
- package/api/linear/linearAttachmentCreate.js +1 -1
- package/api/linear/linearCommentCreate.js +1 -1
- package/api/linear/linearCommentUpdate.js +1 -1
- package/api/linear/linearIssueLabelCreate.js +1 -1
- package/api/linear/linearIssueUpdate.js +1 -1
- package/api/linear/linearProjectCreate.js +1 -1
- package/api/linear/linearProjectUpdate.js +1 -1
- package/api/linear/linearWebhookCreate.js +1 -1
- package/api/salesforce/salesforce.constants.js +13 -0
- package/api/salesforce/salesforce.utils.js +61 -0
- package/api/salesforce/salesforceAuthGet.js +115 -0
- package/api/salesforce/salesforceComposite.js +79 -0
- package/api/salesforce/salesforceCompositeBatch.js +73 -0
- package/api/salesforce/salesforceLimitsGet.js +55 -0
- package/api/salesforce/salesforceQuery.js +69 -0
- package/api/salesforce/salesforceQueryAll.js +62 -0
- package/api/salesforce/salesforceQueryMore.js +75 -0
- package/api/salesforce/salesforceRecentItemsGet.js +63 -0
- package/api/salesforce/salesforceResourcesGet.js +55 -0
- package/api/salesforce/salesforceSearch.js +62 -0
- package/api/salesforce/salesforceSobjectBasicInfoGet.js +81 -0
- package/api/salesforce/salesforceSobjectBlobGet.js +67 -0
- package/api/salesforce/salesforceSobjectCollectionCreate.js +78 -0
- package/api/salesforce/salesforceSobjectCollectionDelete.js +70 -0
- package/api/salesforce/salesforceSobjectCollectionGet.js +75 -0
- package/api/salesforce/salesforceSobjectCollectionUpdate.js +74 -0
- package/api/salesforce/salesforceSobjectCreate.js +66 -0
- package/api/salesforce/salesforceSobjectDelete.js +86 -0
- package/api/salesforce/salesforceSobjectDeleteByExternalId.js +91 -0
- package/api/salesforce/salesforceSobjectDeletedGet.js +71 -0
- package/api/salesforce/salesforceSobjectDescribe.js +81 -0
- package/api/salesforce/salesforceSobjectDescribeLayouts.js +64 -0
- package/api/salesforce/salesforceSobjectGet.js +93 -0
- package/api/salesforce/salesforceSobjectGetByExternalId.js +98 -0
- package/api/salesforce/salesforceSobjectTreeCreate.js +79 -0
- package/api/salesforce/salesforceSobjectUpdate.js +94 -0
- package/api/salesforce/salesforceSobjectUpdatedGet.js +71 -0
- package/api/salesforce/salesforceSobjectUpsert.js +74 -0
- package/api/salesforce/salesforceSobjectsDescribeGlobal.js +55 -0
- package/api/salesforce/salesforceVersionsGet.js +62 -0
- package/api/shopify/shopifyMetaobjectCreate.js +72 -0
- package/api/tableau/tableau.constants.js +8 -0
- package/api/tableau/tableau.utils.js +93 -0
- package/api/tableau/tableauGet.js +174 -0
- package/api/tableau/tableauUserAdd.js +16 -94
- package/api/tableau/tableauUsersGet.js +46 -134
- package/api/tagalys/docs.md +2 -2
- package/api/tagalys/tagalys.constants.js +17 -0
- package/api/tagalys/tagalys.utils.js +125 -0
- package/api/tagalys/tagalysAnalyticsEventSend.js +125 -0
- package/api/tagalys/tagalysCollectionGet.js +100 -0
- package/api/tagalys/tagalysPopularSearchesGet.js +60 -0
- package/api/tagalys/tagalysRecommendationGet.js +109 -0
- package/api/tagalys/tagalysSearch.js +15 -89
- package/api/tagalys/tagalysSearchSuggestionsGet.js +76 -0
- package/package.json +2 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/dev-resources-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['devResourcesPayload', Boolean],
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
const figmaDevResourcesUpdate = async (
|
|
13
|
+
credsPayload,
|
|
14
|
+
devResourcesPayload,
|
|
15
|
+
{
|
|
16
|
+
params,
|
|
17
|
+
fetchClient = figmaClient,
|
|
18
|
+
} = {},
|
|
19
|
+
) => {
|
|
20
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
21
|
+
credsPayload,
|
|
22
|
+
devResourcesPayload
|
|
23
|
+
});
|
|
24
|
+
if (rejectResponse) {
|
|
25
|
+
return rejectResponse;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return fetchClient.fetch({
|
|
29
|
+
requestPayload: {
|
|
30
|
+
method: 'put',
|
|
31
|
+
url: `/dev_resources`,
|
|
32
|
+
body: devResourcesPayload,
|
|
33
|
+
},
|
|
34
|
+
context: {
|
|
35
|
+
credsPayload,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const funcApiConfig = {
|
|
41
|
+
argsWarden,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
module.exports = {
|
|
45
|
+
figmaDevResourcesUpdate,
|
|
46
|
+
funcApiConfig,
|
|
47
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/developer-logs-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['developerLogsPayload', Boolean],
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
const figmaDeveloperLogsCreate = async (
|
|
13
|
+
credsPayload,
|
|
14
|
+
developerLogsPayload,
|
|
15
|
+
{
|
|
16
|
+
params,
|
|
17
|
+
fetchClient = figmaClient,
|
|
18
|
+
} = {},
|
|
19
|
+
) => {
|
|
20
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
21
|
+
credsPayload,
|
|
22
|
+
developerLogsPayload
|
|
23
|
+
});
|
|
24
|
+
if (rejectResponse) {
|
|
25
|
+
return rejectResponse;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return fetchClient.fetch({
|
|
29
|
+
requestPayload: {
|
|
30
|
+
method: 'post',
|
|
31
|
+
url: `/v1/developer_logs`,
|
|
32
|
+
body: developerLogsPayload,
|
|
33
|
+
},
|
|
34
|
+
context: {
|
|
35
|
+
credsPayload,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const funcApiConfig = {
|
|
41
|
+
argsWarden,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
module.exports = {
|
|
45
|
+
figmaDeveloperLogsCreate,
|
|
46
|
+
funcApiConfig,
|
|
47
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/discovery-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
]);
|
|
10
|
+
|
|
11
|
+
const figmaDiscoveryGet = async (
|
|
12
|
+
credsPayload,
|
|
13
|
+
{
|
|
14
|
+
params,
|
|
15
|
+
fetchClient = figmaClient,
|
|
16
|
+
} = {},
|
|
17
|
+
) => {
|
|
18
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
19
|
+
credsPayload
|
|
20
|
+
});
|
|
21
|
+
if (rejectResponse) {
|
|
22
|
+
return rejectResponse;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return fetchClient.fetch({
|
|
26
|
+
requestPayload: {
|
|
27
|
+
method: 'get',
|
|
28
|
+
url: `/v1/discovery`,
|
|
29
|
+
params,
|
|
30
|
+
},
|
|
31
|
+
context: {
|
|
32
|
+
credsPayload,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const funcApiConfig = {
|
|
38
|
+
argsWarden,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
module.exports = {
|
|
42
|
+
figmaDiscoveryGet,
|
|
43
|
+
funcApiConfig,
|
|
44
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/comments-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['fileKey'],
|
|
10
|
+
['commentPayload', Boolean],
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
const figmaFileCommentCreate = async (
|
|
14
|
+
credsPayload,
|
|
15
|
+
fileKey,
|
|
16
|
+
commentPayload,
|
|
17
|
+
{
|
|
18
|
+
params,
|
|
19
|
+
fetchClient = figmaClient,
|
|
20
|
+
} = {},
|
|
21
|
+
) => {
|
|
22
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
23
|
+
credsPayload,
|
|
24
|
+
fileKey,
|
|
25
|
+
commentPayload
|
|
26
|
+
});
|
|
27
|
+
if (rejectResponse) {
|
|
28
|
+
return rejectResponse;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return fetchClient.fetch({
|
|
32
|
+
requestPayload: {
|
|
33
|
+
method: 'post',
|
|
34
|
+
url: `/files/${ fileKey }/comments`,
|
|
35
|
+
body: commentPayload,
|
|
36
|
+
},
|
|
37
|
+
context: {
|
|
38
|
+
credsPayload,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const funcApiConfig = {
|
|
44
|
+
argsWarden,
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
module.exports = {
|
|
48
|
+
figmaFileCommentCreate,
|
|
49
|
+
funcApiConfig,
|
|
50
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/comments-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['fileKey'],
|
|
10
|
+
['commentId'],
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
const figmaFileCommentDelete = async (
|
|
14
|
+
credsPayload,
|
|
15
|
+
fileKey,
|
|
16
|
+
commentId,
|
|
17
|
+
{
|
|
18
|
+
params,
|
|
19
|
+
fetchClient = figmaClient,
|
|
20
|
+
} = {},
|
|
21
|
+
) => {
|
|
22
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
23
|
+
credsPayload,
|
|
24
|
+
fileKey,
|
|
25
|
+
commentId,
|
|
26
|
+
});
|
|
27
|
+
if (rejectResponse) {
|
|
28
|
+
return rejectResponse;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return fetchClient.fetch({
|
|
32
|
+
requestPayload: {
|
|
33
|
+
method: 'delete',
|
|
34
|
+
url: `/v1/files/${ fileKey }/comments/${ commentId }`,
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
context: {
|
|
39
|
+
credsPayload,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const funcApiConfig = {
|
|
45
|
+
argsWarden,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
module.exports = {
|
|
49
|
+
figmaFileCommentDelete,
|
|
50
|
+
funcApiConfig,
|
|
51
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/comments-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['fileKey'],
|
|
10
|
+
['commentId'],
|
|
11
|
+
['reactionPayload', Boolean],
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
const figmaFileCommentReactionCreate = async (
|
|
15
|
+
credsPayload,
|
|
16
|
+
fileKey,
|
|
17
|
+
commentId,
|
|
18
|
+
reactionPayload,
|
|
19
|
+
{
|
|
20
|
+
params,
|
|
21
|
+
fetchClient = figmaClient,
|
|
22
|
+
} = {},
|
|
23
|
+
) => {
|
|
24
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
25
|
+
credsPayload,
|
|
26
|
+
fileKey,
|
|
27
|
+
commentId,
|
|
28
|
+
reactionPayload
|
|
29
|
+
});
|
|
30
|
+
if (rejectResponse) {
|
|
31
|
+
return rejectResponse;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return fetchClient.fetch({
|
|
35
|
+
requestPayload: {
|
|
36
|
+
method: 'post',
|
|
37
|
+
url: `/files/${ fileKey }/comments/${ commentId }/reactions`,
|
|
38
|
+
body: reactionPayload,
|
|
39
|
+
},
|
|
40
|
+
context: {
|
|
41
|
+
credsPayload,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const funcApiConfig = {
|
|
47
|
+
argsWarden,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
module.exports = {
|
|
51
|
+
figmaFileCommentReactionCreate,
|
|
52
|
+
funcApiConfig,
|
|
53
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/comments-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['fileKey'],
|
|
10
|
+
['commentId'],
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
const figmaFileCommentReactionDelete = async (
|
|
14
|
+
credsPayload,
|
|
15
|
+
fileKey,
|
|
16
|
+
commentId,
|
|
17
|
+
{
|
|
18
|
+
params,
|
|
19
|
+
fetchClient = figmaClient,
|
|
20
|
+
} = {},
|
|
21
|
+
) => {
|
|
22
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
23
|
+
credsPayload,
|
|
24
|
+
fileKey,
|
|
25
|
+
commentId,
|
|
26
|
+
});
|
|
27
|
+
if (rejectResponse) {
|
|
28
|
+
return rejectResponse;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return fetchClient.fetch({
|
|
32
|
+
requestPayload: {
|
|
33
|
+
method: 'delete',
|
|
34
|
+
url: `/v1/files/${ fileKey }/comments/${ commentId }/reactions`,
|
|
35
|
+
params,
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
context: {
|
|
39
|
+
credsPayload,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const funcApiConfig = {
|
|
45
|
+
argsWarden,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
module.exports = {
|
|
49
|
+
figmaFileCommentReactionDelete,
|
|
50
|
+
funcApiConfig,
|
|
51
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/comments-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['fileKey'],
|
|
10
|
+
['commentId'],
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
const figmaFileCommentReactionsGet = async (
|
|
14
|
+
credsPayload,
|
|
15
|
+
fileKey,
|
|
16
|
+
commentId,
|
|
17
|
+
{
|
|
18
|
+
params,
|
|
19
|
+
fetchClient = figmaClient,
|
|
20
|
+
} = {},
|
|
21
|
+
) => {
|
|
22
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
23
|
+
credsPayload,
|
|
24
|
+
fileKey,
|
|
25
|
+
commentId,
|
|
26
|
+
});
|
|
27
|
+
if (rejectResponse) {
|
|
28
|
+
return rejectResponse;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return fetchClient.fetch({
|
|
32
|
+
requestPayload: {
|
|
33
|
+
method: 'get',
|
|
34
|
+
url: `/v1/files/${ fileKey }/comments/${ commentId }/reactions`,
|
|
35
|
+
params,
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
context: {
|
|
39
|
+
credsPayload,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const funcApiConfig = {
|
|
45
|
+
argsWarden,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
module.exports = {
|
|
49
|
+
figmaFileCommentReactionsGet,
|
|
50
|
+
funcApiConfig,
|
|
51
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/comments-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['fileKey'],
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
const figmaFileCommentsGet = async (
|
|
13
|
+
credsPayload,
|
|
14
|
+
fileKey,
|
|
15
|
+
{
|
|
16
|
+
params,
|
|
17
|
+
fetchClient = figmaClient,
|
|
18
|
+
} = {},
|
|
19
|
+
) => {
|
|
20
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
21
|
+
credsPayload,
|
|
22
|
+
fileKey,
|
|
23
|
+
});
|
|
24
|
+
if (rejectResponse) {
|
|
25
|
+
return rejectResponse;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return fetchClient.fetch({
|
|
29
|
+
requestPayload: {
|
|
30
|
+
method: 'get',
|
|
31
|
+
url: `/v1/files/${ fileKey }/comments`,
|
|
32
|
+
params,
|
|
33
|
+
|
|
34
|
+
},
|
|
35
|
+
context: {
|
|
36
|
+
credsPayload,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const funcApiConfig = {
|
|
42
|
+
argsWarden,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
module.exports = {
|
|
46
|
+
figmaFileCommentsGet,
|
|
47
|
+
funcApiConfig,
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/component-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['fileKey'],
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
const figmaFileComponentSetsGet = async (
|
|
13
|
+
credsPayload,
|
|
14
|
+
fileKey,
|
|
15
|
+
{
|
|
16
|
+
params,
|
|
17
|
+
fetchClient = figmaClient,
|
|
18
|
+
} = {},
|
|
19
|
+
) => {
|
|
20
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
21
|
+
credsPayload,
|
|
22
|
+
fileKey,
|
|
23
|
+
});
|
|
24
|
+
if (rejectResponse) {
|
|
25
|
+
return rejectResponse;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return fetchClient.fetch({
|
|
29
|
+
requestPayload: {
|
|
30
|
+
method: 'get',
|
|
31
|
+
url: `/v1/files/${ fileKey }/component_sets`,
|
|
32
|
+
params,
|
|
33
|
+
|
|
34
|
+
},
|
|
35
|
+
context: {
|
|
36
|
+
credsPayload,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const funcApiConfig = {
|
|
42
|
+
argsWarden,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
module.exports = {
|
|
46
|
+
figmaFileComponentSetsGet,
|
|
47
|
+
funcApiConfig,
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/component-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['fileKey'],
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
const figmaFileComponentsGet = async (
|
|
13
|
+
credsPayload,
|
|
14
|
+
fileKey,
|
|
15
|
+
{
|
|
16
|
+
params,
|
|
17
|
+
fetchClient = figmaClient,
|
|
18
|
+
} = {},
|
|
19
|
+
) => {
|
|
20
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
21
|
+
credsPayload,
|
|
22
|
+
fileKey,
|
|
23
|
+
});
|
|
24
|
+
if (rejectResponse) {
|
|
25
|
+
return rejectResponse;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return fetchClient.fetch({
|
|
29
|
+
requestPayload: {
|
|
30
|
+
method: 'get',
|
|
31
|
+
url: `/v1/files/${ fileKey }/components`,
|
|
32
|
+
params,
|
|
33
|
+
|
|
34
|
+
},
|
|
35
|
+
context: {
|
|
36
|
+
credsPayload,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const funcApiConfig = {
|
|
42
|
+
argsWarden,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
module.exports = {
|
|
46
|
+
figmaFileComponentsGet,
|
|
47
|
+
funcApiConfig,
|
|
48
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/dev-resources-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['fileKey'],
|
|
10
|
+
['devResourceId'],
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
const figmaFileDevResourceDelete = async (
|
|
14
|
+
credsPayload,
|
|
15
|
+
fileKey,
|
|
16
|
+
devResourceId,
|
|
17
|
+
{
|
|
18
|
+
params,
|
|
19
|
+
fetchClient = figmaClient,
|
|
20
|
+
} = {},
|
|
21
|
+
) => {
|
|
22
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
23
|
+
credsPayload,
|
|
24
|
+
fileKey,
|
|
25
|
+
devResourceId,
|
|
26
|
+
});
|
|
27
|
+
if (rejectResponse) {
|
|
28
|
+
return rejectResponse;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return fetchClient.fetch({
|
|
32
|
+
requestPayload: {
|
|
33
|
+
method: 'delete',
|
|
34
|
+
url: `/v1/files/${ fileKey }/dev_resources/${ devResourceId }`,
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
context: {
|
|
39
|
+
credsPayload,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const funcApiConfig = {
|
|
45
|
+
argsWarden,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
module.exports = {
|
|
49
|
+
figmaFileDevResourceDelete,
|
|
50
|
+
funcApiConfig,
|
|
51
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/dev-resources-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['fileKey'],
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
const figmaFileDevResourcesGet = async (
|
|
13
|
+
credsPayload,
|
|
14
|
+
fileKey,
|
|
15
|
+
{
|
|
16
|
+
params,
|
|
17
|
+
fetchClient = figmaClient,
|
|
18
|
+
} = {},
|
|
19
|
+
) => {
|
|
20
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
21
|
+
credsPayload,
|
|
22
|
+
fileKey,
|
|
23
|
+
});
|
|
24
|
+
if (rejectResponse) {
|
|
25
|
+
return rejectResponse;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return fetchClient.fetch({
|
|
29
|
+
requestPayload: {
|
|
30
|
+
method: 'get',
|
|
31
|
+
url: `/v1/files/${ fileKey }/dev_resources`,
|
|
32
|
+
params,
|
|
33
|
+
|
|
34
|
+
},
|
|
35
|
+
context: {
|
|
36
|
+
credsPayload,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const funcApiConfig = {
|
|
42
|
+
argsWarden,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
module.exports = {
|
|
46
|
+
figmaFileDevResourcesGet,
|
|
47
|
+
funcApiConfig,
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// https://developers.figma.com/docs/rest-api/file-endpoints/
|
|
2
|
+
|
|
3
|
+
const { ArgsWarden } = require('../utils');
|
|
4
|
+
const { credsValidator } = require('../validators');
|
|
5
|
+
const { figmaClient } = require('../figma/figma.utils');
|
|
6
|
+
|
|
7
|
+
const argsWarden = new ArgsWarden([
|
|
8
|
+
['credsPayload', credsValidator],
|
|
9
|
+
['fileKey'],
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
const figmaFileGet = async (
|
|
13
|
+
credsPayload,
|
|
14
|
+
fileKey,
|
|
15
|
+
{
|
|
16
|
+
params,
|
|
17
|
+
fetchClient = figmaClient,
|
|
18
|
+
} = {},
|
|
19
|
+
) => {
|
|
20
|
+
const rejectResponse = await argsWarden.responseIfRejectingArgs({
|
|
21
|
+
credsPayload,
|
|
22
|
+
fileKey,
|
|
23
|
+
});
|
|
24
|
+
if (rejectResponse) {
|
|
25
|
+
return rejectResponse;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return fetchClient.fetch({
|
|
29
|
+
requestPayload: {
|
|
30
|
+
method: 'get',
|
|
31
|
+
url: `/v1/files/${ fileKey }`,
|
|
32
|
+
params,
|
|
33
|
+
|
|
34
|
+
},
|
|
35
|
+
context: {
|
|
36
|
+
credsPayload,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const funcApiConfig = {
|
|
42
|
+
argsWarden,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
module.exports = {
|
|
46
|
+
figmaFileGet,
|
|
47
|
+
funcApiConfig,
|
|
48
|
+
};
|