operations.py 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001
  1. # Generated by ariadne-codegen
  2. # Source: tools/graphql_codegen/artifacts/
  3. __all__ = [
  4. "ADD_ALIASES_GQL",
  5. "ADD_ARTIFACT_COLLECTION_TAGS_GQL",
  6. "ARTIFACT_BY_ID_GQL",
  7. "ARTIFACT_BY_NAME_GQL",
  8. "ARTIFACT_COLLECTION_ALIASES_GQL",
  9. "ARTIFACT_CREATED_BY_GQL",
  10. "ARTIFACT_MEMBERSHIP_BY_NAME_GQL",
  11. "ARTIFACT_TYPE_ARTIFACT_COLLECTIONS_GQL",
  12. "ARTIFACT_TYPE_GQL",
  13. "ARTIFACT_USED_BY_GQL",
  14. "CREATE_REGISTRY_MEMBERS_GQL",
  15. "DELETE_ALIASES_GQL",
  16. "DELETE_ARTIFACT_COLLECTION_TAGS_GQL",
  17. "DELETE_ARTIFACT_GQL",
  18. "DELETE_ARTIFACT_PORTFOLIO_GQL",
  19. "DELETE_ARTIFACT_SEQUENCE_GQL",
  20. "DELETE_REGISTRY_GQL",
  21. "DELETE_REGISTRY_MEMBERS_GQL",
  22. "FETCH_ARTIFACT_MANIFEST_GQL",
  23. "FETCH_LINKED_ARTIFACTS_GQL",
  24. "FETCH_ORG_ENTITY_FROM_ORGANIZATION_GQL",
  25. "FETCH_ORG_INFO_FROM_ENTITY_GQL",
  26. "FETCH_REGISTRIES_GQL",
  27. "FETCH_REGISTRY_GQL",
  28. "GET_ARTIFACT_FILES_GQL",
  29. "GET_ARTIFACT_FILE_URLS_GQL",
  30. "GET_ARTIFACT_MEMBERSHIP_FILES_GQL",
  31. "GET_ARTIFACT_MEMBERSHIP_FILE_URLS_GQL",
  32. "LINK_ARTIFACT_GQL",
  33. "PROJECT_ARTIFACTS_GQL",
  34. "PROJECT_ARTIFACT_COLLECTIONS_GQL",
  35. "PROJECT_ARTIFACT_COLLECTION_GQL",
  36. "PROJECT_ARTIFACT_TYPES_GQL",
  37. "PROJECT_ARTIFACT_TYPE_GQL",
  38. "REGISTRY_COLLECTIONS_GQL",
  39. "REGISTRY_TEAM_MEMBERS_GQL",
  40. "REGISTRY_USER_MEMBERS_GQL",
  41. "REGISTRY_VERSIONS_GQL",
  42. "RENAME_REGISTRY_GQL",
  43. "RUN_INPUT_ARTIFACTS_GQL",
  44. "RUN_OUTPUT_ARTIFACTS_GQL",
  45. "UNLINK_ARTIFACT_GQL",
  46. "UPDATE_ARTIFACT_GQL",
  47. "UPDATE_ARTIFACT_PORTFOLIO_GQL",
  48. "UPDATE_ARTIFACT_SEQUENCE_GQL",
  49. "UPDATE_ARTIFACT_SEQUENCE_TYPE_GQL",
  50. "UPDATE_TEAM_REGISTRY_ROLE_GQL",
  51. "UPDATE_USER_REGISTRY_ROLE_GQL",
  52. "UPSERT_REGISTRY_GQL",
  53. ]
  54. DELETE_ARTIFACT_SEQUENCE_GQL = """
  55. mutation DeleteArtifactSequence($id: ID!) {
  56. result: deleteArtifactSequence(input: {artifactSequenceID: $id}) {
  57. artifactCollection {
  58. __typename
  59. state
  60. }
  61. }
  62. }
  63. """
  64. DELETE_ARTIFACT_PORTFOLIO_GQL = """
  65. mutation DeleteArtifactPortfolio($id: ID!) {
  66. result: deleteArtifactPortfolio(input: {artifactPortfolioID: $id}) {
  67. artifactCollection {
  68. __typename
  69. state
  70. }
  71. }
  72. }
  73. """
  74. UPDATE_ARTIFACT_SEQUENCE_GQL = """
  75. mutation UpdateArtifactSequence($input: UpdateArtifactSequenceInput!) {
  76. result: updateArtifactSequence(input: $input) {
  77. artifactCollection {
  78. __typename
  79. ...ArtifactCollectionFragment
  80. }
  81. }
  82. }
  83. fragment ArtifactCollectionFragment on ArtifactCollection {
  84. __typename
  85. id
  86. name
  87. description
  88. createdAt
  89. updatedAt
  90. project {
  91. ...ProjectInfoFragment
  92. }
  93. type: defaultArtifactType {
  94. name
  95. }
  96. tags {
  97. edges {
  98. node {
  99. ...TagFragment
  100. }
  101. }
  102. }
  103. }
  104. fragment ProjectInfoFragment on Project {
  105. name
  106. entity {
  107. name
  108. }
  109. }
  110. fragment TagFragment on Tag {
  111. __typename
  112. id
  113. name
  114. }
  115. """
  116. UPDATE_ARTIFACT_PORTFOLIO_GQL = """
  117. mutation UpdateArtifactPortfolio($input: UpdateArtifactPortfolioInput!) {
  118. result: updateArtifactPortfolio(input: $input) {
  119. artifactCollection {
  120. __typename
  121. ...ArtifactCollectionFragment
  122. }
  123. }
  124. }
  125. fragment ArtifactCollectionFragment on ArtifactCollection {
  126. __typename
  127. id
  128. name
  129. description
  130. createdAt
  131. updatedAt
  132. project {
  133. ...ProjectInfoFragment
  134. }
  135. type: defaultArtifactType {
  136. name
  137. }
  138. tags {
  139. edges {
  140. node {
  141. ...TagFragment
  142. }
  143. }
  144. }
  145. }
  146. fragment ProjectInfoFragment on Project {
  147. name
  148. entity {
  149. name
  150. }
  151. }
  152. fragment TagFragment on Tag {
  153. __typename
  154. id
  155. name
  156. }
  157. """
  158. UPDATE_ARTIFACT_SEQUENCE_TYPE_GQL = """
  159. mutation UpdateArtifactSequenceType($input: MoveArtifactSequenceInput!) {
  160. result: moveArtifactSequence(input: $input) {
  161. artifactCollection {
  162. __typename
  163. ...ArtifactCollectionFragment
  164. }
  165. }
  166. }
  167. fragment ArtifactCollectionFragment on ArtifactCollection {
  168. __typename
  169. id
  170. name
  171. description
  172. createdAt
  173. updatedAt
  174. project {
  175. ...ProjectInfoFragment
  176. }
  177. type: defaultArtifactType {
  178. name
  179. }
  180. tags {
  181. edges {
  182. node {
  183. ...TagFragment
  184. }
  185. }
  186. }
  187. }
  188. fragment ProjectInfoFragment on Project {
  189. name
  190. entity {
  191. name
  192. }
  193. }
  194. fragment TagFragment on Tag {
  195. __typename
  196. id
  197. name
  198. }
  199. """
  200. ADD_ARTIFACT_COLLECTION_TAGS_GQL = """
  201. mutation AddArtifactCollectionTags($input: CreateArtifactCollectionTagAssignmentsInput!) {
  202. result: createArtifactCollectionTagAssignments(input: $input) {
  203. tags {
  204. ...TagFragment
  205. }
  206. }
  207. }
  208. fragment TagFragment on Tag {
  209. __typename
  210. id
  211. name
  212. }
  213. """
  214. DELETE_ARTIFACT_COLLECTION_TAGS_GQL = """
  215. mutation DeleteArtifactCollectionTags($input: DeleteArtifactCollectionTagAssignmentsInput!) {
  216. result: deleteArtifactCollectionTagAssignments(input: $input) {
  217. success
  218. }
  219. }
  220. """
  221. ARTIFACT_TYPE_ARTIFACT_COLLECTIONS_GQL = """
  222. query ArtifactTypeArtifactCollections($entity: String!, $project: String!, $type: String!, $cursor: String, $perPage: Int, $filters: JSONString, $order: String) {
  223. project(entityName: $entity, name: $project) {
  224. artifactType(name: $type) {
  225. artifactCollections(
  226. after: $cursor
  227. first: $perPage
  228. filters: $filters
  229. order: $order
  230. ) {
  231. totalCount
  232. pageInfo {
  233. ...PageInfoFragment
  234. }
  235. edges {
  236. node {
  237. __typename
  238. ...ArtifactCollectionFragment
  239. }
  240. }
  241. }
  242. }
  243. }
  244. }
  245. fragment ArtifactCollectionFragment on ArtifactCollection {
  246. __typename
  247. id
  248. name
  249. description
  250. createdAt
  251. updatedAt
  252. project {
  253. ...ProjectInfoFragment
  254. }
  255. type: defaultArtifactType {
  256. name
  257. }
  258. tags {
  259. edges {
  260. node {
  261. ...TagFragment
  262. }
  263. }
  264. }
  265. }
  266. fragment PageInfoFragment on PageInfo {
  267. __typename
  268. endCursor
  269. hasNextPage
  270. }
  271. fragment ProjectInfoFragment on Project {
  272. name
  273. entity {
  274. name
  275. }
  276. }
  277. fragment TagFragment on Tag {
  278. __typename
  279. id
  280. name
  281. }
  282. """
  283. PROJECT_ARTIFACT_COLLECTIONS_GQL = """
  284. query ProjectArtifactCollections($entity: String!, $project: String!, $cursor: String, $perPage: Int, $filters: JSONString, $order: String) {
  285. project(entityName: $entity, name: $project) {
  286. artifactCollections(
  287. after: $cursor
  288. first: $perPage
  289. filters: $filters
  290. order: $order
  291. ) {
  292. totalCount @include(if: true)
  293. pageInfo {
  294. ...PageInfoFragment
  295. }
  296. edges {
  297. node {
  298. __typename
  299. ...ArtifactCollectionFragment
  300. }
  301. }
  302. }
  303. }
  304. }
  305. fragment ArtifactCollectionFragment on ArtifactCollection {
  306. __typename
  307. id
  308. name
  309. description
  310. createdAt
  311. updatedAt
  312. project {
  313. ...ProjectInfoFragment
  314. }
  315. type: defaultArtifactType {
  316. name
  317. }
  318. tags {
  319. edges {
  320. node {
  321. ...TagFragment
  322. }
  323. }
  324. }
  325. }
  326. fragment PageInfoFragment on PageInfo {
  327. __typename
  328. endCursor
  329. hasNextPage
  330. }
  331. fragment ProjectInfoFragment on Project {
  332. name
  333. entity {
  334. name
  335. }
  336. }
  337. fragment TagFragment on Tag {
  338. __typename
  339. id
  340. name
  341. }
  342. """
  343. PROJECT_ARTIFACT_COLLECTION_GQL = """
  344. query ProjectArtifactCollection($entity: String!, $project: String!, $type: String!, $name: String!) {
  345. project(entityName: $entity, name: $project) {
  346. artifactType(name: $type) {
  347. artifactCollection(name: $name) {
  348. __typename
  349. ...ArtifactCollectionFragment
  350. }
  351. }
  352. }
  353. }
  354. fragment ArtifactCollectionFragment on ArtifactCollection {
  355. __typename
  356. id
  357. name
  358. description
  359. createdAt
  360. updatedAt
  361. project {
  362. ...ProjectInfoFragment
  363. }
  364. type: defaultArtifactType {
  365. name
  366. }
  367. tags {
  368. edges {
  369. node {
  370. ...TagFragment
  371. }
  372. }
  373. }
  374. }
  375. fragment ProjectInfoFragment on Project {
  376. name
  377. entity {
  378. name
  379. }
  380. }
  381. fragment TagFragment on Tag {
  382. __typename
  383. id
  384. name
  385. }
  386. """
  387. ARTIFACT_COLLECTION_ALIASES_GQL = """
  388. query ArtifactCollectionAliases($id: ID!, $cursor: String, $perPage: Int = 1000) {
  389. artifactCollection(id: $id) {
  390. __typename
  391. aliases(after: $cursor, first: $perPage) {
  392. pageInfo {
  393. ...PageInfoFragment
  394. }
  395. edges {
  396. node {
  397. ...ArtifactAliasFragment
  398. }
  399. }
  400. }
  401. }
  402. }
  403. fragment ArtifactAliasFragment on ArtifactAlias {
  404. __typename
  405. id
  406. alias
  407. }
  408. fragment PageInfoFragment on PageInfo {
  409. __typename
  410. endCursor
  411. hasNextPage
  412. }
  413. """
  414. GET_ARTIFACT_FILES_GQL = """
  415. query GetArtifactFiles($entity: String!, $project: String!, $type: String!, $name: String!, $fileNames: [String!], $cursor: String, $perPage: Int = 50) {
  416. project(name: $project, entityName: $entity) {
  417. artifactType(name: $type) {
  418. artifact(name: $name) {
  419. files(names: $fileNames, after: $cursor, first: $perPage) {
  420. totalCount @include(if: true)
  421. pageInfo {
  422. ...PageInfoFragment
  423. }
  424. edges {
  425. node {
  426. ...FileFragment
  427. }
  428. }
  429. }
  430. }
  431. }
  432. }
  433. }
  434. fragment FileFragment on File {
  435. __typename
  436. id
  437. name: displayName
  438. url
  439. sizeBytes
  440. storagePath
  441. mimetype
  442. updatedAt
  443. digest
  444. md5
  445. directUrl
  446. }
  447. fragment PageInfoFragment on PageInfo {
  448. __typename
  449. endCursor
  450. hasNextPage
  451. }
  452. """
  453. GET_ARTIFACT_MEMBERSHIP_FILES_GQL = """
  454. query GetArtifactMembershipFiles($entity: String!, $project: String!, $collection: String!, $alias: String!, $fileNames: [String!], $cursor: String, $perPage: Int = 50) {
  455. project(name: $project, entityName: $entity) {
  456. artifactCollection(name: $collection) {
  457. __typename
  458. artifactMembership(aliasName: $alias) {
  459. files(names: $fileNames, after: $cursor, first: $perPage) {
  460. totalCount @include(if: true)
  461. pageInfo {
  462. ...PageInfoFragment
  463. }
  464. edges {
  465. node {
  466. ...FileFragment
  467. }
  468. }
  469. }
  470. }
  471. }
  472. }
  473. }
  474. fragment FileFragment on File {
  475. __typename
  476. id
  477. name: displayName
  478. url
  479. sizeBytes
  480. storagePath
  481. mimetype
  482. updatedAt
  483. digest
  484. md5
  485. directUrl
  486. }
  487. fragment PageInfoFragment on PageInfo {
  488. __typename
  489. endCursor
  490. hasNextPage
  491. }
  492. """
  493. GET_ARTIFACT_FILE_URLS_GQL = """
  494. query GetArtifactFileUrls($id: ID!, $cursor: String, $perPage: Int) {
  495. artifact(id: $id) {
  496. files(after: $cursor, first: $perPage) {
  497. pageInfo {
  498. ...PageInfoFragment
  499. }
  500. edges {
  501. node {
  502. ...FileWithUrlFragment
  503. }
  504. }
  505. }
  506. }
  507. }
  508. fragment FileWithUrlFragment on File {
  509. __typename
  510. name
  511. directUrl
  512. }
  513. fragment PageInfoFragment on PageInfo {
  514. __typename
  515. endCursor
  516. hasNextPage
  517. }
  518. """
  519. GET_ARTIFACT_MEMBERSHIP_FILE_URLS_GQL = """
  520. query GetArtifactMembershipFileUrls($entity: String!, $project: String!, $collection: String!, $alias: String!, $cursor: String, $perPage: Int) {
  521. project(name: $project, entityName: $entity) {
  522. artifactCollection(name: $collection) {
  523. __typename
  524. artifactMembership(aliasName: $alias) {
  525. files(after: $cursor, first: $perPage) {
  526. pageInfo {
  527. ...PageInfoFragment
  528. }
  529. edges {
  530. node {
  531. ...FileWithUrlFragment
  532. }
  533. }
  534. }
  535. }
  536. }
  537. }
  538. }
  539. fragment FileWithUrlFragment on File {
  540. __typename
  541. name
  542. directUrl
  543. }
  544. fragment PageInfoFragment on PageInfo {
  545. __typename
  546. endCursor
  547. hasNextPage
  548. }
  549. """
  550. PROJECT_ARTIFACT_TYPES_GQL = """
  551. query ProjectArtifactTypes($entity: String!, $project: String!, $cursor: String, $perPage: Int) {
  552. project(name: $project, entityName: $entity) {
  553. artifactTypes(after: $cursor, first: $perPage) {
  554. edges {
  555. node {
  556. ...ArtifactTypeFragment
  557. }
  558. }
  559. pageInfo {
  560. ...PageInfoFragment
  561. }
  562. }
  563. }
  564. }
  565. fragment ArtifactTypeFragment on ArtifactType {
  566. __typename
  567. id
  568. name
  569. description
  570. createdAt
  571. }
  572. fragment PageInfoFragment on PageInfo {
  573. __typename
  574. endCursor
  575. hasNextPage
  576. }
  577. """
  578. PROJECT_ARTIFACT_TYPE_GQL = """
  579. query ProjectArtifactType($entity: String!, $project: String!, $type: String!) {
  580. project(entityName: $entity, name: $project) {
  581. artifactType(name: $type) {
  582. ...ArtifactTypeFragment
  583. }
  584. }
  585. }
  586. fragment ArtifactTypeFragment on ArtifactType {
  587. __typename
  588. id
  589. name
  590. description
  591. createdAt
  592. }
  593. """
  594. PROJECT_ARTIFACTS_GQL = """
  595. query ProjectArtifacts($entity: String!, $project: String!, $type: String!, $collection: String!, $cursor: String, $perPage: Int = 50, $order: String, $filters: JSONString, $includeAliases: Boolean = true) {
  596. project(entityName: $entity, name: $project) {
  597. artifactType(name: $type) {
  598. artifactCollection(name: $collection) {
  599. __typename
  600. artifacts(after: $cursor, first: $perPage, order: $order, filters: $filters) {
  601. totalCount
  602. pageInfo {
  603. ...PageInfoFragment
  604. }
  605. edges {
  606. version
  607. node {
  608. ...ArtifactFragment
  609. }
  610. }
  611. }
  612. }
  613. }
  614. }
  615. }
  616. fragment ArtifactAliasFragment on ArtifactAlias {
  617. __typename
  618. id
  619. alias
  620. }
  621. fragment ArtifactFragment on Artifact {
  622. __typename
  623. id
  624. artifactSequence {
  625. ...SourceCollectionInfoFragment
  626. }
  627. versionIndex
  628. artifactType {
  629. name
  630. }
  631. description
  632. metadata
  633. ttlDurationSeconds
  634. ttlIsInherited
  635. tags {
  636. ...TagFragment
  637. }
  638. historyStep
  639. state
  640. size
  641. digest
  642. commitHash
  643. fileCount
  644. createdAt
  645. updatedAt
  646. aliases @include(if: $includeAliases) {
  647. artifactCollection {
  648. ...CollectionInfoFragment
  649. }
  650. ...ArtifactAliasFragment
  651. }
  652. }
  653. fragment CollectionInfoFragment on ArtifactCollection {
  654. __typename
  655. name
  656. project {
  657. ...ProjectInfoFragment
  658. }
  659. }
  660. fragment PageInfoFragment on PageInfo {
  661. __typename
  662. endCursor
  663. hasNextPage
  664. }
  665. fragment ProjectInfoFragment on Project {
  666. name
  667. entity {
  668. name
  669. }
  670. }
  671. fragment SourceCollectionInfoFragment on ArtifactSequence {
  672. __typename
  673. name
  674. project {
  675. ...ProjectInfoFragment
  676. }
  677. }
  678. fragment TagFragment on Tag {
  679. __typename
  680. id
  681. name
  682. }
  683. """
  684. RUN_OUTPUT_ARTIFACTS_GQL = """
  685. query RunOutputArtifacts($entity: String!, $project: String!, $run: String!, $cursor: String, $perPage: Int, $includeAliases: Boolean = true) {
  686. project(entityName: $entity, name: $project) {
  687. run(name: $run) {
  688. artifacts: outputArtifacts(after: $cursor, first: $perPage) {
  689. totalCount
  690. pageInfo {
  691. ...PageInfoFragment
  692. }
  693. edges {
  694. node {
  695. ...ArtifactFragment
  696. }
  697. }
  698. }
  699. }
  700. }
  701. }
  702. fragment ArtifactAliasFragment on ArtifactAlias {
  703. __typename
  704. id
  705. alias
  706. }
  707. fragment ArtifactFragment on Artifact {
  708. __typename
  709. id
  710. artifactSequence {
  711. ...SourceCollectionInfoFragment
  712. }
  713. versionIndex
  714. artifactType {
  715. name
  716. }
  717. description
  718. metadata
  719. ttlDurationSeconds
  720. ttlIsInherited
  721. tags {
  722. ...TagFragment
  723. }
  724. historyStep
  725. state
  726. size
  727. digest
  728. commitHash
  729. fileCount
  730. createdAt
  731. updatedAt
  732. aliases @include(if: $includeAliases) {
  733. artifactCollection {
  734. ...CollectionInfoFragment
  735. }
  736. ...ArtifactAliasFragment
  737. }
  738. }
  739. fragment CollectionInfoFragment on ArtifactCollection {
  740. __typename
  741. name
  742. project {
  743. ...ProjectInfoFragment
  744. }
  745. }
  746. fragment PageInfoFragment on PageInfo {
  747. __typename
  748. endCursor
  749. hasNextPage
  750. }
  751. fragment ProjectInfoFragment on Project {
  752. name
  753. entity {
  754. name
  755. }
  756. }
  757. fragment SourceCollectionInfoFragment on ArtifactSequence {
  758. __typename
  759. name
  760. project {
  761. ...ProjectInfoFragment
  762. }
  763. }
  764. fragment TagFragment on Tag {
  765. __typename
  766. id
  767. name
  768. }
  769. """
  770. RUN_INPUT_ARTIFACTS_GQL = """
  771. query RunInputArtifacts($entity: String!, $project: String!, $run: String!, $cursor: String, $perPage: Int, $includeAliases: Boolean = true) {
  772. project(entityName: $entity, name: $project) {
  773. run(name: $run) {
  774. artifacts: inputArtifacts(after: $cursor, first: $perPage) {
  775. totalCount
  776. pageInfo {
  777. ...PageInfoFragment
  778. }
  779. edges {
  780. node {
  781. ...ArtifactFragment
  782. }
  783. }
  784. }
  785. }
  786. }
  787. }
  788. fragment ArtifactAliasFragment on ArtifactAlias {
  789. __typename
  790. id
  791. alias
  792. }
  793. fragment ArtifactFragment on Artifact {
  794. __typename
  795. id
  796. artifactSequence {
  797. ...SourceCollectionInfoFragment
  798. }
  799. versionIndex
  800. artifactType {
  801. name
  802. }
  803. description
  804. metadata
  805. ttlDurationSeconds
  806. ttlIsInherited
  807. tags {
  808. ...TagFragment
  809. }
  810. historyStep
  811. state
  812. size
  813. digest
  814. commitHash
  815. fileCount
  816. createdAt
  817. updatedAt
  818. aliases @include(if: $includeAliases) {
  819. artifactCollection {
  820. ...CollectionInfoFragment
  821. }
  822. ...ArtifactAliasFragment
  823. }
  824. }
  825. fragment CollectionInfoFragment on ArtifactCollection {
  826. __typename
  827. name
  828. project {
  829. ...ProjectInfoFragment
  830. }
  831. }
  832. fragment PageInfoFragment on PageInfo {
  833. __typename
  834. endCursor
  835. hasNextPage
  836. }
  837. fragment ProjectInfoFragment on Project {
  838. name
  839. entity {
  840. name
  841. }
  842. }
  843. fragment SourceCollectionInfoFragment on ArtifactSequence {
  844. __typename
  845. name
  846. project {
  847. ...ProjectInfoFragment
  848. }
  849. }
  850. fragment TagFragment on Tag {
  851. __typename
  852. id
  853. name
  854. }
  855. """
  856. FETCH_LINKED_ARTIFACTS_GQL = """
  857. query FetchLinkedArtifacts($artifactID: ID!) {
  858. artifact(id: $artifactID) {
  859. artifactMemberships {
  860. edges {
  861. node {
  862. versionIndex
  863. aliases {
  864. ...ArtifactAliasFragment
  865. }
  866. artifactCollection {
  867. __typename
  868. ...CollectionInfoFragment
  869. }
  870. }
  871. }
  872. }
  873. }
  874. }
  875. fragment ArtifactAliasFragment on ArtifactAlias {
  876. __typename
  877. id
  878. alias
  879. }
  880. fragment CollectionInfoFragment on ArtifactCollection {
  881. __typename
  882. name
  883. project {
  884. ...ProjectInfoFragment
  885. }
  886. }
  887. fragment ProjectInfoFragment on Project {
  888. name
  889. entity {
  890. name
  891. }
  892. }
  893. """
  894. FETCH_ARTIFACT_MANIFEST_GQL = """
  895. query FetchArtifactManifest($id: ID!) {
  896. artifact(id: $id) {
  897. currentManifest {
  898. ...DeferredManifestFragment
  899. }
  900. }
  901. }
  902. fragment DeferredManifestFragment on ArtifactManifest {
  903. file {
  904. directUrl
  905. }
  906. }
  907. """
  908. ARTIFACT_BY_ID_GQL = """
  909. query ArtifactByID($id: ID!, $includeAliases: Boolean = true) {
  910. artifact(id: $id) {
  911. ...ArtifactFragment
  912. }
  913. }
  914. fragment ArtifactAliasFragment on ArtifactAlias {
  915. __typename
  916. id
  917. alias
  918. }
  919. fragment ArtifactFragment on Artifact {
  920. __typename
  921. id
  922. artifactSequence {
  923. ...SourceCollectionInfoFragment
  924. }
  925. versionIndex
  926. artifactType {
  927. name
  928. }
  929. description
  930. metadata
  931. ttlDurationSeconds
  932. ttlIsInherited
  933. tags {
  934. ...TagFragment
  935. }
  936. historyStep
  937. state
  938. size
  939. digest
  940. commitHash
  941. fileCount
  942. createdAt
  943. updatedAt
  944. aliases @include(if: $includeAliases) {
  945. artifactCollection {
  946. ...CollectionInfoFragment
  947. }
  948. ...ArtifactAliasFragment
  949. }
  950. }
  951. fragment CollectionInfoFragment on ArtifactCollection {
  952. __typename
  953. name
  954. project {
  955. ...ProjectInfoFragment
  956. }
  957. }
  958. fragment ProjectInfoFragment on Project {
  959. name
  960. entity {
  961. name
  962. }
  963. }
  964. fragment SourceCollectionInfoFragment on ArtifactSequence {
  965. __typename
  966. name
  967. project {
  968. ...ProjectInfoFragment
  969. }
  970. }
  971. fragment TagFragment on Tag {
  972. __typename
  973. id
  974. name
  975. }
  976. """
  977. ARTIFACT_BY_NAME_GQL = """
  978. query ArtifactByName($entity: String!, $project: String!, $name: String!, $enableTracking: Boolean, $includeAliases: Boolean = true) {
  979. project(name: $project, entityName: $entity) {
  980. artifact(name: $name, enableTracking: $enableTracking) {
  981. ...ArtifactFragment
  982. }
  983. }
  984. }
  985. fragment ArtifactAliasFragment on ArtifactAlias {
  986. __typename
  987. id
  988. alias
  989. }
  990. fragment ArtifactFragment on Artifact {
  991. __typename
  992. id
  993. artifactSequence {
  994. ...SourceCollectionInfoFragment
  995. }
  996. versionIndex
  997. artifactType {
  998. name
  999. }
  1000. description
  1001. metadata
  1002. ttlDurationSeconds
  1003. ttlIsInherited
  1004. tags {
  1005. ...TagFragment
  1006. }
  1007. historyStep
  1008. state
  1009. size
  1010. digest
  1011. commitHash
  1012. fileCount
  1013. createdAt
  1014. updatedAt
  1015. aliases @include(if: $includeAliases) {
  1016. artifactCollection {
  1017. ...CollectionInfoFragment
  1018. }
  1019. ...ArtifactAliasFragment
  1020. }
  1021. }
  1022. fragment CollectionInfoFragment on ArtifactCollection {
  1023. __typename
  1024. name
  1025. project {
  1026. ...ProjectInfoFragment
  1027. }
  1028. }
  1029. fragment ProjectInfoFragment on Project {
  1030. name
  1031. entity {
  1032. name
  1033. }
  1034. }
  1035. fragment SourceCollectionInfoFragment on ArtifactSequence {
  1036. __typename
  1037. name
  1038. project {
  1039. ...ProjectInfoFragment
  1040. }
  1041. }
  1042. fragment TagFragment on Tag {
  1043. __typename
  1044. id
  1045. name
  1046. }
  1047. """
  1048. ARTIFACT_MEMBERSHIP_BY_NAME_GQL = """
  1049. query ArtifactMembershipByName($entity: String!, $project: String!, $name: String!, $includeAliases: Boolean = false) {
  1050. project(name: $project, entityName: $entity) {
  1051. artifactCollectionMembership(name: $name) {
  1052. ...ArtifactMembershipFragment
  1053. }
  1054. }
  1055. }
  1056. fragment ArtifactAliasFragment on ArtifactAlias {
  1057. __typename
  1058. id
  1059. alias
  1060. }
  1061. fragment ArtifactFragment on Artifact {
  1062. __typename
  1063. id
  1064. artifactSequence {
  1065. ...SourceCollectionInfoFragment
  1066. }
  1067. versionIndex
  1068. artifactType {
  1069. name
  1070. }
  1071. description
  1072. metadata
  1073. ttlDurationSeconds
  1074. ttlIsInherited
  1075. tags {
  1076. ...TagFragment
  1077. }
  1078. historyStep
  1079. state
  1080. size
  1081. digest
  1082. commitHash
  1083. fileCount
  1084. createdAt
  1085. updatedAt
  1086. aliases @include(if: $includeAliases) {
  1087. artifactCollection {
  1088. ...CollectionInfoFragment
  1089. }
  1090. ...ArtifactAliasFragment
  1091. }
  1092. }
  1093. fragment ArtifactMembershipFragment on ArtifactCollectionMembership {
  1094. __typename
  1095. id
  1096. versionIndex
  1097. aliases {
  1098. ...ArtifactAliasFragment
  1099. }
  1100. artifactCollection {
  1101. ...CollectionInfoFragment
  1102. }
  1103. artifact {
  1104. ...ArtifactFragment
  1105. }
  1106. }
  1107. fragment CollectionInfoFragment on ArtifactCollection {
  1108. __typename
  1109. name
  1110. project {
  1111. ...ProjectInfoFragment
  1112. }
  1113. }
  1114. fragment ProjectInfoFragment on Project {
  1115. name
  1116. entity {
  1117. name
  1118. }
  1119. }
  1120. fragment SourceCollectionInfoFragment on ArtifactSequence {
  1121. __typename
  1122. name
  1123. project {
  1124. ...ProjectInfoFragment
  1125. }
  1126. }
  1127. fragment TagFragment on Tag {
  1128. __typename
  1129. id
  1130. name
  1131. }
  1132. """
  1133. ARTIFACT_USED_BY_GQL = """
  1134. query ArtifactUsedBy($id: ID!) {
  1135. artifact(id: $id) {
  1136. usedBy {
  1137. edges {
  1138. node {
  1139. ...RunInfoFragment
  1140. }
  1141. }
  1142. }
  1143. }
  1144. }
  1145. fragment ProjectInfoFragment on Project {
  1146. name
  1147. entity {
  1148. name
  1149. }
  1150. }
  1151. fragment RunInfoFragment on Run {
  1152. __typename
  1153. id
  1154. name
  1155. project {
  1156. ...ProjectInfoFragment
  1157. }
  1158. }
  1159. """
  1160. ARTIFACT_CREATED_BY_GQL = """
  1161. query ArtifactCreatedBy($id: ID!) {
  1162. artifact(id: $id) {
  1163. createdBy {
  1164. __typename
  1165. ... on Run {
  1166. ...RunInfoFragment
  1167. }
  1168. }
  1169. }
  1170. }
  1171. fragment ProjectInfoFragment on Project {
  1172. name
  1173. entity {
  1174. name
  1175. }
  1176. }
  1177. fragment RunInfoFragment on Run {
  1178. __typename
  1179. id
  1180. name
  1181. project {
  1182. ...ProjectInfoFragment
  1183. }
  1184. }
  1185. """
  1186. ARTIFACT_TYPE_GQL = """
  1187. query ArtifactType($entity: String, $project: String, $name: String!) {
  1188. project(name: $project, entityName: $entity) {
  1189. artifact(name: $name) {
  1190. artifactType {
  1191. name
  1192. }
  1193. }
  1194. }
  1195. }
  1196. """
  1197. ADD_ALIASES_GQL = """
  1198. mutation AddAliases($input: AddAliasesInput!) {
  1199. result: addAliases(input: $input) {
  1200. success
  1201. }
  1202. }
  1203. """
  1204. DELETE_ALIASES_GQL = """
  1205. mutation DeleteAliases($input: DeleteAliasesInput!) {
  1206. result: deleteAliases(input: $input) {
  1207. success
  1208. }
  1209. }
  1210. """
  1211. UPDATE_ARTIFACT_GQL = """
  1212. mutation UpdateArtifact($input: UpdateArtifactInput!, $includeAliases: Boolean = true) {
  1213. result: updateArtifact(input: $input) {
  1214. artifact {
  1215. ...ArtifactFragment
  1216. }
  1217. }
  1218. }
  1219. fragment ArtifactAliasFragment on ArtifactAlias {
  1220. __typename
  1221. id
  1222. alias
  1223. }
  1224. fragment ArtifactFragment on Artifact {
  1225. __typename
  1226. id
  1227. artifactSequence {
  1228. ...SourceCollectionInfoFragment
  1229. }
  1230. versionIndex
  1231. artifactType {
  1232. name
  1233. }
  1234. description
  1235. metadata
  1236. ttlDurationSeconds
  1237. ttlIsInherited
  1238. tags {
  1239. ...TagFragment
  1240. }
  1241. historyStep
  1242. state
  1243. size
  1244. digest
  1245. commitHash
  1246. fileCount
  1247. createdAt
  1248. updatedAt
  1249. aliases @include(if: $includeAliases) {
  1250. artifactCollection {
  1251. ...CollectionInfoFragment
  1252. }
  1253. ...ArtifactAliasFragment
  1254. }
  1255. }
  1256. fragment CollectionInfoFragment on ArtifactCollection {
  1257. __typename
  1258. name
  1259. project {
  1260. ...ProjectInfoFragment
  1261. }
  1262. }
  1263. fragment ProjectInfoFragment on Project {
  1264. name
  1265. entity {
  1266. name
  1267. }
  1268. }
  1269. fragment SourceCollectionInfoFragment on ArtifactSequence {
  1270. __typename
  1271. name
  1272. project {
  1273. ...ProjectInfoFragment
  1274. }
  1275. }
  1276. fragment TagFragment on Tag {
  1277. __typename
  1278. id
  1279. name
  1280. }
  1281. """
  1282. DELETE_ARTIFACT_GQL = """
  1283. mutation DeleteArtifact($input: DeleteArtifactInput!) {
  1284. result: deleteArtifact(input: $input) {
  1285. artifact {
  1286. id
  1287. }
  1288. }
  1289. }
  1290. """
  1291. LINK_ARTIFACT_GQL = """
  1292. mutation LinkArtifact($input: LinkArtifactInput!, $includeAliases: Boolean = true) {
  1293. result: linkArtifact(input: $input) {
  1294. versionIndex
  1295. artifactMembership @include(if: true) {
  1296. ...ArtifactMembershipFragment
  1297. }
  1298. }
  1299. }
  1300. fragment ArtifactAliasFragment on ArtifactAlias {
  1301. __typename
  1302. id
  1303. alias
  1304. }
  1305. fragment ArtifactFragment on Artifact {
  1306. __typename
  1307. id
  1308. artifactSequence {
  1309. ...SourceCollectionInfoFragment
  1310. }
  1311. versionIndex
  1312. artifactType {
  1313. name
  1314. }
  1315. description
  1316. metadata
  1317. ttlDurationSeconds
  1318. ttlIsInherited
  1319. tags {
  1320. ...TagFragment
  1321. }
  1322. historyStep
  1323. state
  1324. size
  1325. digest
  1326. commitHash
  1327. fileCount
  1328. createdAt
  1329. updatedAt
  1330. aliases @include(if: $includeAliases) {
  1331. artifactCollection {
  1332. ...CollectionInfoFragment
  1333. }
  1334. ...ArtifactAliasFragment
  1335. }
  1336. }
  1337. fragment ArtifactMembershipFragment on ArtifactCollectionMembership {
  1338. __typename
  1339. id
  1340. versionIndex
  1341. aliases {
  1342. ...ArtifactAliasFragment
  1343. }
  1344. artifactCollection {
  1345. ...CollectionInfoFragment
  1346. }
  1347. artifact {
  1348. ...ArtifactFragment
  1349. }
  1350. }
  1351. fragment CollectionInfoFragment on ArtifactCollection {
  1352. __typename
  1353. name
  1354. project {
  1355. ...ProjectInfoFragment
  1356. }
  1357. }
  1358. fragment ProjectInfoFragment on Project {
  1359. name
  1360. entity {
  1361. name
  1362. }
  1363. }
  1364. fragment SourceCollectionInfoFragment on ArtifactSequence {
  1365. __typename
  1366. name
  1367. project {
  1368. ...ProjectInfoFragment
  1369. }
  1370. }
  1371. fragment TagFragment on Tag {
  1372. __typename
  1373. id
  1374. name
  1375. }
  1376. """
  1377. UNLINK_ARTIFACT_GQL = """
  1378. mutation UnlinkArtifact($input: UnlinkArtifactInput!) {
  1379. result: unlinkArtifact(input: $input) {
  1380. success
  1381. }
  1382. }
  1383. """
  1384. FETCH_ORG_INFO_FROM_ENTITY_GQL = """
  1385. query FetchOrgInfoFromEntity($entity: String!) {
  1386. entity(name: $entity) {
  1387. organization {
  1388. ...OrgInfoFragment
  1389. }
  1390. user {
  1391. organizations {
  1392. ...OrgInfoFragment
  1393. }
  1394. }
  1395. }
  1396. }
  1397. fragment OrgInfoFragment on Organization {
  1398. name
  1399. orgEntity {
  1400. name
  1401. }
  1402. }
  1403. """
  1404. FETCH_ORG_ENTITY_FROM_ORGANIZATION_GQL = """
  1405. query FetchOrgEntityFromOrganization($organization: String!) {
  1406. organization(name: $organization) {
  1407. orgEntity {
  1408. name
  1409. }
  1410. }
  1411. }
  1412. """
  1413. REGISTRY_VERSIONS_GQL = """
  1414. query RegistryVersions($organization: String!, $registryFilter: JSONString, $collectionFilter: JSONString, $artifactFilter: JSONString, $cursor: String, $perPage: Int, $includeAliases: Boolean = false) {
  1415. organization(name: $organization) {
  1416. orgEntity {
  1417. name
  1418. artifactMemberships(
  1419. projectFilters: $registryFilter
  1420. collectionFilters: $collectionFilter
  1421. filters: $artifactFilter
  1422. after: $cursor
  1423. first: $perPage
  1424. ) {
  1425. pageInfo {
  1426. ...PageInfoFragment
  1427. }
  1428. edges {
  1429. node {
  1430. ...ArtifactMembershipFragment
  1431. }
  1432. }
  1433. }
  1434. }
  1435. }
  1436. }
  1437. fragment ArtifactAliasFragment on ArtifactAlias {
  1438. __typename
  1439. id
  1440. alias
  1441. }
  1442. fragment ArtifactFragment on Artifact {
  1443. __typename
  1444. id
  1445. artifactSequence {
  1446. ...SourceCollectionInfoFragment
  1447. }
  1448. versionIndex
  1449. artifactType {
  1450. name
  1451. }
  1452. description
  1453. metadata
  1454. ttlDurationSeconds
  1455. ttlIsInherited
  1456. tags {
  1457. ...TagFragment
  1458. }
  1459. historyStep
  1460. state
  1461. size
  1462. digest
  1463. commitHash
  1464. fileCount
  1465. createdAt
  1466. updatedAt
  1467. aliases @include(if: $includeAliases) {
  1468. artifactCollection {
  1469. ...CollectionInfoFragment
  1470. }
  1471. ...ArtifactAliasFragment
  1472. }
  1473. }
  1474. fragment ArtifactMembershipFragment on ArtifactCollectionMembership {
  1475. __typename
  1476. id
  1477. versionIndex
  1478. aliases {
  1479. ...ArtifactAliasFragment
  1480. }
  1481. artifactCollection {
  1482. ...CollectionInfoFragment
  1483. }
  1484. artifact {
  1485. ...ArtifactFragment
  1486. }
  1487. }
  1488. fragment CollectionInfoFragment on ArtifactCollection {
  1489. __typename
  1490. name
  1491. project {
  1492. ...ProjectInfoFragment
  1493. }
  1494. }
  1495. fragment PageInfoFragment on PageInfo {
  1496. __typename
  1497. endCursor
  1498. hasNextPage
  1499. }
  1500. fragment ProjectInfoFragment on Project {
  1501. name
  1502. entity {
  1503. name
  1504. }
  1505. }
  1506. fragment SourceCollectionInfoFragment on ArtifactSequence {
  1507. __typename
  1508. name
  1509. project {
  1510. ...ProjectInfoFragment
  1511. }
  1512. }
  1513. fragment TagFragment on Tag {
  1514. __typename
  1515. id
  1516. name
  1517. }
  1518. """
  1519. REGISTRY_COLLECTIONS_GQL = """
  1520. query RegistryCollections($organization: String!, $registryFilter: JSONString, $collectionFilter: JSONString, $collectionTypes: [ArtifactCollectionType!] = [PORTFOLIO], $cursor: String, $perPage: Int) {
  1521. organization(name: $organization) {
  1522. orgEntity {
  1523. name
  1524. artifactCollections(
  1525. projectFilters: $registryFilter
  1526. filters: $collectionFilter
  1527. collectionTypes: $collectionTypes
  1528. after: $cursor
  1529. first: $perPage
  1530. ) {
  1531. totalCount
  1532. pageInfo {
  1533. ...PageInfoFragment
  1534. }
  1535. edges {
  1536. node {
  1537. __typename
  1538. ...RegistryCollectionFragment
  1539. }
  1540. }
  1541. }
  1542. }
  1543. }
  1544. }
  1545. fragment PageInfoFragment on PageInfo {
  1546. __typename
  1547. endCursor
  1548. hasNextPage
  1549. }
  1550. fragment ProjectInfoFragment on Project {
  1551. name
  1552. entity {
  1553. name
  1554. }
  1555. }
  1556. fragment RegistryCollectionFragment on ArtifactCollection {
  1557. __typename
  1558. id
  1559. name
  1560. description
  1561. createdAt
  1562. updatedAt
  1563. project {
  1564. ...ProjectInfoFragment
  1565. }
  1566. type: defaultArtifactType {
  1567. name
  1568. }
  1569. tags {
  1570. edges {
  1571. node {
  1572. ...TagFragment
  1573. }
  1574. }
  1575. }
  1576. }
  1577. fragment TagFragment on Tag {
  1578. __typename
  1579. id
  1580. name
  1581. }
  1582. """
  1583. FETCH_REGISTRY_GQL = """
  1584. query FetchRegistry($name: String, $entity: String) {
  1585. entity(name: $entity) {
  1586. project(name: $name) {
  1587. ...RegistryFragment
  1588. }
  1589. }
  1590. }
  1591. fragment RegistryFragment on Project {
  1592. __typename
  1593. id
  1594. name
  1595. entity {
  1596. name
  1597. organization {
  1598. name
  1599. }
  1600. }
  1601. description
  1602. createdAt
  1603. updatedAt
  1604. access
  1605. allowAllArtifactTypes: allowAllArtifactTypesInRegistry
  1606. artifactTypes(includeAll: true) {
  1607. edges {
  1608. node {
  1609. name
  1610. }
  1611. }
  1612. }
  1613. }
  1614. """
  1615. FETCH_REGISTRIES_GQL = """
  1616. query FetchRegistries($organization: String!, $filters: JSONString, $cursor: String, $perPage: Int) {
  1617. organization(name: $organization) {
  1618. orgEntity {
  1619. projects(filters: $filters, after: $cursor, first: $perPage) {
  1620. pageInfo {
  1621. ...PageInfoFragment
  1622. }
  1623. edges {
  1624. node {
  1625. ...RegistryFragment
  1626. }
  1627. }
  1628. }
  1629. }
  1630. }
  1631. }
  1632. fragment PageInfoFragment on PageInfo {
  1633. __typename
  1634. endCursor
  1635. hasNextPage
  1636. }
  1637. fragment RegistryFragment on Project {
  1638. __typename
  1639. id
  1640. name
  1641. entity {
  1642. name
  1643. organization {
  1644. name
  1645. }
  1646. }
  1647. description
  1648. createdAt
  1649. updatedAt
  1650. access
  1651. allowAllArtifactTypes: allowAllArtifactTypesInRegistry
  1652. artifactTypes(includeAll: true) {
  1653. edges {
  1654. node {
  1655. name
  1656. }
  1657. }
  1658. }
  1659. }
  1660. """
  1661. RENAME_REGISTRY_GQL = """
  1662. mutation RenameRegistry($input: RenameProjectInput!) {
  1663. renameProject(input: $input) {
  1664. inserted
  1665. project {
  1666. ...RegistryFragment
  1667. }
  1668. }
  1669. }
  1670. fragment RegistryFragment on Project {
  1671. __typename
  1672. id
  1673. name
  1674. entity {
  1675. name
  1676. organization {
  1677. name
  1678. }
  1679. }
  1680. description
  1681. createdAt
  1682. updatedAt
  1683. access
  1684. allowAllArtifactTypes: allowAllArtifactTypesInRegistry
  1685. artifactTypes(includeAll: true) {
  1686. edges {
  1687. node {
  1688. name
  1689. }
  1690. }
  1691. }
  1692. }
  1693. """
  1694. UPSERT_REGISTRY_GQL = """
  1695. mutation UpsertRegistry($input: UpsertModelInput!) {
  1696. upsertModel(input: $input) {
  1697. inserted
  1698. project {
  1699. ...RegistryFragment
  1700. }
  1701. }
  1702. }
  1703. fragment RegistryFragment on Project {
  1704. __typename
  1705. id
  1706. name
  1707. entity {
  1708. name
  1709. organization {
  1710. name
  1711. }
  1712. }
  1713. description
  1714. createdAt
  1715. updatedAt
  1716. access
  1717. allowAllArtifactTypes: allowAllArtifactTypesInRegistry
  1718. artifactTypes(includeAll: true) {
  1719. edges {
  1720. node {
  1721. name
  1722. }
  1723. }
  1724. }
  1725. }
  1726. """
  1727. DELETE_REGISTRY_GQL = """
  1728. mutation DeleteRegistry($id: String!) {
  1729. deleteModel(input: {id: $id}) {
  1730. success
  1731. }
  1732. }
  1733. """
  1734. REGISTRY_USER_MEMBERS_GQL = """
  1735. query RegistryUserMembers($project: String!, $entity: String!) {
  1736. project(name: $project, entityName: $entity) {
  1737. members {
  1738. ...UserRegistryMemberFragment
  1739. }
  1740. }
  1741. }
  1742. fragment RegistryRoleFragment on Role {
  1743. name
  1744. }
  1745. fragment UserRegistryMemberFragment on ProjectMember {
  1746. id
  1747. name
  1748. username
  1749. email
  1750. role {
  1751. ...RegistryRoleFragment
  1752. }
  1753. }
  1754. """
  1755. REGISTRY_TEAM_MEMBERS_GQL = """
  1756. query RegistryTeamMembers($project: String!, $entity: String!) {
  1757. project(name: $project, entityName: $entity) {
  1758. teamMembers {
  1759. ...TeamRegistryMemberFragment
  1760. }
  1761. }
  1762. }
  1763. fragment RegistryRoleFragment on Role {
  1764. name
  1765. }
  1766. fragment TeamFragment on Entity {
  1767. __typename
  1768. id
  1769. name
  1770. available
  1771. photoUrl
  1772. readOnly
  1773. readOnlyAdmin
  1774. isTeam
  1775. privateOnly
  1776. storageBytes
  1777. codeSavingEnabled
  1778. defaultAccess
  1779. isPaid
  1780. members {
  1781. ...TeamMemberFragment
  1782. }
  1783. }
  1784. fragment TeamMemberFragment on Member {
  1785. __typename
  1786. id
  1787. role
  1788. pending
  1789. email
  1790. username
  1791. name
  1792. photoUrl
  1793. accountType
  1794. apiKey
  1795. }
  1796. fragment TeamRegistryMemberFragment on ProjectTeamMember {
  1797. team {
  1798. ...TeamFragment
  1799. }
  1800. role {
  1801. ...RegistryRoleFragment
  1802. }
  1803. }
  1804. """
  1805. CREATE_REGISTRY_MEMBERS_GQL = """
  1806. mutation CreateRegistryMembers($input: CreateProjectMembersInput!) {
  1807. result: createProjectMembers(input: $input) {
  1808. success
  1809. }
  1810. }
  1811. """
  1812. DELETE_REGISTRY_MEMBERS_GQL = """
  1813. mutation DeleteRegistryMembers($input: DeleteProjectMembersInput!) {
  1814. result: deleteProjectMembers(input: $input) {
  1815. success
  1816. }
  1817. }
  1818. """
  1819. UPDATE_USER_REGISTRY_ROLE_GQL = """
  1820. mutation UpdateUserRegistryRole($input: UpdateProjectMemberInput!) {
  1821. result: updateProjectMember(input: $input) {
  1822. success
  1823. }
  1824. }
  1825. """
  1826. UPDATE_TEAM_REGISTRY_ROLE_GQL = """
  1827. mutation UpdateTeamRegistryRole($input: UpdateProjectTeamMemberInput!) {
  1828. result: updateProjectTeamMember(input: $input) {
  1829. success
  1830. }
  1831. }
  1832. """