@brightinteractive/platform-api 0.1.67-shopify-result → 0.1.67

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.
Files changed (691) hide show
  1. package/api/aIImageGenerations.service.d.ts +40 -0
  2. package/api/accountSecurity.service.d.ts +59 -0
  3. package/api/accounts.service.d.ts +87 -0
  4. package/api/allowedLoginMethods.service.d.ts +38 -0
  5. package/api/api.d.ts +119 -0
  6. package/api/assetComments.service.d.ts +109 -0
  7. package/api/assetDeduplication.service.d.ts +38 -0
  8. package/api/assetDownloadEvents.service.d.ts +40 -0
  9. package/api/assetEmbeddableLinks.service.d.ts +133 -0
  10. package/api/assetMetadataExport.service.d.ts +106 -0
  11. package/api/assetSavedCropAreaSummaries.service.d.ts +63 -0
  12. package/api/assetSavedCropAreas.service.d.ts +109 -0
  13. package/api/assetShareAccessTokens.service.d.ts +39 -0
  14. package/api/assetShareEmails.service.d.ts +39 -0
  15. package/api/assetShares.service.d.ts +132 -0
  16. package/api/assets.service.d.ts +594 -0
  17. package/api/autoTaggingImageSettings.service.d.ts +59 -0
  18. package/api/cloudConnections.service.d.ts +126 -0
  19. package/api/cloudImportJobs.service.d.ts +130 -0
  20. package/api/cloudObjects.service.d.ts +63 -0
  21. package/api/collectionShareAccessTokens.service.d.ts +39 -0
  22. package/api/collectionShares.service.d.ts +155 -0
  23. package/api/collections.service.d.ts +88 -0
  24. package/api/corebook.service.d.ts +59 -0
  25. package/api/custom.service.d.ts +101 -0
  26. package/api/default.service.d.ts +36 -0
  27. package/api/entityQuotaOverrides.service.d.ts +65 -0
  28. package/api/externalApp.service.d.ts +107 -0
  29. package/api/fieldOptionImages.service.d.ts +85 -0
  30. package/api/fieldOptions.service.d.ts +132 -0
  31. package/api/fieldViews.service.d.ts +38 -0
  32. package/api/fields.service.d.ts +129 -0
  33. package/api/folderSettings.service.d.ts +37 -0
  34. package/api/groups.service.d.ts +129 -0
  35. package/api/guestUploadAccessTokens.service.d.ts +40 -0
  36. package/api/guestUploadEmails.service.d.ts +39 -0
  37. package/api/guestUploads.service.d.ts +132 -0
  38. package/api/onboardingChecklist.service.d.ts +59 -0
  39. package/api/ping.service.d.ts +37 -0
  40. package/api/portalAccessTokens.service.d.ts +39 -0
  41. package/api/portalEmails.service.d.ts +39 -0
  42. package/api/portals.service.d.ts +132 -0
  43. package/api/presetTransformations.service.d.ts +86 -0
  44. package/api/publiclyAvailableGuestUploadData.service.d.ts +40 -0
  45. package/api/publiclyAvailablePortalDatas.service.d.ts +40 -0
  46. package/api/referenceImageUploads.service.d.ts +38 -0
  47. package/api/savedSearch.service.d.ts +38 -0
  48. package/api/savedSearches.service.d.ts +111 -0
  49. package/api/searchFilters.service.d.ts +129 -0
  50. package/api/shopify.service.d.ts +251 -0
  51. package/api/shopifySKUSettings.service.d.ts +79 -0
  52. package/api/staffMembers.service.d.ts +83 -0
  53. package/api/subdomains.service.d.ts +40 -0
  54. package/api/subscription.service.d.ts +173 -0
  55. package/api/textInImageSettings.service.d.ts +59 -0
  56. package/api/theme.service.d.ts +356 -0
  57. package/api/userPreferences.service.d.ts +61 -0
  58. package/api/userReferrer.service.d.ts +38 -0
  59. package/api/users.service.d.ts +410 -0
  60. package/api/wordPress.service.d.ts +101 -0
  61. package/api.module.d.ts +11 -0
  62. package/configuration.d.ts +104 -0
  63. package/encoder.d.ts +11 -0
  64. package/fesm2022/brightinteractive-platform-api.mjs +22322 -0
  65. package/fesm2022/brightinteractive-platform-api.mjs.map +1 -0
  66. package/{src/index.ts → index.d.ts} +5 -5
  67. package/model/accessToken.d.ts +17 -0
  68. package/model/accessTokenWithPermittedActions.d.ts +17 -0
  69. package/model/account.d.ts +42 -0
  70. package/model/accountInviteRequest.d.ts +17 -0
  71. package/model/accountPlan.d.ts +24 -0
  72. package/model/accountRequest.d.ts +31 -0
  73. package/model/accountSecurity.d.ts +21 -0
  74. package/model/accountSecurityPutRequest.d.ts +17 -0
  75. package/model/accountSecurityWithPermittedActions.d.ts +17 -0
  76. package/model/accountUser.d.ts +18 -0
  77. package/model/accountUserWithPermittedActions.d.ts +17 -0
  78. package/model/accountWithPermittedActions.d.ts +17 -0
  79. package/model/actionType.d.ts +82 -0
  80. package/model/activeAccountUser.d.ts +54 -0
  81. package/model/address.d.ts +19 -0
  82. package/model/adminPermissions.d.ts +20 -0
  83. package/model/adminUserPatchRequest.d.ts +20 -0
  84. package/model/adminUserRequest.d.ts +28 -0
  85. package/model/adminUserRequestItem.d.ts +32 -0
  86. package/model/aiImageGenerationsRequest.d.ts +51 -0
  87. package/model/aiImageGenerationsResponse.d.ts +20 -0
  88. package/model/aiImageGenerationsResponseResult.d.ts +17 -0
  89. package/model/amount.d.ts +25 -0
  90. package/model/appName.d.ts +15 -0
  91. package/model/approvedPaymentStatus.d.ts +20 -0
  92. package/model/asset.d.ts +42 -0
  93. package/model/assetAggregationBucket.d.ts +21 -0
  94. package/model/assetAggregationBucketResponse.d.ts +19 -0
  95. package/model/assetAggregationRequest.d.ts +6 -0
  96. package/model/assetAggregationRequestInclusionOptions.d.ts +24 -0
  97. package/model/assetAggregationRequestsMap.d.ts +20 -0
  98. package/model/assetAggregationResponse.d.ts +6 -0
  99. package/model/assetAggregationResponsesMap.d.ts +20 -0
  100. package/model/assetAndSearchCriterion.d.ts +25 -0
  101. package/model/assetAndUploadBatch.d.ts +27 -0
  102. package/model/assetAndUploadBatchCompletedJob.d.ts +43 -0
  103. package/model/assetAndUploadBatchJob.d.ts +19 -0
  104. package/model/assetAndUploadBatchRequest.d.ts +15 -0
  105. package/model/assetAndUploadBatchRequestItem.d.ts +31 -0
  106. package/model/assetAndUploadWithPermittedActions.d.ts +17 -0
  107. package/model/assetDeletionBatchRequest.d.ts +15 -0
  108. package/model/assetDownload.d.ts +14 -0
  109. package/model/assetDownloadBatch.d.ts +31 -0
  110. package/model/assetDownloadBatchCompletedJob.d.ts +43 -0
  111. package/model/assetDownloadBatchJob.d.ts +8 -0
  112. package/model/assetDownloadBatchRequest.d.ts +21 -0
  113. package/model/assetDownloadBatchRequestItem.d.ts +34 -0
  114. package/model/assetDownloadDetails.d.ts +30 -0
  115. package/model/assetDownloadEvent.d.ts +56 -0
  116. package/model/assetDownloadEventAggregationRequest.d.ts +18 -0
  117. package/model/assetDownloadEventAndSearchCriterion.d.ts +19 -0
  118. package/model/assetDownloadEventDateField.d.ts +18 -0
  119. package/model/assetDownloadEventDateHistogramAggregationRequest.d.ts +32 -0
  120. package/model/assetDownloadEventField.d.ts +27 -0
  121. package/model/assetDownloadEventFieldEqualsSearchCriterion.d.ts +22 -0
  122. package/model/assetDownloadEventFieldInRangeSearchCriterion.d.ts +26 -0
  123. package/model/assetDownloadEventNotSearchCriterion.d.ts +16 -0
  124. package/model/assetDownloadEventOrSearchCriterion.d.ts +19 -0
  125. package/model/assetDownloadEventSearch.d.ts +29 -0
  126. package/model/assetDownloadEventSearchCriterion.d.ts +22 -0
  127. package/model/assetDownloadEventSearchRequest.d.ts +35 -0
  128. package/model/assetDownloadEventSort.d.ts +19 -0
  129. package/model/assetDownloadEventTermsAggregationRequest.d.ts +22 -0
  130. package/model/assetDownloadEventWithPermittedActions.d.ts +17 -0
  131. package/model/assetDownloadFailure.d.ts +20 -0
  132. package/model/assetDownloadWithPermittedActions.d.ts +17 -0
  133. package/model/assetFieldEqualsSearchCriterion.d.ts +34 -0
  134. package/model/assetFieldHasAllEqualSearchCriterion.d.ts +34 -0
  135. package/model/assetFieldHasAnyEqualSearchCriterion.d.ts +34 -0
  136. package/model/assetFieldIsEmptySearchCriterion.d.ts +22 -0
  137. package/model/assetFieldMatchesSearchCriterion.d.ts +34 -0
  138. package/model/assetFile.d.ts +75 -0
  139. package/model/assetFileWithPermittedActions.d.ts +17 -0
  140. package/model/assetIsSimilarToAssetCriterion.d.ts +28 -0
  141. package/model/assetNotSearchCriterion.d.ts +22 -0
  142. package/model/assetOrSearchCriterion.d.ts +25 -0
  143. package/model/assetPaginatedSearchRequest.d.ts +52 -0
  144. package/model/assetPatchRequest.d.ts +17 -0
  145. package/model/assetPermittedActions.d.ts +19 -0
  146. package/model/assetPermittedActionsWithDefault.d.ts +19 -0
  147. package/model/assetScrollSearch.d.ts +26 -0
  148. package/model/assetScrollSearchRequest.d.ts +41 -0
  149. package/model/assetScrollSearchScrollRequest.d.ts +17 -0
  150. package/model/assetSearch.d.ts +29 -0
  151. package/model/assetSearchCriterion.d.ts +27 -0
  152. package/model/assetSearchField.d.ts +18 -0
  153. package/model/assetSearchFieldField.d.ts +24 -0
  154. package/model/assetSearchFieldFixed.d.ts +53 -0
  155. package/model/assetShare.d.ts +39 -0
  156. package/model/assetShareEmailRequest.d.ts +21 -0
  157. package/model/assetShareFieldEqualsSearchCriterion.d.ts +26 -0
  158. package/model/assetSharePatchRequest.d.ts +19 -0
  159. package/model/assetShareRequest.d.ts +25 -0
  160. package/model/assetShareSearch.d.ts +22 -0
  161. package/model/assetShareSearchCriterion.d.ts +6 -0
  162. package/model/assetShareSearchField.d.ts +18 -0
  163. package/model/assetShareSearchRequest.d.ts +28 -0
  164. package/model/assetShareSort.d.ts +19 -0
  165. package/model/assetShareSortField.d.ts +19 -0
  166. package/model/assetShareWithPermittedActions.d.ts +17 -0
  167. package/model/assetSort.d.ts +19 -0
  168. package/model/assetSortField.d.ts +18 -0
  169. package/model/assetSortFieldField.d.ts +24 -0
  170. package/model/assetSortFieldFixed.d.ts +48 -0
  171. package/model/assetTermsAggregationRequest.d.ts +22 -0
  172. package/model/assetUpload.d.ts +30 -0
  173. package/model/assetUploadBatchRequest.d.ts +15 -0
  174. package/model/assetUploadBatchRequestItem.d.ts +39 -0
  175. package/model/assetUploadCompletedPart.d.ts +21 -0
  176. package/model/assetUploadCompletion.d.ts +18 -0
  177. package/model/assetUploadCompletionFailure.d.ts +29 -0
  178. package/model/assetUploadCompletionRequest.d.ts +23 -0
  179. package/model/assetUploadCompletionSuccess.d.ts +20 -0
  180. package/model/assetUploadCompletionWithPermittedActions.d.ts +17 -0
  181. package/model/assetUploadDetails.d.ts +27 -0
  182. package/model/assetUploadFailure.d.ts +16 -0
  183. package/model/assetUploadPart.d.ts +29 -0
  184. package/model/assetUploadPartUrlRequest.d.ts +21 -0
  185. package/model/assetUploadPartUrlsRequest.d.ts +19 -0
  186. package/model/assetUploadRequest.d.ts +35 -0
  187. package/model/assetUploadWithPermittedActions.d.ts +17 -0
  188. package/model/assetWithPermittedActions.d.ts +20 -0
  189. package/model/assetsCreation.d.ts +17 -0
  190. package/model/assetsCreationRequest.d.ts +17 -0
  191. package/model/assetsCreationWithPermittedActions.d.ts +17 -0
  192. package/model/assetsSelector.d.ts +18 -0
  193. package/model/assetsSelectorByCriterion.d.ts +22 -0
  194. package/model/assetsSelectorByIds.d.ts +24 -0
  195. package/model/attribution.d.ts +15 -0
  196. package/model/autoTaggingImageSettings.d.ts +25 -0
  197. package/model/autoTaggingImageSettingsPatchRequest.d.ts +21 -0
  198. package/model/autoTaggingImageSettingsWithPermittedActions.d.ts +17 -0
  199. package/model/baseAssetSearch.d.ts +22 -0
  200. package/model/baseAssetSearchRequest.d.ts +37 -0
  201. package/model/baseCloudConnection.d.ts +26 -0
  202. package/model/baseCloudObject.d.ts +36 -0
  203. package/model/baseJob.d.ts +39 -0
  204. package/model/basePaginatedSearchInAccountRequest.d.ts +21 -0
  205. package/model/baseScrollSearchInAccountRequest.d.ts +17 -0
  206. package/model/baseSearchFilter.d.ts +29 -0
  207. package/model/batchItem.d.ts +17 -0
  208. package/model/beta.d.ts +15 -0
  209. package/model/billing.d.ts +55 -0
  210. package/model/billingRequest.d.ts +40 -0
  211. package/model/candidatePresetTransformation.d.ts +17 -0
  212. package/model/candidateTransformation.d.ts +17 -0
  213. package/model/clipTransformation.d.ts +28 -0
  214. package/model/cloudConnection.d.ts +18 -0
  215. package/model/cloudConnectionRequest.d.ts +18 -0
  216. package/model/cloudConnectionWithPermittedActions.d.ts +17 -0
  217. package/model/cloudFile.d.ts +49 -0
  218. package/model/cloudFileShortcut.d.ts +37 -0
  219. package/model/cloudFolder.d.ts +33 -0
  220. package/model/cloudFolderShortcut.d.ts +37 -0
  221. package/model/cloudImportCompletedJob.d.ts +43 -0
  222. package/model/cloudImportJob.d.ts +8 -0
  223. package/model/cloudImportJobRequest.d.ts +32 -0
  224. package/model/cloudImportJobWithPermittedActions.d.ts +17 -0
  225. package/model/cloudImportResult.d.ts +20 -0
  226. package/model/cloudObject.d.ts +20 -0
  227. package/model/cloudObjectFieldEqualsSearchCriterion.d.ts +24 -0
  228. package/model/cloudObjectIdValue.d.ts +21 -0
  229. package/model/cloudObjectIdValueOrRootFolder.d.ts +18 -0
  230. package/model/cloudObjectMatchesTextSearchCriterion.d.ts +24 -0
  231. package/model/cloudObjectPagedSearch.d.ts +20 -0
  232. package/model/cloudObjectPagedSearchRequest.d.ts +27 -0
  233. package/model/cloudObjectPathMapping.d.ts +25 -0
  234. package/model/cloudObjectRootFolder.d.ts +20 -0
  235. package/model/cloudObjectSearchCriterion.d.ts +18 -0
  236. package/model/cloudObjectSearchField.d.ts +15 -0
  237. package/model/cloudObjectsSelector.d.ts +17 -0
  238. package/model/cloudObjectsSelectorByIds.d.ts +24 -0
  239. package/model/collection.d.ts +37 -0
  240. package/model/collectionAssociatedWithUserSearchCriterion.d.ts +18 -0
  241. package/model/collectionCollaborator.d.ts +25 -0
  242. package/model/collectionPatchRequest.d.ts +17 -0
  243. package/model/collectionRequest.d.ts +17 -0
  244. package/model/collectionSearch.d.ts +22 -0
  245. package/model/collectionSearchCriterion.d.ts +17 -0
  246. package/model/collectionSearchRequest.d.ts +28 -0
  247. package/model/collectionShare.d.ts +45 -0
  248. package/model/collectionShareFieldEqualsSearchCriterion.d.ts +26 -0
  249. package/model/collectionSharePatchRequest.d.ts +19 -0
  250. package/model/collectionShareRequest.d.ts +25 -0
  251. package/model/collectionShareSearch.d.ts +22 -0
  252. package/model/collectionShareSearchCriterion.d.ts +6 -0
  253. package/model/collectionShareSearchField.d.ts +18 -0
  254. package/model/collectionShareSearchRequest.d.ts +28 -0
  255. package/model/collectionShareSort.d.ts +19 -0
  256. package/model/collectionShareSortField.d.ts +20 -0
  257. package/model/collectionShareWithPermittedActions.d.ts +17 -0
  258. package/model/collectionSort.d.ts +19 -0
  259. package/model/collectionSortField.d.ts +18 -0
  260. package/model/collectionWithPermittedActions.d.ts +17 -0
  261. package/model/comment.d.ts +45 -0
  262. package/model/commentPatchRequest.d.ts +17 -0
  263. package/model/commentRequest.d.ts +25 -0
  264. package/model/commentWithPermittedActions.d.ts +17 -0
  265. package/model/completedJob.d.ts +41 -0
  266. package/model/contextComments.d.ts +17 -0
  267. package/model/contextType.d.ts +19 -0
  268. package/model/convertBitrateTransformation.d.ts +32 -0
  269. package/model/convertPresetParameters.d.ts +22 -0
  270. package/model/convertTransformation.d.ts +22 -0
  271. package/model/convertTransformationTemplate.d.ts +22 -0
  272. package/model/corebookSettings.d.ts +25 -0
  273. package/model/corebookSettingsRequest.d.ts +21 -0
  274. package/model/corebookSettingsWithPermittedActions.d.ts +17 -0
  275. package/model/coupon.d.ts +38 -0
  276. package/model/createShopifyImageBatchRequest.d.ts +23 -0
  277. package/model/createShopifyProductImageBatchRequest.d.ts +25 -0
  278. package/model/createdSubscription.d.ts +36 -0
  279. package/model/createdSubscriptionWithPermittedActions.d.ts +17 -0
  280. package/model/cropParameters.d.ts +29 -0
  281. package/model/cropPresetParameters.d.ts +36 -0
  282. package/model/cropTransformation.d.ts +36 -0
  283. package/model/cropTransformationTemplate.d.ts +20 -0
  284. package/model/customIntegrationSettings.d.ts +37 -0
  285. package/model/customIntegrationSettingsPatchRequest.d.ts +25 -0
  286. package/model/customIntegrationSettingsPutRequest.d.ts +25 -0
  287. package/model/customIntegrationSettingsWithPermittedActions.d.ts +17 -0
  288. package/model/customTransformationDescription.d.ts +22 -0
  289. package/model/dashAsset.d.ts +35 -0
  290. package/model/dataType.d.ts +20 -0
  291. package/model/denialReason.d.ts +23 -0
  292. package/model/deniedActionWithReason.d.ts +25 -0
  293. package/model/determinedTransformation.d.ts +15 -0
  294. package/model/dimensions.d.ts +21 -0
  295. package/model/downloadCountInDateRange.d.ts +25 -0
  296. package/model/downloadCountsByUserType.d.ts +28 -0
  297. package/model/downloads.d.ts +18 -0
  298. package/model/dropboxCloudConnection.d.ts +38 -0
  299. package/model/dropboxCloudConnectionRequest.d.ts +22 -0
  300. package/model/embeddableLink.d.ts +65 -0
  301. package/model/embeddableLinkBatch.d.ts +27 -0
  302. package/model/embeddableLinkBatchCompletedJob.d.ts +43 -0
  303. package/model/embeddableLinkBatchJob.d.ts +8 -0
  304. package/model/embeddableLinkBatchRequest.d.ts +17 -0
  305. package/model/embeddableLinkBatchRequestItem.d.ts +30 -0
  306. package/model/embeddableLinkDetails.d.ts +26 -0
  307. package/model/embeddableLinkFailure.d.ts +17 -0
  308. package/model/embeddableLinkFieldInSearchCriterion.d.ts +26 -0
  309. package/model/embeddableLinkPatchRequest.d.ts +23 -0
  310. package/model/embeddableLinkSearch.d.ts +22 -0
  311. package/model/embeddableLinkSearchCriterion.d.ts +17 -0
  312. package/model/embeddableLinkSearchField.d.ts +18 -0
  313. package/model/embeddableLinkSearchRequest.d.ts +28 -0
  314. package/model/embeddableLinkSort.d.ts +19 -0
  315. package/model/embeddableLinkSortField.d.ts +18 -0
  316. package/model/embeddableLinkWithPermittedActions.d.ts +17 -0
  317. package/model/entityQuotaOverride.d.ts +29 -0
  318. package/model/entityQuotaOverrideRequest.d.ts +17 -0
  319. package/model/entityQuotaOverrideWithPermittedActions.d.ts +17 -0
  320. package/model/eventAggregationBucket.d.ts +21 -0
  321. package/model/eventAggregationBucketResponse.d.ts +19 -0
  322. package/model/eventAggregationResponse.d.ts +18 -0
  323. package/model/eventAggregationValueResponse.d.ts +18 -0
  324. package/model/eventDateHistogramAggregationRequest.d.ts +30 -0
  325. package/model/eventDateInterval.d.ts +21 -0
  326. package/model/eventTermsAggregationRequest.d.ts +18 -0
  327. package/model/externalAccessUser.d.ts +28 -0
  328. package/model/externalAppAccount.d.ts +33 -0
  329. package/model/externalAppAccountRequest.d.ts +25 -0
  330. package/model/externalAppAccountWithPermittedActions.d.ts +17 -0
  331. package/model/externalAppSsoTokenRequest.d.ts +20 -0
  332. package/model/externalAppUserRequest.d.ts +24 -0
  333. package/model/failedJob.d.ts +44 -0
  334. package/model/failedJobAllOfReason.d.ts +15 -0
  335. package/model/failedPaymentStatus.d.ts +28 -0
  336. package/model/failedSubscription.d.ts +36 -0
  337. package/model/featureBasedPlan.d.ts +29 -0
  338. package/model/field.d.ts +73 -0
  339. package/model/fieldContainsSearchCriterion.d.ts +18 -0
  340. package/model/fieldEqualsSearchCriterion.d.ts +18 -0
  341. package/model/fieldHasItemSearchCriterion.d.ts +18 -0
  342. package/model/fieldInRangeSearchCriterion.d.ts +22 -0
  343. package/model/fieldInSearchCriterion.d.ts +18 -0
  344. package/model/fieldIsEmptySearchCriterion.d.ts +14 -0
  345. package/model/fieldMatchesSearchCriterion.d.ts +18 -0
  346. package/model/fieldOption.d.ts +42 -0
  347. package/model/fieldOptionAndSearchCriterion.d.ts +25 -0
  348. package/model/fieldOptionBatch.d.ts +27 -0
  349. package/model/fieldOptionBatchRequest.d.ts +15 -0
  350. package/model/fieldOptionBatchRequestItem.d.ts +33 -0
  351. package/model/fieldOptionFailure.d.ts +17 -0
  352. package/model/fieldOptionFieldContainsSearchCriterion.d.ts +26 -0
  353. package/model/fieldOptionFieldEqualsSearchCriterion.d.ts +26 -0
  354. package/model/fieldOptionFieldInSearchCriterion.d.ts +26 -0
  355. package/model/fieldOptionFieldIsEmptySearchCriterion.d.ts +22 -0
  356. package/model/fieldOptionImage.d.ts +29 -0
  357. package/model/fieldOptionImageBatch.d.ts +27 -0
  358. package/model/fieldOptionImageBatchRequest.d.ts +15 -0
  359. package/model/fieldOptionImageBatchRequestItem.d.ts +21 -0
  360. package/model/fieldOptionImageFailure.d.ts +15 -0
  361. package/model/fieldOptionImageRequest.d.ts +17 -0
  362. package/model/fieldOptionImageUpload.d.ts +17 -0
  363. package/model/fieldOptionImageUploadRequest.d.ts +25 -0
  364. package/model/fieldOptionImageWithPermittedActions.d.ts +17 -0
  365. package/model/fieldOptionNotSearchCriterion.d.ts +22 -0
  366. package/model/fieldOptionOrSearchCriterion.d.ts +25 -0
  367. package/model/fieldOptionRequest.d.ts +29 -0
  368. package/model/fieldOptionSearch.d.ts +22 -0
  369. package/model/fieldOptionSearchCriterion.d.ts +24 -0
  370. package/model/fieldOptionSearchField.d.ts +22 -0
  371. package/model/fieldOptionSearchRequest.d.ts +28 -0
  372. package/model/fieldOptionSort.d.ts +19 -0
  373. package/model/fieldOptionWithPermittedActions.d.ts +20 -0
  374. package/model/fieldPatchRequest.d.ts +27 -0
  375. package/model/fieldRequest.d.ts +61 -0
  376. package/model/fieldSearchFilter.d.ts +40 -0
  377. package/model/fieldView.d.ts +36 -0
  378. package/model/fieldViewWithPermittedActions.d.ts +17 -0
  379. package/model/fieldWhitelist.d.ts +18 -0
  380. package/model/fieldWhitelistAllOptions.d.ts +20 -0
  381. package/model/fieldWhitelistSpecificOptions.d.ts +24 -0
  382. package/model/fieldWithPermittedActions.d.ts +17 -0
  383. package/model/fileType.d.ts +20 -0
  384. package/model/folderSettings.d.ts +21 -0
  385. package/model/folderSettingsWithPermittedActions.d.ts +17 -0
  386. package/model/googleCloudConnection.d.ts +38 -0
  387. package/model/googleCloudConnectionRequest.d.ts +22 -0
  388. package/model/gpsLocation.d.ts +21 -0
  389. package/model/group.d.ts +35 -0
  390. package/model/groupPatchRequest.d.ts +23 -0
  391. package/model/groupRequest.d.ts +23 -0
  392. package/model/groupRole.d.ts +19 -0
  393. package/model/groupWithPermittedActions.d.ts +17 -0
  394. package/model/groupedPresetTransformations.d.ts +17 -0
  395. package/model/groupedPresetTransformationsWithPermittedActions.d.ts +17 -0
  396. package/model/guestUpload.d.ts +45 -0
  397. package/model/guestUploadAccessTokenRequest.d.ts +21 -0
  398. package/model/guestUploadEmailRequest.d.ts +21 -0
  399. package/model/guestUploadPatchRequest.d.ts +29 -0
  400. package/model/guestUploadRequest.d.ts +29 -0
  401. package/model/guestUploadSearch.d.ts +22 -0
  402. package/model/guestUploadSearchCriterion.d.ts +17 -0
  403. package/model/guestUploadSearchRequest.d.ts +28 -0
  404. package/model/guestUploadSort.d.ts +19 -0
  405. package/model/guestUploadSortField.d.ts +18 -0
  406. package/model/guestUploadUser.d.ts +32 -0
  407. package/model/guestUploadWithPermittedActions.d.ts +17 -0
  408. package/model/hardCodedFixedOptionsSearchFilter.d.ts +53 -0
  409. package/model/hardCodedFreeOptionDimensionsSearchFilter.d.ts +56 -0
  410. package/model/hardCodedFreeOptionsSearchFilter.d.ts +50 -0
  411. package/model/hardCodedUserSearchFilter.d.ts +50 -0
  412. package/model/inGroupsPermissions.d.ts +30 -0
  413. package/model/inGroupsUserPatchRequest.d.ts +32 -0
  414. package/model/inGroupsUserRequest.d.ts +40 -0
  415. package/model/inGroupsUserRequestItem.d.ts +44 -0
  416. package/model/inProgressJob.d.ts +45 -0
  417. package/model/isTransparentTransformationCriterion.d.ts +24 -0
  418. package/model/jobPatchRequest.d.ts +24 -0
  419. package/model/jobProgress.d.ts +15 -0
  420. package/model/jobStepProgress.d.ts +40 -0
  421. package/model/lifecycleStatus.d.ts +20 -0
  422. package/model/lifecycleStatusBinned.d.ts +56 -0
  423. package/model/lifecycleStatusLive.d.ts +48 -0
  424. package/model/lifecycleStatusPendingApproval.d.ts +40 -0
  425. package/model/lifecycleStatusStaged.d.ts +32 -0
  426. package/model/lifecycleTransition.d.ts +22 -0
  427. package/model/lifecycleTransitionBatchRequest.d.ts +19 -0
  428. package/model/limitedDownloads.d.ts +24 -0
  429. package/model/loginMethod.d.ts +17 -0
  430. package/model/matchAllSearchCriterion.d.ts +20 -0
  431. package/model/matchNoneSearchCriterion.d.ts +20 -0
  432. package/model/matchValues.d.ts +16 -0
  433. package/model/matchesMediaTypesTransformationCriterion.d.ts +25 -0
  434. package/model/mediaType.d.ts +21 -0
  435. package/model/metadata.d.ts +20 -0
  436. package/model/metadataEditBatchRequest.d.ts +17 -0
  437. package/model/metadataExportBatchJob.d.ts +8 -0
  438. package/model/metadataExportCompletedJob.d.ts +43 -0
  439. package/model/metadataExportResult.d.ts +17 -0
  440. package/model/metadataFieldValueUpdate.d.ts +18 -0
  441. package/model/metadataFieldValueUpdateByIds.d.ts +30 -0
  442. package/model/metadataFieldValueUpdateByValues.d.ts +30 -0
  443. package/model/metadataFieldValueUpdateOperation.d.ts +17 -0
  444. package/model/metadataSuggestion.d.ts +16 -0
  445. package/model/metadataSuggestionBatch.d.ts +20 -0
  446. package/model/metadataSuggestionBatchJob.d.ts +8 -0
  447. package/model/metadataSuggestionBatchRequest.d.ts +15 -0
  448. package/model/metadataSuggestionCompletedJob.d.ts +43 -0
  449. package/model/metadataSuggestionWithPermittedActions.d.ts +17 -0
  450. package/model/modelError.d.ts +33 -0
  451. package/model/models.d.ts +617 -0
  452. package/model/noResultJob.d.ts +8 -0
  453. package/model/nullableAssetSortFieldPatch.d.ts +15 -0
  454. package/model/nullableDateTimePatch.d.ts +17 -0
  455. package/model/nullableFieldOptionSearchFieldPatch.d.ts +17 -0
  456. package/model/nullableStringFieldPatch.d.ts +17 -0
  457. package/model/onboardingChecklist.d.ts +24 -0
  458. package/model/onboardingChecklistPatchRequest.d.ts +20 -0
  459. package/model/onboardingChecklistWithPermittedActions.d.ts +17 -0
  460. package/model/orientation.d.ts +19 -0
  461. package/model/orientationTransformation.d.ts +22 -0
  462. package/model/origin.d.ts +17 -0
  463. package/model/originGuestUpload.d.ts +28 -0
  464. package/model/paymentStatus.d.ts +20 -0
  465. package/model/pendingAccountUser.d.ts +30 -0
  466. package/model/pendingPaymentStatus.d.ts +20 -0
  467. package/model/pendingSubscription.d.ts +32 -0
  468. package/model/permittedAction.d.ts +23 -0
  469. package/model/plan.d.ts +21 -0
  470. package/model/planRequest.d.ts +19 -0
  471. package/model/planUpgradeRequiredDenialReason.d.ts +25 -0
  472. package/model/platformCurrentUserAccountSearchRequest.d.ts +21 -0
  473. package/model/platformUserForgottenPasswordRequest.d.ts +17 -0
  474. package/model/platformUserPatchRequest.d.ts +21 -0
  475. package/model/platformUserRequest.d.ts +29 -0
  476. package/model/platformUserResetPasswordRequest.d.ts +21 -0
  477. package/model/platformUserSignUpToken.d.ts +17 -0
  478. package/model/platformUserSignUpTokenRequest.d.ts +21 -0
  479. package/model/platformUserVerificationRequest.d.ts +17 -0
  480. package/model/portal.d.ts +51 -0
  481. package/model/portalEmailRequest.d.ts +21 -0
  482. package/model/portalPatchRequest.d.ts +37 -0
  483. package/model/portalRequest.d.ts +39 -0
  484. package/model/portalSearch.d.ts +22 -0
  485. package/model/portalSearchCriterion.d.ts +17 -0
  486. package/model/portalSearchRequest.d.ts +28 -0
  487. package/model/portalSort.d.ts +19 -0
  488. package/model/portalSortField.d.ts +18 -0
  489. package/model/portalUser.d.ts +28 -0
  490. package/model/portalWithPermittedActions.d.ts +17 -0
  491. package/model/presetParameters.d.ts +18 -0
  492. package/model/presetTransformation.d.ts +31 -0
  493. package/model/presetTransformationAndSearchCriterion.d.ts +19 -0
  494. package/model/presetTransformationApplicableForAnyAssetsSearchCriterion.d.ts +21 -0
  495. package/model/presetTransformationDescription.d.ts +24 -0
  496. package/model/presetTransformationGroup.d.ts +27 -0
  497. package/model/presetTransformationGroupType.d.ts +23 -0
  498. package/model/presetTransformationHasTransformationOfTypeSearchCriterion.d.ts +28 -0
  499. package/model/presetTransformationNotSearchCriterion.d.ts +16 -0
  500. package/model/presetTransformationOrSearchCriterion.d.ts +19 -0
  501. package/model/presetTransformationSearch.d.ts +22 -0
  502. package/model/presetTransformationSearchCriterion.d.ts +22 -0
  503. package/model/presetTransformationSearchRequest.d.ts +28 -0
  504. package/model/presetTransformationSort.d.ts +22 -0
  505. package/model/presetTransformationWithPermittedActions.d.ts +17 -0
  506. package/model/presetTransformationsForAsset.d.ts +18 -0
  507. package/model/presetTransformationsForAssetFieldInSearchCriterion.d.ts +26 -0
  508. package/model/presetTransformationsForAssetSearch.d.ts +22 -0
  509. package/model/presetTransformationsForAssetSearchCriterion.d.ts +17 -0
  510. package/model/presetTransformationsForAssetSearchField.d.ts +18 -0
  511. package/model/presetTransformationsForAssetSearchRequest.d.ts +28 -0
  512. package/model/presetTransformationsForAssetSort.d.ts +22 -0
  513. package/model/presetTransformationsForAssetWithPermittedActions.d.ts +17 -0
  514. package/model/publicCollectionShareFieldHasItemSearchCriterion.d.ts +22 -0
  515. package/model/publicCollectionShareSearchCriterion.d.ts +6 -0
  516. package/model/publicCollectionShareSearchField.d.ts +18 -0
  517. package/model/publicCollectionShareSearchRequest.d.ts +28 -0
  518. package/model/publicCollectionShareSort.d.ts +19 -0
  519. package/model/publicCollectionShareSortField.d.ts +18 -0
  520. package/model/publiclyAvailableAccountData.d.ts +37 -0
  521. package/model/publiclyAvailableAccountDataFieldEqualsSearchCriterion.d.ts +26 -0
  522. package/model/publiclyAvailableAccountDataHasUsersWithEmailDomainSearchCriterion.d.ts +24 -0
  523. package/model/publiclyAvailableAccountDataSearch.d.ts +22 -0
  524. package/model/publiclyAvailableAccountDataSearchCriterion.d.ts +18 -0
  525. package/model/publiclyAvailableAccountDataSearchField.d.ts +18 -0
  526. package/model/publiclyAvailableAccountDataSearchRequest.d.ts +27 -0
  527. package/model/publiclyAvailableAccountDataWithPermittedActions.d.ts +17 -0
  528. package/model/publiclyAvailableGuestUploadData.d.ts +29 -0
  529. package/model/publiclyAvailableGuestUploadDataWithPermittedActions.d.ts +17 -0
  530. package/model/publiclyAvailablePortalData.d.ts +51 -0
  531. package/model/publiclyAvailablePortalDataWithPermittedActions.d.ts +17 -0
  532. package/model/referenceImage.d.ts +18 -0
  533. package/model/referenceImageAsset.d.ts +18 -0
  534. package/model/referenceImageUploaded.d.ts +18 -0
  535. package/model/referenceImageUploadsResponse.d.ts +20 -0
  536. package/model/referenceImageUploadsResponseResult.d.ts +21 -0
  537. package/model/referrer.d.ts +17 -0
  538. package/model/referrerWithPermittedActions.d.ts +17 -0
  539. package/model/rejectedMetadataSuggestion.d.ts +29 -0
  540. package/model/rejectedMetadataSuggestionBatch.d.ts +20 -0
  541. package/model/rejectedMetadataSuggestionBatchRequest.d.ts +15 -0
  542. package/model/rejectedMetadataSuggestionRequest.d.ts +25 -0
  543. package/model/rejectedMetadataSuggestionRequestItem.d.ts +29 -0
  544. package/model/rejectedMetadataSuggestionWithPermittedActions.d.ts +17 -0
  545. package/model/resizeTransformation.d.ts +28 -0
  546. package/model/resizeTransformationTemplate.d.ts +28 -0
  547. package/model/resourceType.d.ts +44 -0
  548. package/model/savedCropArea.d.ts +31 -0
  549. package/model/savedCropAreaPatchRequest.d.ts +19 -0
  550. package/model/savedCropAreaRequest.d.ts +23 -0
  551. package/model/savedCropAreaSummary.d.ts +27 -0
  552. package/model/savedCropAreaSummaryAndSearchCriterion.d.ts +25 -0
  553. package/model/savedCropAreaSummaryFieldEqualsSearchCriterion.d.ts +26 -0
  554. package/model/savedCropAreaSummaryFieldInSearchCriterion.d.ts +26 -0
  555. package/model/savedCropAreaSummarySearch.d.ts +22 -0
  556. package/model/savedCropAreaSummarySearchCriterion.d.ts +19 -0
  557. package/model/savedCropAreaSummarySearchField.d.ts +19 -0
  558. package/model/savedCropAreaSummarySearchRequest.d.ts +28 -0
  559. package/model/savedCropAreaSummarySort.d.ts +19 -0
  560. package/model/savedCropAreaSummaryWithPermittedActions.d.ts +17 -0
  561. package/model/savedCropAreaWithPermittedActions.d.ts +17 -0
  562. package/model/savedSearch.d.ts +40 -0
  563. package/model/savedSearchFieldEqualsSearchCriterion.d.ts +26 -0
  564. package/model/savedSearchPatchRequest.d.ts +21 -0
  565. package/model/savedSearchRequest.d.ts +28 -0
  566. package/model/savedSearchSearch.d.ts +22 -0
  567. package/model/savedSearchSearchCriterion.d.ts +17 -0
  568. package/model/savedSearchSearchField.d.ts +18 -0
  569. package/model/savedSearchSearchRequest.d.ts +27 -0
  570. package/model/savedSearchWithPermittedActions.d.ts +17 -0
  571. package/model/searchCriterion.d.ts +14 -0
  572. package/model/searchFilter.d.ts +21 -0
  573. package/model/searchFilterView.d.ts +19 -0
  574. package/model/searchFilterViewSearchFilterPatchRequest.d.ts +17 -0
  575. package/model/searchFilterViewSearchFilterRequest.d.ts +21 -0
  576. package/model/searchFilterViewWithPermittedActions.d.ts +17 -0
  577. package/model/searchFilterWithPermittedActions.d.ts +17 -0
  578. package/model/selfReportedCompanyDescription.d.ts +20 -0
  579. package/model/shopifyConnection.d.ts +21 -0
  580. package/model/shopifyConnectionWithPermittedActions.d.ts +17 -0
  581. package/model/shopifyExportJobWithPermittedActions.d.ts +17 -0
  582. package/model/shopifyExportRequest.d.ts +23 -0
  583. package/model/shopifyExportRequestItem.d.ts +17 -0
  584. package/model/shopifyExportSource.d.ts +18 -0
  585. package/model/shopifyFile.d.ts +24 -0
  586. package/model/shopifyImageUsedIn.d.ts +18 -0
  587. package/model/shopifyImageUsedInOther.d.ts +27 -0
  588. package/model/shopifyImageUsedInProduct.d.ts +24 -0
  589. package/model/shopifyProduct.d.ts +31 -0
  590. package/model/shopifyProductFieldInSearchCriterion.d.ts +26 -0
  591. package/model/shopifyProductFileDestination.d.ts +21 -0
  592. package/model/shopifyProductMedia.d.ts +21 -0
  593. package/model/shopifyProductSearch.d.ts +22 -0
  594. package/model/shopifyProductSearchCriterion.d.ts +17 -0
  595. package/model/shopifyProductSearchField.d.ts +18 -0
  596. package/model/shopifyProductSearchRequest.d.ts +31 -0
  597. package/model/shopifyProductWithPermittedActions.d.ts +17 -0
  598. package/model/shopifySkuSettings.d.ts +17 -0
  599. package/model/shopifySkuSettingsRequest.d.ts +17 -0
  600. package/model/shopifySkuSettingsWithPermittedActions.d.ts +17 -0
  601. package/model/signupUser.d.ts +21 -0
  602. package/model/sliderValueBasedPlan.d.ts +22 -0
  603. package/model/sortOrder.d.ts +19 -0
  604. package/model/staffMember.d.ts +21 -0
  605. package/model/staffMemberRequest.d.ts +17 -0
  606. package/model/stats.d.ts +17 -0
  607. package/model/storageAndDownloadsPlan.d.ts +33 -0
  608. package/model/storageAndDownloadsPlanRequest.d.ts +29 -0
  609. package/model/storageAndDownloadsV7Plan.d.ts +33 -0
  610. package/model/storageAndDownloadsV7PlanRequest.d.ts +29 -0
  611. package/model/subdomainAvailabilityCheck.d.ts +18 -0
  612. package/model/subdomainAvailabilityCheckRequest.d.ts +17 -0
  613. package/model/subscription.d.ts +8 -0
  614. package/model/subscriptionIntent.d.ts +44 -0
  615. package/model/subscriptionIntentPatchRequest.d.ts +23 -0
  616. package/model/subscriptionIntentRequest.d.ts +23 -0
  617. package/model/subscriptionIntentWithPermittedActions.d.ts +17 -0
  618. package/model/subscriptionUsage.d.ts +28 -0
  619. package/model/subscriptionWithPermittedActions.d.ts +17 -0
  620. package/model/succeededPaymentStatus.d.ts +20 -0
  621. package/model/textInImageSettings.d.ts +25 -0
  622. package/model/textInImageSettingsPatchRequest.d.ts +21 -0
  623. package/model/textInImageSettingsWithPermittedActions.d.ts +17 -0
  624. package/model/theme.d.ts +52 -0
  625. package/model/themeAndSearchCriterion.d.ts +25 -0
  626. package/model/themeFieldEqualsSearchCriterion.d.ts +22 -0
  627. package/model/themeImageType.d.ts +18 -0
  628. package/model/themeImageUpload.d.ts +17 -0
  629. package/model/themeImageUploadRequest.d.ts +17 -0
  630. package/model/themePatchRequest.d.ts +19 -0
  631. package/model/themeSearch.d.ts +22 -0
  632. package/model/themeSearchCriterion.d.ts +18 -0
  633. package/model/themeSearchField.d.ts +20 -0
  634. package/model/themeSearchRequest.d.ts +27 -0
  635. package/model/themeWithPermittedActions.d.ts +17 -0
  636. package/model/tieredValueBasedPlan.d.ts +33 -0
  637. package/model/tieredValueBasedPlanRequest.d.ts +29 -0
  638. package/model/transformation.d.ts +21 -0
  639. package/model/transformationCriterion.d.ts +18 -0
  640. package/model/transformationDescription.d.ts +7 -0
  641. package/model/transformationTemplate.d.ts +19 -0
  642. package/model/unlimitedDownloads.d.ts +20 -0
  643. package/model/unverifiedFreeTrialDenialReason.d.ts +20 -0
  644. package/model/unverifiedPaidPlanDenialReason.d.ts +20 -0
  645. package/model/user.d.ts +21 -0
  646. package/model/userBatch.d.ts +27 -0
  647. package/model/userBatchCompletedJob.d.ts +43 -0
  648. package/model/userBatchJob.d.ts +8 -0
  649. package/model/userBatchRequest.d.ts +15 -0
  650. package/model/userBatchRequestItem.d.ts +18 -0
  651. package/model/userCanUploadSearchCriterion.d.ts +20 -0
  652. package/model/userCreationStatusResponse.d.ts +24 -0
  653. package/model/userCreationStatusResponseWithPermittedActions.d.ts +17 -0
  654. package/model/userData.d.ts +20 -0
  655. package/model/userDataAccountUser.d.ts +28 -0
  656. package/model/userDataPortalUser.d.ts +28 -0
  657. package/model/userDataShareUser.d.ts +24 -0
  658. package/model/userDataUnknown.d.ts +20 -0
  659. package/model/userDeleteRequest.d.ts +21 -0
  660. package/model/userFailure.d.ts +16 -0
  661. package/model/userFieldEqualsSearchCriterion.d.ts +26 -0
  662. package/model/userFieldInSearchCriterion.d.ts +26 -0
  663. package/model/userGroupSearchField.d.ts +18 -0
  664. package/model/userInGroupWhereFieldEqualsSearchCriterion.d.ts +26 -0
  665. package/model/userOrSearchCriterion.d.ts +25 -0
  666. package/model/userPatchRequest.d.ts +18 -0
  667. package/model/userPermissions.d.ts +7 -0
  668. package/model/userPreferences.d.ts +26 -0
  669. package/model/userPreferencesPatchRequest.d.ts +19 -0
  670. package/model/userPreferencesWithPermittedActions.d.ts +17 -0
  671. package/model/userRequest.d.ts +18 -0
  672. package/model/userSearch.d.ts +22 -0
  673. package/model/userSearchCriterion.d.ts +22 -0
  674. package/model/userSearchField.d.ts +21 -0
  675. package/model/userSearchRequest.d.ts +28 -0
  676. package/model/userSort.d.ts +19 -0
  677. package/model/userSortField.d.ts +18 -0
  678. package/model/userWithNoPermittedActions.d.ts +17 -0
  679. package/model/userWithPermittedActions.d.ts +25 -0
  680. package/model/welcomeMessage.d.ts +21 -0
  681. package/model/wordPressSettings.d.ts +29 -0
  682. package/model/wordPressSettingsPatchRequest.d.ts +17 -0
  683. package/model/wordPressSettingsPutRequest.d.ts +17 -0
  684. package/model/wordPressSettingsWithPermittedActions.d.ts +17 -0
  685. package/package.json +23 -12
  686. package/param.d.ts +37 -0
  687. package/variables.d.ts +8 -0
  688. package/ng-package.json +0 -7
  689. package/src/.openapi-generator-ignore +0 -26
  690. package/tsconfig.lib.json +0 -14
  691. package/tsconfig.lib.prod.json +0 -10
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Dash API
3
+ * # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches If the standard `PUT`, `PATCH` and `DELETE` methods cannot adequately describe an operation on a resource the operation may itself be treated as a resource and the endpoint URLs will reflect this accordingly. For example making a `POST` to `/asset-uploads` returns an [`AssetUpload`](#operation/postAssetUpload) resource which describes the URL(s) the client should `PUT` the binary data to upload a file to an asset. If an operation is unlikely to complete via a synchronous REST call, or asynchronous behaviour is simply preferable, job resource endpoints may provided for the operation. Created job resources can then be periodically polled to Get the status of the operation. Such endpoints can be expected to contain a `job` qualifier. e.g `/asset-download-jobs` and `/asset-download-jobs/{id}` All job resources can be expected to conform to a polymorphic job structure with common properties such as `id`, `progress` and type specific properties such as `dateCompleted` for successfully completed jobs. If an operation can be applied to multiple resources an endpoint may provided to create a batch resource for the operation. Such endpoints can be expected to contain a `batch` qualifier. As batch operations almost always need to be asynchronous you can expect to see both qualifiers in the endpoint URL e.g `/asset-download-batch-jobs` and `/asset-download-batch-jobs/{id}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash. However, if you just want to try out an API endpoint, or want to [request your client ID and secret](#operation/putCustomIntegrationSettings) (required for OAuth2 below), you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret, follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](#operation/putCustomIntegrationSettings). The response you receive from the custom integrations settings endpoint will include your client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](#operation/postAssetSearch) with the `STAGED_BY` criterion to find all [`Asset`](#tag/Assets) resources staged by the current user. Alternatively the [GET Current User](#operation/getCurrentUser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Permitted Actions In most responses from the Dash API you will find a `permittedActions` property alongside a `result` property which contains the resource. This is to provide context for operations the current user is permitted to perform on that resource. If an expected permitted action is not included in the `permittedActions` property then the current user does not have permission to perform the action. The [GET Current User](#operation/getCurrentUser) endpoint houses permitted actions which are not associated with a specific API resource instance. e.g. If the current user has permission to create new [`Asset`](#tag/Assets) resources then the [GET Current User](#operation/getCurrentUser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](#tag/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](#tag/Fields) IDs. Full details, including the field name, can be got via the [GET Field](#tag/Fields/operation/getField) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](#tag/Fields) or a list of [`FieldOption`](#tag/Field-Options) IDs if [`Field.hasFixedOptions = true`](#tag/Fields) Where [`Field.hasFixedOptions = true`](#tag/Fields) details, including the field option name, can be got via the [GET Field Option](#operation/getFieldOption) endpoint. Where [`Field.hierarchical = true`](#tag/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](#tag/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. Where [`Field.hasFixedOptions = true`](#tag/Fields) the [POST Field Option Searches](#operation/postFieldOptionSearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](#tag/Fields) you should start with a `PARENT_ID` `FIELD_IS_EMPTY` query to get the top level options and then `PARENT_ID` `FIELD_EQUALS` queries to get each sub-level. ## Folders A Folder in Dash is simply a [`FieldOption`](#tag/Field-Options), for the built-in Folders [`Field`](#tag/Fields). To determine the ID of the Folders [`Field`](#tag/Fields), use the [`Folder Settings`](#tag/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](#tag/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](#operation/postAssetSearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint. ## Creating a new asset Assets are the main resources in Dash. An asset consists of a file, some fixed properties (such as the date the asset was added to Dash) and custom metadata. To create new assets and upload files: 1. [Create an Asset and Upload batch job](#operation/postAssetAndUploadBatchJob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](#operation/postAssetUpload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](#operation/postAssetUpload) resources in the job\'s `result` property. For each file you want to upload: * Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. * Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) 4. The assets will be created with a [lifecycle status](#tag/Asset-Lifecycle) of `STAGED`. Use the [POST Asset lifecycle transition batch job](postAssetLifecycleTransitionBatchJob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](#operation/postAssetUpload) via the [POST Asset Upload](#operation/postAssetUpload/operation/postAssetUpload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) ## Getting asset file versions The current [`AssetFile`](#operation/getAssetFiles) for an [`Asset`](#tag/Assets) is returned in the [`Asset`](#tag/Assets) resource via the [`Asset.currentFile`](#tag/Assets) property. The [GET Asset Files](#operation/getAssetFiles) endpoint can be used to get all [`AssetFile`](#operation/getAssetFiles) resources for an [`Asset`](#tag/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](#tag/Assets) map properties via the [POST Asset Metadata Edit Batch Job](#operation/postAssetMetadataEditBatchJob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](#operation/getAssetMetadataEditBatchJob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](#operation/postCollectionSearch/operation/postCollectionSearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](#tag/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](#operation/postAssetSearch) endpoint for how to specify the [`Collection.id`](#tag/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](#operation/postAssetSearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](#tag/Assets) : The datetime the latest [`AssetFile`](#operation/getAssetFiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](#tag/Assets) : The datetime the *any* change was made to an [`Asset`](#tag/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 Several breaking changes have been introduced in the switch from V1 to V2, which are all the result of three changes. - The domain is changing from `brightdash.app` to `dash.app`. All URLs used to access the API, including for authorisation, should be updated to the new domain. - The concept of \"asset staging status\" has been renamed to \"asset lifecycle\" with the introduction of the bin, which adds another state for assets that isn\'t just about the staging workflow. This second change manifests in the changing of the StagingWorkflowTransitionBatchJob to the LifecycleTransitionBatchJob, a refactoring of the asset model to bring the \"date added\" and \"added by\" fields together with other lifecycle information, and the renaming of the \"date added\" and \"added by\" fields to the more specific \"date live\" and \"staged by\". - Asset batch jobs used to only support carrying out operations on assets by a search criterion. This has been extended to also allow performing operations by id, so the \"criterion\" field has changed to a \"selector\" field which supports objects of either type. - The term `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: help@dash.app
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { FieldOptionSearchField } from './fieldOptionSearchField';
13
+ import { SortOrder } from './sortOrder';
14
+ export interface FieldOptionSort {
15
+ field: FieldOptionSearchField;
16
+ order: SortOrder;
17
+ }
18
+ export declare namespace FieldOptionSort {
19
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Dash API
3
+ * # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches If the standard `PUT`, `PATCH` and `DELETE` methods cannot adequately describe an operation on a resource the operation may itself be treated as a resource and the endpoint URLs will reflect this accordingly. For example making a `POST` to `/asset-uploads` returns an [`AssetUpload`](#operation/postAssetUpload) resource which describes the URL(s) the client should `PUT` the binary data to upload a file to an asset. If an operation is unlikely to complete via a synchronous REST call, or asynchronous behaviour is simply preferable, job resource endpoints may provided for the operation. Created job resources can then be periodically polled to Get the status of the operation. Such endpoints can be expected to contain a `job` qualifier. e.g `/asset-download-jobs` and `/asset-download-jobs/{id}` All job resources can be expected to conform to a polymorphic job structure with common properties such as `id`, `progress` and type specific properties such as `dateCompleted` for successfully completed jobs. If an operation can be applied to multiple resources an endpoint may provided to create a batch resource for the operation. Such endpoints can be expected to contain a `batch` qualifier. As batch operations almost always need to be asynchronous you can expect to see both qualifiers in the endpoint URL e.g `/asset-download-batch-jobs` and `/asset-download-batch-jobs/{id}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash. However, if you just want to try out an API endpoint, or want to [request your client ID and secret](#operation/putCustomIntegrationSettings) (required for OAuth2 below), you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret, follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](#operation/putCustomIntegrationSettings). The response you receive from the custom integrations settings endpoint will include your client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](#operation/postAssetSearch) with the `STAGED_BY` criterion to find all [`Asset`](#tag/Assets) resources staged by the current user. Alternatively the [GET Current User](#operation/getCurrentUser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Permitted Actions In most responses from the Dash API you will find a `permittedActions` property alongside a `result` property which contains the resource. This is to provide context for operations the current user is permitted to perform on that resource. If an expected permitted action is not included in the `permittedActions` property then the current user does not have permission to perform the action. The [GET Current User](#operation/getCurrentUser) endpoint houses permitted actions which are not associated with a specific API resource instance. e.g. If the current user has permission to create new [`Asset`](#tag/Assets) resources then the [GET Current User](#operation/getCurrentUser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](#tag/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](#tag/Fields) IDs. Full details, including the field name, can be got via the [GET Field](#tag/Fields/operation/getField) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](#tag/Fields) or a list of [`FieldOption`](#tag/Field-Options) IDs if [`Field.hasFixedOptions = true`](#tag/Fields) Where [`Field.hasFixedOptions = true`](#tag/Fields) details, including the field option name, can be got via the [GET Field Option](#operation/getFieldOption) endpoint. Where [`Field.hierarchical = true`](#tag/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](#tag/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. Where [`Field.hasFixedOptions = true`](#tag/Fields) the [POST Field Option Searches](#operation/postFieldOptionSearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](#tag/Fields) you should start with a `PARENT_ID` `FIELD_IS_EMPTY` query to get the top level options and then `PARENT_ID` `FIELD_EQUALS` queries to get each sub-level. ## Folders A Folder in Dash is simply a [`FieldOption`](#tag/Field-Options), for the built-in Folders [`Field`](#tag/Fields). To determine the ID of the Folders [`Field`](#tag/Fields), use the [`Folder Settings`](#tag/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](#tag/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](#operation/postAssetSearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint. ## Creating a new asset Assets are the main resources in Dash. An asset consists of a file, some fixed properties (such as the date the asset was added to Dash) and custom metadata. To create new assets and upload files: 1. [Create an Asset and Upload batch job](#operation/postAssetAndUploadBatchJob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](#operation/postAssetUpload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](#operation/postAssetUpload) resources in the job\'s `result` property. For each file you want to upload: * Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. * Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) 4. The assets will be created with a [lifecycle status](#tag/Asset-Lifecycle) of `STAGED`. Use the [POST Asset lifecycle transition batch job](postAssetLifecycleTransitionBatchJob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](#operation/postAssetUpload) via the [POST Asset Upload](#operation/postAssetUpload/operation/postAssetUpload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) ## Getting asset file versions The current [`AssetFile`](#operation/getAssetFiles) for an [`Asset`](#tag/Assets) is returned in the [`Asset`](#tag/Assets) resource via the [`Asset.currentFile`](#tag/Assets) property. The [GET Asset Files](#operation/getAssetFiles) endpoint can be used to get all [`AssetFile`](#operation/getAssetFiles) resources for an [`Asset`](#tag/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](#tag/Assets) map properties via the [POST Asset Metadata Edit Batch Job](#operation/postAssetMetadataEditBatchJob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](#operation/getAssetMetadataEditBatchJob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](#operation/postCollectionSearch/operation/postCollectionSearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](#tag/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](#operation/postAssetSearch) endpoint for how to specify the [`Collection.id`](#tag/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](#operation/postAssetSearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](#tag/Assets) : The datetime the latest [`AssetFile`](#operation/getAssetFiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](#tag/Assets) : The datetime the *any* change was made to an [`Asset`](#tag/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 Several breaking changes have been introduced in the switch from V1 to V2, which are all the result of three changes. - The domain is changing from `brightdash.app` to `dash.app`. All URLs used to access the API, including for authorisation, should be updated to the new domain. - The concept of \"asset staging status\" has been renamed to \"asset lifecycle\" with the introduction of the bin, which adds another state for assets that isn\'t just about the staging workflow. This second change manifests in the changing of the StagingWorkflowTransitionBatchJob to the LifecycleTransitionBatchJob, a refactoring of the asset model to bring the \"date added\" and \"added by\" fields together with other lifecycle information, and the renaming of the \"date added\" and \"added by\" fields to the more specific \"date live\" and \"staged by\". - Asset batch jobs used to only support carrying out operations on assets by a search criterion. This has been extended to also allow performing operations by id, so the \"criterion\" field has changed to a \"selector\" field which supports objects of either type. - The term `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: help@dash.app
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { PermittedAction } from './permittedAction';
13
+ import { FieldOption } from './fieldOption';
14
+ export interface FieldOptionWithPermittedActions {
15
+ result: FieldOption;
16
+ /**
17
+ * Permitted actions for [`FieldOption`](#tag/Field-Options) resources: * `FIELD_OPTION` : `UPDATE_METADATA_WITH_FIELD_OPTION` - Whether the user can assign this [`FieldOption`](#tag/Field-Options) as a value in [`Asset.metadata.values`](#tag/Assets)
18
+ */
19
+ permittedActions: Array<PermittedAction>;
20
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Dash API
3
+ * # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches If the standard `PUT`, `PATCH` and `DELETE` methods cannot adequately describe an operation on a resource the operation may itself be treated as a resource and the endpoint URLs will reflect this accordingly. For example making a `POST` to `/asset-uploads` returns an [`AssetUpload`](#operation/postAssetUpload) resource which describes the URL(s) the client should `PUT` the binary data to upload a file to an asset. If an operation is unlikely to complete via a synchronous REST call, or asynchronous behaviour is simply preferable, job resource endpoints may provided for the operation. Created job resources can then be periodically polled to Get the status of the operation. Such endpoints can be expected to contain a `job` qualifier. e.g `/asset-download-jobs` and `/asset-download-jobs/{id}` All job resources can be expected to conform to a polymorphic job structure with common properties such as `id`, `progress` and type specific properties such as `dateCompleted` for successfully completed jobs. If an operation can be applied to multiple resources an endpoint may provided to create a batch resource for the operation. Such endpoints can be expected to contain a `batch` qualifier. As batch operations almost always need to be asynchronous you can expect to see both qualifiers in the endpoint URL e.g `/asset-download-batch-jobs` and `/asset-download-batch-jobs/{id}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash. However, if you just want to try out an API endpoint, or want to [request your client ID and secret](#operation/putCustomIntegrationSettings) (required for OAuth2 below), you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret, follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](#operation/putCustomIntegrationSettings). The response you receive from the custom integrations settings endpoint will include your client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](#operation/postAssetSearch) with the `STAGED_BY` criterion to find all [`Asset`](#tag/Assets) resources staged by the current user. Alternatively the [GET Current User](#operation/getCurrentUser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Permitted Actions In most responses from the Dash API you will find a `permittedActions` property alongside a `result` property which contains the resource. This is to provide context for operations the current user is permitted to perform on that resource. If an expected permitted action is not included in the `permittedActions` property then the current user does not have permission to perform the action. The [GET Current User](#operation/getCurrentUser) endpoint houses permitted actions which are not associated with a specific API resource instance. e.g. If the current user has permission to create new [`Asset`](#tag/Assets) resources then the [GET Current User](#operation/getCurrentUser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](#tag/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](#tag/Fields) IDs. Full details, including the field name, can be got via the [GET Field](#tag/Fields/operation/getField) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](#tag/Fields) or a list of [`FieldOption`](#tag/Field-Options) IDs if [`Field.hasFixedOptions = true`](#tag/Fields) Where [`Field.hasFixedOptions = true`](#tag/Fields) details, including the field option name, can be got via the [GET Field Option](#operation/getFieldOption) endpoint. Where [`Field.hierarchical = true`](#tag/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](#tag/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. Where [`Field.hasFixedOptions = true`](#tag/Fields) the [POST Field Option Searches](#operation/postFieldOptionSearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](#tag/Fields) you should start with a `PARENT_ID` `FIELD_IS_EMPTY` query to get the top level options and then `PARENT_ID` `FIELD_EQUALS` queries to get each sub-level. ## Folders A Folder in Dash is simply a [`FieldOption`](#tag/Field-Options), for the built-in Folders [`Field`](#tag/Fields). To determine the ID of the Folders [`Field`](#tag/Fields), use the [`Folder Settings`](#tag/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](#tag/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](#operation/postAssetSearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint. ## Creating a new asset Assets are the main resources in Dash. An asset consists of a file, some fixed properties (such as the date the asset was added to Dash) and custom metadata. To create new assets and upload files: 1. [Create an Asset and Upload batch job](#operation/postAssetAndUploadBatchJob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](#operation/postAssetUpload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](#operation/postAssetUpload) resources in the job\'s `result` property. For each file you want to upload: * Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. * Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) 4. The assets will be created with a [lifecycle status](#tag/Asset-Lifecycle) of `STAGED`. Use the [POST Asset lifecycle transition batch job](postAssetLifecycleTransitionBatchJob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](#operation/postAssetUpload) via the [POST Asset Upload](#operation/postAssetUpload/operation/postAssetUpload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) ## Getting asset file versions The current [`AssetFile`](#operation/getAssetFiles) for an [`Asset`](#tag/Assets) is returned in the [`Asset`](#tag/Assets) resource via the [`Asset.currentFile`](#tag/Assets) property. The [GET Asset Files](#operation/getAssetFiles) endpoint can be used to get all [`AssetFile`](#operation/getAssetFiles) resources for an [`Asset`](#tag/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](#tag/Assets) map properties via the [POST Asset Metadata Edit Batch Job](#operation/postAssetMetadataEditBatchJob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](#operation/getAssetMetadataEditBatchJob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](#operation/postCollectionSearch/operation/postCollectionSearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](#tag/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](#operation/postAssetSearch) endpoint for how to specify the [`Collection.id`](#tag/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](#operation/postAssetSearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](#tag/Assets) : The datetime the latest [`AssetFile`](#operation/getAssetFiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](#tag/Assets) : The datetime the *any* change was made to an [`Asset`](#tag/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 Several breaking changes have been introduced in the switch from V1 to V2, which are all the result of three changes. - The domain is changing from `brightdash.app` to `dash.app`. All URLs used to access the API, including for authorisation, should be updated to the new domain. - The concept of \"asset staging status\" has been renamed to \"asset lifecycle\" with the introduction of the bin, which adds another state for assets that isn\'t just about the staging workflow. This second change manifests in the changing of the StagingWorkflowTransitionBatchJob to the LifecycleTransitionBatchJob, a refactoring of the asset model to bring the \"date added\" and \"added by\" fields together with other lifecycle information, and the renaming of the \"date added\" and \"added by\" fields to the more specific \"date live\" and \"staged by\". - Asset batch jobs used to only support carrying out operations on assets by a search criterion. This has been extended to also allow performing operations by id, so the \"criterion\" field has changed to a \"selector\" field which supports objects of either type. - The term `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: help@dash.app
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { NullableFieldOptionSearchFieldPatch } from './nullableFieldOptionSearchFieldPatch';
13
+ export interface FieldPatchRequest {
14
+ /**
15
+ * Human-readable name of the [`Field`](#tag/Fields)
16
+ */
17
+ name?: string | null;
18
+ /**
19
+ * If `true` it is recommended for assets to have a value for this [`Field`](#tag/Fields). Clients should highlight missing recommended values during creation and editing of assets. Clients can also use the `FIELD_IS_EMPTY` criterion in an [`AssetSearch`](#operation/postAssetSearch) to find assets with missing recommended values.
20
+ */
21
+ recommended?: boolean | null;
22
+ defaultSortField?: NullableFieldOptionSearchFieldPatch;
23
+ /**
24
+ * Whether assets with a value for this [`Field`](#tag/Fields) can be browsed in the Browse page. Note that this option cannot be changed for Folder fields or non-fixed-option fields.
25
+ */
26
+ browsable?: boolean | null;
27
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Dash API
3
+ * # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches If the standard `PUT`, `PATCH` and `DELETE` methods cannot adequately describe an operation on a resource the operation may itself be treated as a resource and the endpoint URLs will reflect this accordingly. For example making a `POST` to `/asset-uploads` returns an [`AssetUpload`](#operation/postAssetUpload) resource which describes the URL(s) the client should `PUT` the binary data to upload a file to an asset. If an operation is unlikely to complete via a synchronous REST call, or asynchronous behaviour is simply preferable, job resource endpoints may provided for the operation. Created job resources can then be periodically polled to Get the status of the operation. Such endpoints can be expected to contain a `job` qualifier. e.g `/asset-download-jobs` and `/asset-download-jobs/{id}` All job resources can be expected to conform to a polymorphic job structure with common properties such as `id`, `progress` and type specific properties such as `dateCompleted` for successfully completed jobs. If an operation can be applied to multiple resources an endpoint may provided to create a batch resource for the operation. Such endpoints can be expected to contain a `batch` qualifier. As batch operations almost always need to be asynchronous you can expect to see both qualifiers in the endpoint URL e.g `/asset-download-batch-jobs` and `/asset-download-batch-jobs/{id}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash. However, if you just want to try out an API endpoint, or want to [request your client ID and secret](#operation/putCustomIntegrationSettings) (required for OAuth2 below), you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret, follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](#operation/putCustomIntegrationSettings). The response you receive from the custom integrations settings endpoint will include your client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](#operation/postAssetSearch) with the `STAGED_BY` criterion to find all [`Asset`](#tag/Assets) resources staged by the current user. Alternatively the [GET Current User](#operation/getCurrentUser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Permitted Actions In most responses from the Dash API you will find a `permittedActions` property alongside a `result` property which contains the resource. This is to provide context for operations the current user is permitted to perform on that resource. If an expected permitted action is not included in the `permittedActions` property then the current user does not have permission to perform the action. The [GET Current User](#operation/getCurrentUser) endpoint houses permitted actions which are not associated with a specific API resource instance. e.g. If the current user has permission to create new [`Asset`](#tag/Assets) resources then the [GET Current User](#operation/getCurrentUser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](#tag/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](#tag/Fields) IDs. Full details, including the field name, can be got via the [GET Field](#tag/Fields/operation/getField) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](#tag/Fields) or a list of [`FieldOption`](#tag/Field-Options) IDs if [`Field.hasFixedOptions = true`](#tag/Fields) Where [`Field.hasFixedOptions = true`](#tag/Fields) details, including the field option name, can be got via the [GET Field Option](#operation/getFieldOption) endpoint. Where [`Field.hierarchical = true`](#tag/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](#tag/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. Where [`Field.hasFixedOptions = true`](#tag/Fields) the [POST Field Option Searches](#operation/postFieldOptionSearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](#tag/Fields) you should start with a `PARENT_ID` `FIELD_IS_EMPTY` query to get the top level options and then `PARENT_ID` `FIELD_EQUALS` queries to get each sub-level. ## Folders A Folder in Dash is simply a [`FieldOption`](#tag/Field-Options), for the built-in Folders [`Field`](#tag/Fields). To determine the ID of the Folders [`Field`](#tag/Fields), use the [`Folder Settings`](#tag/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](#tag/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](#operation/postAssetSearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint. ## Creating a new asset Assets are the main resources in Dash. An asset consists of a file, some fixed properties (such as the date the asset was added to Dash) and custom metadata. To create new assets and upload files: 1. [Create an Asset and Upload batch job](#operation/postAssetAndUploadBatchJob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](#operation/postAssetUpload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](#operation/postAssetUpload) resources in the job\'s `result` property. For each file you want to upload: * Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. * Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) 4. The assets will be created with a [lifecycle status](#tag/Asset-Lifecycle) of `STAGED`. Use the [POST Asset lifecycle transition batch job](postAssetLifecycleTransitionBatchJob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](#operation/postAssetUpload) via the [POST Asset Upload](#operation/postAssetUpload/operation/postAssetUpload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) ## Getting asset file versions The current [`AssetFile`](#operation/getAssetFiles) for an [`Asset`](#tag/Assets) is returned in the [`Asset`](#tag/Assets) resource via the [`Asset.currentFile`](#tag/Assets) property. The [GET Asset Files](#operation/getAssetFiles) endpoint can be used to get all [`AssetFile`](#operation/getAssetFiles) resources for an [`Asset`](#tag/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](#tag/Assets) map properties via the [POST Asset Metadata Edit Batch Job](#operation/postAssetMetadataEditBatchJob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](#operation/getAssetMetadataEditBatchJob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](#operation/postCollectionSearch/operation/postCollectionSearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](#tag/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](#operation/postAssetSearch) endpoint for how to specify the [`Collection.id`](#tag/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](#operation/postAssetSearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](#tag/Assets) : The datetime the latest [`AssetFile`](#operation/getAssetFiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](#tag/Assets) : The datetime the *any* change was made to an [`Asset`](#tag/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 Several breaking changes have been introduced in the switch from V1 to V2, which are all the result of three changes. - The domain is changing from `brightdash.app` to `dash.app`. All URLs used to access the API, including for authorisation, should be updated to the new domain. - The concept of \"asset staging status\" has been renamed to \"asset lifecycle\" with the introduction of the bin, which adds another state for assets that isn\'t just about the staging workflow. This second change manifests in the changing of the StagingWorkflowTransitionBatchJob to the LifecycleTransitionBatchJob, a refactoring of the asset model to bring the \"date added\" and \"added by\" fields together with other lifecycle information, and the renaming of the \"date added\" and \"added by\" fields to the more specific \"date live\" and \"staged by\". - Asset batch jobs used to only support carrying out operations on assets by a search criterion. This has been extended to also allow performing operations by id, so the \"criterion\" field has changed to a \"selector\" field which supports objects of either type. - The term `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: help@dash.app
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { DataType } from './dataType';
13
+ import { FieldOptionSearchField } from './fieldOptionSearchField';
14
+ export interface FieldRequest {
15
+ /**
16
+ * Human-readable name of the [`Field`](#tag/Fields)
17
+ */
18
+ name: string;
19
+ dataType: DataType;
20
+ /**
21
+ * If `true` an [`Asset`](#tag/Assets) can be assigned multiple values for this [`Field`](#tag/Fields). If `false` an [`Asset`](#tag/Assets) can only be assigned a single value for this [`Field`](#tag/Fields). e.g. An [`Asset`](#tag/Assets) can only have a single _Title_ but could be assigned multiple _Tags_.
22
+ */
23
+ multiValue: boolean;
24
+ /**
25
+ * If `true` the possible values for this [`Field`](#tag/Fields) are taken from a fixed set. If `false` the possible values for this [`Field`](#tag/Fields) are unrestricted. The set of fixed values for an [`Field`](#tag/Fields) are defined by the [`FieldOption`](#tag/Field-Options) resource. If `true` the values in the [`Asset.metadata.values`](#tag/Assets) map reference an [`FieldOption.id`](#tag/Field-Options). If `false` the values in the [`Asset.metadata.values`](#tag/Assets) map contain the human-readable value.
26
+ */
27
+ hasFixedOptions: boolean;
28
+ /**
29
+ * Only applicable when [`Field.hasFixedOptions = true`](#tag/Fields). If `true` the fixed set possible values for the [`Field`](#tag/Fields) form a hierarchical tree structure. An optional [`FieldOption.parent`](#tag/Field-Options) specifies the [`FieldOption`](#tag/Field-Options) of it\'s parent in the tree. If [`FieldOption.parent = null`](#tag/Field-Options) the [`FieldOption`](#tag/Field-Options) sits at the root of the tree.
30
+ */
31
+ hierarchical: boolean;
32
+ /**
33
+ * An indication of the type of edit control would be sensible to use to edit the [`Field`](#tag/Fields)
34
+ */
35
+ editControl: FieldRequest.EditControlEnum;
36
+ /**
37
+ * If `true` it is recommended for assets to have a value for this [`Field`](#tag/Fields). Clients should highlight missing recommended values during creation and editing of assets. Clients can also use the `FIELD_IS_EMPTY` criterion in an [`AssetSearch`](#operation/postAssetSearch) to find assets with missing recommended values.
38
+ */
39
+ recommended: boolean;
40
+ defaultSortField?: FieldOptionSearchField;
41
+ /**
42
+ * If `true` assets with a value for this [`Field`](#tag/Fields) can be browsed in the Browse page.
43
+ */
44
+ browsable: boolean;
45
+ }
46
+ export declare namespace FieldRequest {
47
+ type EditControlEnum = 'SINGLE_LINE_TEXT' | 'TEXT_AREA' | 'TAGS' | 'CONTROLLED_TAGS' | 'DROPDOWN' | 'CHECKLIST' | 'FOLDER_PICKER' | 'DATE_PICKER' | 'DATE_TIME_PICKER' | 'EXPIRY_DATE_PICKER' | 'RATING';
48
+ const EditControlEnum: {
49
+ SingleLineText: EditControlEnum;
50
+ TextArea: EditControlEnum;
51
+ Tags: EditControlEnum;
52
+ ControlledTags: EditControlEnum;
53
+ Dropdown: EditControlEnum;
54
+ Checklist: EditControlEnum;
55
+ FolderPicker: EditControlEnum;
56
+ DatePicker: EditControlEnum;
57
+ DateTimePicker: EditControlEnum;
58
+ ExpiryDatePicker: EditControlEnum;
59
+ Rating: EditControlEnum;
60
+ };
61
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Dash API
3
+ * # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches If the standard `PUT`, `PATCH` and `DELETE` methods cannot adequately describe an operation on a resource the operation may itself be treated as a resource and the endpoint URLs will reflect this accordingly. For example making a `POST` to `/asset-uploads` returns an [`AssetUpload`](#operation/postAssetUpload) resource which describes the URL(s) the client should `PUT` the binary data to upload a file to an asset. If an operation is unlikely to complete via a synchronous REST call, or asynchronous behaviour is simply preferable, job resource endpoints may provided for the operation. Created job resources can then be periodically polled to Get the status of the operation. Such endpoints can be expected to contain a `job` qualifier. e.g `/asset-download-jobs` and `/asset-download-jobs/{id}` All job resources can be expected to conform to a polymorphic job structure with common properties such as `id`, `progress` and type specific properties such as `dateCompleted` for successfully completed jobs. If an operation can be applied to multiple resources an endpoint may provided to create a batch resource for the operation. Such endpoints can be expected to contain a `batch` qualifier. As batch operations almost always need to be asynchronous you can expect to see both qualifiers in the endpoint URL e.g `/asset-download-batch-jobs` and `/asset-download-batch-jobs/{id}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash. However, if you just want to try out an API endpoint, or want to [request your client ID and secret](#operation/putCustomIntegrationSettings) (required for OAuth2 below), you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret, follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](#operation/putCustomIntegrationSettings). The response you receive from the custom integrations settings endpoint will include your client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](#operation/postAssetSearch) with the `STAGED_BY` criterion to find all [`Asset`](#tag/Assets) resources staged by the current user. Alternatively the [GET Current User](#operation/getCurrentUser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Permitted Actions In most responses from the Dash API you will find a `permittedActions` property alongside a `result` property which contains the resource. This is to provide context for operations the current user is permitted to perform on that resource. If an expected permitted action is not included in the `permittedActions` property then the current user does not have permission to perform the action. The [GET Current User](#operation/getCurrentUser) endpoint houses permitted actions which are not associated with a specific API resource instance. e.g. If the current user has permission to create new [`Asset`](#tag/Assets) resources then the [GET Current User](#operation/getCurrentUser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](#tag/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](#tag/Fields) IDs. Full details, including the field name, can be got via the [GET Field](#tag/Fields/operation/getField) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](#tag/Fields) or a list of [`FieldOption`](#tag/Field-Options) IDs if [`Field.hasFixedOptions = true`](#tag/Fields) Where [`Field.hasFixedOptions = true`](#tag/Fields) details, including the field option name, can be got via the [GET Field Option](#operation/getFieldOption) endpoint. Where [`Field.hierarchical = true`](#tag/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](#tag/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. Where [`Field.hasFixedOptions = true`](#tag/Fields) the [POST Field Option Searches](#operation/postFieldOptionSearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](#tag/Fields) you should start with a `PARENT_ID` `FIELD_IS_EMPTY` query to get the top level options and then `PARENT_ID` `FIELD_EQUALS` queries to get each sub-level. ## Folders A Folder in Dash is simply a [`FieldOption`](#tag/Field-Options), for the built-in Folders [`Field`](#tag/Fields). To determine the ID of the Folders [`Field`](#tag/Fields), use the [`Folder Settings`](#tag/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](#tag/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](#operation/postAssetSearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint. ## Creating a new asset Assets are the main resources in Dash. An asset consists of a file, some fixed properties (such as the date the asset was added to Dash) and custom metadata. To create new assets and upload files: 1. [Create an Asset and Upload batch job](#operation/postAssetAndUploadBatchJob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](#operation/postAssetUpload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](#operation/postAssetUpload) resources in the job\'s `result` property. For each file you want to upload: * Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. * Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) 4. The assets will be created with a [lifecycle status](#tag/Asset-Lifecycle) of `STAGED`. Use the [POST Asset lifecycle transition batch job](postAssetLifecycleTransitionBatchJob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](#operation/postAssetUpload) via the [POST Asset Upload](#operation/postAssetUpload/operation/postAssetUpload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) ## Getting asset file versions The current [`AssetFile`](#operation/getAssetFiles) for an [`Asset`](#tag/Assets) is returned in the [`Asset`](#tag/Assets) resource via the [`Asset.currentFile`](#tag/Assets) property. The [GET Asset Files](#operation/getAssetFiles) endpoint can be used to get all [`AssetFile`](#operation/getAssetFiles) resources for an [`Asset`](#tag/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](#tag/Assets) map properties via the [POST Asset Metadata Edit Batch Job](#operation/postAssetMetadataEditBatchJob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](#operation/getAssetMetadataEditBatchJob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](#operation/postCollectionSearch/operation/postCollectionSearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](#tag/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](#operation/postAssetSearch) endpoint for how to specify the [`Collection.id`](#tag/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](#operation/postAssetSearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](#tag/Assets) : The datetime the latest [`AssetFile`](#operation/getAssetFiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](#tag/Assets) : The datetime the *any* change was made to an [`Asset`](#tag/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 Several breaking changes have been introduced in the switch from V1 to V2, which are all the result of three changes. - The domain is changing from `brightdash.app` to `dash.app`. All URLs used to access the API, including for authorisation, should be updated to the new domain. - The concept of \"asset staging status\" has been renamed to \"asset lifecycle\" with the introduction of the bin, which adds another state for assets that isn\'t just about the staging workflow. This second change manifests in the changing of the StagingWorkflowTransitionBatchJob to the LifecycleTransitionBatchJob, a refactoring of the asset model to bring the \"date added\" and \"added by\" fields together with other lifecycle information, and the renaming of the \"date added\" and \"added by\" fields to the more specific \"date live\" and \"staged by\". - Asset batch jobs used to only support carrying out operations on assets by a search criterion. This has been extended to also allow performing operations by id, so the \"criterion\" field has changed to a \"selector\" field which supports objects of either type. - The term `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: help@dash.app
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export interface FieldSearchFilter {
13
+ /**
14
+ * The unique ID of the [`SearchFilter`](#tag/Search-Filters)
15
+ */
16
+ id: string;
17
+ /**
18
+ * Whether the filter is only visible to admin users
19
+ */
20
+ adminOnly: boolean;
21
+ /**
22
+ * The ID of the account the filter belongs to
23
+ */
24
+ accountId: string;
25
+ /**
26
+ * Whether we can filter by an empty value
27
+ */
28
+ allowEmpty: boolean;
29
+ type: FieldSearchFilter.TypeEnum;
30
+ /**
31
+ * The ID of the field to filter by
32
+ */
33
+ fieldId: string;
34
+ }
35
+ export declare namespace FieldSearchFilter {
36
+ type TypeEnum = 'FIELD';
37
+ const TypeEnum: {
38
+ Field: TypeEnum;
39
+ };
40
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Dash API
3
+ * # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches If the standard `PUT`, `PATCH` and `DELETE` methods cannot adequately describe an operation on a resource the operation may itself be treated as a resource and the endpoint URLs will reflect this accordingly. For example making a `POST` to `/asset-uploads` returns an [`AssetUpload`](#operation/postAssetUpload) resource which describes the URL(s) the client should `PUT` the binary data to upload a file to an asset. If an operation is unlikely to complete via a synchronous REST call, or asynchronous behaviour is simply preferable, job resource endpoints may provided for the operation. Created job resources can then be periodically polled to Get the status of the operation. Such endpoints can be expected to contain a `job` qualifier. e.g `/asset-download-jobs` and `/asset-download-jobs/{id}` All job resources can be expected to conform to a polymorphic job structure with common properties such as `id`, `progress` and type specific properties such as `dateCompleted` for successfully completed jobs. If an operation can be applied to multiple resources an endpoint may provided to create a batch resource for the operation. Such endpoints can be expected to contain a `batch` qualifier. As batch operations almost always need to be asynchronous you can expect to see both qualifiers in the endpoint URL e.g `/asset-download-batch-jobs` and `/asset-download-batch-jobs/{id}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash. However, if you just want to try out an API endpoint, or want to [request your client ID and secret](#operation/putCustomIntegrationSettings) (required for OAuth2 below), you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret, follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](#operation/putCustomIntegrationSettings). The response you receive from the custom integrations settings endpoint will include your client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](#operation/postAssetSearch) with the `STAGED_BY` criterion to find all [`Asset`](#tag/Assets) resources staged by the current user. Alternatively the [GET Current User](#operation/getCurrentUser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Permitted Actions In most responses from the Dash API you will find a `permittedActions` property alongside a `result` property which contains the resource. This is to provide context for operations the current user is permitted to perform on that resource. If an expected permitted action is not included in the `permittedActions` property then the current user does not have permission to perform the action. The [GET Current User](#operation/getCurrentUser) endpoint houses permitted actions which are not associated with a specific API resource instance. e.g. If the current user has permission to create new [`Asset`](#tag/Assets) resources then the [GET Current User](#operation/getCurrentUser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](#tag/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](#tag/Fields) IDs. Full details, including the field name, can be got via the [GET Field](#tag/Fields/operation/getField) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](#tag/Fields) or a list of [`FieldOption`](#tag/Field-Options) IDs if [`Field.hasFixedOptions = true`](#tag/Fields) Where [`Field.hasFixedOptions = true`](#tag/Fields) details, including the field option name, can be got via the [GET Field Option](#operation/getFieldOption) endpoint. Where [`Field.hierarchical = true`](#tag/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](#tag/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. Where [`Field.hasFixedOptions = true`](#tag/Fields) the [POST Field Option Searches](#operation/postFieldOptionSearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](#tag/Fields) you should start with a `PARENT_ID` `FIELD_IS_EMPTY` query to get the top level options and then `PARENT_ID` `FIELD_EQUALS` queries to get each sub-level. ## Folders A Folder in Dash is simply a [`FieldOption`](#tag/Field-Options), for the built-in Folders [`Field`](#tag/Fields). To determine the ID of the Folders [`Field`](#tag/Fields), use the [`Folder Settings`](#tag/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](#tag/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](#operation/postAssetSearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint. ## Creating a new asset Assets are the main resources in Dash. An asset consists of a file, some fixed properties (such as the date the asset was added to Dash) and custom metadata. To create new assets and upload files: 1. [Create an Asset and Upload batch job](#operation/postAssetAndUploadBatchJob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](#operation/postAssetUpload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](#operation/postAssetUpload) resources in the job\'s `result` property. For each file you want to upload: * Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. * Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) 4. The assets will be created with a [lifecycle status](#tag/Asset-Lifecycle) of `STAGED`. Use the [POST Asset lifecycle transition batch job](postAssetLifecycleTransitionBatchJob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](#operation/postAssetUpload) via the [POST Asset Upload](#operation/postAssetUpload/operation/postAssetUpload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) ## Getting asset file versions The current [`AssetFile`](#operation/getAssetFiles) for an [`Asset`](#tag/Assets) is returned in the [`Asset`](#tag/Assets) resource via the [`Asset.currentFile`](#tag/Assets) property. The [GET Asset Files](#operation/getAssetFiles) endpoint can be used to get all [`AssetFile`](#operation/getAssetFiles) resources for an [`Asset`](#tag/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](#tag/Assets) map properties via the [POST Asset Metadata Edit Batch Job](#operation/postAssetMetadataEditBatchJob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](#operation/getAssetMetadataEditBatchJob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](#operation/postCollectionSearch/operation/postCollectionSearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](#tag/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](#operation/postAssetSearch) endpoint for how to specify the [`Collection.id`](#tag/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](#operation/postAssetSearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](#tag/Assets) : The datetime the latest [`AssetFile`](#operation/getAssetFiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](#tag/Assets) : The datetime the *any* change was made to an [`Asset`](#tag/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 Several breaking changes have been introduced in the switch from V1 to V2, which are all the result of three changes. - The domain is changing from `brightdash.app` to `dash.app`. All URLs used to access the API, including for authorisation, should be updated to the new domain. - The concept of \"asset staging status\" has been renamed to \"asset lifecycle\" with the introduction of the bin, which adds another state for assets that isn\'t just about the staging workflow. This second change manifests in the changing of the StagingWorkflowTransitionBatchJob to the LifecycleTransitionBatchJob, a refactoring of the asset model to bring the \"date added\" and \"added by\" fields together with other lifecycle information, and the renaming of the \"date added\" and \"added by\" fields to the more specific \"date live\" and \"staged by\". - Asset batch jobs used to only support carrying out operations on assets by a search criterion. This has been extended to also allow performing operations by id, so the \"criterion\" field has changed to a \"selector\" field which supports objects of either type. - The term `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: help@dash.app
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Field } from './field';
13
+ export interface FieldView {
14
+ /**
15
+ * The unique ID of the [`FieldView`](#tag/Field-Views)
16
+ */
17
+ id: string;
18
+ /**
19
+ * The unique ID of the `Account` the [`Field`](#tag/Fields) belongs to
20
+ */
21
+ accountId: string;
22
+ /**
23
+ * The context in which to use this [`FieldView`](#tag/Field-Views)
24
+ */
25
+ type: FieldView.TypeEnum;
26
+ fields: Array<Field>;
27
+ }
28
+ export declare namespace FieldView {
29
+ type TypeEnum = 'INTERNAL_SUMMARY' | 'INTERNAL_DETAILED' | 'EXTERNAL_SUMMARY' | 'EXTERNAL_DETAILED';
30
+ const TypeEnum: {
31
+ InternalSummary: TypeEnum;
32
+ InternalDetailed: TypeEnum;
33
+ ExternalSummary: TypeEnum;
34
+ ExternalDetailed: TypeEnum;
35
+ };
36
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Dash API
3
+ * # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches If the standard `PUT`, `PATCH` and `DELETE` methods cannot adequately describe an operation on a resource the operation may itself be treated as a resource and the endpoint URLs will reflect this accordingly. For example making a `POST` to `/asset-uploads` returns an [`AssetUpload`](#operation/postAssetUpload) resource which describes the URL(s) the client should `PUT` the binary data to upload a file to an asset. If an operation is unlikely to complete via a synchronous REST call, or asynchronous behaviour is simply preferable, job resource endpoints may provided for the operation. Created job resources can then be periodically polled to Get the status of the operation. Such endpoints can be expected to contain a `job` qualifier. e.g `/asset-download-jobs` and `/asset-download-jobs/{id}` All job resources can be expected to conform to a polymorphic job structure with common properties such as `id`, `progress` and type specific properties such as `dateCompleted` for successfully completed jobs. If an operation can be applied to multiple resources an endpoint may provided to create a batch resource for the operation. Such endpoints can be expected to contain a `batch` qualifier. As batch operations almost always need to be asynchronous you can expect to see both qualifiers in the endpoint URL e.g `/asset-download-batch-jobs` and `/asset-download-batch-jobs/{id}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash. However, if you just want to try out an API endpoint, or want to [request your client ID and secret](#operation/putCustomIntegrationSettings) (required for OAuth2 below), you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret, follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](#operation/putCustomIntegrationSettings). The response you receive from the custom integrations settings endpoint will include your client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](#operation/postAssetSearch) with the `STAGED_BY` criterion to find all [`Asset`](#tag/Assets) resources staged by the current user. Alternatively the [GET Current User](#operation/getCurrentUser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Permitted Actions In most responses from the Dash API you will find a `permittedActions` property alongside a `result` property which contains the resource. This is to provide context for operations the current user is permitted to perform on that resource. If an expected permitted action is not included in the `permittedActions` property then the current user does not have permission to perform the action. The [GET Current User](#operation/getCurrentUser) endpoint houses permitted actions which are not associated with a specific API resource instance. e.g. If the current user has permission to create new [`Asset`](#tag/Assets) resources then the [GET Current User](#operation/getCurrentUser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](#tag/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](#tag/Fields) IDs. Full details, including the field name, can be got via the [GET Field](#tag/Fields/operation/getField) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](#tag/Fields) or a list of [`FieldOption`](#tag/Field-Options) IDs if [`Field.hasFixedOptions = true`](#tag/Fields) Where [`Field.hasFixedOptions = true`](#tag/Fields) details, including the field option name, can be got via the [GET Field Option](#operation/getFieldOption) endpoint. Where [`Field.hierarchical = true`](#tag/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](#tag/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. Where [`Field.hasFixedOptions = true`](#tag/Fields) the [POST Field Option Searches](#operation/postFieldOptionSearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](#tag/Fields) you should start with a `PARENT_ID` `FIELD_IS_EMPTY` query to get the top level options and then `PARENT_ID` `FIELD_EQUALS` queries to get each sub-level. ## Folders A Folder in Dash is simply a [`FieldOption`](#tag/Field-Options), for the built-in Folders [`Field`](#tag/Fields). To determine the ID of the Folders [`Field`](#tag/Fields), use the [`Folder Settings`](#tag/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](#tag/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](#operation/postAssetSearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint. ## Creating a new asset Assets are the main resources in Dash. An asset consists of a file, some fixed properties (such as the date the asset was added to Dash) and custom metadata. To create new assets and upload files: 1. [Create an Asset and Upload batch job](#operation/postAssetAndUploadBatchJob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](#operation/postAssetUpload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](#operation/postAssetUpload) resources in the job\'s `result` property. For each file you want to upload: * Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. * Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) 4. The assets will be created with a [lifecycle status](#tag/Asset-Lifecycle) of `STAGED`. Use the [POST Asset lifecycle transition batch job](postAssetLifecycleTransitionBatchJob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](#operation/postAssetUpload) via the [POST Asset Upload](#operation/postAssetUpload/operation/postAssetUpload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) ## Getting asset file versions The current [`AssetFile`](#operation/getAssetFiles) for an [`Asset`](#tag/Assets) is returned in the [`Asset`](#tag/Assets) resource via the [`Asset.currentFile`](#tag/Assets) property. The [GET Asset Files](#operation/getAssetFiles) endpoint can be used to get all [`AssetFile`](#operation/getAssetFiles) resources for an [`Asset`](#tag/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](#tag/Assets) map properties via the [POST Asset Metadata Edit Batch Job](#operation/postAssetMetadataEditBatchJob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](#operation/getAssetMetadataEditBatchJob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](#operation/postCollectionSearch/operation/postCollectionSearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](#tag/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](#operation/postAssetSearch) endpoint for how to specify the [`Collection.id`](#tag/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](#operation/postAssetSearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](#tag/Assets) : The datetime the latest [`AssetFile`](#operation/getAssetFiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](#tag/Assets) : The datetime the *any* change was made to an [`Asset`](#tag/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 Several breaking changes have been introduced in the switch from V1 to V2, which are all the result of three changes. - The domain is changing from `brightdash.app` to `dash.app`. All URLs used to access the API, including for authorisation, should be updated to the new domain. - The concept of \"asset staging status\" has been renamed to \"asset lifecycle\" with the introduction of the bin, which adds another state for assets that isn\'t just about the staging workflow. This second change manifests in the changing of the StagingWorkflowTransitionBatchJob to the LifecycleTransitionBatchJob, a refactoring of the asset model to bring the \"date added\" and \"added by\" fields together with other lifecycle information, and the renaming of the \"date added\" and \"added by\" fields to the more specific \"date live\" and \"staged by\". - Asset batch jobs used to only support carrying out operations on assets by a search criterion. This has been extended to also allow performing operations by id, so the \"criterion\" field has changed to a \"selector\" field which supports objects of either type. - The term `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: help@dash.app
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { PermittedAction } from './permittedAction';
13
+ import { FieldView } from './fieldView';
14
+ export interface FieldViewWithPermittedActions {
15
+ result: FieldView;
16
+ permittedActions: Array<PermittedAction>;
17
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Dash API
3
+ * # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches If the standard `PUT`, `PATCH` and `DELETE` methods cannot adequately describe an operation on a resource the operation may itself be treated as a resource and the endpoint URLs will reflect this accordingly. For example making a `POST` to `/asset-uploads` returns an [`AssetUpload`](#operation/postAssetUpload) resource which describes the URL(s) the client should `PUT` the binary data to upload a file to an asset. If an operation is unlikely to complete via a synchronous REST call, or asynchronous behaviour is simply preferable, job resource endpoints may provided for the operation. Created job resources can then be periodically polled to Get the status of the operation. Such endpoints can be expected to contain a `job` qualifier. e.g `/asset-download-jobs` and `/asset-download-jobs/{id}` All job resources can be expected to conform to a polymorphic job structure with common properties such as `id`, `progress` and type specific properties such as `dateCompleted` for successfully completed jobs. If an operation can be applied to multiple resources an endpoint may provided to create a batch resource for the operation. Such endpoints can be expected to contain a `batch` qualifier. As batch operations almost always need to be asynchronous you can expect to see both qualifiers in the endpoint URL e.g `/asset-download-batch-jobs` and `/asset-download-batch-jobs/{id}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash. However, if you just want to try out an API endpoint, or want to [request your client ID and secret](#operation/putCustomIntegrationSettings) (required for OAuth2 below), you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret, follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](#operation/putCustomIntegrationSettings). The response you receive from the custom integrations settings endpoint will include your client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](#operation/postAssetSearch) with the `STAGED_BY` criterion to find all [`Asset`](#tag/Assets) resources staged by the current user. Alternatively the [GET Current User](#operation/getCurrentUser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Permitted Actions In most responses from the Dash API you will find a `permittedActions` property alongside a `result` property which contains the resource. This is to provide context for operations the current user is permitted to perform on that resource. If an expected permitted action is not included in the `permittedActions` property then the current user does not have permission to perform the action. The [GET Current User](#operation/getCurrentUser) endpoint houses permitted actions which are not associated with a specific API resource instance. e.g. If the current user has permission to create new [`Asset`](#tag/Assets) resources then the [GET Current User](#operation/getCurrentUser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](#tag/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](#tag/Fields) IDs. Full details, including the field name, can be got via the [GET Field](#tag/Fields/operation/getField) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](#tag/Fields) or a list of [`FieldOption`](#tag/Field-Options) IDs if [`Field.hasFixedOptions = true`](#tag/Fields) Where [`Field.hasFixedOptions = true`](#tag/Fields) details, including the field option name, can be got via the [GET Field Option](#operation/getFieldOption) endpoint. Where [`Field.hierarchical = true`](#tag/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](#tag/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](#tag/Fields/operation/getFields) endpoint. Where [`Field.hasFixedOptions = true`](#tag/Fields) the [POST Field Option Searches](#operation/postFieldOptionSearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](#tag/Fields) you should start with a `PARENT_ID` `FIELD_IS_EMPTY` query to get the top level options and then `PARENT_ID` `FIELD_EQUALS` queries to get each sub-level. ## Folders A Folder in Dash is simply a [`FieldOption`](#tag/Field-Options), for the built-in Folders [`Field`](#tag/Fields). To determine the ID of the Folders [`Field`](#tag/Fields), use the [`Folder Settings`](#tag/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](#tag/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](#operation/postAssetSearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint. ## Creating a new asset Assets are the main resources in Dash. An asset consists of a file, some fixed properties (such as the date the asset was added to Dash) and custom metadata. To create new assets and upload files: 1. [Create an Asset and Upload batch job](#operation/postAssetAndUploadBatchJob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](#operation/postAssetUpload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](#operation/postAssetUpload) resources in the job\'s `result` property. For each file you want to upload: * Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. * Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) 4. The assets will be created with a [lifecycle status](#tag/Asset-Lifecycle) of `STAGED`. Use the [POST Asset lifecycle transition batch job](postAssetLifecycleTransitionBatchJob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](#operation/postAssetUpload) via the [POST Asset Upload](#operation/postAssetUpload/operation/postAssetUpload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion) ## Getting asset file versions The current [`AssetFile`](#operation/getAssetFiles) for an [`Asset`](#tag/Assets) is returned in the [`Asset`](#tag/Assets) resource via the [`Asset.currentFile`](#tag/Assets) property. The [GET Asset Files](#operation/getAssetFiles) endpoint can be used to get all [`AssetFile`](#operation/getAssetFiles) resources for an [`Asset`](#tag/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](#tag/Assets) map properties via the [POST Asset Metadata Edit Batch Job](#operation/postAssetMetadataEditBatchJob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](#operation/getAssetMetadataEditBatchJob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](#operation/postCollectionSearch/operation/postCollectionSearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](#tag/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](#operation/postAssetSearch) endpoint for how to specify the [`Collection.id`](#tag/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](#operation/postAssetSearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](#operation/postAssetSearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](#tag/Assets) : The datetime the [`Asset`](#tag/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](#tag/Assets) : The datetime the latest [`AssetFile`](#operation/getAssetFiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](#tag/Assets) : The datetime the *any* change was made to an [`Asset`](#tag/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 Several breaking changes have been introduced in the switch from V1 to V2, which are all the result of three changes. - The domain is changing from `brightdash.app` to `dash.app`. All URLs used to access the API, including for authorisation, should be updated to the new domain. - The concept of \"asset staging status\" has been renamed to \"asset lifecycle\" with the introduction of the bin, which adds another state for assets that isn\'t just about the staging workflow. This second change manifests in the changing of the StagingWorkflowTransitionBatchJob to the LifecycleTransitionBatchJob, a refactoring of the asset model to bring the \"date added\" and \"added by\" fields together with other lifecycle information, and the renaming of the \"date added\" and \"added by\" fields to the more specific \"date live\" and \"staged by\". - Asset batch jobs used to only support carrying out operations on assets by a search criterion. This has been extended to also allow performing operations by id, so the \"criterion\" field has changed to a \"selector\" field which supports objects of either type. - The term `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: help@dash.app
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { FieldWhitelistAllOptions } from './fieldWhitelistAllOptions';
13
+ import { FieldWhitelistSpecificOptions } from './fieldWhitelistSpecificOptions';
14
+ /**
15
+ * @type FieldWhitelist
16
+ * @export
17
+ */
18
+ export type FieldWhitelist = FieldWhitelistAllOptions | FieldWhitelistSpecificOptions;