leash-integration-jira 0.1.0

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 (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/leash/integration/jira.rb +107 -0
  3. metadata +57 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7c587b926369efa5610707140275e68155d56c1e66e1df6b0f32ed96af390961
4
+ data.tar.gz: 525b7baaeaca6a0778c43756b0c46ef6f71e672f678df4e885fc1e489916f794
5
+ SHA512:
6
+ metadata.gz: 828e59ff1d8da1b16770db507fcafee4eb8045f198dbdfad83100af0d451e0a2744793a4c54523ec18f8099568c24071e434bdab2b45b436274ba6074a3cac4e
7
+ data.tar.gz: e90a139c3fbf431f26180ed2e56a511e77adafc52562f53b83eab1fa9d996546e2ba029a7f8015f5fc00bf6c7f14d6c2916907fb1d55979291e2794818e029d1
@@ -0,0 +1,107 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Auto-generated by leash-codegen — do not edit manually
4
+
5
+ module Leash
6
+ module Integration
7
+ class JiraClient
8
+ # Create a new Jira integration client.
9
+ #
10
+ # @param leash [Leash::Client] the Leash SDK client
11
+ def initialize(leash)
12
+ @leash = leash
13
+ end
14
+
15
+ # Read any Jira data. Returns TOON format by default (30-60% fewer tokens than JSON). **IMPORTANT - Cost Optimization:** - ALWAYS use `jq` param to filter response fields. Unfiltered responses are ve...
16
+ #
17
+ # @param path [String] The Jira API endpoint path (without base URL). Must start with "/". Examples: "/rest/api/3/project", "/rest/api/3/search/jql", "/rest/api/3/issue/{issueIdOrKey}"
18
+ # @param queryparams [Hash, nil] Optional query parameters as key-value pairs. Examples: {"maxResults": "50", "startAt": "0", "jql": "project=PROJ", "fields": "summary,status"}
19
+ # @param jq [String, nil] JMESPath expression to filter/transform the response. IMPORTANT: Always use this to extract only needed fields and reduce token costs. Examples: "issues[*].{key: key, summary: fields.summary}" (extract specific fields), "issues[0]" (first result), "issues[*].key" (keys only). See https://jmespath.org
20
+ # @param outputformat [String, nil] Output format: "toon" (default, 30-60% fewer tokens) or "json". TOON is optimized for LLMs with tabular arrays and minimal syntax.
21
+ # @return [Object]
22
+ def jira_get(path, queryparams: nil, jq: nil, outputformat: nil)
23
+ params = {
24
+ 'path' => path,
25
+ 'queryParams' => queryparams,
26
+ 'jq' => jq,
27
+ 'outputFormat' => outputformat
28
+ }.compact
29
+ @leash.call('jira', 'jira_get', params)
30
+ end
31
+
32
+ # Create Jira resources. Returns TOON format by default (token-efficient). **IMPORTANT - Cost Optimization:** - Use `jq` param to extract only needed fields from response (e.g., `jq: "{key: key, id:...
33
+ #
34
+ # @param path [String] The Jira API endpoint path (without base URL). Must start with "/". Examples: "/rest/api/3/project", "/rest/api/3/search/jql", "/rest/api/3/issue/{issueIdOrKey}"
35
+ # @param queryparams [Hash, nil] Optional query parameters as key-value pairs. Examples: {"maxResults": "50", "startAt": "0", "jql": "project=PROJ", "fields": "summary,status"}
36
+ # @param jq [String, nil] JMESPath expression to filter/transform the response. IMPORTANT: Always use this to extract only needed fields and reduce token costs. Examples: "issues[*].{key: key, summary: fields.summary}" (extract specific fields), "issues[0]" (first result), "issues[*].key" (keys only). See https://jmespath.org
37
+ # @param outputformat [String, nil] Output format: "toon" (default, 30-60% fewer tokens) or "json". TOON is optimized for LLMs with tabular arrays and minimal syntax.
38
+ # @param body [Hash] Request body as a JSON object. Structure depends on the endpoint. Example for issue: {"fields": {"project": {"key": "PROJ"}, "summary": "Issue title", "issuetype": {"name": "Task"}}}
39
+ # @return [Object]
40
+ def jira_post(path, body, queryparams: nil, jq: nil, outputformat: nil)
41
+ params = {
42
+ 'path' => path,
43
+ 'queryParams' => queryparams,
44
+ 'jq' => jq,
45
+ 'outputFormat' => outputformat,
46
+ 'body' => body
47
+ }.compact
48
+ @leash.call('jira', 'jira_post', params)
49
+ end
50
+
51
+ # Replace Jira resources (full update). Returns TOON format by default. **IMPORTANT - Cost Optimization:** Use `jq` param to extract only needed fields from response **Output format:** TOON (default)...
52
+ #
53
+ # @param path [String] The Jira API endpoint path (without base URL). Must start with "/". Examples: "/rest/api/3/project", "/rest/api/3/search/jql", "/rest/api/3/issue/{issueIdOrKey}"
54
+ # @param queryparams [Hash, nil] Optional query parameters as key-value pairs. Examples: {"maxResults": "50", "startAt": "0", "jql": "project=PROJ", "fields": "summary,status"}
55
+ # @param jq [String, nil] JMESPath expression to filter/transform the response. IMPORTANT: Always use this to extract only needed fields and reduce token costs. Examples: "issues[*].{key: key, summary: fields.summary}" (extract specific fields), "issues[0]" (first result), "issues[*].key" (keys only). See https://jmespath.org
56
+ # @param outputformat [String, nil] Output format: "toon" (default, 30-60% fewer tokens) or "json". TOON is optimized for LLMs with tabular arrays and minimal syntax.
57
+ # @param body [Hash] Request body as a JSON object. Structure depends on the endpoint. Example for issue: {"fields": {"project": {"key": "PROJ"}, "summary": "Issue title", "issuetype": {"name": "Task"}}}
58
+ # @return [Object]
59
+ def jira_put(path, body, queryparams: nil, jq: nil, outputformat: nil)
60
+ params = {
61
+ 'path' => path,
62
+ 'queryParams' => queryparams,
63
+ 'jq' => jq,
64
+ 'outputFormat' => outputformat,
65
+ 'body' => body
66
+ }.compact
67
+ @leash.call('jira', 'jira_put', params)
68
+ end
69
+
70
+ # Partially update Jira resources. Returns TOON format by default. **IMPORTANT - Cost Optimization:** Use `jq` param to filter response fields. **Output format:** TOON (default) or JSON (`outputForma...
71
+ #
72
+ # @param path [String] The Jira API endpoint path (without base URL). Must start with "/". Examples: "/rest/api/3/project", "/rest/api/3/search/jql", "/rest/api/3/issue/{issueIdOrKey}"
73
+ # @param queryparams [Hash, nil] Optional query parameters as key-value pairs. Examples: {"maxResults": "50", "startAt": "0", "jql": "project=PROJ", "fields": "summary,status"}
74
+ # @param jq [String, nil] JMESPath expression to filter/transform the response. IMPORTANT: Always use this to extract only needed fields and reduce token costs. Examples: "issues[*].{key: key, summary: fields.summary}" (extract specific fields), "issues[0]" (first result), "issues[*].key" (keys only). See https://jmespath.org
75
+ # @param outputformat [String, nil] Output format: "toon" (default, 30-60% fewer tokens) or "json". TOON is optimized for LLMs with tabular arrays and minimal syntax.
76
+ # @param body [Hash] Request body as a JSON object. Structure depends on the endpoint. Example for issue: {"fields": {"project": {"key": "PROJ"}, "summary": "Issue title", "issuetype": {"name": "Task"}}}
77
+ # @return [Object]
78
+ def jira_patch(path, body, queryparams: nil, jq: nil, outputformat: nil)
79
+ params = {
80
+ 'path' => path,
81
+ 'queryParams' => queryparams,
82
+ 'jq' => jq,
83
+ 'outputFormat' => outputformat,
84
+ 'body' => body
85
+ }.compact
86
+ @leash.call('jira', 'jira_patch', params)
87
+ end
88
+
89
+ # Delete Jira resources. Returns TOON format by default. **Output format:** TOON (default) or JSON (`outputFormat: "json"`) **Common operations:** 1. **Delete issue:** `/rest/api/3/issue/{issueIdOrKe...
90
+ #
91
+ # @param path [String] The Jira API endpoint path (without base URL). Must start with "/". Examples: "/rest/api/3/project", "/rest/api/3/search/jql", "/rest/api/3/issue/{issueIdOrKey}"
92
+ # @param queryparams [Hash, nil] Optional query parameters as key-value pairs. Examples: {"maxResults": "50", "startAt": "0", "jql": "project=PROJ", "fields": "summary,status"}
93
+ # @param jq [String, nil] JMESPath expression to filter/transform the response. IMPORTANT: Always use this to extract only needed fields and reduce token costs. Examples: "issues[*].{key: key, summary: fields.summary}" (extract specific fields), "issues[0]" (first result), "issues[*].key" (keys only). See https://jmespath.org
94
+ # @param outputformat [String, nil] Output format: "toon" (default, 30-60% fewer tokens) or "json". TOON is optimized for LLMs with tabular arrays and minimal syntax.
95
+ # @return [Object]
96
+ def jira_delete(path, queryparams: nil, jq: nil, outputformat: nil)
97
+ params = {
98
+ 'path' => path,
99
+ 'queryParams' => queryparams,
100
+ 'jq' => jq,
101
+ 'outputFormat' => outputformat
102
+ }.compact
103
+ @leash.call('jira', 'jira_delete', params)
104
+ end
105
+ end
106
+ end
107
+ end
metadata ADDED
@@ -0,0 +1,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: leash-integration-jira
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Leash
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-04-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: leash-sdk
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.2.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.2.0
27
+ description: Auto-generated typed client for the Jira integration on Leash.
28
+ email:
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - lib/leash/integration/jira.rb
34
+ homepage: https://github.com/leash-build/leash-codegen
35
+ licenses:
36
+ - Apache-2.0
37
+ metadata: {}
38
+ post_install_message:
39
+ rdoc_options: []
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 2.7.0
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ requirements: []
53
+ rubygems_version: 3.0.3.1
54
+ signing_key:
55
+ specification_version: 4
56
+ summary: Typed Jira integration for Leash
57
+ test_files: []