@credal/actions 0.2.217 → 0.2.218
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.
- package/dist/actions/autogen/templates.js +39 -27
- package/dist/actions/autogen/types.d.ts +21 -12
- package/dist/actions/autogen/types.js +39 -27
- package/dist/actions/providers/jira/getJiraDCIssuesByQuery.d.ts +2 -3
- package/dist/actions/providers/jira/getJiraDCIssuesByQuery.js +11 -9
- package/dist/actions/providers/jira/getJiraIssuesByQuery.js +31 -57
- package/package.json +1 -1
|
@@ -2018,13 +2018,25 @@ export const jiraGetJiraIssuesByQueryDefinition = {
|
|
|
2018
2018
|
},
|
|
2019
2019
|
limit: {
|
|
2020
2020
|
type: "number",
|
|
2021
|
-
description: "The maximum number of records to retrieve
|
|
2021
|
+
description: "The maximum number of records to retrieve per call (page size). Defaults to 100.",
|
|
2022
|
+
},
|
|
2023
|
+
startAt: {
|
|
2024
|
+
type: "number",
|
|
2025
|
+
description: "Offset of the first result to return. Defaults to 0. To page through results: count the number of results you can actually read in the response and pass currentStartAt + countOfResultsRead as the next startAt. Do not blindly use itemsReturned to advance — the response may be truncated by the system after this action returns, meaning you may see fewer results than itemsReturned reports.",
|
|
2022
2026
|
},
|
|
2023
2027
|
},
|
|
2024
2028
|
},
|
|
2025
2029
|
output: {
|
|
2026
2030
|
type: "object",
|
|
2027
2031
|
properties: {
|
|
2032
|
+
itemsReturned: {
|
|
2033
|
+
type: "number",
|
|
2034
|
+
description: "Number of items fetched by this action. This field intentionally appears before results so it survives system-level response truncation. Warning: the system may truncate the results array before you see it, so you may receive fewer results than this number. Always count the results you can actually read and use currentStartAt + countOfResultsRead as the next startAt, not currentStartAt + itemsReturned.",
|
|
2035
|
+
},
|
|
2036
|
+
truncated: {
|
|
2037
|
+
type: "boolean",
|
|
2038
|
+
description: "True when more results exist beyond this batch. Call again with startAt set to currentStartAt + countOfResultsRead (the number of results you actually received in this response).",
|
|
2039
|
+
},
|
|
2028
2040
|
results: {
|
|
2029
2041
|
type: "array",
|
|
2030
2042
|
description: "The results of the Jira issues",
|
|
@@ -2194,14 +2206,6 @@ export const jiraGetJiraIssuesByQueryDefinition = {
|
|
|
2194
2206
|
},
|
|
2195
2207
|
},
|
|
2196
2208
|
},
|
|
2197
|
-
total: {
|
|
2198
|
-
type: "number",
|
|
2199
|
-
description: "The total number of Jira issues matching the query. When present and greater than the number of results returned, re-run with a higher limit to retrieve all issues.",
|
|
2200
|
-
},
|
|
2201
|
-
truncated: {
|
|
2202
|
-
type: "boolean",
|
|
2203
|
-
description: "True when the result set was cut off at the requested limit and more issues exist. Re-run with a higher limit to retrieve all issues.",
|
|
2204
|
-
},
|
|
2205
2209
|
error: {
|
|
2206
2210
|
type: "string",
|
|
2207
2211
|
description: "The error that occurred if the records were not successfully retrieved",
|
|
@@ -2882,13 +2886,25 @@ export const jiraOrgGetJiraIssuesByQueryDefinition = {
|
|
|
2882
2886
|
},
|
|
2883
2887
|
limit: {
|
|
2884
2888
|
type: "number",
|
|
2885
|
-
description: "The maximum number of records to retrieve
|
|
2889
|
+
description: "The maximum number of records to retrieve per call (page size). Defaults to 100.",
|
|
2890
|
+
},
|
|
2891
|
+
startAt: {
|
|
2892
|
+
type: "number",
|
|
2893
|
+
description: "Offset of the first result to return. Defaults to 0. To page through results: count the number of results you can actually read in the response and pass currentStartAt + countOfResultsRead as the next startAt. Do not blindly use itemsReturned to advance — the response may be truncated by the system after this action returns, meaning you may see fewer results than itemsReturned reports.",
|
|
2886
2894
|
},
|
|
2887
2895
|
},
|
|
2888
2896
|
},
|
|
2889
2897
|
output: {
|
|
2890
2898
|
type: "object",
|
|
2891
2899
|
properties: {
|
|
2900
|
+
itemsReturned: {
|
|
2901
|
+
type: "number",
|
|
2902
|
+
description: "Number of items fetched by this action. This field intentionally appears before results so it survives system-level response truncation. Warning: the system may truncate the results array before you see it, so you may receive fewer results than this number. Always count the results you can actually read and use currentStartAt + countOfResultsRead as the next startAt, not currentStartAt + itemsReturned.",
|
|
2903
|
+
},
|
|
2904
|
+
truncated: {
|
|
2905
|
+
type: "boolean",
|
|
2906
|
+
description: "True when more results exist beyond this batch. Call again with startAt set to currentStartAt + countOfResultsRead (the number of results you actually received in this response).",
|
|
2907
|
+
},
|
|
2892
2908
|
results: {
|
|
2893
2909
|
type: "array",
|
|
2894
2910
|
description: "The results of the Jira issues",
|
|
@@ -3058,14 +3074,6 @@ export const jiraOrgGetJiraIssuesByQueryDefinition = {
|
|
|
3058
3074
|
},
|
|
3059
3075
|
},
|
|
3060
3076
|
},
|
|
3061
|
-
total: {
|
|
3062
|
-
type: "number",
|
|
3063
|
-
description: "The total number of Jira issues matching the query. When present and greater than the number of results returned, re-run with a higher limit to retrieve all issues.",
|
|
3064
|
-
},
|
|
3065
|
-
truncated: {
|
|
3066
|
-
type: "boolean",
|
|
3067
|
-
description: "True when the result set was cut off at the requested limit and more issues exist. Re-run with a higher limit to retrieve all issues.",
|
|
3068
|
-
},
|
|
3069
3077
|
error: {
|
|
3070
3078
|
type: "string",
|
|
3071
3079
|
description: "The error that occurred if the records were not successfully retrieved",
|
|
@@ -3746,13 +3754,25 @@ export const jiraDataCenterGetJiraIssuesByQueryDefinition = {
|
|
|
3746
3754
|
},
|
|
3747
3755
|
limit: {
|
|
3748
3756
|
type: "number",
|
|
3749
|
-
description: "The maximum number of records to retrieve
|
|
3757
|
+
description: "The maximum number of records to retrieve per call (page size). Defaults to 100.",
|
|
3758
|
+
},
|
|
3759
|
+
startAt: {
|
|
3760
|
+
type: "number",
|
|
3761
|
+
description: "Offset of the first result to return. Defaults to 0. To page through results: count the number of results you can actually read in the response and pass currentStartAt + countOfResultsRead as the next startAt. Do not blindly use itemsReturned to advance — the response may be truncated by the system after this action returns, meaning you may see fewer results than itemsReturned reports.",
|
|
3750
3762
|
},
|
|
3751
3763
|
},
|
|
3752
3764
|
},
|
|
3753
3765
|
output: {
|
|
3754
3766
|
type: "object",
|
|
3755
3767
|
properties: {
|
|
3768
|
+
itemsReturned: {
|
|
3769
|
+
type: "number",
|
|
3770
|
+
description: "Number of items fetched by this action. This field intentionally appears before results so it survives system-level response truncation. Warning: the system may truncate the results array before you see it, so you may receive fewer results than this number. Always count the results you can actually read and use currentStartAt + countOfResultsRead as the next startAt, not currentStartAt + itemsReturned.",
|
|
3771
|
+
},
|
|
3772
|
+
truncated: {
|
|
3773
|
+
type: "boolean",
|
|
3774
|
+
description: "True when more results exist beyond this batch. Call again with startAt set to currentStartAt + countOfResultsRead (the number of results you actually received in this response).",
|
|
3775
|
+
},
|
|
3756
3776
|
results: {
|
|
3757
3777
|
type: "array",
|
|
3758
3778
|
description: "The results of the Jira issues",
|
|
@@ -3922,14 +3942,6 @@ export const jiraDataCenterGetJiraIssuesByQueryDefinition = {
|
|
|
3922
3942
|
},
|
|
3923
3943
|
},
|
|
3924
3944
|
},
|
|
3925
|
-
total: {
|
|
3926
|
-
type: "number",
|
|
3927
|
-
description: "The total number of Jira issues matching the query. When present and greater than the number of results returned, re-run with a higher limit to retrieve all issues.",
|
|
3928
|
-
},
|
|
3929
|
-
truncated: {
|
|
3930
|
-
type: "boolean",
|
|
3931
|
-
description: "True when the result set was cut off at the requested limit and more issues exist. Re-run with a higher limit to retrieve all issues.",
|
|
3932
|
-
},
|
|
3933
3945
|
error: {
|
|
3934
3946
|
type: "string",
|
|
3935
3947
|
description: "The error that occurred if the records were not successfully retrieved",
|
|
@@ -2029,15 +2029,20 @@ export type jiraUpdateJiraTicketStatusFunction = ActionFunction<jiraUpdateJiraTi
|
|
|
2029
2029
|
export declare const jiraGetJiraIssuesByQueryParamsSchema: z.ZodObject<{
|
|
2030
2030
|
query: z.ZodString;
|
|
2031
2031
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
2032
|
+
startAt: z.ZodOptional<z.ZodNumber>;
|
|
2032
2033
|
}, "strip", z.ZodTypeAny, {
|
|
2033
2034
|
query: string;
|
|
2034
2035
|
limit?: number | undefined;
|
|
2036
|
+
startAt?: number | undefined;
|
|
2035
2037
|
}, {
|
|
2036
2038
|
query: string;
|
|
2037
2039
|
limit?: number | undefined;
|
|
2040
|
+
startAt?: number | undefined;
|
|
2038
2041
|
}>;
|
|
2039
2042
|
export type jiraGetJiraIssuesByQueryParamsType = z.infer<typeof jiraGetJiraIssuesByQueryParamsSchema>;
|
|
2040
2043
|
export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
2044
|
+
itemsReturned: z.ZodOptional<z.ZodNumber>;
|
|
2045
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
2041
2046
|
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2042
2047
|
name: z.ZodString;
|
|
2043
2048
|
url: z.ZodString;
|
|
@@ -2292,8 +2297,6 @@ export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
2292
2297
|
resolution?: string | null | undefined;
|
|
2293
2298
|
};
|
|
2294
2299
|
}>, "many">>;
|
|
2295
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
2296
|
-
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
2297
2300
|
error: z.ZodOptional<z.ZodString>;
|
|
2298
2301
|
}, "strip", z.ZodTypeAny, {
|
|
2299
2302
|
error?: string | undefined;
|
|
@@ -2341,7 +2344,7 @@ export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
2341
2344
|
resolution?: string | null | undefined;
|
|
2342
2345
|
};
|
|
2343
2346
|
}[] | undefined;
|
|
2344
|
-
|
|
2347
|
+
itemsReturned?: number | undefined;
|
|
2345
2348
|
truncated?: boolean | undefined;
|
|
2346
2349
|
}, {
|
|
2347
2350
|
error?: string | undefined;
|
|
@@ -2389,7 +2392,7 @@ export declare const jiraGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
2389
2392
|
resolution?: string | null | undefined;
|
|
2390
2393
|
};
|
|
2391
2394
|
}[] | undefined;
|
|
2392
|
-
|
|
2395
|
+
itemsReturned?: number | undefined;
|
|
2393
2396
|
truncated?: boolean | undefined;
|
|
2394
2397
|
}>;
|
|
2395
2398
|
export type jiraGetJiraIssuesByQueryOutputType = z.infer<typeof jiraGetJiraIssuesByQueryOutputSchema>;
|
|
@@ -2844,15 +2847,20 @@ export type jiraOrgUpdateJiraTicketStatusFunction = ActionFunction<jiraOrgUpdate
|
|
|
2844
2847
|
export declare const jiraOrgGetJiraIssuesByQueryParamsSchema: z.ZodObject<{
|
|
2845
2848
|
query: z.ZodString;
|
|
2846
2849
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
2850
|
+
startAt: z.ZodOptional<z.ZodNumber>;
|
|
2847
2851
|
}, "strip", z.ZodTypeAny, {
|
|
2848
2852
|
query: string;
|
|
2849
2853
|
limit?: number | undefined;
|
|
2854
|
+
startAt?: number | undefined;
|
|
2850
2855
|
}, {
|
|
2851
2856
|
query: string;
|
|
2852
2857
|
limit?: number | undefined;
|
|
2858
|
+
startAt?: number | undefined;
|
|
2853
2859
|
}>;
|
|
2854
2860
|
export type jiraOrgGetJiraIssuesByQueryParamsType = z.infer<typeof jiraOrgGetJiraIssuesByQueryParamsSchema>;
|
|
2855
2861
|
export declare const jiraOrgGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
2862
|
+
itemsReturned: z.ZodOptional<z.ZodNumber>;
|
|
2863
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
2856
2864
|
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2857
2865
|
name: z.ZodString;
|
|
2858
2866
|
url: z.ZodString;
|
|
@@ -3107,8 +3115,6 @@ export declare const jiraOrgGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
3107
3115
|
resolution?: string | null | undefined;
|
|
3108
3116
|
};
|
|
3109
3117
|
}>, "many">>;
|
|
3110
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
3111
|
-
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
3112
3118
|
error: z.ZodOptional<z.ZodString>;
|
|
3113
3119
|
}, "strip", z.ZodTypeAny, {
|
|
3114
3120
|
error?: string | undefined;
|
|
@@ -3156,7 +3162,7 @@ export declare const jiraOrgGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
3156
3162
|
resolution?: string | null | undefined;
|
|
3157
3163
|
};
|
|
3158
3164
|
}[] | undefined;
|
|
3159
|
-
|
|
3165
|
+
itemsReturned?: number | undefined;
|
|
3160
3166
|
truncated?: boolean | undefined;
|
|
3161
3167
|
}, {
|
|
3162
3168
|
error?: string | undefined;
|
|
@@ -3204,7 +3210,7 @@ export declare const jiraOrgGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
|
3204
3210
|
resolution?: string | null | undefined;
|
|
3205
3211
|
};
|
|
3206
3212
|
}[] | undefined;
|
|
3207
|
-
|
|
3213
|
+
itemsReturned?: number | undefined;
|
|
3208
3214
|
truncated?: boolean | undefined;
|
|
3209
3215
|
}>;
|
|
3210
3216
|
export type jiraOrgGetJiraIssuesByQueryOutputType = z.infer<typeof jiraOrgGetJiraIssuesByQueryOutputSchema>;
|
|
@@ -3659,15 +3665,20 @@ export type jiraDataCenterUpdateJiraTicketStatusFunction = ActionFunction<jiraDa
|
|
|
3659
3665
|
export declare const jiraDataCenterGetJiraIssuesByQueryParamsSchema: z.ZodObject<{
|
|
3660
3666
|
query: z.ZodString;
|
|
3661
3667
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
3668
|
+
startAt: z.ZodOptional<z.ZodNumber>;
|
|
3662
3669
|
}, "strip", z.ZodTypeAny, {
|
|
3663
3670
|
query: string;
|
|
3664
3671
|
limit?: number | undefined;
|
|
3672
|
+
startAt?: number | undefined;
|
|
3665
3673
|
}, {
|
|
3666
3674
|
query: string;
|
|
3667
3675
|
limit?: number | undefined;
|
|
3676
|
+
startAt?: number | undefined;
|
|
3668
3677
|
}>;
|
|
3669
3678
|
export type jiraDataCenterGetJiraIssuesByQueryParamsType = z.infer<typeof jiraDataCenterGetJiraIssuesByQueryParamsSchema>;
|
|
3670
3679
|
export declare const jiraDataCenterGetJiraIssuesByQueryOutputSchema: z.ZodObject<{
|
|
3680
|
+
itemsReturned: z.ZodOptional<z.ZodNumber>;
|
|
3681
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
3671
3682
|
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3672
3683
|
name: z.ZodString;
|
|
3673
3684
|
url: z.ZodString;
|
|
@@ -3922,8 +3933,6 @@ export declare const jiraDataCenterGetJiraIssuesByQueryOutputSchema: z.ZodObject
|
|
|
3922
3933
|
resolution?: string | null | undefined;
|
|
3923
3934
|
};
|
|
3924
3935
|
}>, "many">>;
|
|
3925
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
3926
|
-
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
3927
3936
|
error: z.ZodOptional<z.ZodString>;
|
|
3928
3937
|
}, "strip", z.ZodTypeAny, {
|
|
3929
3938
|
error?: string | undefined;
|
|
@@ -3971,7 +3980,7 @@ export declare const jiraDataCenterGetJiraIssuesByQueryOutputSchema: z.ZodObject
|
|
|
3971
3980
|
resolution?: string | null | undefined;
|
|
3972
3981
|
};
|
|
3973
3982
|
}[] | undefined;
|
|
3974
|
-
|
|
3983
|
+
itemsReturned?: number | undefined;
|
|
3975
3984
|
truncated?: boolean | undefined;
|
|
3976
3985
|
}, {
|
|
3977
3986
|
error?: string | undefined;
|
|
@@ -4019,7 +4028,7 @@ export declare const jiraDataCenterGetJiraIssuesByQueryOutputSchema: z.ZodObject
|
|
|
4019
4028
|
resolution?: string | null | undefined;
|
|
4020
4029
|
};
|
|
4021
4030
|
}[] | undefined;
|
|
4022
|
-
|
|
4031
|
+
itemsReturned?: number | undefined;
|
|
4023
4032
|
truncated?: boolean | undefined;
|
|
4024
4033
|
}>;
|
|
4025
4034
|
export type jiraDataCenterGetJiraIssuesByQueryOutputType = z.infer<typeof jiraDataCenterGetJiraIssuesByQueryOutputSchema>;
|
|
@@ -823,10 +823,22 @@ export const jiraGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
823
823
|
query: z.string().describe("The JQL query to execute"),
|
|
824
824
|
limit: z.coerce
|
|
825
825
|
.number()
|
|
826
|
-
.describe("The maximum number of records to retrieve
|
|
826
|
+
.describe("The maximum number of records to retrieve per call (page size). Defaults to 100.")
|
|
827
|
+
.optional(),
|
|
828
|
+
startAt: z.coerce
|
|
829
|
+
.number()
|
|
830
|
+
.describe("Offset of the first result to return. Defaults to 0. To page through results: count the number of results you can actually read in the response and pass currentStartAt + countOfResultsRead as the next startAt. Do not blindly use itemsReturned to advance — the response may be truncated by the system after this action returns, meaning you may see fewer results than itemsReturned reports.")
|
|
827
831
|
.optional(),
|
|
828
832
|
});
|
|
829
833
|
export const jiraGetJiraIssuesByQueryOutputSchema = z.object({
|
|
834
|
+
itemsReturned: z.coerce
|
|
835
|
+
.number()
|
|
836
|
+
.describe("Number of items fetched by this action. This field intentionally appears before results so it survives system-level response truncation. Warning: the system may truncate the results array before you see it, so you may receive fewer results than this number. Always count the results you can actually read and use currentStartAt + countOfResultsRead as the next startAt, not currentStartAt + itemsReturned.")
|
|
837
|
+
.optional(),
|
|
838
|
+
truncated: z
|
|
839
|
+
.boolean()
|
|
840
|
+
.describe("True when more results exist beyond this batch. Call again with startAt set to currentStartAt + countOfResultsRead (the number of results you actually received in this response).")
|
|
841
|
+
.optional(),
|
|
830
842
|
results: z
|
|
831
843
|
.array(z.object({
|
|
832
844
|
name: z.string().describe("The name of the result"),
|
|
@@ -881,14 +893,6 @@ export const jiraGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
881
893
|
}))
|
|
882
894
|
.describe("The results of the Jira issues")
|
|
883
895
|
.optional(),
|
|
884
|
-
total: z.coerce
|
|
885
|
-
.number()
|
|
886
|
-
.describe("The total number of Jira issues matching the query. When present and greater than the number of results returned, re-run with a higher limit to retrieve all issues.")
|
|
887
|
-
.optional(),
|
|
888
|
-
truncated: z
|
|
889
|
-
.boolean()
|
|
890
|
-
.describe("True when the result set was cut off at the requested limit and more issues exist. Re-run with a higher limit to retrieve all issues.")
|
|
891
|
-
.optional(),
|
|
892
896
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
893
897
|
});
|
|
894
898
|
export const jiraLinkJiraIssuesParamsSchema = z.object({
|
|
@@ -1086,10 +1090,22 @@ export const jiraOrgGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
1086
1090
|
query: z.string().describe("The JQL query to execute"),
|
|
1087
1091
|
limit: z.coerce
|
|
1088
1092
|
.number()
|
|
1089
|
-
.describe("The maximum number of records to retrieve
|
|
1093
|
+
.describe("The maximum number of records to retrieve per call (page size). Defaults to 100.")
|
|
1094
|
+
.optional(),
|
|
1095
|
+
startAt: z.coerce
|
|
1096
|
+
.number()
|
|
1097
|
+
.describe("Offset of the first result to return. Defaults to 0. To page through results: count the number of results you can actually read in the response and pass currentStartAt + countOfResultsRead as the next startAt. Do not blindly use itemsReturned to advance — the response may be truncated by the system after this action returns, meaning you may see fewer results than itemsReturned reports.")
|
|
1090
1098
|
.optional(),
|
|
1091
1099
|
});
|
|
1092
1100
|
export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
|
|
1101
|
+
itemsReturned: z.coerce
|
|
1102
|
+
.number()
|
|
1103
|
+
.describe("Number of items fetched by this action. This field intentionally appears before results so it survives system-level response truncation. Warning: the system may truncate the results array before you see it, so you may receive fewer results than this number. Always count the results you can actually read and use currentStartAt + countOfResultsRead as the next startAt, not currentStartAt + itemsReturned.")
|
|
1104
|
+
.optional(),
|
|
1105
|
+
truncated: z
|
|
1106
|
+
.boolean()
|
|
1107
|
+
.describe("True when more results exist beyond this batch. Call again with startAt set to currentStartAt + countOfResultsRead (the number of results you actually received in this response).")
|
|
1108
|
+
.optional(),
|
|
1093
1109
|
results: z
|
|
1094
1110
|
.array(z.object({
|
|
1095
1111
|
name: z.string().describe("The name of the result"),
|
|
@@ -1144,14 +1160,6 @@ export const jiraOrgGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
1144
1160
|
}))
|
|
1145
1161
|
.describe("The results of the Jira issues")
|
|
1146
1162
|
.optional(),
|
|
1147
|
-
total: z.coerce
|
|
1148
|
-
.number()
|
|
1149
|
-
.describe("The total number of Jira issues matching the query. When present and greater than the number of results returned, re-run with a higher limit to retrieve all issues.")
|
|
1150
|
-
.optional(),
|
|
1151
|
-
truncated: z
|
|
1152
|
-
.boolean()
|
|
1153
|
-
.describe("True when the result set was cut off at the requested limit and more issues exist. Re-run with a higher limit to retrieve all issues.")
|
|
1154
|
-
.optional(),
|
|
1155
1163
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
1156
1164
|
});
|
|
1157
1165
|
export const jiraOrgLinkJiraIssuesParamsSchema = z.object({
|
|
@@ -1349,10 +1357,22 @@ export const jiraDataCenterGetJiraIssuesByQueryParamsSchema = z.object({
|
|
|
1349
1357
|
query: z.string().describe("The JQL query to execute"),
|
|
1350
1358
|
limit: z.coerce
|
|
1351
1359
|
.number()
|
|
1352
|
-
.describe("The maximum number of records to retrieve
|
|
1360
|
+
.describe("The maximum number of records to retrieve per call (page size). Defaults to 100.")
|
|
1361
|
+
.optional(),
|
|
1362
|
+
startAt: z.coerce
|
|
1363
|
+
.number()
|
|
1364
|
+
.describe("Offset of the first result to return. Defaults to 0. To page through results: count the number of results you can actually read in the response and pass currentStartAt + countOfResultsRead as the next startAt. Do not blindly use itemsReturned to advance — the response may be truncated by the system after this action returns, meaning you may see fewer results than itemsReturned reports.")
|
|
1353
1365
|
.optional(),
|
|
1354
1366
|
});
|
|
1355
1367
|
export const jiraDataCenterGetJiraIssuesByQueryOutputSchema = z.object({
|
|
1368
|
+
itemsReturned: z.coerce
|
|
1369
|
+
.number()
|
|
1370
|
+
.describe("Number of items fetched by this action. This field intentionally appears before results so it survives system-level response truncation. Warning: the system may truncate the results array before you see it, so you may receive fewer results than this number. Always count the results you can actually read and use currentStartAt + countOfResultsRead as the next startAt, not currentStartAt + itemsReturned.")
|
|
1371
|
+
.optional(),
|
|
1372
|
+
truncated: z
|
|
1373
|
+
.boolean()
|
|
1374
|
+
.describe("True when more results exist beyond this batch. Call again with startAt set to currentStartAt + countOfResultsRead (the number of results you actually received in this response).")
|
|
1375
|
+
.optional(),
|
|
1356
1376
|
results: z
|
|
1357
1377
|
.array(z.object({
|
|
1358
1378
|
name: z.string().describe("The name of the result"),
|
|
@@ -1407,14 +1427,6 @@ export const jiraDataCenterGetJiraIssuesByQueryOutputSchema = z.object({
|
|
|
1407
1427
|
}))
|
|
1408
1428
|
.describe("The results of the Jira issues")
|
|
1409
1429
|
.optional(),
|
|
1410
|
-
total: z.coerce
|
|
1411
|
-
.number()
|
|
1412
|
-
.describe("The total number of Jira issues matching the query. When present and greater than the number of results returned, re-run with a higher limit to retrieve all issues.")
|
|
1413
|
-
.optional(),
|
|
1414
|
-
truncated: z
|
|
1415
|
-
.boolean()
|
|
1416
|
-
.describe("True when the result set was cut off at the requested limit and more issues exist. Re-run with a higher limit to retrieve all issues.")
|
|
1417
|
-
.optional(),
|
|
1418
1430
|
error: z.string().describe("The error that occurred if the records were not successfully retrieved").optional(),
|
|
1419
1431
|
});
|
|
1420
1432
|
export const jiraDataCenterLinkJiraIssuesParamsSchema = z.object({
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { jiraGetJiraIssuesByQueryFunction } from "../../autogen/types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Get Jira issues from Jira Data Center using offset-based pagination (startAt).
|
|
4
|
-
* Returns `
|
|
5
|
-
*
|
|
6
|
-
* (Contrast with the Cloud implementation which returns `truncated` but not `total`.)
|
|
4
|
+
* Returns `itemsReturned` and `truncated` so agents can page through results by
|
|
5
|
+
* incrementing startAt by itemsReturned each call until truncated is false.
|
|
7
6
|
*/
|
|
8
7
|
declare const getJiraDCIssuesByQuery: jiraGetJiraIssuesByQueryFunction;
|
|
9
8
|
export default getJiraDCIssuesByQuery;
|
|
@@ -3,13 +3,12 @@ import { getJiraApiConfig, getErrorMessage, extractPlainText } from "./utils.js"
|
|
|
3
3
|
const DEFAULT_LIMIT = 100;
|
|
4
4
|
/**
|
|
5
5
|
* Get Jira issues from Jira Data Center using offset-based pagination (startAt).
|
|
6
|
-
* Returns `
|
|
7
|
-
*
|
|
8
|
-
* (Contrast with the Cloud implementation which returns `truncated` but not `total`.)
|
|
6
|
+
* Returns `itemsReturned` and `truncated` so agents can page through results by
|
|
7
|
+
* incrementing startAt by itemsReturned each call until truncated is false.
|
|
9
8
|
*/
|
|
10
9
|
const getJiraDCIssuesByQuery = async ({ params, authParams, }) => {
|
|
11
10
|
const { authToken } = authParams;
|
|
12
|
-
const { query, limit } = params;
|
|
11
|
+
const { query, limit, startAt: paramStartAt } = params;
|
|
13
12
|
const { apiUrl, browseUrl, strategy } = getJiraApiConfig(authParams);
|
|
14
13
|
if (!authToken) {
|
|
15
14
|
throw new Error("Auth token is required");
|
|
@@ -36,7 +35,7 @@ const getJiraDCIssuesByQuery = async ({ params, authParams, }) => {
|
|
|
36
35
|
const searchEndpoint = strategy.getSearchEndpoint();
|
|
37
36
|
const requestedLimit = limit ?? DEFAULT_LIMIT;
|
|
38
37
|
const allIssues = [];
|
|
39
|
-
let
|
|
38
|
+
let currentStartAt = paramStartAt ?? 0;
|
|
40
39
|
let jiraTotal = undefined;
|
|
41
40
|
try {
|
|
42
41
|
// Keep fetching pages until we have all requested issues
|
|
@@ -47,7 +46,7 @@ const getJiraDCIssuesByQuery = async ({ params, authParams, }) => {
|
|
|
47
46
|
const queryParams = new URLSearchParams();
|
|
48
47
|
queryParams.set("jql", query);
|
|
49
48
|
queryParams.set("maxResults", String(maxResults));
|
|
50
|
-
queryParams.set("startAt", String(
|
|
49
|
+
queryParams.set("startAt", String(currentStartAt));
|
|
51
50
|
queryParams.set("fields", fields.join(","));
|
|
52
51
|
const fullApiUrl = `${apiUrl}${searchEndpoint}?${queryParams.toString()}`;
|
|
53
52
|
const response = await axiosClient.get(fullApiUrl, {
|
|
@@ -59,13 +58,16 @@ const getJiraDCIssuesByQuery = async ({ params, authParams, }) => {
|
|
|
59
58
|
const { issues, total } = response.data;
|
|
60
59
|
jiraTotal = total;
|
|
61
60
|
allIssues.push(...issues);
|
|
62
|
-
if (allIssues.length >= total || issues.length === 0) {
|
|
61
|
+
if ((paramStartAt ?? 0) + allIssues.length >= total || issues.length === 0) {
|
|
63
62
|
break;
|
|
64
63
|
}
|
|
65
|
-
|
|
64
|
+
currentStartAt += issues.length;
|
|
66
65
|
}
|
|
66
|
+
const absoluteEnd = (paramStartAt ?? 0) + allIssues.length;
|
|
67
|
+
const truncated = jiraTotal !== undefined && absoluteEnd < jiraTotal;
|
|
67
68
|
return {
|
|
68
|
-
|
|
69
|
+
itemsReturned: allIssues.length,
|
|
70
|
+
truncated,
|
|
69
71
|
results: allIssues.map(issue => {
|
|
70
72
|
const { id, key, fields } = issue;
|
|
71
73
|
const { summary, description, project, issuetype, status, assignee, reporter, creator, created, updated, resolution, duedate, } = fields;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Version3Client } from "jira.js";
|
|
2
|
+
import { axiosClient } from "../../util/axiosClient.js";
|
|
2
3
|
import { getJiraApiConfig, getErrorMessage, extractPlainText, getUserInfoFromAccountId } from "./utils.js";
|
|
3
4
|
const DEFAULT_LIMIT = 100;
|
|
4
|
-
// Jira Cloud implementation using the
|
|
5
|
-
//
|
|
6
|
-
// Note: the enhanced API does not expose a total count, so `total` is never returned here.
|
|
7
|
-
// Use `jiraDataCenter` provider if you need the exact total count.
|
|
5
|
+
// Jira Cloud implementation using the legacy offset-based search API (/rest/api/3/search).
|
|
6
|
+
// Uses startAt for pagination so agents can resume from any offset even when app-layer truncation occurs.
|
|
8
7
|
const getJiraIssuesByQuery = async ({ params, authParams, }) => {
|
|
9
8
|
const { authToken, cloudId } = authParams;
|
|
10
|
-
const { query, limit } = params;
|
|
9
|
+
const { query, limit, startAt: paramStartAt } = params;
|
|
11
10
|
const { browseUrl } = getJiraApiConfig(authParams);
|
|
12
11
|
if (!authToken)
|
|
13
12
|
throw new Error("Auth token is required");
|
|
@@ -34,47 +33,36 @@ const getJiraIssuesByQuery = async ({ params, authParams, }) => {
|
|
|
34
33
|
];
|
|
35
34
|
const requestedLimit = limit ?? DEFAULT_LIMIT;
|
|
36
35
|
const allIssues = [];
|
|
37
|
-
let
|
|
38
|
-
let
|
|
36
|
+
let currentStartAt = paramStartAt ?? 0;
|
|
37
|
+
let jiraTotal = undefined;
|
|
38
|
+
// jira.js client is kept solely for getUserInfoFromAccountId (user email lookups)
|
|
39
|
+
const client = new Version3Client({
|
|
40
|
+
host: `https://api.atlassian.com/ex/jira/${cloudId}`,
|
|
41
|
+
authentication: { oauth2: { accessToken: authToken } },
|
|
42
|
+
});
|
|
39
43
|
try {
|
|
40
|
-
// Initialize jira.js client with OAuth 2.0 authentication
|
|
41
|
-
const client = new Version3Client({
|
|
42
|
-
host: `https://api.atlassian.com/ex/jira/${cloudId}`,
|
|
43
|
-
authentication: {
|
|
44
|
-
oauth2: {
|
|
45
|
-
accessToken: authToken,
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
// Keep fetching pages until we have all requested issues
|
|
50
44
|
while (allIssues.length < requestedLimit) {
|
|
51
|
-
// Calculate how many results to fetch in this request
|
|
52
45
|
const remainingIssues = requestedLimit - allIssues.length;
|
|
53
46
|
const maxResults = Math.min(remainingIssues, DEFAULT_LIMIT);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
allIssues.push(...searchResults.issues);
|
|
65
|
-
// Check if we've reached the end or have enough results
|
|
66
|
-
if (allIssues.length >= requestedLimit || !searchResults.nextPageToken || searchResults.issues.length === 0) {
|
|
67
|
-
// Truncated when we hit the limit but Jira still has more pages
|
|
68
|
-
truncated = allIssues.length >= requestedLimit && !!searchResults.nextPageToken;
|
|
47
|
+
const queryParams = new URLSearchParams();
|
|
48
|
+
queryParams.set("jql", query);
|
|
49
|
+
queryParams.set("maxResults", String(maxResults));
|
|
50
|
+
queryParams.set("startAt", String(currentStartAt));
|
|
51
|
+
queryParams.set("fields", fields.join(","));
|
|
52
|
+
const response = await axiosClient.get(`https://api.atlassian.com/ex/jira/${cloudId}/rest/api/3/search?${queryParams.toString()}`, { headers: { Authorization: `Bearer ${authToken}`, Accept: "application/json" } });
|
|
53
|
+
const { issues, total } = response.data;
|
|
54
|
+
jiraTotal = total;
|
|
55
|
+
allIssues.push(...issues);
|
|
56
|
+
if ((paramStartAt ?? 0) + allIssues.length >= total || issues.length === 0) {
|
|
69
57
|
break;
|
|
70
58
|
}
|
|
71
|
-
|
|
59
|
+
currentStartAt += issues.length;
|
|
72
60
|
}
|
|
73
|
-
|
|
61
|
+
const absoluteEnd = (paramStartAt ?? 0) + allIssues.length;
|
|
62
|
+
const truncated = jiraTotal !== undefined && absoluteEnd < jiraTotal;
|
|
74
63
|
const results = await Promise.all(allIssues.map(async ({ id, key, fields }) => {
|
|
75
64
|
const ticketUrl = `${browseUrl}/browse/${key}`;
|
|
76
65
|
const { summary, description, project, issuetype, status, assignee, reporter, creator, created, updated, resolution, duedate, } = fields;
|
|
77
|
-
// Fetch user info in parallel
|
|
78
66
|
const [assigneeInfo, reporterInfo, creatorInfo] = await Promise.all([
|
|
79
67
|
getUserInfoFromAccountId(assignee?.accountId, client),
|
|
80
68
|
getUserInfoFromAccountId(reporter?.accountId, client),
|
|
@@ -88,39 +76,25 @@ const getJiraIssuesByQuery = async ({ params, authParams, }) => {
|
|
|
88
76
|
key,
|
|
89
77
|
summary,
|
|
90
78
|
description: extractPlainText(description),
|
|
91
|
-
project: {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
name: project?.name,
|
|
95
|
-
},
|
|
96
|
-
issueType: {
|
|
97
|
-
id: issuetype?.id,
|
|
98
|
-
name: issuetype?.name,
|
|
99
|
-
},
|
|
100
|
-
status: {
|
|
101
|
-
id: status?.id,
|
|
102
|
-
name: status?.name,
|
|
103
|
-
category: status?.statusCategory?.name,
|
|
104
|
-
},
|
|
79
|
+
project: { id: project?.id, key: project?.key, name: project?.name },
|
|
80
|
+
issueType: { id: issuetype?.id, name: issuetype?.name },
|
|
81
|
+
status: { id: status?.id, name: status?.name, category: status?.statusCategory?.name },
|
|
105
82
|
assignee: assigneeInfo,
|
|
106
83
|
reporter: reporterInfo,
|
|
107
84
|
creator: creatorInfo,
|
|
108
|
-
created
|
|
109
|
-
updated
|
|
85
|
+
created,
|
|
86
|
+
updated,
|
|
110
87
|
resolution: resolution?.name,
|
|
111
88
|
dueDate: duedate,
|
|
112
89
|
url: ticketUrl,
|
|
113
90
|
},
|
|
114
91
|
};
|
|
115
92
|
}));
|
|
116
|
-
return {
|
|
93
|
+
return { itemsReturned: allIssues.length, truncated, results };
|
|
117
94
|
}
|
|
118
95
|
catch (error) {
|
|
119
96
|
console.error("Error retrieving Jira issues:", error);
|
|
120
|
-
return {
|
|
121
|
-
results: [],
|
|
122
|
-
error: getErrorMessage(error),
|
|
123
|
-
};
|
|
97
|
+
return { results: [], error: getErrorMessage(error) };
|
|
124
98
|
}
|
|
125
99
|
};
|
|
126
100
|
export default getJiraIssuesByQuery;
|