@ynput/ayon-frontend-shared 0.2.31 → 0.2.32

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 (154) hide show
  1. package/dist/_virtual/index.cjs10.js +1 -1
  2. package/dist/_virtual/index.cjs5.js +1 -1
  3. package/dist/_virtual/index.cjs6.js +1 -1
  4. package/dist/_virtual/index.cjs8.js +1 -1
  5. package/dist/_virtual/index.cjs9.js +1 -1
  6. package/dist/_virtual/index.es10.js +5 -5
  7. package/dist/_virtual/index.es5.js +5 -2
  8. package/dist/_virtual/index.es5.js.map +1 -1
  9. package/dist/_virtual/index.es6.js +2 -5
  10. package/dist/_virtual/index.es6.js.map +1 -1
  11. package/dist/_virtual/index.es8.js +3 -3
  12. package/dist/_virtual/index.es9.js +5 -5
  13. package/dist/node_modules/rehype/node_modules/unified/lib/index.cjs.js +1 -1
  14. package/dist/node_modules/rehype/node_modules/unified/lib/index.cjs.js.map +1 -1
  15. package/dist/node_modules/rehype/node_modules/unified/lib/index.es.js +2 -2
  16. package/dist/node_modules/rehype/node_modules/vfile/lib/index.cjs.js +1 -1
  17. package/dist/node_modules/rehype/node_modules/vfile/lib/index.es.js +1 -1
  18. package/dist/node_modules/rehype-parse/lib/index.cjs.js +1 -1
  19. package/dist/node_modules/rehype-parse/lib/index.cjs.js.map +1 -1
  20. package/dist/node_modules/rehype-parse/lib/index.es.js +1 -1
  21. package/dist/node_modules/rehype-prism-plus/dist/index.es.cjs.js +1 -1
  22. package/dist/node_modules/rehype-prism-plus/dist/index.es.es.js +1 -1
  23. package/dist/node_modules/remove-accents/index.cjs.js +1 -1
  24. package/dist/node_modules/remove-accents/index.es.js +1 -1
  25. package/dist/shared/src/api/generated/access.cjs.js.map +1 -1
  26. package/dist/shared/src/api/generated/access.es.js.map +1 -1
  27. package/dist/shared/src/api/generated/authentication.cjs.js +1 -1
  28. package/dist/shared/src/api/generated/authentication.cjs.js.map +1 -1
  29. package/dist/shared/src/api/generated/authentication.es.js +9 -6
  30. package/dist/shared/src/api/generated/authentication.es.js.map +1 -1
  31. package/dist/shared/src/api/generated/entityLists.cjs.js.map +1 -1
  32. package/dist/shared/src/api/generated/entityLists.es.js.map +1 -1
  33. package/dist/shared/src/api/generated/folders.cjs.js.map +1 -1
  34. package/dist/shared/src/api/generated/folders.es.js.map +1 -1
  35. package/dist/shared/src/api/generated/graphql.cjs.js.map +1 -1
  36. package/dist/shared/src/api/generated/graphql.es.js.map +1 -1
  37. package/dist/shared/src/api/generated/graphqlLinks.cjs.js.map +1 -1
  38. package/dist/shared/src/api/generated/graphqlLinks.es.js.map +1 -1
  39. package/dist/shared/src/api/generated/links.cjs.js +1 -1
  40. package/dist/shared/src/api/generated/links.cjs.js.map +1 -1
  41. package/dist/shared/src/api/generated/links.es.js +13 -5
  42. package/dist/shared/src/api/generated/links.es.js.map +1 -1
  43. package/dist/shared/src/api/generated/onboarding.cjs.js.map +1 -1
  44. package/dist/shared/src/api/generated/onboarding.es.js.map +1 -1
  45. package/dist/shared/src/api/generated/operations.cjs.js +1 -1
  46. package/dist/shared/src/api/generated/operations.cjs.js.map +1 -1
  47. package/dist/shared/src/api/generated/operations.es.js +16 -0
  48. package/dist/shared/src/api/generated/operations.es.js.map +1 -1
  49. package/dist/shared/src/api/generated/products.cjs.js +1 -1
  50. package/dist/shared/src/api/generated/products.cjs.js.map +1 -1
  51. package/dist/shared/src/api/generated/products.es.js +6 -3
  52. package/dist/shared/src/api/generated/products.es.js.map +1 -1
  53. package/dist/shared/src/api/generated/projects.cjs.js +1 -1
  54. package/dist/shared/src/api/generated/projects.cjs.js.map +1 -1
  55. package/dist/shared/src/api/generated/projects.es.js +19 -0
  56. package/dist/shared/src/api/generated/projects.es.js.map +1 -1
  57. package/dist/shared/src/api/generated/system.cjs.js.map +1 -1
  58. package/dist/shared/src/api/generated/system.es.js.map +1 -1
  59. package/dist/shared/src/api/generated/tasks.cjs.js.map +1 -1
  60. package/dist/shared/src/api/generated/tasks.es.js.map +1 -1
  61. package/dist/shared/src/api/generated/users.cjs.js.map +1 -1
  62. package/dist/shared/src/api/generated/users.es.js.map +1 -1
  63. package/dist/shared/src/api/generated/versions.cjs.js.map +1 -1
  64. package/dist/shared/src/api/generated/versions.es.js.map +1 -1
  65. package/dist/shared/src/api/generated/views.cjs.js.map +1 -1
  66. package/dist/shared/src/api/generated/views.es.js.map +1 -1
  67. package/dist/shared/src/components/AttributeEditor/AttributeEditor.cjs.js +1 -1
  68. package/dist/shared/src/components/AttributeEditor/AttributeEditor.cjs.js.map +1 -1
  69. package/dist/shared/src/components/AttributeEditor/AttributeEditor.es.js +15 -10
  70. package/dist/shared/src/components/AttributeEditor/AttributeEditor.es.js.map +1 -1
  71. package/dist/shared/src/components/ProjectTableSettings/RowHeightSettings.cjs.js +60 -0
  72. package/dist/shared/src/components/ProjectTableSettings/RowHeightSettings.cjs.js.map +1 -0
  73. package/dist/shared/src/components/ProjectTableSettings/RowHeightSettings.es.js +332 -0
  74. package/dist/shared/src/components/ProjectTableSettings/RowHeightSettings.es.js.map +1 -0
  75. package/dist/shared/src/components/SettingsPanel/SettingsPanel.cjs.js +4 -4
  76. package/dist/shared/src/components/SettingsPanel/SettingsPanel.cjs.js.map +1 -1
  77. package/dist/shared/src/components/SettingsPanel/SettingsPanel.es.js +37 -33
  78. package/dist/shared/src/components/SettingsPanel/SettingsPanel.es.js.map +1 -1
  79. package/dist/shared/src/components/Thumbnail/Thumbnail.styled.cjs.js +3 -5
  80. package/dist/shared/src/components/Thumbnail/Thumbnail.styled.cjs.js.map +1 -1
  81. package/dist/shared/src/components/Thumbnail/Thumbnail.styled.es.js +4 -6
  82. package/dist/shared/src/components/Thumbnail/Thumbnail.styled.es.js.map +1 -1
  83. package/dist/shared/src/components/ThumbnailSimple/ThumbnailSimple.cjs.js +1 -2
  84. package/dist/shared/src/components/ThumbnailSimple/ThumbnailSimple.cjs.js.map +1 -1
  85. package/dist/shared/src/components/ThumbnailSimple/ThumbnailSimple.es.js +0 -1
  86. package/dist/shared/src/components/ThumbnailSimple/ThumbnailSimple.es.js.map +1 -1
  87. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.cjs.js +1 -1
  88. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.cjs.js.map +1 -1
  89. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.es.js +555 -537
  90. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.es.js.map +1 -1
  91. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.styled.cjs.js +0 -1
  92. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.styled.cjs.js.map +1 -1
  93. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.styled.es.js +4 -5
  94. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.styled.es.js.map +1 -1
  95. package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.cjs.js +1 -1
  96. package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.cjs.js.map +1 -1
  97. package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.es.js +92 -91
  98. package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.es.js.map +1 -1
  99. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsContext.cjs.js.map +1 -1
  100. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsContext.es.js.map +1 -1
  101. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.cjs.js +1 -1
  102. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.cjs.js.map +1 -1
  103. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.es.js +126 -108
  104. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.es.js.map +1 -1
  105. package/dist/shared/src/containers/ProjectTreeTable/hooks/useDynamicRowHeight.cjs.js +2 -0
  106. package/dist/shared/src/containers/ProjectTreeTable/hooks/useDynamicRowHeight.cjs.js.map +1 -0
  107. package/dist/shared/src/containers/ProjectTreeTable/hooks/useDynamicRowHeight.es.js +9 -0
  108. package/dist/shared/src/containers/ProjectTreeTable/hooks/useDynamicRowHeight.es.js.map +1 -0
  109. package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.cjs.js +2 -2
  110. package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.cjs.js.map +1 -1
  111. package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.es.js +49 -48
  112. package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.es.js.map +1 -1
  113. package/dist/shared/src/containers/ProjectTreeTable/widgets/EntityNameWidget.cjs.js +38 -9
  114. package/dist/shared/src/containers/ProjectTreeTable/widgets/EntityNameWidget.cjs.js.map +1 -1
  115. package/dist/shared/src/containers/ProjectTreeTable/widgets/EntityNameWidget.es.js +74 -39
  116. package/dist/shared/src/containers/ProjectTreeTable/widgets/EntityNameWidget.es.js.map +1 -1
  117. package/dist/shared/src/containers/ProjectTreeTable/widgets/EnumCellValue.cjs.js +24 -15
  118. package/dist/shared/src/containers/ProjectTreeTable/widgets/EnumCellValue.cjs.js.map +1 -1
  119. package/dist/shared/src/containers/ProjectTreeTable/widgets/EnumCellValue.es.js +71 -59
  120. package/dist/shared/src/containers/ProjectTreeTable/widgets/EnumCellValue.es.js.map +1 -1
  121. package/dist/shared/src/containers/ProjectTreeTable/widgets/ThumbnailWidget.cjs.js +6 -6
  122. package/dist/shared/src/containers/ProjectTreeTable/widgets/ThumbnailWidget.cjs.js.map +1 -1
  123. package/dist/shared/src/containers/ProjectTreeTable/widgets/ThumbnailWidget.es.js +12 -12
  124. package/dist/shared/src/containers/ProjectTreeTable/widgets/ThumbnailWidget.es.js.map +1 -1
  125. package/dist/shared/src/util/columnConfigConverter.cjs.js +1 -1
  126. package/dist/shared/src/util/columnConfigConverter.cjs.js.map +1 -1
  127. package/dist/shared/src/util/columnConfigConverter.es.js +35 -33
  128. package/dist/shared/src/util/columnConfigConverter.es.js.map +1 -1
  129. package/dist/types/api/generated/access.d.ts +6 -0
  130. package/dist/types/api/generated/authentication.d.ts +6 -0
  131. package/dist/types/api/generated/entityLists.d.ts +7 -7
  132. package/dist/types/api/generated/folders.d.ts +2 -2
  133. package/dist/types/api/generated/graphql.d.ts +3 -1
  134. package/dist/types/api/generated/graphqlLinks.d.ts +21 -15
  135. package/dist/types/api/generated/links.d.ts +4 -0
  136. package/dist/types/api/generated/onboarding.d.ts +3 -0
  137. package/dist/types/api/generated/operations.d.ts +22 -1
  138. package/dist/types/api/generated/products.d.ts +23 -0
  139. package/dist/types/api/generated/projects.d.ts +63 -0
  140. package/dist/types/api/generated/representations.d.ts +1 -0
  141. package/dist/types/api/generated/system.d.ts +9 -2
  142. package/dist/types/api/generated/tasks.d.ts +1 -0
  143. package/dist/types/api/generated/users.d.ts +1 -1
  144. package/dist/types/api/generated/versions.d.ts +1 -0
  145. package/dist/types/api/generated/views.d.ts +50 -9
  146. package/dist/types/api/queries/authentication/getAuthentication.d.ts +1 -0
  147. package/dist/types/api/queries/overview/updateOverview.d.ts +2 -0
  148. package/dist/types/api/queries/project/getProject.d.ts +4 -0
  149. package/dist/types/components/ProjectTableSettings/RowHeightSettings.d.ts +3 -0
  150. package/dist/types/containers/ProjectTreeTable/context/ColumnSettingsContext.d.ts +4 -0
  151. package/dist/types/containers/ProjectTreeTable/hooks/useDynamicRowHeight.d.ts +11 -0
  152. package/dist/types/containers/ProjectTreeTable/widgets/EntityNameWidget.d.ts +2 -1
  153. package/dist/types/containers/ProjectTreeTable/widgets/EnumCellValue.d.ts +2 -1
  154. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"users.es.js","sources":["../../../../../src/api/generated/users.ts"],"sourcesContent":["import { api } from '@shared/api/base'\nconst injectedRtkApi = api.injectEndpoints({\n endpoints: (build) => ({\n getUserPools: build.query<GetUserPoolsApiResponse, GetUserPoolsApiArg>({\n query: () => ({ url: `/api/auth/pools` }),\n }),\n getUserApiKeys: build.query<GetUserApiKeysApiResponse, GetUserApiKeysApiArg>({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}/apikeys` }),\n }),\n createUserApiKey: build.mutation<CreateUserApiKeyApiResponse, CreateUserApiKeyApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/apikeys`,\n method: 'POST',\n body: queryArg.apiKeyPostModel,\n }),\n }),\n deleteUserApiKey: build.mutation<DeleteUserApiKeyApiResponse, DeleteUserApiKeyApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/apikeys/${queryArg.entityId}`,\n method: 'DELETE',\n }),\n }),\n updateUserApiKey: build.mutation<UpdateUserApiKeyApiResponse, UpdateUserApiKeyApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/apikeys/${queryArg.entityId}`,\n method: 'PATCH',\n body: queryArg.apiKeyPatchModel,\n }),\n }),\n getAvatar: build.query<GetAvatarApiResponse, GetAvatarApiArg>({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}/avatar` }),\n }),\n uploadAvatar: build.mutation<UploadAvatarApiResponse, UploadAvatarApiArg>({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}/avatar`, method: 'PUT' }),\n }),\n deleteAvatar: build.mutation<DeleteAvatarApiResponse, DeleteAvatarApiArg>({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}/avatar`, method: 'DELETE' }),\n }),\n passwordResetRequest: build.mutation<\n PasswordResetRequestApiResponse,\n PasswordResetRequestApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/passwordResetRequest`,\n method: 'POST',\n body: queryArg.passwordResetRequestModel,\n }),\n }),\n passwordReset: build.mutation<PasswordResetApiResponse, PasswordResetApiArg>({\n query: (queryArg) => ({\n url: `/api/users/passwordReset`,\n method: 'POST',\n body: queryArg.passwordResetModel,\n }),\n }),\n getMyPermissions: build.query<GetMyPermissionsApiResponse, GetMyPermissionsApiArg>({\n query: () => ({ url: `/api/users/me/permissions` }),\n }),\n getMyProjectPermissions: build.query<\n GetMyProjectPermissionsApiResponse,\n GetMyProjectPermissionsApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/me/permissions/${queryArg.projectName}` }),\n }),\n getUserStudioPermissions: build.query<\n GetUserStudioPermissionsApiResponse,\n GetUserStudioPermissionsApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}/permissions` }),\n }),\n getUserProjectPermissions: build.query<\n GetUserProjectPermissionsApiResponse,\n GetUserProjectPermissionsApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/permissions/${queryArg.projectName}`,\n }),\n }),\n getCurrentUser: build.query<GetCurrentUserApiResponse, GetCurrentUserApiArg>({\n query: () => ({ url: `/api/users/me` }),\n }),\n getUser: build.query<GetUserApiResponse, GetUserApiArg>({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}` }),\n }),\n createUser: build.mutation<CreateUserApiResponse, CreateUserApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}`,\n method: 'PUT',\n body: queryArg.newUserModel,\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n deleteUser: build.mutation<DeleteUserApiResponse, DeleteUserApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}`,\n method: 'DELETE',\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n patchUser: build.mutation<PatchUserApiResponse, PatchUserApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}`,\n method: 'PATCH',\n body: queryArg.userPatchModel,\n }),\n }),\n changePassword: build.mutation<ChangePasswordApiResponse, ChangePasswordApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/password`,\n method: 'PATCH',\n body: queryArg.changePasswordRequestModel,\n }),\n }),\n checkPassword: build.mutation<CheckPasswordApiResponse, CheckPasswordApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/checkPassword`,\n method: 'POST',\n body: queryArg.checkPasswordRequestModel,\n }),\n }),\n changeUserName: build.mutation<ChangeUserNameApiResponse, ChangeUserNameApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/rename`,\n method: 'PATCH',\n body: queryArg.changeUserNameRequestModel,\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n getUserSessions: build.query<GetUserSessionsApiResponse, GetUserSessionsApiArg>({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}/sessions` }),\n }),\n deleteUserSession: build.mutation<DeleteUserSessionApiResponse, DeleteUserSessionApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/sessions/${queryArg.sessionId}`,\n method: 'DELETE',\n }),\n }),\n assignAccessGroups: build.mutation<AssignAccessGroupsApiResponse, AssignAccessGroupsApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/accessGroups`,\n method: 'PATCH',\n body: queryArg.assignAccessGroupsRequestModel,\n }),\n }),\n setFrontendPreferences: build.mutation<\n SetFrontendPreferencesApiResponse,\n SetFrontendPreferencesApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/frontendPreferences`,\n method: 'PATCH',\n body: queryArg.patchData,\n }),\n }),\n }),\n overrideExisting: false,\n})\nexport { injectedRtkApi as api }\nexport type GetUserPoolsApiResponse = /** status 200 Successful Response */ UserPoolModel[]\nexport type GetUserPoolsApiArg = void\nexport type GetUserApiKeysApiResponse = /** status 200 Successful Response */ ApiKeyModel[]\nexport type GetUserApiKeysApiArg = {\n userName: string\n}\nexport type CreateUserApiKeyApiResponse = /** status 200 Successful Response */ any\nexport type CreateUserApiKeyApiArg = {\n userName: string\n apiKeyPostModel: ApiKeyPostModel\n}\nexport type DeleteUserApiKeyApiResponse = /** status 200 Successful Response */ any\nexport type DeleteUserApiKeyApiArg = {\n userName: string\n entityId: string\n}\nexport type UpdateUserApiKeyApiResponse = /** status 200 Successful Response */ any\nexport type UpdateUserApiKeyApiArg = {\n userName: string\n entityId: string\n apiKeyPatchModel: ApiKeyPatchModel\n}\nexport type GetAvatarApiResponse = /** status 200 Successful Response */ any\nexport type GetAvatarApiArg = {\n userName: string\n}\nexport type UploadAvatarApiResponse = /** status 200 Successful Response */ any\nexport type UploadAvatarApiArg = {\n userName: string\n}\nexport type DeleteAvatarApiResponse = /** status 200 Successful Response */ any\nexport type DeleteAvatarApiArg = {\n userName: string\n}\nexport type PasswordResetRequestApiResponse = /** status 200 Successful Response */ any\nexport type PasswordResetRequestApiArg = {\n passwordResetRequestModel: PasswordResetRequestModel\n}\nexport type PasswordResetApiResponse = /** status 200 Successful Response */ LoginResponseModel\nexport type PasswordResetApiArg = {\n passwordResetModel: PasswordResetModel\n}\nexport type GetMyPermissionsApiResponse = /** status 200 Successful Response */ UserPermissionsModel\nexport type GetMyPermissionsApiArg = void\nexport type GetMyProjectPermissionsApiResponse = /** status 200 Successful Response */ Permissions\nexport type GetMyProjectPermissionsApiArg = {\n projectName: string\n}\nexport type GetUserStudioPermissionsApiResponse = /** status 200 Successful Response */ Permissions\nexport type GetUserStudioPermissionsApiArg = {\n userName: string\n}\nexport type GetUserProjectPermissionsApiResponse = /** status 200 Successful Response */ Permissions\nexport type GetUserProjectPermissionsApiArg = {\n projectName: string\n userName: string\n}\nexport type GetCurrentUserApiResponse = /** status 200 Successful Response */ UserModel\nexport type GetCurrentUserApiArg = void\nexport type GetUserApiResponse = /** status 200 Successful Response */\n | UserModel\n | {\n [key: string]: string\n }\nexport type GetUserApiArg = {\n userName: string\n}\nexport type CreateUserApiResponse = /** status 200 Successful Response */ any\nexport type CreateUserApiArg = {\n userName: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n newUserModel: NewUserModel\n}\nexport type DeleteUserApiResponse = /** status 200 Successful Response */ any\nexport type DeleteUserApiArg = {\n userName: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n}\nexport type PatchUserApiResponse = /** status 200 Successful Response */ any\nexport type PatchUserApiArg = {\n userName: string\n userPatchModel: UserPatchModel\n}\nexport type ChangePasswordApiResponse = /** status 200 Successful Response */ any\nexport type ChangePasswordApiArg = {\n userName: string\n changePasswordRequestModel: ChangePasswordRequestModel\n}\nexport type CheckPasswordApiResponse = /** status 200 Successful Response */ any\nexport type CheckPasswordApiArg = {\n userName: string\n checkPasswordRequestModel: CheckPasswordRequestModel\n}\nexport type ChangeUserNameApiResponse = /** status 200 Successful Response */ any\nexport type ChangeUserNameApiArg = {\n userName: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n changeUserNameRequestModel: ChangeUserNameRequestModel\n}\nexport type GetUserSessionsApiResponse =\n /** status 200 Successful Response */ UserSessionsResponseModel\nexport type GetUserSessionsApiArg = {\n userName: string\n}\nexport type DeleteUserSessionApiResponse = /** status 200 Successful Response */ any\nexport type DeleteUserSessionApiArg = {\n sessionId: string\n userName: string\n}\nexport type AssignAccessGroupsApiResponse = /** status 200 Successful Response */ any\nexport type AssignAccessGroupsApiArg = {\n userName: string\n assignAccessGroupsRequestModel: AssignAccessGroupsRequestModel\n}\nexport type SetFrontendPreferencesApiResponse = /** status 200 Successful Response */ any\nexport type SetFrontendPreferencesApiArg = {\n userName: string\n patchData: object\n}\nexport type UserPoolModel = {\n id: string\n label: string\n type: 'fixed' | 'metered'\n valid: boolean\n note: string\n exp: number\n max: number\n used: number\n}\nexport type ApiKeyModel = {\n id: string\n label: string\n preview: string\n created: number\n expires?: number\n}\nexport type ValidationError = {\n loc: (string | number)[]\n msg: string\n type: string\n}\nexport type HttpValidationError = {\n detail?: ValidationError[]\n}\nexport type ApiKeyPostModel = {\n label: string\n key: string\n expires?: number\n}\nexport type ApiKeyPatchModel = {\n label?: string\n expires?: number\n}\nexport type PasswordResetRequestModel = {\n email: string\n url: string\n}\nexport type UserAttribModel = {\n fullName?: string\n email?: string\n avatarUrl?: string\n developerMode?: boolean\n}\nexport type UserModel = {\n /** Name is an unique id of the {entity_name} */\n name: string\n attrib?: UserAttribModel\n data?: Record<string, any>\n /** Whether the user is active */\n active?: boolean\n ownAttrib?: string[]\n /** Time of creation */\n createdAt?: string\n /** Time of last update */\n updatedAt?: string\n}\nexport type LoginResponseModel = {\n /** Text message, which may be displayed to the user */\n detail?: string\n error?: string\n token?: string\n user?: UserModel\n /** URL to redirect the user after login */\n redirectUrl?: string\n}\nexport type PasswordResetModel = {\n token: string\n password?: string\n}\nexport type StudioManagementPermissions = {\n /** Allow users to create new projects */\n create_projects?: boolean\n /** Allow users to list all users in the studio */\n list_all_users?: boolean\n}\nexport type ProjectManagementPermissions = {\n /** Allow users to view or edit the project anatomy */\n anatomy?: number\n /** Allow users to view or assign users to project access groups */\n access?: number\n /** Allow users to view or edit the project addon settings */\n settings?: number\n}\nexport type FolderAccess = {\n access_type?: string\n /** The path of the folder to allow access to. Required for access_type 'hierarchy and 'children' */\n path?: string\n}\nexport type FolderAccessList = {\n enabled?: boolean\n access_list?: FolderAccess[]\n}\nexport type AttributeReadAccessList = {\n enabled?: boolean\n attributes?: string[]\n}\nexport type AttributeWriteAccessList = {\n enabled?: boolean\n fields?: string[]\n attributes?: string[]\n}\nexport type EndpointsAccessList = {\n enabled?: boolean\n endpoints?: string[]\n}\nexport type ProjectAdvancedPermissions = {\n /** If a user can access a task through the 'Assigned' permission, enabling this will also show all sibling tasks in the same folder. When disabled, only the assigned task is visible. */\n show_sibling_tasks?: boolean\n}\nexport type Permissions = {\n studio?: StudioManagementPermissions\n project?: ProjectManagementPermissions\n /** Whitelist folders a user can create */\n create?: FolderAccessList\n /** Whitelist folders a user can read */\n read?: FolderAccessList\n /** Whitelist folders a user can update */\n update?: FolderAccessList\n /** Whitelist folders a user can publish to */\n publish?: FolderAccessList\n /** Whitelist folders a user can delete */\n delete?: FolderAccessList\n /** Whitelist attributes a user can read */\n attrib_read?: AttributeReadAccessList\n /** Whitelist attributes a user can write */\n attrib_write?: AttributeWriteAccessList\n /** Whitelist REST endpoints a user can access */\n endpoints?: EndpointsAccessList\n advanced?: ProjectAdvancedPermissions\n}\nexport type UserPermissionsModel = {\n user_level?: 'admin' | 'manager' | 'user'\n /** Permissions for the studio */\n studio?: StudioManagementPermissions\n /** Permissions for individual projects */\n projects?: {\n [key: string]: Permissions\n }\n}\nexport type NewUserModel = {\n attrib?: UserAttribModel\n data?: Record<string, any>\n /** Whether the user is active */\n active?: boolean\n /** Password for the new user */\n password?: string\n /** API Key for the new service user */\n apiKey?: string\n}\nexport type UserPatchModel = {\n attrib?: UserAttribModel\n data?: Record<string, any>\n /** Whether the user is active */\n active?: boolean\n}\nexport type ChangePasswordRequestModel = {\n /** New password */\n password?: string\n /** API Key to set to a service user */\n apiKey?: string\n}\nexport type CheckPasswordRequestModel = {\n password: string\n}\nexport type ChangeUserNameRequestModel = {\n /** New user name */\n newName: string\n}\nexport type LocationInfo = {\n country?: string\n subdivision?: string\n city?: string\n}\nexport type AgentInfo = {\n platform?: string\n client?: string\n device?: string\n}\nexport type ClientInfo = {\n ip: string\n languages?: string[]\n location?: LocationInfo\n agent?: AgentInfo\n site_id?: string\n}\nexport type UserSessionModel = {\n token: string\n isService: boolean\n lastUsed: number\n clientInfo?: ClientInfo\n}\nexport type UserSessionsResponseModel = {\n sessions: UserSessionModel[]\n}\nexport type AccessGroupsOnProject = {\n /** Project name */\n project: string\n /** List of access groups on the project */\n accessGroups: string[]\n}\nexport type AssignAccessGroupsRequestModel = {\n /** List of access groups to assign */\n accessGroups?: AccessGroupsOnProject[]\n}\n"],"names":["injectedRtkApi","api","build","queryArg"],"mappings":";AACM,MAAAA,IAAiBC,EAAI,gBAAgB;AAAA,EACzC,WAAW,CAACC,OAAW;AAAA,IACrB,cAAcA,EAAM,MAAmD;AAAA,MACrE,OAAO,OAAO,EAAE,KAAK,kBAAkB;AAAA,IAAA,CACxC;AAAA,IACD,gBAAgBA,EAAM,MAAuD;AAAA,MAC3E,OAAO,CAACC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pC,QAAQ;AAAA,QACR,MAAMA,EAAS;AAAA,MACjB;AAAA,IAAA,CACD;AAAA,IACD,wBAAwBD,EAAM,SAG5B;AAAA,MACA,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ;AAAA,QACpC,QAAQ;AAAA,QACR,MAAMA,EAAS;AAAA,MACjB;AAAA,IACD,CAAA;AAAA,EAAA;AAAA,EAEH,kBAAkB;AACpB,CAAC;"}
1
+ {"version":3,"file":"users.es.js","sources":["../../../../../src/api/generated/users.ts"],"sourcesContent":["import { api } from '@shared/api/base'\nconst injectedRtkApi = api.injectEndpoints({\n endpoints: (build) => ({\n getUserPools: build.query<GetUserPoolsApiResponse, GetUserPoolsApiArg>({\n query: () => ({ url: `/api/auth/pools` }),\n }),\n getUserApiKeys: build.query<GetUserApiKeysApiResponse, GetUserApiKeysApiArg>({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}/apikeys` }),\n }),\n createUserApiKey: build.mutation<CreateUserApiKeyApiResponse, CreateUserApiKeyApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/apikeys`,\n method: 'POST',\n body: queryArg.apiKeyPostModel,\n }),\n }),\n deleteUserApiKey: build.mutation<DeleteUserApiKeyApiResponse, DeleteUserApiKeyApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/apikeys/${queryArg.entityId}`,\n method: 'DELETE',\n }),\n }),\n updateUserApiKey: build.mutation<UpdateUserApiKeyApiResponse, UpdateUserApiKeyApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/apikeys/${queryArg.entityId}`,\n method: 'PATCH',\n body: queryArg.apiKeyPatchModel,\n }),\n }),\n getAvatar: build.query<GetAvatarApiResponse, GetAvatarApiArg>({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}/avatar` }),\n }),\n uploadAvatar: build.mutation<UploadAvatarApiResponse, UploadAvatarApiArg>({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}/avatar`, method: 'PUT' }),\n }),\n deleteAvatar: build.mutation<DeleteAvatarApiResponse, DeleteAvatarApiArg>({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}/avatar`, method: 'DELETE' }),\n }),\n passwordResetRequest: build.mutation<\n PasswordResetRequestApiResponse,\n PasswordResetRequestApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/passwordResetRequest`,\n method: 'POST',\n body: queryArg.passwordResetRequestModel,\n }),\n }),\n passwordReset: build.mutation<PasswordResetApiResponse, PasswordResetApiArg>({\n query: (queryArg) => ({\n url: `/api/users/passwordReset`,\n method: 'POST',\n body: queryArg.passwordResetModel,\n }),\n }),\n getMyPermissions: build.query<GetMyPermissionsApiResponse, GetMyPermissionsApiArg>({\n query: () => ({ url: `/api/users/me/permissions` }),\n }),\n getMyProjectPermissions: build.query<\n GetMyProjectPermissionsApiResponse,\n GetMyProjectPermissionsApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/me/permissions/${queryArg.projectName}` }),\n }),\n getUserStudioPermissions: build.query<\n GetUserStudioPermissionsApiResponse,\n GetUserStudioPermissionsApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}/permissions` }),\n }),\n getUserProjectPermissions: build.query<\n GetUserProjectPermissionsApiResponse,\n GetUserProjectPermissionsApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/permissions/${queryArg.projectName}`,\n }),\n }),\n getCurrentUser: build.query<GetCurrentUserApiResponse, GetCurrentUserApiArg>({\n query: () => ({ url: `/api/users/me` }),\n }),\n getUser: build.query<GetUserApiResponse, GetUserApiArg>({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}` }),\n }),\n createUser: build.mutation<CreateUserApiResponse, CreateUserApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}`,\n method: 'PUT',\n body: queryArg.newUserModel,\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n deleteUser: build.mutation<DeleteUserApiResponse, DeleteUserApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}`,\n method: 'DELETE',\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n patchUser: build.mutation<PatchUserApiResponse, PatchUserApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}`,\n method: 'PATCH',\n body: queryArg.userPatchModel,\n }),\n }),\n changePassword: build.mutation<ChangePasswordApiResponse, ChangePasswordApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/password`,\n method: 'PATCH',\n body: queryArg.changePasswordRequestModel,\n }),\n }),\n checkPassword: build.mutation<CheckPasswordApiResponse, CheckPasswordApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/checkPassword`,\n method: 'POST',\n body: queryArg.checkPasswordRequestModel,\n }),\n }),\n changeUserName: build.mutation<ChangeUserNameApiResponse, ChangeUserNameApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/rename`,\n method: 'PATCH',\n body: queryArg.changeUserNameRequestModel,\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n getUserSessions: build.query<GetUserSessionsApiResponse, GetUserSessionsApiArg>({\n query: (queryArg) => ({ url: `/api/users/${queryArg.userName}/sessions` }),\n }),\n deleteUserSession: build.mutation<DeleteUserSessionApiResponse, DeleteUserSessionApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/sessions/${queryArg.sessionId}`,\n method: 'DELETE',\n }),\n }),\n assignAccessGroups: build.mutation<AssignAccessGroupsApiResponse, AssignAccessGroupsApiArg>({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/accessGroups`,\n method: 'PATCH',\n body: queryArg.assignAccessGroupsRequestModel,\n }),\n }),\n setFrontendPreferences: build.mutation<\n SetFrontendPreferencesApiResponse,\n SetFrontendPreferencesApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/${queryArg.userName}/frontendPreferences`,\n method: 'PATCH',\n body: queryArg.patchData,\n }),\n }),\n }),\n overrideExisting: false,\n})\nexport { injectedRtkApi as api }\nexport type GetUserPoolsApiResponse = /** status 200 Successful Response */ UserPoolModel[]\nexport type GetUserPoolsApiArg = void\nexport type GetUserApiKeysApiResponse = /** status 200 Successful Response */ ApiKeyModel[]\nexport type GetUserApiKeysApiArg = {\n userName: string\n}\nexport type CreateUserApiKeyApiResponse = /** status 200 Successful Response */ any\nexport type CreateUserApiKeyApiArg = {\n userName: string\n apiKeyPostModel: ApiKeyPostModel\n}\nexport type DeleteUserApiKeyApiResponse = /** status 200 Successful Response */ any\nexport type DeleteUserApiKeyApiArg = {\n userName: string\n entityId: string\n}\nexport type UpdateUserApiKeyApiResponse = /** status 200 Successful Response */ any\nexport type UpdateUserApiKeyApiArg = {\n userName: string\n entityId: string\n apiKeyPatchModel: ApiKeyPatchModel\n}\nexport type GetAvatarApiResponse = /** status 200 Successful Response */ any\nexport type GetAvatarApiArg = {\n userName: string\n}\nexport type UploadAvatarApiResponse = /** status 200 Successful Response */ any\nexport type UploadAvatarApiArg = {\n userName: string\n}\nexport type DeleteAvatarApiResponse = /** status 200 Successful Response */ any\nexport type DeleteAvatarApiArg = {\n userName: string\n}\nexport type PasswordResetRequestApiResponse = /** status 200 Successful Response */ any\nexport type PasswordResetRequestApiArg = {\n passwordResetRequestModel: PasswordResetRequestModel\n}\nexport type PasswordResetApiResponse = /** status 200 Successful Response */ LoginResponseModel\nexport type PasswordResetApiArg = {\n passwordResetModel: PasswordResetModel\n}\nexport type GetMyPermissionsApiResponse = /** status 200 Successful Response */ UserPermissionsModel\nexport type GetMyPermissionsApiArg = void\nexport type GetMyProjectPermissionsApiResponse = /** status 200 Successful Response */ Permissions\nexport type GetMyProjectPermissionsApiArg = {\n projectName: string\n}\nexport type GetUserStudioPermissionsApiResponse = /** status 200 Successful Response */ Permissions\nexport type GetUserStudioPermissionsApiArg = {\n userName: string\n}\nexport type GetUserProjectPermissionsApiResponse = /** status 200 Successful Response */ Permissions\nexport type GetUserProjectPermissionsApiArg = {\n projectName: string\n userName: string\n}\nexport type GetCurrentUserApiResponse = /** status 200 Successful Response */ UserModel\nexport type GetCurrentUserApiArg = void\nexport type GetUserApiResponse = /** status 200 Successful Response */\n | UserModel\n | {\n [key: string]: string\n }\nexport type GetUserApiArg = {\n userName: string\n}\nexport type CreateUserApiResponse = /** status 200 Successful Response */ any\nexport type CreateUserApiArg = {\n userName: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n newUserModel: NewUserModel\n}\nexport type DeleteUserApiResponse = /** status 200 Successful Response */ any\nexport type DeleteUserApiArg = {\n userName: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n}\nexport type PatchUserApiResponse = /** status 200 Successful Response */ any\nexport type PatchUserApiArg = {\n userName: string\n userPatchModel: UserPatchModel\n}\nexport type ChangePasswordApiResponse = /** status 200 Successful Response */ any\nexport type ChangePasswordApiArg = {\n userName: string\n changePasswordRequestModel: ChangePasswordRequestModel\n}\nexport type CheckPasswordApiResponse = /** status 200 Successful Response */ any\nexport type CheckPasswordApiArg = {\n userName: string\n checkPasswordRequestModel: CheckPasswordRequestModel\n}\nexport type ChangeUserNameApiResponse = /** status 200 Successful Response */ any\nexport type ChangeUserNameApiArg = {\n userName: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n changeUserNameRequestModel: ChangeUserNameRequestModel\n}\nexport type GetUserSessionsApiResponse =\n /** status 200 Successful Response */ UserSessionsResponseModel\nexport type GetUserSessionsApiArg = {\n userName: string\n}\nexport type DeleteUserSessionApiResponse = /** status 200 Successful Response */ any\nexport type DeleteUserSessionApiArg = {\n sessionId: string\n userName: string\n}\nexport type AssignAccessGroupsApiResponse = /** status 200 Successful Response */ any\nexport type AssignAccessGroupsApiArg = {\n userName: string\n assignAccessGroupsRequestModel: AssignAccessGroupsRequestModel\n}\nexport type SetFrontendPreferencesApiResponse = /** status 200 Successful Response */ any\nexport type SetFrontendPreferencesApiArg = {\n userName: string\n patchData: object\n}\nexport type UserPoolModel = {\n id: string\n label: string\n type: 'fixed' | 'metered'\n valid: boolean\n note: string\n exp: number\n max: number\n used: number\n}\nexport type ApiKeyModel = {\n id: string\n label: string\n preview: string\n created: number\n expires?: number\n}\nexport type ValidationError = {\n loc: (string | number)[]\n msg: string\n type: string\n}\nexport type HttpValidationError = {\n detail?: ValidationError[]\n}\nexport type ApiKeyPostModel = {\n label: string\n key: string\n expires?: number\n}\nexport type ApiKeyPatchModel = {\n label?: string\n expires?: number\n}\nexport type PasswordResetRequestModel = {\n email: string\n url: string\n}\nexport type UserAttribModel = {\n fullName?: string\n email?: string\n avatarUrl?: string\n developerMode?: boolean\n}\nexport type UserModel = {\n /** Name is an unique id of the {entity_name} */\n name: string\n attrib?: UserAttribModel\n data?: Record<string, any>\n /** Whether the user is active */\n active?: boolean\n ownAttrib?: string[]\n /** Time of creation */\n createdAt?: string\n /** Time of last update */\n updatedAt?: string\n}\nexport type LoginResponseModel = {\n /** Text message, which may be displayed to the user */\n detail?: string\n error?: string\n token?: string\n user?: UserModel\n /** URL to redirect the user after login */\n redirectUrl?: string\n}\nexport type PasswordResetModel = {\n token: string\n password?: string\n}\nexport type StudioManagementPermissions = {\n /** Allow users to create new projects */\n create_projects?: boolean\n /** Allow users to list all users in the studio */\n list_all_users?: boolean\n}\nexport type ProjectManagementPermissions = {\n /** Allow users to view or edit the project anatomy */\n anatomy?: number\n /** Allow users to view or assign users to project access groups */\n access?: number\n /** Allow users to view or edit the project addon settings */\n settings?: number\n}\nexport type FolderAccess = {\n access_type?: string\n /** The path of the folder to allow access to. Required for access_type 'hierarchy and 'children' */\n path?: string\n}\nexport type FolderAccessList = {\n enabled?: boolean\n access_list?: FolderAccess[]\n}\nexport type AttributeReadAccessList = {\n enabled?: boolean\n attributes?: string[]\n}\nexport type AttributeWriteAccessList = {\n enabled?: boolean\n attributes?: string[]\n fields?: string[]\n}\nexport type EndpointsAccessList = {\n enabled?: boolean\n endpoints?: string[]\n}\nexport type ProjectAdvancedPermissions = {\n /** If a user can access a task through the 'Assigned' permission, enabling this will also show all sibling tasks in the same folder. When disabled, only the assigned task is visible. */\n show_sibling_tasks?: boolean\n}\nexport type Permissions = {\n studio?: StudioManagementPermissions\n project?: ProjectManagementPermissions\n /** Whitelist folders a user can create */\n create?: FolderAccessList\n /** Whitelist folders a user can read */\n read?: FolderAccessList\n /** Whitelist folders a user can update */\n update?: FolderAccessList\n /** Whitelist folders a user can publish to */\n publish?: FolderAccessList\n /** Whitelist folders a user can delete */\n delete?: FolderAccessList\n /** Whitelist attributes a user can read */\n attrib_read?: AttributeReadAccessList\n /** Whitelist attributes a user can write */\n attrib_write?: AttributeWriteAccessList\n /** Whitelist REST endpoints a user can access */\n endpoints?: EndpointsAccessList\n advanced?: ProjectAdvancedPermissions\n}\nexport type UserPermissionsModel = {\n user_level?: 'admin' | 'manager' | 'user'\n /** Permissions for the studio */\n studio?: StudioManagementPermissions\n /** Permissions for individual projects */\n projects?: {\n [key: string]: Permissions\n }\n}\nexport type NewUserModel = {\n attrib?: UserAttribModel\n data?: Record<string, any>\n /** Whether the user is active */\n active?: boolean\n /** Password for the new user */\n password?: string\n /** API Key for the new service user */\n apiKey?: string\n}\nexport type UserPatchModel = {\n attrib?: UserAttribModel\n data?: Record<string, any>\n /** Whether the user is active */\n active?: boolean\n}\nexport type ChangePasswordRequestModel = {\n /** New password */\n password?: string\n /** API Key to set to a service user */\n apiKey?: string\n}\nexport type CheckPasswordRequestModel = {\n password: string\n}\nexport type ChangeUserNameRequestModel = {\n /** New user name */\n newName: string\n}\nexport type LocationInfo = {\n country?: string\n subdivision?: string\n city?: string\n}\nexport type AgentInfo = {\n platform?: string\n client?: string\n device?: string\n}\nexport type ClientInfo = {\n ip: string\n languages?: string[]\n location?: LocationInfo\n agent?: AgentInfo\n site_id?: string\n}\nexport type UserSessionModel = {\n token: string\n isService: boolean\n lastUsed: number\n clientInfo?: ClientInfo\n}\nexport type UserSessionsResponseModel = {\n sessions: UserSessionModel[]\n}\nexport type AccessGroupsOnProject = {\n /** Project name */\n project: string\n /** List of access groups on the project */\n accessGroups: string[]\n}\nexport type AssignAccessGroupsRequestModel = {\n /** List of access groups to assign */\n accessGroups?: AccessGroupsOnProject[]\n}\n"],"names":["injectedRtkApi","api","build","queryArg"],"mappings":";AACM,MAAAA,IAAiBC,EAAI,gBAAgB;AAAA,EACzC,WAAW,CAACC,OAAW;AAAA,IACrB,cAAcA,EAAM,MAAmD;AAAA,MACrE,OAAO,OAAO,EAAE,KAAK,kBAAkB;AAAA,IAAA,CACxC;AAAA,IACD,gBAAgBA,EAAM,MAAuD;AAAA,MAC3E,OAAO,CAACC,OAAc,EAAE,KAAK,cAAcA,EAAS,QAAQ,WAAW;AAAA,IAAA,CACxE;AAAA,IACD,kBAAkBD,EAAM,SAA8D;AAAA,MACpF,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ;AAAA,QACpC,QAAQ;AAAA,QACR,MAAMA,EAAS;AAAA,MACjB;AAAA,IAAA,CACD;AAAA,IACD,kBAAkBD,EAAM,SAA8D;AAAA,MACpF,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ,YAAYA,EAAS,QAAQ;AAAA,QACjE,QAAQ;AAAA,MACV;AAAA,IAAA,CACD;AAAA,IACD,kBAAkBD,EAAM,SAA8D;AAAA,MACpF,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ,YAAYA,EAAS,QAAQ;AAAA,QACjE,QAAQ;AAAA,QACR,MAAMA,EAAS;AAAA,MACjB;AAAA,IAAA,CACD;AAAA,IACD,WAAWD,EAAM,MAA6C;AAAA,MAC5D,OAAO,CAACC,OAAc,EAAE,KAAK,cAAcA,EAAS,QAAQ,UAAU;AAAA,IAAA,CACvE;AAAA,IACD,cAAcD,EAAM,SAAsD;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AAAA,UAC/B,iBAAiBA,EAAS,eAAe;AAAA,QAAA;AAAA,MAE7C;AAAA,IAAA,CACD;AAAA,IACD,iBAAiBD,EAAM,MAAyD;AAAA,MAC9E,OAAO,CAACC,OAAc,EAAE,KAAK,cAAcA,EAAS,QAAQ,YAAY;AAAA,IAAA,CACzE;AAAA,IACD,mBAAmBD,EAAM,SAAgE;AAAA,MACvF,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ,aAAaA,EAAS,SAAS;AAAA,QACnE,QAAQ;AAAA,MACV;AAAA,IAAA,CACD;AAAA,IACD,oBAAoBD,EAAM,SAAkE;AAAA,MAC1F,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ;AAAA,QACpC,QAAQ;AAAA,QACR,MAAMA,EAAS;AAAA,MACjB;AAAA,IAAA,CACD;AAAA,IACD,wBAAwBD,EAAM,SAG5B;AAAA,MACA,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ;AAAA,QACpC,QAAQ;AAAA,QACR,MAAMA,EAAS;AAAA,MACjB;AAAA,IACD,CAAA;AAAA,EAAA;AAAA,EAEH,kBAAkB;AACpB,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"versions.cjs.js","sources":["../../../../../src/api/generated/versions.ts"],"sourcesContent":["import { api } from '@shared/api/base'\nconst injectedRtkApi = api.injectEndpoints({\n endpoints: (build) => ({\n getVersionThumbnail: build.query<GetVersionThumbnailApiResponse, GetVersionThumbnailApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}/thumbnail`,\n params: {\n placeholder: queryArg.placeholder,\n original: queryArg.original,\n },\n }),\n }),\n createVersionThumbnail: build.mutation<\n CreateVersionThumbnailApiResponse,\n CreateVersionThumbnailApiArg\n >({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}/thumbnail`,\n method: 'POST',\n headers: {\n 'content-type': queryArg['content-type'],\n },\n }),\n }),\n getVersion: build.query<GetVersionApiResponse, GetVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}`,\n }),\n }),\n deleteVersion: build.mutation<DeleteVersionApiResponse, DeleteVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}`,\n method: 'DELETE',\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n updateVersion: build.mutation<UpdateVersionApiResponse, UpdateVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}`,\n method: 'PATCH',\n body: queryArg.versionPatchModel,\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n createVersion: build.mutation<CreateVersionApiResponse, CreateVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions`,\n method: 'POST',\n body: queryArg.versionPostModel,\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n }),\n overrideExisting: false,\n})\nexport { injectedRtkApi as api }\nexport type GetVersionThumbnailApiResponse = /** status 200 Successful Response */ any\nexport type GetVersionThumbnailApiArg = {\n projectName: string\n versionId: string\n placeholder?: 'empty' | 'none'\n original?: boolean\n}\nexport type CreateVersionThumbnailApiResponse =\n /** status 201 Successful Response */ CreateThumbnailResponseModel\nexport type CreateVersionThumbnailApiArg = {\n projectName: string\n versionId: string\n 'content-type'?: string\n}\nexport type GetVersionApiResponse = /** status 200 Successful Response */ VersionModel\nexport type GetVersionApiArg = {\n projectName: string\n versionId: string\n}\nexport type DeleteVersionApiResponse = unknown\nexport type DeleteVersionApiArg = {\n projectName: string\n versionId: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n}\nexport type UpdateVersionApiResponse = unknown\nexport type UpdateVersionApiArg = {\n projectName: string\n versionId: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n versionPatchModel: VersionPatchModel\n}\nexport type CreateVersionApiResponse = /** status 201 Successful Response */ EntityIdResponse\nexport type CreateVersionApiArg = {\n projectName: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n versionPostModel: VersionPostModel\n}\nexport type ValidationError = {\n loc: (string | number)[]\n msg: string\n type: string\n}\nexport type HttpValidationError = {\n detail?: ValidationError[]\n}\nexport type CreateThumbnailResponseModel = {\n id: string\n}\nexport type VersionAttribModel = {\n /** Frame rate */\n fps?: number\n /** Horizontal resolution */\n resolutionWidth?: number\n /** Vertical resolution */\n resolutionHeight?: number\n pixelAspect?: number\n clipIn?: number\n clipOut?: number\n frameStart?: number\n frameEnd?: number\n handleStart?: number\n handleEnd?: number\n intent?: string\n machine?: string\n source?: string\n comment?: string\n site?: string\n families?: string[]\n colorSpace?: string\n /** Textual description of the entity */\n description?: string\n}\nexport type VersionModel = {\n /** Unique identifier of the {entity_name} */\n id?: string\n /** Version number */\n version: number\n /** ID of the parent product */\n productId: string\n taskId?: string\n thumbnailId?: string\n author?: string\n attrib?: VersionAttribModel\n data?: Record<string, any>\n /** Whether the version is active */\n active?: boolean\n ownAttrib?: string[]\n /** Status of the version */\n status?: string\n /** Tags assigned to the the version */\n tags?: string[]\n /** Time of creation */\n createdAt?: string\n /** Time of last update */\n updatedAt?: string\n}\nexport type VersionPatchModel = {\n /** Version number */\n version?: number\n /** ID of the parent product */\n productId?: string\n taskId?: string\n thumbnailId?: string\n author?: string\n /** Status of the version */\n status?: string\n /** Tags assigned to the the version */\n tags?: string[]\n attrib?: VersionAttribModel\n data?: Record<string, any>\n /** Whether the version is active */\n active?: boolean\n}\nexport type EntityIdResponse = {\n /** Entity ID */\n id: string\n}\nexport type VersionPostModel = {\n /** Explicitly set the ID of the entity */\n id?: string\n /** Version number */\n version: number\n /** ID of the parent product */\n productId: string\n taskId?: string\n thumbnailId?: string\n author?: string\n /** Status of the version */\n status?: string\n /** Tags assigned to the the version */\n tags?: string[]\n attrib?: VersionAttribModel\n data?: Record<string, any>\n /** Whether the version is active */\n active?: boolean\n}\n"],"names":["injectedRtkApi","api","build","queryArg"],"mappings":"yHACMA,EAAiBC,MAAI,gBAAgB,CACzC,UAAYC,IAAW,CACrB,oBAAqBA,EAAM,MAAiE,CAC1F,MAAQC,IAAc,CACpB,IAAK,iBAAiBA,EAAS,WAAW,aAAaA,EAAS,SAAS,aACzE,OAAQ,CACN,YAAaA,EAAS,YACtB,SAAUA,EAAS,QAAA,CAEvB,EAAA,CACD,EACD,uBAAwBD,EAAM,SAG5B,CACA,MAAQC,IAAc,CACpB,IAAK,iBAAiBA,EAAS,WAAW,aAAaA,EAAS,SAAS,aACzE,OAAQ,OACR,QAAS,CACP,eAAgBA,EAAS,cAAc,CAAA,CAE3C,EAAA,CACD,EACD,WAAYD,EAAM,MAA+C,CAC/D,MAAQC,IAAc,CACpB,IAAK,iBAAiBA,EAAS,WAAW,aAAaA,EAAS,SAAS,EAC3E,EAAA,CACD,EACD,cAAeD,EAAM,SAAwD,CAC3E,MAAQC,IAAc,CACpB,IAAK,iBAAiBA,EAAS,WAAW,aAAaA,EAAS,SAAS,GACzE,OAAQ,SACR,QAAS,CACP,WAAYA,EAAS,UAAU,EAC/B,gBAAiBA,EAAS,eAAe,CAAA,CAE7C,EAAA,CACD,EACD,cAAeD,EAAM,SAAwD,CAC3E,MAAQC,IAAc,CACpB,IAAK,iBAAiBA,EAAS,WAAW,aAAaA,EAAS,SAAS,GACzE,OAAQ,QACR,KAAMA,EAAS,kBACf,QAAS,CACP,WAAYA,EAAS,UAAU,EAC/B,gBAAiBA,EAAS,eAAe,CAAA,CAE7C,EAAA,CACD,EACD,cAAeD,EAAM,SAAwD,CAC3E,MAAQC,IAAc,CACpB,IAAK,iBAAiBA,EAAS,WAAW,YAC1C,OAAQ,OACR,KAAMA,EAAS,iBACf,QAAS,CACP,WAAYA,EAAS,UAAU,EAC/B,gBAAiBA,EAAS,eAAe,CAAA,CAE7C,EACD,CAAA,CAAA,GAEH,iBAAkB,EACpB,CAAC"}
1
+ {"version":3,"file":"versions.cjs.js","sources":["../../../../../src/api/generated/versions.ts"],"sourcesContent":["import { api } from '@shared/api/base'\nconst injectedRtkApi = api.injectEndpoints({\n endpoints: (build) => ({\n getVersionThumbnail: build.query<GetVersionThumbnailApiResponse, GetVersionThumbnailApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}/thumbnail`,\n params: {\n placeholder: queryArg.placeholder,\n original: queryArg.original,\n },\n }),\n }),\n createVersionThumbnail: build.mutation<\n CreateVersionThumbnailApiResponse,\n CreateVersionThumbnailApiArg\n >({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}/thumbnail`,\n method: 'POST',\n headers: {\n 'content-type': queryArg['content-type'],\n },\n }),\n }),\n getVersion: build.query<GetVersionApiResponse, GetVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}`,\n }),\n }),\n deleteVersion: build.mutation<DeleteVersionApiResponse, DeleteVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}`,\n method: 'DELETE',\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n updateVersion: build.mutation<UpdateVersionApiResponse, UpdateVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}`,\n method: 'PATCH',\n body: queryArg.versionPatchModel,\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n createVersion: build.mutation<CreateVersionApiResponse, CreateVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions`,\n method: 'POST',\n body: queryArg.versionPostModel,\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n }),\n overrideExisting: false,\n})\nexport { injectedRtkApi as api }\nexport type GetVersionThumbnailApiResponse = /** status 200 Successful Response */ any\nexport type GetVersionThumbnailApiArg = {\n projectName: string\n versionId: string\n placeholder?: 'empty' | 'none'\n original?: boolean\n}\nexport type CreateVersionThumbnailApiResponse =\n /** status 201 Successful Response */ CreateThumbnailResponseModel\nexport type CreateVersionThumbnailApiArg = {\n projectName: string\n versionId: string\n 'content-type'?: string\n}\nexport type GetVersionApiResponse = /** status 200 Successful Response */ VersionModel\nexport type GetVersionApiArg = {\n projectName: string\n versionId: string\n}\nexport type DeleteVersionApiResponse = unknown\nexport type DeleteVersionApiArg = {\n projectName: string\n versionId: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n}\nexport type UpdateVersionApiResponse = unknown\nexport type UpdateVersionApiArg = {\n projectName: string\n versionId: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n versionPatchModel: VersionPatchModel\n}\nexport type CreateVersionApiResponse = /** status 201 Successful Response */ EntityIdResponse\nexport type CreateVersionApiArg = {\n projectName: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n versionPostModel: VersionPostModel\n}\nexport type ValidationError = {\n loc: (string | number)[]\n msg: string\n type: string\n}\nexport type HttpValidationError = {\n detail?: ValidationError[]\n}\nexport type CreateThumbnailResponseModel = {\n id: string\n}\nexport type VersionAttribModel = {\n /** Frame rate */\n fps?: number\n /** Horizontal resolution */\n resolutionWidth?: number\n /** Vertical resolution */\n resolutionHeight?: number\n pixelAspect?: number\n clipIn?: number\n clipOut?: number\n frameStart?: number\n frameEnd?: number\n handleStart?: number\n handleEnd?: number\n intent?: string\n machine?: string\n source?: string\n comment?: string\n site?: string\n families?: string[]\n colorSpace?: string\n /** Textual description of the entity */\n description?: string\n}\nexport type VersionModel = {\n /** Unique identifier of the {entity_name} */\n id?: string\n /** Version number */\n version: number\n /** ID of the parent product */\n productId: string\n taskId?: string\n thumbnailId?: string\n author?: string\n path?: string\n attrib?: VersionAttribModel\n data?: Record<string, any>\n /** Whether the version is active */\n active?: boolean\n ownAttrib?: string[]\n /** Status of the version */\n status?: string\n /** Tags assigned to the the version */\n tags?: string[]\n /** Time of creation */\n createdAt?: string\n /** Time of last update */\n updatedAt?: string\n}\nexport type VersionPatchModel = {\n /** Version number */\n version?: number\n /** ID of the parent product */\n productId?: string\n taskId?: string\n thumbnailId?: string\n author?: string\n /** Status of the version */\n status?: string\n /** Tags assigned to the the version */\n tags?: string[]\n attrib?: VersionAttribModel\n data?: Record<string, any>\n /** Whether the version is active */\n active?: boolean\n}\nexport type EntityIdResponse = {\n /** Entity ID */\n id: string\n}\nexport type VersionPostModel = {\n /** Explicitly set the ID of the entity */\n id?: string\n /** Version number */\n version: number\n /** ID of the parent product */\n productId: string\n taskId?: string\n thumbnailId?: string\n author?: string\n /** Status of the version */\n status?: string\n /** Tags assigned to the the version */\n tags?: string[]\n attrib?: VersionAttribModel\n data?: Record<string, any>\n /** Whether the version is active */\n active?: boolean\n}\n"],"names":["injectedRtkApi","api","build","queryArg"],"mappings":"yHACMA,EAAiBC,MAAI,gBAAgB,CACzC,UAAYC,IAAW,CACrB,oBAAqBA,EAAM,MAAiE,CAC1F,MAAQC,IAAc,CACpB,IAAK,iBAAiBA,EAAS,WAAW,aAAaA,EAAS,SAAS,aACzE,OAAQ,CACN,YAAaA,EAAS,YACtB,SAAUA,EAAS,QAAA,CAEvB,EAAA,CACD,EACD,uBAAwBD,EAAM,SAG5B,CACA,MAAQC,IAAc,CACpB,IAAK,iBAAiBA,EAAS,WAAW,aAAaA,EAAS,SAAS,aACzE,OAAQ,OACR,QAAS,CACP,eAAgBA,EAAS,cAAc,CAAA,CAE3C,EAAA,CACD,EACD,WAAYD,EAAM,MAA+C,CAC/D,MAAQC,IAAc,CACpB,IAAK,iBAAiBA,EAAS,WAAW,aAAaA,EAAS,SAAS,EAC3E,EAAA,CACD,EACD,cAAeD,EAAM,SAAwD,CAC3E,MAAQC,IAAc,CACpB,IAAK,iBAAiBA,EAAS,WAAW,aAAaA,EAAS,SAAS,GACzE,OAAQ,SACR,QAAS,CACP,WAAYA,EAAS,UAAU,EAC/B,gBAAiBA,EAAS,eAAe,CAAA,CAE7C,EAAA,CACD,EACD,cAAeD,EAAM,SAAwD,CAC3E,MAAQC,IAAc,CACpB,IAAK,iBAAiBA,EAAS,WAAW,aAAaA,EAAS,SAAS,GACzE,OAAQ,QACR,KAAMA,EAAS,kBACf,QAAS,CACP,WAAYA,EAAS,UAAU,EAC/B,gBAAiBA,EAAS,eAAe,CAAA,CAE7C,EAAA,CACD,EACD,cAAeD,EAAM,SAAwD,CAC3E,MAAQC,IAAc,CACpB,IAAK,iBAAiBA,EAAS,WAAW,YAC1C,OAAQ,OACR,KAAMA,EAAS,iBACf,QAAS,CACP,WAAYA,EAAS,UAAU,EAC/B,gBAAiBA,EAAS,eAAe,CAAA,CAE7C,EACD,CAAA,CAAA,GAEH,iBAAkB,EACpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"versions.es.js","sources":["../../../../../src/api/generated/versions.ts"],"sourcesContent":["import { api } from '@shared/api/base'\nconst injectedRtkApi = api.injectEndpoints({\n endpoints: (build) => ({\n getVersionThumbnail: build.query<GetVersionThumbnailApiResponse, GetVersionThumbnailApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}/thumbnail`,\n params: {\n placeholder: queryArg.placeholder,\n original: queryArg.original,\n },\n }),\n }),\n createVersionThumbnail: build.mutation<\n CreateVersionThumbnailApiResponse,\n CreateVersionThumbnailApiArg\n >({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}/thumbnail`,\n method: 'POST',\n headers: {\n 'content-type': queryArg['content-type'],\n },\n }),\n }),\n getVersion: build.query<GetVersionApiResponse, GetVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}`,\n }),\n }),\n deleteVersion: build.mutation<DeleteVersionApiResponse, DeleteVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}`,\n method: 'DELETE',\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n updateVersion: build.mutation<UpdateVersionApiResponse, UpdateVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}`,\n method: 'PATCH',\n body: queryArg.versionPatchModel,\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n createVersion: build.mutation<CreateVersionApiResponse, CreateVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions`,\n method: 'POST',\n body: queryArg.versionPostModel,\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n }),\n overrideExisting: false,\n})\nexport { injectedRtkApi as api }\nexport type GetVersionThumbnailApiResponse = /** status 200 Successful Response */ any\nexport type GetVersionThumbnailApiArg = {\n projectName: string\n versionId: string\n placeholder?: 'empty' | 'none'\n original?: boolean\n}\nexport type CreateVersionThumbnailApiResponse =\n /** status 201 Successful Response */ CreateThumbnailResponseModel\nexport type CreateVersionThumbnailApiArg = {\n projectName: string\n versionId: string\n 'content-type'?: string\n}\nexport type GetVersionApiResponse = /** status 200 Successful Response */ VersionModel\nexport type GetVersionApiArg = {\n projectName: string\n versionId: string\n}\nexport type DeleteVersionApiResponse = unknown\nexport type DeleteVersionApiArg = {\n projectName: string\n versionId: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n}\nexport type UpdateVersionApiResponse = unknown\nexport type UpdateVersionApiArg = {\n projectName: string\n versionId: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n versionPatchModel: VersionPatchModel\n}\nexport type CreateVersionApiResponse = /** status 201 Successful Response */ EntityIdResponse\nexport type CreateVersionApiArg = {\n projectName: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n versionPostModel: VersionPostModel\n}\nexport type ValidationError = {\n loc: (string | number)[]\n msg: string\n type: string\n}\nexport type HttpValidationError = {\n detail?: ValidationError[]\n}\nexport type CreateThumbnailResponseModel = {\n id: string\n}\nexport type VersionAttribModel = {\n /** Frame rate */\n fps?: number\n /** Horizontal resolution */\n resolutionWidth?: number\n /** Vertical resolution */\n resolutionHeight?: number\n pixelAspect?: number\n clipIn?: number\n clipOut?: number\n frameStart?: number\n frameEnd?: number\n handleStart?: number\n handleEnd?: number\n intent?: string\n machine?: string\n source?: string\n comment?: string\n site?: string\n families?: string[]\n colorSpace?: string\n /** Textual description of the entity */\n description?: string\n}\nexport type VersionModel = {\n /** Unique identifier of the {entity_name} */\n id?: string\n /** Version number */\n version: number\n /** ID of the parent product */\n productId: string\n taskId?: string\n thumbnailId?: string\n author?: string\n attrib?: VersionAttribModel\n data?: Record<string, any>\n /** Whether the version is active */\n active?: boolean\n ownAttrib?: string[]\n /** Status of the version */\n status?: string\n /** Tags assigned to the the version */\n tags?: string[]\n /** Time of creation */\n createdAt?: string\n /** Time of last update */\n updatedAt?: string\n}\nexport type VersionPatchModel = {\n /** Version number */\n version?: number\n /** ID of the parent product */\n productId?: string\n taskId?: string\n thumbnailId?: string\n author?: string\n /** Status of the version */\n status?: string\n /** Tags assigned to the the version */\n tags?: string[]\n attrib?: VersionAttribModel\n data?: Record<string, any>\n /** Whether the version is active */\n active?: boolean\n}\nexport type EntityIdResponse = {\n /** Entity ID */\n id: string\n}\nexport type VersionPostModel = {\n /** Explicitly set the ID of the entity */\n id?: string\n /** Version number */\n version: number\n /** ID of the parent product */\n productId: string\n taskId?: string\n thumbnailId?: string\n author?: string\n /** Status of the version */\n status?: string\n /** Tags assigned to the the version */\n tags?: string[]\n attrib?: VersionAttribModel\n data?: Record<string, any>\n /** Whether the version is active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AiBA,EAAS,eAAe;AAAA,QAAA;AAAA,MAE7C;AAAA,IAAA,CACD;AAAA,IACD,eAAeD,EAAM,SAAwD;AAAA,MAC3E,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,iBAAiBA,EAAS,WAAW;AAAA,QAC1C,QAAQ;AAAA,QACR,MAAMA,EAAS;AAAA,QACf,SAAS;AAAA,UACP,YAAYA,EAAS,UAAU;AAAA,UAC/B,iBAAiBA,EAAS,eAAe;AAAA,QAAA;AAAA,MAE7C;AAAA,IACD,CAAA;AAAA,EAAA;AAAA,EAEH,kBAAkB;AACpB,CAAC;"}
1
+ {"version":3,"file":"versions.es.js","sources":["../../../../../src/api/generated/versions.ts"],"sourcesContent":["import { api } from '@shared/api/base'\nconst injectedRtkApi = api.injectEndpoints({\n endpoints: (build) => ({\n getVersionThumbnail: build.query<GetVersionThumbnailApiResponse, GetVersionThumbnailApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}/thumbnail`,\n params: {\n placeholder: queryArg.placeholder,\n original: queryArg.original,\n },\n }),\n }),\n createVersionThumbnail: build.mutation<\n CreateVersionThumbnailApiResponse,\n CreateVersionThumbnailApiArg\n >({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}/thumbnail`,\n method: 'POST',\n headers: {\n 'content-type': queryArg['content-type'],\n },\n }),\n }),\n getVersion: build.query<GetVersionApiResponse, GetVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}`,\n }),\n }),\n deleteVersion: build.mutation<DeleteVersionApiResponse, DeleteVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}`,\n method: 'DELETE',\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n updateVersion: build.mutation<UpdateVersionApiResponse, UpdateVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions/${queryArg.versionId}`,\n method: 'PATCH',\n body: queryArg.versionPatchModel,\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n createVersion: build.mutation<CreateVersionApiResponse, CreateVersionApiArg>({\n query: (queryArg) => ({\n url: `/api/projects/${queryArg.projectName}/versions`,\n method: 'POST',\n body: queryArg.versionPostModel,\n headers: {\n 'x-sender': queryArg['x-sender'],\n 'x-sender-type': queryArg['x-sender-type'],\n },\n }),\n }),\n }),\n overrideExisting: false,\n})\nexport { injectedRtkApi as api }\nexport type GetVersionThumbnailApiResponse = /** status 200 Successful Response */ any\nexport type GetVersionThumbnailApiArg = {\n projectName: string\n versionId: string\n placeholder?: 'empty' | 'none'\n original?: boolean\n}\nexport type CreateVersionThumbnailApiResponse =\n /** status 201 Successful Response */ CreateThumbnailResponseModel\nexport type CreateVersionThumbnailApiArg = {\n projectName: string\n versionId: string\n 'content-type'?: string\n}\nexport type GetVersionApiResponse = /** status 200 Successful Response */ VersionModel\nexport type GetVersionApiArg = {\n projectName: string\n versionId: string\n}\nexport type DeleteVersionApiResponse = unknown\nexport type DeleteVersionApiArg = {\n projectName: string\n versionId: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n}\nexport type UpdateVersionApiResponse = unknown\nexport type UpdateVersionApiArg = {\n projectName: string\n versionId: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n versionPatchModel: VersionPatchModel\n}\nexport type CreateVersionApiResponse = /** status 201 Successful Response */ EntityIdResponse\nexport type CreateVersionApiArg = {\n projectName: string\n 'x-sender'?: string\n 'x-sender-type'?: string\n versionPostModel: VersionPostModel\n}\nexport type ValidationError = {\n loc: (string | number)[]\n msg: string\n type: string\n}\nexport type HttpValidationError = {\n detail?: ValidationError[]\n}\nexport type CreateThumbnailResponseModel = {\n id: string\n}\nexport type VersionAttribModel = {\n /** Frame rate */\n fps?: number\n /** Horizontal resolution */\n resolutionWidth?: number\n /** Vertical resolution */\n resolutionHeight?: number\n pixelAspect?: number\n clipIn?: number\n clipOut?: number\n frameStart?: number\n frameEnd?: number\n handleStart?: number\n handleEnd?: number\n intent?: string\n machine?: string\n source?: string\n comment?: string\n site?: string\n families?: string[]\n colorSpace?: string\n /** Textual description of the entity */\n description?: string\n}\nexport type VersionModel = {\n /** Unique identifier of the {entity_name} */\n id?: string\n /** Version number */\n version: number\n /** ID of the parent product */\n productId: string\n taskId?: string\n thumbnailId?: string\n author?: string\n path?: string\n attrib?: VersionAttribModel\n data?: Record<string, any>\n /** Whether the version is active */\n active?: boolean\n ownAttrib?: string[]\n /** Status of the version */\n status?: string\n /** Tags assigned to the the version */\n tags?: string[]\n /** Time of creation */\n createdAt?: string\n /** Time of last update */\n updatedAt?: string\n}\nexport type VersionPatchModel = {\n /** Version number */\n version?: number\n /** ID of the parent product */\n productId?: string\n taskId?: string\n thumbnailId?: string\n author?: string\n /** Status of the version */\n status?: string\n /** Tags assigned to the the version */\n tags?: string[]\n attrib?: VersionAttribModel\n data?: Record<string, any>\n /** Whether the version is active */\n active?: boolean\n}\nexport type EntityIdResponse = {\n /** Entity ID */\n id: string\n}\nexport type VersionPostModel = {\n /** Explicitly set the ID of the entity */\n id?: string\n /** Version number */\n version: number\n /** ID of the parent product */\n productId: string\n taskId?: string\n thumbnailId?: string\n author?: string\n /** Status of the version */\n status?: string\n /** Tags assigned to the the version */\n tags?: string[]\n attrib?: VersionAttribModel\n data?: Record<string, any>\n /** Whether the version is active */\n active?: boolean\n}\n"],"names":["injectedRtkApi","api","build","queryArg"],"mappings":";AACM,MAAAA,IAAiBC,EAAI,gBAAgB;AAAA,EACzC,WAAW,CAACC,OAAW;AAAA,IACrB,qBAAqBA,EAAM,MAAiE;AAAA,MAC1F,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,iBAAiBA,EAAS,WAAW,aAAaA,EAAS,SAAS;AAAA,QACzE,QAAQ;AAAA,UACN,aAAaA,EAAS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e;AAAA,QAAA;AAAA,MAE7C;AAAA,IACD,CAAA;AAAA,EAAA;AAAA,EAEH,kBAAkB;AACpB,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"views.cjs.js","sources":["../../../../../src/api/generated/views.ts"],"sourcesContent":["import { api } from '@shared/api/base'\nconst injectedRtkApi = api.injectEndpoints({\n endpoints: (build) => ({\n listViews: build.query<ListViewsApiResponse, ListViewsApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n createView: build.mutation<CreateViewApiResponse, CreateViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}`,\n method: 'POST',\n body: queryArg.payload,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n getWorkingView: build.query<GetWorkingViewApiResponse, GetWorkingViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/working`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n getDefaultView: build.query<GetDefaultViewApiResponse, GetDefaultViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/default`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n setDefaultView: build.mutation<SetDefaultViewApiResponse, SetDefaultViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/default`,\n method: 'POST',\n body: queryArg.setDefaultViewRequestModel,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n getView: build.query<GetViewApiResponse, GetViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n deleteView: build.mutation<DeleteViewApiResponse, DeleteViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,\n method: 'DELETE',\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n updateView: build.mutation<UpdateViewApiResponse, UpdateViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,\n method: 'PATCH',\n body: queryArg.payload,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n }),\n overrideExisting: false,\n})\nexport { injectedRtkApi as api }\nexport type ListViewsApiResponse = /** status 200 Successful Response */ ViewListModel\nexport type ListViewsApiArg = {\n viewType: string\n projectName?: string\n}\nexport type CreateViewApiResponse = /** status 200 Successful Response */ EntityIdResponse\nexport type CreateViewApiArg = {\n viewType: string\n projectName?: string\n payload: OverviewViewPostModel | TaskProgressViewPostModel | ListsViewPostModel\n}\nexport type GetWorkingViewApiResponse = /** status 200 Successful Response */\n | OverviewViewModel\n | TaskProgressViewModel\n | ListsViewModel\nexport type GetWorkingViewApiArg = {\n viewType: string\n projectName?: string\n}\nexport type GetDefaultViewApiResponse = /** status 200 Successful Response */\n | OverviewViewModel\n | TaskProgressViewModel\n | ListsViewModel\nexport type GetDefaultViewApiArg = {\n viewType: string\n projectName?: string\n}\nexport type SetDefaultViewApiResponse = /** status 200 Successful Response */ any\nexport type SetDefaultViewApiArg = {\n viewType: string\n projectName?: string\n setDefaultViewRequestModel: SetDefaultViewRequestModel\n}\nexport type GetViewApiResponse = /** status 200 Successful Response */\n | OverviewViewModel\n | TaskProgressViewModel\n | ListsViewModel\nexport type GetViewApiArg = {\n viewType: string\n viewId: string\n projectName?: string\n}\nexport type DeleteViewApiResponse = /** status 200 Successful Response */ any\nexport type DeleteViewApiArg = {\n viewType: string\n viewId: string\n projectName?: string\n}\nexport type UpdateViewApiResponse = /** status 200 Successful Response */ any\nexport type UpdateViewApiArg = {\n viewType: string\n viewId: string\n projectName?: string\n payload: OverviewViewPatchModel | TaskProgressViewPatchModel | ListsViewPatchModel\n}\nexport type ViewListItemModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n access: object\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n}\nexport type ViewListModel = {\n views: ViewListItemModel[]\n}\nexport type ValidationError = {\n loc: (string | number)[]\n msg: string\n type: string\n}\nexport type HttpValidationError = {\n detail?: ValidationError[]\n}\nexport type EntityIdResponse = {\n /** Entity ID */\n id: string\n}\nexport type QueryCondition = {\n /** Path to the key separated by slashes */\n key: string\n /** Value to compare against */\n value?: string | number | number | boolean | string[] | number[] | number[]\n /** Comparison operator */\n operator?:\n | 'eq'\n | 'like'\n | 'lt'\n | 'gt'\n | 'lte'\n | 'gte'\n | 'ne'\n | 'isnull'\n | 'notnull'\n | 'in'\n | 'notin'\n | 'includes'\n | 'excludes'\n | 'includesall'\n | 'excludesall'\n | 'includesany'\n | 'excludesany'\n}\nexport type QueryFilter = {\n /** List of conditions to be evaluated */\n conditions?: (QueryCondition | QueryFilter)[]\n /** Operator to use when joining conditions */\n operator?: 'and' | 'or'\n}\nexport type ColumnItemModel = {\n name: string\n visible?: boolean\n pinned?: boolean\n width?: number\n}\nexport type OverviewSettings = {\n showHierarchy?: boolean\n groupBy?: string\n showEmptyGroups?: boolean\n sortBy?: string\n sortDesc?: boolean\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type OverviewViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: OverviewSettings\n}\nexport type TaskProgressSettings = {\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type TaskProgressViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: TaskProgressSettings\n}\nexport type ListsSettings = {\n sortBy?: string\n sortDesc?: boolean\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type ListsViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: ListsSettings\n}\nexport type OverviewViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n access: object\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: OverviewSettings\n viewType?: 'overview'\n}\nexport type TaskProgressViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n access: object\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: TaskProgressSettings\n viewType?: 'taskProgress'\n}\nexport type ListsViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n access: object\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: ListsSettings\n viewType?: 'lists'\n}\nexport type SetDefaultViewRequestModel = {\n viewId: string\n}\nexport type OverviewViewPatchModel = {\n label?: string\n owner?: string\n settings?: OverviewSettings\n}\nexport type TaskProgressViewPatchModel = {\n label?: string\n owner?: string\n settings?: TaskProgressSettings\n}\nexport type ListsViewPatchModel = {\n label?: string\n owner?: string\n settings?: ListsSettings\n}\n"],"names":["injectedRtkApi","api","build","queryArg"],"mappings":"yHACMA,EAAiBC,MAAI,gBAAgB,CACzC,UAAYC,IAAW,CACrB,UAAWA,EAAM,MAA6C,CAC5D,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,GACpC,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,WAAYD,EAAM,SAAkD,CAClE,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,GACpC,OAAQ,OACR,KAAMA,EAAS,QACf,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,eAAgBD,EAAM,MAAuD,CAC3E,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,WACpC,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,eAAgBD,EAAM,MAAuD,CAC3E,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,WACpC,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,eAAgBD,EAAM,SAA0D,CAC9E,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,WACpC,OAAQ,OACR,KAAMA,EAAS,2BACf,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,QAASD,EAAM,MAAyC,CACtD,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,IAAIA,EAAS,MAAM,GACvD,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,WAAYD,EAAM,SAAkD,CAClE,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,IAAIA,EAAS,MAAM,GACvD,OAAQ,SACR,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,WAAYD,EAAM,SAAkD,CAClE,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,IAAIA,EAAS,MAAM,GACvD,OAAQ,QACR,KAAMA,EAAS,QACf,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EACD,CAAA,CAAA,GAEH,iBAAkB,EACpB,CAAC"}
1
+ {"version":3,"file":"views.cjs.js","sources":["../../../../../src/api/generated/views.ts"],"sourcesContent":["import { api } from '@shared/api/base'\nconst injectedRtkApi = api.injectEndpoints({\n endpoints: (build) => ({\n listViews: build.query<ListViewsApiResponse, ListViewsApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n createView: build.mutation<CreateViewApiResponse, CreateViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}`,\n method: 'POST',\n body: queryArg.payload,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n getWorkingView: build.query<GetWorkingViewApiResponse, GetWorkingViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/working`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n getDefaultView: build.query<GetDefaultViewApiResponse, GetDefaultViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/default`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n setDefaultView: build.mutation<SetDefaultViewApiResponse, SetDefaultViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/default`,\n method: 'POST',\n body: queryArg.setDefaultViewRequestModel,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n getView: build.query<GetViewApiResponse, GetViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n deleteView: build.mutation<DeleteViewApiResponse, DeleteViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,\n method: 'DELETE',\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n updateView: build.mutation<UpdateViewApiResponse, UpdateViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,\n method: 'PATCH',\n body: queryArg.payload,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n }),\n overrideExisting: false,\n})\nexport { injectedRtkApi as api }\nexport type ListViewsApiResponse = /** status 200 Successful Response */ ViewListModel\nexport type ListViewsApiArg = {\n viewType: string\n projectName?: string\n}\nexport type CreateViewApiResponse = /** status 200 Successful Response */ EntityIdResponse\nexport type CreateViewApiArg = {\n viewType: string\n projectName?: string\n payload:\n | OverviewViewPostModel\n | TaskProgressViewPostModel\n | ListsViewPostModel\n | ReviewsViewPostModel\n}\nexport type GetWorkingViewApiResponse = /** status 200 Successful Response */\n | OverviewViewModel\n | TaskProgressViewModel\n | ListsViewModel\n | ReviewsViewModel\nexport type GetWorkingViewApiArg = {\n viewType: string\n projectName?: string\n}\nexport type GetDefaultViewApiResponse = /** status 200 Successful Response */\n | OverviewViewModel\n | TaskProgressViewModel\n | ListsViewModel\n | ReviewsViewModel\nexport type GetDefaultViewApiArg = {\n viewType: string\n projectName?: string\n}\nexport type SetDefaultViewApiResponse = /** status 200 Successful Response */ any\nexport type SetDefaultViewApiArg = {\n viewType: string\n projectName?: string\n setDefaultViewRequestModel: SetDefaultViewRequestModel\n}\nexport type GetViewApiResponse = /** status 200 Successful Response */\n | OverviewViewModel\n | TaskProgressViewModel\n | ListsViewModel\n | ReviewsViewModel\nexport type GetViewApiArg = {\n viewType: string\n viewId: string\n projectName?: string\n}\nexport type DeleteViewApiResponse = /** status 200 Successful Response */ any\nexport type DeleteViewApiArg = {\n viewType: string\n viewId: string\n projectName?: string\n}\nexport type UpdateViewApiResponse = /** status 200 Successful Response */ any\nexport type UpdateViewApiArg = {\n viewType: string\n viewId: string\n projectName?: string\n payload:\n | OverviewViewPatchModel\n | TaskProgressViewPatchModel\n | ListsViewPatchModel\n | ReviewsViewPatchModel\n}\nexport type ViewListItemModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n}\nexport type ViewListModel = {\n views: ViewListItemModel[]\n}\nexport type ValidationError = {\n loc: (string | number)[]\n msg: string\n type: string\n}\nexport type HttpValidationError = {\n detail?: ValidationError[]\n}\nexport type EntityIdResponse = {\n /** Entity ID */\n id: string\n}\nexport type QueryCondition = {\n /** Path to the key separated by slashes */\n key: string\n /** Value to compare against */\n value?: string | number | number | boolean | string[] | number[] | number[]\n /** Comparison operator */\n operator?:\n | 'eq'\n | 'like'\n | 'lt'\n | 'gt'\n | 'lte'\n | 'gte'\n | 'ne'\n | 'isnull'\n | 'notnull'\n | 'in'\n | 'notin'\n | 'includes'\n | 'excludes'\n | 'includesall'\n | 'excludesall'\n | 'includesany'\n | 'excludesany'\n}\nexport type QueryFilter = {\n /** List of conditions to be evaluated */\n conditions?: (QueryCondition | QueryFilter)[]\n /** Operator to use when joining conditions */\n operator?: 'and' | 'or'\n}\nexport type ColumnItemModel = {\n name: string\n visible?: boolean\n pinned?: boolean\n width?: number\n}\nexport type OverviewSettings = {\n showHierarchy?: boolean\n rowHeight?: number\n groupBy?: string\n showEmptyGroups?: boolean\n sortBy?: string\n sortDesc?: boolean\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type OverviewViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: OverviewSettings\n}\nexport type TaskProgressSettings = {\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type TaskProgressViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: TaskProgressSettings\n}\nexport type ListsSettings = {\n rowHeight?: number\n sortBy?: string\n sortDesc?: boolean\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type ListsViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: ListsSettings\n}\nexport type ReviewsSettings = {\n rowHeight?: number\n sortBy?: string\n sortDesc?: boolean\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type ReviewsViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: ReviewsSettings\n}\nexport type OverviewViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: OverviewSettings\n access: object\n viewType?: 'overview'\n}\nexport type TaskProgressViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: TaskProgressSettings\n access: object\n viewType?: 'taskProgress'\n}\nexport type ListsViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: ListsSettings\n access: object\n viewType?: 'lists'\n}\nexport type ReviewsViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: ReviewsSettings\n access: object\n viewType?: 'reviews'\n}\nexport type SetDefaultViewRequestModel = {\n viewId: string\n}\nexport type OverviewViewPatchModel = {\n label?: string\n owner?: string\n settings?: OverviewSettings\n}\nexport type TaskProgressViewPatchModel = {\n label?: string\n owner?: string\n settings?: TaskProgressSettings\n}\nexport type ListsViewPatchModel = {\n label?: string\n owner?: string\n settings?: ListsSettings\n}\nexport type ReviewsViewPatchModel = {\n label?: string\n owner?: string\n settings?: ReviewsSettings\n}\n"],"names":["injectedRtkApi","api","build","queryArg"],"mappings":"yHACMA,EAAiBC,MAAI,gBAAgB,CACzC,UAAYC,IAAW,CACrB,UAAWA,EAAM,MAA6C,CAC5D,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,GACpC,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,WAAYD,EAAM,SAAkD,CAClE,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,GACpC,OAAQ,OACR,KAAMA,EAAS,QACf,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,eAAgBD,EAAM,MAAuD,CAC3E,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,WACpC,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,eAAgBD,EAAM,MAAuD,CAC3E,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,WACpC,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,eAAgBD,EAAM,SAA0D,CAC9E,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,WACpC,OAAQ,OACR,KAAMA,EAAS,2BACf,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,QAASD,EAAM,MAAyC,CACtD,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,IAAIA,EAAS,MAAM,GACvD,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,WAAYD,EAAM,SAAkD,CAClE,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,IAAIA,EAAS,MAAM,GACvD,OAAQ,SACR,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EAAA,CACD,EACD,WAAYD,EAAM,SAAkD,CAClE,MAAQC,IAAc,CACpB,IAAK,cAAcA,EAAS,QAAQ,IAAIA,EAAS,MAAM,GACvD,OAAQ,QACR,KAAMA,EAAS,QACf,OAAQ,CACN,aAAcA,EAAS,WAAA,CAE3B,EACD,CAAA,CAAA,GAEH,iBAAkB,EACpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"views.es.js","sources":["../../../../../src/api/generated/views.ts"],"sourcesContent":["import { api } from '@shared/api/base'\nconst injectedRtkApi = api.injectEndpoints({\n endpoints: (build) => ({\n listViews: build.query<ListViewsApiResponse, ListViewsApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n createView: build.mutation<CreateViewApiResponse, CreateViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}`,\n method: 'POST',\n body: queryArg.payload,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n getWorkingView: build.query<GetWorkingViewApiResponse, GetWorkingViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/working`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n getDefaultView: build.query<GetDefaultViewApiResponse, GetDefaultViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/default`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n setDefaultView: build.mutation<SetDefaultViewApiResponse, SetDefaultViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/default`,\n method: 'POST',\n body: queryArg.setDefaultViewRequestModel,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n getView: build.query<GetViewApiResponse, GetViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n deleteView: build.mutation<DeleteViewApiResponse, DeleteViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,\n method: 'DELETE',\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n updateView: build.mutation<UpdateViewApiResponse, UpdateViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,\n method: 'PATCH',\n body: queryArg.payload,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n }),\n overrideExisting: false,\n})\nexport { injectedRtkApi as api }\nexport type ListViewsApiResponse = /** status 200 Successful Response */ ViewListModel\nexport type ListViewsApiArg = {\n viewType: string\n projectName?: string\n}\nexport type CreateViewApiResponse = /** status 200 Successful Response */ EntityIdResponse\nexport type CreateViewApiArg = {\n viewType: string\n projectName?: string\n payload: OverviewViewPostModel | TaskProgressViewPostModel | ListsViewPostModel\n}\nexport type GetWorkingViewApiResponse = /** status 200 Successful Response */\n | OverviewViewModel\n | TaskProgressViewModel\n | ListsViewModel\nexport type GetWorkingViewApiArg = {\n viewType: string\n projectName?: string\n}\nexport type GetDefaultViewApiResponse = /** status 200 Successful Response */\n | OverviewViewModel\n | TaskProgressViewModel\n | ListsViewModel\nexport type GetDefaultViewApiArg = {\n viewType: string\n projectName?: string\n}\nexport type SetDefaultViewApiResponse = /** status 200 Successful Response */ any\nexport type SetDefaultViewApiArg = {\n viewType: string\n projectName?: string\n setDefaultViewRequestModel: SetDefaultViewRequestModel\n}\nexport type GetViewApiResponse = /** status 200 Successful Response */\n | OverviewViewModel\n | TaskProgressViewModel\n | ListsViewModel\nexport type GetViewApiArg = {\n viewType: string\n viewId: string\n projectName?: string\n}\nexport type DeleteViewApiResponse = /** status 200 Successful Response */ any\nexport type DeleteViewApiArg = {\n viewType: string\n viewId: string\n projectName?: string\n}\nexport type UpdateViewApiResponse = /** status 200 Successful Response */ any\nexport type UpdateViewApiArg = {\n viewType: string\n viewId: string\n projectName?: string\n payload: OverviewViewPatchModel | TaskProgressViewPatchModel | ListsViewPatchModel\n}\nexport type ViewListItemModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n access: object\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n}\nexport type ViewListModel = {\n views: ViewListItemModel[]\n}\nexport type ValidationError = {\n loc: (string | number)[]\n msg: string\n type: string\n}\nexport type HttpValidationError = {\n detail?: ValidationError[]\n}\nexport type EntityIdResponse = {\n /** Entity ID */\n id: string\n}\nexport type QueryCondition = {\n /** Path to the key separated by slashes */\n key: string\n /** Value to compare against */\n value?: string | number | number | boolean | string[] | number[] | number[]\n /** Comparison operator */\n operator?:\n | 'eq'\n | 'like'\n | 'lt'\n | 'gt'\n | 'lte'\n | 'gte'\n | 'ne'\n | 'isnull'\n | 'notnull'\n | 'in'\n | 'notin'\n | 'includes'\n | 'excludes'\n | 'includesall'\n | 'excludesall'\n | 'includesany'\n | 'excludesany'\n}\nexport type QueryFilter = {\n /** List of conditions to be evaluated */\n conditions?: (QueryCondition | QueryFilter)[]\n /** Operator to use when joining conditions */\n operator?: 'and' | 'or'\n}\nexport type ColumnItemModel = {\n name: string\n visible?: boolean\n pinned?: boolean\n width?: number\n}\nexport type OverviewSettings = {\n showHierarchy?: boolean\n groupBy?: string\n showEmptyGroups?: boolean\n sortBy?: string\n sortDesc?: boolean\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type OverviewViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: OverviewSettings\n}\nexport type TaskProgressSettings = {\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type TaskProgressViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: TaskProgressSettings\n}\nexport type ListsSettings = {\n sortBy?: string\n sortDesc?: boolean\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type ListsViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: ListsSettings\n}\nexport type OverviewViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n access: object\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: OverviewSettings\n viewType?: 'overview'\n}\nexport type TaskProgressViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n access: object\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: TaskProgressSettings\n viewType?: 'taskProgress'\n}\nexport type ListsViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n access: object\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: ListsSettings\n viewType?: 'lists'\n}\nexport type SetDefaultViewRequestModel = {\n viewId: string\n}\nexport type OverviewViewPatchModel = {\n label?: string\n owner?: string\n settings?: OverviewSettings\n}\nexport type TaskProgressViewPatchModel = {\n label?: string\n owner?: string\n settings?: TaskProgressSettings\n}\nexport type ListsViewPatchModel = {\n label?: string\n owner?: string\n settings?: ListsSettings\n}\n"],"names":["injectedRtkApi","api","build","queryArg"],"mappings":";AACM,MAAAA,IAAiBC,EAAI,gBAAgB;AAAA,EACzC,WAAW,CAACC,OAAW;AAAA,IACrB,WAAWA,EAAM,MAA6C;AAAA,MAC5D,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ;AAAA,QACpC,QAAQ;AAAA,UACN,cAAcA,EAAS;AAAA,QAAA;AAAA,MAE3B;AAAA,IAAA,CACD;AAAA,IACD,YAAYD,EAAM,SAAkD;AAAA,MAClE,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ;AAAA,QACpC,QAAQ;AAAA,QACR,MAAMA,EAAS;AAAA,QACf,QAAQ;AAAA,UACN,cAAcA,EAAS;AAAA,QAAA;AAAA,MAE3B;AAAA,IAAA,CACD;AAAA,IACD,gBAAgBD,EAAM,MAAuD;AAAA,MAC3E,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ;AAAA,QACpC,QAAQ;AAAA,UACN,cAAcA,EAAS;AAAA,QAAA;AAAA,MAE3B;AAAA,IAAA,CACD;AAAA,IACD,gBAAgBD,EAAM,MAAuD;AAAA,MAC3E,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ;AAAA,QACpC,QAAQ;AAAA,UACN,cAAcA,EAAS;AAAA,QAAA;AAAA,MAE3B;AAAA,IAAA,CACD;AAAA,IACD,gBAAgBD,EAAM,SAA0D;AAAA,MAC9E,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ;AAAA,QACpC,QAAQ;AAAA,QACR,MAAMA,EAAS;AAAA,QACf,QAAQ;AAAA,UACN,cAAcA,EAAS;AAAA,QAAA;AAAA,MAE3B;AAAA,IAAA,CACD;AAAA,IACD,SAASD,EAAM,MAAyC;AAAA,MACtD,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ,IAAIA,EAAS,MAAM;AAAA,QACvD,QAAQ;AAAA,UACN,cAAcA,EAAS;AAAA,QAAA;AAAA,MAE3B;AAAA,IAAA,CACD;AAAA,IACD,YAAYD,EAAM,SAAkD;AAAA,MAClE,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ,IAAIA,EAAS,MAAM;AAAA,QACvD,QAAQ;AAAA,QACR,QAAQ;AAAA,UACN,cAAcA,EAAS;AAAA,QAAA;AAAA,MAE3B;AAAA,IAAA,CACD;AAAA,IACD,YAAYD,EAAM,SAAkD;AAAA,MAClE,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ,IAAIA,EAAS,MAAM;AAAA,QACvD,QAAQ;AAAA,QACR,MAAMA,EAAS;AAAA,QACf,QAAQ;AAAA,UACN,cAAcA,EAAS;AAAA,QAAA;AAAA,MAE3B;AAAA,IACD,CAAA;AAAA,EAAA;AAAA,EAEH,kBAAkB;AACpB,CAAC;"}
1
+ {"version":3,"file":"views.es.js","sources":["../../../../../src/api/generated/views.ts"],"sourcesContent":["import { api } from '@shared/api/base'\nconst injectedRtkApi = api.injectEndpoints({\n endpoints: (build) => ({\n listViews: build.query<ListViewsApiResponse, ListViewsApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n createView: build.mutation<CreateViewApiResponse, CreateViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}`,\n method: 'POST',\n body: queryArg.payload,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n getWorkingView: build.query<GetWorkingViewApiResponse, GetWorkingViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/working`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n getDefaultView: build.query<GetDefaultViewApiResponse, GetDefaultViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/default`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n setDefaultView: build.mutation<SetDefaultViewApiResponse, SetDefaultViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/default`,\n method: 'POST',\n body: queryArg.setDefaultViewRequestModel,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n getView: build.query<GetViewApiResponse, GetViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n deleteView: build.mutation<DeleteViewApiResponse, DeleteViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,\n method: 'DELETE',\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n updateView: build.mutation<UpdateViewApiResponse, UpdateViewApiArg>({\n query: (queryArg) => ({\n url: `/api/views/${queryArg.viewType}/${queryArg.viewId}`,\n method: 'PATCH',\n body: queryArg.payload,\n params: {\n project_name: queryArg.projectName,\n },\n }),\n }),\n }),\n overrideExisting: false,\n})\nexport { injectedRtkApi as api }\nexport type ListViewsApiResponse = /** status 200 Successful Response */ ViewListModel\nexport type ListViewsApiArg = {\n viewType: string\n projectName?: string\n}\nexport type CreateViewApiResponse = /** status 200 Successful Response */ EntityIdResponse\nexport type CreateViewApiArg = {\n viewType: string\n projectName?: string\n payload:\n | OverviewViewPostModel\n | TaskProgressViewPostModel\n | ListsViewPostModel\n | ReviewsViewPostModel\n}\nexport type GetWorkingViewApiResponse = /** status 200 Successful Response */\n | OverviewViewModel\n | TaskProgressViewModel\n | ListsViewModel\n | ReviewsViewModel\nexport type GetWorkingViewApiArg = {\n viewType: string\n projectName?: string\n}\nexport type GetDefaultViewApiResponse = /** status 200 Successful Response */\n | OverviewViewModel\n | TaskProgressViewModel\n | ListsViewModel\n | ReviewsViewModel\nexport type GetDefaultViewApiArg = {\n viewType: string\n projectName?: string\n}\nexport type SetDefaultViewApiResponse = /** status 200 Successful Response */ any\nexport type SetDefaultViewApiArg = {\n viewType: string\n projectName?: string\n setDefaultViewRequestModel: SetDefaultViewRequestModel\n}\nexport type GetViewApiResponse = /** status 200 Successful Response */\n | OverviewViewModel\n | TaskProgressViewModel\n | ListsViewModel\n | ReviewsViewModel\nexport type GetViewApiArg = {\n viewType: string\n viewId: string\n projectName?: string\n}\nexport type DeleteViewApiResponse = /** status 200 Successful Response */ any\nexport type DeleteViewApiArg = {\n viewType: string\n viewId: string\n projectName?: string\n}\nexport type UpdateViewApiResponse = /** status 200 Successful Response */ any\nexport type UpdateViewApiArg = {\n viewType: string\n viewId: string\n projectName?: string\n payload:\n | OverviewViewPatchModel\n | TaskProgressViewPatchModel\n | ListsViewPatchModel\n | ReviewsViewPatchModel\n}\nexport type ViewListItemModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n}\nexport type ViewListModel = {\n views: ViewListItemModel[]\n}\nexport type ValidationError = {\n loc: (string | number)[]\n msg: string\n type: string\n}\nexport type HttpValidationError = {\n detail?: ValidationError[]\n}\nexport type EntityIdResponse = {\n /** Entity ID */\n id: string\n}\nexport type QueryCondition = {\n /** Path to the key separated by slashes */\n key: string\n /** Value to compare against */\n value?: string | number | number | boolean | string[] | number[] | number[]\n /** Comparison operator */\n operator?:\n | 'eq'\n | 'like'\n | 'lt'\n | 'gt'\n | 'lte'\n | 'gte'\n | 'ne'\n | 'isnull'\n | 'notnull'\n | 'in'\n | 'notin'\n | 'includes'\n | 'excludes'\n | 'includesall'\n | 'excludesall'\n | 'includesany'\n | 'excludesany'\n}\nexport type QueryFilter = {\n /** List of conditions to be evaluated */\n conditions?: (QueryCondition | QueryFilter)[]\n /** Operator to use when joining conditions */\n operator?: 'and' | 'or'\n}\nexport type ColumnItemModel = {\n name: string\n visible?: boolean\n pinned?: boolean\n width?: number\n}\nexport type OverviewSettings = {\n showHierarchy?: boolean\n rowHeight?: number\n groupBy?: string\n showEmptyGroups?: boolean\n sortBy?: string\n sortDesc?: boolean\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type OverviewViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: OverviewSettings\n}\nexport type TaskProgressSettings = {\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type TaskProgressViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: TaskProgressSettings\n}\nexport type ListsSettings = {\n rowHeight?: number\n sortBy?: string\n sortDesc?: boolean\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type ListsViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: ListsSettings\n}\nexport type ReviewsSettings = {\n rowHeight?: number\n sortBy?: string\n sortDesc?: boolean\n filter?: QueryFilter\n columns?: ColumnItemModel[]\n}\nexport type ReviewsViewPostModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working?: boolean\n settings: ReviewsSettings\n}\nexport type OverviewViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: OverviewSettings\n access: object\n viewType?: 'overview'\n}\nexport type TaskProgressViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: TaskProgressSettings\n access: object\n viewType?: 'taskProgress'\n}\nexport type ListsViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: ListsSettings\n access: object\n viewType?: 'lists'\n}\nexport type ReviewsViewModel = {\n /** Unique identifier for the view within the given scope. */\n id?: string\n /** Human-readable name of the view. */\n label: string\n /** Determines whether the view is only available for the given project or for all projects (studio). */\n scope: 'project' | 'studio'\n /** Name of the user who created the view. Owners have full control over the view, */\n owner: string\n /** Visibility of the view. Public views are visible to all users, private views are only visible to the owner. */\n visibility: 'public' | 'private'\n /** Working view is a special type of the view that automatically stores the current view settings without explicitly saving them. Working views are always private and scoped to the project */\n working: boolean\n position: number\n accessLevel: number\n settings: ReviewsSettings\n access: object\n viewType?: 'reviews'\n}\nexport type SetDefaultViewRequestModel = {\n viewId: string\n}\nexport type OverviewViewPatchModel = {\n label?: string\n owner?: string\n settings?: OverviewSettings\n}\nexport type TaskProgressViewPatchModel = {\n label?: string\n owner?: string\n settings?: TaskProgressSettings\n}\nexport type ListsViewPatchModel = {\n label?: string\n owner?: string\n settings?: ListsSettings\n}\nexport type ReviewsViewPatchModel = {\n label?: string\n owner?: string\n settings?: ReviewsSettings\n}\n"],"names":["injectedRtkApi","api","build","queryArg"],"mappings":";AACM,MAAAA,IAAiBC,EAAI,gBAAgB;AAAA,EACzC,WAAW,CAACC,OAAW;AAAA,IACrB,WAAWA,EAAM,MAA6C;AAAA,MAC5D,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ;AAAA,QACpC,QAAQ;AAAA,UACN,cAAcA,EAAS;AAAA,QAAA;AAAA,MAE3B;AAAA,IAAA,CACD;AAAA,IACD,YAAYD,EAAM,SAAkD;AAAA,MAClE,OAAO,CAACC,OAAc;AAAA,QACpB,KAAK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,CAACC,OAAc;AAAA,QACpB,KAAK,cAAcA,EAAS,QAAQ,IAAIA,EAAS,MAAM;AAAA,QACvD,QAAQ;AAAA,QACR,MAAMA,EAAS;AAAA,QACf,QAAQ;AAAA,UACN,cAAcA,EAAS;AAAA,QAAA;AAAA,MAE3B;AAAA,IACD,CAAA;AAAA,EAAA;AAAA,EAEH,kBAAkB;AACpB,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../../../_virtual/jsx-runtime.cjs.js"),k=require("react"),a=require("@ynput/ayon-react-components"),T=require("lodash"),P=require("./components/MinMaxField.cjs.js"),A=require("../EnumEditor/EnumEditor.cjs.js");require("../EnumEditor/EnumEditor.styled.cjs.js");const B=[{value:"project",label:"Project"},{value:"folder",label:"Folder"},{value:"task",label:"Task"},{value:"product",label:"Product"},{value:"version",label:"Version"},{value:"representation",label:"Representation"},{value:"user",label:"User"}],K=[{value:"description",scope:null},{value:"example",scope:null},{value:"default",scope:["project"]},{value:"inherit",scope:null}],S={string:{value:"string",label:"String",fields:["minLength","maxLength","enum","regex"]},integer:{value:"integer",label:"Integer",fields:["ge","gt","le","lt"]},float:{value:"float",label:"Decimal number",fields:["ge","gt","le","lt"]},list_of_strings:{value:"list_of_strings",label:"List Of Strings",fields:["minItems","maxItems","enum"]},boolean:{value:"boolean",label:"Boolean",fields:[],exclude:["example"]}},V={name:"",scope:["folder","task"],builtin:!1,position:0,data:{type:"string",title:"",description:"",example:"",default:void 0,enum:void 0,minLength:void 0,maxLength:void 0,regex:"",minItems:void 0,maxItems:void 0,ge:void 0,gt:void 0,le:void 0,lt:void 0}},z=(u,c)=>{const l=JSON.parse(JSON.stringify(V)),g=["name"];Object.keys(l).forEach(r=>{!g.includes(r)&&u.includes(r)&&r!=="data"&&delete l[r]});const d=["title"];return l.data&&Object.keys(l.data).forEach(r=>{!d.includes(r)&&u.includes(r)&&delete l.data[r]}),c&&Object.keys(c).forEach(r=>{const p=r;p!=="data"&&u.includes(p)||(p==="data"&&c.data&&l.data?l.data={...l.data,...c.data}:c[p]!==void 0&&(l[p]=c[p]))}),l},J=({attribute:u,existingNames:c,error:l="",isUpdating:g,excludes:d=[],onHide:r,onEdit:p,onDelete:I})=>{var O,N;const q=z(d,{position:c.length}),[t,b]=k.useState(u||q);k.useEffect(()=>{u&&b(u)},[u]);const E=!u,y=(e,s)=>{b(n=>n&&{...n,[e]:s})},h=(e,s)=>{b(n=>{if(!n||!n.data)return n;const m={...n.data,[e]:s};return{...n,data:m}})};let j="";t&&E&&(c.includes(t.name)?j="This attribute already exists":t.name.match("^[a-zA-Z_]{2,64}$")||(l="Invalid attribute name"));const w=()=>{t&&p(t)},F=i.jsxRuntimeExports.jsxs("div",{style:{display:"flex",width:"100%",flexDirection:"row"},children:[I&&u&&i.jsxRuntimeExports.jsx(a.Button,{variant:"danger",label:"Delete attribute",icon:"delete",disabled:g,onClick:I}),i.jsxRuntimeExports.jsx(a.Spacer,{}),i.jsxRuntimeExports.jsx(a.SaveButton,{label:E?"Create Attribute":"Save Attribute",icon:"check",disabled:!!j||!t,active:!j&&!!t,saving:g,onClick:w})]});let R=[];if(K.forEach(e=>{var s;(!(e!=null&&e.scope)||(s=e==null?void 0:e.scope)!=null&&s.some(n=>{var m;return(m=t==null?void 0:t.scope)==null?void 0:m.includes(n)}))&&R.push(e.value)}),t!=null&&t.data.type&&S[t.data.type]){const e=S[t.data.type];R=[...R,...e.fields].filter(s=>{var n;return!((n=e.exclude)!=null&&n.includes(s))})}const C={enum:(e=[],s)=>i.jsxRuntimeExports.jsx(A.EnumEditor,{values:e,onChange:n=>{s(n!=null&&n.length?n:void 0)}}),inherit:(e,s)=>i.jsxRuntimeExports.jsx(a.InputSwitch,{checked:e,onChange:n=>s(n.target.checked)}),booleanDefault:(e,s)=>i.jsxRuntimeExports.jsx(a.InputSwitch,{checked:e,onChange:n=>s(n.target.checked)})},M=e=>{const s=e.target.value;h("title",s),E&&y("name",T.camelCase(s))};return i.jsxRuntimeExports.jsx(a.Dialog,{header:((O=t==null?void 0:t.data)==null?void 0:O.title)||(t==null?void 0:t.name)||"New attribute",footer:F,onClose:r,isOpen:!0,style:{width:700,zIndex:999},size:"full",onKeyDown:e=>{e.key==="Enter"&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),w())},children:t&&i.jsxRuntimeExports.jsxs(a.FormLayout,{children:[!d.includes("title")&&i.jsxRuntimeExports.jsx(a.FormRow,{label:"Title",children:i.jsxRuntimeExports.jsx(a.InputText,{value:t==null?void 0:t.data.title,onChange:M,autoFocus:!0})},"title"),!d.includes("name")&&i.jsxRuntimeExports.jsx(a.FormRow,{label:"Name",children:i.jsxRuntimeExports.jsx(a.LockedInput,{value:t.name,disabled:!E,onSubmit:e=>y("name",e),label:"name"})},"name"),!d.includes("scope")&&i.jsxRuntimeExports.jsx(a.FormRow,{label:"Scope",children:i.jsxRuntimeExports.jsx(a.Dropdown,{options:B,disabled:t.builtin,value:t.scope||[],onChange:e=>y("scope",e),multiSelect:!0,widthExpand:!0})}),!d.includes("type")&&i.jsxRuntimeExports.jsx(a.FormRow,{label:"Type",children:i.jsxRuntimeExports.jsx(a.Dropdown,{value:[(N=t==null?void 0:t.data)==null?void 0:N.type],disabled:t.builtin,options:Object.values(S),onChange:e=>h("type",e[0]),minSelected:1,widthExpand:!0})}),R.map(e=>{var m,L;if(d.includes(e))return null;let s=null,n=T.upperFirst(e);if(e==="enum"||e==="inherit"){const o=C[e];s=o(t==null?void 0:t.data[e],v=>h(e,v))}else if(e==="default"&&((m=t==null?void 0:t.data)==null?void 0:m.type)==="boolean")s=C.booleanDefault(t==null?void 0:t.data[e],o=>h(e,o));else if(["ge","gt","le","lt"].includes(e)){if(["gt","lt"].includes(e))return null;s=i.jsxRuntimeExports.jsx(P.MinMaxField,{value:t==null?void 0:t.data,isMin:e==="ge",isFloat:((L=t==null?void 0:t.data)==null?void 0:L.type)==="float",onChange:o=>{const v=o.ge!==void 0?Number(o.ge):void 0,f=o.le!==void 0?Number(o.le):void 0;o.ge!==void 0&&isNaN(v)||o.le!==void 0&&isNaN(f)||b(x=>{if(!x||!x.data)return x;const _={...x.data,...o};return{...x,data:_}})}}),n=e==="ge"?"Min":"Max"}else{const o=v=>{const f=v.target.value;switch(e){case"minLength":case"maxLength":case"minItems":case"maxItems":{const x=parseInt(f,10);h(e,isNaN(x)?void 0:x);break}default:h(e,f);break}};s=i.jsxRuntimeExports.jsx(a.InputText,{value:String((t==null?void 0:t.data[e])??""),onChange:o})}return i.jsxRuntimeExports.jsx(a.FormRow,{label:n,style:{alignItems:"flex-start"},children:s},e)}),i.jsxRuntimeExports.jsx("span",{children:(j||l)&&i.jsxRuntimeExports.jsx("span",{className:"form-error-text",children:j||l})})]})})};exports.AttributeEditor=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../../../_virtual/jsx-runtime.cjs.js"),k=require("react"),a=require("@ynput/ayon-react-components"),T=require("lodash"),P=require("./components/MinMaxField.cjs.js"),A=require("../EnumEditor/EnumEditor.cjs.js");require("../EnumEditor/EnumEditor.styled.cjs.js");const B=[{value:"project",label:"Project"},{value:"folder",label:"Folder"},{value:"task",label:"Task"},{value:"product",label:"Product"},{value:"version",label:"Version"},{value:"representation",label:"Representation"},{value:"user",label:"User"}],K=[{value:"description",scope:null},{value:"example",scope:null},{value:"default",scope:["project"]},{value:"inherit",scope:null}],S={string:{value:"string",label:"String",fields:["minLength","maxLength","enum","regex"]},integer:{value:"integer",label:"Integer",fields:["ge","gt","le","lt"]},float:{value:"float",label:"Decimal number",fields:["ge","gt","le","lt"]},list_of_strings:{value:"list_of_strings",label:"List Of Strings",fields:["minItems","maxItems","enum"]},boolean:{value:"boolean",label:"Boolean",fields:[],exclude:["example"]},datetime:{value:"datetime",label:"Datetime",fields:[]}},V={name:"",scope:["folder","task"],builtin:!1,position:0,data:{type:"string",title:"",description:"",example:"",default:void 0,enum:void 0,minLength:void 0,maxLength:void 0,regex:"",minItems:void 0,maxItems:void 0,ge:void 0,gt:void 0,le:void 0,lt:void 0}},z=(u,c)=>{const l=JSON.parse(JSON.stringify(V)),g=["name"];Object.keys(l).forEach(r=>{!g.includes(r)&&u.includes(r)&&r!=="data"&&delete l[r]});const d=["title"];return l.data&&Object.keys(l.data).forEach(r=>{!d.includes(r)&&u.includes(r)&&delete l.data[r]}),c&&Object.keys(c).forEach(r=>{const p=r;p!=="data"&&u.includes(p)||(p==="data"&&c.data&&l.data?l.data={...l.data,...c.data}:c[p]!==void 0&&(l[p]=c[p]))}),l},J=({attribute:u,existingNames:c,error:l="",isUpdating:g,excludes:d=[],onHide:r,onEdit:p,onDelete:I})=>{var O,N;const q=z(d,{position:c.length}),[t,b]=k.useState(u||q);k.useEffect(()=>{u&&b(u)},[u]);const E=!u,y=(e,s)=>{b(n=>n&&{...n,[e]:s})},h=(e,s)=>{b(n=>{if(!n||!n.data)return n;const m={...n.data,[e]:s};return{...n,data:m}})};let j="";t&&E&&(c.includes(t.name)?j="This attribute already exists":t.name.match("^[a-zA-Z_]{2,64}$")||(l="Invalid attribute name"));const w=()=>{t&&p(t)},F=i.jsxRuntimeExports.jsxs("div",{style:{display:"flex",width:"100%",flexDirection:"row"},children:[I&&u&&i.jsxRuntimeExports.jsx(a.Button,{variant:"danger",label:"Delete attribute",icon:"delete",disabled:g,onClick:I}),i.jsxRuntimeExports.jsx(a.Spacer,{}),i.jsxRuntimeExports.jsx(a.SaveButton,{label:E?"Create Attribute":"Save Attribute",icon:"check",disabled:!!j||!t,active:!j&&!!t,saving:g,onClick:w})]});let R=[];if(K.forEach(e=>{var s;(!(e!=null&&e.scope)||(s=e==null?void 0:e.scope)!=null&&s.some(n=>{var m;return(m=t==null?void 0:t.scope)==null?void 0:m.includes(n)}))&&R.push(e.value)}),t!=null&&t.data.type&&S[t.data.type]){const e=S[t.data.type];R=[...R,...e.fields].filter(s=>{var n;return!((n=e.exclude)!=null&&n.includes(s))})}const C={enum:(e=[],s)=>i.jsxRuntimeExports.jsx(A.EnumEditor,{values:e,onChange:n=>{s(n!=null&&n.length?n:void 0)}}),inherit:(e,s)=>i.jsxRuntimeExports.jsx(a.InputSwitch,{checked:e,onChange:n=>s(n.target.checked)}),booleanDefault:(e,s)=>i.jsxRuntimeExports.jsx(a.InputSwitch,{checked:e,onChange:n=>s(n.target.checked)})},M=e=>{const s=e.target.value;h("title",s),E&&y("name",T.camelCase(s))};return i.jsxRuntimeExports.jsx(a.Dialog,{header:((O=t==null?void 0:t.data)==null?void 0:O.title)||(t==null?void 0:t.name)||"New attribute",footer:F,onClose:r,isOpen:!0,style:{width:700,zIndex:999},size:"full",onKeyDown:e=>{e.key==="Enter"&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),w())},children:t&&i.jsxRuntimeExports.jsxs(a.FormLayout,{children:[!d.includes("title")&&i.jsxRuntimeExports.jsx(a.FormRow,{label:"Title",children:i.jsxRuntimeExports.jsx(a.InputText,{value:t==null?void 0:t.data.title,onChange:M,autoFocus:!0})},"title"),!d.includes("name")&&i.jsxRuntimeExports.jsx(a.FormRow,{label:"Name",children:i.jsxRuntimeExports.jsx(a.LockedInput,{value:t.name,disabled:!E,onSubmit:e=>y("name",e),label:"name"})},"name"),!d.includes("scope")&&i.jsxRuntimeExports.jsx(a.FormRow,{label:"Scope",children:i.jsxRuntimeExports.jsx(a.Dropdown,{options:B,disabled:t.builtin,value:t.scope||[],onChange:e=>y("scope",e),multiSelect:!0,widthExpand:!0})}),!d.includes("type")&&i.jsxRuntimeExports.jsx(a.FormRow,{label:"Type",children:i.jsxRuntimeExports.jsx(a.Dropdown,{value:[(N=t==null?void 0:t.data)==null?void 0:N.type],disabled:t.builtin,options:Object.values(S),onChange:e=>h("type",e[0]),minSelected:1,widthExpand:!0})}),R.map(e=>{var m,L;if(d.includes(e))return null;let s=null,n=T.upperFirst(e);if(e==="enum"||e==="inherit"){const o=C[e];s=o(t==null?void 0:t.data[e],v=>h(e,v))}else if(e==="default"&&((m=t==null?void 0:t.data)==null?void 0:m.type)==="boolean")s=C.booleanDefault(t==null?void 0:t.data[e],o=>h(e,o));else if(["ge","gt","le","lt"].includes(e)){if(["gt","lt"].includes(e))return null;s=i.jsxRuntimeExports.jsx(P.MinMaxField,{value:t==null?void 0:t.data,isMin:e==="ge",isFloat:((L=t==null?void 0:t.data)==null?void 0:L.type)==="float",onChange:o=>{const v=o.ge!==void 0?Number(o.ge):void 0,f=o.le!==void 0?Number(o.le):void 0;o.ge!==void 0&&isNaN(v)||o.le!==void 0&&isNaN(f)||b(x=>{if(!x||!x.data)return x;const _={...x.data,...o};return{...x,data:_}})}}),n=e==="ge"?"Min":"Max"}else{const o=v=>{const f=v.target.value;switch(e){case"minLength":case"maxLength":case"minItems":case"maxItems":{const x=parseInt(f,10);h(e,isNaN(x)?void 0:x);break}default:h(e,f);break}};s=i.jsxRuntimeExports.jsx(a.InputText,{value:String((t==null?void 0:t.data[e])??""),onChange:o})}return i.jsxRuntimeExports.jsx(a.FormRow,{label:n,style:{alignItems:"flex-start"},children:s},e)}),i.jsxRuntimeExports.jsx("span",{children:(j||l)&&i.jsxRuntimeExports.jsx("span",{className:"form-error-text",children:j||l})})]})})};exports.AttributeEditor=J;
2
2
  //# sourceMappingURL=AttributeEditor.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttributeEditor.cjs.js","sources":["../../../../../src/components/AttributeEditor/AttributeEditor.tsx"],"sourcesContent":["import { FC, useEffect, useState } from 'react'\nimport {\n SaveButton,\n Spacer,\n FormLayout,\n FormRow,\n InputText,\n InputSwitch,\n LockedInput,\n Dropdown,\n Dialog,\n Button,\n} from '@ynput/ayon-react-components'\nimport { camelCase, upperFirst } from 'lodash'\nimport { MinMaxField } from './components'\nimport { EnumEditor } from '@shared/components/EnumEditor'\nimport { AttributeData, AttributeModel, AttributeEnumItem } from '@shared/api'\n\nconst SCOPE_OPTIONS = [\n { value: 'project', label: 'Project' },\n { value: 'folder', label: 'Folder' },\n { value: 'task', label: 'Task' },\n { value: 'product', label: 'Product' },\n { value: 'version', label: 'Version' },\n { value: 'representation', label: 'Representation' },\n { value: 'user', label: 'User' },\n]\n\n// Define types for constants\ninterface GlobalFieldEntry {\n value: keyof AttributeData\n scope: (AttributeModel['scope'] | '')[] | null\n}\n\nconst GLOBAL_FIELDS: GlobalFieldEntry[] = [\n { value: 'description', scope: null },\n { value: 'example', scope: null },\n // @ts-expect-error - project is not a scope?\n { value: 'default', scope: ['project'] },\n { value: 'inherit', scope: null },\n]\n\ninterface TypeOptionDef {\n value: AttributeData['type']\n label: string\n fields: (keyof AttributeData)[]\n exclude?: (keyof AttributeData)[]\n}\n\ninterface TypeOptionsMap {\n [key: string]: TypeOptionDef\n}\n\nconst TYPE_OPTIONS: TypeOptionsMap = {\n string: {\n value: 'string',\n label: 'String',\n fields: ['minLength', 'maxLength', 'enum', 'regex'],\n },\n integer: {\n value: 'integer',\n label: 'Integer',\n fields: ['ge', 'gt', 'le', 'lt'],\n },\n float: {\n value: 'float',\n label: 'Decimal number',\n fields: ['ge', 'gt', 'le', 'lt'],\n },\n list_of_strings: {\n value: 'list_of_strings',\n label: 'List Of Strings',\n fields: ['minItems', 'maxItems', 'enum'],\n },\n boolean: {\n value: 'boolean',\n label: 'Boolean',\n fields: [],\n exclude: ['example'],\n },\n}\n\ntype Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>\ntype PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>\nexport type AttributeForm = PartialBy<AttributeModel, 'scope' | 'position'>\ntype Excludes = (keyof Omit<AttributeModel, 'data'> | keyof AttributeData)[]\n\nconst initFormData: AttributeForm = {\n name: '',\n scope: ['folder', 'task'],\n builtin: false,\n position: 0,\n data: {\n type: 'string',\n title: '',\n description: '',\n example: '',\n default: undefined,\n enum: undefined,\n minLength: undefined,\n maxLength: undefined,\n regex: '',\n minItems: undefined,\n maxItems: undefined,\n ge: undefined,\n gt: undefined,\n le: undefined,\n lt: undefined,\n },\n}\n\n// build the form data based on excludes and to update any data\nconst buildInitFormData = (excludes: Excludes, data?: Partial<AttributeForm>) => {\n // Create a deep clone of init form data\n const formData = JSON.parse(JSON.stringify(initFormData)) as AttributeForm\n\n // Filter out top-level excludes if not in required\n const required = ['name']\n Object.keys(formData).forEach((key) => {\n if (\n !required.includes(key) &&\n excludes.includes(key as keyof Omit<AttributeModel, 'data'>) &&\n key !== 'data'\n ) {\n delete formData[key as keyof AttributeForm]\n }\n })\n\n // Filter out data field excludes if not in in required\n const requiredData = ['title']\n if (formData.data) {\n Object.keys(formData.data).forEach((key) => {\n if (!requiredData.includes(key) && excludes.includes(key as keyof AttributeData)) {\n delete formData.data[key as keyof AttributeData]\n }\n })\n }\n\n // Merge with provided data if any\n if (data) {\n // Merge top-level fields\n Object.keys(data).forEach((key) => {\n const typedKey = key as keyof AttributeForm\n if (typedKey !== 'data' && excludes.includes(typedKey)) return\n\n if (typedKey === 'data' && data.data && formData.data) {\n // Deep merge of data fields\n formData.data = { ...formData.data, ...data.data }\n } else if (data[typedKey] !== undefined) {\n // @ts-ignore - We know these properties exist\n formData[typedKey] = data[typedKey]\n }\n })\n }\n\n return formData\n}\n\nexport interface AttributeEditorProps {\n attribute: AttributeForm | null\n existingNames: string[]\n error?: string\n isUpdating?: boolean\n excludes?: Excludes\n onHide: () => void\n onEdit: (attribute: AttributeForm) => void\n onDelete?: () => void\n}\n\nexport const AttributeEditor: FC<AttributeEditorProps> = ({\n attribute,\n existingNames,\n error = '',\n isUpdating,\n excludes = [],\n onHide,\n onEdit,\n onDelete,\n}) => {\n const initForm = buildInitFormData(excludes, { position: existingNames.length })\n const [formData, setFormData] = useState<AttributeForm | null>(attribute || initForm)\n\n useEffect(() => {\n if (!!attribute) setFormData(attribute)\n }, [attribute])\n\n const isNew = !attribute\n\n // const setTopLevelData = (key: string, value: string) => {\n const setTopLevelData = <K extends keyof Omit<AttributeModel, 'data'>>(\n key: K,\n value: AttributeModel[K],\n ) => {\n setFormData((d) => {\n if (!d) {\n return d\n }\n return { ...d, [key]: value }\n })\n }\n\n // const setData = (key, value) => {\n const setData = <K extends keyof AttributeData>(key: K, value: AttributeData[K]) => {\n setFormData((d) => {\n // Add a check for d and d.data\n if (!d || !d.data) {\n return d\n }\n const dt = { ...d.data, [key]: value }\n return { ...d, data: dt }\n })\n }\n\n let internalError = ''\n if (formData) {\n if (isNew) {\n if (existingNames.includes(formData.name)) internalError = 'This attribute already exists'\n else if (!formData.name.match('^[a-zA-Z_]{2,64}$')) error = 'Invalid attribute name'\n } // name validation\n }\n\n const handleSubmit = () => {\n if (formData) {\n onEdit(formData)\n }\n }\n\n const footer = (\n <div style={{ display: 'flex', width: '100%', flexDirection: 'row' }}>\n {onDelete && attribute && (\n <Button\n variant=\"danger\"\n label={'Delete attribute'}\n icon={'delete'}\n disabled={isUpdating}\n onClick={onDelete}\n />\n )}\n <Spacer />\n <SaveButton\n label={isNew ? 'Create Attribute' : 'Save Attribute'}\n icon={'check'}\n disabled={!!internalError || !formData}\n active={!internalError && !!formData}\n saving={isUpdating}\n onClick={handleSubmit}\n />\n </div>\n )\n\n let dataFields: (keyof AttributeData)[] = []\n\n // add global fields, only if scope are null (all) or the scope is included\n GLOBAL_FIELDS.forEach((globalField) => {\n // @ts-expect-error - project scope will never be found here?\n if (!globalField?.scope || globalField?.scope?.some((s) => formData?.scope?.includes(s))) {\n dataFields.push(globalField.value)\n }\n })\n\n if (formData?.data.type && TYPE_OPTIONS[formData.data.type]) {\n const typeOpt = TYPE_OPTIONS[formData.data.type]\n dataFields = [...dataFields, ...typeOpt.fields].filter((f) => !typeOpt.exclude?.includes(f))\n }\n\n type CustomFieldRenderer = (value: any, onChange: (newValue: any) => void) => JSX.Element | null\n const customFields: {\n enum: CustomFieldRenderer\n inherit: CustomFieldRenderer\n booleanDefault: CustomFieldRenderer\n } = {\n enum: (value = [], onChange) => (\n <EnumEditor\n values={value as AttributeEnumItem[]}\n onChange={(val) => {\n onChange(val?.length ? val : undefined)\n }}\n />\n ),\n inherit: (value, onChange) => (\n <InputSwitch\n checked={value}\n onChange={(e) => onChange((e.target as HTMLInputElement).checked)}\n />\n ),\n booleanDefault: (value, onChange) => (\n <InputSwitch\n checked={value}\n onChange={(e) => onChange((e.target as HTMLInputElement).checked)}\n />\n ),\n }\n\n const handleTitleChange = (e: React.ChangeEvent) => {\n const v = (e.target as HTMLInputElement).value\n setData('title', v)\n\n if (isNew) {\n setTopLevelData('name', camelCase(v))\n }\n }\n\n return (\n <Dialog\n header={formData?.data?.title || formData?.name || 'New attribute'}\n footer={footer}\n onClose={onHide}\n isOpen={true}\n style={{ width: 700, zIndex: 999 }}\n size=\"full\"\n onKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {\n e.preventDefault()\n handleSubmit()\n }\n }}\n >\n {formData && (\n <FormLayout>\n {!excludes.includes('title') && (\n <FormRow label={'Title'} key={'title'}>\n <InputText value={formData?.data['title']} onChange={handleTitleChange} autoFocus />\n </FormRow>\n )}\n {!excludes.includes('name') && (\n <FormRow label={'Name'} key={'name'}>\n <LockedInput\n value={formData.name}\n disabled={!isNew}\n onSubmit={(v) => setTopLevelData('name', v)}\n label=\"name\"\n />\n </FormRow>\n )}\n {!excludes.includes('scope') && (\n <FormRow label=\"Scope\">\n <Dropdown\n options={SCOPE_OPTIONS}\n disabled={formData.builtin}\n value={formData.scope || []}\n onChange={(v) => setTopLevelData('scope', v as AttributeModel['scope'])}\n multiSelect\n widthExpand\n />\n </FormRow>\n )}\n {!excludes.includes('type') && (\n <FormRow label=\"Type\">\n <Dropdown\n value={[formData?.data?.type]}\n disabled={formData.builtin}\n options={Object.values(TYPE_OPTIONS)}\n onChange={(v) => setData('type', v[0] as AttributeData['type'])}\n minSelected={1}\n widthExpand\n />\n </FormRow>\n )}\n {dataFields.map((field) => {\n // skip if field is excluded\n if (excludes.includes(field)) return null\n\n let fieldComp = null\n let fieldLabel = upperFirst(field)\n\n if (field === 'enum' || field === 'inherit') {\n const renderer = customFields[field as 'enum' | 'inherit']\n fieldComp = renderer(formData?.data[field], (value) => setData(field, value))\n } else if (field === 'default' && formData?.data?.type === 'boolean') {\n fieldComp = customFields['booleanDefault'](\n formData?.data[field] as boolean,\n (value) => setData(field, value as AttributeData['default']),\n )\n } else if (['ge', 'gt', 'le', 'lt'].includes(field)) {\n // ignore gt and lt\n if (['gt', 'lt'].includes(field)) return null\n fieldComp = (\n <MinMaxField\n value={formData?.data}\n isMin={field === 'ge'}\n isFloat={formData?.data?.type === 'float'}\n onChange={(v) => {\n const geValue = v.ge !== undefined ? Number(v.ge) : undefined\n const leValue = v.le !== undefined ? Number(v.le) : undefined\n\n if (\n // @ts-expect-error\n (v.ge !== undefined && isNaN(geValue)) ||\n // @ts-expect-error\n (v.le !== undefined && isNaN(leValue))\n ) {\n // Do not update the form if the value is not a valid number\n return\n }\n\n setFormData((d) => {\n if (!d || !d.data) return d\n const dt = { ...d.data, ...v }\n return { ...d, data: dt }\n })\n }}\n />\n )\n\n // rewrite field to min or max for display label\n fieldLabel = field === 'ge' ? 'Min' : 'Max'\n } else {\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const strValue = e.target.value\n switch (field) {\n case 'minLength':\n case 'maxLength':\n case 'minItems':\n case 'maxItems': {\n const num = parseInt(strValue, 10)\n setData(field, isNaN(num) ? undefined : num)\n break\n }\n default:\n // For string fields ('description', 'regex') or 'any' type fields ('example', 'default')\n setData(field, strValue as AttributeData[typeof field])\n break\n }\n }\n\n fieldComp = (\n <InputText\n value={String(formData?.data[field] ?? '')}\n onChange={handleInputChange}\n />\n )\n }\n\n return (\n <FormRow\n label={fieldLabel}\n key={field}\n style={{\n alignItems: 'flex-start',\n }}\n >\n {fieldComp}\n </FormRow>\n )\n })}\n <span>\n {(internalError || error) && (\n <span className=\"form-error-text\">{internalError || error}</span>\n )}\n </span>\n </FormLayout>\n )}\n </Dialog>\n )\n}\n"],"names":["SCOPE_OPTIONS","GLOBAL_FIELDS","TYPE_OPTIONS","initFormData","buildInitFormData","excludes","data","formData","required","key","requiredData","typedKey","AttributeEditor","attribute","existingNames","error","isUpdating","onHide","onEdit","onDelete","initForm","setFormData","useState","useEffect","isNew","setTopLevelData","value","d","setData","dt","internalError","handleSubmit","footer","jsxs","jsx","Button","Spacer","SaveButton","dataFields","globalField","_a","s","typeOpt","f","customFields","onChange","EnumEditor","val","InputSwitch","e","handleTitleChange","v","camelCase","Dialog","FormLayout","FormRow","InputText","LockedInput","Dropdown","_b","field","fieldComp","fieldLabel","upperFirst","renderer","MinMaxField","geValue","leValue","handleInputChange","strValue","num"],"mappings":"wWAkBA,MAAMA,EAAgB,CACpB,CAAE,MAAO,UAAW,MAAO,SAAU,EACrC,CAAE,MAAO,SAAU,MAAO,QAAS,EACnC,CAAE,MAAO,OAAQ,MAAO,MAAO,EAC/B,CAAE,MAAO,UAAW,MAAO,SAAU,EACrC,CAAE,MAAO,UAAW,MAAO,SAAU,EACrC,CAAE,MAAO,iBAAkB,MAAO,gBAAiB,EACnD,CAAE,MAAO,OAAQ,MAAO,MAAO,CACjC,EAQMC,EAAoC,CACxC,CAAE,MAAO,cAAe,MAAO,IAAK,EACpC,CAAE,MAAO,UAAW,MAAO,IAAK,EAEhC,CAAE,MAAO,UAAW,MAAO,CAAC,SAAS,CAAE,EACvC,CAAE,MAAO,UAAW,MAAO,IAAK,CAClC,EAaMC,EAA+B,CACnC,OAAQ,CACN,MAAO,SACP,MAAO,SACP,OAAQ,CAAC,YAAa,YAAa,OAAQ,OAAO,CACpD,EACA,QAAS,CACP,MAAO,UACP,MAAO,UACP,OAAQ,CAAC,KAAM,KAAM,KAAM,IAAI,CACjC,EACA,MAAO,CACL,MAAO,QACP,MAAO,iBACP,OAAQ,CAAC,KAAM,KAAM,KAAM,IAAI,CACjC,EACA,gBAAiB,CACf,MAAO,kBACP,MAAO,kBACP,OAAQ,CAAC,WAAY,WAAY,MAAM,CACzC,EACA,QAAS,CACP,MAAO,UACP,M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ACA,GAAK,CAACA,EAAE,KAAa,OAAAA,EAC1B,MAAME,EAAK,CAAE,GAAGF,EAAE,KAAM,GAAGwB,CAAE,EAC7B,MAAO,CAAE,GAAGxB,EAAG,KAAME,CAAG,CAAA,CACzB,CAAA,CACH,CACF,EAIWiC,EAAAF,IAAU,KAAO,MAAQ,KAAA,KACjC,CACC,MAAAQ,EAAqBnB,GAA2C,CAC9D,MAAAoB,EAAWpB,EAAE,OAAO,MAC1B,OAAQW,EAAO,CACb,IAAK,YACL,IAAK,YACL,IAAK,WACL,IAAK,WAAY,CACT,MAAAU,EAAM,SAASD,EAAU,EAAE,EACjCzC,EAAQgC,EAAO,MAAMU,CAAG,EAAI,OAAYA,CAAG,EAC3C,KAAA,CAEF,QAEE1C,EAAQgC,EAAOS,CAAuC,EACtD,KAAA,CAEN,EAGER,EAAA3B,EAAA,kBAAA,IAACsB,EAAA,UAAA,CACC,MAAO,QAAOjD,GAAA,YAAAA,EAAU,KAAKqD,KAAU,EAAE,EACzC,SAAUQ,CAAA,CACZ,CAAA,CAKF,OAAAlC,EAAA,kBAAA,IAACqB,EAAA,QAAA,CACC,MAAOO,EAEP,MAAO,CACL,WAAY,YACd,EAEC,SAAAD,CAAA,EALID,CAMP,CAAA,CAEH,EACD1B,EAAA,kBAAA,IAAC,OACG,CAAA,UAAAJ,GAAiBf,IACjBmB,EAAA,kBAAA,IAAC,QAAK,UAAU,kBAAmB,SAAiBJ,GAAAf,CAAM,CAAA,CAE9D,CAAA,CAAA,CACF,CAAA,CAAA,CAEJ,CAEJ"}
1
+ {"version":3,"file":"AttributeEditor.cjs.js","sources":["../../../../../src/components/AttributeEditor/AttributeEditor.tsx"],"sourcesContent":["import { FC, useEffect, useState } from 'react'\nimport {\n SaveButton,\n Spacer,\n FormLayout,\n FormRow,\n InputText,\n InputSwitch,\n LockedInput,\n Dropdown,\n Dialog,\n Button,\n} from '@ynput/ayon-react-components'\nimport { camelCase, upperFirst } from 'lodash'\nimport { MinMaxField } from './components'\nimport { EnumEditor } from '@shared/components/EnumEditor'\nimport { AttributeData, AttributeModel, AttributeEnumItem } from '@shared/api'\n\nconst SCOPE_OPTIONS = [\n { value: 'project', label: 'Project' },\n { value: 'folder', label: 'Folder' },\n { value: 'task', label: 'Task' },\n { value: 'product', label: 'Product' },\n { value: 'version', label: 'Version' },\n { value: 'representation', label: 'Representation' },\n { value: 'user', label: 'User' },\n]\n\n// Define types for constants\ninterface GlobalFieldEntry {\n value: keyof AttributeData\n scope: (AttributeModel['scope'] | '')[] | null\n}\n\nconst GLOBAL_FIELDS: GlobalFieldEntry[] = [\n { value: 'description', scope: null },\n { value: 'example', scope: null },\n // @ts-expect-error - project is not a scope?\n { value: 'default', scope: ['project'] },\n { value: 'inherit', scope: null },\n]\n\ninterface TypeOptionDef {\n value: AttributeData['type']\n label: string\n fields: (keyof AttributeData)[]\n exclude?: (keyof AttributeData)[]\n}\n\ninterface TypeOptionsMap {\n [key: string]: TypeOptionDef\n}\n\nconst TYPE_OPTIONS: TypeOptionsMap = {\n string: {\n value: 'string',\n label: 'String',\n fields: ['minLength', 'maxLength', 'enum', 'regex'],\n },\n integer: {\n value: 'integer',\n label: 'Integer',\n fields: ['ge', 'gt', 'le', 'lt'],\n },\n float: {\n value: 'float',\n label: 'Decimal number',\n fields: ['ge', 'gt', 'le', 'lt'],\n },\n list_of_strings: {\n value: 'list_of_strings',\n label: 'List Of Strings',\n fields: ['minItems', 'maxItems', 'enum'],\n },\n boolean: {\n value: 'boolean',\n label: 'Boolean',\n fields: [],\n exclude: ['example'],\n },\n datetime:{\n value: 'datetime',\n label: 'Datetime',\n fields: [],\n }\n}\n\ntype Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>\ntype PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>\nexport type AttributeForm = PartialBy<AttributeModel, 'scope' | 'position'>\ntype Excludes = (keyof Omit<AttributeModel, 'data'> | keyof AttributeData)[]\n\nconst initFormData: AttributeForm = {\n name: '',\n scope: ['folder', 'task'],\n builtin: false,\n position: 0,\n data: {\n type: 'string',\n title: '',\n description: '',\n example: '',\n default: undefined,\n enum: undefined,\n minLength: undefined,\n maxLength: undefined,\n regex: '',\n minItems: undefined,\n maxItems: undefined,\n ge: undefined,\n gt: undefined,\n le: undefined,\n lt: undefined,\n },\n}\n\n// build the form data based on excludes and to update any data\nconst buildInitFormData = (excludes: Excludes, data?: Partial<AttributeForm>) => {\n // Create a deep clone of init form data\n const formData = JSON.parse(JSON.stringify(initFormData)) as AttributeForm\n\n // Filter out top-level excludes if not in required\n const required = ['name']\n Object.keys(formData).forEach((key) => {\n if (\n !required.includes(key) &&\n excludes.includes(key as keyof Omit<AttributeModel, 'data'>) &&\n key !== 'data'\n ) {\n delete formData[key as keyof AttributeForm]\n }\n })\n\n // Filter out data field excludes if not in in required\n const requiredData = ['title']\n if (formData.data) {\n Object.keys(formData.data).forEach((key) => {\n if (!requiredData.includes(key) && excludes.includes(key as keyof AttributeData)) {\n delete formData.data[key as keyof AttributeData]\n }\n })\n }\n\n // Merge with provided data if any\n if (data) {\n // Merge top-level fields\n Object.keys(data).forEach((key) => {\n const typedKey = key as keyof AttributeForm\n if (typedKey !== 'data' && excludes.includes(typedKey)) return\n\n if (typedKey === 'data' && data.data && formData.data) {\n // Deep merge of data fields\n formData.data = { ...formData.data, ...data.data }\n } else if (data[typedKey] !== undefined) {\n // @ts-ignore - We know these properties exist\n formData[typedKey] = data[typedKey]\n }\n })\n }\n\n return formData\n}\n\nexport interface AttributeEditorProps {\n attribute: AttributeForm | null\n existingNames: string[]\n error?: string\n isUpdating?: boolean\n excludes?: Excludes\n onHide: () => void\n onEdit: (attribute: AttributeForm) => void\n onDelete?: () => void\n}\n\nexport const AttributeEditor: FC<AttributeEditorProps> = ({\n attribute,\n existingNames,\n error = '',\n isUpdating,\n excludes = [],\n onHide,\n onEdit,\n onDelete,\n}) => {\n const initForm = buildInitFormData(excludes, { position: existingNames.length })\n const [formData, setFormData] = useState<AttributeForm | null>(attribute || initForm)\n\n useEffect(() => {\n if (!!attribute) setFormData(attribute)\n }, [attribute])\n\n const isNew = !attribute\n\n // const setTopLevelData = (key: string, value: string) => {\n const setTopLevelData = <K extends keyof Omit<AttributeModel, 'data'>>(\n key: K,\n value: AttributeModel[K],\n ) => {\n setFormData((d) => {\n if (!d) {\n return d\n }\n return { ...d, [key]: value }\n })\n }\n\n // const setData = (key, value) => {\n const setData = <K extends keyof AttributeData>(key: K, value: AttributeData[K]) => {\n setFormData((d) => {\n // Add a check for d and d.data\n if (!d || !d.data) {\n return d\n }\n const dt = { ...d.data, [key]: value }\n return { ...d, data: dt }\n })\n }\n\n let internalError = ''\n if (formData) {\n if (isNew) {\n if (existingNames.includes(formData.name)) internalError = 'This attribute already exists'\n else if (!formData.name.match('^[a-zA-Z_]{2,64}$')) error = 'Invalid attribute name'\n } // name validation\n }\n\n const handleSubmit = () => {\n if (formData) {\n onEdit(formData)\n }\n }\n\n const footer = (\n <div style={{ display: 'flex', width: '100%', flexDirection: 'row' }}>\n {onDelete && attribute && (\n <Button\n variant=\"danger\"\n label={'Delete attribute'}\n icon={'delete'}\n disabled={isUpdating}\n onClick={onDelete}\n />\n )}\n <Spacer />\n <SaveButton\n label={isNew ? 'Create Attribute' : 'Save Attribute'}\n icon={'check'}\n disabled={!!internalError || !formData}\n active={!internalError && !!formData}\n saving={isUpdating}\n onClick={handleSubmit}\n />\n </div>\n )\n\n let dataFields: (keyof AttributeData)[] = []\n\n // add global fields, only if scope are null (all) or the scope is included\n GLOBAL_FIELDS.forEach((globalField) => {\n // @ts-expect-error - project scope will never be found here?\n if (!globalField?.scope || globalField?.scope?.some((s) => formData?.scope?.includes(s))) {\n dataFields.push(globalField.value)\n }\n })\n\n if (formData?.data.type && TYPE_OPTIONS[formData.data.type]) {\n const typeOpt = TYPE_OPTIONS[formData.data.type]\n dataFields = [...dataFields, ...typeOpt.fields].filter((f) => !typeOpt.exclude?.includes(f))\n }\n\n type CustomFieldRenderer = (value: any, onChange: (newValue: any) => void) => JSX.Element | null\n const customFields: {\n enum: CustomFieldRenderer\n inherit: CustomFieldRenderer\n booleanDefault: CustomFieldRenderer\n } = {\n enum: (value = [], onChange) => (\n <EnumEditor\n values={value as AttributeEnumItem[]}\n onChange={(val) => {\n onChange(val?.length ? val : undefined)\n }}\n />\n ),\n inherit: (value, onChange) => (\n <InputSwitch\n checked={value}\n onChange={(e) => onChange((e.target as HTMLInputElement).checked)}\n />\n ),\n booleanDefault: (value, onChange) => (\n <InputSwitch\n checked={value}\n onChange={(e) => onChange((e.target as HTMLInputElement).checked)}\n />\n ),\n }\n\n const handleTitleChange = (e: React.ChangeEvent) => {\n const v = (e.target as HTMLInputElement).value\n setData('title', v)\n\n if (isNew) {\n setTopLevelData('name', camelCase(v))\n }\n }\n\n return (\n <Dialog\n header={formData?.data?.title || formData?.name || 'New attribute'}\n footer={footer}\n onClose={onHide}\n isOpen={true}\n style={{ width: 700, zIndex: 999 }}\n size=\"full\"\n onKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {\n e.preventDefault()\n handleSubmit()\n }\n }}\n >\n {formData && (\n <FormLayout>\n {!excludes.includes('title') && (\n <FormRow label={'Title'} key={'title'}>\n <InputText value={formData?.data['title']} onChange={handleTitleChange} autoFocus />\n </FormRow>\n )}\n {!excludes.includes('name') && (\n <FormRow label={'Name'} key={'name'}>\n <LockedInput\n value={formData.name}\n disabled={!isNew}\n onSubmit={(v) => setTopLevelData('name', v)}\n label=\"name\"\n />\n </FormRow>\n )}\n {!excludes.includes('scope') && (\n <FormRow label=\"Scope\">\n <Dropdown\n options={SCOPE_OPTIONS}\n disabled={formData.builtin}\n value={formData.scope || []}\n onChange={(v) => setTopLevelData('scope', v as AttributeModel['scope'])}\n multiSelect\n widthExpand\n />\n </FormRow>\n )}\n {!excludes.includes('type') && (\n <FormRow label=\"Type\">\n <Dropdown\n value={[formData?.data?.type]}\n disabled={formData.builtin}\n options={Object.values(TYPE_OPTIONS)}\n onChange={(v) => setData('type', v[0] as AttributeData['type'])}\n minSelected={1}\n widthExpand\n />\n </FormRow>\n )}\n {dataFields.map((field) => {\n // skip if field is excluded\n if (excludes.includes(field)) return null\n\n let fieldComp = null\n let fieldLabel = upperFirst(field)\n\n if (field === 'enum' || field === 'inherit') {\n const renderer = customFields[field as 'enum' | 'inherit']\n fieldComp = renderer(formData?.data[field], (value) => setData(field, value))\n } else if (field === 'default' && formData?.data?.type === 'boolean') {\n fieldComp = customFields['booleanDefault'](\n formData?.data[field] as boolean,\n (value) => setData(field, value as AttributeData['default']),\n )\n } else if (['ge', 'gt', 'le', 'lt'].includes(field)) {\n // ignore gt and lt\n if (['gt', 'lt'].includes(field)) return null\n fieldComp = (\n <MinMaxField\n value={formData?.data}\n isMin={field === 'ge'}\n isFloat={formData?.data?.type === 'float'}\n onChange={(v) => {\n const geValue = v.ge !== undefined ? Number(v.ge) : undefined\n const leValue = v.le !== undefined ? Number(v.le) : undefined\n\n if (\n // @ts-expect-error\n (v.ge !== undefined && isNaN(geValue)) ||\n // @ts-expect-error\n (v.le !== undefined && isNaN(leValue))\n ) {\n // Do not update the form if the value is not a valid number\n return\n }\n\n setFormData((d) => {\n if (!d || !d.data) return d\n const dt = { ...d.data, ...v }\n return { ...d, data: dt }\n })\n }}\n />\n )\n\n // rewrite field to min or max for display label\n fieldLabel = field === 'ge' ? 'Min' : 'Max'\n } else {\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const strValue = e.target.value\n switch (field) {\n case 'minLength':\n case 'maxLength':\n case 'minItems':\n case 'maxItems': {\n const num = parseInt(strValue, 10)\n setData(field, isNaN(num) ? undefined : num)\n break\n }\n default:\n // For string fields ('description', 'regex') or 'any' type fields ('example', 'default')\n setData(field, strValue as AttributeData[typeof field])\n break\n }\n }\n\n fieldComp = (\n <InputText\n value={String(formData?.data[field] ?? '')}\n onChange={handleInputChange}\n />\n )\n }\n\n return (\n <FormRow\n label={fieldLabel}\n key={field}\n style={{\n alignItems: 'flex-start',\n }}\n >\n {fieldComp}\n </FormRow>\n )\n })}\n <span>\n {(internalError || error) && (\n <span className=\"form-error-text\">{internalError || error}</span>\n )}\n </span>\n </FormLayout>\n )}\n </Dialog>\n )\n}\n"],"names":["SCOPE_OPTIONS","GLOBAL_FIELDS","TYPE_OPTIONS","initFormData","buildInitFormData","excludes","data","formData","required","key","requiredData","typedKey","AttributeEditor","attribute","existingNames","error","isUpdating","onHide","onEdit","onDelete","initForm","setFormData","useState","useEffect","isNew","setTopLevelData","value","d","setData","dt","internalError","handleSubmit","footer","jsxs","jsx","Button","Spacer","SaveButton","dataFields","globalField","_a","s","typeOpt","f","customFields","onChange","EnumEditor","val","InputSwitch","e","handleTitleChange","v","camelCase","Dialog","FormLayout","FormRow","InputText","LockedInput","Dropdown","_b","field","fieldComp","fieldLabel","upperFirst","renderer","MinMaxField","geValue","leValue","handleInputChange","strValue","num"],"mappings":"wWAkBA,MAAMA,EAAgB,CACpB,CAAE,MAAO,UAAW,MAAO,SAAU,EACrC,CAAE,MAAO,SAAU,MAAO,QAAS,EACnC,CAAE,MAAO,OAAQ,MAAO,MAAO,EAC/B,CAAE,MAAO,UAAW,MAAO,SAAU,EACrC,CAAE,MAAO,UAAW,MAAO,SAAU,EACrC,CAAE,MAAO,iBAAkB,MAAO,gBAAiB,EACnD,CAAE,MAAO,OAAQ,MAAO,MAAO,CACjC,EAQMC,EAAoC,CACxC,CAAE,MAAO,cAAe,MAAO,IAAK,EACpC,CAAE,MAAO,UAAW,MAAO,IAAK,EAEhC,CAAE,MAAO,UAAW,MAAO,CAAC,SAAS,CAAE,EACvC,CAAE,MAAO,UAAW,MAAO,IAAK,CAClC,EAaMC,EAA+B,CACnC,OAAQ,CACN,MAAO,SACP,MAAO,SACP,OAAQ,CAAC,YAAa,YAAa,OAAQ,OAAO,CACpD,EACA,QAAS,CACP,MAAO,UACP,MAAO,UACP,OAAQ,CAAC,KAAM,KAAM,KA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45,11 @@ const U = [
45
45
  label: "Boolean",
46
46
  fields: [],
47
47
  exclude: ["example"]
48
+ },
49
+ datetime: {
50
+ value: "datetime",
51
+ label: "Datetime",
52
+ fields: []
48
53
  }
49
54
  }, X = {
50
55
  name: "",
@@ -91,14 +96,14 @@ const U = [
91
96
  onDelete: E
92
97
  }) => {
93
98
  var L, k;
94
- const A = D(c, { position: u.length }), [t, j] = K(r || A);
99
+ const A = D(c, { position: u.length }), [t, f] = K(r || A);
95
100
  V(() => {
96
- r && j(r);
101
+ r && f(r);
97
102
  }, [r]);
98
- const f = !r, S = (e, a) => {
99
- j((n) => n && { ...n, [e]: a });
103
+ const j = !r, S = (e, a) => {
104
+ f((n) => n && { ...n, [e]: a });
100
105
  }, h = (e, a) => {
101
- j((n) => {
106
+ f((n) => {
102
107
  if (!n || !n.data)
103
108
  return n;
104
109
  const m = { ...n.data, [e]: a };
@@ -106,7 +111,7 @@ const U = [
106
111
  });
107
112
  };
108
113
  let v = "";
109
- t && f && (u.includes(t.name) ? v = "This attribute already exists" : t.name.match("^[a-zA-Z_]{2,64}$") || (s = "Invalid attribute name"));
114
+ t && j && (u.includes(t.name) ? v = "This attribute already exists" : t.name.match("^[a-zA-Z_]{2,64}$") || (s = "Invalid attribute name"));
110
115
  const N = () => {
111
116
  t && d(t);
112
117
  }, M = /* @__PURE__ */ i.jsxs("div", { style: { display: "flex", width: "100%", flexDirection: "row" }, children: [
@@ -124,7 +129,7 @@ const U = [
124
129
  /* @__PURE__ */ i.jsx(
125
130
  Y,
126
131
  {
127
- label: f ? "Create Attribute" : "Save Attribute",
132
+ label: j ? "Create Attribute" : "Save Attribute",
128
133
  icon: "check",
129
134
  disabled: !!v || !t,
130
135
  active: !v && !!t,
@@ -173,7 +178,7 @@ const U = [
173
178
  )
174
179
  }, B = (e) => {
175
180
  const a = e.target.value;
176
- h("title", a), f && S("name", $(a));
181
+ h("title", a), j && S("name", $(a));
177
182
  };
178
183
  return /* @__PURE__ */ i.jsx(
179
184
  z,
@@ -193,7 +198,7 @@ const U = [
193
198
  q,
194
199
  {
195
200
  value: t.name,
196
- disabled: !f,
201
+ disabled: !j,
197
202
  onSubmit: (e) => S("name", e),
198
203
  label: "name"
199
204
  }
@@ -244,7 +249,7 @@ const U = [
244
249
  const g = l.ge !== void 0 ? Number(l.ge) : void 0, I = l.le !== void 0 ? Number(l.le) : void 0;
245
250
  // @ts-expect-error
246
251
  l.ge !== void 0 && isNaN(g) || // @ts-expect-error
247
- l.le !== void 0 && isNaN(I) || j((p) => {
252
+ l.le !== void 0 && isNaN(I) || f((p) => {
248
253
  if (!p || !p.data) return p;
249
254
  const F = { ...p.data, ...l };
250
255
  return { ...p, data: F };