@valiantys/atlassian-app 3.2.0-alpha-1

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 (442) hide show
  1. package/README.md +728 -0
  2. package/atlassian/forge/shared/backend-data-access-async-queue/src/lib/event-payload-storage-service/index.cjs.js +1 -0
  3. package/atlassian/forge/shared/backend-data-access-async-queue/src/lib/event-payload-storage-service/index.es.js +22 -0
  4. package/atlassian/forge/shared/backend-data-access-async-queue/src/lib/job-log-queue/index.cjs.js +1 -0
  5. package/atlassian/forge/shared/backend-data-access-async-queue/src/lib/job-log-queue/index.es.js +60 -0
  6. package/atlassian/forge/shared/backend-data-access-async-queue/src/lib/large-payload-queue-service/index.cjs.js +1 -0
  7. package/atlassian/forge/shared/backend-data-access-async-queue/src/lib/large-payload-queue-service/index.es.js +51 -0
  8. package/atlassian/forge/shared/backend-data-access-async-queue/src/lib/simple-async-queue-service/index.cjs.js +1 -0
  9. package/atlassian/forge/shared/backend-data-access-async-queue/src/lib/simple-async-queue-service/index.es.js +77 -0
  10. package/atlassian/forge/shared/backend-data-access-forge-sql/src/lib/insert-rows/index.cjs.js +1 -0
  11. package/atlassian/forge/shared/backend-data-access-forge-sql/src/lib/insert-rows/index.es.js +21 -0
  12. package/atlassian/forge/shared/backend-data-access-forge-sql/src/lib/upsert-rows/index.cjs.js +1 -0
  13. package/atlassian/forge/shared/backend-data-access-forge-sql/src/lib/upsert-rows/index.es.js +20 -0
  14. package/atlassian/forge/shared/backend-data-access-forge-sql/src/lib/util/index.cjs.js +1 -0
  15. package/atlassian/forge/shared/backend-data-access-forge-sql/src/lib/util/index.es.js +31 -0
  16. package/atlassian/forge/shared/backend-data-access-forge-storage/src/lib/forge-storage-service-standalone/index.cjs.js +1 -0
  17. package/atlassian/forge/shared/backend-data-access-forge-storage/src/lib/forge-storage-service-standalone/index.es.js +244 -0
  18. package/atlassian/forge/shared/backend-data-access-product-fetch-forge-api/src/lib/forge-api-product-fetch/index.cjs.js +1 -0
  19. package/atlassian/forge/shared/backend-data-access-product-fetch-forge-api/src/lib/forge-api-product-fetch/index.es.js +31 -0
  20. package/atlassian/forge/shared/frontend-data-access-product-fetch-forge-bridge/src/lib/forge-bridge-product-fetch/index.cjs.js +1 -0
  21. package/atlassian/forge/shared/frontend-data-access-product-fetch-forge-bridge/src/lib/forge-bridge-product-fetch/index.es.js +28 -0
  22. package/atlassian/forge/shared/frontend-ui-app-flags/src/lib/app-flags-provider-forge/index.cjs.js +1 -0
  23. package/atlassian/forge/shared/frontend-ui-app-flags/src/lib/app-flags-provider-forge/index.es.js +31 -0
  24. package/atlassian/forge/shared/frontend-ui-async-queue-job-log/src/lib/job-log-table/index.cjs.js +1 -0
  25. package/atlassian/forge/shared/frontend-ui-async-queue-job-log/src/lib/job-log-table/index.es.js +107 -0
  26. package/atlassian/forge/shared/util-product-fetch/src/lib/product-fetch/index.cjs.js +3 -0
  27. package/atlassian/forge/shared/util-product-fetch/src/lib/product-fetch/index.es.js +39 -0
  28. package/atlassian/forge/shared/util-resolver/src/lib/common-resolver-paths/index.cjs.js +1 -0
  29. package/atlassian/forge/shared/util-resolver/src/lib/common-resolver-paths/index.es.js +7 -0
  30. package/atlassian/jira/shared/data-access-assets/src/lib/assets-objects-service/index.cjs.js +1 -0
  31. package/atlassian/jira/shared/data-access-assets/src/lib/assets-objects-service/index.es.js +274 -0
  32. package/atlassian/jira/shared/data-access-assets/src/lib/global-icons/index.cjs.js +1 -0
  33. package/atlassian/jira/shared/data-access-assets/src/lib/global-icons/index.es.js +9 -0
  34. package/atlassian/jira/shared/data-access-assets/src/lib/object/index.cjs.js +1 -0
  35. package/atlassian/jira/shared/data-access-assets/src/lib/object/index.es.js +52 -0
  36. package/atlassian/jira/shared/data-access-assets/src/lib/object-linked-issues/index.cjs.js +1 -0
  37. package/atlassian/jira/shared/data-access-assets/src/lib/object-linked-issues/index.es.js +9 -0
  38. package/atlassian/jira/shared/data-access-assets/src/lib/object-schema/index.cjs.js +1 -0
  39. package/atlassian/jira/shared/data-access-assets/src/lib/object-schema/index.es.js +22 -0
  40. package/atlassian/jira/shared/data-access-assets/src/lib/object-type/index.cjs.js +1 -0
  41. package/atlassian/jira/shared/data-access-assets/src/lib/object-type/index.es.js +23 -0
  42. package/atlassian/jira/shared/data-access-assets/src/lib/object-type-attribute/index.cjs.js +1 -0
  43. package/atlassian/jira/shared/data-access-assets/src/lib/object-type-attribute/index.es.js +19 -0
  44. package/atlassian/jira/shared/data-access-issue/src/lib/jira-issue-service/index.cjs.js +1 -0
  45. package/atlassian/jira/shared/data-access-issue/src/lib/jira-issue-service/index.es.js +167 -0
  46. package/atlassian/jira/shared/data-access-issue/src/lib/jira-remote-links-service/index.cjs.js +1 -0
  47. package/atlassian/jira/shared/data-access-issue/src/lib/jira-remote-links-service/index.es.js +20 -0
  48. package/atlassian/jira/shared/data-access-jql/src/lib/jql-precomputation-service/index.cjs.js +1 -0
  49. package/atlassian/jira/shared/data-access-jql/src/lib/jql-precomputation-service/index.es.js +34 -0
  50. package/atlassian/jira/shared/data-access-project/src/lib/jira-project-service/index.cjs.js +1 -0
  51. package/atlassian/jira/shared/data-access-project/src/lib/jira-project-service/index.es.js +85 -0
  52. package/atlassian/jira/shared/data-access-serverinfo/src/lib/jira-server-info-service/index.cjs.js +1 -0
  53. package/atlassian/jira/shared/data-access-serverinfo/src/lib/jira-server-info-service/index.es.js +21 -0
  54. package/atlassian/jira/shared/data-access-workspaces/src/lib/user-workspace-service/index.cjs.js +1 -0
  55. package/atlassian/jira/shared/data-access-workspaces/src/lib/user-workspace-service/index.es.js +50 -0
  56. package/atlassian/jira/shared/util-assets/src/lib/asset-type/index.cjs.js +1 -0
  57. package/atlassian/jira/shared/util-assets/src/lib/asset-type/index.es.js +4 -0
  58. package/atlassian/jira/shared/util-assets/src/lib/object/index.cjs.js +1 -0
  59. package/atlassian/jira/shared/util-assets/src/lib/object/index.es.js +9 -0
  60. package/atlassian/jira/shared/util-assets/src/lib/object-type-attribute/index.cjs.js +1 -0
  61. package/atlassian/jira/shared/util-assets/src/lib/object-type-attribute/index.es.js +14 -0
  62. package/atlassian/jira/shared/util-jira-v3-api/src/lib/issue/index.cjs.js +1 -0
  63. package/atlassian/jira/shared/util-jira-v3-api/src/lib/issue/index.es.js +12 -0
  64. package/atlassian/jira/shared/util-jira-v3-api/src/lib/jira-server-info/index.cjs.js +1 -0
  65. package/atlassian/jira/shared/util-jira-v3-api/src/lib/jira-server-info/index.es.js +9 -0
  66. package/atlassian/shared/backend-feature-atlassian-app/src/lib/atlassian-app-backend-forge/index.cjs.js +1 -0
  67. package/atlassian/shared/backend-feature-atlassian-app/src/lib/atlassian-app-backend-forge/index.es.js +8 -0
  68. package/atlassian/shared/backend-feature-atlassian-app-express/src/lib/atlassian-app-backend-express/index.cjs.js +1 -0
  69. package/atlassian/shared/backend-feature-atlassian-app-express/src/lib/atlassian-app-backend-express/index.es.js +125 -0
  70. package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch/index.cjs.js +1 -0
  71. package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch/index.es.js +127 -0
  72. package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/route/index.cjs.js +1 -0
  73. package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/route/index.es.js +56 -0
  74. package/atlassian/shared/data-access-resources/src/lib/atlassian-user-resource-service/index.cjs.js +1 -0
  75. package/atlassian/shared/data-access-resources/src/lib/atlassian-user-resource-service/index.es.js +44 -0
  76. package/atlassian/shared/frontend-feature-atlassian-app/src/lib/atlassian-app/index.cjs.js +1 -0
  77. package/atlassian/shared/frontend-feature-atlassian-app/src/lib/atlassian-app/index.es.js +41 -0
  78. package/atlassian/shared/frontend-feature-atlassian-app/src/lib/custom-ui/atlassian-app-forge/index.cjs.js +1 -0
  79. package/atlassian/shared/frontend-feature-atlassian-app/src/lib/custom-ui/atlassian-app-forge/index.es.js +59 -0
  80. package/atlassian/shared/frontend-feature-atlassian-app/src/lib/standalone/atlassian-app-standalone/index.cjs.js +1 -0
  81. package/atlassian/shared/frontend-feature-atlassian-app/src/lib/standalone/atlassian-app-standalone/index.es.js +168 -0
  82. package/atlassian/shared/frontend-feature-atlassian-app/src/lib/test/atlassian-app-test/index.cjs.js +1 -0
  83. package/atlassian/shared/frontend-feature-atlassian-app/src/lib/test/atlassian-app-test/index.es.js +66 -0
  84. package/atlassian/shared/frontend-feature-atlassian-app/src/lib/ui-kit/atlassian-app-forge-ui-kit/index.cjs.js +1 -0
  85. package/atlassian/shared/frontend-feature-atlassian-app/src/lib/ui-kit/atlassian-app-forge-ui-kit/index.es.js +25 -0
  86. package/atlassian/shared/frontend-feature-chosen-resource-check/src/index/index.cjs.js +1 -0
  87. package/atlassian/shared/frontend-feature-chosen-resource-check/src/index/index.es.js +5 -0
  88. package/atlassian/shared/frontend-feature-chosen-resource-check/src/lib/feature-chosen-resource-check/index.cjs.js +1 -0
  89. package/atlassian/shared/frontend-feature-chosen-resource-check/src/lib/feature-chosen-resource-check/index.es.js +69 -0
  90. package/atlassian/shared/frontend-feature-chosen-workspace-check/src/lib/feature-chosen-workspace-check/index.cjs.js +1 -0
  91. package/atlassian/shared/frontend-feature-chosen-workspace-check/src/lib/feature-chosen-workspace-check/index.es.js +83 -0
  92. package/atlassian/shared/frontend-feature-chosen-workspace-check/src/lib/jira-workspace-provider/index.cjs.js +1 -0
  93. package/atlassian/shared/frontend-feature-chosen-workspace-check/src/lib/jira-workspace-provider/index.es.js +13 -0
  94. package/atlassian/shared/frontend-feature-oauth-login/src/lib/feature-oauth/index.cjs.js +1 -0
  95. package/atlassian/shared/frontend-feature-oauth-login/src/lib/feature-oauth/index.es.js +65 -0
  96. package/atlassian/shared/frontend-feature-oauth-login/src/lib/oauth-routes/index.cjs.js +1 -0
  97. package/atlassian/shared/frontend-feature-oauth-login/src/lib/oauth-routes/index.es.js +51 -0
  98. package/atlassian/shared/frontend-feature-oauth-login/src/lib/ui-oauth-callback/index.cjs.js +1 -0
  99. package/atlassian/shared/frontend-feature-oauth-login/src/lib/ui-oauth-callback/index.es.js +28 -0
  100. package/atlassian/shared/frontend-feature-oauth-login/src/lib/ui-oauth-redirect-login/index.cjs.js +1 -0
  101. package/atlassian/shared/frontend-feature-oauth-login/src/lib/ui-oauth-redirect-login/index.es.js +9 -0
  102. package/atlassian/shared/frontend-feature-oauth-login/src/lib/util/index.cjs.js +1 -0
  103. package/atlassian/shared/frontend-feature-oauth-login/src/lib/util/index.es.js +19 -0
  104. package/atlassian/shared/frontend-ui-app-flags/src/lib/app-flags-dispatch/index.cjs.js +1 -0
  105. package/atlassian/shared/frontend-ui-app-flags/src/lib/app-flags-dispatch/index.es.js +9 -0
  106. package/atlassian/shared/frontend-ui-app-flags/src/lib/app-flags-dispatch-methods/index.cjs.js +1 -0
  107. package/atlassian/shared/frontend-ui-app-flags/src/lib/app-flags-dispatch-methods/index.es.js +35 -0
  108. package/atlassian/shared/frontend-ui-app-flags/src/lib/app-flags-provider-atlaskit/index.cjs.js +1 -0
  109. package/atlassian/shared/frontend-ui-app-flags/src/lib/app-flags-provider-atlaskit/index.es.js +106 -0
  110. package/atlassian/shared/frontend-ui-atlaskit-forms/src/lib/option/index.cjs.js +1 -0
  111. package/atlassian/shared/frontend-ui-atlaskit-forms/src/lib/option/index.es.js +8 -0
  112. package/atlassian/shared/frontend-ui-atlassian-product-fetch/src/lib/request-bitbucket/index.cjs.js +1 -0
  113. package/atlassian/shared/frontend-ui-atlassian-product-fetch/src/lib/request-bitbucket/index.es.js +20 -0
  114. package/atlassian/shared/frontend-ui-atlassian-product-fetch/src/lib/request-confluence/index.cjs.js +1 -0
  115. package/atlassian/shared/frontend-ui-atlassian-product-fetch/src/lib/request-confluence/index.es.js +20 -0
  116. package/atlassian/shared/frontend-ui-atlassian-product-fetch/src/lib/request-jira/index.cjs.js +1 -0
  117. package/atlassian/shared/frontend-ui-atlassian-product-fetch/src/lib/request-jira/index.es.js +18 -0
  118. package/atlassian/shared/frontend-ui-backend-adapter/src/lib/backend-adapter/index.cjs.js +1 -0
  119. package/atlassian/shared/frontend-ui-backend-adapter/src/lib/backend-adapter/index.es.js +28 -0
  120. package/atlassian/shared/frontend-ui-backend-adapter/src/lib/oauth-fetch-invoke/index.cjs.js +1 -0
  121. package/atlassian/shared/frontend-ui-backend-adapter/src/lib/oauth-fetch-invoke/index.es.js +16 -0
  122. package/atlassian/shared/frontend-ui-copy-button/src/lib/copy-text-button/index.cjs.js +1 -0
  123. package/atlassian/shared/frontend-ui-copy-button/src/lib/copy-text-button/index.es.js +39 -0
  124. package/atlassian/shared/frontend-ui-expand-panel/src/lib/panel/index.cjs.js +1 -0
  125. package/atlassian/shared/frontend-ui-expand-panel/src/lib/panel/index.es.js +28 -0
  126. package/atlassian/shared/frontend-ui-expand-panel/src/lib/panel-stateless/index.cjs.js +1 -0
  127. package/atlassian/shared/frontend-ui-expand-panel/src/lib/panel-stateless/index.es.js +41 -0
  128. package/atlassian/shared/frontend-ui-expand-panel/src/lib/styled-panel/index.cjs.js +45 -0
  129. package/atlassian/shared/frontend-ui-expand-panel/src/lib/styled-panel/index.es.js +53 -0
  130. package/atlassian/shared/frontend-ui-host-router/src/lib/host-router/index.cjs.js +1 -0
  131. package/atlassian/shared/frontend-ui-host-router/src/lib/host-router/index.es.js +14 -0
  132. package/atlassian/shared/frontend-ui-host-router/src/lib/host-router-link/index.cjs.js +1 -0
  133. package/atlassian/shared/frontend-ui-host-router/src/lib/host-router-link/index.es.js +31 -0
  134. package/atlassian/shared/frontend-ui-host-router/src/lib/host-router-provider/index.cjs.js +1 -0
  135. package/atlassian/shared/frontend-ui-host-router/src/lib/host-router-provider/index.es.js +18 -0
  136. package/atlassian/shared/frontend-ui-iframe/src/lib/iframe-wrapper/index.cjs.js +1 -0
  137. package/atlassian/shared/frontend-ui-iframe/src/lib/iframe-wrapper/index.es.js +54 -0
  138. package/atlassian/shared/frontend-ui-iframe/src/lib/iframe-wrapper.module.scss/index.cjs.js +1 -0
  139. package/atlassian/shared/frontend-ui-iframe/src/lib/iframe-wrapper.module.scss/index.es.js +6 -0
  140. package/atlassian/shared/frontend-ui-modal/src/lib/modal-content/index.cjs.js +1 -0
  141. package/atlassian/shared/frontend-ui-modal/src/lib/modal-content/index.es.js +34 -0
  142. package/atlassian/shared/frontend-ui-modal/src/lib/modal-content-iframe/index.cjs.js +1 -0
  143. package/atlassian/shared/frontend-ui-modal/src/lib/modal-content-iframe/index.es.js +48 -0
  144. package/atlassian/shared/frontend-ui-modal/src/lib/modal-dialog-layout/index.cjs.js +1 -0
  145. package/atlassian/shared/frontend-ui-modal/src/lib/modal-dialog-layout/index.es.js +24 -0
  146. package/atlassian/shared/frontend-ui-modal/src/lib/modal-view-context/index.cjs.js +1 -0
  147. package/atlassian/shared/frontend-ui-modal/src/lib/modal-view-context/index.es.js +14 -0
  148. package/atlassian/shared/frontend-ui-modal-service/src/lib/modal-service/index.cjs.js +1 -0
  149. package/atlassian/shared/frontend-ui-modal-service/src/lib/modal-service/index.es.js +38 -0
  150. package/atlassian/shared/frontend-ui-modal-service/src/lib/modal-service-provider/index.cjs.js +1 -0
  151. package/atlassian/shared/frontend-ui-modal-service/src/lib/modal-service-provider/index.es.js +20 -0
  152. package/atlassian/shared/frontend-ui-page-loading-view/src/lib/page-loading-view/index.cjs.js +1 -0
  153. package/atlassian/shared/frontend-ui-page-loading-view/src/lib/page-loading-view/index.es.js +19 -0
  154. package/atlassian/shared/frontend-ui-remote-adapter/src/lib/oauth-fetch-invoke-remote/index.cjs.js +1 -0
  155. package/atlassian/shared/frontend-ui-remote-adapter/src/lib/oauth-fetch-invoke-remote/index.es.js +12 -0
  156. package/atlassian/shared/frontend-ui-remote-adapter/src/lib/remote-adapter/index.cjs.js +1 -0
  157. package/atlassian/shared/frontend-ui-remote-adapter/src/lib/remote-adapter/index.es.js +28 -0
  158. package/atlassian/shared/frontend-ui-view-context/src/lib/mock-view-context/index.cjs.js +1 -0
  159. package/atlassian/shared/frontend-ui-view-context/src/lib/mock-view-context/index.es.js +27 -0
  160. package/atlassian/shared/frontend-ui-view-context/src/lib/view-context-provider/index.cjs.js +1 -0
  161. package/atlassian/shared/frontend-ui-view-context/src/lib/view-context-provider/index.es.js +18 -0
  162. package/atlassian/shared/util-error/src/index/index.cjs.js +1 -0
  163. package/atlassian/shared/util-error/src/index/index.es.js +8 -0
  164. package/atlassian-app.css +1 -0
  165. package/backend-data-access-async-queue/atlassian-app-backend-data-access-async-queue.api.json +2205 -0
  166. package/backend-data-access-async-queue/atlassian-app.api.md +118 -0
  167. package/backend-data-access-async-queue/index.cjs.js +1 -0
  168. package/backend-data-access-async-queue/index.d.ts +121 -0
  169. package/backend-data-access-async-queue/index.es.js +10 -0
  170. package/backend-data-access-async-queue/tsdoc-metadata.json +11 -0
  171. package/backend-data-access-forge-sql/atlassian-app-backend-data-access-forge-sql.api.json +554 -0
  172. package/backend-data-access-forge-sql/atlassian-app.api.md +21 -0
  173. package/backend-data-access-forge-sql/index.cjs.js +1 -0
  174. package/backend-data-access-forge-sql/index.d.ts +18 -0
  175. package/backend-data-access-forge-sql/index.es.js +8 -0
  176. package/backend-data-access-forge-sql/tsdoc-metadata.json +11 -0
  177. package/backend-data-access-forge-storage/atlassian-app-backend-data-access-forge-storage.api.json +772 -0
  178. package/backend-data-access-forge-storage/atlassian-app.api.md +58 -0
  179. package/backend-data-access-forge-storage/index.cjs.js +1 -0
  180. package/backend-data-access-forge-storage/index.d.ts +50 -0
  181. package/backend-data-access-forge-storage/index.es.js +4 -0
  182. package/backend-data-access-forge-storage/tsdoc-metadata.json +11 -0
  183. package/backend-data-access-product-fetch-forge-api/atlassian-app-backend-data-access-product-fetch-forge-api.api.json +266 -0
  184. package/backend-data-access-product-fetch-forge-api/atlassian-app.api.md +15 -0
  185. package/backend-data-access-product-fetch-forge-api/index.cjs.js +1 -0
  186. package/backend-data-access-product-fetch-forge-api/index.d.ts +32 -0
  187. package/backend-data-access-product-fetch-forge-api/index.es.js +4 -0
  188. package/backend-data-access-product-fetch-forge-api/tsdoc-metadata.json +11 -0
  189. package/backend-feature-atlassian-app/atlassian-app-backend-feature-atlassian-app.api.json +458 -0
  190. package/backend-feature-atlassian-app/atlassian-app.api.md +41 -0
  191. package/backend-feature-atlassian-app/index.cjs.js +1 -0
  192. package/backend-feature-atlassian-app/index.d.ts +102 -0
  193. package/backend-feature-atlassian-app/index.es.js +4 -0
  194. package/backend-feature-atlassian-app/tsdoc-metadata.json +11 -0
  195. package/backend-feature-atlassian-app-express/atlassian-app-backend-feature-atlassian-app-express.api.json +682 -0
  196. package/backend-feature-atlassian-app-express/atlassian-app.api.md +51 -0
  197. package/backend-feature-atlassian-app-express/index.cjs.js +1 -0
  198. package/backend-feature-atlassian-app-express/index.d.ts +141 -0
  199. package/backend-feature-atlassian-app-express/index.es.js +9 -0
  200. package/backend-feature-atlassian-app-express/tsdoc-metadata.json +11 -0
  201. package/data-access-assets/atlassian-app-data-access-assets.api.json +2441 -0
  202. package/data-access-assets/atlassian-app.api.md +109 -0
  203. package/data-access-assets/index.cjs.js +1 -0
  204. package/data-access-assets/index.d.ts +316 -0
  205. package/data-access-assets/index.es.js +23 -0
  206. package/data-access-assets/tsdoc-metadata.json +11 -0
  207. package/data-access-atlassian-product-fetch-oauth/atlassian-app-data-access-atlassian-product-fetch-oauth.api.json +1439 -0
  208. package/data-access-atlassian-product-fetch-oauth/atlassian-app.api.md +92 -0
  209. package/data-access-atlassian-product-fetch-oauth/index.cjs.js +1 -0
  210. package/data-access-atlassian-product-fetch-oauth/index.d.ts +79 -0
  211. package/data-access-atlassian-product-fetch-oauth/index.es.js +14 -0
  212. package/data-access-atlassian-product-fetch-oauth/tsdoc-metadata.json +11 -0
  213. package/data-access-issue/atlassian-app-data-access-issue.api.json +1995 -0
  214. package/data-access-issue/atlassian-app.api.md +111 -0
  215. package/data-access-issue/index.cjs.js +1 -0
  216. package/data-access-issue/index.d.ts +471 -0
  217. package/data-access-issue/index.es.js +6 -0
  218. package/data-access-issue/tsdoc-metadata.json +11 -0
  219. package/data-access-jql/atlassian-app-data-access-jql.api.json +388 -0
  220. package/data-access-jql/atlassian-app.api.md +25 -0
  221. package/data-access-jql/index.cjs.js +1 -0
  222. package/data-access-jql/index.d.ts +62 -0
  223. package/data-access-jql/index.es.js +4 -0
  224. package/data-access-jql/tsdoc-metadata.json +11 -0
  225. package/data-access-project/atlassian-app-data-access-project.api.json +856 -0
  226. package/data-access-project/atlassian-app.api.md +41 -0
  227. package/data-access-project/index.cjs.js +1 -0
  228. package/data-access-project/index.d.ts +114 -0
  229. package/data-access-project/index.es.js +4 -0
  230. package/data-access-project/tsdoc-metadata.json +11 -0
  231. package/data-access-resources/atlassian-app-data-access-resources.api.json +515 -0
  232. package/data-access-resources/atlassian-app.api.md +45 -0
  233. package/data-access-resources/index.cjs.js +1 -0
  234. package/data-access-resources/index.d.ts +27 -0
  235. package/data-access-resources/index.es.js +4 -0
  236. package/data-access-resources/tsdoc-metadata.json +11 -0
  237. package/data-access-serverinfo/atlassian-app-data-access-serverinfo.api.json +366 -0
  238. package/data-access-serverinfo/atlassian-app.api.md +23 -0
  239. package/data-access-serverinfo/index.cjs.js +1 -0
  240. package/data-access-serverinfo/index.d.ts +61 -0
  241. package/data-access-serverinfo/index.es.js +4 -0
  242. package/data-access-serverinfo/tsdoc-metadata.json +11 -0
  243. package/data-access-workspaces/atlassian-app-data-access-workspaces.api.json +406 -0
  244. package/data-access-workspaces/atlassian-app.api.md +32 -0
  245. package/data-access-workspaces/index.cjs.js +1 -0
  246. package/data-access-workspaces/index.d.ts +50 -0
  247. package/data-access-workspaces/index.es.js +4 -0
  248. package/data-access-workspaces/tsdoc-metadata.json +11 -0
  249. package/frontend-app/atlassian-app-frontend-app.api.json +636 -0
  250. package/frontend-app/atlassian-app.api.md +56 -0
  251. package/frontend-app/index.cjs.js +1 -0
  252. package/frontend-app/index.d.ts +109 -0
  253. package/frontend-app/index.es.js +5 -0
  254. package/frontend-app/tsdoc-metadata.json +11 -0
  255. package/frontend-app-custom-ui/atlassian-app-frontend-app-custom-ui.api.json +242 -0
  256. package/frontend-app-custom-ui/atlassian-app.api.md +17 -0
  257. package/frontend-app-custom-ui/index.cjs.js +1 -0
  258. package/frontend-app-custom-ui/index.d.ts +20 -0
  259. package/frontend-app-custom-ui/index.es.js +4 -0
  260. package/frontend-app-custom-ui/tsdoc-metadata.json +11 -0
  261. package/frontend-app-standalone/atlassian-app-frontend-app-standalone.api.json +554 -0
  262. package/frontend-app-standalone/atlassian-app.api.md +46 -0
  263. package/frontend-app-standalone/index.cjs.js +1 -0
  264. package/frontend-app-standalone/index.d.ts +45 -0
  265. package/frontend-app-standalone/index.es.js +4 -0
  266. package/frontend-app-standalone/tsdoc-metadata.json +11 -0
  267. package/frontend-app-test/atlassian-app-frontend-app-test.api.json +514 -0
  268. package/frontend-app-test/atlassian-app.api.md +45 -0
  269. package/frontend-app-test/index.cjs.js +1 -0
  270. package/frontend-app-test/index.d.ts +67 -0
  271. package/frontend-app-test/index.es.js +5 -0
  272. package/frontend-app-test/tsdoc-metadata.json +11 -0
  273. package/frontend-app-ui-kit/atlassian-app-frontend-app-ui-kit.api.json +229 -0
  274. package/frontend-app-ui-kit/atlassian-app.api.md +15 -0
  275. package/frontend-app-ui-kit/index.cjs.js +1 -0
  276. package/frontend-app-ui-kit/index.d.ts +6 -0
  277. package/frontend-app-ui-kit/index.es.js +4 -0
  278. package/frontend-app-ui-kit/tsdoc-metadata.json +11 -0
  279. package/package.json +271 -0
  280. package/shared/frontend-ui-drop-target/src/lib/drop-target-box/index.cjs.js +1 -0
  281. package/shared/frontend-ui-drop-target/src/lib/drop-target-box/index.es.js +20 -0
  282. package/shared/frontend-ui-drop-target/src/lib/drop-target-box.module.scss/index.cjs.js +1 -0
  283. package/shared/frontend-ui-drop-target/src/lib/drop-target-box.module.scss/index.es.js +6 -0
  284. package/shared/frontend-ui-drop-target/src/lib/drop-utils/index.cjs.js +1 -0
  285. package/shared/frontend-ui-drop-target/src/lib/drop-utils/index.es.js +24 -0
  286. package/shared/frontend-ui-load-data-hook/src/lib/load-data-hook/index.cjs.js +1 -0
  287. package/shared/frontend-ui-load-data-hook/src/lib/load-data-hook/index.es.js +32 -0
  288. package/shared/frontend-ui-window-listener-hook/src/lib/window-listener-hook/index.cjs.js +1 -0
  289. package/shared/frontend-ui-window-listener-hook/src/lib/window-listener-hook/index.es.js +9 -0
  290. package/shared/util-fetch/src/lib/shared-util-fetch/index.cjs.js +2 -0
  291. package/shared/util-fetch/src/lib/shared-util-fetch/index.es.js +76 -0
  292. package/ui-app-flags/atlassian-app-ui-app-flags.api.json +587 -0
  293. package/ui-app-flags/atlassian-app.api.md +57 -0
  294. package/ui-app-flags/index.cjs.js +1 -0
  295. package/ui-app-flags/index.d.ts +37 -0
  296. package/ui-app-flags/index.es.js +9 -0
  297. package/ui-app-flags/tsdoc-metadata.json +11 -0
  298. package/ui-async-queue-job-log/atlassian-app-ui-async-queue-job-log.api.json +246 -0
  299. package/ui-async-queue-job-log/atlassian-app.api.md +22 -0
  300. package/ui-async-queue-job-log/index.cjs.js +1 -0
  301. package/ui-async-queue-job-log/index.d.ts +21 -0
  302. package/ui-async-queue-job-log/index.es.js +4 -0
  303. package/ui-async-queue-job-log/tsdoc-metadata.json +11 -0
  304. package/ui-atlaskit-forms/atlassian-app-ui-atlaskit-forms.api.json +341 -0
  305. package/ui-atlaskit-forms/atlassian-app.api.md +19 -0
  306. package/ui-atlaskit-forms/index.cjs.js +1 -0
  307. package/ui-atlaskit-forms/index.d.ts +48 -0
  308. package/ui-atlaskit-forms/index.es.js +4 -0
  309. package/ui-atlaskit-forms/tsdoc-metadata.json +11 -0
  310. package/ui-atlassian-product-fetch/atlassian-app-ui-atlassian-product-fetch.api.json +418 -0
  311. package/ui-atlassian-product-fetch/atlassian-app.api.md +38 -0
  312. package/ui-atlassian-product-fetch/index.cjs.js +1 -0
  313. package/ui-atlassian-product-fetch/index.d.ts +60 -0
  314. package/ui-atlassian-product-fetch/index.es.js +11 -0
  315. package/ui-atlassian-product-fetch/tsdoc-metadata.json +11 -0
  316. package/ui-backend-adapter/atlassian-app-ui-backend-adapter.api.json +402 -0
  317. package/ui-backend-adapter/atlassian-app.api.md +34 -0
  318. package/ui-backend-adapter/index.cjs.js +1 -0
  319. package/ui-backend-adapter/index.d.ts +26 -0
  320. package/ui-backend-adapter/index.es.js +7 -0
  321. package/ui-backend-adapter/tsdoc-metadata.json +11 -0
  322. package/ui-chosen-resource-check/atlassian-app-ui-chosen-resource-check.api.json +388 -0
  323. package/ui-chosen-resource-check/atlassian-app.api.md +35 -0
  324. package/ui-chosen-resource-check/index.cjs.js +1 -0
  325. package/ui-chosen-resource-check/index.d.ts +20 -0
  326. package/ui-chosen-resource-check/index.es.js +4 -0
  327. package/ui-chosen-resource-check/tsdoc-metadata.json +11 -0
  328. package/ui-chosen-workspace-check/atlassian-app-ui-chosen-workspace-check.api.json +362 -0
  329. package/ui-chosen-workspace-check/atlassian-app.api.md +30 -0
  330. package/ui-chosen-workspace-check/index.cjs.js +1 -0
  331. package/ui-chosen-workspace-check/index.d.ts +17 -0
  332. package/ui-chosen-workspace-check/index.es.js +7 -0
  333. package/ui-chosen-workspace-check/tsdoc-metadata.json +11 -0
  334. package/ui-copy-button/atlassian-app-ui-copy-button.api.json +384 -0
  335. package/ui-copy-button/atlassian-app.api.md +30 -0
  336. package/ui-copy-button/index.cjs.js +1 -0
  337. package/ui-copy-button/index.d.ts +15 -0
  338. package/ui-copy-button/index.es.js +4 -0
  339. package/ui-copy-button/tsdoc-metadata.json +11 -0
  340. package/ui-drop-target/atlassian-app-ui-drop-target.api.json +637 -0
  341. package/ui-drop-target/atlassian-app.api.md +50 -0
  342. package/ui-drop-target/index.cjs.js +1 -0
  343. package/ui-drop-target/index.d.ts +39 -0
  344. package/ui-drop-target/index.es.js +7 -0
  345. package/ui-drop-target/tsdoc-metadata.json +11 -0
  346. package/ui-expand-panel/atlassian-app-ui-expand-panel.api.json +252 -0
  347. package/ui-expand-panel/atlassian-app.api.md +23 -0
  348. package/ui-expand-panel/index.cjs.js +1 -0
  349. package/ui-expand-panel/index.d.ts +31 -0
  350. package/ui-expand-panel/index.es.js +6 -0
  351. package/ui-expand-panel/tsdoc-metadata.json +11 -0
  352. package/ui-host-router/atlassian-app-ui-host-router.api.json +827 -0
  353. package/ui-host-router/atlassian-app.api.md +61 -0
  354. package/ui-host-router/index.cjs.js +1 -0
  355. package/ui-host-router/index.d.ts +40 -0
  356. package/ui-host-router/index.es.js +9 -0
  357. package/ui-host-router/tsdoc-metadata.json +11 -0
  358. package/ui-iframe/atlassian-app-ui-iframe.api.json +531 -0
  359. package/ui-iframe/atlassian-app.api.md +43 -0
  360. package/ui-iframe/index.cjs.js +1 -0
  361. package/ui-iframe/index.d.ts +24 -0
  362. package/ui-iframe/index.es.js +4 -0
  363. package/ui-iframe/tsdoc-metadata.json +11 -0
  364. package/ui-load-data-hook/atlassian-app-ui-load-data-hook.api.json +329 -0
  365. package/ui-load-data-hook/atlassian-app.api.md +25 -0
  366. package/ui-load-data-hook/index.cjs.js +1 -0
  367. package/ui-load-data-hook/index.d.ts +38 -0
  368. package/ui-load-data-hook/index.es.js +4 -0
  369. package/ui-load-data-hook/tsdoc-metadata.json +11 -0
  370. package/ui-modal/atlassian-app-ui-modal.api.json +1462 -0
  371. package/ui-modal/atlassian-app.api.md +117 -0
  372. package/ui-modal/index.cjs.js +1 -0
  373. package/ui-modal/index.d.ts +126 -0
  374. package/ui-modal/index.es.js +16 -0
  375. package/ui-modal/tsdoc-metadata.json +11 -0
  376. package/ui-modal-service/atlassian-app-ui-modal-service.api.json +809 -0
  377. package/ui-modal-service/atlassian-app.api.md +59 -0
  378. package/ui-modal-service/index.cjs.js +1 -0
  379. package/ui-modal-service/index.d.ts +41 -0
  380. package/ui-modal-service/index.es.js +7 -0
  381. package/ui-modal-service/tsdoc-metadata.json +11 -0
  382. package/ui-oauth-login/atlassian-app-ui-oauth-login.api.json +809 -0
  383. package/ui-oauth-login/atlassian-app.api.md +67 -0
  384. package/ui-oauth-login/index.cjs.js +1 -0
  385. package/ui-oauth-login/index.d.ts +47 -0
  386. package/ui-oauth-login/index.es.js +9 -0
  387. package/ui-oauth-login/tsdoc-metadata.json +11 -0
  388. package/ui-page-loading-view/atlassian-app-ui-page-loading-view.api.json +242 -0
  389. package/ui-page-loading-view/atlassian-app.api.md +19 -0
  390. package/ui-page-loading-view/index.cjs.js +1 -0
  391. package/ui-page-loading-view/index.d.ts +10 -0
  392. package/ui-page-loading-view/index.es.js +4 -0
  393. package/ui-page-loading-view/tsdoc-metadata.json +11 -0
  394. package/ui-remote-adapter/atlassian-app-ui-remote-adapter.api.json +369 -0
  395. package/ui-remote-adapter/atlassian-app.api.md +33 -0
  396. package/ui-remote-adapter/index.cjs.js +1 -0
  397. package/ui-remote-adapter/index.d.ts +26 -0
  398. package/ui-remote-adapter/index.es.js +7 -0
  399. package/ui-remote-adapter/tsdoc-metadata.json +11 -0
  400. package/ui-view-context/atlassian-app-ui-view-context.api.json +992 -0
  401. package/ui-view-context/atlassian-app.api.md +78 -0
  402. package/ui-view-context/index.cjs.js +1 -0
  403. package/ui-view-context/index.d.ts +62 -0
  404. package/ui-view-context/index.es.js +7 -0
  405. package/ui-view-context/tsdoc-metadata.json +11 -0
  406. package/util-assets/atlassian-app-util-assets.api.json +4726 -0
  407. package/util-assets/atlassian-app.api.md +418 -0
  408. package/util-assets/index.cjs.js +1 -0
  409. package/util-assets/index.d.ts +245 -0
  410. package/util-assets/index.es.js +9 -0
  411. package/util-assets/tsdoc-metadata.json +11 -0
  412. package/util-async-queue/atlassian-app-util-async-queue.api.json +439 -0
  413. package/util-async-queue/atlassian-app.api.md +31 -0
  414. package/util-async-queue/index.cjs.js +1 -0
  415. package/util-async-queue/index.d.ts +13 -0
  416. package/util-async-queue/index.es.js +1 -0
  417. package/util-async-queue/tsdoc-metadata.json +11 -0
  418. package/util-atlassian-product-fetch/atlassian-app-util-atlassian-product-fetch.api.json +1795 -0
  419. package/util-atlassian-product-fetch/atlassian-app.api.md +116 -0
  420. package/util-atlassian-product-fetch/index.cjs.js +1 -0
  421. package/util-atlassian-product-fetch/index.d.ts +70 -0
  422. package/util-atlassian-product-fetch/index.es.js +9 -0
  423. package/util-atlassian-product-fetch/tsdoc-metadata.json +11 -0
  424. package/util-jira-v3-api/atlassian-app-util-jira-v3-api.api.json +7431 -0
  425. package/util-jira-v3-api/atlassian-app.api.md +777 -0
  426. package/util-jira-v3-api/index.cjs.js +1 -0
  427. package/util-jira-v3-api/index.d.ts +510 -0
  428. package/util-jira-v3-api/index.es.js +8 -0
  429. package/util-jira-v3-api/tsdoc-metadata.json +11 -0
  430. package/util-resolver/atlassian-app-util-resolver.api.json +1014 -0
  431. package/util-resolver/atlassian-app.api.md +90 -0
  432. package/util-resolver/index.cjs.js +1 -0
  433. package/util-resolver/index.d.ts +67 -0
  434. package/util-resolver/index.es.js +4 -0
  435. package/util-resolver/tsdoc-metadata.json +11 -0
  436. package/util-trigger/atlassian-app-util-trigger.api.json +792 -0
  437. package/util-trigger/atlassian-app.api.md +84 -0
  438. package/util-trigger/index.cjs.js +1 -0
  439. package/util-trigger/index.d.ts +266 -0
  440. package/util-trigger/index.es.js +1 -0
  441. package/util-trigger/tsdoc-metadata.json +11 -0
  442. package/valiantys-atlassian-app-3.2.0-alpha-1.tgz +0 -0
package/README.md ADDED
@@ -0,0 +1,728 @@
1
+ # @valiantys/atlassian-app
2
+
3
+ This library provides an Atlassian Forge Custom UI wrapper component that handles all the setup necessary to
4
+ support an app that can run deployed or in standalone mode.
5
+
6
+ TODO add backend documentation here
7
+
8
+ ## Using the library
9
+
10
+ The library can be installed into a React Custom UI Forge App that is built with Vite.
11
+ It definitely does not work with react-scripts.
12
+ It has not been tested with Webpack.
13
+
14
+ ## Table of Contents
15
+
16
+ - [Generate a new Forge App](#generate-a-new-forge-app)
17
+ - [Creating a Custom UI module with Vite](#creating-a-custom-ui-module-with-vite)
18
+ - [Generate the Custom UI app](#generate-the-custom-ui-app)
19
+ - [Install the library](#install-the-library)
20
+ - [Update the generated code](#update-the-generated-code)
21
+ - [Vite config](#vite-config)
22
+ - [manifest.yml](#manifest-yml)
23
+ - [Setup OAuth for invoking Atlassian APIs](#setup-oauth-for-invoking-atlassian-apis)
24
+ - [Run the app locally (standalone mode)](#run-the-app-locally)
25
+ - [Deploy the app](#deploy-the-app)
26
+ - [Using provided abstractions for @forge/bridge APIs](#using-provided-abstractions)
27
+ - [Invoking backend resolver functions (invoke)](#invoke)
28
+ - [requestJira, requestConfluence, requestBitbucket](#request-jira)
29
+ - [Accessing JSM Assets APIs that require a workspace ID](#workspace-id)
30
+ - [Accessing the View Context with useViewContext hook](#accessing-the-view-context-with-useviewcontext-hook)
31
+ - [Host Router (@forge/bridge router)](#host-router)
32
+ - [Modals (@forge/bridge Modal)](#modals)
33
+ - [Invoking remote calls from the client (@forge/bridge invokeRemote)](#invoke-remote)
34
+ - [Unit testing](#unit-testing)
35
+ - [Add react and jest testing support](#add-react-and-jest-testing-support)
36
+ - [Configure Jest](#configure-jest)
37
+ - [Example](#testing-example)
38
+ - [References](#references)
39
+ - [Example Application](#example-application)
40
+ - [Support](#support)
41
+
42
+ ### Generate a new Forge App
43
+
44
+ See the [README](../atlassian-app-backend/README.md) file in the @valiantys/atlassian-app-backend library for
45
+ instructions on creating a Forge app that supports standalone and deployed modes.
46
+
47
+ ### Creating a Custom UI module with Vite
48
+
49
+ Delete the static/hello-world app that was generated by the forge cli,
50
+ then follow the steps below to add a Custom UI app with Vite.
51
+
52
+ #### Generate the Custom UI app
53
+
54
+ Run Vite CLI command to generate a new react app.
55
+
56
+ ```shell
57
+ cd static
58
+ npm create vite@latest my-module-name -- --template react-ts
59
+ ```
60
+
61
+ #### Install the library
62
+
63
+ ```shell
64
+ cd my-module-name
65
+ npm i @valiantys/atlassian-app-frontend
66
+ ```
67
+
68
+ #### Update the generated code
69
+
70
+ You can delete the App.css file, then replace the contents of main.tsx, App.tsx, and index.css as shown below.
71
+
72
+ ##### <span id="update-the-generated-code-main"></span>main.tsx
73
+
74
+ ```tsx
75
+ import '@atlaskit/css-reset';
76
+ import * as ReactDOM from 'react-dom/client';
77
+
78
+ import './index.css';
79
+ import App from './app';
80
+
81
+ const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
82
+
83
+ root.render(<App />);
84
+ ```
85
+
86
+ ##### <span id="update-the-generated-code-app"></span>app.tsx
87
+
88
+ ```tsx
89
+ import { AtlassianApp } from '@valiantys/atlassian-app-frontend';
90
+
91
+ function App() {
92
+ return (
93
+ <AtlassianApp appName="hello" standaloneConfig={{}} embeddedConfig={{}}>
94
+ Hello World
95
+ </AtlassianApp>
96
+ );
97
+ }
98
+
99
+ export default App;
100
+ ```
101
+
102
+ ##### <span id="index-css"></span>index.css
103
+
104
+ ```css
105
+ @import '../node_modules/@valiantys/atlassian-app-frontend/style.css';
106
+ ```
107
+
108
+ #### Vite config
109
+
110
+ Add base: './' to the vite.config.ts
111
+
112
+ ```ts
113
+ export default defineConfig({
114
+ base: './',
115
+ server: {
116
+ port: 4200,
117
+ host: 'localhost',
118
+ },
119
+
120
+ preview: {
121
+ port: 4300,
122
+ host: 'localhost',
123
+ },
124
+ plugins: [react()],
125
+ });
126
+ ```
127
+
128
+ #### <span id="manifest-yml"></span>manifest.yml
129
+
130
+ Add/change resource path to point to the dist directory of your new Custom UI app.
131
+ You also need to allow inline styles.
132
+
133
+ ```yaml
134
+ resources:
135
+ - key: main
136
+ path: static/my-module-name/dist
137
+
138
+ permissions:
139
+ content:
140
+ styles:
141
+ - 'unsafe-inline'
142
+ ```
143
+
144
+ #### Setup OAuth for invoking Atlassian APIs
145
+
146
+ ##### Add OAuth config to a .env file
147
+
148
+ Create an OAuth 2.0 integration app at <https://developer.atlassian.com/console/myapps/> with the `read:me`
149
+ scope activated under `User identity API` and the authorization callback url set to `http://localhost:4200/callback`.
150
+ Here, you will also need to add any additional scopes needed for Atlassian APIs that you use.
151
+ From the developer console, you will need to copy the client ID and client secret values that are found on the Settings page of the OAuth app you create.
152
+ The secret will go in the backend .env file. You should only include the client ID in the frontend .env file as shown below.
153
+
154
+ Your .env file will contain secrets that should NOT be committed to git.
155
+ You should also add a sample.env file to your project that does NOT contain any secrets but makes it easier for other developers to set up their own .env file.
156
+
157
+ static/my-module-name/.env
158
+
159
+ ```shell
160
+ # Needed for standalone authentication with Atlassian OAuth
161
+ VITE_ATLASSIAN_OAUTH_CLIENT_ID=<client-id>
162
+
163
+ # Set to deployed url/port in non local environment
164
+ VITE_STANDALONE_BACKEND_URL='http://localhost'
165
+ VITE_STANDALONE_BACKEND_PORT=3000
166
+ ```
167
+
168
+ ##### Add OAuth config to AtlassianApp props:
169
+
170
+ The oAuthScopes listed here must match exactly with the OAuth scopes granted for the
171
+ OAuth client id supplied in the .env file. The configuration below contains the
172
+ OAuth scopes needed for all the provided code examples.
173
+
174
+ app.tsx
175
+
176
+ ```tsx
177
+ const backendUrl = `${import.meta.env.VITE_STANDALONE_BACKEND_URL}:${import.meta.env.VITE_STANDALONE_BACKEND_PORT}/api/`;
178
+
179
+ ...
180
+
181
+ <AtlassianApp
182
+ appName="hello"
183
+ standaloneConfig={{
184
+ oauthConfig: {
185
+ appName: 'hello',
186
+ codeTokenExchangeUrl: `${backendUrl}${CommonResolverPaths.getOauthToken}`,
187
+ clientId: import.meta.env.VITE_ATLASSIAN_OAUTH_CLIENT_ID,
188
+ oAuthScopes: [
189
+ 'read:jira-user',
190
+ 'read:me',
191
+ 'read:jira-work', // needed to query for Jira issues
192
+ 'read:servicedesk-request', // needed to query for assets workspace ID
193
+ 'read:cmdb-schema:jira', // needed to query for list of assets schemas
194
+ ],
195
+ },
196
+ }}
197
+ embeddedConfig={{}}
198
+ >
199
+ ```
200
+
201
+ #### <span id="run-the-app-locally"></span>Run the app locally (standalone mode)
202
+
203
+ ```shell
204
+ cd static/my-module-name
205
+ npm run dev
206
+ ```
207
+
208
+ #### Deploy the app
209
+
210
+ ```shell
211
+ cd static/my-module-name
212
+ npm run build
213
+ cd ../../
214
+ forge deploy
215
+ ```
216
+
217
+ ### <span id="using-provided-abstractions"></span>Using provided abstractions for @forge/bridge APIs
218
+
219
+ #### <span id="invoke"></span>Invoking backend resolver functions (invoke)
220
+
221
+ ##### Configuration
222
+
223
+ static/my-module-name/.env
224
+
225
+ ```shell
226
+ # Set to deployed url/port in non local environment
227
+ VITE_STANDALONE_BACKEND_URL='http://localhost'
228
+ VITE_STANDALONE_BACKEND_PORT=3000
229
+ ```
230
+
231
+ app.tsx
232
+
233
+ ```tsx
234
+ const backendUrl = `${import.meta.env.VITE_STANDALONE_BACKEND_URL}:${import.meta.env.VITE_STANDALONE_BACKEND_PORT}/api/`;
235
+
236
+ function App() {
237
+ return (
238
+ <AtlassianApp
239
+ appName="hello"
240
+ standaloneConfig={{
241
+ backendUrl,
242
+ ```
243
+
244
+ ##### Example Component
245
+
246
+ ```tsx
247
+ import { useEffect, useState } from 'react';
248
+ import { useBackendAdapter } from '@valiantys/atlassian-app-frontend';
249
+
250
+ export function Hello() {
251
+ const [text, setText] = useState<string>('');
252
+ const { invoke } = useBackendAdapter();
253
+
254
+ useEffect(() => {
255
+ invoke<{ text: string }>('getText').then((t) => setText(t.text));
256
+ }, [invoke]);
257
+
258
+ return <div>{text}</div>;
259
+ }
260
+ ```
261
+
262
+ #### <span id="request-jira"></span>requestJira, requestConfluence, requestBitbucket
263
+
264
+ The library provides hooks to access abstractions for each one of these.
265
+ Using these abstractions is what allows the frontend app to run in both standalone and deployed modes.
266
+ When deployed in Forge, these abstractions are just simple wrappers around the @forge/bridge methods.
267
+ In standalone mode, however, they make requests using the OAuth token and the fetch API.
268
+ See [Setup OAuth for invoking Atlassian APIs](#setup-oauth-for-invoking-atlassian-apis).
269
+
270
+ ##### Example component with useRequestJira
271
+
272
+ This component uses the Jira REST API to retrieve the list of Issue Types that the user has permissions to view.
273
+
274
+ ```tsx
275
+ import { useEffect, useState } from 'react';
276
+ import { useRequestJira } from '@valiantys/atlassian-app-frontend';
277
+
278
+ export function IssueTypesExample() {
279
+ const [issueTypes, setIssueTypes] = useState<IssueTypeDetails[]>([]);
280
+ const requestJiraSvc = useRequestJira();
281
+
282
+ useEffect(() => {
283
+ requestJiraSvc
284
+ .fetch<IssueTypeDetails[]>({
285
+ url: requestJiraSvc.route`/rest/api/2/issuetype`,
286
+ method: 'GET',
287
+ })
288
+ .then((types) => setIssueTypes(types));
289
+ }, [requestJiraSvc]);
290
+
291
+ return (
292
+ <div>
293
+ {issueTypes.map((it) => (
294
+ <div key={it.id}>
295
+ {it.id}: {it.description}
296
+ </div>
297
+ ))}
298
+ </div>
299
+ );
300
+ }
301
+
302
+ interface IssueTypeDetails {
303
+ avatarId: number;
304
+ description: string;
305
+ hierarchyLevel: number;
306
+ iconUrl: string;
307
+ id: string;
308
+ name: string;
309
+ self: string;
310
+ subtask: boolean;
311
+ }
312
+ ```
313
+
314
+ #### <span id="workspace-id"></span>Accessing JSM Assets APIs that require a workspace ID
315
+
316
+ The JSM Assets APIs require a workspace ID in addition to the cloud ID of the site.
317
+ The library can handle the details of getting the workspace ID for you and will then provide
318
+ that to your components. You can access the workspaceId using the useWorkspaceId hook.
319
+ OAuth configuration is required for standalone mode, see [Setup OAuth for invoking Atlassian APIs](#setup-oauth-for-invoking-atlassian-apis).
320
+
321
+ ##### Turn on workspace checking
322
+
323
+ ```tsx
324
+ <AtlassianApp
325
+ appName="hello"
326
+ doCheckWorkspace={true} // Needed for querying JSM Assets
327
+ ```
328
+
329
+ ##### Example component with useWorkspaceId
330
+
331
+ This example also demonstrates use of the useLoadDataEffect hook and the PageLoadingView component.
332
+ These help implement the common pattern of loading data on first component render.
333
+
334
+ ```tsx
335
+ import { useCallback } from 'react';
336
+ import { PageLoadingView, useLoadDataEffect, useRequestJira, useWorkspaceId } from '@valiantys/atlassian-app-frontend';
337
+
338
+ interface AssetSchema {
339
+ name: string;
340
+ id: string;
341
+ }
342
+
343
+ export function ListAssets() {
344
+ const requestJiraSvc = useRequestJira();
345
+ const workspaceId = useWorkspaceId();
346
+
347
+ const listAssetsSchemas = useCallback(async () => {
348
+ if (requestJiraSvc && workspaceId) {
349
+ const paginatedResult = await requestJiraSvc.fetch<{
350
+ values: AssetSchema[];
351
+ }>({
352
+ url: requestJiraSvc.route`/jsm/assets/workspace/${workspaceId}/v1/objectschema/list`,
353
+ method: 'GET',
354
+ });
355
+ return paginatedResult.values;
356
+ }
357
+ return [];
358
+ }, [requestJiraSvc, workspaceId]);
359
+
360
+ const { data, loading, error } = useLoadDataEffect<AssetSchema[]>(listAssetsSchemas);
361
+ return loading || error ? <PageLoadingView label="" loadingError={error} /> : <div>{data?.map((schema) => <div key={schema.id}>{schema.name}</div>)}</div>;
362
+ }
363
+ ```
364
+
365
+ #### Accessing the View Context with useViewContext hook
366
+
367
+ The useViewContext hook gives access to the Atlassian view context, which provides information
368
+ about the module itself and the Atlassian page in which it is loaded. When running in standalone mode,
369
+ you may configure the context with hard-coded values for testing.
370
+
371
+ ##### Example
372
+
373
+ In this example, the standaloneConfig contains issue and project data for a module that
374
+ would normally be loaded in the context of a Jira issue.
375
+
376
+ ###### App.tsx
377
+
378
+ ```tsx
379
+ <AtlassianApp
380
+ standaloneConfig={{
381
+ initialMockViewContext: {
382
+ extension: {
383
+ issue: {
384
+ key: 'BST-18',
385
+ id: 'BST-18',
386
+ type: 'Submit a request or incident',
387
+ typeId: '10013',
388
+ },
389
+ project: {
390
+ id: '10002',
391
+ key: 'FMSR',
392
+ type: 'service_desk',
393
+ },
394
+ type: 'jira:issueContext',
395
+ },
396
+ },
397
+ ```
398
+
399
+ ###### Accessing the View Context from a component
400
+
401
+ ```tsx
402
+ import { useViewContext } from '@valiantys/atlassian-app-frontend';
403
+ import { useEffect, useState } from 'react';
404
+
405
+ export function ViewContextExample() {
406
+ const viewContext = useViewContext();
407
+ const [contextData, setContextData] = useState<string | undefined>();
408
+
409
+ useEffect(() => {
410
+ if (viewContext) {
411
+ viewContext.getContext().then((fullContext) => setContextData(JSON.stringify(fullContext)));
412
+ }
413
+ }, [viewContext]);
414
+
415
+ return <div>{contextData}</div>;
416
+ }
417
+ ```
418
+
419
+ #### <span id="host-router"></span>Host Router (@forge/bridge router)
420
+
421
+ The router provides methods for opening a new window, navigating the host application window to a new location,
422
+ and for reloading the host window (https://developer.atlassian.com/platform/forge/custom-ui-bridge/router/).
423
+ In standalone mode, the host window is your app window. When deployed, the host window would be whatever Atlassian
424
+ product window the module is running in.
425
+
426
+ ```tsx
427
+ import { useHostRouter } from '@valiantys/atlassian-app-frontend';
428
+ import Button from '@atlaskit/button/new';
429
+ export function HostRouterExample() {
430
+ const hostRouter = useHostRouter();
431
+
432
+ return (
433
+ <div>
434
+ <Button onClick={() => void hostRouter.open('http://example.com/')}>Navigate</Button>
435
+ </div>
436
+ );
437
+ }
438
+ ```
439
+
440
+ #### <span id="modals"></span>Modals (@forge/bridge Modal)
441
+
442
+ The forge bride API provides the ability to open modal windows within your module (https://developer.atlassian.com/platform/forge/custom-ui-bridge/modal/).
443
+ In standalone mode, your modal will simply be opened in a new browser window.
444
+ A current limitation of standalone mode is that the modal will not receive data from the opening module, this
445
+ must be instead hard-coded into the standalone config on the modal application.
446
+
447
+ ##### Example Modal Opener
448
+
449
+ The App.tsx config must contain the URL of the modal app that is also running locally.
450
+ If the app opens multiple modal resources, you may provide a mapping of resource name to URL.
451
+
452
+ ```tsx
453
+ <AtlassianApp
454
+ appName="hello"
455
+ standaloneConfig={{
456
+ modalOpenerConfig: { defaultUrl: 'http://localhost:4201/' },
457
+ }}
458
+ ```
459
+
460
+ Component that opens a modal resource.
461
+
462
+ ```tsx
463
+ import Button from '@atlaskit/button/new';
464
+ import Textfield from '@atlaskit/textfield';
465
+
466
+ import { useModalService } from '@valiantys/atlassian-app-frontend';
467
+ import { useCallback, useState } from 'react';
468
+
469
+ export function OpenModalExample() {
470
+ const [isOpen, setIsOpen] = useState<boolean>(false);
471
+ const [text, setText] = useState<string>('Hello');
472
+
473
+ const modalService = useModalService();
474
+
475
+ const openModal = useCallback(() => {
476
+ if (!isOpen) {
477
+ setIsOpen(true);
478
+ void modalService.open({
479
+ resource: 'hello-world-modal', // must be the key of a resource defined in manifest.yml
480
+ onClose: () => {
481
+ setIsOpen(false);
482
+ },
483
+ /*
484
+ small - w: 400px h: 20vh minHeight: 320px
485
+ medium - w: 600px h: 40vh minHeight: 520px
486
+ large - w: 800px h: 70vh minHeight: 720px
487
+ xlarge - w: 968px h: 90vh
488
+ max - w: 100% h: 100%
489
+ */
490
+ size: 'large',
491
+ context: {
492
+ text,
493
+ },
494
+ closeOnEscape: true,
495
+ closeOnOverlayClick: true,
496
+ });
497
+ }
498
+ }, [modalService, isOpen, text]);
499
+
500
+ return (
501
+ <div>
502
+ <Textfield value={text} onChange={(e) => setText((e.target as HTMLInputElement).value)}></Textfield>
503
+ <Button onClick={openModal}>Open Modal</Button>
504
+ </div>
505
+ );
506
+ }
507
+ ```
508
+
509
+ ##### Example Modal Content Application
510
+
511
+ ###### App.tsx
512
+
513
+ ```tsx
514
+ import { AtlassianApp, ModalContent } from '@valiantys/atlassian-app-frontend';
515
+ import { Hello } from './hello';
516
+
517
+ function App() {
518
+ return (
519
+ <AtlassianApp
520
+ appName="hello-modal"
521
+ standaloneConfig={{
522
+ modalContextConfig: { openerOrigin: 'http://localhost:4200' },
523
+ initialMockViewContext: {
524
+ extension: {
525
+ // This is a hard-coded version of the data that will be passed
526
+ // from the opening app when running in an Atlassian environment.
527
+ modal: {
528
+ text: 'Hello Bob',
529
+ },
530
+ },
531
+ },
532
+ }}
533
+ embeddedConfig={{}}
534
+ >
535
+ {/* ModalContent component provides modal-related services, see Hello component for example usage. */}
536
+ <ModalContent>
537
+ <Hello></Hello>
538
+ </ModalContent>
539
+ </AtlassianApp>
540
+ );
541
+ }
542
+
543
+ export default App;
544
+ ```
545
+
546
+ ###### Content Component
547
+
548
+ ```tsx
549
+ import Button from '@atlaskit/button/new';
550
+ import { useModalContentService } from '@valiantys/atlassian-app-frontend';
551
+
552
+ export function Hello() {
553
+ const { modalContextData, close } = useModalContentService<{
554
+ text: string;
555
+ }>();
556
+
557
+ return (
558
+ <div>
559
+ <div>{modalContextData?.text}</div>
560
+ <Button onClick={close}>Close Modal</Button>
561
+ </div>
562
+ );
563
+ }
564
+ ```
565
+
566
+ #### <span id="invoke-remote"></span>Invoking remote calls from the client (@forge/bridge invokeRemote)
567
+
568
+ Instead of invoking call on the Forge backend, an app may invoke calls on a remote backend that is
569
+ configured in the app's manifest file.
570
+
571
+ App config
572
+
573
+ ```tsx
574
+ <AtlassianApp
575
+ appName="hello-remote"
576
+ standaloneConfig={{
577
+ remoteUrl: 'https://jsonplaceholder.typicode.com/', // For invokeRemote from client (useRemoteAdapter)
578
+ }}
579
+ ```
580
+
581
+ Component
582
+
583
+ ```tsx
584
+ /**
585
+ * manifest.yml must contain this configuration to enable the remote invocation:
586
+ *
587
+ * remotes:
588
+ * - key: example-remote
589
+ * baseUrl: https://jsonplaceholder.typicode.com
590
+ * permissions:
591
+ * external:
592
+ * fetch:
593
+ * client:
594
+ * - remote: example-remote
595
+ */
596
+
597
+ import { useRemoteAdapter } from '@valiantys/atlassian-app-frontend';
598
+ import { useEffect, useState } from 'react';
599
+
600
+ interface Todo {
601
+ completed: boolean;
602
+ id: number;
603
+ title: string;
604
+ userId: number;
605
+ }
606
+
607
+ export function InvokeRemoteExample() {
608
+ const remoteSvc = useRemoteAdapter();
609
+ const [todo, setTodo] = useState<Todo | undefined>(undefined);
610
+
611
+ useEffect(() => {
612
+ remoteSvc
613
+ .invokeRemote<Todo, void>({
614
+ path: '/todos/1',
615
+ method: 'GET',
616
+ headers: { accept: 'application/json' },
617
+ })
618
+ .then((response) => setTodo(response.body))
619
+ .catch((error) => console.error('remote error', error));
620
+ }, [remoteSvc]);
621
+
622
+ return <div>Todo: {todo?.title}</div>;
623
+ }
624
+ ```
625
+
626
+ ### Unit testing
627
+
628
+ #### Add react and jest testing support
629
+
630
+ ```shell
631
+ cd static/my-module-name
632
+ npm i -D jest ts-jest @types/jest @testing-library/react @testing-library/jest-dom @testing-library/user-event jest-fixed-jsdom identity-obj-proxy
633
+ npx ts-jest config:init
634
+ ```
635
+
636
+ #### Configure Jest
637
+
638
+ Make changes to static/my-module-name/jest.config.js:
639
+
640
+ - Change testEnvironment to "jest-fixed-jsdom"
641
+ - Add tsConfig path to transform
642
+ - Add moduleNameMapper to prevent errors with Jest trying to interpret compiled css files
643
+
644
+ ```js
645
+ export default {
646
+ testEnvironment: 'jest-fixed-jsdom', // https://github.com/mswjs/jest-fixed-jsdom
647
+ transform: {
648
+ '^.+.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.app.json' }],
649
+ },
650
+ moduleNameMapper: {
651
+ '\\.(css|scss)$': 'identity-obj-proxy',
652
+ },
653
+ };
654
+ ```
655
+
656
+ #### <span id="testing-example"></span>Example
657
+
658
+ ##### Component
659
+
660
+ ```tsx
661
+ import { useEffect, useState } from 'react';
662
+ import { useBackendAdapter } from '@valiantys/atlassian-app-frontend';
663
+
664
+ export function Hello() {
665
+ const [text, setText] = useState<string>('');
666
+ const { invoke } = useBackendAdapter();
667
+
668
+ useEffect(() => {
669
+ invoke<{ text: string }>('getText').then((t) => setText(t.text));
670
+ }, [invoke]);
671
+
672
+ return <div>{text}</div>;
673
+ }
674
+ ```
675
+
676
+ ##### Test
677
+
678
+ ```tsx
679
+ import { act, render, screen } from '@testing-library/react';
680
+
681
+ import { AtlassianAppTest, AtlassianAppTestProps, defaultProps } from '@valiantys/atlassian-app-frontend';
682
+
683
+ import { Hello } from './hello';
684
+
685
+ describe('HelloWorld', () => {
686
+ it('should render successfully', async () => {
687
+ await act(async () => {
688
+ // Setup mocks
689
+ const mockInvoke = jest.fn();
690
+ mockInvoke.mockReturnValue(Promise.resolve({ text: 'Hello World' }));
691
+ const appProps: AtlassianAppTestProps = {
692
+ ...defaultProps(jest.fn),
693
+ invoke: mockInvoke,
694
+ };
695
+
696
+ // Render the component (which calls invoke on first render)
697
+ render(
698
+ <AtlassianAppTest {...appProps}>
699
+ <Hello></Hello>
700
+ </AtlassianAppTest>
701
+ );
702
+ });
703
+
704
+ // Throws error if text is not found within timeout period
705
+ await screen.findByText('Hello World');
706
+ });
707
+ });
708
+ ```
709
+
710
+ #### References
711
+
712
+ - https://testing-library.com/docs/react-testing-library/example-intro
713
+ - https://testing-library.com/docs/queries/about/
714
+
715
+ ### Example Application
716
+
717
+ You will find an examples directory under node_modules/@valiantys/atlassian-app-frontend/examples,
718
+ containing all the examples shown in this README along with more supporting files. The repo for the full
719
+ example application is also available at https://bitbucket.org/oasisdigital/atlassian-app-examples.
720
+
721
+ If you would like to clone a template repo to get started more quickly, you can find one at https://bitbucket.org/oasisdigital/atlassian-app-template.
722
+
723
+ ### Support
724
+
725
+ Our issue-tracking board is viewable at https://trello.com/b/aRmPXQjq/atlassian-app-frontend-backend-npm-package-issue-tracker.
726
+ To file an issue you may send it in an email to [zacharykipping+wzolmxklz7ysfqky4alz@boards.trello.com](mailto:zacharykipping+wzolmxklz7ysfqky4alz@boards.trello.com).
727
+
728
+ You may also contact us with questions at [forge@valiantys.com](mailto:forge@valiantys.com).