@cloudinary/asset-management-mcp 0.7.0 → 0.8.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.
- package/README.md +46 -2
- package/bin/mcp-server.js +6852 -5586
- package/bin/mcp-server.js.map +30 -25
- package/esm/funcs/foldersAssignFolderRoles.d.ts +19 -0
- package/esm/funcs/foldersAssignFolderRoles.d.ts.map +1 -0
- package/esm/funcs/foldersAssignFolderRoles.js +101 -0
- package/esm/funcs/foldersAssignFolderRoles.js.map +1 -0
- package/esm/funcs/foldersGetFolderRoles.d.ts +15 -0
- package/esm/funcs/foldersGetFolderRoles.d.ts.map +1 -0
- package/esm/funcs/foldersGetFolderRoles.js +99 -0
- package/esm/funcs/foldersGetFolderRoles.js.map +1 -0
- package/esm/funcs/peopleGetPerson.d.ts +16 -0
- package/esm/funcs/peopleGetPerson.d.ts.map +1 -0
- package/esm/funcs/peopleGetPerson.js +95 -0
- package/esm/funcs/peopleGetPerson.js.map +1 -0
- package/esm/funcs/peopleListPeople.d.ts +19 -0
- package/esm/funcs/peopleListPeople.d.ts.map +1 -0
- package/esm/funcs/peopleListPeople.js +107 -0
- package/esm/funcs/peopleListPeople.js.map +1 -0
- package/esm/funcs/peopleUpdatePerson.d.ts +18 -0
- package/esm/funcs/peopleUpdatePerson.d.ts.map +1 -0
- package/esm/funcs/peopleUpdatePerson.js +98 -0
- package/esm/funcs/peopleUpdatePerson.js.map +1 -0
- package/esm/funcs/videoAnalyticsGetVideoViews.d.ts +2 -2
- package/esm/funcs/videoAnalyticsGetVideoViews.d.ts.map +1 -1
- package/esm/funcs/videoAnalyticsGetVideoViews.js.map +1 -1
- package/esm/landing-page.js +1 -1
- package/esm/lib/config.d.ts +4 -4
- package/esm/lib/config.js +4 -4
- package/esm/lib/security.d.ts.map +1 -1
- package/esm/lib/security.js.map +1 -1
- package/esm/mcp-server/cli/serve/command.d.ts +2 -0
- package/esm/mcp-server/cli/serve/command.d.ts.map +1 -0
- package/esm/mcp-server/cli/serve/command.js +140 -0
- package/esm/mcp-server/cli/serve/command.js.map +1 -0
- package/esm/mcp-server/cli/serve/impl.d.ts +12 -0
- package/esm/mcp-server/cli/serve/impl.d.ts.map +1 -0
- package/esm/mcp-server/cli/serve/impl.js +85 -0
- package/esm/mcp-server/cli/serve/impl.js.map +1 -0
- package/esm/mcp-server/mcp-server.d.ts.map +1 -1
- package/esm/mcp-server/mcp-server.js +3 -1
- package/esm/mcp-server/mcp-server.js.map +1 -1
- package/esm/mcp-server/server.js +1 -1
- package/esm/mcp-server/tools.d.ts +4 -0
- package/esm/mcp-server/tools.d.ts.map +1 -1
- package/esm/mcp-server/tools.js +40 -0
- package/esm/mcp-server/tools.js.map +1 -1
- package/esm/models/assignfolderrolesop.d.ts +16 -0
- package/esm/models/assignfolderrolesop.d.ts.map +1 -0
- package/esm/models/assignfolderrolesop.js +20 -0
- package/esm/models/assignfolderrolesop.js.map +1 -0
- package/esm/models/assignfolderrolesrequest.d.ts +33 -0
- package/esm/models/assignfolderrolesrequest.d.ts.map +1 -0
- package/esm/models/assignfolderrolesrequest.js +26 -0
- package/esm/models/assignfolderrolesrequest.js.map +1 -0
- package/esm/models/destroyassetop.d.ts +5 -3
- package/esm/models/destroyassetop.d.ts.map +1 -1
- package/esm/models/destroyassetop.js +5 -3
- package/esm/models/destroyassetop.js.map +1 -1
- package/esm/models/explicitassetop.d.ts +1 -67
- package/esm/models/explicitassetop.d.ts.map +1 -1
- package/esm/models/explicitassetop.js +1 -44
- package/esm/models/explicitassetop.js.map +1 -1
- package/esm/models/folderrole.d.ts +9 -0
- package/esm/models/folderrole.d.ts.map +1 -0
- package/esm/models/folderrole.js +11 -0
- package/esm/models/folderrole.js.map +1 -0
- package/esm/models/folderroleassignment.d.ts +11 -0
- package/esm/models/folderroleassignment.d.ts.map +1 -0
- package/esm/models/folderroleassignment.js +14 -0
- package/esm/models/folderroleassignment.js.map +1 -0
- package/esm/models/folderrolesresponse.d.ts +9 -0
- package/esm/models/folderrolesresponse.d.ts.map +1 -0
- package/esm/models/folderrolesresponse.js +12 -0
- package/esm/models/folderrolesresponse.js.map +1 -0
- package/esm/models/getfolderrolesop.d.ts +15 -0
- package/esm/models/getfolderrolesop.d.ts.map +1 -0
- package/esm/models/getfolderrolesop.js +18 -0
- package/esm/models/getfolderrolesop.js.map +1 -0
- package/esm/models/getpersonop.d.ts +21 -0
- package/esm/models/getpersonop.d.ts.map +1 -0
- package/esm/models/getpersonop.js +21 -0
- package/esm/models/getpersonop.js.map +1 -0
- package/esm/models/getvideoviewsop.d.ts +4 -4
- package/esm/models/getvideoviewsop.d.ts.map +1 -1
- package/esm/models/getvideoviewsop.js +3 -3
- package/esm/models/getvideoviewsop.js.map +1 -1
- package/esm/models/info.d.ts +25 -12
- package/esm/models/info.d.ts.map +1 -1
- package/esm/models/info.js +26 -8
- package/esm/models/info.js.map +1 -1
- package/esm/models/listpeopleop.d.ts +69 -0
- package/esm/models/listpeopleop.d.ts.map +1 -0
- package/esm/models/listpeopleop.js +60 -0
- package/esm/models/listpeopleop.js.map +1 -0
- package/esm/models/listresourcesbymoderationkindandstatusop.d.ts +1 -1
- package/esm/models/parametersdirection.d.ts +18 -0
- package/esm/models/parametersdirection.d.ts.map +1 -0
- package/esm/models/parametersdirection.js +16 -0
- package/esm/models/parametersdirection.js.map +1 -0
- package/esm/models/permittedrole.d.ts +8 -0
- package/esm/models/permittedrole.d.ts.map +1 -0
- package/esm/models/permittedrole.js +10 -0
- package/esm/models/permittedrole.js.map +1 -0
- package/esm/models/persondetails.d.ts +16 -0
- package/esm/models/persondetails.d.ts.map +1 -0
- package/esm/models/persondetails.js +15 -0
- package/esm/models/persondetails.js.map +1 -0
- package/esm/models/personstatus.d.ts +18 -0
- package/esm/models/personstatus.d.ts.map +1 -0
- package/esm/models/personstatus.js +16 -0
- package/esm/models/personstatus.js.map +1 -0
- package/esm/models/principaltype.d.ts +20 -0
- package/esm/models/principaltype.d.ts.map +1 -0
- package/esm/models/principaltype.js +18 -0
- package/esm/models/principaltype.js.map +1 -0
- package/esm/models/resourceupdaterequest.d.ts +4 -68
- package/esm/models/resourceupdaterequest.d.ts.map +1 -1
- package/esm/models/resourceupdaterequest.js +4 -53
- package/esm/models/resourceupdaterequest.js.map +1 -1
- package/esm/models/searchparameters.d.ts +1 -1
- package/esm/models/searchresponse.d.ts +4 -0
- package/esm/models/searchresponse.d.ts.map +1 -1
- package/esm/models/searchresponse.js +4 -0
- package/esm/models/searchresponse.js.map +1 -1
- package/esm/models/successresponse.d.ts +6 -0
- package/esm/models/successresponse.d.ts.map +1 -0
- package/esm/models/successresponse.js +8 -0
- package/esm/models/successresponse.js.map +1 -0
- package/esm/models/textop.d.ts +15 -15
- package/esm/models/textop.d.ts.map +1 -1
- package/esm/models/textop.js +15 -15
- package/esm/models/textop.js.map +1 -1
- package/esm/models/thumbnail.d.ts +15 -0
- package/esm/models/thumbnail.d.ts.map +1 -0
- package/esm/models/thumbnail.js +14 -0
- package/esm/models/thumbnail.js.map +1 -0
- package/esm/models/updatepersonop.d.ts +30 -0
- package/esm/models/updatepersonop.d.ts.map +1 -0
- package/esm/models/updatepersonop.js +31 -0
- package/esm/models/updatepersonop.js.map +1 -0
- package/esm/models/uploadrequest.d.ts +4 -136
- package/esm/models/uploadrequest.d.ts.map +1 -1
- package/esm/models/uploadrequest.js +4 -96
- package/esm/models/uploadrequest.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/foldersAssignFolderRoles.ts +173 -0
- package/src/funcs/foldersGetFolderRoles.ts +170 -0
- package/src/funcs/peopleGetPerson.ts +161 -0
- package/src/funcs/peopleListPeople.ts +195 -0
- package/src/funcs/peopleUpdatePerson.ts +168 -0
- package/src/funcs/videoAnalyticsGetVideoViews.ts +3 -3
- package/src/landing-page.ts +1 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/security.ts +4 -1
- package/src/mcp-server/cli/serve/command.ts +147 -0
- package/src/mcp-server/cli/serve/impl.ts +114 -0
- package/src/mcp-server/mcp-server.ts +3 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools.ts +89 -0
- package/src/models/assignfolderrolesop.ts +46 -0
- package/src/models/assignfolderrolesrequest.ts +52 -0
- package/src/models/destroyassetop.ts +7 -5
- package/src/models/explicitassetop.ts +2 -74
- package/src/models/folderrole.ts +19 -0
- package/src/models/folderroleassignment.ts +22 -0
- package/src/models/folderrolesresponse.ts +21 -0
- package/src/models/getfolderrolesop.ts +43 -0
- package/src/models/getpersonop.ts +43 -0
- package/src/models/getvideoviewsop.ts +5 -5
- package/src/models/info.ts +53 -17
- package/src/models/listpeopleop.ts +114 -0
- package/src/models/parametersdirection.ts +23 -0
- package/src/models/permittedrole.ts +13 -0
- package/src/models/persondetails.ts +28 -0
- package/src/models/personstatus.ts +23 -0
- package/src/models/principaltype.ts +25 -0
- package/src/models/resourceupdaterequest.ts +8 -87
- package/src/models/searchresponse.ts +4 -0
- package/src/models/successresponse.ts +11 -0
- package/src/models/textop.ts +30 -30
- package/src/models/thumbnail.ts +28 -0
- package/src/models/updatepersonop.ts +66 -0
- package/src/models/uploadrequest.ts +8 -162
- package/_speakeasy/.github/action-inputs-config.json +0 -53
- package/_speakeasy/.github/action-security-config.json +0 -88
- package/manifest.json +0 -169
- package/tsconfig.json +0 -35
|
@@ -10,71 +10,6 @@ export type AutoTranscription = {
|
|
|
10
10
|
export declare const AutoTranscription$zodSchema: z.ZodType<AutoTranscription>;
|
|
11
11
|
export type AutoTranscriptionUnion = boolean | AutoTranscription;
|
|
12
12
|
export declare const AutoTranscriptionUnion$zodSchema: z.ZodType<AutoTranscriptionUnion>;
|
|
13
|
-
/**
|
|
14
|
-
* For all asset types, set to:
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
* - manual to add the uploaded asset to a list of pending assets that can be moderated using the Admin API or the Cloudinary Console.
|
|
18
|
-
* - perception_point to automatically moderate the uploaded asset using the Perception Point Malware Detection add-on.
|
|
19
|
-
*
|
|
20
|
-
* For images only, set to:
|
|
21
|
-
* - webpurify to automatically moderate the uploaded image using the WebPurify Image Moderation add-on.
|
|
22
|
-
* - aws_rek to automatically moderate the uploaded image using the Amazon Rekognition AI Moderation add-on.
|
|
23
|
-
* - duplicate:<threshold> to detect if the same or a similar image already exists using the Cloudinary Duplicate Image Detection add-on. Set threshold to a float greater than 0 and less than or equal to 1.0 to specify how similar an image needs to be in order to be considered a duplicate. Set threshold to 0 to add an image to the index of images that are searched when duplicate detection is invoked for another image.
|
|
24
|
-
*
|
|
25
|
-
* For videos only, set to:
|
|
26
|
-
* - aws_rek_video to automatically moderate the uploaded video using the Amazon Rekognition Video Moderation add-on.
|
|
27
|
-
* - google_video_moderation automatically moderate the uploaded video using the Google AI Video Moderation add-on.
|
|
28
|
-
*
|
|
29
|
-
* To request multiple moderations in a single API call:
|
|
30
|
-
* - Send the desired list of moderations as a pipe-separated string with manual moderation, if relevant, being last.
|
|
31
|
-
*
|
|
32
|
-
* Note: Rejected assets are automatically invalidated on the CDN within approximately ten minutes.
|
|
33
|
-
*/
|
|
34
|
-
export declare const UploadRequestModeration: {
|
|
35
|
-
readonly Manual: "manual";
|
|
36
|
-
readonly Webpurify: "webpurify";
|
|
37
|
-
readonly Metascan: "metascan";
|
|
38
|
-
readonly AwsRek: "aws_rek";
|
|
39
|
-
readonly AwsRekVideo: "aws_rek_video";
|
|
40
|
-
readonly GoogleVideoModeration: "google_video_moderation";
|
|
41
|
-
readonly PerceptionPoint: "perception_point";
|
|
42
|
-
readonly Duplicate: "duplicate";
|
|
43
|
-
readonly Cld: "cld";
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* For all asset types, set to:
|
|
47
|
-
*
|
|
48
|
-
* @remarks
|
|
49
|
-
* - manual to add the uploaded asset to a list of pending assets that can be moderated using the Admin API or the Cloudinary Console.
|
|
50
|
-
* - perception_point to automatically moderate the uploaded asset using the Perception Point Malware Detection add-on.
|
|
51
|
-
*
|
|
52
|
-
* For images only, set to:
|
|
53
|
-
* - webpurify to automatically moderate the uploaded image using the WebPurify Image Moderation add-on.
|
|
54
|
-
* - aws_rek to automatically moderate the uploaded image using the Amazon Rekognition AI Moderation add-on.
|
|
55
|
-
* - duplicate:<threshold> to detect if the same or a similar image already exists using the Cloudinary Duplicate Image Detection add-on. Set threshold to a float greater than 0 and less than or equal to 1.0 to specify how similar an image needs to be in order to be considered a duplicate. Set threshold to 0 to add an image to the index of images that are searched when duplicate detection is invoked for another image.
|
|
56
|
-
*
|
|
57
|
-
* For videos only, set to:
|
|
58
|
-
* - aws_rek_video to automatically moderate the uploaded video using the Amazon Rekognition Video Moderation add-on.
|
|
59
|
-
* - google_video_moderation automatically moderate the uploaded video using the Google AI Video Moderation add-on.
|
|
60
|
-
*
|
|
61
|
-
* To request multiple moderations in a single API call:
|
|
62
|
-
* - Send the desired list of moderations as a pipe-separated string with manual moderation, if relevant, being last.
|
|
63
|
-
*
|
|
64
|
-
* Note: Rejected assets are automatically invalidated on the CDN within approximately ten minutes.
|
|
65
|
-
*/
|
|
66
|
-
export type UploadRequestModeration = ClosedEnum<typeof UploadRequestModeration>;
|
|
67
|
-
export declare const UploadRequestModeration$zodSchema: z.ZodEnum<{
|
|
68
|
-
manual: "manual";
|
|
69
|
-
webpurify: "webpurify";
|
|
70
|
-
metascan: "metascan";
|
|
71
|
-
aws_rek: "aws_rek";
|
|
72
|
-
aws_rek_video: "aws_rek_video";
|
|
73
|
-
google_video_moderation: "google_video_moderation";
|
|
74
|
-
perception_point: "perception_point";
|
|
75
|
-
duplicate: "duplicate";
|
|
76
|
-
cld: "cld";
|
|
77
|
-
}>;
|
|
78
13
|
export type ResponsiveBreakpoint = {
|
|
79
14
|
create_derived?: boolean | undefined;
|
|
80
15
|
max_width?: number | undefined;
|
|
@@ -126,73 +61,6 @@ export declare const UploadRequestAccessMode$zodSchema: z.ZodEnum<{
|
|
|
126
61
|
authenticated: "authenticated";
|
|
127
62
|
public: "public";
|
|
128
63
|
}>;
|
|
129
|
-
/**
|
|
130
|
-
* A comma-separated list of the categorization add-ons to run on the asset. Set to google_tagging, google_video_tagging, imagga_tagging and/or aws_rek_tagging to automatically classify the scenes of the uploaded asset.
|
|
131
|
-
*/
|
|
132
|
-
export declare const UploadRequestCategorization: {
|
|
133
|
-
readonly RekognitionScene: "rekognition_scene";
|
|
134
|
-
readonly ImaggaTagging: "imagga_tagging";
|
|
135
|
-
readonly AwsRekTagging: "aws_rek_tagging";
|
|
136
|
-
readonly GoogleVideoTagging: "google_video_tagging";
|
|
137
|
-
readonly GoogleTagging: "google_tagging";
|
|
138
|
-
readonly VisenzeRecognition: "visenze_recognition";
|
|
139
|
-
readonly AzureVideoIndexer: "azure_video_indexer";
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* A comma-separated list of the categorization add-ons to run on the asset. Set to google_tagging, google_video_tagging, imagga_tagging and/or aws_rek_tagging to automatically classify the scenes of the uploaded asset.
|
|
143
|
-
*/
|
|
144
|
-
export type UploadRequestCategorization = ClosedEnum<typeof UploadRequestCategorization>;
|
|
145
|
-
export declare const UploadRequestCategorization$zodSchema: z.ZodEnum<{
|
|
146
|
-
google_tagging: "google_tagging";
|
|
147
|
-
google_video_tagging: "google_video_tagging";
|
|
148
|
-
imagga_tagging: "imagga_tagging";
|
|
149
|
-
aws_rek_tagging: "aws_rek_tagging";
|
|
150
|
-
rekognition_scene: "rekognition_scene";
|
|
151
|
-
visenze_recognition: "visenze_recognition";
|
|
152
|
-
azure_video_indexer: "azure_video_indexer";
|
|
153
|
-
}>;
|
|
154
|
-
/**
|
|
155
|
-
* Set to adv_ocr to extract all text elements in an image as well as the bounding box coordinates of each detected element using the OCR text detection and extraction add-on.
|
|
156
|
-
*/
|
|
157
|
-
export declare const UploadRequestOcr: {
|
|
158
|
-
readonly AdvOcr: "adv_ocr";
|
|
159
|
-
};
|
|
160
|
-
/**
|
|
161
|
-
* Set to adv_ocr to extract all text elements in an image as well as the bounding box coordinates of each detected element using the OCR text detection and extraction add-on.
|
|
162
|
-
*/
|
|
163
|
-
export type UploadRequestOcr = ClosedEnum<typeof UploadRequestOcr>;
|
|
164
|
-
export declare const UploadRequestOcr$zodSchema: z.ZodEnum<{
|
|
165
|
-
adv_ocr: "adv_ocr";
|
|
166
|
-
}>;
|
|
167
|
-
/**
|
|
168
|
-
* Automatically remove the background of an image using an add-on.
|
|
169
|
-
*
|
|
170
|
-
* @remarks
|
|
171
|
-
* - Set to cloudinary_ai to use the deep-learning based Cloudinary AI Background Removal add-on.
|
|
172
|
-
* - Note: this feature has been superseded by background removal on the fly.
|
|
173
|
-
* - Set to pixelz to use the human-powered Pixelz Remove-The-Background Editing add-on service.
|
|
174
|
-
* Relevant for images only.
|
|
175
|
-
*/
|
|
176
|
-
export declare const UploadRequestBackgroundRemoval: {
|
|
177
|
-
readonly CloudinaryAi: "cloudinary_ai";
|
|
178
|
-
readonly RemoveTheBackground: "remove_the_background";
|
|
179
|
-
readonly Pixelz: "pixelz";
|
|
180
|
-
};
|
|
181
|
-
/**
|
|
182
|
-
* Automatically remove the background of an image using an add-on.
|
|
183
|
-
*
|
|
184
|
-
* @remarks
|
|
185
|
-
* - Set to cloudinary_ai to use the deep-learning based Cloudinary AI Background Removal add-on.
|
|
186
|
-
* - Note: this feature has been superseded by background removal on the fly.
|
|
187
|
-
* - Set to pixelz to use the human-powered Pixelz Remove-The-Background Editing add-on service.
|
|
188
|
-
* Relevant for images only.
|
|
189
|
-
*/
|
|
190
|
-
export type UploadRequestBackgroundRemoval = ClosedEnum<typeof UploadRequestBackgroundRemoval>;
|
|
191
|
-
export declare const UploadRequestBackgroundRemoval$zodSchema: z.ZodEnum<{
|
|
192
|
-
cloudinary_ai: "cloudinary_ai";
|
|
193
|
-
pixelz: "pixelz";
|
|
194
|
-
remove_the_background: "remove_the_background";
|
|
195
|
-
}>;
|
|
196
64
|
export type UploadRequest = {
|
|
197
65
|
api_key?: string | undefined;
|
|
198
66
|
timestamp?: number | undefined;
|
|
@@ -216,7 +84,7 @@ export type UploadRequest = {
|
|
|
216
84
|
invalidate?: boolean | undefined;
|
|
217
85
|
media_metadata?: boolean | undefined;
|
|
218
86
|
metadata?: string | undefined;
|
|
219
|
-
moderation?:
|
|
87
|
+
moderation?: string | undefined;
|
|
220
88
|
notification_url?: string | undefined;
|
|
221
89
|
phash?: boolean | undefined;
|
|
222
90
|
quality_analysis?: boolean | undefined;
|
|
@@ -230,10 +98,10 @@ export type UploadRequest = {
|
|
|
230
98
|
return_delete_token?: boolean | undefined;
|
|
231
99
|
type?: UploadRequestType | undefined;
|
|
232
100
|
access_mode?: UploadRequestAccessMode | undefined;
|
|
233
|
-
categorization?:
|
|
234
|
-
ocr?:
|
|
101
|
+
categorization?: string | undefined;
|
|
102
|
+
ocr?: string | undefined;
|
|
235
103
|
raw_convert?: string | undefined;
|
|
236
|
-
background_removal?:
|
|
104
|
+
background_removal?: string | undefined;
|
|
237
105
|
public_id?: string | undefined;
|
|
238
106
|
transformation?: string | undefined;
|
|
239
107
|
format?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadrequest.d.ts","sourceRoot":"","sources":["../../src/models/uploadrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,iBAAiB,EAElB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAAE,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;CAAE,CAAC;AAE1E,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAKlE,CAAC;AAEJ,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,iBAAiB,CAAC;AAEjE,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,sBAAsB,CAItB,CAAC;AAEH
|
|
1
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AC;IACrC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,cAAc,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAC;IACtD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,oCAAoC,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3D,mBAAmB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1C,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,4BAA4B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACnD,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACnC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAkE3D,CAAC"}
|
|
@@ -11,49 +11,6 @@ export const AutoTranscriptionUnion$zodSchema = z.union([
|
|
|
11
11
|
z.boolean(),
|
|
12
12
|
z.lazy(() => AutoTranscription$zodSchema),
|
|
13
13
|
]);
|
|
14
|
-
/**
|
|
15
|
-
* For all asset types, set to:
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* - manual to add the uploaded asset to a list of pending assets that can be moderated using the Admin API or the Cloudinary Console.
|
|
19
|
-
* - perception_point to automatically moderate the uploaded asset using the Perception Point Malware Detection add-on.
|
|
20
|
-
*
|
|
21
|
-
* For images only, set to:
|
|
22
|
-
* - webpurify to automatically moderate the uploaded image using the WebPurify Image Moderation add-on.
|
|
23
|
-
* - aws_rek to automatically moderate the uploaded image using the Amazon Rekognition AI Moderation add-on.
|
|
24
|
-
* - duplicate:<threshold> to detect if the same or a similar image already exists using the Cloudinary Duplicate Image Detection add-on. Set threshold to a float greater than 0 and less than or equal to 1.0 to specify how similar an image needs to be in order to be considered a duplicate. Set threshold to 0 to add an image to the index of images that are searched when duplicate detection is invoked for another image.
|
|
25
|
-
*
|
|
26
|
-
* For videos only, set to:
|
|
27
|
-
* - aws_rek_video to automatically moderate the uploaded video using the Amazon Rekognition Video Moderation add-on.
|
|
28
|
-
* - google_video_moderation automatically moderate the uploaded video using the Google AI Video Moderation add-on.
|
|
29
|
-
*
|
|
30
|
-
* To request multiple moderations in a single API call:
|
|
31
|
-
* - Send the desired list of moderations as a pipe-separated string with manual moderation, if relevant, being last.
|
|
32
|
-
*
|
|
33
|
-
* Note: Rejected assets are automatically invalidated on the CDN within approximately ten minutes.
|
|
34
|
-
*/
|
|
35
|
-
export const UploadRequestModeration = {
|
|
36
|
-
Manual: "manual",
|
|
37
|
-
Webpurify: "webpurify",
|
|
38
|
-
Metascan: "metascan",
|
|
39
|
-
AwsRek: "aws_rek",
|
|
40
|
-
AwsRekVideo: "aws_rek_video",
|
|
41
|
-
GoogleVideoModeration: "google_video_moderation",
|
|
42
|
-
PerceptionPoint: "perception_point",
|
|
43
|
-
Duplicate: "duplicate",
|
|
44
|
-
Cld: "cld",
|
|
45
|
-
};
|
|
46
|
-
export const UploadRequestModeration$zodSchema = z.enum([
|
|
47
|
-
"manual",
|
|
48
|
-
"webpurify",
|
|
49
|
-
"metascan",
|
|
50
|
-
"aws_rek",
|
|
51
|
-
"aws_rek_video",
|
|
52
|
-
"google_video_moderation",
|
|
53
|
-
"perception_point",
|
|
54
|
-
"duplicate",
|
|
55
|
-
"cld",
|
|
56
|
-
]).describe("For all asset types, set to:\n- manual to add the uploaded asset to a list of pending assets that can be moderated using the Admin API or the Cloudinary Console.\n- perception_point to automatically moderate the uploaded asset using the Perception Point Malware Detection add-on.\n\nFor images only, set to:\n- webpurify to automatically moderate the uploaded image using the WebPurify Image Moderation add-on.\n- aws_rek to automatically moderate the uploaded image using the Amazon Rekognition AI Moderation add-on.\n- duplicate:<threshold> to detect if the same or a similar image already exists using the Cloudinary Duplicate Image Detection add-on. Set threshold to a float greater than 0 and less than or equal to 1.0 to specify how similar an image needs to be in order to be considered a duplicate. Set threshold to 0 to add an image to the index of images that are searched when duplicate detection is invoked for another image.\n\nFor videos only, set to:\n- aws_rek_video to automatically moderate the uploaded video using the Amazon Rekognition Video Moderation add-on.\n- google_video_moderation automatically moderate the uploaded video using the Google AI Video Moderation add-on.\n\nTo request multiple moderations in a single API call:\n- Send the desired list of moderations as a pipe-separated string with manual moderation, if relevant, being last.\n\nNote: Rejected assets are automatically invalidated on the CDN within approximately ten minutes.\n");
|
|
57
14
|
export const ResponsiveBreakpoint$zodSchema = z
|
|
58
15
|
.object({
|
|
59
16
|
bytes_step: z.int().optional(),
|
|
@@ -93,55 +50,6 @@ export const UploadRequestAccessMode$zodSchema = z.enum([
|
|
|
93
50
|
"public",
|
|
94
51
|
"authenticated",
|
|
95
52
|
]).describe("Allows the asset to behave as if it's of the authenticated 'type' (see above) while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs. Valid values: public, and authenticated.\n");
|
|
96
|
-
/**
|
|
97
|
-
* A comma-separated list of the categorization add-ons to run on the asset. Set to google_tagging, google_video_tagging, imagga_tagging and/or aws_rek_tagging to automatically classify the scenes of the uploaded asset.
|
|
98
|
-
*/
|
|
99
|
-
export const UploadRequestCategorization = {
|
|
100
|
-
RekognitionScene: "rekognition_scene",
|
|
101
|
-
ImaggaTagging: "imagga_tagging",
|
|
102
|
-
AwsRekTagging: "aws_rek_tagging",
|
|
103
|
-
GoogleVideoTagging: "google_video_tagging",
|
|
104
|
-
GoogleTagging: "google_tagging",
|
|
105
|
-
VisenzeRecognition: "visenze_recognition",
|
|
106
|
-
AzureVideoIndexer: "azure_video_indexer",
|
|
107
|
-
};
|
|
108
|
-
export const UploadRequestCategorization$zodSchema = z.enum([
|
|
109
|
-
"rekognition_scene",
|
|
110
|
-
"imagga_tagging",
|
|
111
|
-
"aws_rek_tagging",
|
|
112
|
-
"google_video_tagging",
|
|
113
|
-
"google_tagging",
|
|
114
|
-
"visenze_recognition",
|
|
115
|
-
"azure_video_indexer",
|
|
116
|
-
]).describe("A comma-separated list of the categorization add-ons to run on the asset. Set to google_tagging, google_video_tagging, imagga_tagging and/or aws_rek_tagging to automatically classify the scenes of the uploaded asset.");
|
|
117
|
-
/**
|
|
118
|
-
* Set to adv_ocr to extract all text elements in an image as well as the bounding box coordinates of each detected element using the OCR text detection and extraction add-on.
|
|
119
|
-
*/
|
|
120
|
-
export const UploadRequestOcr = {
|
|
121
|
-
AdvOcr: "adv_ocr",
|
|
122
|
-
};
|
|
123
|
-
export const UploadRequestOcr$zodSchema = z.enum([
|
|
124
|
-
"adv_ocr",
|
|
125
|
-
]).describe("Set to adv_ocr to extract all text elements in an image as well as the bounding box coordinates of each detected element using the OCR text detection and extraction add-on.");
|
|
126
|
-
/**
|
|
127
|
-
* Automatically remove the background of an image using an add-on.
|
|
128
|
-
*
|
|
129
|
-
* @remarks
|
|
130
|
-
* - Set to cloudinary_ai to use the deep-learning based Cloudinary AI Background Removal add-on.
|
|
131
|
-
* - Note: this feature has been superseded by background removal on the fly.
|
|
132
|
-
* - Set to pixelz to use the human-powered Pixelz Remove-The-Background Editing add-on service.
|
|
133
|
-
* Relevant for images only.
|
|
134
|
-
*/
|
|
135
|
-
export const UploadRequestBackgroundRemoval = {
|
|
136
|
-
CloudinaryAi: "cloudinary_ai",
|
|
137
|
-
RemoveTheBackground: "remove_the_background",
|
|
138
|
-
Pixelz: "pixelz",
|
|
139
|
-
};
|
|
140
|
-
export const UploadRequestBackgroundRemoval$zodSchema = z.enum([
|
|
141
|
-
"cloudinary_ai",
|
|
142
|
-
"remove_the_background",
|
|
143
|
-
"pixelz",
|
|
144
|
-
]).describe("Automatically remove the background of an image using an add-on.\n- Set to cloudinary_ai to use the deep-learning based Cloudinary AI Background Removal add-on.\n- Note: this feature has been superseded by background removal on the fly.\n- Set to pixelz to use the human-powered Pixelz Remove-The-Background Editing add-on service.\nRelevant for images only.\n");
|
|
145
53
|
export const UploadRequest$zodSchema = z.object({
|
|
146
54
|
access_control: z.array(AccessControlItem$zodSchema).optional(),
|
|
147
55
|
access_mode: UploadRequestAccessMode$zodSchema.optional(),
|
|
@@ -156,10 +64,10 @@ export const UploadRequest$zodSchema = z.object({
|
|
|
156
64
|
z.boolean(),
|
|
157
65
|
z.lazy(() => AutoTranscription$zodSchema),
|
|
158
66
|
]).optional(),
|
|
159
|
-
background_removal:
|
|
67
|
+
background_removal: z.string().optional(),
|
|
160
68
|
backup: z.boolean().optional(),
|
|
161
69
|
callback: z.string().optional(),
|
|
162
|
-
categorization:
|
|
70
|
+
categorization: z.string().optional(),
|
|
163
71
|
cinemagraph_analysis: z.boolean().optional(),
|
|
164
72
|
colors: z.boolean().default(false),
|
|
165
73
|
context: z.string().optional(),
|
|
@@ -181,9 +89,9 @@ export const UploadRequest$zodSchema = z.object({
|
|
|
181
89
|
invalidate: z.boolean().optional(),
|
|
182
90
|
media_metadata: z.boolean().optional(),
|
|
183
91
|
metadata: z.string().optional(),
|
|
184
|
-
moderation:
|
|
92
|
+
moderation: z.string().optional(),
|
|
185
93
|
notification_url: z.string().optional(),
|
|
186
|
-
ocr:
|
|
94
|
+
ocr: z.string().optional(),
|
|
187
95
|
on_success: z.string().optional(),
|
|
188
96
|
overwrite: z.boolean().optional(),
|
|
189
97
|
phash: z.boolean().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadrequest.js","sourceRoot":"","sources":["../../src/models/uploadrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OA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(https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { CloudinaryAssetMgmtCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { compactMap } from "../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import {
|
|
13
|
+
AssignFolderRolesRequestRequest,
|
|
14
|
+
AssignFolderRolesRequestRequest$zodSchema,
|
|
15
|
+
} from "../models/assignfolderrolesop.js";
|
|
16
|
+
import { AssignFolderRolesRequest } from "../models/assignfolderrolesrequest.js";
|
|
17
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
18
|
+
import {
|
|
19
|
+
ConnectionError,
|
|
20
|
+
InvalidRequestError,
|
|
21
|
+
RequestAbortedError,
|
|
22
|
+
RequestTimeoutError,
|
|
23
|
+
UnexpectedClientError,
|
|
24
|
+
} from "../models/errors/httpclienterrors.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Assign folder roles
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Assigns or removes folder roles for a principal (user, group, or API key).
|
|
34
|
+
* Supports all system folder roles (see [System roles reference](https://cloudinary.com/documentation/permissions_system_roles_policies#folder_roles)).
|
|
35
|
+
* Enterprise customers can also assign custom roles by ID.
|
|
36
|
+
* Note: Assigning roles to users or groups via this endpoint requires their user or group IDs, which are available through the Provisioning API (Enterprise only). Free customers can use this endpoint to assign roles only to API keys, but can assign folder roles to users and groups through the UI.
|
|
37
|
+
*/
|
|
38
|
+
export function foldersAssignFolderRoles(
|
|
39
|
+
client$: CloudinaryAssetMgmtCore,
|
|
40
|
+
folder_id: string,
|
|
41
|
+
assign_folder_roles_request: AssignFolderRolesRequest,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<
|
|
44
|
+
Result<
|
|
45
|
+
Response,
|
|
46
|
+
| APIError
|
|
47
|
+
| SDKValidationError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| InvalidRequestError
|
|
50
|
+
| RequestAbortedError
|
|
51
|
+
| RequestTimeoutError
|
|
52
|
+
| ConnectionError
|
|
53
|
+
>
|
|
54
|
+
> {
|
|
55
|
+
return new APIPromise($do(
|
|
56
|
+
client$,
|
|
57
|
+
folder_id,
|
|
58
|
+
assign_folder_roles_request,
|
|
59
|
+
options,
|
|
60
|
+
));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function $do(
|
|
64
|
+
client$: CloudinaryAssetMgmtCore,
|
|
65
|
+
folder_id: string,
|
|
66
|
+
assign_folder_roles_request: AssignFolderRolesRequest,
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): Promise<
|
|
69
|
+
[
|
|
70
|
+
Result<
|
|
71
|
+
Response,
|
|
72
|
+
| APIError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| InvalidRequestError
|
|
76
|
+
| RequestAbortedError
|
|
77
|
+
| RequestTimeoutError
|
|
78
|
+
| ConnectionError
|
|
79
|
+
>,
|
|
80
|
+
APICall,
|
|
81
|
+
]
|
|
82
|
+
> {
|
|
83
|
+
const input$: AssignFolderRolesRequestRequest = {
|
|
84
|
+
folder_id: folder_id,
|
|
85
|
+
assign_folder_roles_request: assign_folder_roles_request,
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const parsed$ = safeParse(
|
|
89
|
+
input$,
|
|
90
|
+
(value$) => AssignFolderRolesRequestRequest$zodSchema.parse(value$),
|
|
91
|
+
"Input validation failed",
|
|
92
|
+
);
|
|
93
|
+
if (!parsed$.ok) {
|
|
94
|
+
return [parsed$, { status: "invalid" }];
|
|
95
|
+
}
|
|
96
|
+
const payload$ = parsed$.value;
|
|
97
|
+
const body$ = encodeJSON("body", payload$.assign_folder_roles_request, {
|
|
98
|
+
explode: true,
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const pathParams$ = {
|
|
102
|
+
cloud_name: encodeSimple("cloud_name", client$._options.cloud_name, {
|
|
103
|
+
explode: false,
|
|
104
|
+
charEncoding: "percent",
|
|
105
|
+
}),
|
|
106
|
+
folder_id: encodeSimple("folder_id", payload$.folder_id, {
|
|
107
|
+
explode: false,
|
|
108
|
+
charEncoding: "percent",
|
|
109
|
+
}),
|
|
110
|
+
};
|
|
111
|
+
const path$ = pathToFunc(
|
|
112
|
+
"/v1_1/{cloud_name}/folder_operations/invite/{folder_id}",
|
|
113
|
+
)(
|
|
114
|
+
pathParams$,
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
const headers$ = new Headers(compactMap({
|
|
118
|
+
"Content-Type": "application/json",
|
|
119
|
+
Accept: "application/json",
|
|
120
|
+
}));
|
|
121
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
122
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
123
|
+
|
|
124
|
+
const context = {
|
|
125
|
+
options: client$._options,
|
|
126
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
127
|
+
operationID: "assignFolderRoles",
|
|
128
|
+
oAuth2Scopes: null,
|
|
129
|
+
resolvedSecurity: requestSecurity,
|
|
130
|
+
securitySource: client$._options.security,
|
|
131
|
+
retryConfig: options?.retries
|
|
132
|
+
|| client$._options.retryConfig
|
|
133
|
+
|| { strategy: "none" },
|
|
134
|
+
retryCodes: options?.retryCodes || [
|
|
135
|
+
"429",
|
|
136
|
+
"500",
|
|
137
|
+
"502",
|
|
138
|
+
"503",
|
|
139
|
+
"504",
|
|
140
|
+
],
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const requestRes = client$._createRequest(context, {
|
|
144
|
+
security: requestSecurity,
|
|
145
|
+
method: "POST",
|
|
146
|
+
baseURL: options?.serverURL,
|
|
147
|
+
path: path$,
|
|
148
|
+
headers: headers$,
|
|
149
|
+
body: body$,
|
|
150
|
+
userAgent: client$._options.userAgent,
|
|
151
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs
|
|
152
|
+
|| -1,
|
|
153
|
+
}, options);
|
|
154
|
+
if (!requestRes.ok) {
|
|
155
|
+
return [requestRes, { status: "invalid" }];
|
|
156
|
+
}
|
|
157
|
+
const req$ = requestRes.value;
|
|
158
|
+
|
|
159
|
+
const doResult = await client$._do(req$, {
|
|
160
|
+
context,
|
|
161
|
+
errorCodes: [],
|
|
162
|
+
retryConfig: context.retryConfig,
|
|
163
|
+
retryCodes: context.retryCodes,
|
|
164
|
+
});
|
|
165
|
+
if (!doResult.ok) {
|
|
166
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
167
|
+
}
|
|
168
|
+
return [doResult, {
|
|
169
|
+
status: "complete",
|
|
170
|
+
"request": req$,
|
|
171
|
+
response: doResult.value,
|
|
172
|
+
}];
|
|
173
|
+
}
|