• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tylernathanreed / jira-client-php / 13634794100

03 Mar 2025 03:19PM UTC coverage: 2.067% (-0.1%) from 2.21%
13634794100

push

github

web-flow
~ Try coveralls action

140 of 6773 relevant lines covered (2.07%)

0.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Operations/JQLFunctionsApps.php
1
<?php
2

3
namespace Jira\Client\Operations;
4

5
use Jira\Client\Client;
6
use Jira\Client\Schema;
7

8
/** @phpstan-require-extends Client */
9
trait JQLFunctionsApps
10
{
11
    /**
12
     * Returns the list of a function's precomputations along with information about when they were created, updated, and last used.
13
     * Each precomputation has a `value` \- the JQL fragment to replace the custom function clause with
14
     * 
15
     * **"Permissions" required:** This API is only accessible to apps and apps can only inspect their own functions
16
     * 
17
     * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app.
18
     * However, we recommend adding it to your app's scope list because we will eventually make it mandatory.
19
     * 
20
     * @param ?list<string> $functionKey The function key in format:
21
     *                                    - Forge: `ari:cloud:ecosystem::extension/[App ID]/[Environment ID]/static/[Function key from manifest]`
22
     *                                    - Connect: `[App key]__[Module key]`
23
     * @param int $startAt The index of the first item to return in a page of results (page offset).
24
     * @param int $maxResults The maximum number of items to return per page.
25
     * @param string $orderBy "Order" the results by a field:
26
     *                         - `functionKey` Sorts by the functionKey
27
     *                         - `used` Sorts by the used timestamp
28
     *                         - `created` Sorts by the created timestamp
29
     *                         - `updated` Sorts by the updated timestamp.
30
     */
31
    public function getPrecomputations(
×
32
        ?array $functionKey = null,
33
        ?int $startAt = 0,
34
        ?int $maxResults = 100,
35
        ?string $orderBy = null,
36
    ): Schema\PageBean2JqlFunctionPrecomputationBean {
37
        return $this->call(
×
38
            uri: '/rest/api/3/jql/function/computation',
×
39
            method: 'get',
×
40
            query: compact('functionKey', 'startAt', 'maxResults', 'orderBy'),
×
41
            success: 200,
×
42
            schema: Schema\PageBean2JqlFunctionPrecomputationBean::class,
×
43
        );
×
44
    }
45

46
    /**
47
     * Update the precomputation value of a function created by a Forge/Connect app
48
     * 
49
     * **"Permissions" required:** An API for apps to update their own precomputations
50
     * 
51
     * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app.
52
     * However, we recommend adding it to your app's scope list because we will eventually make it mandatory.
53
     * 
54
     * @param bool $skipNotFoundPrecomputations 
55
     */
56
    public function updatePrecomputations(
×
57
        Schema\JqlFunctionPrecomputationUpdateRequestBean $request,
58
        ?bool $skipNotFoundPrecomputations = false,
59
    ): Schema\JqlFunctionPrecomputationUpdateResponse {
60
        return $this->call(
×
61
            uri: '/rest/api/3/jql/function/computation',
×
62
            method: 'post',
×
63
            body: $request,
×
64
            query: compact('skipNotFoundPrecomputations'),
×
65
            success: 200,
×
66
            schema: Schema\JqlFunctionPrecomputationUpdateResponse::class,
×
67
        );
×
68
    }
69

70
    /**
71
     * Returns function precomputations by IDs, along with information about when they were created, updated, and last used.
72
     * Each precomputation has a `value` \- the JQL fragment to replace the custom function clause with
73
     * 
74
     * **"Permissions" required:** This API is only accessible to apps and apps can only inspect their own functions
75
     * 
76
     * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app.
77
     * However, we recommend adding it to your app's scope list because we will eventually make it mandatory.
78
     * 
79
     * @param string $orderBy "Order" the results by a field:
80
     *                         - `functionKey` Sorts by the functionKey
81
     *                         - `used` Sorts by the used timestamp
82
     *                         - `created` Sorts by the created timestamp
83
     *                         - `updated` Sorts by the updated timestamp.
84
     */
85
    public function getPrecomputationsByID(
×
86
        Schema\JqlFunctionPrecomputationGetByIdRequest $request,
87
        ?string $orderBy = null,
88
    ): Schema\JqlFunctionPrecomputationGetByIdResponse {
89
        return $this->call(
×
90
            uri: '/rest/api/3/jql/function/computation/search',
×
91
            method: 'post',
×
92
            body: $request,
×
93
            query: compact('orderBy'),
×
94
            success: 200,
×
95
            schema: Schema\JqlFunctionPrecomputationGetByIdResponse::class,
×
96
        );
×
97
    }
98
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc