@tool-bridge/server 0.1.0 → 0.3.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/dist/airtable-V6446SVY.js +792 -0
- package/dist/alt_text_generator_ai-HV7JZPDT.js +72 -0
- package/dist/amap-TTTVB6WS.js +755 -0
- package/dist/anthropic-JH3RA363.js +224 -0
- package/dist/apify-ETNN7ITU.js +262 -0
- package/dist/brave_search-3DDR2MMB.js +322 -0
- package/dist/chunk-CSJEZHQO.js +252 -0
- package/dist/chunk-JLTYA2B3.js +20121 -0
- package/dist/chunk-K7FVSFUX.js +333 -0
- package/dist/{chunk-6SMIQ6QU.js → chunk-KGYJEEBI.js} +2770 -21574
- package/dist/circleci-MX3TX3HC.js +409 -0
- package/dist/clerk-MRPORVF4.js +1036 -0
- package/dist/cloudflare_dns-OWP7DD7L.js +605 -0
- package/dist/cohere-GPECP66S.js +197 -0
- package/dist/confluence-BN7LZ6BC.js +436 -0
- package/dist/convertapi-SBEOFOFQ.js +161 -0
- package/dist/currencyapi-P2YY7Y7P.js +306 -0
- package/dist/deepseek-MWB3NYIN.js +205 -0
- package/dist/docker_hub-3JSCIGQ3.js +946 -0
- package/dist/dropbox-RFIBDAXO.js +1308 -0
- package/dist/dub-YVP57ELQ.js +706 -0
- package/dist/e2b-NFSUHTZR.js +305 -0
- package/dist/exa-KTDY6IV3.js +360 -0
- package/dist/fal_ai-OCUENLNQ.js +405 -0
- package/dist/feishu-5CWBQ7E5.js +225 -0
- package/dist/feishu_custom_bot-ZJR22OK6.js +240 -0
- package/dist/figma-YULGANSA.js +798 -0
- package/dist/firehydrant-2V6YSYAP.js +573 -0
- package/dist/fixer-LTCDB3CJ.js +171 -0
- package/dist/fly-IXPKMAML.js +478 -0
- package/dist/front-KRFB4M5X.js +379 -0
- package/dist/geocodio-VVURKYHQ.js +236 -0
- package/dist/ghost-6J2RIOUB.js +341 -0
- package/dist/github-5Z6KQRYH.js +5410 -0
- package/dist/gmail-KU4NZ7VA.js +1894 -0
- package/dist/googlecalendar-X44DFFXG.js +2539 -0
- package/dist/googledocs-WSGLPKSF.js +1322 -0
- package/dist/grafana-4PKSSDXY.js +817 -0
- package/dist/graphhopper-DF65ZNGK.js +336 -0
- package/dist/index.d.ts +181 -2
- package/dist/index.js +2 -1
- package/dist/ip2proxy-UCAQ5P2J.js +118 -0
- package/dist/ipgeolocation_io-UX6FCA2S.js +333 -0
- package/dist/ipqualityscore-MKTRXIZJ.js +287 -0
- package/dist/jina_ai-MRHPCSV5.js +119 -0
- package/dist/jira-EG7ZPOIW.js +627 -0
- package/dist/langsmith-FNO3RCOZ.js +597 -0
- package/dist/lemlist-SN6BJHSG.js +298 -0
- package/dist/linear-H3VU4PSD.js +2163 -0
- package/dist/logsnag-OY2JJT2H.js +167 -0
- package/dist/main.js +246 -2
- package/dist/mattermost-C5SQ7PGD.js +320 -0
- package/dist/mem0-LMLE5BFC.js +567 -0
- package/dist/memos-UWFAMBZC.js +781 -0
- package/dist/metabase-SRYDSDJ6.js +365 -0
- package/dist/mistral_ai-YNIJ7VDM.js +1195 -0
- package/dist/mother_duck-CPGOFEXE.js +322 -0
- package/dist/ngrok-CDJFBSOM.js +375 -0
- package/dist/notes-DIVFH3P3.js +109 -0
- package/dist/notion-HGDKS4HK.js +945 -0
- package/dist/open_exchange_rates-COHHYJDD.js +216 -0
- package/dist/openai-4TRT66GW.js +795 -0
- package/dist/opengraph_io-YKVW4PXI.js +377 -0
- package/dist/openrouter-6CV7B7V5.js +444 -0
- package/dist/outline-YWDUK5F7.js +604 -0
- package/dist/paddle-MEU7HWDZ.js +464 -0
- package/dist/perplexity-MRQUDBIC.js +238 -0
- package/dist/pinecone-JI7X2TAF.js +599 -0
- package/dist/pipedrive-6JQPAW23.js +453 -0
- package/dist/polar-7BF56CMC.js +400 -0
- package/dist/posthog-YPU5ADEN.js +3462 -0
- package/dist/postmark-BEU5OFKU.js +441 -0
- package/dist/prerender-UT5GOOZH.js +180 -0
- package/dist/pubmed-3SGOE24Q.js +1052 -0
- package/dist/railway-CEK4GLRQ.js +452 -0
- package/dist/readwise-DXQUQU67.js +482 -0
- package/dist/render-7TGAU5AW.js +473 -0
- package/dist/replicate-VICFSQ5A.js +347 -0
- package/dist/resend-3E76WK3O.js +100 -0
- package/dist/rootly-36GY46BY.js +345 -0
- package/dist/scrapfly-VDVUYAHX.js +289 -0
- package/dist/scrapingbee-3KTPMAVY.js +247 -0
- package/dist/screenshot_fyi-LKG62C3J.js +116 -0
- package/dist/semantic_scholar-4WREECYO.js +626 -0
- package/dist/sentry-HUQTGXOV.js +1139 -0
- package/dist/shodan-SGRKU4KS.js +303 -0
- package/dist/shopify-YCZ4L5HT.js +620 -0
- package/dist/stripe-OEBKMELB.js +583 -0
- package/dist/supabase-I3DBY7L4.js +937 -0
- package/dist/tavily-B2YHCNRD.js +349 -0
- package/dist/telegram-2VYJELZX.js +1773 -0
- package/dist/telnyx-HHXD3CXL.js +237 -0
- package/dist/todoist-PHFDEEIS.js +672 -0
- package/dist/trello-WUSAK6YN.js +1091 -0
- package/dist/turso-FW56U2B3.js +432 -0
- package/dist/twilio-M5JI7XHA.js +321 -0
- package/dist/umami-HAYODRC4.js +411 -0
- package/dist/unsplash-EDPTNEHJ.js +364 -0
- package/dist/upstash_redis-GC2CLIWD.js +299 -0
- package/dist/uptimerobot-XMSNYLIT.js +481 -0
- package/dist/v2ex-KU4ECD65.js +672 -0
- package/dist/vercel-THPCEFHW.js +1096 -0
- package/dist/wolfram_alpha_api-WHHTH4GU.js +212 -0
- package/dist/wordpress-O6TQEQNF.js +822 -0
- package/dist/workos-A3VHHWI3.js +681 -0
- package/dist/zhihu-BJAI64YJ.js +273 -0
- package/package.json +5 -4
|
@@ -0,0 +1,946 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createProviderPlugin,
|
|
3
|
+
guardedFetch,
|
|
4
|
+
requireApiKey,
|
|
5
|
+
upstreamError
|
|
6
|
+
} from "./chunk-CSJEZHQO.js";
|
|
7
|
+
import "./chunk-K7FVSFUX.js";
|
|
8
|
+
import {
|
|
9
|
+
TBError,
|
|
10
|
+
external_exports
|
|
11
|
+
} from "./chunk-JLTYA2B3.js";
|
|
12
|
+
import "./chunk-MLKGABMK.js";
|
|
13
|
+
|
|
14
|
+
// ../plugins/src/docker_hub/api.ts
|
|
15
|
+
var SERVICE = "docker_hub";
|
|
16
|
+
var API_BASE = "https://hub.docker.com";
|
|
17
|
+
var TOKEN_PATH = "/v2/auth/token";
|
|
18
|
+
var DEFAULT_IMAGE_PAGE_SIZE = 25;
|
|
19
|
+
var DEFAULT_IMAGE_MAX_PAGES = 20;
|
|
20
|
+
function record(value) {
|
|
21
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
|
|
22
|
+
}
|
|
23
|
+
function text(value) {
|
|
24
|
+
if (typeof value !== "string") return void 0;
|
|
25
|
+
const trimmed = value.trim();
|
|
26
|
+
return trimmed === "" ? void 0 : trimmed;
|
|
27
|
+
}
|
|
28
|
+
function nullableText(value) {
|
|
29
|
+
return text(value) ?? null;
|
|
30
|
+
}
|
|
31
|
+
function int(value) {
|
|
32
|
+
return typeof value === "number" && Number.isInteger(value) ? value : void 0;
|
|
33
|
+
}
|
|
34
|
+
function nullableBool(value) {
|
|
35
|
+
return typeof value === "boolean" ? value : null;
|
|
36
|
+
}
|
|
37
|
+
function objectArray(value) {
|
|
38
|
+
if (!Array.isArray(value)) return [];
|
|
39
|
+
return value.filter((item) => record(item) !== void 0);
|
|
40
|
+
}
|
|
41
|
+
function stringArray(value) {
|
|
42
|
+
if (!Array.isArray(value)) return [];
|
|
43
|
+
return value.filter((item) => typeof item === "string");
|
|
44
|
+
}
|
|
45
|
+
function compact(input) {
|
|
46
|
+
return Object.fromEntries(
|
|
47
|
+
Object.entries(input).filter(([, value]) => value !== void 0)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function responseError(message) {
|
|
51
|
+
return new TBError("unavailable", message, { retryable: true });
|
|
52
|
+
}
|
|
53
|
+
function requireRecord(value) {
|
|
54
|
+
const result = record(value);
|
|
55
|
+
if (result === void 0) throw responseError("Docker Hub \u54CD\u5E94\u4E0D\u662F\u5BF9\u8C61");
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
58
|
+
function errorMessage(payload) {
|
|
59
|
+
if (typeof payload === "string") return text(payload);
|
|
60
|
+
const body = record(payload);
|
|
61
|
+
if (body === void 0) return void 0;
|
|
62
|
+
const direct = text(body.message) ?? text(body.detail);
|
|
63
|
+
if (direct !== void 0) return direct;
|
|
64
|
+
const errinfo = record(body.errinfo);
|
|
65
|
+
if (errinfo === void 0) return void 0;
|
|
66
|
+
for (const value of Object.values(errinfo)) {
|
|
67
|
+
const item = text(value) ?? (Array.isArray(value) ? stringArray(value).map(text).find(Boolean) : void 0);
|
|
68
|
+
if (item !== void 0) return item;
|
|
69
|
+
}
|
|
70
|
+
return void 0;
|
|
71
|
+
}
|
|
72
|
+
async function readPayload(response) {
|
|
73
|
+
const raw = await response.text();
|
|
74
|
+
if (raw === "") return null;
|
|
75
|
+
try {
|
|
76
|
+
return JSON.parse(raw);
|
|
77
|
+
} catch {
|
|
78
|
+
return { message: raw };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function buildUrl(path2, query) {
|
|
82
|
+
const url = new URL(path2, API_BASE);
|
|
83
|
+
for (const [key, value] of Object.entries(query ?? {})) {
|
|
84
|
+
if (value === void 0) continue;
|
|
85
|
+
url.searchParams.set(key, String(value));
|
|
86
|
+
}
|
|
87
|
+
return url.toString();
|
|
88
|
+
}
|
|
89
|
+
function credential(ctx) {
|
|
90
|
+
const raw = requireApiKey(ctx, SERVICE).trim();
|
|
91
|
+
const separator = raw.indexOf(":");
|
|
92
|
+
const identifier = separator <= 0 ? "" : raw.slice(0, separator).trim();
|
|
93
|
+
const secret = separator < 0 ? "" : raw.slice(separator + 1).trim();
|
|
94
|
+
if (identifier === "" || secret === "") {
|
|
95
|
+
throw new TBError(
|
|
96
|
+
"invalid_argument",
|
|
97
|
+
`${SERVICE} \u7684\u51ED\u8BC1\u8981\u5199\u6210 identifier:secret(Docker \u7528\u6237\u540D\u6216\u7EC4\u7EC7\u540D + \u8BBF\u95EE\u4EE4\u724C)`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
return { identifier, secret };
|
|
101
|
+
}
|
|
102
|
+
async function accessToken(ctx) {
|
|
103
|
+
const response = await guardedFetch(buildUrl(TOKEN_PATH), {
|
|
104
|
+
method: "POST",
|
|
105
|
+
headers: { "accept": "application/json", "content-type": "application/json" },
|
|
106
|
+
body: JSON.stringify(credential(ctx))
|
|
107
|
+
});
|
|
108
|
+
const payload = await readPayload(response);
|
|
109
|
+
if (!response.ok) {
|
|
110
|
+
throw upstreamError(response.status, errorMessage(payload) ?? `Docker Hub \u6362\u53D6\u4EE4\u724C\u5931\u8D25(HTTP ${response.status})`);
|
|
111
|
+
}
|
|
112
|
+
const token = text(requireRecord(payload).access_token);
|
|
113
|
+
if (token === void 0) throw responseError("Docker Hub \u6362\u53D6\u4EE4\u724C\u7684\u54CD\u5E94\u91CC\u6CA1\u6709 access_token");
|
|
114
|
+
return token;
|
|
115
|
+
}
|
|
116
|
+
async function send(ctx, input) {
|
|
117
|
+
const response = await guardedFetch(buildUrl(input.path, input.query), {
|
|
118
|
+
method: input.method ?? "GET",
|
|
119
|
+
headers: {
|
|
120
|
+
accept: "application/json",
|
|
121
|
+
authorization: `Bearer ${await accessToken(ctx)}`,
|
|
122
|
+
...input.body === void 0 ? {} : { "content-type": "application/json" }
|
|
123
|
+
},
|
|
124
|
+
body: input.body === void 0 ? void 0 : JSON.stringify(input.body)
|
|
125
|
+
});
|
|
126
|
+
const payload = await readPayload(response);
|
|
127
|
+
if (!response.ok) {
|
|
128
|
+
throw upstreamError(response.status, errorMessage(payload) ?? `Docker Hub \u8FD4\u56DE HTTP ${response.status}`);
|
|
129
|
+
}
|
|
130
|
+
return { payload, response };
|
|
131
|
+
}
|
|
132
|
+
async function requestJson(ctx, input) {
|
|
133
|
+
return (await send(ctx, input)).payload;
|
|
134
|
+
}
|
|
135
|
+
async function requestNoContent(ctx, input) {
|
|
136
|
+
await send(ctx, input);
|
|
137
|
+
}
|
|
138
|
+
function pageContainer(payload) {
|
|
139
|
+
const body = requireRecord(payload);
|
|
140
|
+
return {
|
|
141
|
+
count: int(body.count) ?? 0,
|
|
142
|
+
next: nullableText(body.next),
|
|
143
|
+
previous: nullableText(body.previous),
|
|
144
|
+
results: objectArray(body.results)
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function repositorySummary(payload) {
|
|
148
|
+
const body = requireRecord(payload);
|
|
149
|
+
return {
|
|
150
|
+
name: text(body.name) ?? "",
|
|
151
|
+
namespace: text(body.namespace) ?? "",
|
|
152
|
+
repositoryType: nullableText(body.repository_type),
|
|
153
|
+
status: int(body.status) ?? 0,
|
|
154
|
+
statusDescription: text(body.status_description) ?? "",
|
|
155
|
+
description: nullableText(body.description),
|
|
156
|
+
isPrivate: Boolean(body.is_private),
|
|
157
|
+
starCount: int(body.star_count) ?? 0,
|
|
158
|
+
pullCount: int(body.pull_count) ?? 0,
|
|
159
|
+
lastUpdated: nullableText(body.last_updated),
|
|
160
|
+
lastModified: nullableText(body.last_modified),
|
|
161
|
+
dateRegistered: nullableText(body.date_registered),
|
|
162
|
+
affiliation: nullableText(body.affiliation),
|
|
163
|
+
mediaTypes: stringArray(body.media_types),
|
|
164
|
+
contentTypes: stringArray(body.content_types),
|
|
165
|
+
categories: objectArray(body.categories).map((item) => ({
|
|
166
|
+
name: text(item.name) ?? "",
|
|
167
|
+
slug: text(item.slug) ?? ""
|
|
168
|
+
})),
|
|
169
|
+
storageSize: int(body.storage_size) ?? null
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function repositoryDetail(payload) {
|
|
173
|
+
const body = requireRecord(payload);
|
|
174
|
+
const permissions = record(body.permissions);
|
|
175
|
+
const immutable = record(body.immutable_tags_settings);
|
|
176
|
+
return {
|
|
177
|
+
...repositorySummary(body),
|
|
178
|
+
user: nullableText(body.user),
|
|
179
|
+
hubUser: nullableText(body.hub_user),
|
|
180
|
+
collaboratorCount: int(body.collaborator_count) ?? null,
|
|
181
|
+
fullDescription: nullableText(body.full_description),
|
|
182
|
+
hasStarred: nullableBool(body.has_starred),
|
|
183
|
+
permissions: permissions === void 0 ? null : { read: Boolean(permissions.read), write: Boolean(permissions.write), admin: Boolean(permissions.admin) },
|
|
184
|
+
immutableTagsSettings: immutable === void 0 ? null : { enabled: Boolean(immutable.enabled), rules: stringArray(immutable.rules) },
|
|
185
|
+
source: nullableText(body.source)
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function image(payload) {
|
|
189
|
+
const body = requireRecord(payload);
|
|
190
|
+
return {
|
|
191
|
+
architecture: nullableText(body.architecture),
|
|
192
|
+
features: nullableText(body.features),
|
|
193
|
+
variant: nullableText(body.variant),
|
|
194
|
+
digest: nullableText(body.digest),
|
|
195
|
+
layers: objectArray(body.layers).map((layer) => ({
|
|
196
|
+
digest: nullableText(layer.digest),
|
|
197
|
+
size: int(layer.size) ?? null,
|
|
198
|
+
instruction: nullableText(layer.instruction)
|
|
199
|
+
})),
|
|
200
|
+
os: nullableText(body.os),
|
|
201
|
+
osFeatures: nullableText(body.os_features),
|
|
202
|
+
osVersion: nullableText(body.os_version),
|
|
203
|
+
size: int(body.size) ?? null,
|
|
204
|
+
status: nullableText(body.status),
|
|
205
|
+
lastPulled: nullableText(body.last_pulled),
|
|
206
|
+
lastPushed: nullableText(body.last_pushed)
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
function imageCollection(value) {
|
|
210
|
+
if (Array.isArray(value)) return value.map((item) => image(item));
|
|
211
|
+
return record(value) === void 0 ? [] : [image(value)];
|
|
212
|
+
}
|
|
213
|
+
function tag(payload) {
|
|
214
|
+
const body = requireRecord(payload);
|
|
215
|
+
return {
|
|
216
|
+
id: int(body.id) ?? null,
|
|
217
|
+
name: text(body.name) ?? "",
|
|
218
|
+
creator: int(body.creator) ?? null,
|
|
219
|
+
lastUpdated: nullableText(body.last_updated),
|
|
220
|
+
lastUpdater: int(body.last_updater) ?? null,
|
|
221
|
+
lastUpdaterUsername: nullableText(body.last_updater_username),
|
|
222
|
+
repository: int(body.repository) ?? null,
|
|
223
|
+
fullSize: int(body.full_size) ?? null,
|
|
224
|
+
status: nullableText(body.status),
|
|
225
|
+
tagLastPulled: nullableText(body.tag_last_pulled),
|
|
226
|
+
tagLastPushed: nullableText(body.tag_last_pushed),
|
|
227
|
+
images: imageCollection(body.images)
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function orgMember(payload) {
|
|
231
|
+
const body = requireRecord(payload);
|
|
232
|
+
return {
|
|
233
|
+
id: nullableText(body.id),
|
|
234
|
+
username: nullableText(body.username),
|
|
235
|
+
fullName: nullableText(body.full_name),
|
|
236
|
+
email: nullableText(body.email),
|
|
237
|
+
type: nullableText(body.type),
|
|
238
|
+
role: nullableText(body.role),
|
|
239
|
+
groups: stringArray(body.groups),
|
|
240
|
+
isGuest: nullableBool(body.is_guest),
|
|
241
|
+
dateJoined: nullableText(body.date_joined),
|
|
242
|
+
lastLoggedInAt: nullableText(body.last_logged_in_at),
|
|
243
|
+
lastSeenAt: nullableText(body.last_seen_at),
|
|
244
|
+
lastDesktopVersion: nullableText(body.last_desktop_version)
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
function team(payload) {
|
|
248
|
+
const body = requireRecord(payload);
|
|
249
|
+
return {
|
|
250
|
+
id: int(body.id) ?? null,
|
|
251
|
+
uuid: nullableText(body.uuid),
|
|
252
|
+
name: nullableText(body.name),
|
|
253
|
+
description: nullableText(body.description),
|
|
254
|
+
memberCount: int(body.member_count) ?? null
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
function teamMember(payload) {
|
|
258
|
+
const body = requireRecord(payload);
|
|
259
|
+
return {
|
|
260
|
+
id: nullableText(body.id),
|
|
261
|
+
username: nullableText(body.username),
|
|
262
|
+
fullName: nullableText(body.full_name),
|
|
263
|
+
email: nullableText(body.email),
|
|
264
|
+
company: nullableText(body.company),
|
|
265
|
+
location: nullableText(body.location),
|
|
266
|
+
profileUrl: nullableText(body.profile_url),
|
|
267
|
+
type: nullableText(body.type),
|
|
268
|
+
dateJoined: nullableText(body.date_joined)
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
function orgAccessToken(payload) {
|
|
272
|
+
const body = requireRecord(payload);
|
|
273
|
+
return compact({
|
|
274
|
+
id: nullableText(body.id),
|
|
275
|
+
label: nullableText(body.label),
|
|
276
|
+
createdBy: nullableText(body.created_by),
|
|
277
|
+
isActive: nullableBool(body.is_active),
|
|
278
|
+
createdAt: nullableText(body.created_at),
|
|
279
|
+
expiresAt: nullableText(body.expires_at),
|
|
280
|
+
lastUsedAt: nullableText(body.last_used_at),
|
|
281
|
+
// 上游对 resources 用 compactObject:不是数组就整个键不出现(而不是给个空数组)。
|
|
282
|
+
resources: Array.isArray(body.resources) ? body.resources.map((item) => {
|
|
283
|
+
const resource = requireRecord(item);
|
|
284
|
+
return {
|
|
285
|
+
type: nullableText(resource.type),
|
|
286
|
+
path: nullableText(resource.path),
|
|
287
|
+
scopes: stringArray(resource.scopes)
|
|
288
|
+
};
|
|
289
|
+
}) : void 0
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
function bulkInviteResults(payload) {
|
|
293
|
+
const body = requireRecord(payload);
|
|
294
|
+
const nested = record(body.invitees)?.invitees ?? body.invitees;
|
|
295
|
+
return objectArray(nested).map((item) => {
|
|
296
|
+
const invite = record(item.invite);
|
|
297
|
+
return {
|
|
298
|
+
invitee: nullableText(item.invitee),
|
|
299
|
+
status: nullableText(item.status),
|
|
300
|
+
invite: invite === void 0 ? null : {
|
|
301
|
+
id: nullableText(invite.id),
|
|
302
|
+
inviterUsername: nullableText(invite.inviter_username),
|
|
303
|
+
invitee: nullableText(invite.invitee),
|
|
304
|
+
org: nullableText(invite.org),
|
|
305
|
+
team: nullableText(invite.team),
|
|
306
|
+
createdAt: nullableText(invite.created_at)
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
function mapPage(payload, item) {
|
|
312
|
+
const page = pageContainer(payload);
|
|
313
|
+
return { count: page.count, next: page.next, previous: page.previous, results: page.results.map(item) };
|
|
314
|
+
}
|
|
315
|
+
var path = {
|
|
316
|
+
repositories: (namespace) => `/v2/namespaces/${encodeURIComponent(namespace)}/repositories`,
|
|
317
|
+
repository: (namespace, repository) => `${path.repositories(namespace)}/${encodeURIComponent(repository)}`,
|
|
318
|
+
org: (orgName) => `/v2/orgs/${encodeURIComponent(orgName)}`,
|
|
319
|
+
team: (orgName, teamName) => `${path.org(orgName)}/groups/${encodeURIComponent(teamName)}`
|
|
320
|
+
};
|
|
321
|
+
async function listRepositories(input, ctx) {
|
|
322
|
+
const payload = await requestJson(ctx, {
|
|
323
|
+
path: path.repositories(input.namespace),
|
|
324
|
+
query: compact({
|
|
325
|
+
page: input.page,
|
|
326
|
+
page_size: input.pageSize,
|
|
327
|
+
name: text(input.name),
|
|
328
|
+
ordering: text(input.ordering)
|
|
329
|
+
})
|
|
330
|
+
});
|
|
331
|
+
return mapPage(payload, repositorySummary);
|
|
332
|
+
}
|
|
333
|
+
async function getRepository(input, ctx) {
|
|
334
|
+
const payload = await requestJson(ctx, { path: path.repository(input.namespace, input.repository) });
|
|
335
|
+
return { repository: repositoryDetail(payload) };
|
|
336
|
+
}
|
|
337
|
+
async function createRepository(input, ctx) {
|
|
338
|
+
const payload = await requestJson(ctx, {
|
|
339
|
+
path: path.repositories(input.namespace),
|
|
340
|
+
method: "POST",
|
|
341
|
+
body: compact({
|
|
342
|
+
namespace: input.namespace,
|
|
343
|
+
name: input.name,
|
|
344
|
+
description: text(input.description),
|
|
345
|
+
full_description: text(input.fullDescription),
|
|
346
|
+
registry: text(input.registry),
|
|
347
|
+
is_private: input.isPrivate
|
|
348
|
+
})
|
|
349
|
+
});
|
|
350
|
+
return { repository: repositoryDetail(payload) };
|
|
351
|
+
}
|
|
352
|
+
async function getTag(input, ctx) {
|
|
353
|
+
const payload = await requestJson(ctx, {
|
|
354
|
+
path: `${path.repository(input.namespace, input.repository)}/tags/${encodeURIComponent(input.tag)}`
|
|
355
|
+
});
|
|
356
|
+
return { tag: tag(payload) };
|
|
357
|
+
}
|
|
358
|
+
async function getImage(input, ctx) {
|
|
359
|
+
const pageSize = input.pageSize ?? DEFAULT_IMAGE_PAGE_SIZE;
|
|
360
|
+
const maxPages = input.maxPages ?? DEFAULT_IMAGE_MAX_PAGES;
|
|
361
|
+
for (let page = 1; page <= maxPages; page += 1) {
|
|
362
|
+
const payload = await requestJson(ctx, {
|
|
363
|
+
path: `${path.repository(input.namespace, input.repository)}/tags`,
|
|
364
|
+
query: { page, page_size: pageSize }
|
|
365
|
+
});
|
|
366
|
+
const current = pageContainer(payload);
|
|
367
|
+
for (const item of current.results) {
|
|
368
|
+
const normalized = tag(item);
|
|
369
|
+
const found = normalized.images.find((candidate) => candidate.digest === input.digest);
|
|
370
|
+
if (found !== void 0) return { tag: normalized, image: found };
|
|
371
|
+
}
|
|
372
|
+
if (current.next === null) break;
|
|
373
|
+
}
|
|
374
|
+
throw upstreamError(404, `\u5728 ${input.namespace}/${input.repository} \u91CC\u6CA1\u627E\u5230 digest \u4E3A ${input.digest} \u7684\u955C\u50CF`);
|
|
375
|
+
}
|
|
376
|
+
async function listOrgMembers(input, ctx) {
|
|
377
|
+
const payload = await requestJson(ctx, {
|
|
378
|
+
path: `${path.org(input.orgName)}/members`,
|
|
379
|
+
query: compact({
|
|
380
|
+
search: text(input.search),
|
|
381
|
+
page: input.page,
|
|
382
|
+
page_size: input.pageSize,
|
|
383
|
+
invites: input.invites,
|
|
384
|
+
type: text(input.type),
|
|
385
|
+
role: text(input.role)
|
|
386
|
+
})
|
|
387
|
+
});
|
|
388
|
+
const unwrapped = Array.isArray(payload) && payload.length > 0 && payload.every((item) => record(item) !== void 0) ? payload[0] : payload;
|
|
389
|
+
return mapPage(unwrapped, orgMember);
|
|
390
|
+
}
|
|
391
|
+
async function addOrgMember(input, ctx) {
|
|
392
|
+
const payload = await requestJson(ctx, {
|
|
393
|
+
path: "/v2/invites/bulk",
|
|
394
|
+
method: "POST",
|
|
395
|
+
body: compact({
|
|
396
|
+
org: input.orgName,
|
|
397
|
+
team: text(input.teamName),
|
|
398
|
+
role: text(input.role),
|
|
399
|
+
// 单人邀请也走批量接口,故 invitee 要包成数组。
|
|
400
|
+
invitees: [input.invitee],
|
|
401
|
+
dry_run: input.dryRun
|
|
402
|
+
})
|
|
403
|
+
});
|
|
404
|
+
return { invitees: bulkInviteResults(payload) };
|
|
405
|
+
}
|
|
406
|
+
async function removeOrgMember(input, ctx) {
|
|
407
|
+
await requestNoContent(ctx, {
|
|
408
|
+
path: `${path.org(input.orgName)}/members/${encodeURIComponent(input.username)}`,
|
|
409
|
+
method: "DELETE"
|
|
410
|
+
});
|
|
411
|
+
return { removed: true };
|
|
412
|
+
}
|
|
413
|
+
async function listOrgAccessTokens(input, ctx) {
|
|
414
|
+
const payload = await requestJson(ctx, {
|
|
415
|
+
path: `${path.org(input.orgName)}/access-tokens`,
|
|
416
|
+
query: compact({ page: input.page, page_size: input.pageSize })
|
|
417
|
+
});
|
|
418
|
+
const body = requireRecord(payload);
|
|
419
|
+
return {
|
|
420
|
+
total: int(body.total) ?? 0,
|
|
421
|
+
next: nullableText(body.next),
|
|
422
|
+
previous: nullableText(body.previous),
|
|
423
|
+
results: objectArray(body.results).map((item) => orgAccessToken(item))
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
async function listTeams(input, ctx) {
|
|
427
|
+
const payload = await requestJson(ctx, {
|
|
428
|
+
path: `${path.org(input.orgName)}/groups`,
|
|
429
|
+
query: compact({
|
|
430
|
+
page: input.page,
|
|
431
|
+
page_size: input.pageSize,
|
|
432
|
+
username: text(input.username),
|
|
433
|
+
search: text(input.search)
|
|
434
|
+
})
|
|
435
|
+
});
|
|
436
|
+
return mapPage(payload, team);
|
|
437
|
+
}
|
|
438
|
+
async function getTeam(input, ctx) {
|
|
439
|
+
const payload = await requestJson(ctx, { path: path.team(input.orgName, input.teamName) });
|
|
440
|
+
return { team: team(payload) };
|
|
441
|
+
}
|
|
442
|
+
async function deleteTeam(input, ctx) {
|
|
443
|
+
await requestNoContent(ctx, { path: path.team(input.orgName, input.teamName), method: "DELETE" });
|
|
444
|
+
return { deleted: true };
|
|
445
|
+
}
|
|
446
|
+
async function listTeamMembers(input, ctx) {
|
|
447
|
+
const payload = await requestJson(ctx, {
|
|
448
|
+
path: `${path.team(input.orgName, input.teamName)}/members`,
|
|
449
|
+
query: compact({ page: input.page, page_size: input.pageSize, search: text(input.search) })
|
|
450
|
+
});
|
|
451
|
+
return mapPage(payload, teamMember);
|
|
452
|
+
}
|
|
453
|
+
async function removeTeamMember(input, ctx) {
|
|
454
|
+
await requestNoContent(ctx, {
|
|
455
|
+
path: `${path.team(input.orgName, input.teamName)}/members/${encodeURIComponent(input.username)}`,
|
|
456
|
+
method: "DELETE"
|
|
457
|
+
});
|
|
458
|
+
return { removed: true };
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// ../plugins/src/docker_hub/schema.ts
|
|
462
|
+
var listRepositoriesInput = external_exports.strictObject({
|
|
463
|
+
namespace: external_exports.string().min(1).describe("The namespace that owns the repositories."),
|
|
464
|
+
page: external_exports.int().min(1).describe("The page number to retrieve.").optional(),
|
|
465
|
+
pageSize: external_exports.int().min(1).max(100).describe("The number of results to return per page.").optional(),
|
|
466
|
+
name: external_exports.string().min(1).describe("An optional partial repository name filter.").optional(),
|
|
467
|
+
ordering: external_exports.enum(["name", "-name", "last_updated", "-last_updated", "pull_count", "-pull_count"]).describe("The field and direction used to order repositories.").optional()
|
|
468
|
+
}).describe("The input payload for this action.");
|
|
469
|
+
var listRepositoriesOutput = external_exports.strictObject({
|
|
470
|
+
count: external_exports.int().describe("The total number of matching items."),
|
|
471
|
+
next: external_exports.string().describe("The URL for the next page, or null when unavailable.").nullable(),
|
|
472
|
+
previous: external_exports.string().describe("The URL for the previous page, or null when unavailable.").nullable(),
|
|
473
|
+
results: external_exports.array(external_exports.strictObject({
|
|
474
|
+
name: external_exports.string().describe("The repository name.").optional(),
|
|
475
|
+
namespace: external_exports.string().describe("The namespace that owns the repository.").optional(),
|
|
476
|
+
repositoryType: external_exports.string().describe("The repository type, such as image or plugin.").nullable().optional(),
|
|
477
|
+
status: external_exports.int().describe("The numeric repository status code.").optional(),
|
|
478
|
+
statusDescription: external_exports.string().describe("The human-readable repository status.").optional(),
|
|
479
|
+
description: external_exports.string().describe("The short repository description, when available.").nullable().optional(),
|
|
480
|
+
isPrivate: external_exports.boolean().describe("Whether the repository is private.").optional(),
|
|
481
|
+
starCount: external_exports.int().describe("The number of stars on the repository.").optional(),
|
|
482
|
+
pullCount: external_exports.int().describe("The total number of pulls for the repository.").optional(),
|
|
483
|
+
lastUpdated: external_exports.string().describe("The ISO 8601 timestamp when the repository was last updated.").nullable().optional(),
|
|
484
|
+
lastModified: external_exports.string().describe("The ISO 8601 timestamp when the repository was last modified.").nullable().optional(),
|
|
485
|
+
dateRegistered: external_exports.string().describe("The ISO 8601 timestamp when the repository was created.").nullable().optional(),
|
|
486
|
+
affiliation: external_exports.string().describe("The current user's affiliation with the repository, when available.").nullable().optional(),
|
|
487
|
+
mediaTypes: external_exports.array(external_exports.string().min(1)).describe("The media types supported by the repository.").optional(),
|
|
488
|
+
contentTypes: external_exports.array(external_exports.string().min(1)).describe("The content types supported by the repository.").optional(),
|
|
489
|
+
categories: external_exports.array(external_exports.strictObject({
|
|
490
|
+
name: external_exports.string().describe("The human-readable repository category name.").optional(),
|
|
491
|
+
slug: external_exports.string().describe("The URL-friendly repository category identifier.").optional()
|
|
492
|
+
}).describe("A Docker Hub repository category.")).describe("The categories assigned to the repository.").optional(),
|
|
493
|
+
storageSize: external_exports.int().describe("The repository storage size in bytes, when available.").nullable().optional()
|
|
494
|
+
}).describe("A Docker Hub repository summary.")).describe("The items in the current page.")
|
|
495
|
+
}).describe("A paginated Docker Hub repository list.");
|
|
496
|
+
var getRepositoryInput = external_exports.strictObject({
|
|
497
|
+
namespace: external_exports.string().min(1).describe("The namespace that owns the repository."),
|
|
498
|
+
repository: external_exports.string().min(1).describe("The repository name.")
|
|
499
|
+
}).describe("The input payload for this action.");
|
|
500
|
+
var getRepositoryOutput = external_exports.strictObject({
|
|
501
|
+
repository: external_exports.strictObject({
|
|
502
|
+
name: external_exports.string().describe("The repository name.").optional(),
|
|
503
|
+
namespace: external_exports.string().describe("The namespace that owns the repository.").optional(),
|
|
504
|
+
repositoryType: external_exports.string().describe("The repository type, such as image or plugin.").nullable().optional(),
|
|
505
|
+
status: external_exports.int().describe("The numeric repository status code.").optional(),
|
|
506
|
+
statusDescription: external_exports.string().describe("The human-readable repository status.").optional(),
|
|
507
|
+
description: external_exports.string().describe("The short repository description, when available.").nullable().optional(),
|
|
508
|
+
isPrivate: external_exports.boolean().describe("Whether the repository is private.").optional(),
|
|
509
|
+
starCount: external_exports.int().describe("The number of stars on the repository.").optional(),
|
|
510
|
+
pullCount: external_exports.int().describe("The total number of pulls for the repository.").optional(),
|
|
511
|
+
lastUpdated: external_exports.string().describe("The ISO 8601 timestamp when the repository was last updated.").nullable().optional(),
|
|
512
|
+
lastModified: external_exports.string().describe("The ISO 8601 timestamp when the repository was last modified.").nullable().optional(),
|
|
513
|
+
dateRegistered: external_exports.string().describe("The ISO 8601 timestamp when the repository was created.").nullable().optional(),
|
|
514
|
+
affiliation: external_exports.string().describe("The current user's affiliation with the repository, when available.").nullable().optional(),
|
|
515
|
+
mediaTypes: external_exports.array(external_exports.string().min(1)).describe("The media types supported by the repository.").optional(),
|
|
516
|
+
contentTypes: external_exports.array(external_exports.string().min(1)).describe("The content types supported by the repository.").optional(),
|
|
517
|
+
categories: external_exports.array(external_exports.strictObject({
|
|
518
|
+
name: external_exports.string().describe("The human-readable repository category name.").optional(),
|
|
519
|
+
slug: external_exports.string().describe("The URL-friendly repository category identifier.").optional()
|
|
520
|
+
}).describe("A Docker Hub repository category.")).describe("The categories assigned to the repository.").optional(),
|
|
521
|
+
storageSize: external_exports.int().describe("The repository storage size in bytes, when available.").nullable().optional(),
|
|
522
|
+
user: external_exports.string().describe("The repository owner username, when available.").nullable().optional(),
|
|
523
|
+
hubUser: external_exports.string().describe("The Docker Hub user associated with the repository, when available.").nullable().optional(),
|
|
524
|
+
collaboratorCount: external_exports.int().describe("The number of collaborators on the repository, when available.").nullable().optional(),
|
|
525
|
+
fullDescription: external_exports.string().describe("The full repository description, when available.").nullable().optional(),
|
|
526
|
+
hasStarred: external_exports.boolean().describe("Whether the current user has starred the repository, when available.").nullable().optional(),
|
|
527
|
+
permissions: external_exports.strictObject({
|
|
528
|
+
read: external_exports.boolean().describe("Whether read access is available.").optional(),
|
|
529
|
+
write: external_exports.boolean().describe("Whether write access is available.").optional(),
|
|
530
|
+
admin: external_exports.boolean().describe("Whether admin access is available.").optional()
|
|
531
|
+
}).describe("The repository permissions visible to the current credential.").nullable().optional(),
|
|
532
|
+
immutableTagsSettings: external_exports.strictObject({
|
|
533
|
+
enabled: external_exports.boolean().describe("Whether immutable tags are enabled for the repository.").optional(),
|
|
534
|
+
rules: external_exports.array(external_exports.string().min(1)).describe("The immutable tag rules configured for the repository.").optional()
|
|
535
|
+
}).describe("The immutable tag configuration for the repository.").nullable().optional(),
|
|
536
|
+
source: external_exports.string().describe("The repository source metadata, when available.").nullable().optional()
|
|
537
|
+
}).describe("Detailed Docker Hub repository metadata.")
|
|
538
|
+
}).describe("The output payload for retrieving a Docker Hub repository.");
|
|
539
|
+
var createRepositoryInput = external_exports.strictObject({
|
|
540
|
+
namespace: external_exports.string().min(1).describe("The namespace where the repository should be created."),
|
|
541
|
+
name: external_exports.string().min(2).max(255).describe("The repository name to create."),
|
|
542
|
+
description: external_exports.string().max(100).describe("The short repository description.").optional(),
|
|
543
|
+
fullDescription: external_exports.string().max(25e3).describe("The detailed repository description.").optional(),
|
|
544
|
+
registry: external_exports.string().describe("The registry where the repository should be hosted.").optional(),
|
|
545
|
+
isPrivate: external_exports.boolean().describe("Whether the repository should be created as private.").optional()
|
|
546
|
+
}).describe("The input payload for this action.");
|
|
547
|
+
var createRepositoryOutput = external_exports.strictObject({
|
|
548
|
+
repository: external_exports.strictObject({
|
|
549
|
+
name: external_exports.string().describe("The repository name.").optional(),
|
|
550
|
+
namespace: external_exports.string().describe("The namespace that owns the repository.").optional(),
|
|
551
|
+
repositoryType: external_exports.string().describe("The repository type, such as image or plugin.").nullable().optional(),
|
|
552
|
+
status: external_exports.int().describe("The numeric repository status code.").optional(),
|
|
553
|
+
statusDescription: external_exports.string().describe("The human-readable repository status.").optional(),
|
|
554
|
+
description: external_exports.string().describe("The short repository description, when available.").nullable().optional(),
|
|
555
|
+
isPrivate: external_exports.boolean().describe("Whether the repository is private.").optional(),
|
|
556
|
+
starCount: external_exports.int().describe("The number of stars on the repository.").optional(),
|
|
557
|
+
pullCount: external_exports.int().describe("The total number of pulls for the repository.").optional(),
|
|
558
|
+
lastUpdated: external_exports.string().describe("The ISO 8601 timestamp when the repository was last updated.").nullable().optional(),
|
|
559
|
+
lastModified: external_exports.string().describe("The ISO 8601 timestamp when the repository was last modified.").nullable().optional(),
|
|
560
|
+
dateRegistered: external_exports.string().describe("The ISO 8601 timestamp when the repository was created.").nullable().optional(),
|
|
561
|
+
affiliation: external_exports.string().describe("The current user's affiliation with the repository, when available.").nullable().optional(),
|
|
562
|
+
mediaTypes: external_exports.array(external_exports.string().min(1)).describe("The media types supported by the repository.").optional(),
|
|
563
|
+
contentTypes: external_exports.array(external_exports.string().min(1)).describe("The content types supported by the repository.").optional(),
|
|
564
|
+
categories: external_exports.array(external_exports.strictObject({
|
|
565
|
+
name: external_exports.string().describe("The human-readable repository category name.").optional(),
|
|
566
|
+
slug: external_exports.string().describe("The URL-friendly repository category identifier.").optional()
|
|
567
|
+
}).describe("A Docker Hub repository category.")).describe("The categories assigned to the repository.").optional(),
|
|
568
|
+
storageSize: external_exports.int().describe("The repository storage size in bytes, when available.").nullable().optional(),
|
|
569
|
+
user: external_exports.string().describe("The repository owner username, when available.").nullable().optional(),
|
|
570
|
+
hubUser: external_exports.string().describe("The Docker Hub user associated with the repository, when available.").nullable().optional(),
|
|
571
|
+
collaboratorCount: external_exports.int().describe("The number of collaborators on the repository, when available.").nullable().optional(),
|
|
572
|
+
fullDescription: external_exports.string().describe("The full repository description, when available.").nullable().optional(),
|
|
573
|
+
hasStarred: external_exports.boolean().describe("Whether the current user has starred the repository, when available.").nullable().optional(),
|
|
574
|
+
permissions: external_exports.strictObject({
|
|
575
|
+
read: external_exports.boolean().describe("Whether read access is available.").optional(),
|
|
576
|
+
write: external_exports.boolean().describe("Whether write access is available.").optional(),
|
|
577
|
+
admin: external_exports.boolean().describe("Whether admin access is available.").optional()
|
|
578
|
+
}).describe("The repository permissions visible to the current credential.").nullable().optional(),
|
|
579
|
+
immutableTagsSettings: external_exports.strictObject({
|
|
580
|
+
enabled: external_exports.boolean().describe("Whether immutable tags are enabled for the repository.").optional(),
|
|
581
|
+
rules: external_exports.array(external_exports.string().min(1)).describe("The immutable tag rules configured for the repository.").optional()
|
|
582
|
+
}).describe("The immutable tag configuration for the repository.").nullable().optional(),
|
|
583
|
+
source: external_exports.string().describe("The repository source metadata, when available.").nullable().optional()
|
|
584
|
+
}).describe("Detailed Docker Hub repository metadata.")
|
|
585
|
+
}).describe("The output payload for creating a Docker Hub repository.");
|
|
586
|
+
var getTagInput = external_exports.strictObject({
|
|
587
|
+
namespace: external_exports.string().min(1).describe("The namespace that owns the repository."),
|
|
588
|
+
repository: external_exports.string().min(1).describe("The repository name."),
|
|
589
|
+
tag: external_exports.string().min(1).describe("The tag name to retrieve.")
|
|
590
|
+
}).describe("The input payload for this action.");
|
|
591
|
+
var getTagOutput = external_exports.strictObject({
|
|
592
|
+
tag: external_exports.strictObject({
|
|
593
|
+
id: external_exports.int().describe("The numeric tag identifier, when available.").nullable().optional(),
|
|
594
|
+
name: external_exports.string().describe("The repository tag name.").optional(),
|
|
595
|
+
creator: external_exports.int().describe("The user ID that originally created the tag.").nullable().optional(),
|
|
596
|
+
lastUpdated: external_exports.string().describe("The ISO 8601 timestamp when the tag was last updated.").nullable().optional(),
|
|
597
|
+
lastUpdater: external_exports.int().describe("The user ID that last updated the tag.").nullable().optional(),
|
|
598
|
+
lastUpdaterUsername: external_exports.string().describe("The Docker Hub username that last updated the tag.").nullable().optional(),
|
|
599
|
+
repository: external_exports.int().describe("The numeric repository identifier.").nullable().optional(),
|
|
600
|
+
fullSize: external_exports.int().describe("The compressed tag size in bytes.").nullable().optional(),
|
|
601
|
+
status: external_exports.string().describe("The current Docker Hub tag status.").nullable().optional(),
|
|
602
|
+
tagLastPulled: external_exports.string().describe("The ISO 8601 timestamp when the tag was last pulled.").nullable().optional(),
|
|
603
|
+
tagLastPushed: external_exports.string().describe("The ISO 8601 timestamp when the tag was last pushed.").nullable().optional(),
|
|
604
|
+
images: external_exports.array(external_exports.strictObject({
|
|
605
|
+
architecture: external_exports.string().describe("The CPU architecture for the image variant, when available.").nullable().optional(),
|
|
606
|
+
features: external_exports.string().describe("The CPU feature set reported for the image variant, when available.").nullable().optional(),
|
|
607
|
+
variant: external_exports.string().describe("The CPU variant reported for the image variant, when available.").nullable().optional(),
|
|
608
|
+
digest: external_exports.string().describe("The image manifest digest, when available.").nullable().optional(),
|
|
609
|
+
layers: external_exports.array(external_exports.strictObject({
|
|
610
|
+
digest: external_exports.string().describe("The image layer digest, when available.").nullable().optional(),
|
|
611
|
+
size: external_exports.int().describe("The image layer size in bytes, when available.").nullable().optional(),
|
|
612
|
+
instruction: external_exports.string().describe("The Dockerfile instruction associated with the layer, when available.").nullable().optional()
|
|
613
|
+
}).describe("A Docker image layer.")).describe("The image layers included in the image variant.").optional(),
|
|
614
|
+
os: external_exports.string().describe("The operating system for the image variant, when available.").nullable().optional(),
|
|
615
|
+
osFeatures: external_exports.string().describe("The operating system features reported for the image variant, when available.").nullable().optional(),
|
|
616
|
+
osVersion: external_exports.string().describe("The operating system version for the image variant, when available.").nullable().optional(),
|
|
617
|
+
size: external_exports.int().describe("The image size in bytes, when available.").nullable().optional(),
|
|
618
|
+
status: external_exports.string().describe("The image status returned by Docker Hub, when available.").nullable().optional(),
|
|
619
|
+
lastPulled: external_exports.string().describe("The ISO 8601 timestamp when the image variant was last pulled.").nullable().optional(),
|
|
620
|
+
lastPushed: external_exports.string().describe("The ISO 8601 timestamp when the image variant was last pushed.").nullable().optional()
|
|
621
|
+
}).describe("A platform-specific Docker image variant.")).describe("The image variants currently published for the tag.").optional()
|
|
622
|
+
}).describe("A Docker Hub repository tag.")
|
|
623
|
+
}).describe("The output payload for retrieving a Docker Hub repository tag.");
|
|
624
|
+
var getImageInput = external_exports.strictObject({
|
|
625
|
+
namespace: external_exports.string().min(1).describe("The namespace that owns the repository."),
|
|
626
|
+
repository: external_exports.string().min(1).describe("The repository name."),
|
|
627
|
+
digest: external_exports.string().min(1).describe("The image manifest digest to look up."),
|
|
628
|
+
pageSize: external_exports.int().min(1).max(100).describe("The number of results to return per page.").optional(),
|
|
629
|
+
maxPages: external_exports.int().min(1).max(100).describe("The maximum number of tag pages to scan.").optional()
|
|
630
|
+
}).describe("The input payload for this action.");
|
|
631
|
+
var getImageOutput = external_exports.strictObject({
|
|
632
|
+
tag: external_exports.strictObject({
|
|
633
|
+
id: external_exports.int().describe("The numeric tag identifier, when available.").nullable().optional(),
|
|
634
|
+
name: external_exports.string().describe("The repository tag name.").optional(),
|
|
635
|
+
creator: external_exports.int().describe("The user ID that originally created the tag.").nullable().optional(),
|
|
636
|
+
lastUpdated: external_exports.string().describe("The ISO 8601 timestamp when the tag was last updated.").nullable().optional(),
|
|
637
|
+
lastUpdater: external_exports.int().describe("The user ID that last updated the tag.").nullable().optional(),
|
|
638
|
+
lastUpdaterUsername: external_exports.string().describe("The Docker Hub username that last updated the tag.").nullable().optional(),
|
|
639
|
+
repository: external_exports.int().describe("The numeric repository identifier.").nullable().optional(),
|
|
640
|
+
fullSize: external_exports.int().describe("The compressed tag size in bytes.").nullable().optional(),
|
|
641
|
+
status: external_exports.string().describe("The current Docker Hub tag status.").nullable().optional(),
|
|
642
|
+
tagLastPulled: external_exports.string().describe("The ISO 8601 timestamp when the tag was last pulled.").nullable().optional(),
|
|
643
|
+
tagLastPushed: external_exports.string().describe("The ISO 8601 timestamp when the tag was last pushed.").nullable().optional(),
|
|
644
|
+
images: external_exports.array(external_exports.strictObject({
|
|
645
|
+
architecture: external_exports.string().describe("The CPU architecture for the image variant, when available.").nullable().optional(),
|
|
646
|
+
features: external_exports.string().describe("The CPU feature set reported for the image variant, when available.").nullable().optional(),
|
|
647
|
+
variant: external_exports.string().describe("The CPU variant reported for the image variant, when available.").nullable().optional(),
|
|
648
|
+
digest: external_exports.string().describe("The image manifest digest, when available.").nullable().optional(),
|
|
649
|
+
layers: external_exports.array(external_exports.strictObject({
|
|
650
|
+
digest: external_exports.string().describe("The image layer digest, when available.").nullable().optional(),
|
|
651
|
+
size: external_exports.int().describe("The image layer size in bytes, when available.").nullable().optional(),
|
|
652
|
+
instruction: external_exports.string().describe("The Dockerfile instruction associated with the layer, when available.").nullable().optional()
|
|
653
|
+
}).describe("A Docker image layer.")).describe("The image layers included in the image variant.").optional(),
|
|
654
|
+
os: external_exports.string().describe("The operating system for the image variant, when available.").nullable().optional(),
|
|
655
|
+
osFeatures: external_exports.string().describe("The operating system features reported for the image variant, when available.").nullable().optional(),
|
|
656
|
+
osVersion: external_exports.string().describe("The operating system version for the image variant, when available.").nullable().optional(),
|
|
657
|
+
size: external_exports.int().describe("The image size in bytes, when available.").nullable().optional(),
|
|
658
|
+
status: external_exports.string().describe("The image status returned by Docker Hub, when available.").nullable().optional(),
|
|
659
|
+
lastPulled: external_exports.string().describe("The ISO 8601 timestamp when the image variant was last pulled.").nullable().optional(),
|
|
660
|
+
lastPushed: external_exports.string().describe("The ISO 8601 timestamp when the image variant was last pushed.").nullable().optional()
|
|
661
|
+
}).describe("A platform-specific Docker image variant.")).describe("The image variants currently published for the tag.").optional()
|
|
662
|
+
}).describe("A Docker Hub repository tag."),
|
|
663
|
+
image: external_exports.strictObject({
|
|
664
|
+
architecture: external_exports.string().describe("The CPU architecture for the image variant, when available.").nullable().optional(),
|
|
665
|
+
features: external_exports.string().describe("The CPU feature set reported for the image variant, when available.").nullable().optional(),
|
|
666
|
+
variant: external_exports.string().describe("The CPU variant reported for the image variant, when available.").nullable().optional(),
|
|
667
|
+
digest: external_exports.string().describe("The image manifest digest, when available.").nullable().optional(),
|
|
668
|
+
layers: external_exports.array(external_exports.strictObject({
|
|
669
|
+
digest: external_exports.string().describe("The image layer digest, when available.").nullable().optional(),
|
|
670
|
+
size: external_exports.int().describe("The image layer size in bytes, when available.").nullable().optional(),
|
|
671
|
+
instruction: external_exports.string().describe("The Dockerfile instruction associated with the layer, when available.").nullable().optional()
|
|
672
|
+
}).describe("A Docker image layer.")).describe("The image layers included in the image variant.").optional(),
|
|
673
|
+
os: external_exports.string().describe("The operating system for the image variant, when available.").nullable().optional(),
|
|
674
|
+
osFeatures: external_exports.string().describe("The operating system features reported for the image variant, when available.").nullable().optional(),
|
|
675
|
+
osVersion: external_exports.string().describe("The operating system version for the image variant, when available.").nullable().optional(),
|
|
676
|
+
size: external_exports.int().describe("The image size in bytes, when available.").nullable().optional(),
|
|
677
|
+
status: external_exports.string().describe("The image status returned by Docker Hub, when available.").nullable().optional(),
|
|
678
|
+
lastPulled: external_exports.string().describe("The ISO 8601 timestamp when the image variant was last pulled.").nullable().optional(),
|
|
679
|
+
lastPushed: external_exports.string().describe("The ISO 8601 timestamp when the image variant was last pushed.").nullable().optional()
|
|
680
|
+
}).describe("A platform-specific Docker image variant.")
|
|
681
|
+
}).describe("The output payload for searching a Docker Hub image by digest.");
|
|
682
|
+
var listOrgMembersInput = external_exports.strictObject({
|
|
683
|
+
orgName: external_exports.string().min(1).describe("The Docker Hub organization name."),
|
|
684
|
+
search: external_exports.string().describe("An optional member search term.").optional(),
|
|
685
|
+
page: external_exports.int().min(1).describe("The page number to retrieve.").optional(),
|
|
686
|
+
pageSize: external_exports.int().min(1).max(100).describe("The number of results to return per page.").optional(),
|
|
687
|
+
invites: external_exports.boolean().describe("Whether to include invites in the response when supported.").optional(),
|
|
688
|
+
type: external_exports.enum(["all", "invitee", "member"]).describe("The member type filter.").optional(),
|
|
689
|
+
role: external_exports.enum(["owner", "editor", "member"]).describe("The organization role filter.").optional()
|
|
690
|
+
}).describe("The input payload for this action.");
|
|
691
|
+
var listOrgMembersOutput = external_exports.strictObject({
|
|
692
|
+
count: external_exports.int().describe("The total number of matching items."),
|
|
693
|
+
next: external_exports.string().describe("The URL for the next page, or null when unavailable.").nullable(),
|
|
694
|
+
previous: external_exports.string().describe("The URL for the previous page, or null when unavailable.").nullable(),
|
|
695
|
+
results: external_exports.array(external_exports.strictObject({
|
|
696
|
+
id: external_exports.string().describe("The member identifier, when available.").nullable().optional(),
|
|
697
|
+
username: external_exports.string().describe("The Docker Hub username of the member.").nullable().optional(),
|
|
698
|
+
fullName: external_exports.string().describe("The full name of the member, when available.").nullable().optional(),
|
|
699
|
+
email: external_exports.string().describe("The email address of the member, when available.").nullable().optional(),
|
|
700
|
+
type: external_exports.string().describe("The Docker Hub member type, when available.").nullable().optional(),
|
|
701
|
+
role: external_exports.string().describe("The organization role assigned to the member.").nullable().optional(),
|
|
702
|
+
groups: external_exports.array(external_exports.string().min(1)).describe("The teams that include the member.").optional(),
|
|
703
|
+
isGuest: external_exports.boolean().describe("Whether the member is marked as a guest in the organization.").nullable().optional(),
|
|
704
|
+
dateJoined: external_exports.string().describe("The ISO 8601 timestamp when the member joined the organization.").nullable().optional(),
|
|
705
|
+
lastLoggedInAt: external_exports.string().describe("The ISO 8601 timestamp when the member last logged in, when visible.").nullable().optional(),
|
|
706
|
+
lastSeenAt: external_exports.string().describe("The ISO 8601 timestamp when the member was last seen, when visible.").nullable().optional(),
|
|
707
|
+
lastDesktopVersion: external_exports.string().describe("The last Docker Desktop version seen for the member, when visible.").nullable().optional()
|
|
708
|
+
}).describe("A Docker Hub organization member.")).describe("The items in the current page.")
|
|
709
|
+
}).describe("A paginated Docker Hub organization member list.");
|
|
710
|
+
var addOrgMemberInput = external_exports.strictObject({
|
|
711
|
+
orgName: external_exports.string().min(1).describe("The Docker Hub organization name."),
|
|
712
|
+
invitee: external_exports.string().min(1).describe("The Docker ID or email address to invite."),
|
|
713
|
+
teamName: external_exports.string().min(1).describe("The optional team to attach to the invite.").optional(),
|
|
714
|
+
role: external_exports.string().describe("The optional organization role to assign to the invite.").optional(),
|
|
715
|
+
dryRun: external_exports.boolean().describe("Whether to validate the invite without creating it.").optional()
|
|
716
|
+
}).describe("The input payload for this action.");
|
|
717
|
+
var addOrgMemberOutput = external_exports.strictObject({
|
|
718
|
+
invitees: external_exports.array(external_exports.strictObject({
|
|
719
|
+
invitee: external_exports.string().describe("The invited Docker ID or email address.").nullable().optional(),
|
|
720
|
+
status: external_exports.string().describe("The invite creation result status.").nullable().optional(),
|
|
721
|
+
invite: external_exports.strictObject({
|
|
722
|
+
id: external_exports.string().describe("The invite identifier, when available.").nullable().optional(),
|
|
723
|
+
inviterUsername: external_exports.string().describe("The Docker Hub username that created the invite, when available.").nullable().optional(),
|
|
724
|
+
invitee: external_exports.string().describe("The invited Docker ID or email address.").nullable().optional(),
|
|
725
|
+
org: external_exports.string().describe("The organization that owns the invite.").nullable().optional(),
|
|
726
|
+
team: external_exports.string().describe("The team attached to the invite, when available.").nullable().optional(),
|
|
727
|
+
createdAt: external_exports.string().describe("The ISO 8601 timestamp when the invite was created, when available.").nullable().optional()
|
|
728
|
+
}).describe("A Docker Hub organization invite.").nullable().optional()
|
|
729
|
+
}).describe("A single Docker Hub bulk invite result.")).describe("The invite results returned by the bulk invite endpoint.")
|
|
730
|
+
}).describe("The output payload for inviting a member to a Docker Hub organization.");
|
|
731
|
+
var removeOrgMemberInput = external_exports.strictObject({
|
|
732
|
+
orgName: external_exports.string().min(1).describe("The Docker Hub organization name."),
|
|
733
|
+
username: external_exports.string().min(1).describe("The Docker Hub username to remove.")
|
|
734
|
+
}).describe("The input payload for this action.");
|
|
735
|
+
var removeOrgMemberOutput = external_exports.strictObject({
|
|
736
|
+
removed: external_exports.boolean().describe("Whether the member removal request completed.")
|
|
737
|
+
}).describe("The output payload for this action.");
|
|
738
|
+
var listOrgAccessTokensInput = external_exports.strictObject({
|
|
739
|
+
orgName: external_exports.string().min(1).describe("The Docker Hub organization name."),
|
|
740
|
+
page: external_exports.int().min(1).describe("The page number to retrieve.").optional(),
|
|
741
|
+
pageSize: external_exports.int().min(1).max(100).describe("The number of results to return per page.").optional()
|
|
742
|
+
}).describe("The input payload for this action.");
|
|
743
|
+
var listOrgAccessTokensOutput = external_exports.strictObject({
|
|
744
|
+
total: external_exports.int().describe("The total number of organization access tokens."),
|
|
745
|
+
next: external_exports.string().describe("The URL for the next page, or null when unavailable.").nullable(),
|
|
746
|
+
previous: external_exports.string().describe("The URL for the previous page, or null when unavailable.").nullable(),
|
|
747
|
+
results: external_exports.array(external_exports.strictObject({
|
|
748
|
+
id: external_exports.string().describe("The organization access token identifier.").nullable().optional(),
|
|
749
|
+
label: external_exports.string().describe("The organization access token label.").nullable().optional(),
|
|
750
|
+
createdBy: external_exports.string().describe("The username that created the token, when available.").nullable().optional(),
|
|
751
|
+
isActive: external_exports.boolean().describe("Whether the organization access token is active.").nullable().optional(),
|
|
752
|
+
createdAt: external_exports.string().describe("The ISO 8601 timestamp when the token was created.").nullable().optional(),
|
|
753
|
+
expiresAt: external_exports.string().describe("The ISO 8601 timestamp when the token expires, when available.").nullable().optional(),
|
|
754
|
+
lastUsedAt: external_exports.string().describe("The ISO 8601 timestamp when the token was last used, when available.").nullable().optional(),
|
|
755
|
+
resources: external_exports.array(external_exports.strictObject({
|
|
756
|
+
type: external_exports.string().describe("The organization access token resource type.").nullable().optional(),
|
|
757
|
+
path: external_exports.string().describe("The resource path granted to the token.").nullable().optional(),
|
|
758
|
+
scopes: external_exports.array(external_exports.string().min(1)).describe("The scopes granted for the resource.").optional()
|
|
759
|
+
}).describe("A Docker Hub organization access token resource grant.")).describe("The resource grants attached to the token.").optional()
|
|
760
|
+
}).describe("A Docker Hub organization access token.")).describe("The organization access tokens in the current page.")
|
|
761
|
+
}).describe("A paginated Docker Hub organization access token list.");
|
|
762
|
+
var listTeamsInput = external_exports.strictObject({
|
|
763
|
+
orgName: external_exports.string().min(1).describe("The Docker Hub organization name."),
|
|
764
|
+
page: external_exports.int().min(1).describe("The page number to retrieve.").optional(),
|
|
765
|
+
pageSize: external_exports.int().min(1).max(100).describe("The number of results to return per page.").optional(),
|
|
766
|
+
username: external_exports.string().min(1).describe("An optional username to filter teams by membership.").optional(),
|
|
767
|
+
search: external_exports.string().min(1).describe("An optional team search term.").optional()
|
|
768
|
+
}).describe("The input payload for this action.");
|
|
769
|
+
var listTeamsOutput = external_exports.strictObject({
|
|
770
|
+
count: external_exports.int().describe("The total number of matching items."),
|
|
771
|
+
next: external_exports.string().describe("The URL for the next page, or null when unavailable.").nullable(),
|
|
772
|
+
previous: external_exports.string().describe("The URL for the previous page, or null when unavailable.").nullable(),
|
|
773
|
+
results: external_exports.array(external_exports.strictObject({
|
|
774
|
+
id: external_exports.int().describe("The numeric team identifier, when available.").nullable().optional(),
|
|
775
|
+
uuid: external_exports.string().describe("The stable UUID of the team, when available.").nullable().optional(),
|
|
776
|
+
name: external_exports.string().describe("The team name.").nullable().optional(),
|
|
777
|
+
description: external_exports.string().describe("The team description, when available.").nullable().optional(),
|
|
778
|
+
memberCount: external_exports.int().describe("The number of members in the team.").nullable().optional()
|
|
779
|
+
}).describe("A Docker Hub organization team.")).describe("The items in the current page.")
|
|
780
|
+
}).describe("A paginated Docker Hub team list.");
|
|
781
|
+
var getTeamInput = external_exports.strictObject({
|
|
782
|
+
orgName: external_exports.string().min(1).describe("The Docker Hub organization name."),
|
|
783
|
+
teamName: external_exports.string().min(1).describe("The team name.")
|
|
784
|
+
}).describe("The input payload for this action.");
|
|
785
|
+
var getTeamOutput = external_exports.strictObject({
|
|
786
|
+
team: external_exports.strictObject({
|
|
787
|
+
id: external_exports.int().describe("The numeric team identifier, when available.").nullable().optional(),
|
|
788
|
+
uuid: external_exports.string().describe("The stable UUID of the team, when available.").nullable().optional(),
|
|
789
|
+
name: external_exports.string().describe("The team name.").nullable().optional(),
|
|
790
|
+
description: external_exports.string().describe("The team description, when available.").nullable().optional(),
|
|
791
|
+
memberCount: external_exports.int().describe("The number of members in the team.").nullable().optional()
|
|
792
|
+
}).describe("A Docker Hub organization team.")
|
|
793
|
+
}).describe("The output payload for retrieving a Docker Hub team.");
|
|
794
|
+
var deleteTeamInput = external_exports.strictObject({
|
|
795
|
+
orgName: external_exports.string().min(1).describe("The Docker Hub organization name."),
|
|
796
|
+
teamName: external_exports.string().min(1).describe("The team name.")
|
|
797
|
+
}).describe("The input payload for this action.");
|
|
798
|
+
var deleteTeamOutput = external_exports.strictObject({
|
|
799
|
+
deleted: external_exports.boolean().describe("Whether the team deletion request completed.")
|
|
800
|
+
}).describe("The output payload for this action.");
|
|
801
|
+
var listTeamMembersInput = external_exports.strictObject({
|
|
802
|
+
orgName: external_exports.string().min(1).describe("The Docker Hub organization name."),
|
|
803
|
+
teamName: external_exports.string().min(1).describe("The team name."),
|
|
804
|
+
page: external_exports.int().min(1).describe("The page number to retrieve.").optional(),
|
|
805
|
+
pageSize: external_exports.int().min(1).max(100).describe("The number of results to return per page.").optional(),
|
|
806
|
+
search: external_exports.string().min(1).describe("An optional member search term.").optional()
|
|
807
|
+
}).describe("The input payload for this action.");
|
|
808
|
+
var listTeamMembersOutput = external_exports.strictObject({
|
|
809
|
+
count: external_exports.int().describe("The total number of matching items."),
|
|
810
|
+
next: external_exports.string().describe("The URL for the next page, or null when unavailable.").nullable(),
|
|
811
|
+
previous: external_exports.string().describe("The URL for the previous page, or null when unavailable.").nullable(),
|
|
812
|
+
results: external_exports.array(external_exports.strictObject({
|
|
813
|
+
id: external_exports.string().describe("The member identifier, when available.").nullable().optional(),
|
|
814
|
+
username: external_exports.string().describe("The Docker Hub username of the team member.").nullable().optional(),
|
|
815
|
+
fullName: external_exports.string().describe("The full name of the team member, when available.").nullable().optional(),
|
|
816
|
+
email: external_exports.string().describe("The email address of the team member, when available.").nullable().optional(),
|
|
817
|
+
company: external_exports.string().describe("The company value returned for the member, when available.").nullable().optional(),
|
|
818
|
+
location: external_exports.string().describe("The location value returned for the member, when available.").nullable().optional(),
|
|
819
|
+
profileUrl: external_exports.string().describe("The profile URL returned for the member, when available.").nullable().optional(),
|
|
820
|
+
type: external_exports.string().describe("The Docker Hub member type, when available.").nullable().optional(),
|
|
821
|
+
dateJoined: external_exports.string().describe("The ISO 8601 timestamp when the member joined the team.").nullable().optional()
|
|
822
|
+
}).describe("A Docker Hub team member.")).describe("The items in the current page.")
|
|
823
|
+
}).describe("A paginated Docker Hub team member list.");
|
|
824
|
+
var removeTeamMemberInput = external_exports.strictObject({
|
|
825
|
+
orgName: external_exports.string().min(1).describe("The Docker Hub organization name."),
|
|
826
|
+
teamName: external_exports.string().min(1).describe("The team name."),
|
|
827
|
+
username: external_exports.string().min(1).describe("The Docker Hub username to remove from the team.")
|
|
828
|
+
}).describe("The input payload for this action.");
|
|
829
|
+
var removeTeamMemberOutput = external_exports.strictObject({
|
|
830
|
+
removed: external_exports.boolean().describe("Whether the team member removal request completed.")
|
|
831
|
+
}).describe("The output payload for this action.");
|
|
832
|
+
var dockerHubActions = {
|
|
833
|
+
list_repositories: {
|
|
834
|
+
description: "List Docker Hub repositories in a namespace with optional name filtering and ordering.",
|
|
835
|
+
effect: "read",
|
|
836
|
+
inputSchema: listRepositoriesInput,
|
|
837
|
+
outputSchema: external_exports.toJSONSchema(listRepositoriesOutput, { io: "output", unrepresentable: "any" })
|
|
838
|
+
},
|
|
839
|
+
get_repository: {
|
|
840
|
+
description: "Get detailed metadata for a Docker Hub repository within a namespace.",
|
|
841
|
+
effect: "read",
|
|
842
|
+
inputSchema: getRepositoryInput,
|
|
843
|
+
outputSchema: external_exports.toJSONSchema(getRepositoryOutput, { io: "output", unrepresentable: "any" })
|
|
844
|
+
},
|
|
845
|
+
create_repository: {
|
|
846
|
+
description: "Create a Docker Hub repository inside a namespace.",
|
|
847
|
+
effect: "write",
|
|
848
|
+
inputSchema: createRepositoryInput,
|
|
849
|
+
outputSchema: external_exports.toJSONSchema(createRepositoryOutput, { io: "output", unrepresentable: "any" })
|
|
850
|
+
},
|
|
851
|
+
get_tag: {
|
|
852
|
+
description: "Get metadata and image variants for a specific Docker Hub repository tag.",
|
|
853
|
+
effect: "read",
|
|
854
|
+
inputSchema: getTagInput,
|
|
855
|
+
outputSchema: external_exports.toJSONSchema(getTagOutput, { io: "output", unrepresentable: "any" })
|
|
856
|
+
},
|
|
857
|
+
get_image: {
|
|
858
|
+
description: "Find a Docker Hub image variant by digest by scanning the repository's published tags.",
|
|
859
|
+
effect: "read",
|
|
860
|
+
inputSchema: getImageInput,
|
|
861
|
+
outputSchema: external_exports.toJSONSchema(getImageOutput, { io: "output", unrepresentable: "any" })
|
|
862
|
+
},
|
|
863
|
+
list_org_members: {
|
|
864
|
+
description: "List Docker Hub organization members with optional filtering and pagination.",
|
|
865
|
+
effect: "read",
|
|
866
|
+
inputSchema: listOrgMembersInput,
|
|
867
|
+
outputSchema: external_exports.toJSONSchema(listOrgMembersOutput, { io: "output", unrepresentable: "any" })
|
|
868
|
+
},
|
|
869
|
+
add_org_member: {
|
|
870
|
+
description: "Invite a Docker ID or email address to join a Docker Hub organization.",
|
|
871
|
+
effect: "write",
|
|
872
|
+
inputSchema: addOrgMemberInput,
|
|
873
|
+
outputSchema: external_exports.toJSONSchema(addOrgMemberOutput, { io: "output", unrepresentable: "any" })
|
|
874
|
+
},
|
|
875
|
+
remove_org_member: {
|
|
876
|
+
description: "Remove a member from a Docker Hub organization.",
|
|
877
|
+
effect: "destructive",
|
|
878
|
+
inputSchema: removeOrgMemberInput,
|
|
879
|
+
outputSchema: external_exports.toJSONSchema(removeOrgMemberOutput, { io: "output", unrepresentable: "any" })
|
|
880
|
+
},
|
|
881
|
+
list_org_access_tokens: {
|
|
882
|
+
description: "List Docker Hub organization access tokens for an organization.",
|
|
883
|
+
effect: "read",
|
|
884
|
+
inputSchema: listOrgAccessTokensInput,
|
|
885
|
+
outputSchema: external_exports.toJSONSchema(listOrgAccessTokensOutput, { io: "output", unrepresentable: "any" })
|
|
886
|
+
},
|
|
887
|
+
list_teams: {
|
|
888
|
+
description: "List Docker Hub teams for an organization.",
|
|
889
|
+
effect: "read",
|
|
890
|
+
inputSchema: listTeamsInput,
|
|
891
|
+
outputSchema: external_exports.toJSONSchema(listTeamsOutput, { io: "output", unrepresentable: "any" })
|
|
892
|
+
},
|
|
893
|
+
get_team: {
|
|
894
|
+
description: "Get a Docker Hub team within an organization.",
|
|
895
|
+
effect: "read",
|
|
896
|
+
inputSchema: getTeamInput,
|
|
897
|
+
outputSchema: external_exports.toJSONSchema(getTeamOutput, { io: "output", unrepresentable: "any" })
|
|
898
|
+
},
|
|
899
|
+
delete_team: {
|
|
900
|
+
description: "Delete a Docker Hub team within an organization.",
|
|
901
|
+
effect: "destructive",
|
|
902
|
+
inputSchema: deleteTeamInput,
|
|
903
|
+
outputSchema: external_exports.toJSONSchema(deleteTeamOutput, { io: "output", unrepresentable: "any" })
|
|
904
|
+
},
|
|
905
|
+
list_team_members: {
|
|
906
|
+
description: "List members of a Docker Hub team within an organization.",
|
|
907
|
+
effect: "read",
|
|
908
|
+
inputSchema: listTeamMembersInput,
|
|
909
|
+
outputSchema: external_exports.toJSONSchema(listTeamMembersOutput, { io: "output", unrepresentable: "any" })
|
|
910
|
+
},
|
|
911
|
+
remove_team_member: {
|
|
912
|
+
description: "Remove a user from a Docker Hub team within an organization.",
|
|
913
|
+
effect: "destructive",
|
|
914
|
+
inputSchema: removeTeamMemberInput,
|
|
915
|
+
outputSchema: external_exports.toJSONSchema(removeTeamMemberOutput, { io: "output", unrepresentable: "any" })
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
|
|
919
|
+
// ../plugins/src/docker_hub/index.ts
|
|
920
|
+
function createDockerHubPlugin() {
|
|
921
|
+
return createProviderPlugin({
|
|
922
|
+
description: "Docker Hub",
|
|
923
|
+
actions: dockerHubActions,
|
|
924
|
+
handlers: {
|
|
925
|
+
list_repositories: listRepositories,
|
|
926
|
+
get_repository: getRepository,
|
|
927
|
+
create_repository: createRepository,
|
|
928
|
+
get_tag: getTag,
|
|
929
|
+
get_image: getImage,
|
|
930
|
+
list_org_members: listOrgMembers,
|
|
931
|
+
add_org_member: addOrgMember,
|
|
932
|
+
remove_org_member: removeOrgMember,
|
|
933
|
+
list_org_access_tokens: listOrgAccessTokens,
|
|
934
|
+
list_teams: listTeams,
|
|
935
|
+
get_team: getTeam,
|
|
936
|
+
delete_team: deleteTeam,
|
|
937
|
+
list_team_members: listTeamMembers,
|
|
938
|
+
remove_team_member: removeTeamMember
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
}
|
|
942
|
+
var docker_hub_default = createDockerHubPlugin();
|
|
943
|
+
export {
|
|
944
|
+
createDockerHubPlugin,
|
|
945
|
+
docker_hub_default as default
|
|
946
|
+
};
|