@@ -2,139 +2,161 @@ package io.toolsplus.atlassian.connect.play.api.models
22
33import io .toolsplus .atlassian .connect .play .api .models .Predefined .ClientKey
44
5+ import java .time .Instant
6+
57/** An Atlassian host in which the app is or has been installed. Hosts are
68 * stored in AtlassianHostRepository.
79 *
810 * During processing of a request from an Atlassian host, the details of the
9- * host and of the user at the browser can be obtained from the [[AtlassianHostUser ]].
11+ * host and of the user at the browser can be obtained from the
12+ * [[AtlassianHostUser ]].
1013 *
11- * @see https://developer.atlassian.com/cloud/jira/platform/connect-app-descriptor/#lifecycle-http-request-payload
14+ * @see
15+ * https://developer.atlassian.com/cloud/jira/platform/connect-app-descriptor/#lifecycle-http-request-payload
1216 */
1317trait AtlassianHost {
1418
15- /** Identifying key for the Atlassian product
16- * instance that the app was installed into.
19+ /** Identifying key for the Atlassian product instance that the app was
20+ * installed into.
1721 *
18- * @return Client key for this product instance.
22+ * @return
23+ * Client key for this product instance.
1924 */
2025 def clientKey : ClientKey
2126
22- /** App key that was installed into the
23- * Atlassian product, as it appears in your
24- * app's descriptor.
27+ /** App key that was installed into the Atlassian product, as it appears in
28+ * your app's descriptor.
2529 *
26- * @return App key for this app.
30+ * @return
31+ * App key for this app.
2732 */
2833 def key : String
2934
30- /** OAuth 2.0 client ID for the app used
31- * for OAuth 2.0 - JWT Bearer token
35+ /** OAuth 2.0 client ID for the app used for OAuth 2.0 - JWT Bearer token
3236 * authorization grant type.
3337 *
34- * @return OAuth 2.0 client id.
38+ * @return
39+ * OAuth 2.0 client id.
3540 */
3641 def oauthClientId : Option [String ]
3742
38- /**
39- * Identifier for this host's Forge installation, if the host has migrated to Connect on Forge.
43+ /** Identifier for this host's Forge installation, if the host has migrated to
44+ * Connect on Forge.
4045 *
4146 * This is also the ID that any remote storage should be keyed against.
4247 *
43- * @return Forge installation id.
48+ * @return
49+ * Forge installation id.
4450 */
4551 def installationId : Option [String ]
4652
47- /** Secret to sign outgoing JWT tokens and
48- * validate incoming JWT tokens. Only sent
49- * on the installed event.
53+ /** Secret to sign outgoing JWT tokens and validate incoming JWT tokens. Only
54+ * sent on the installed event.
5055 *
51- * @return Shared secret for this product instance.
56+ * @return
57+ * Shared secret for this product instance.
5258 */
5359 def sharedSecret : String
5460
55- /** URL prefix for this Atlassian product
56- * instance.
61+ /** URL prefix for this Atlassian product instance.
5762 *
58- * @return Base URL for this product instance.
63+ * @return
64+ * Base URL for this product instance.
5965 */
6066 def baseUrl : String
6167
62- /**
63- * If the Atlassian product instance has an associated custom domain, this is the URL through which users will
64- * access the product. Any links which an app renders server-side should use this as the prefix of the link.
65- * This ensures links are rendered in the same context as the remainder of the user's site. If a custom domain
66- * is not configured, this field will still be present but will be the same as the baseUrl.
68+ /** If the Atlassian product instance has an associated custom domain, this is
69+ * the URL through which users will access the product. Any links which an
70+ * app renders server-side should use this as the prefix of the link. This
71+ * ensures links are rendered in the same context as the remainder of the
72+ * user's site. If a custom domain is not configured, this field will still
73+ * be present but will be the same as the baseUrl.
6774 *
6875 * Note that API requests from your app should always use the baseUrl value.
6976 *
70- * @return Custom domain URL if configured, app's base URL otherwise.
77+ * @return
78+ * Custom domain URL if configured, app's base URL otherwise.
7179 */
7280 def displayUrl : String
7381
74- /**
75- * If the Atlassian product instance has an associated custom domain for Jira Service Desk functionality, this is
76- * the URL for the Jira Service Desk Help Center. Any related links which an app renders server-side should use this
77- * as the prefix of the link.
78- * This ensures links are rendered in the same context as the user's Jira Service Desk. If a custom domain is not
79- * configured, this field will still be present but will be the same as the baseUrl.
82+ /** If the Atlassian product instance has an associated custom domain for Jira
83+ * Service Desk functionality, this is the URL for the Jira Service Desk Help
84+ * Center. Any related links which an app renders server-side should use this
85+ * as the prefix of the link. This ensures links are rendered in the same
86+ * context as the user's Jira Service Desk. If a custom domain is not
87+ * configured, this field will still be present but will be the same as the
88+ * baseUrl.
8089 *
8190 * Note that API requests from your App should always use the baseUrl value.
8291 *
83- * @return Custom domain URL for Jira Service Desk if configured, app's base URL otherwise.
92+ * @return
93+ * Custom domain URL for Jira Service Desk if configured, app's base URL
94+ * otherwise.
8495 */
8596 def displayUrlServicedeskHelpCenter : String
8697
87- /** Identifies the category of Atlassian
88- * product, e.g. jira or confluence.
98+ /** Identifies the category of Atlassian product, e.g. jira or confluence.
8999 *
90- * @return Category of this product.
100+ * @return
101+ * Category of this product.
91102 */
92103 def productType : String
93104
94105 /** Host product description.
95106 *
96- * @return Description of this product.
107+ * @return
108+ * Description of this product.
97109 */
98110 def description : String
99111
100- /** Service entitlement number (SEN) is the
101- * app license id. Only included during
102- * installation of a paid app.
112+ /** Service entitlement number (SEN) is the app license id. Only included
113+ * during installation of a paid app.
103114 *
104- * @return App license id if this is a paid app.
115+ * @return
116+ * App license id if this is a paid app.
105117 */
106118 @ deprecated(" No replacement" )
107119 def serviceEntitlementNumber : Option [String ]
108120
109- /**
110- * License entitlement ID is the app license ID.
121+ /** License entitlement ID is the app license ID.
111122 *
112123 * This attribute will only be included during installation of a paid app.
113124 *
114- * @return App entitlement ID if this is a paid app.
125+ * @return
126+ * App entitlement ID if this is a paid app.
115127 */
116128 def entitlementId : Option [String ]
117129
118- /**
119- * License entitlement number is the app license number.
130+ /** License entitlement number is the app license number.
120131 *
121132 * This attribute will only be included during installation of a paid app.
122133 *
123- * @return App entitlement number if this is a paid app.
134+ * @return
135+ * App entitlement number if this is a paid app.
124136 */
125137 def entitlementNumber : Option [String ]
126138
127- /** Indicates if the app is currently
128- * installed on the host. Upon uninstallation,
129- * the value of this flag will be set to false.
139+ /** Indicates if the app is currently installed on the host. Upon
140+ * uninstallation, the value of this flag will be set to false.
130141 *
131- * @return Installation status for this app.
142+ * @return
143+ * Installation status for this app.
132144 */
133145 def installed : Boolean
134146
135- /** Uninstalls this host by setting the installed field to false.
147+ /** Time to live for this host record.
148+ *
149+ * This allows marking a host record for deletion in the future.
150+ *
151+ * @return
152+ * Point in time when this host record should be deleted.
153+ */
154+ def ttl : Option [Instant ]
155+
156+ /** Uninstalls this host by setting the installed field to false and optionally set a TTL.
136157 *
137- * @return A new version of this host with the installed field set to false.
158+ * @return
159+ * A new version of this host with the installed field set to false.
138160 */
139- def uninstalled : AtlassianHost
161+ def uninstalled ( ttl : Option [ Instant ]) : AtlassianHost
140162}
0 commit comments